]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFTDCErrorBuffer.h
Fixes for #86059: Install data when ALICE_ROOT does not point to source (Christian)
[u/mrichter/AliRoot.git] / TOF / AliTOFTDCErrorBuffer.h
1 #ifndef ALITOFTDCERRORBUFFER_H
2 #define ALITOFTDCERRORBUFFER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /*
8   author: Roberto Preghenella (R+), preghenella@bo.infn.it
9 */
10
11 ///////////////////////////////////////////////////////////////
12 //                                                           //
13 //   This class provides a buffer for TDC errors.            //
14 //                                                           //
15 ///////////////////////////////////////////////////////////////
16
17 #include "TObject.h"
18 #include "AliTOFTDCError.h"
19 #include "TClonesArray.h"
20
21 class AliTOFTDCErrorBuffer : 
22 public TObject
23 {
24  public:
25   AliTOFTDCErrorBuffer(); //default constructor
26   AliTOFTDCErrorBuffer(const AliTOFTDCErrorBuffer &source) : TObject(source), fBuffer(source.fBuffer) {}; //copy contructor
27   AliTOFTDCErrorBuffer &operator = (const AliTOFTDCErrorBuffer &source) {
28     if (&source != this) {
29       TObject::operator=(source);
30       fBuffer = source.fBuffer;
31     }
32     return *this;
33   }; //operator =
34   virtual ~AliTOFTDCErrorBuffer(); //destructor
35
36   void Reset() {fBuffer.Clear();}; // reset
37   void Add(const AliTOFTDCError &err); //add hit
38   TClonesArray *GetBuffer() {return &fBuffer;}; //get buffer
39   Int_t GetEntries() const {return fBuffer.GetEntries();}; //get entries
40   AliTOFTDCError *GetError(Int_t ierr) const {return (ierr < GetEntries() ? (AliTOFTDCError *)fBuffer.At(ierr) : 0x0);}; //get error
41
42  private:
43
44   TClonesArray fBuffer; // buffer
45
46   ClassDef(AliTOFTDCErrorBuffer, 1);
47 };
48
49 #endif /* ALITOFTDCERRORBUFFER_H */