From: jgrosseo Date: Mon, 6 Nov 2006 14:56:37 +0000 (+0000) Subject: adding ChainToTextList function X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6f052bf3e8770a1fd76c0de9ea0375ee4e6dc8ea adding ChainToTextList function --- diff --git a/PWG0/CreateESDChain.C b/PWG0/CreateESDChain.C index a6a29263511..b28f0dc6481 100644 --- a/PWG0/CreateESDChain.C +++ b/PWG0/CreateESDChain.C @@ -149,12 +149,10 @@ TChain* CreateESDChain(const char* aDataDir = "ESDfiles.txt", Int_t aRuns = 20, return chain; } -void LookupWrite(TChain* chain, const char* target) +void ChainToTextFile(TChain* chain, const char* target) { - // looks up the chain and writes the remaining files to the text file target - - chain->Lookup(); - + // write a text list of the files in the chain + TObjArray* list = chain->GetListOfFiles(); TIterator* iter = list->MakeIterator(); TObject* obj = 0; @@ -168,4 +166,13 @@ void LookupWrite(TChain* chain, const char* target) outfile.close(); delete iter; +} + +void LookupWrite(TChain* chain, const char* target) +{ + // looks up the chain and writes the remaining files to the text file target + + chain->Lookup(); + + ChainToTextFile(chain, target); }