Temporary: do not link AliHLTMUON.so
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventBuffer.h
CommitLineData
78d7c6d3 1#ifndef AliEventBuffer_H
2#define AliEventBuffer_H
3//______________________________________________________
4////////////////////////////////////////////////////////
5//
6// class AliEventBuffer
7//
8// FIFO type event buffer
9//
10// Piotr.Skowronski@cern.ch
11//
12////////////////////////////////////////////////////////
13
14#include <TObject.h>
15#include <TList.h>
16#include "AliAOD.h"
17
18class AliEventBuffer: public TObject
19{
20 public:
21 AliEventBuffer();
22 AliEventBuffer(Int_t size);
23 virtual ~AliEventBuffer();
24
25 AliAOD* Push(AliAOD* event);//adds a new event, and returns old of do not fit in size
26 AliAOD* RemoveLast(){return dynamic_cast<AliAOD*>(fEvents.Remove(fEvents.Last()));}
27 void ResetIter(){fIter.Reset();}
28 AliAOD* Next(){return dynamic_cast<AliAOD*>( fIter.Next() );}
29 void SetSize(Int_t size){fSize = size;}
30 Int_t GetSize() const {return fSize;}
31 void SetOwner(Bool_t flag) {fEvents.SetOwner(flag);}
b684bec0 32 void Reset();
78d7c6d3 33 protected:
34 private:
b684bec0 35 Int_t fSize;//size of buffer; if -1 infinite size
78d7c6d3 36 TList fEvents;//list with arrays
37 TIter fIter;//iterator
38 ClassDef(AliEventBuffer,1)
39};
40
41
42#endif