]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDInputHandler.cxx
Reset object count after each event.
[u/mrichter/AliRoot.git] / STEER / AliESDInputHandler.cxx
index 38ad840996e1d510b22e022e46241e88d174170d..5d08d47ac84b939b220e1c07fb8754655fcf64a6 100644 (file)
@@ -23,6 +23,7 @@
 #include <TTree.h>
 #include <TString.h>
 #include <TObjString.h>
+#include <TProcessID.h>
 
 #include "AliESDInputHandler.h"
 #include "AliESDEvent.h"
@@ -36,7 +37,8 @@ AliESDInputHandler::AliESDInputHandler() :
   AliInputEventHandler(),
   fEvent(0x0),
   fBranches(""),
-  fBranchesOn("")
+  fBranchesOn(""),
+  fNObjCount(0)
 {
   // default constructor
 }
@@ -82,11 +84,14 @@ Bool_t AliESDInputHandler::BeginEvent(Long64_t /*entry*/)
        ((AliESDEvent*)fEvent)->CopyFromOldESD();
        old->Reset();
   }
+  fNObjCount = TProcessID::GetObjectCount();
+
   return kTRUE;
 }
 
 Bool_t  AliESDInputHandler::FinishEvent(){
   if(fEvent)fEvent->Reset();
+  TProcessID::SetObjectCount(fNObjCount);
   return kTRUE;
 }