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

TTreeFormula unable to access all but first index of vector branch

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened (View Workflow)
    • High
    • Resolution: Unresolved
    • 6.02.00, 5.34/32
    • None
    • TTree
    • None
    • lxplus

    Description

      We recently discovered a worrysome bug in TTreeFormula.

      The evaluation of the formula works nicely for vector-valued branches, as long as one only tries to access the first entry, e.g.

      xrand[0]

      gives the correct result.

      However, access of any further entries of the vector via TTreeFormula, e.g.

      xrand[1]

      returns 0 in all cases, whereas TTree::Draw works as expected.

      In older versions of ROOT, namely up to 5.34/09, this worked for TTreeFormula as well. All ROOT 5 releases after that and also all the ROOT 6 releases since then exhibit the unpleasant behavior.

      We have attached a ROOT script that showcases the bug.

      Attachments

        1. tree_2.cxx
          1 kB
        2. tree.cxx
          1 kB

        Activity

          People

            pcanal Philippe Canal
            cburgard Carsten Burgard
            Votes:
            12 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: