Hi Rene,
thanks for the implementation!
Best,
Matthias
Rene Brun wrote:
> Hi Matthias,
>
> Thanks for this remark. I have now implemented support for event lists
> in TTree::GetMaximum and GetMinimum (SVN trunk).
>
> Rene Brun
>
> Matthias Kirsch wrote:
>> Dear ROOT team,
>>
>> I have a question concerning TTree and TEventList (or TEntryList).
>> After making a selection of events from a TTree and storing the result
>> in a TEventList, I would like to get the minimum (or the maximum) of a
>> variable ("iCount" in the example below).
>> Neither TEventList nor TEntryList have a method GetMinimum(const char*
>> columnname). If I set the pointer to the TEventList via SetEventList
>> and use the GetMinimum(...) method of the TTree, the TEventList
>> selection is not taken into account.
>>
>> TFile* tf = TFile::Open("testfile.root","READ")
>> TTree* tt = (TTree*)tf->Get("testtree")
>> testtree->GetMinimum("iCount")
>> //returns 0
>> testtree->Draw(">>elist","iCount > 10")
>> TEventList* tel = (TEventList*)gDirectory->Get("elist")
>> testtree->SetEventList(tel)
>> testtree->GetMinimum("iCount")
>> // returns 0 again
>>
>>
>> Is there a way to get the minimum/maximum value of a branch without
>> having to loop over the remaining entries in the TEventList, storing
>> values in a map,...? (Asking the TLeaf "iCount" for its minimum
>> returns the same value: 0.).
>>
>> I'm using ROOT v5.24 on a linux system.
>>
>> Cheers,
>> Matthias
>>
>
>
Received on Wed Aug 26 2009 - 22:11:08 CEST