adding ChainToTextList function
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Nov 2006 14:56:37 +0000 (14:56 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Nov 2006 14:56:37 +0000 (14:56 +0000)
PWG0/CreateESDChain.C

index a6a2926351146944d8d0e79a19e4915e7a812c6a..b28f0dc6481a761a395a51951405a40e83923d06 100644 (file)
@@ -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);
 }