]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFHitDataBuffer.h
Memory leak corrected (Ch. Klein-Boesing)
[u/mrichter/AliRoot.git] / TOF / AliTOFHitDataBuffer.h
1 #ifndef ALITOFHITDATABUFFER_H
2 #define ALITOFHITDATABUFFER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////
9 //                                                           //
10 //   This class provides the key-reading for TOF raw data.   //
11 //                                                           //
12 ///////////////////////////////////////////////////////////////
13
14 #include "TObject.h"
15 #include "AliTOFHitData.h"
16
17 //data buffer size
18 #define DATA_BUFFER_SIZE 1000
19
20 class AliTOFHitDataBuffer : public TObject{
21   
22  public:
23
24   AliTOFHitDataBuffer(Int_t BufferSize = DATA_BUFFER_SIZE);
25   ~AliTOFHitDataBuffer();  
26   AliTOFHitDataBuffer(const AliTOFHitDataBuffer &source);
27   AliTOFHitDataBuffer& operator=(const AliTOFHitDataBuffer & source); 
28   void           Reset() {fEntries = 0;};
29   Bool_t         Add(AliTOFHitData &HitData);
30   
31   AliTOFHitData *GetBuffer() {return fBuffer;};
32   AliTOFHitData *GetHit(Int_t Hit) const {return (Hit < fBufferSize ? &fBuffer[Hit] : 0x0);};
33   Int_t          GetEntries() const {return fEntries;};
34   
35  private:
36   Int_t          fBufferSize; // buffer size
37   AliTOFHitData *fBuffer;     // buffer
38   Int_t          fEntries;    // entries
39
40   ClassDef(AliTOFHitDataBuffer, 1);
41 };
42
43 #endif
44