Cluster Map moved to ANALYSIS
[u/mrichter/AliRoot.git] / HBTAN / AliHBTEventBuffer.h
CommitLineData
bed069a4 1#ifndef ALIHBTEVENTBUFFER_H
2#define ALIHBTEVENTBUFFER_H
0a97a08e 3//______________________________________________________
4////////////////////////////////////////////////////////
5//
6// class AliHBTEventBuffer
7//
8// FIFO type event buffer
9//
10// Piotr.Skowronski@cern.ch
11//
12////////////////////////////////////////////////////////
bed069a4 13
14#include <TObject.h>
15#include <TList.h>
16#include "AliHBTEvent.h"
17
18class AliHBTEventBuffer: public TObject
19{
20 public:
21 AliHBTEventBuffer();
22 AliHBTEventBuffer(Int_t size);
0a97a08e 23 virtual ~AliHBTEventBuffer();
bed069a4 24
25 AliHBTEvent* Push(AliHBTEvent* event);//adds a new event, and returns old of do not fit in size
26 AliHBTEvent* RemoveLast(){return dynamic_cast<AliHBTEvent*>(fEvents.Remove(fEvents.Last()));}
27 void ResetIter(){fIter.Reset();}
28 AliHBTEvent* Next(){return dynamic_cast<AliHBTEvent*>( 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);}
32 protected:
33 private:
34 Int_t fSize;//size of buffer; if 0 infinite size
35 TList fEvents;//list with arrays
36 TIter fIter;//iterator
37 ClassDef(AliHBTEventBuffer,1)
38};
39
40
41#endif