]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisGoodies.cxx
updates to handle both types of calibration objects (online & offline)
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisGoodies.cxx
index 5336aab960b067e8579a3a1e26ccc941d5ffb339..f2ce7d0b75d849b051584f6ebaae9ad66baab83d 100644 (file)
@@ -33,6 +33,7 @@
 #ifdef WITHALIEN
 #include <TGridResult.h>
 #include <TFileMerger.h>
+#include <TFile.h> 
 #endif
 #include <TChain.h>
 #include <TGrid.h>
@@ -142,8 +143,6 @@ Bool_t AliAnalysisGoodies::Alien2Local(const TString collectionNameIn, const TSt
   collectionOu->SetCollectionName(collectionNameOu) ; 
   collectionOu->WriteHeader() ; 
 
-  TFileMerger merger ; 
-  
   const char* ocwd = gSystem->WorkingDirectory();
 
   Int_t counter = 1 ;  
@@ -171,7 +170,7 @@ Bool_t AliAnalysisGoodies::Alien2Local(const TString collectionNameIn, const TSt
     AliInfo(Form("Copying %s to %s\n", fileTURL.Data(), dir.Data())) ;  
     collectionOu->WriteBody(counter, collectionIn->GetGUID(""), collectionIn->GetLFN(""), dir, list) ;
     counter++ ;
-    merger.Cp(fileTURL, dir) ;
+    TFile::Cp(fileTURL, dir) ;
   }
   collectionOu->Export() ;
   gSystem->ChangeDirectory(ocwd) ; 
@@ -229,20 +228,15 @@ AliAnalysisDataContainer *  AliAnalysisGoodies::ConnectOuput(AliAnalysisTask * t
   char filename[20] ; 
 
     if (opt == "AOD" ) {    
-      if ( fAmgr->GetEventHandler() == 0x0) {
+      if ( fAmgr->GetOutputEventHandler() == 0x0) {
        AliAODHandler * aodHandler = new AliAODHandler() ; 
        aodHandler->SetOutputFileName(Form("%s_0.root",task->GetName())) ; 
-       fAmgr->SetEventHandler(aodHandler) ;
+       fAmgr->SetOutputEventHandler(aodHandler) ;
       } 
       sprintf(filename, "default") ; 
     } 
-    else {
-      if ( fAmgr->GetEventHandler() == 0x0) {
-       AliAODHandler * aodHandler = new AliAODHandler() ; 
-       fAmgr->SetEventHandler(aodHandler) ; 
-      }
+    else 
       sprintf(filename, "%s_%d.root",task->GetName(), index) ; 
-    }
     
     AliAnalysisDataContainer * taskOuput = 0x0 ;
     if ( fAmgr->GetOutputs() )