]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Call VEventHandler::Init(Option_t*) in SlaveBegin() and VEventHandler::Init(TTree...
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Nov 2007 14:11:34 +0000 (14:11 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Nov 2007 14:11:34 +0000 (14:11 +0000)
ANALYSIS/AliAnalysisManager.cxx

index 6deed07c001f66ce09780a56371490938a322cce..c96618341812e6aa4fecea7955aea92107b6207d 100644 (file)
@@ -160,32 +160,31 @@ void AliAnalysisManager::Init(TTree *tree)
   // Init() will be called many times when running with PROOF.
    if (!tree) return;
    if (fDebug > 1) {
-      printf("->AliAnalysisManager::Init(%s)\n", tree->GetName());
+      printf("->AliAnalysisManager::InitTree(%s)\n", tree->GetName());
    }
 
-   // Call InitIO of EventHandler
+   // Call InitTree of EventHandler
    if (fOutputEventHandler) {
       if (fMode == kProofAnalysis) {
-         fOutputEventHandler->InitIO("proof");
+         fOutputEventHandler->Init(0x0, "proof");
       } else {
-         fOutputEventHandler->InitIO("local");
+         fOutputEventHandler->Init(0x0, "local");
       }
    }
 
    if (fInputEventHandler) {
-      fInputEventHandler->SetInputTree(tree);
       if (fMode == kProofAnalysis) {
-         fInputEventHandler->InitIO("proof");
+         fInputEventHandler->Init(tree, "proof");
       } else {
-         fInputEventHandler->InitIO("local");
+         fInputEventHandler->Init(tree, "local");
       }
    }
 
    if (fMCtruthEventHandler) {
       if (fMode == kProofAnalysis) {
-         fMCtruthEventHandler->InitIO("proof");
+         fMCtruthEventHandler->Init(0x0, "proof");
       } else {
-         fMCtruthEventHandler->InitIO("local");
+         fMCtruthEventHandler->Init(0x0, "local");
       }
    }
 
@@ -213,6 +212,32 @@ void AliAnalysisManager::SlaveBegin(TTree *tree)
       cout << "->AliAnalysisManager::SlaveBegin()" << endl;
    }
 
+   // Call Init of EventHandler
+   if (fOutputEventHandler) {
+      if (fMode == kProofAnalysis) {
+         fOutputEventHandler->Init("proof");
+      } else {
+         fOutputEventHandler->Init("local");
+      }
+   }
+
+   if (fInputEventHandler) {
+      fInputEventHandler->SetInputTree(tree);
+      if (fMode == kProofAnalysis) {
+         fInputEventHandler->Init("proof");
+      } else {
+         fInputEventHandler->Init("local");
+      }
+   }
+
+   if (fMCtruthEventHandler) {
+      if (fMode == kProofAnalysis) {
+         fMCtruthEventHandler->Init("proof");
+      } else {
+         fMCtruthEventHandler->Init("local");
+      }
+   }
+
    TIter next(fTasks);
    AliAnalysisTask *task;
    // Call CreateOutputObjects for all tasks