Line data Source code
1 : #ifndef ALIESDCALOTRIGGER_H
2 : #define ALIESDCALOTRIGGER_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 "AliVCaloTrigger.h"
15 :
16 : class TArrayI;
17 :
18 : class AliESDCaloTrigger : public AliVCaloTrigger
19 : {
20 : public:
21 : AliESDCaloTrigger();
22 : AliESDCaloTrigger(const AliESDCaloTrigger& ctrig);
23 : virtual ~AliESDCaloTrigger();
24 :
25 : AliESDCaloTrigger& operator=(const AliESDCaloTrigger& ctrig);
26 :
27 0 : Bool_t IsEmpty() {return (fNEntries == 0);}
28 :
29 32 : virtual void Reset() {fCurrent = -1;}
30 :
31 : void Allocate(Int_t size);
32 : void DeAllocate( );
33 :
34 : 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);
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 subra, Int_t trgbits);
36 :
37 32 : void SetL1Threshold(Int_t i, Int_t thr) {fL1Threshold[i] = thr;}
38 256 : void SetL1Threshold(Int_t i, Int_t j, Int_t thr) {if (i) fL1DCALThreshold[j] = thr; else fL1Threshold[j] = thr;}
39 :
40 32 : void SetL1V0(const Int_t* v) {for (int i = 0; i < 2; i++) fL1V0[i] = v[i];}
41 : void SetL1V0(Int_t i, const Int_t* v) {
42 136 : if (i) {for (int j = 0; j < 2; j++) fL1DCALV0[j] = v[j];} else {for (int j = 0; j < 2; j++) fL1V0[j] = v[j];}
43 16 : }
44 :
45 8 : void SetL1FrameMask(Int_t m) {fL1FrameMask = m;}
46 64 : void SetL1FrameMask(Int_t i, Int_t m) {if (i) fL1DCALFrameMask = m; else fL1FrameMask = m;}
47 :
48 16 : void SetTriggerBitWord(Int_t w) {fTriggerBitWord = w;}
49 24 : void SetMedian(Int_t i, Int_t m) {fMedian[i] = m;}
50 :
51 : void GetPosition( Int_t& col, Int_t& row ) const;
52 : void GetAmplitude( Float_t& amp ) const;
53 : void GetTime( Float_t& time ) const;
54 :
55 : void GetTriggerBits( Int_t& bits ) const;
56 : void GetNL0Times( Int_t& ntimes ) const;
57 : void GetL0Times( Int_t times[] ) const;
58 32 : Int_t GetEntries( ) const {return fNEntries;}
59 :
60 : void GetL1TimeSum( Int_t& timesum ) const;
61 : Int_t GetL1TimeSum( ) const;
62 :
63 : void GetL1SubRegion( Int_t& subreg ) const;
64 : Int_t GetL1SubRegion( ) const;
65 :
66 64 : Int_t GetL1Threshold( Int_t i ) const {return fL1Threshold[i];}
67 0 : Int_t GetL1Threshold( Int_t i, Int_t j ) const {return ((i)?fL1DCALThreshold[j]:fL1Threshold[j]);}
68 :
69 32 : Int_t GetL1V0( Int_t i ) const {return fL1V0[i];}
70 0 : Int_t GetL1V0( Int_t i, Int_t j ) const {return ((i)?fL1DCALV0[j]:fL1V0[j]);}
71 :
72 16 : Int_t GetL1FrameMask( ) const {return fL1FrameMask;}
73 0 : Int_t GetL1FrameMask( Int_t i ) const {return ((i)?fL1DCALFrameMask:fL1FrameMask);}
74 :
75 0 : Int_t GetMedian( Int_t i ) const {return fMedian[i];}
76 :
77 0 : Int_t GetTriggerBitWord( ) const {return fTriggerBitWord;}
78 0 : void GetTriggerBitWord( Int_t& bw ) const {bw = fTriggerBitWord;}
79 :
80 : virtual Bool_t Next();
81 :
82 : virtual void Copy(TObject& obj) const;
83 :
84 : virtual void Print(const Option_t* opt) const;
85 :
86 : private:
87 :
88 : Int_t fNEntries;
89 : Int_t fCurrent;
90 :
91 : Int_t* fColumn; // [fNEntries]
92 : Int_t* fRow; // [fNEntries]
93 : Float_t* fAmplitude; // [fNEntries]
94 : Float_t* fTime; // [fNEntries]
95 : Int_t* fNL0Times; // [fNEntries]
96 : TArrayI* fL0Times; //
97 : Int_t* fL1TimeSum; // [fNEntries]
98 : Int_t* fTriggerBits; // [fNEntries]
99 :
100 : Int_t fL1Threshold[4]; // L1 thresholds from raw data
101 : Int_t fL1V0[2]; // L1 threshold components
102 : Int_t fL1FrameMask; // Validation flag for L1 data
103 :
104 : Int_t fL1DCALThreshold[4]; // L1 thresholds from raw data
105 : Int_t* fL1SubRegion; // [fNEntries]
106 : Int_t fL1DCALFrameMask; // Validation flag for L1 data
107 : Int_t fMedian[2]; // Background median
108 : Int_t fTriggerBitWord; // Trigger bit word
109 : Int_t fL1DCALV0[2]; // L1 threshold components
110 :
111 376 : ClassDef(AliESDCaloTrigger, 8)
112 : };
113 : #endif
114 :
|