]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliMultiAODInputHandler.h
MCEvent::GetTrack gives back *VParticle.
[u/mrichter/AliRoot.git] / STEER / AliMultiAODInputHandler.h
index b6f9e7ef94e7674f81a91648039058ca0867bd61..0e4e1e3fa357ac893ec4d1d4cf9e5674175931ef 100644 (file)
 //-------------------------------------------------------------------------
 
 #include "AliInputEventHandler.h"
-class TObject;
+class AliVEventPool;
 class AliAODEvent;
 
 class AliMultiAODInputHandler : public AliInputEventHandler {
 
  public:
+    AliMultiAODInputHandler();
     AliMultiAODInputHandler(Int_t size);
     AliMultiAODInputHandler(const char* name, const char* title, Int_t size);
     virtual ~AliMultiAODInputHandler();
     void   SetBufferSize(Int_t size) {fBufferSize = size;}
-    void   SetEventPool(TObject* pool) {fEventPool = pool;}
+    void   SetEventPool(AliVEventPool* pool) {fEventPool = pool;}
     Int_t  GetBufferSize()           const {return fBufferSize;}
     Int_t  GetNBuffered()            const {return fNBuffered;}
-    Bool_t IsBufferReady()           const {return (fNBuffered >= fBufferSize);}
+    Bool_t IsBufferReady()           const {return (fNBuffered >= (fBufferSize -1));}
     Bool_t IsFreshBuffer()           const {return (fIndex == (fBufferSize - 1));}
-           
-    TObject*       GetEventPool()    const {return fEventPool;}
-    AliAODEvent*   GetEvent(Int_t iev);
+    AliVEventPool        *GetEventPool()      const {return fEventPool;}
+    virtual AliVEvent    *GetEvent()          const {return 0;}
+    virtual AliAODEvent  *GetEvent(Int_t iev) const;
+    AliAODEvent          *GetLatestEvent()    const {return fEventBuffer[fIndex];}
     // From the interface
+    virtual Bool_t Init(Option_t* /*opt*/)    {return kTRUE;}
     virtual Bool_t Init(TTree* tree, Option_t* /*opt*/);
     virtual Bool_t FinishEvent();
+    virtual Bool_t BeginEvent(Long64_t /*entry*/);
+    
  private:
     AliMultiAODInputHandler(const AliMultiAODInputHandler& handler);             
     AliMultiAODInputHandler& operator=(const AliMultiAODInputHandler& handler);  
@@ -40,8 +45,9 @@ class AliMultiAODInputHandler : public AliInputEventHandler {
     Int_t          fBufferSize;   // Size of the buffer
     Int_t          fNBuffered;    // Number of events actually buffered
     Int_t          fIndex;        // Pointer to most recent event
+    Int_t          fCurrentBin;   // Current bin from the pool
     TTree*         fTree;         // Pointer to the tree
-    TObject*       fEventPool;    // Pointer to the pool
+    AliVEventPool* fEventPool;    // Pointer to the pool
     AliAODEvent**  fEventBuffer;  // The event buffer
     ClassDef(AliMultiAODInputHandler, 1);
 };