]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changed to new output format for the trains and added extra protection for the cases...
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 01:47:18 +0000 (01:47 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 01:47:18 +0000 (01:47 +0000)
PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx
PWG4/GammaConv/AliV0Reader.cxx
PWG4/GammaConv/AliV0Reader.h
PWG4/macros/ConfigGammaConversion.C

index b34c5fdda1d4bc72ad756727b7fd8277b7ef7714..b26bcfa3a244083857ea6d368bc839f4e3a356ae 100644 (file)
@@ -359,6 +359,7 @@ void AliAnalysisTaskGammaConversion::ConnectInputData(Option_t */*option*/){
     // Write warning here cuts and so on are default if this ever happens
   }
   fV0Reader->Initialize();
+  fDoMCTruth = fV0Reader->GetDoMCTruth();
 }
 
 
index 2e892d1b878b04d89162877301bed1e55ad2dbac..9e5b1f7ca31e7db05337c44d33f8c9dbab5c144f 100644 (file)
@@ -203,15 +203,17 @@ void AliV0Reader::Initialize(){
   fMCTruth = (AliMCEventHandler*)((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
   if(fMCTruth == NULL){
     //print warning here
+    fDoMC = kFALSE;
   }
        
   //Get pointer to the mc stack
-  fMCStack = fMCTruth->MCEvent()->Stack();
-  if(fMCStack == NULL){
-    //print warning here
+  if(fMCTruth){
+    fMCStack = fMCTruth->MCEvent()->Stack();
+    if(fMCStack == NULL){
+      //print warning here
+    }
   }
        
-       
   // for CF
   //Get pointer to the mc event
   if(fDoCF){
index 6c777df4a1e8fd964cbe5dbf1eb73bad3097f9e1..d85fcc3379be9a05dccf5836fe1ad67e2ebfc65d 100644 (file)
@@ -536,6 +536,11 @@ class AliV0Reader : public TObject {
    * Sets the flag to enable/disable the usage of MC information. 
    */
   void SetDoMCTruth(Bool_t doMC){fDoMC = doMC;}
+
+  /*
+   * Sets the flag to enable/disable the usage of MC information. 
+   */
+  Bool_t GetDoMCTruth(){return fDoMC;}
        
   /*
    * Sets the flag to enable/disable the cut dedx N sigma 
index 52694ea0703b391b7d7781780b6342578f6f8c06..bf474e88aa8e85de5965976b3373e455be798b06 100644 (file)
@@ -1015,11 +1015,14 @@ AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments,AliAnaly
   if(kGCoutputFileAppendix.Contains(".root")){
     kGCoutputFileAppendix.ReplaceAll(".root","");
   }
-  TString fileOut = kGCoutputFileName + kGCoutputFileAppendix + ".root";
+  //TString fileOut = kGCoutputFileName + kGCoutputFileAppendix + ".root";
+
+  TString outputfile = AliAnalysisManager::GetCommonFileName();  
+  outputfile += ":PWG4GammaConversion";
        
-  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histogramsAliGammaConversion", TList::Class(),AliAnalysisManager::kOutputContainer, fileOut);
+  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histogramsAliGammaConversion", TList::Class(),AliAnalysisManager::kOutputContainer, outputfile);
   // for CF
-  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("ccontainer0",AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,fileOut);
+  AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("ccontainer0",AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile);
        
   //------------------------ END: Define input/output handlers ---------------------------------------------------