ATLAS Offline Software
Loading...
Searching...
No Matches
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"
27
29
30
31/*static const CLID CLID_TileLaser = 2940;*/
32
34
35public:
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
161private:
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
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
198
199inline int TileLaserObject::getCounter() const
200{
201 return m_laserParameter.getCounter();
202}
203
204inline void TileLaserObject::setVersion(const int version)
205{
206 m_version = version;
207}
208
210{
211 return m_version;
212}
213
214inline bool TileLaserObject::isLASERII() const
215{
216 return (std::abs(m_version)==2);
217}
218
220{
221 return m_laserParameter.getDiodeCurrOrd();
222}
223
225{
226 return m_laserParameter.getDiodeCurrMeas();
227}
228
230{
231 return m_laserParameter.getFiltNumber();
232}
233
235{
236 return m_slowCtrl.getPumpDiodeTemp();
237}
238
240{
241 return m_slowCtrl.getTimeLastMeasP();
242}
243
245{
246 return m_slowCtrl.getDiodeBoxTemp();
247}
248
250{
251 return m_slowCtrl.getTimeLastMeasD();
252}
253
254inline double TileLaserObject::getGasFlux() const
255{
256 return m_slowCtrl.getGasFlux();
257}
258
260{
261 return m_slowCtrl.getTimeLastMeasF();
262}
263
264inline double TileLaserObject::getHumidity() const
265{
266 return m_slowCtrl.getHumidity();
267}
268
270{
271 return m_slowCtrl.getTimeLastMeasH();
272}
273
275{
276 return m_slowCtrl.getLastPedMeas();
277}
278
280{
281 return m_slowCtrl.getLastAlphaMeas();
282}
283
285{
286 return m_plc.getAlphaPos();
287}
288
289inline double TileLaserObject::getLVdiodes() const
290{
291 return m_plc.getLVdiodes();
292}
293
294inline double TileLaserObject::getHVpmts() const
295{
296 return m_plc.getHVpmts();
297}
298
300{
301 return m_plc.getShutter();
302}
303
305{
306 return m_plc.getInterlock();
307}
308
310{
311 return m_plc.getAlarm();
312}
313
315{
316 return m_qdctimeout;
317}
318
320{
321 return m_tdctimeout;
322}
323
324
326{
327 return m_daqtype;
328}
329
330inline void TileLaserObject::setBCID(const int BCID)
331{
332 m_BCID=BCID;
333}
334
335inline int TileLaserObject::getBCID() const {return m_BCID;}
336
337#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
TileLaserControl m_slowCtrl
TileLaser m_laserParameter
void setDaqType(const unsigned int daqtype)
int getTimeLastMeasH() const
int getFiltNumber() const
int getAlphaPos() const
int getCalibType() const
double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0) const
int getType(int chan, int gain, int type) const
double getHVpmts() const
void setCalib(int chan, int type, double sumXinQDC, double sumX2inQDC, int nevts, int gain)
std::vector< TileLaserDiode > m_diodesLG
int getTimeLastMeasF() const
void setPmt(const unsigned int pmt, const int pmAdc, const int tdc, const double pmPedestal, const double pmSigmaPedestal, const unsigned int gain)
std::vector< TileLaserPmt > m_pmtsLG
int getAlarm() const
MAX_SIZE
max size of diode and pmt vectors
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
void setCalibType(int type)
int getN(int chan, int gain, int type) const
double getPedestalAlpha(const unsigned int i, const unsigned int gain=0) const
double getMean(int chan, int gain, int type) const
void setBCID(const int BCID)
int getInterlock() const
std::vector< std::vector< TileLasCalib > > m_lascalib
void setTimeouts(const bool qdc, const bool tdc)
time_t getLastAlphaMeas() const
int getCounter() const
std::vector< TileLaserDiode > m_diodesHG
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)
double getPumpDiodeTemp() const
int getPMADC(const unsigned int j, const unsigned int gain=0) const
int getDaqType() const
void setPLC(const int alphaPos, const double LVdiodes, const double HVpmts, const int shutter, const int interlock, const int alarm)
double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0) const
double getAlpha(const unsigned int i, const unsigned int gain=0) const
double getLVdiodes() const
int getTimeLastMeasP() const
double getDiodeCurrOrd() const
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
std::vector< TileLaserPmt > m_pmtsHG
bool getQDCTimeout() const
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)
bool isLASERII() const
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
int getBCID() const
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
bool isSet(int chan, int gain, int type) const
int getVersion() const
int getTDC(const unsigned int j, const unsigned int gain=0) const
double getGasFlux() const
TileLaserPLC m_plc
void setLaser(const int Counter, const int diodeCurrOrd, const int diodeCurrMeas, const int filtNumber, const int timingDelay, const int version)
double getHumidity() const
double getDiodeCurrMeas() const
bool getTDCTimeout() const
int getTimeLastMeasD() const
time_t getLastPedMeas() const
int getShutter() const
double getSigma(int chan, int gain, int type) const
void setVersion(const int version)
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const
double getDiodeBoxTemp() const