Modifications needed to make the frame work in different working modes bu Andrei...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Apr 2009 19:35:04 +0000 (19:35 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Apr 2009 19:35:04 +0000 (19:35 +0000)
PWG4/Makefile
PWG4/PartCorrBase/AliAnaPartCorrMaker.cxx
PWG4/PartCorrBase/AliAnaPartCorrMaker.h
PWG4/PartCorrDep/AliAnaPi0.cxx

index 43ebfe3..4e515c4 100644 (file)
@@ -62,12 +62,12 @@ endif
 
 
 # only if no par file was loaded before
-ifeq ($(ALICEINC),-I.)
+#ifeq ($(ALICEINC),-I.)
   ifneq ($(ALICE_ROOT),)
     ALICEINC += -I$(ALICE_ROOT)/include
     ALICEINC += -I$(ALICE_ROOT)/JETAN   # some extra includes
   endif
-endif
+#endif
 
 CXXFLAGS += $(ALICEINC) -g
 
index 17f1cf5..2c8e120 100755 (executable)
@@ -135,6 +135,25 @@ TList * AliAnaPartCorrMaker::GetAODBranchList()
 }
 
 //________________________________________________________________________
+TList *AliAnaPartCorrMaker::GetOutputContainer()
+{
+// Fill the output list of histograms during the CreateOutputObjects stage.
+       if(!fAnalysisContainer || fAnalysisContainer->GetEntries()==0)
+                       AliFatal("Analysis job list not initialized");
+                       
+       for(Int_t iana = 0; iana <  fAnalysisContainer->GetEntries(); iana++){
+               AliAnaPartCorrBaseClass * ana =  ((AliAnaPartCorrBaseClass *) fAnalysisContainer->At(iana)) ;
+               if(fMakeHisto){// Analysis with histograms as output on
+                       //Fill container with appropriate histograms                    
+                       TList * templist =  ana -> GetCreateOutputObjects(); 
+                               for(Int_t i = 0; i < templist->GetEntries(); i++)
+                                       fOutputContainer->Add(templist->At(i)) ;
+               }// Analysis with histograms as output on
+       }//Loop on analysis defined
+   return fOutputContainer;
+}
+
+//________________________________________________________________________
 void AliAnaPartCorrMaker::Init()
 {  
        //Init container histograms and other common variables
@@ -148,13 +167,7 @@ void AliAnaPartCorrMaker::Init()
                ana->SetReader(fReader); //SetReader for each analysis
                ana->Init();
                
-               if(fMakeHisto){// Analysis with histograms as output on
-                       //Fill container with appropriate histograms                    
-                       TList * templist =  ana -> GetCreateOutputObjects(); 
-                               for(Int_t i = 0; i < templist->GetEntries(); i++)
-                                       fOutputContainer->Add(templist->At(i)) ;
-               }// Analysis with histograms as output on
-       }//Loop on analysis defined
+               }//Loop on analysis defined
 }
 
 //____________________________________________________________________________
index c7bf25c..7aacbfb 100755 (executable)
@@ -33,7 +33,7 @@ public:
 
   //Setter and getters
   TList * GetAODBranchList() ;
-  TList * GetOutputContainer()    const {return fOutputContainer ; }
+  TList * GetOutputContainer() ;
 
   Int_t GetAnaDebug() const  { return fAnaDebug ; }
   void SetAnaDebug(Int_t d)   { fAnaDebug = d ; }
index 1853765..0a6fb14 100755 (executable)
@@ -136,9 +136,16 @@ void AliAnaPi0::Init()
                fhEtalon->SetYTitle("#alpha") ;
                fhEtalon->SetZTitle("m_{#gamma#gamma} (GeV)") ;
        }
+       
+}
 
-
-//create event containers
+//________________________________________________________________________________________________________________________________________________
+TList * AliAnaPi0::GetCreateOutputObjects()
+{  
+       // Create histograms to be saved in output file and 
+       // store them in fOutputContainer
+       
+       //create event containers
        fEventsList = new TList*[fNCentrBin*fNZvertBin*fNrpBin] ;
        
        for(Int_t ic=0; ic<fNCentrBin; ic++){
@@ -155,15 +162,6 @@ void AliAnaPi0::Init()
        fPHOSGeo = new AliPHOSGeoUtils("PHOSgeo") ;
 #endif 
        
-}
-
-//________________________________________________________________________________________________________________________________________________
-TList * AliAnaPi0::GetCreateOutputObjects()
-{  
-       // Create histograms to be saved in output file and 
-       // store them in fOutputContainer
-
-       
        TList * outputContainer = new TList() ; 
        outputContainer->SetName(GetName()); 
        
@@ -481,6 +479,12 @@ void AliAnaPi0::Terminate()
   //Do some calculations and plots from the final histograms.
  
   printf(" *** %s Terminate:", GetName()) ; 
+  
+  if (!fhRe1) {
+     Error("Terminate", "Remote output histograms not imported in AliAnaPi0 object");
+     return;
+  }
+      
   printf("        Mgg Real        : %5.3f , RMS : %5.3f \n", fhRe1[0]->GetMean(),   fhRe1[0]->GetRMS() ) ;
  
   TCanvas  * cIM = new TCanvas("cIM", "", 400, 10, 600, 700) ;