Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10149

[IO] TLeaf::GetLeafCounter broken for branches holding arrays of Double32_t with attributes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 6.16/00
    • Fix Version/s: None
    • Component/s: I/O
    • Labels:
      None
    • Environment:

      all

      Description

      The title of the issue says it all. This is probably due to the parsing which happens in `GetLeafCounter`.
      Reproducer:

        TTree t("t", "t");
        int n;
        Double32_t arr[64];
        t.Branch("n", &n);
        t.Branch("arr", arr, "arr[n]/d[0,0,10]");
        t.Branch("arr2", arr, "arr2[n]/D");
        for (auto ievt : ROOT::TSeqU(1)) {
          n = 3;
          for (auto inumb : ROOT::TSeqI(n)) {
            auto rndm = gRandom->Uniform(0, 2 * TMath::Pi());
            arr[inumb] = rndm;
          }
          t.Fill();
        }
       for (auto name : {"arr", "arr2"}) {
          auto b = t.GetBranch(name);
          auto l = b->GetLeaf(name);
          int len;
          auto b_c = l->GetLeafCounter(len);
          cout << "Leaf " << name << ", len " << len << " leafcount " << (b_c ? b_c->GetName() : "None") << std::endl;
       }
      

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              dpiparo Danilo Piparo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: