Re: Problems with AddFriend Functionality

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Tue, 29 Mar 2011 15:09:47 -0500


Hi,

Did you build an index on the friend tree? (i.e. OptDL->BuildIndex("RunNumber","EventNumber")) Is the OptDL tree as long as the sum of the root trees in the chain?

Cheers,
Philippe.

On 3/26/11 10:12 AM, Hovhannes Khandanyan wrote:
> Dear ROOTers,
>
> Out of large data ntuple I produce light weight analysis one where I store several analysis related flags as well as 'RunNumber' and 'EventNumber' to keep track of my 'good' events. Snippet below shows the RunNumber:EventNumber pair for one of analysis flag:
>
> root [3] TFile *_file0 = TFile::Open("/mnt/data/khandan/r1831/output070/default/data_pdg24/TL.root")
> root [4] OptDL->Scan("RunNumber:EventNumber","Passedee")
> ************************************
> * Row * RunNumber * EventNumb *
> ************************************
> * 8267 * 161118 * 6837664 *
> * 474828 * 165767 * 79945104 *
> * 582410 * 165954 * 21646624 *
> * 1079001 * 166786 * 6993071 *
> * 1131333 * 166786 * 60573764 *
> * 1311443 * 167776 * 23895694 *
> * 1358427 * 167776 * 22650533 *
> * 1517976 * 167776 * 83835161 *
> * 1584512 * 167776 * 54383568 *
> * 1618455 * 167776 * 152076670 *
> * 1701977 * 167776 * 82455435 *
> * 1773579 * 167576 * 6813884 *
> * 1907269 * 167576 * 75128868 *
> * 1918529 * 167576 * 90623768 *
> * 1971204 * 167576 * 127999945 *
> * 2080552 * 167607 * 54473522 *
> * 2523235 * 167680 * 37585531 *
> ************************************
> ==> 17 selected entries
> (Long64_t)17
> root [5]
>
> Anyhow, when I try to use the same analysis flag - "Passedee" and scan through Run& Event Numbers in initial data ntuple I see that "Passedee" flag points at totally different RunNumber:EventNumber pair in initial data ntuple:
>
> root [5]
> root [5] TChain * ch = new TChain("CollectionTree")
> root [6] ch->Add("/mnt/data/r2040/data/All/*root*")
> (Int_t)1955
> root [7] ch->AddFriend("OptDL","/mnt/data/khandan/r1831/output070/default/data_pdg24/TL.root")
> (class TFriendElement*)0xa554590
> root [8] ch->Scan("RunNumber:EventNumber","Passedee")
> Warning in<TClass::TClass>: no dictionary for class AttributeListLayout is available
> Warning in<TClass::TClass>: no dictionary for class pair<string,string> is available
> ************************************
> * Row * RunNumber * EventNumb *
> ************************************
> * 8267 * 160958 * 13212582 *
> * 474828 * 165732 * 4530174 *
> * 582410 * 165767 * 100456192 *
> * 1079001 * 166383 * 89509980 *
> * 1131333 * 166466 * 25678109 *
> * 1311443 * 166658 * 2003931 *
> * 1358427 * 166658 * 105091292 *
> * 1517976 * 166786 * 100216385 *
> * 1584512 * 166924 * 35296401 *
> * 1618455 * 166924 * 6056393 *
> * 1701977 * 166927 * 13786653 *
> * 1773579 * 167776 * 1267667 *
> * 1907269 * 167776 * 3706374 *
> * 1918529 * 167776 * 114072348 *
> * 1971204 * 167776 * 153345540 *
> * 2080552 * 167776 * 66843739 *
> * 2523235 * 167607 * 103342907 *
> ************************************
> ==> 17 selected entries
> (Long64_t)17
> root [9]
>
>
> although I confirm 1-to-1 correspondence of RunNumber/EventNumber parameters in initial and derived analysis ntuples;
>
> root [9]
> root [9] ch->Scan("RunNumber:EventNumber","EventNumber==6837664")
> ************************************
> * Row * RunNumber * EventNumb *
> ************************************
> * 11995 * 161118 * 6837664 *
> ************************************
> ==> 1 selected entry
> (Long64_t)1
> root [10]
>
> So, please let me know what I am doing wrong and what I should do to ensure that my flag (eg "Passedee") points ar same event both in analysis and initial data ntuples.
>
> Thank you,
> Hovhannes
>
>
>
Received on Tue Mar 29 2011 - 22:09:53 CEST

This archive was generated by hypermail 2.2.0 : Wed Mar 30 2011 - 11:50:01 CEST