+TObjArray* Chain2List(TChain* chain)
+{
+ // returns a TObjArray of TObjStrings of the file names in the chain
+
+ TObjArray* result = new TObjArray;
+
+ for (Int_t i=0; i<chain->GetListOfFiles()->GetEntries(); i++)
+ result->Add(new TObjString(chain->GetListOfFiles()->At(i)->GetTitle()));
+
+ return result;
+}
+