]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliAnalysisSelector.cxx
Magnetic field map based on measured data (R. Shahoyan)
[u/mrichter/AliRoot.git] / ANALYSIS / AliAnalysisSelector.cxx
index 0cd1ac115ef3cbc26b0215d2c8674ec942c08e52..f7da20dd04560485f9405eab8d33e6218180b185 100644 (file)
@@ -21,7 +21,8 @@
 // AliAnalysisManager to handle analysis.
 //==============================================================================
 
-#include "Riostream.h"
+#include <Riostream.h>
+#include <TProcessID.h>
 
 #include "AliAnalysisManager.h"
 #include "AliAnalysisTask.h"
@@ -77,8 +78,8 @@ void AliAnalysisSelector::Begin(TTree *)
 // Assembly the input list.
    RestoreAnalysisManager();
    if (fAnalysis && fAnalysis->GetDebugLevel()>1) {
-      cout << "->AliAnalysisSelector->Init: Analysis manager restored" << endl;
-   }   
+      cout << "->AliAnalysisSelector->Begin: Analysis manager restored" << endl;
+   }
 }
 
 //______________________________________________________________________________
@@ -95,7 +96,7 @@ void AliAnalysisSelector::SlaveBegin(TTree *tree)
          cout << "<-AliAnalysisSelector->SlaveBegin()" << endl;
       }   
    }   
-}      
+}
 
 //______________________________________________________________________________
 Bool_t AliAnalysisSelector::Notify()
@@ -105,8 +106,9 @@ Bool_t AliAnalysisSelector::Notify()
    // is started when using PROOF. It is normaly not necessary to make changes
    // to the generated code, but the routine can be extended by the
    // user if needed. The return value is currently not used.
-   if (fAnalysis) fAnalysis->Notify();
-}   
+   if (fAnalysis) return fAnalysis->Notify();
+   return kFALSE;
+}
 
 //______________________________________________________________________________
 Bool_t AliAnalysisSelector::Process(Long64_t entry)
@@ -114,9 +116,11 @@ Bool_t AliAnalysisSelector::Process(Long64_t entry)
 // Event loop.
    if (fAnalysis->GetDebugLevel() >1 ) {
       cout << "->AliAnalysisSelector::Process()" << endl;
-   }   
-   fAnalysis->GetEntry(entry); // Not needed anymore in version 2
+   }
+   Int_t nobjCount = TProcessID::GetObjectCount();
+   fAnalysis->GetEntry(entry);
    fAnalysis->ExecAnalysis();
+   TProcessID::SetObjectCount(nobjCount);
    if (fAnalysis->GetDebugLevel() >1 ) {
       cout << "<-AliAnalysisSelector::Process()" << endl;
    }   
@@ -168,7 +172,7 @@ void AliAnalysisSelector::Terminate()
   // a query. It always runs on the client, it can be used to present
   // the results graphically or save the results to file.
    if (!fAnalysis) {
-      Error("Terminate","AliAnalysisSelector::Terminate: No analysisManager!!!");
+      Error("Terminate","AliAnalysisSelector::Terminate: No analysis manager!!!");
       return;
    }   
    if (fAnalysis->GetDebugLevel() >1 ) {