Changes for #89817: Commit calorimeter AOD
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODCaloTrigger.h
1 #ifndef ALIAODCALOTRIGGER_H
2 #define ALIAODCALOTRIGGER_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  
9
10
11 Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
12 */
13
14 #include <TNamed.h>
15
16 class TArrayI;
17
18 class AliAODCaloTrigger : public TNamed 
19 {
20 public:
21                  AliAODCaloTrigger();
22                                          AliAODCaloTrigger(const char* name, const char* title);
23                  AliAODCaloTrigger(const AliAODCaloTrigger& ctrig);
24         virtual ~AliAODCaloTrigger();
25         
26         AliAODCaloTrigger& operator=(const AliAODCaloTrigger& ctrig);
27         
28         Bool_t  IsEmpty() {return (fNEntries == 0);}
29
30         virtual void Reset() {fCurrent = -1;}
31
32         void    Allocate(Int_t size);
33         void    DeAllocate(        ); 
34         
35         Bool_t  Add(Int_t col, Int_t row, Float_t amp, Float_t time, Int_t trgtimes[], Int_t ntrgtimes, Int_t trgts, Int_t trgbits);
36         
37         void    SetL1Threshold(Int_t i, Int_t thr) {fL1Threshold[i] = thr;}
38         void    SetL1V0(const Int_t* v) {for (int i = 0; i < 2; i++) fL1V0[i] = v[i];}
39         void    SetL1FrameMask(Int_t m) {fL1FrameMask = m;}
40         
41         void    GetPosition(     Int_t& col, Int_t& row           ) const;
42         
43         void    GetAmplitude(  Float_t& amp                       ) const;
44         void    GetTime(       Float_t& time                      ) const;
45         
46         void    GetTriggerBits(  Int_t& bits                      ) const;
47         void    GetNL0Times(     Int_t& ntimes                    ) const;
48         void    GetL0Times(      Int_t  times[]                   ) const;
49         Int_t   GetEntries(                                       ) const {return fNEntries;}
50
51         void    GetL1TimeSum(    Int_t& timesum                   ) const;
52         Int_t   GetL1Threshold(  Int_t  i                         ) const {return fL1Threshold[i];}
53         Int_t   GetL1V0(         Int_t  i                         ) const {return fL1V0[i];}
54         Int_t   GetL1FrameMask(                                   ) const {return fL1FrameMask;}
55         
56         virtual Bool_t Next();
57
58         virtual void Copy(TObject& obj) const;
59         
60         virtual void Print(const Option_t* opt = "") const;
61         
62 private:
63
64         Int_t    fNEntries;
65     Int_t    fCurrent;
66
67         Int_t*   fColumn;         // [fNEntries]
68         Int_t*   fRow;            // [fNEntries]
69         Float_t* fAmplitude;      // [fNEntries]
70         Float_t* fTime;           // [fNEntries]
71         Int_t*   fNL0Times;       // [fNEntries]
72         TArrayI* fL0Times;        //
73         Int_t*   fL1TimeSum;      // [fNEntries]
74         Int_t*   fTriggerBits;    // [fNEntries]
75         
76         Int_t    fL1Threshold[2]; // L1 thresholds from raw data
77         Int_t    fL1V0[2];        // L1 threshold components
78         Int_t    fL1FrameMask;    // Validation flag for L1 data
79         
80         
81         ClassDef(AliAODCaloTrigger, 1)
82 };
83 #endif
84