AliRoot Core  3dc7879 (3dc7879)
AliFMDDigit.h
Go to the documentation of this file.
1 #ifndef ALIFMDDIGIT_H
2 #define ALIFMDDIGIT_H
3 
8 //___________________________________________________________________
9 //
10 // Digits classes for the FMD
11 // AliFMDBaseDigit - base class
12 // AliFMDDigit - Normal (smeared) digit
13 // AliFMDSDigit - Summable (non-smeared) digit
14 //
15 #ifndef ALIFMDBASEDIGIT_H
16 # include <AliFMDBaseDigit.h>
17 #endif
18 #ifndef ROOT_TArrayI
19 # include <TArrayI.h>
20 #endif
21 
22 
23 //____________________________________________________________________
29 {
30 public:
32  AliFMDDigit();
45  AliFMDDigit(UShort_t detector,
46  Char_t ring='\0',
47  UShort_t sector=0,
48  UShort_t strip=0,
49  UShort_t count=0,
50  Short_t count2=-1,
51  Short_t count3=-1,
52  Short_t count4=-1,
53  UShort_t nrefs=0,
54  const Int_t* refs=0);
58  virtual ~AliFMDDigit() {}
64  Int_t Count(UShort_t i=0) const;
69  UShort_t Count1() const { return fCount1; }
74  Short_t Count2() const { return fCount2; }
79  Short_t Count3() const { return fCount3; }
84  Short_t Count4() const { return fCount4; }
89  UShort_t Counts() const;
95  void Print(Option_t* opt="") const;
100  const char* GetTitle() const;
107  void SetCount(UShort_t s, Short_t c);
123  void SetDefaultCounts(UShort_t rate);
124 protected:
125  UShort_t fCount1; // Digital signal
126  Short_t fCount2; // Digital signal (-1 if not used)
127  Short_t fCount3; // Digital signal (-1 if not used)
128  Short_t fCount4; // Digital signal (-1 if not used)
129  ClassDef(AliFMDDigit,2) // Normal FMD digit
130 };
131 
132 inline void
134 {
135  switch (rate) {
136  case 4: fCount4 = 0; // Fall through
137  case 3: fCount3 = 0; // Fall through
138  case 2: fCount2 = 0; // Fall through
139  case 1: fCount1 = 0;
140  break;
141  default:
142  fCount4 = fCount3 = fCount2 = fCount1 = 0;
143  break;
144  }
145 }
146 inline UShort_t
148 {
149  if (fCount4 >= 0) return fCount3;
150  if (fCount3 >= 0) return fCount2;
151  if (fCount2 >= 0) return fCount2;
152  return fCount1;
153 }
154 
155 inline Int_t
156 AliFMDDigit::Count(UShort_t i) const
157 {
158  switch (i) {
159  case 0: return fCount1;
160  case 1: return fCount2;
161  case 2: return fCount3;
162  case 3: return fCount4;
163  }
164  return -1;
165 }
166 inline void
167 AliFMDDigit::SetCount(UShort_t i, Short_t c)
168 {
169  switch (i) {
170  case 0: fCount1 = c; break;
171  case 1: fCount2 = c; break;
172  case 2: fCount3 = c; break;
173  case 3: fCount4 = c; break;
174  }
175 }
176 
177 #endif
178 //____________________________________________________________________
179 //
180 // Local Variables:
181 // mode: C++
182 // End:
183 //
184 //
185 // EOF
186 //
class for digits
Definition: AliFMDDigit.h:28
Short_t fCount4
Definition: AliFMDDigit.h:128
void Print(Option_t *opt="") const
Short_t fCount3
Definition: AliFMDDigit.h:127
Short_t Count2() const
Definition: AliFMDDigit.h:74
Short_t Count4() const
Definition: AliFMDDigit.h:84
base class for digits
UShort_t fCount1
Definition: AliFMDDigit.h:125
UShort_t Count1() const
Definition: AliFMDDigit.h:69
void SetDefaultCounts(UShort_t rate)
Definition: AliFMDDigit.h:133
Digits for the FMD.
virtual ~AliFMDDigit()
Definition: AliFMDDigit.h:58
const char * GetTitle() const
Short_t fCount2
Definition: AliFMDDigit.h:126
UShort_t Counts() const
Definition: AliFMDDigit.h:147
Int_t Count(UShort_t i=0) const
Definition: AliFMDDigit.h:156
void SetCount(UShort_t s, Short_t c)
Definition: AliFMDDigit.h:167
Short_t Count3() const
Definition: AliFMDDigit.h:79