changes aod production
authordlohner <dlohner@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Aug 2012 09:39:07 +0000 (09:39 +0000)
committerdlohner <dlohner@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Aug 2012 09:39:07 +0000 (09:39 +0000)
PWGGA/GammaConv/AliV0ReaderV1.cxx

index dde2d45..f49cf7a 100644 (file)
@@ -139,6 +139,11 @@ void AliV0ReaderV1::Init()
     }
     fConversionGammas->Delete();//Reset the TClonesArray
    
+}
+
+//________________________________________________________________________
+void AliV0ReaderV1::UserCreateOutputObjects()
+{
     // Create AODs
 
     if(fCreateAOD){
@@ -152,17 +157,15 @@ void AliV0ReaderV1::Init()
        AddAODBranch("TClonesArray", &fConversionGammas, fDeltaAODFilename.Data());
        AliAnalysisManager::GetAnalysisManager()->RegisterExtraFile(fDeltaAODFilename.Data());
     }
-}
 
-//________________________________________________________________________
-void AliV0ReaderV1::UserCreateOutputObjects()
-{
-    // Create User Output Objects
 }
 
 //________________________________________________________________________
 void AliV0ReaderV1::UserExec(Option_t *){
 
+    // Check if correctly initialized
+    if(!fConversionGammas)Init();
+
     // User Exec
     fEventIsSelected=ProcessEvent(fInputEvent,fMCEvent);
 }
@@ -212,7 +215,7 @@ void AliV0ReaderV1::FillAODOutput()
            AliAODHandler * aodhandler = dynamic_cast<AliAODHandler*>(AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler());
            if (aodhandler && aodhandler->GetFillAOD()) {
              AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillExtension(kTRUE);
-             PostData(0, fConversionGammas);
+             //PostData(0, fConversionGammas);
              
            }
        }