]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisGoodies.cxx
add getter for pt on emcal
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisGoodies.cxx
index 16ec7a3a9fa042fcb1de4d5562c2625aa0990a29..1bcc9e6be2cb91a601473ff7c466f1ce3b4b1875 100644 (file)
@@ -33,6 +33,7 @@
 #ifdef WITHALIEN
 #include <TGridResult.h>
 #include <TFileMerger.h>
+#include <TFile.h> 
 #endif
 #include <TChain.h>
 #include <TGrid.h>
@@ -47,6 +48,9 @@ AliAnalysisGoodies::AliAnalysisGoodies() :
   fESDTreeName("esdTree"), 
   fAmgr(0)
 {
+    //ctor
+    // connects to alien and creates an analysis manager
+
   fTimer.Reset() ; 
    
   TString token = gSystem->Getenv("GRID_TOKEN") ; 
@@ -66,7 +70,9 @@ AliAnalysisGoodies::AliAnalysisGoodies(const AliAnalysisGoodies& ag) :
   fESDTreeName(""), 
   fAmgr(0x0)  
 {
-  
+    //copy ctor
+    // connects to alien and creates an analysis manager
+
   fESDTreeName = ag.fESDTreeName ;  
   TString token = gSystem->Getenv("GRID_TOKEN") ; 
   
@@ -92,6 +98,8 @@ AliAnalysisGoodies& AliAnalysisGoodies::operator=(const AliAnalysisGoodies& ag)
 //______________________________________________________________________________
 void AliAnalysisGoodies::Help() const  
 {
+    // helper
+    // display all available utilities
   AliInfo("Analysis utilities:\n") ; 
   printf("                ***  Alien2Local  : copy files ESD files listed in an xml collection from AliEn catalog to local storage and creates a local xml collection  \n") ; 
   printf("                                        usage: Alien2Local(in, out)\n") ; 
@@ -142,8 +150,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 +177,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,10 +235,10 @@ 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") ; 
     }