Updating
[u/mrichter/AliRoot.git] / HBTAN / AliHBTEventBuffer.h
CommitLineData
bed069a4 1#ifndef ALIHBTEVENTBUFFER_H
2#define ALIHBTEVENTBUFFER_H
3
4#include <TObject.h>
5#include <TList.h>
6#include "AliHBTEvent.h"
7
8class AliHBTEventBuffer: public TObject
9{
10 public:
11 AliHBTEventBuffer();
12 AliHBTEventBuffer(Int_t size);
13 virtual ~AliHBTEventBuffer(){}
14
15 AliHBTEvent* Push(AliHBTEvent* event);//adds a new event, and returns old of do not fit in size
16 AliHBTEvent* RemoveLast(){return dynamic_cast<AliHBTEvent*>(fEvents.Remove(fEvents.Last()));}
17 void ResetIter(){fIter.Reset();}
18 AliHBTEvent* Next(){return dynamic_cast<AliHBTEvent*>( fIter.Next() );}
19 void SetSize(Int_t size){fSize = size;}
20 Int_t GetSize() const {return fSize;}
21 void SetOwner(Bool_t flag) {fEvents.SetOwner(flag);}
22 protected:
23 private:
24 Int_t fSize;//size of buffer; if 0 infinite size
25 TList fEvents;//list with arrays
26 TIter fIter;//iterator
27 ClassDef(AliHBTEventBuffer,1)
28};
29
30
31#endif