AliRoot Core  3dc7879 (3dc7879)
AliAODCaloTrigger.h
Go to the documentation of this file.
1 #ifndef ALIAODCALOTRIGGER_H
2 #define ALIAODCALOTRIGGER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include "AliVCaloTrigger.h"
7 
8 class TArrayI;
9 
17 {
18 public:
20  AliAODCaloTrigger(const char* name, const char* title);
22  virtual ~AliAODCaloTrigger();
23 
25 
26  Bool_t IsEmpty() {return (fNEntries == 0);}
27 
28  virtual void Reset() {fCurrent = -1;}
29 
30  void Allocate(Int_t size);
31  void DeAllocate( );
32 
33  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);
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 subra, Int_t trgbits);
35 
36  void SetL1Threshold(Int_t i, Int_t thr) {fL1Threshold[i] = thr;}
37  void SetL1Threshold(Int_t i, Int_t j, Int_t thr) {if (i) fL1DCALThreshold[j] = thr; else fL1Threshold[j] = thr;}
38 
39  void SetL1V0(const Int_t* v) {for (int i = 0; i < 2; i++) fL1V0[i] = v[i];}
40  void SetL1V0(Int_t i, const Int_t* v) {
41  for (int j = 0; j < 2; j++) {
42  if (i)
43  { fL1DCALV0[j] = v[j]; }
44  else
45  { fL1V0[j] = v[j]; }
46  }
47  }
48 
49  void SetL1FrameMask(Int_t m) {fL1FrameMask = m;}
50  void SetL1FrameMask(Int_t i, Int_t m) {if (i) fL1DCALFrameMask = m; else fL1FrameMask = m;}
51 
52  void SetTriggerBitWord(Int_t w) {fTriggerBitWord = w;}
53  void SetMedian(Int_t i, Int_t m) {fMedian[i] = m;}
54 
60  void GetPosition( Int_t& col, Int_t& row ) const;
61 
66  void GetAmplitude( Float_t& amp ) const;
67  void GetTime( Float_t& time ) const;
68 
79  void GetTriggerBits( Int_t& bits ) const;
80 
89  void GetNL0Times( Int_t& ntimes ) const;
90 
95  void GetL0Times( Int_t times[] ) const;
96 
101  Int_t GetEntries( ) const {return fNEntries;}
102 
107  void GetL1TimeSum( Int_t& timesum ) const;
108 
113  Int_t GetL1TimeSum( ) const;
114 
115  void GetL1SubRegion( Int_t& subreg ) const;
116  Int_t GetL1SubRegion( ) const;
117 
118  Int_t GetL1Threshold( Int_t i ) const {return fL1Threshold[i];}
119  Int_t GetL1Threshold( Int_t i, Int_t j ) const {return ((i)?fL1DCALThreshold[j]:fL1Threshold[j]);}
120 
121  Int_t GetL1V0( Int_t i ) const {return fL1V0[i];}
122  Int_t GetL1V0( Int_t i, Int_t j ) const {return ((i)?fL1DCALV0[j]:fL1V0[j]);}
123 
124  Int_t GetL1FrameMask( ) const {return fL1FrameMask;}
125  Int_t GetL1FrameMask( Int_t i ) const {return ((i)?fL1DCALFrameMask:fL1FrameMask);}
126 
127  Int_t GetMedian( Int_t i ) const {return fMedian[i];}
128 
129  Int_t GetTriggerBitWord( ) const {return fTriggerBitWord;}
130  void GetTriggerBitWord( Int_t& bw ) const {bw = fTriggerBitWord;}
131 
136  virtual Bool_t Next();
137 
138  virtual void Copy(TObject& obj) const;
139 
140  virtual void Print(const Option_t* opt = "") const;
141 
142 private:
143 
144  Int_t fNEntries;
145  Int_t fCurrent;
146 
148  Int_t* fColumn; // [fNEntries]
149 
151  Int_t* fRow; // [fNEntries]
152 
154  Float_t* fAmplitude; // [fNEntries]
155 
157  Float_t* fTime; // [fNEntries]
158 
160  Int_t* fNL0Times; // [fNEntries]
161 
163  TArrayI* fL0Times; //
164 
166  Int_t* fL1TimeSum; // [fNEntries]
167 
173  Int_t* fTriggerBits; // [fNEntries]
174 
175  Int_t fL1Threshold[4];
176  Int_t fL1V0[2];
177  Int_t fL1FrameMask;
178 
179  Int_t fL1DCALThreshold[4];
180  Int_t* fL1SubRegion; // [fNEntries]
182  Int_t fMedian[2];
184  Int_t fL1DCALV0[2];
185 
187  ClassDef(AliAODCaloTrigger, 5)
189 };
190 #endif
191 
void GetTriggerBits(Int_t &bits) const
Get the trigger bits for a given fastor position.
Int_t fNEntries
Number of entries in the trigger object (usually mapped to fastor channels)
void GetTime(Float_t &time) const
AliAODCaloTrigger & operator=(const AliAODCaloTrigger &ctrig)
void SetL1FrameMask(Int_t m)
void GetTriggerBitWord(Int_t &bw) const
Int_t fCurrent
Index of the current entry.
void GetNL0Times(Int_t &ntimes) const
Get the number of L0 times for the current patch.
void GetPosition(Int_t &col, Int_t &row) const
Access to position of the current fastor channel.
Int_t fL1DCALV0[2]
L1 threshold components.
void SetL1Threshold(Int_t i, Int_t j, Int_t thr)
Int_t fL1DCALThreshold[4]
L1 thresholds from raw data.
virtual Bool_t Next()
Forward to next trigger entry (fastor / L0 patch)
void SetL1V0(Int_t i, const Int_t *v)
Container with calorimeter trigger information in the AOD event.
void SetMedian(Int_t i, Int_t m)
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)
Int_t GetL1TimeSum() const
Get the L1 time sums (L1 ADC values) for the current fastor.
Int_t fL1DCALFrameMask
Validation flag for L1 data.
virtual void Reset()
virtual void Print(const Option_t *opt="") const
Int_t fL1FrameMask
Validation flag for L1 data.
Virtual class to access calorimeter (EMCAL, PHOS, PMD, FMD) trigger data.
Int_t fL1Threshold[4]
L1 thresholds from raw data.
void SetL1V0(const Int_t *v)
Int_t GetL1Threshold(Int_t i) const
void SetL1Threshold(Int_t i, Int_t thr)
void GetL0Times(Int_t times[]) const
Get level0 times for the current L0 patch.
Int_t GetL1Threshold(Int_t i, Int_t j) const
Int_t GetL1SubRegion() const
Int_t GetL1FrameMask(Int_t i) const
void GetAmplitude(Float_t &amp) const
Access to L0-amplitude of the current fastor channel.
Int_t GetEntries() const
Get the number of entries in the trigger data.
void SetTriggerBitWord(Int_t w)
Int_t GetL1V0(Int_t i, Int_t j) const
const int ntimes
Definition: kNNSpeed.C:14
void SetL1FrameMask(Int_t i, Int_t m)
Int_t GetTriggerBitWord() const
Int_t fL1V0[2]
L1 threshold components.
Int_t GetL1FrameMask() const
Int_t GetL1V0(Int_t i) const
Int_t fMedian[2]
Background median.
virtual void Copy(TObject &obj) const
Int_t GetMedian(Int_t i) const
void Allocate(Int_t size)
Int_t fTriggerBitWord
Trigger bit word.