ATLAS Offline Software
TileLaserObject.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*author Renato Febbraro*/
6 /*date 3/7/2007*/
7 /*modified 27/5/2008 changes in PLC methods ==> adding the methods for the new class TilaLaser PLC*/
8 /*renato.febbraro@cern.ch*/
9 
10 /*modified 23/08/2014 to accommodate LASERII system*/
11 /*Marco van Woerden <mvanwoer@cern.ch>*/
12 
13 #ifndef TILELASEROBJECT_H
14 #define TILELASEROBJECT_H
15 
16 #include <cmath>
17 #include <string>
18 #include <vector>
19 #include <time.h>
20 
22 #include "TileEvent/TileLaser.h"
24 #include "TileEvent/TileLaserPmt.h"
25 #include "TileEvent/TileLaserPLC.h"
26 #include "TileEvent/TileLasCalib.h"
27 
28 #include "AthenaKernel/CLASS_DEF.h"
29 
30 
31 /*static const CLID CLID_TileLaser = 2940;*/
32 
34 
35 public:
36 
38 
39  /* static const CLID& classID() {return CLID_TileLaser;} */
40  /* virtual const CLID& classID() {return CLID_TileLaser;} */
41 
43  enum MAX_SIZE {
44  nbGains=2, // LG/HG
45  nbPmts=2, // LASERI/LASERII MONITORING PMTS
46  nbDiodes=14, // LASERII MONITORING DIODES
47  nbTypes=4, // LASERII CALIBRATION TYPES
48  firstType=0 // LASERII VALUE OF FIRST CALIBRATION TYPE
49  };
50 
51  int getVersion() const;
52  bool isLASERII() const;
53 
54  int getCounter() const;
55  double getDiodeCurrOrd() const;
56  double getDiodeCurrMeas() const;
57  int getFiltNumber() const;
58 
59  double getPumpDiodeTemp() const;
60  int getTimeLastMeasP() const;
61  double getDiodeBoxTemp() const;
62  int getTimeLastMeasD() const;
63  double getGasFlux() const;
64  int getTimeLastMeasF() const;
65  double getHumidity() const;
66  int getTimeLastMeasH() const;
67  time_t getLastPedMeas() const;
68  time_t getLastAlphaMeas() const;
69 
70  double getMean(int chan, int gain, int type) const;
71  double getSigma(int chan, int gain, int type) const;
72  int getN(int chan, int gain, int type) const;
73  int getType(int chan, int gain, int type) const;
74  bool isSet(int chan, int gain, int type) const;
75  void setCalibType(int type);
76  int getCalibType() const;
77  void setCalib(int chan, int type, double sumXinQDC, double sumX2inQDC, int nevts, int gain);
78  int getDaqType() const;
79 
80  int getDiodeADC( const unsigned int i, const unsigned int gain=0 ) const;
81  double getDiodePedestal(const unsigned int i, const unsigned int gain=0 ) const;
82  double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0 ) const;
83  double getAlpha(const unsigned int i, const unsigned int gain=0 ) const;
84  double getSigmaAlpha(const unsigned int i, const unsigned int gain=0 ) const;
85  double getPedestalAlpha(const unsigned int i, const unsigned int gain=0 ) const;
86  double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0 ) const;
87 
88  int getPMADC(const unsigned int j, const unsigned int gain=0 ) const;
89  int getTDC(const unsigned int j, const unsigned int gain=0 ) const;
90  double getPMPedestal(const unsigned int j, const unsigned int gain=0 ) const;
91  double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0 ) const;
92 
93  int getBCID() const;
94  void setBCID(const int BCID);
95 
96  int getAlphaPos() const;
97  double getLVdiodes() const;
98  double getHVpmts() const;
99  int getShutter() const;
100  int getInterlock() const;
101  int getAlarm() const;
102  bool getQDCTimeout() const;
103  bool getTDCTimeout() const;
104 
105  void setLaser(const int Counter,
106  const int diodeCurrOrd,
107  const int diodeCurrMeas,
108  const int filtNumber,
109  const int timingDelay,
110  const int version);
111 
112  void setControl(const double pumpDiodeTemp,
113  const int timeLastMeasP,
114  const double diodeBoxTemp,
115  const int timeLastMeasD,
116  const double gasFlux,
117  const int timeLastMeasG,
118  const double humidity,
119  const int timeLastMeasH,
120  const time_t lastPedMeas,
121  const time_t lastAlphaMeas);
122 
123  void setDiode(const unsigned int diode,
124  const int diodeAdc,
125  const double diodePedestal,
126  const double diodeSigmaPedestal,
127  const double alpha,
128  const double sigmaAlpha,
129  const double pedestalAlpha,
130  const double sigmaPedAlpha,
131  const unsigned int gain);
132 
133  void setPmt(const unsigned int pmt,
134  const int pmAdc,
135  const int tdc,
136  const double pmPedestal,
137  const double pmSigmaPedestal,
138  const unsigned int gain);
139 
140  void setPLC(const int alphaPos,
141  const double LVdiodes,
142  const double HVpmts,
143  const int shutter,
144  const int interlock,
145  const int alarm);
146 
147  void setVersion(const int version);
148 
149  void setDaqType(const unsigned int daqtype);
150 
151  void setTimeouts(const bool qdc, const bool tdc);
152 
154 
155 
158  operator std::string() const;
159 
160 
161 private:
162 
165  std::vector<TileLaserDiode> m_diodesLG;
166  std::vector<TileLaserDiode> m_diodesHG;
167  std::vector<TileLaserPmt> m_pmtsLG;
168  std::vector<TileLaserPmt> m_pmtsHG;
169  std::vector<std::vector<TileLasCalib> > m_lascalib;
173 
175  // DAQ TYPES ARE RELEVANT FOR LASERII
176  // DAQ TYPE HEX DEC
177  // Pedestal 0x10 16
178  // Alpha 0x11 17
179  // Led 0x12 18
180  // Linearity 0x13 19
181  // Laser 0x14 20
182  int m_BCID;
184 
186  // Calibe types are relevant for laserII
187  // Pedestal 0
188  // Pedestal 1
189  // Led 2
190  // Alpha
191 
192  public:
194 
195 };
196 
197 CLASS_DEF(TileLaserObject, 2940, 0)
198 
199 inline int TileLaserObject::getCounter() const
200 {
201  return m_laserParameter.getCounter();
202 }
203 
204 inline void TileLaserObject::setVersion(const int version)
205 {
206  m_version = version;
207 }
208 
209 inline int TileLaserObject::getVersion() const
210 {
211  return m_version;
212 }
213 
214 inline bool TileLaserObject::isLASERII() const
215 {
216  return (std::abs(m_version)==2);
217 }
218 
219 inline double TileLaserObject::getDiodeCurrOrd() const
220 {
222 }
223 
225 {
227 }
228 
230 {
232 }
233 
235 {
236  return m_slowCtrl.getPumpDiodeTemp();
237 }
238 
240 {
241  return m_slowCtrl.getTimeLastMeasP();
242 }
243 
244 inline double TileLaserObject::getDiodeBoxTemp() const
245 {
246  return m_slowCtrl.getDiodeBoxTemp();
247 }
248 
250 {
251  return m_slowCtrl.getTimeLastMeasD();
252 }
253 
254 inline double TileLaserObject::getGasFlux() const
255 {
256  return m_slowCtrl.getGasFlux();
257 }
258 
260 {
261  return m_slowCtrl.getTimeLastMeasF();
262 }
263 
264 inline double TileLaserObject::getHumidity() const
265 {
266  return m_slowCtrl.getHumidity();
267 }
268 
270 {
271  return m_slowCtrl.getTimeLastMeasH();
272 }
273 
274 inline time_t TileLaserObject::getLastPedMeas() const
275 {
276  return m_slowCtrl.getLastPedMeas();
277 }
278 
280 {
281  return m_slowCtrl.getLastAlphaMeas();
282 }
283 
285 {
286  return m_plc.getAlphaPos();
287 }
288 
289 inline double TileLaserObject::getLVdiodes() const
290 {
291  return m_plc.getLVdiodes();
292 }
293 
294 inline double TileLaserObject::getHVpmts() const
295 {
296  return m_plc.getHVpmts();
297 }
298 
299 inline int TileLaserObject::getShutter() const
300 {
301  return m_plc.getShutter();
302 }
303 
305 {
306  return m_plc.getInterlock();
307 }
308 
309 inline int TileLaserObject::getAlarm() const
310 {
311  return m_plc.getAlarm();
312 }
313 
315 {
316  return m_qdctimeout;
317 }
318 
320 {
321  return m_tdctimeout;
322 }
323 
324 
325 inline int TileLaserObject::getDaqType() const
326 {
327  return m_daqtype;
328 }
329 
330 inline void TileLaserObject::setBCID(const int BCID)
331 {
332  m_BCID=BCID;
333 }
334 
335 inline int TileLaserObject::getBCID() const {return m_BCID;}
336 
337 #endif
TileLaserObject::getDiodeBoxTemp
double getDiodeBoxTemp() const
Definition: TileLaserObject.h:244
TileLaserControl::getLastAlphaMeas
time_t getLastAlphaMeas() const
Definition: TileLaserControl.h:44
TileLaserObject::setDaqType
void setDaqType(const unsigned int daqtype)
Definition: TileLaserObject.cxx:344
TileLaser.h
TileLaserPLC::getAlphaPos
int getAlphaPos() const
Definition: TileLaserPLC.h:29
TileLaserObject::getTDC
int getTDC(const unsigned int j, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:209
TileLaserObject::calibType
calibType
Definition: TileLaserObject.h:193
TileLaserObject::m_version
int m_version
Definition: TileLaserObject.h:183
TileLaserObject::setVersion
void setVersion(const int version)
Definition: TileLaserObject.h:204
TileLaserPLC::getHVpmts
double getHVpmts() const
Definition: TileLaserPLC.h:31
TileLasCalib.h
TileLaser::getDiodeCurrOrd
int getDiodeCurrOrd() const
Definition: TileLaser.h:30
TileLaserObject::getN
int getN(int chan, int gain, int type) const
Definition: TileLaserObject.cxx:64
TileLaserObject::getTimeLastMeasH
int getTimeLastMeasH() const
Definition: TileLaserObject.h:269
TileLaserPLC
Definition: TileLaserPLC.h:16
TileLaserObject::LED
@ LED
Definition: TileLaserObject.h:193
TileLaserObject::getAlphaPos
int getAlphaPos() const
Definition: TileLaserObject.h:284
TileLaserObject::setBCID
void setBCID(const int BCID)
Definition: TileLaserObject.h:330
TileLaserControl::getTimeLastMeasD
int getTimeLastMeasD() const
Definition: TileLaserControl.h:38
TileLaserObject::getType
int getType(int chan, int gain, int type) const
Definition: TileLaserObject.cxx:57
TileLaserObject::nbGains
@ nbGains
Definition: TileLaserObject.h:44
TileLaserObject::isLASERII
bool isLASERII() const
Definition: TileLaserObject.h:214
TileLaserObject::getPumpDiodeTemp
double getPumpDiodeTemp() const
Definition: TileLaserObject.h:234
TileLaserDiode.h
ReadBchFromCool.pmt
pmt
Definition: ReadBchFromCool.py:62
TileLaserObject::getLastAlphaMeas
time_t getLastAlphaMeas() const
Definition: TileLaserObject.h:279
TileLaserObject::daqLinearity
@ daqLinearity
Definition: TileLaserObject.h:153
TileLaserObject::m_daqtype
int m_daqtype
Definition: TileLaserObject.h:174
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
TileLaserPLC::getInterlock
int getInterlock() const
Definition: TileLaserPLC.h:33
TileLaserObject::getAlpha
double getAlpha(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:138
TileLaserObject::getLastPedMeas
time_t getLastPedMeas() const
Definition: TileLaserObject.h:274
TileLaserObject::setTimeouts
void setTimeouts(const bool qdc, const bool tdc)
Definition: TileLaserObject.cxx:292
TileLaserObject::getDiodeCurrOrd
double getDiodeCurrOrd() const
Definition: TileLaserObject.h:219
TileLaserObject::getAlarm
int getAlarm() const
Definition: TileLaserObject.h:309
TileLaserObject::m_diodesLG
std::vector< TileLaserDiode > m_diodesLG
Definition: TileLaserObject.h:165
TileLaserControl::getDiodeBoxTemp
double getDiodeBoxTemp() const
Definition: TileLaserControl.h:37
TileLaserObject::m_slowCtrl
TileLaserControl m_slowCtrl
Definition: TileLaserObject.h:163
TileLaserControl
Definition: TileLaserControl.h:18
TileLaserObject::getVersion
int getVersion() const
Definition: TileLaserObject.h:209
TileLaserControl::getLastPedMeas
time_t getLastPedMeas() const
Definition: TileLaserControl.h:43
TileLaserControl::getPumpDiodeTemp
double getPumpDiodeTemp() const
Definition: TileLaserControl.h:35
TileLaserControl::getGasFlux
double getGasFlux() const
Definition: TileLaserControl.h:39
TileLaserControl.h
TileLaserPLC::getAlarm
int getAlarm() const
Definition: TileLaserPLC.h:34
TileLaserObject::isSet
bool isSet(int chan, int gain, int type) const
Definition: TileLaserObject.cxx:71
TileLaserObject::MAX_SIZE
MAX_SIZE
max size of diode and pmt vectors
Definition: TileLaserObject.h:43
TileLaserObject::m_tdctimeout
bool m_tdctimeout
Definition: TileLaserObject.h:172
TileLaserObject::setLaser
void setLaser(const int Counter, const int diodeCurrOrd, const int diodeCurrMeas, const int filtNumber, const int timingDelay, const int version)
Definition: TileLaserObject.cxx:253
TileLaserObject::getPMADC
int getPMADC(const unsigned int j, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:195
TileLaserObject::getFiltNumber
int getFiltNumber() const
Definition: TileLaserObject.h:229
TileLaserObject::getSigmaPedAlpha
double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:180
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
TileLaserPLC::getLVdiodes
double getLVdiodes() const
Definition: TileLaserPLC.h:30
TileLaserPLC::getShutter
int getShutter() const
Definition: TileLaserPLC.h:32
TileLaserObject::getHumidity
double getHumidity() const
Definition: TileLaserObject.h:264
TileLaserObject::getMean
double getMean(int chan, int gain, int type) const
Definition: TileLaserObject.cxx:41
TileLaserObject::getTDCTimeout
bool getTDCTimeout() const
Definition: TileLaserObject.h:319
TileLaserObject::daqLaser
@ daqLaser
Definition: TileLaserObject.h:153
TileLaserObject::getShutter
int getShutter() const
Definition: TileLaserObject.h:299
TileLaserControl::getHumidity
double getHumidity() const
Definition: TileLaserControl.h:41
TileLaserControl::getTimeLastMeasP
int getTimeLastMeasP() const
Definition: TileLaserControl.h:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileLaserObject::TileLaserObject
TileLaserObject()
Definition: TileLaserObject.cxx:17
TileLaserObject::getHVpmts
double getHVpmts() const
Definition: TileLaserObject.h:294
TileLaserControl::getTimeLastMeasF
int getTimeLastMeasF() const
Definition: TileLaserControl.h:40
TileLaserObject::m_diodesHG
std::vector< TileLaserDiode > m_diodesHG
Definition: TileLaserObject.h:166
TileLaserPLC.h
TileLaserObject::getTimeLastMeasF
int getTimeLastMeasF() const
Definition: TileLaserObject.h:259
TileLaserObject::m_BCID
int m_BCID
Definition: TileLaserObject.h:182
TileLaserObject::setCalibType
void setCalibType(int type)
Definition: TileLaserObject.cxx:78
TileLaserObject::getCalibType
int getCalibType() const
Definition: TileLaserObject.cxx:82
TileLaser::getFiltNumber
int getFiltNumber() const
Definition: TileLaser.h:32
TileLaserObject::setPmt
void setPmt(const unsigned int pmt, const int pmAdc, const int tdc, const double pmPedestal, const double pmSigmaPedestal, const unsigned int gain)
Definition: TileLaserObject.cxx:324
sg-dump.nevts
nevts
Definition: sg-dump.py:146
TileLaserObject::setPLC
void setPLC(const int alphaPos, const double LVdiodes, const double HVpmts, const int shutter, const int interlock, const int alarm)
Definition: TileLaserObject.cxx:280
TileLaserObject::m_lascalib
std::vector< std::vector< TileLasCalib > > m_lascalib
Definition: TileLaserObject.h:169
TileLaserObject::m_qdctimeout
bool m_qdctimeout
Definition: TileLaserObject.h:171
TileLaserObject::getQDCTimeout
bool getQDCTimeout() const
Definition: TileLaserObject.h:314
TileLaserObject::getDiodeSigmaPedestal
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:123
TileLaserObject::getBCID
int getBCID() const
Definition: TileLaserObject.h:335
TileLaserObject::getDiodeADC
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:95
TileLaserObject::getCounter
int getCounter() const
Definition: TileLaserObject.h:199
TileLaserObject::daqType
daqType
Definition: TileLaserObject.h:153
TileLaserObject::getPMPedestal
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:223
TileLaserObject::m_laserParameter
TileLaser m_laserParameter
Definition: TileLaserObject.h:164
TileLaserObject::getDiodeCurrMeas
double getDiodeCurrMeas() const
Definition: TileLaserObject.h:224
TileLaserObject::getTimeLastMeasP
int getTimeLastMeasP() const
Definition: TileLaserObject.h:239
get_generator_info.version
version
Definition: get_generator_info.py:33
TileLaserObject::daqAlpha
@ daqAlpha
Definition: TileLaserObject.h:153
TileLaserObject::m_calibtype
int m_calibtype
Definition: TileLaserObject.h:185
TileLaserPmt.h
TileLaserObject::nbPmts
@ nbPmts
Definition: TileLaserObject.h:45
TileLaserObject::getLVdiodes
double getLVdiodes() const
Definition: TileLaserObject.h:289
TileLaserControl::getTimeLastMeasH
int getTimeLastMeasH() const
Definition: TileLaserControl.h:42
TileLaserObject::nbDiodes
@ nbDiodes
Definition: TileLaserObject.h:46
TileLaser::getDiodeCurrMeas
int getDiodeCurrMeas() const
Definition: TileLaser.h:31
TileLaserObject::daqLed
@ daqLed
Definition: TileLaserObject.h:153
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileLaserObject::getPMSigmaPedestal
double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:237
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TileLaser
Definition: TileLaser.h:17
TileLaserObject::getInterlock
int getInterlock() const
Definition: TileLaserObject.h:304
TileLaserObject::getDiodePedestal
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:109
TileLaserObject::setControl
void setControl(const double pumpDiodeTemp, const int timeLastMeasP, const double diodeBoxTemp, const int timeLastMeasD, const double gasFlux, const int timeLastMeasG, const double humidity, const int timeLastMeasH, const time_t lastPedMeas, const time_t lastAlphaMeas)
Definition: TileLaserObject.cxx:265
TileLaserObject::nbTypes
@ nbTypes
Definition: TileLaserObject.h:47
TileLaserObject::m_pmtsLG
std::vector< TileLaserPmt > m_pmtsLG
Definition: TileLaserObject.h:167
TileLaserObject::setDiode
void setDiode(const unsigned int diode, const int diodeAdc, const double diodePedestal, const double diodeSigmaPedestal, const double alpha, const double sigmaAlpha, const double pedestalAlpha, const double sigmaPedAlpha, const unsigned int gain)
Definition: TileLaserObject.cxx:300
TileLaserObject::setCalib
void setCalib(int chan, int type, double sumXinQDC, double sumX2inQDC, int nevts, int gain)
Definition: TileLaserObject.cxx:86
TileLaserObject::getGasFlux
double getGasFlux() const
Definition: TileLaserObject.h:254
TileLaserObject::getSigmaAlpha
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:152
TileLaserObject::getDaqType
int getDaqType() const
Definition: TileLaserObject.h:325
TileLaserObject::Pedestal0
@ Pedestal0
Definition: TileLaserObject.h:193
TileLaserObject::Alpha
@ Alpha
Definition: TileLaserObject.h:193
TileLaserObject::m_plc
TileLaserPLC m_plc
Definition: TileLaserObject.h:170
CLASS_DEF.h
macros to associate a CLID to a type
TileLaserObject::getTimeLastMeasD
int getTimeLastMeasD() const
Definition: TileLaserObject.h:249
TileLaserObject
Definition: TileLaserObject.h:33
TileLaserObject::m_pmtsHG
std::vector< TileLaserPmt > m_pmtsHG
Definition: TileLaserObject.h:168
TileLaserObject::daqPedestal
@ daqPedestal
Definition: TileLaserObject.h:153
TileLaserObject::getSigma
double getSigma(int chan, int gain, int type) const
Definition: TileLaserObject.cxx:49
TileLaserObject::Pedestal1
@ Pedestal1
Definition: TileLaserObject.h:193
TileLaserObject::getPedestalAlpha
double getPedestalAlpha(const unsigned int i, const unsigned int gain=0) const
Definition: TileLaserObject.cxx:166
TileLaserObject::firstType
@ firstType
Definition: TileLaserObject.h:48