1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
7 // Class AliRsnEventBuffer
9 // Implements a temporary buffer of many AliRsnEvent objects
10 // which is useful for event mixing.
12 // author: Martin Vala (Martin.Vala@cern.ch)
13 // revised by: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
16 #ifndef AliRsnEventBuffer_h
17 #define AliRsnEventBuffer_h
19 #include "AliRsnEvent.h"
21 class AliRsnEventBuffer : public TObject
25 AliRsnEventBuffer (Int_t buffsize = 1000, Bool_t deleteBufferWhenReset=kTRUE);
31 void AddEvent (AliRsnEvent *event);
32 AliRsnEvent *GetEvent (Int_t index) ;
33 AliRsnEvent *GetCurrentEvent ();
34 AliRsnEvent *GetNextEvent ();
36 void SetEventsBufferSize (const Int_t& theValue) { fEventsBufferSize = theValue; }
37 Int_t GetEventsBufferSize() const { return fEventsBufferSize; }
38 Int_t GetEventsBufferIndex() const { return fEventsBufferIndex; }
40 void SetDeleteBufferWhenReset (const Bool_t& theValue = kTRUE) { fDeleteBufferWhenReset = theValue; }
41 Bool_t GetDeleteBufferWhenReset() const { return fDeleteBufferWhenReset; }
47 AliRsnEventBuffer (const AliRsnEventBuffer& buf) :
48 TObject(buf), fDeleteBufferWhenReset(0),fEventsBufferSize(0),fEventsBufferIndex(0) {}
49 const AliRsnEventBuffer& operator=(const AliRsnEventBuffer& /*buf*/) {return (*this);}
51 Bool_t fDeleteBufferWhenReset; // flag if buffer should be deleted when reset is done
52 Int_t fEventsBufferSize; // buffer size
53 Int_t fEventsBufferIndex; // current buffer index
54 AliRsnEvent *fEventsBuffer[10000]; // array of events
56 ClassDef (AliRsnEventBuffer, 1)