ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/Analysis.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/Analysis.cc (file contents):
Revision 1.24 by bendavid, Fri Dec 12 16:57:42 2008 UTC vs.
Revision 1.25 by loizides, Tue Jan 20 15:08:32 2009 UTC

# Line 288 | Line 288 | void Analysis::FileInputFromEnv()
288        return;
289    }
290  
291
291    if (!files.IsNull()) { // add local files
292      Info("FileInputFromEnv", "Got from environment:\n"
293           "\n\tMIT_FILES=%s\n", files.Data());
# Line 310 | Line 309 | void Analysis::FileInputFromEnv()
309         catalog.Data(), book.Data(), dataset.Data(), filesets.Data());
310  
311    Catalog cat(catalog);
312 <  TString tok(";");
313 <  TObjArray *arr = filesets.Tokenize(tok);
314 <  if (arr) {
316 <    for (Int_t i=0; i<arr->GetEntries(); ++i) {
317 <      TObjString *fileset = dynamic_cast<TObjString*>(arr->At(i));
318 <      if (!fileset) continue;
319 <      Dataset *d = cat.FindDataset(book, dataset, fileset->String());
320 <      if (!d)
321 <        continue;
312 >  if (filesets.IsNull()) {
313 >    Dataset *d = cat.FindDataset(book, dataset);
314 >    if (d) {
315        AddDataset(d);
316        delete d;
317      }
318 <    delete arr;
318 >  } else {
319 >    TString tok(";");
320 >    TObjArray *arr = filesets.Tokenize(tok);
321 >    if (arr) {
322 >      for (Int_t i=0; i<arr->GetEntries(); ++i) {
323 >        TObjString *fileset = dynamic_cast<TObjString*>(arr->At(i));
324 >        if (!fileset) continue;
325 >        Dataset *d = cat.FindDataset(book, dataset, fileset->String());
326 >        if (!d)
327 >          continue;
328 >        AddDataset(d);
329 >        delete d;
330 >      }
331 >      delete arr;
332 >    }
333    }
334   }
335  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines