Bug fix for GetLatestEvent()
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Dec 2008 08:37:45 +0000 (08:37 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Dec 2008 08:37:45 +0000 (08:37 +0000)
STEER/AliMultiAODInputHandler.h

index 3b92287..0e4e1e3 100644 (file)
@@ -26,12 +26,12 @@ class AliMultiAODInputHandler : public AliInputEventHandler {
     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));}
     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*/);