ROOT Version: 6.20/07
Platform: linuxx8664gcc
Compiler: Not Provided
Hello,
I have a bunch of ROOT files with TTree named Events
, under which I’ve saved a few TLeaves containing information about the number of events remaining after various cuts. I notice that, regardless of whether I’m using C++ or pyROOT, I’m unable to get the value of any TLeaf without first calling TTree::Scan()
, either on the entire tree or specifying that individual leaf. Here is an example of what I mean:
Expected Behavior:
Let’s just say the value of NPROC
is 57077.000
, then I’d expect:
root [1] Events->GetLeaf("NPROC")->GetValue()
(double) 57077.000
Actual Behavior:
Instead, I have to call Scan()
first to obtain the actual value.
root [1] Events->GetLeaf("NPROC")->GetValue()
(double) 0.0000000
root [2] Events->Scan("")
**********************************************************************************
* Row * Instance * NPROC * NFLAGS * Dijet_par <continued...>
**********************************************************************************
* 0 * 0 * 57077 * 56781 * 0.0002844 * ....
<continued...>
root [3] Events->GetLeaf("NPROC")->GetValue()
(double) 57077.000
I’ve just shown an example via the command line, but the same happens for me when using a C++ or pyROOT script. What is the explanation for this behavior, and is there a better way of getting the value of the leaf? Thank you in advance!