excepting also empty directory for merging
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 May 2010 14:42:18 +0000 (14:42 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 May 2010 14:42:18 +0000 (14:42 +0000)
PWG4/JetTasks/AliAnalysisHelperJetTasks.cxx

index c0155e1..4a66854 100644 (file)
@@ -243,7 +243,12 @@ void  AliAnalysisHelperJetTasks::MergeOutput(char* cFiles, char* cDir, char *cLi
   Int_t ibTotal = 0;
   while(in1>>cFile){
     fIn[ibTotal] = TFile::Open(cFile);
-    dIn[ibTotal] = (TDirectory*)fIn[ibTotal]->Get(cDir);
+    if(strlen(cDir)==0){
+      dIn[ibTotal] = gDirectory;
+    }
+    else{
+      dIn[ibTotal] = (TDirectory*)fIn[ibTotal]->Get(cDir);
+    }
     if(!dIn[ibTotal]){
       Printf("%s:%d No directory %s found, exiting...",__FILE__,__LINE__,cDir);
       fIn[ibTotal]->ls();