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;
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);
}