//-------------------------------------------------------------------------
#include "AliInputEventHandler.h"
-class TObject;
+class AliVEventPool;
class AliAODEvent;
class AliMultiAODInputHandler : public AliInputEventHandler {
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;}
+ AliVEventPool *GetEventPool() const {return fEventPool;}
virtual AliVEvent *GetEvent() const {return 0;}
virtual AliAODEvent *GetEvent(Int_t iev) const;
- AliAODEvent *GetLatestEvent() const {return GetEvent(fIndex);}
+ 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);
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);
};