Change of getter in AliAnalysisManager
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2007 17:27:06 +0000 (17:27 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2007 17:27:06 +0000 (17:27 +0000)
JETAN/AliAnalysisTaskJets.cxx
PWG4/AliAnaGammaPhos.cxx

index fdb43e5..3e718ed 100644 (file)
@@ -26,6 +26,8 @@
 #include "AliESDEvent.h"
 #include "AliAODEvent.h"
 #include "AliAODHandler.h"
+#include "AliMCEventHandler.h"
+#include "AliStack.h"
 
 
 ClassImp(AliAnalysisTaskJets)
@@ -66,7 +68,8 @@ void AliAnalysisTaskJets::CreateOutputObjects()
 //
 //  Default AOD
     if (fDebug > 1) printf("AnalysisTaskJets::CreateOutPutData() \n");
-    AliAODHandler* handler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetEventHandler());
+    AliAODHandler* handler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
+    
     fAOD   = handler->GetAOD();
     fTreeA = handler->GetTree();
     fJetFinder->ConnectAOD(fAOD);
@@ -74,6 +77,7 @@ void AliAnalysisTaskJets::CreateOutputObjects()
 //  Histogram
     OpenFile(1);
     fHisto = new TH1F("fHisto", "Jet Et", 100, 0., 100.);
+    
 }
 
 void AliAnalysisTaskJets::Init()
@@ -104,6 +108,11 @@ void AliAnalysisTaskJets::Exec(Option_t */*option*/)
 {
 // Execute analysis for current event
 //
+    AliMCEventHandler*    mctruth = (AliMCEventHandler*) 
+       ((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
+    AliStack* stack = mctruth->Stack();
+    printf("AliAnalysisTaskJets: Number of tracks %5d\n", stack->GetNtrack());
+
     Long64_t ientry = fChain->GetReadEntry();
     if (fDebug > 1) printf("Analysing event # %5d\n", (Int_t) ientry);
     fJetFinder->ProcessEvent(ientry);
index d09c130..b20f113 100644 (file)
@@ -128,7 +128,7 @@ void AliAnaGammaPhos::CreateOutputObjects()
   // Create the outputs containers
  
   OpenFile(0) ;
-  AliAODHandler* handler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetEventHandler());  
+  AliAODHandler* handler = (AliAODHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());  
   fTreeA = handler->GetTree() ; 
   fAOD   = handler->GetAOD();
   fAODPhotons = fAOD->GetClusters() ;