ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCondDbAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
13
15using namespace MuonCond;
16using namespace CxxUtils;
17// constructor
18MdtCondDbAlg::MdtCondDbAlg(const std::string& name, ISvcLocator* pSvcLocator) :
19 AthCondAlgorithm(name, pSvcLocator) {}
20
21// Initialize
23 ATH_MSG_DEBUG("initializing " << name());
24
25 ATH_CHECK(m_idHelperSvc.retrieve());
26 ATH_CHECK(m_writeKey.initialize());
36 // The calls to the functions that use these two are commented out,
37 // so don't declare a dependencies on them.
39 ATH_CHECK(m_readKey_folder_mc_deadTubes.initialize(false ));
40
41 ServiceHandle<IGeoModelSvc> geoModel("GeoModelSvc", name());
42 ATH_CHECK(geoModel.retrieve());
43
44 std::string AtlasVersion = geoModel->atlasVersion();
45 std::string MuonVersion = geoModel->muonVersionOverride();
46 std::string detectorKey = MuonVersion.empty() ? AtlasVersion : MuonVersion;
47 std::string detectorNode = MuonVersion.empty() ? "ATLAS" : "MuonSpectrometer";
48
49 ServiceHandle<IRDBAccessSvc> accessSvc("RDBAccessSvc", name());
50 ATH_CHECK(accessSvc.retrieve());
51
52 IRDBRecordset_ptr switchSet = accessSvc->getRecordsetPtr("HwSwIdMapping", detectorKey, detectorNode);
53
54 if ((*switchSet).size() == 0) {
55 ATH_MSG_WARNING("Old Atlas Version : " << AtlasVersion << " Only Online Identifier. Falling back to HwSwIdMapping-00 tag");
56 switchSet = accessSvc->getRecordsetPtr("HwSwIdMapping", "HwSwIdMapping-00");
57 }
58
59 for (unsigned int irow = 0; irow < (*switchSet).size(); ++irow) {
60 const IRDBRecord* switches = (*switchSet)[irow];
61 std::string hardwareName = switches->getString("HARDNAME");
62 std::string stName = switches->getString("SOFTNAME");
63 int stPhi = switches->getInt("SOFTOCTANT");
64 int stEta = switches->getInt("SOFTIZ");
65 bool isValid{false};
66 Identifier ChamberId = m_idHelperSvc->mdtIdHelper().elementID(stName, stEta, stPhi, isValid);
67 if (!isValid) continue;
68
69 m_chamberNames[hardwareName] = ChamberId;
70 }
71
72 return StatusCode::SUCCESS;
73}
74StatusCode MdtCondDbAlg::addDHDependency(const EventContext& ctx, const dataBaseKey_t& key, writeHandle_t& wh) const {
75 if (key.empty()) {
76 ATH_MSG_VERBOSE("Key is empty");
77 return StatusCode::SUCCESS;
78 }
80 if (!readHandle.isValid()) {
81 ATH_MSG_FATAL("Failed to load conditions from "<<key.fullKey());
82 return StatusCode::FAILURE;
83 }
84 wh.addDependency(readHandle);
85 return StatusCode::SUCCESS;
86}
101
102// execute
103StatusCode MdtCondDbAlg::execute(const EventContext& ctx) const {
104 ATH_MSG_DEBUG("execute " << name());
105
106 if (m_isOnline) {
107 ATH_MSG_DEBUG("IsOnline is set to True; nothing to do!");
108 return StatusCode::SUCCESS;
109 }
110
111 // launching Write Cond Handle
113 if (writeHandle.isValid()) {
114 ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
115 << " In theory this should not be called, but may happen"
116 << " if multiple concurrent events are being processed out of order.");
117 return StatusCode::SUCCESS;
118 }
119 std::unique_ptr<MdtCondDbData> writeCdo{std::make_unique<MdtCondDbData>(m_idHelperSvc->mdtIdHelper())};
120 ATH_CHECK(loadDependencies(ctx, writeHandle));
121 // retrieving data
122 if (m_isData && m_isRun1) {
123 ATH_CHECK(loadDataPsHv(ctx, *writeCdo));
124 ATH_CHECK(loadDataPsLv(ctx, *writeCdo));
125 ATH_CHECK(loadDroppedChambers(ctx, *writeCdo, false));
126 } else if (m_isData && !m_isRun1) {
127 ATH_CHECK(loadDataHv(ctx, *writeCdo));
128 ATH_CHECK(loadDataLv(ctx, *writeCdo));
129 } else {
130 ATH_CHECK(loadDroppedChambers(ctx, *writeCdo, true));
131 ATH_CHECK(loadMcNoisyChannels(ctx, *writeCdo));
132 // ATH_CHECK(loadMcDeadElements (rangeW, writeCdo.get(),ctx));// keep for future development
133 // ATH_CEHCK(loadMcDeadTubes (rangeW, writeCdo.get(),ctx));// keep for future development
134 }
135
136 ATH_CHECK(writeHandle.record(std::move(writeCdo)));
137 ATH_MSG_DEBUG("Recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
138
139 return StatusCode::SUCCESS;
140}
141
142// loadDataPsHv
143StatusCode MdtCondDbAlg::loadDataPsHv(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
145 const CondAttrListCollection* readCdo{*readHandle};
146 if (!readCdo) {
147 ATH_MSG_ERROR("Null pointer to the read conditions object");
148 return StatusCode::FAILURE;
149 }
150
151 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
152
153 std::vector<Identifier> cachedDeadMultiLayersId_standby;
154 for (const readOutPair& itr : *readCdo) {
155 const unsigned int chanNum = itr.first;
156 const coral::AttributeList& atr = itr.second;
157 const std::string& hv_payload = readCdo->chanName(chanNum);
158 std::string hv_name;
159
160 if (atr.size() == 1) {
161 hv_name = *(static_cast<const std::string*>((atr["fsm_currentState"]).addressOfData()));
162
163 auto tokens = tokenize(hv_name, " ");
164 auto tokens2 = tokenize(hv_payload, "_");
165
166 if (tokens[0] != "ON" && tokens[0] != "STANDBY" && tokens[0] != "UNKNOWN") {
167 int multilayer = atoi(tokens2[3]);
168 const auto &chamber_name = tokens2[2];
169 Identifier ChamberId = identifyChamber(chamber_name);
170 if (ChamberId.is_valid()) {
171 Identifier MultiLayerId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, multilayer, 1, 1);
172 writeCdo.setDeadMultilayer(MultiLayerId);
173 writeCdo.setDeadChamber(ChamberId);
174 cachedDeadMultiLayersId_standby.push_back(MultiLayerId);
175 }
176 }
177 if (tokens[0] == "STANDBY") {
178 int multilayer = atoi(tokens2[3]);
179 const auto &chamber_name = tokens2[2];
180 Identifier ChamberId = identifyChamber(chamber_name);
181 if (ChamberId.is_valid()) {
182 Identifier MultiLayerId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, multilayer, 1, 1);
183 writeCdo.setDeadMultilayer(MultiLayerId);
184 writeCdo.setDeadChamber(ChamberId);
185 cachedDeadMultiLayersId_standby.push_back(MultiLayerId);
186 }
187 }
188 }
189 }
190
191 // moving on to SetPoints
192 if (!m_checkOnSetPoint) return StatusCode::SUCCESS;
193
194 std::map<Identifier, float> chamberML_V1;
195 std::map<Identifier, float> chamberML_V0;
196
197 // V0 handle
199 const CondAttrListCollection* readCdo_v0{*readHandle_v0};
200 if (!readCdo_v0) {
201 ATH_MSG_ERROR("Null pointer to the read conditions object");
202 return StatusCode::FAILURE;
203 }
204
205 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle_v0.fullKey() << " readCdo->size()= " << readCdo_v0->size());
206
207 // V1
209 const CondAttrListCollection* readCdo_v1{*readHandle_v1};
210 if (!readCdo_v1) {
211 ATH_MSG_ERROR("Null pointer to the read conditions object");
212 return StatusCode::FAILURE;
213 }
214
215 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle_v1.fullKey() << " readCdo->size()= " << readCdo_v1->size());
216
217 // V0 iteration
218 for (const readOutPair& itr_v0 : *readCdo_v0) {
219 const unsigned int chanNum = itr_v0.first;
220 const coral::AttributeList& atr_v0 = itr_v0.second;
221 const std::string& setPointsV0_payload = readCdo_v0->chanName(chanNum);
222 float setPointsV0_name{0.};
223
224 if (atr_v0.size() == 1) {
225 setPointsV0_name = *(static_cast<const float*>((atr_v0["readBackSettings_v0"]).addressOfData()));
226
227 auto tokens2 = tokenize(setPointsV0_payload, "_");
228
229 int multilayer = atoi(tokens2[3]);
230 const auto &chamber_name = tokens2[2];
231 Identifier ChamberId = identifyChamber(chamber_name);
232 Identifier MultiLayerId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, multilayer, 1, 1);
233 chamberML_V0[MultiLayerId] = setPointsV0_name;
234 }
235 }
236
237 // V1 iteration
239 for (const readOutPair& itr_v1 : *readCdo_v1) {
240 const unsigned int chanNum = itr_v1.first;
241 const coral::AttributeList& atr_v1 = itr_v1.second;
242 const std::string& setPointsV1_payload = readCdo_v1->chanName(chanNum);
243 float setPointsV1_name{0.};
244
245 if (atr_v1.size() == 1) {
246 setPointsV1_name = *(static_cast<const float*>((atr_v1["readBackSettings_v1"]).addressOfData()));
247
248
249 auto tokens2= tokenize(setPointsV1_payload, "_");
250
251 int multilayer = atoi(tokens2[3]);
252 const auto &chamber_name = tokens2[2];
253 Identifier ChamberId = identifyChamber(chamber_name);
254 Identifier MultiLayerId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, multilayer, 1, 1);
255 chamberML_V1[MultiLayerId] = setPointsV1_name;
256 }
257 }
258
259 // check for chamber standby the correct value of Setpoint V0 vs SetpointV1
260 // for chamber StandBy --> V0==V1 to be on
261 for (const Identifier& MultilayerId_ch : cachedDeadMultiLayersId_standby) {
262 if (chamberML_V1.find(MultilayerId_ch)->second == chamberML_V0.find(MultilayerId_ch)->second) {
263 ATH_MSG_DEBUG("Chamber has correct Voltage V1 = " << chamberML_V1.find(MultilayerId_ch)->second
264 << " V0= " << chamberML_V0.find(MultilayerId_ch)->second);
265 } else {
266 ATH_MSG_DEBUG("Chamber has wrong correct Voltage V1 = " << chamberML_V1.find(MultilayerId_ch)->second
267 << " V0= " << chamberML_V0.find(MultilayerId_ch)->second);
268 ATH_MSG_DEBUG("Has to be masked!!!");
269 writeCdo.setDeadMultilayer(MultilayerId_ch);
270 }
271 }
272
273 return StatusCode::SUCCESS;
274}
275
276// loadDataPsLv
277StatusCode MdtCondDbAlg::loadDataPsLv(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
279 const CondAttrListCollection* readCdo{*readHandle};
280 if (!readCdo) {
281 ATH_MSG_ERROR("Null pointer to the read conditions object");
282 return StatusCode::FAILURE;
283 }
284 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
285 for (const auto& [chanNum, atr] : *readCdo) {
286 const std::string& hv_payload = readCdo->chanName(chanNum);
287 std::string hv_name;
288
289 if (!atr.size()) { continue; }
290 hv_name = *(static_cast<const std::string*>((atr["fsm_currentState"]).addressOfData()));
291
292 auto tokens = tokenize(hv_name, " ");
293 auto tokens2 = tokenize(hv_payload, "_");
294 if (tokens[0] != "ON") {
295 const auto &chamber_name = tokens2[2];
296 Identifier ChamberId = identifyChamber(chamber_name);
297 if (ChamberId.is_valid()) { writeCdo.setDeadChamber(ChamberId); }
298 }
299 }
300
301 return StatusCode::SUCCESS;
302}
303
304StatusCode MdtCondDbAlg::loadDataHv(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
306
307 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readCdo.fullKey() << " readCdo->size()= " << readCdo->size());
308 for (const auto& [chanNum, atr] : **readCdo) {
309 if (!atr.size()) { continue; }
310
311 const std::string& hv_payload = readCdo->chanName(chanNum);
312 const std::string& hv_name_ml1{*(static_cast<const std::string*>((atr["fsmCurrentState_ML1"]).addressOfData()))};
313 const std::string& hv_name_ml2{*(static_cast<const std::string*>((atr["fsmCurrentState_ML2"]).addressOfData()))};
314 const float hv_v0_ml1{*(static_cast<const float*>((atr["v0set_ML1"]).addressOfData()))};
315 const float hv_v1_ml1{*(static_cast<const float*>((atr["v1set_ML1"]).addressOfData()))};
316 const float hv_v0_ml2{*(static_cast<const float*>((atr["v0set_ML2"]).addressOfData()))};
317 const float hv_v1_ml2{*(static_cast<const float*>((atr["v1set_ML2"]).addressOfData()))};
318
319 Identifier chamberId = identifyChamber(hv_payload);
320 if (!chamberId.is_valid()) continue;
321 auto addChamber = [&](const DcsFsmState& dcsState,
322 const float standbyVolt,
323 const float readyVolt,
324 const int multiLayer) {
325 const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
326 if (multiLayer > idHelper.numberOfMultilayers(chamberId)) return;
327 const Identifier mlId = idHelper.multilayerID(chamberId, multiLayer);
328 constexpr std::array<DcsFsmState, 3> goodStates{DcsFsmState::ON, DcsFsmState::STANDBY, DcsFsmState::UNKNOWN};
329 if ( (std::find(goodStates.begin(), goodStates.end(), dcsState) == goodStates.end()) ||
330 (dcsState != DcsFsmState::ON && readyVolt != standbyVolt)) {
331 writeCdo.setDeadMultilayer(mlId);
332 }
333 writeCdo.setHvState(mlId, dcsState, standbyVolt, readyVolt);
334 };
335 addChamber(getFsmStateEnum(hv_name_ml1), hv_v0_ml1, hv_v1_ml1, 1);
336 addChamber(getFsmStateEnum(hv_name_ml2), hv_v0_ml2, hv_v1_ml2, 2);
337 }
338 return StatusCode::SUCCESS;
339}
340
341// loadDataLv
342StatusCode MdtCondDbAlg::loadDataLv(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
344 const CondAttrListCollection* readCdo{*readHandle};
345 if (!readCdo) {
346 ATH_MSG_ERROR("Null pointer to the read conditions object");
347 return StatusCode::FAILURE;
348 }
349 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
350
351 for (const auto& [chanNum, atr] : *readCdo) {
352 if (!atr.size()) { continue; }
353 const std::string& lv_payload = readCdo->chanName(chanNum);
354 const std::string& lv_name{*static_cast<const std::string*>((atr["fsmCurrentState_LV"]).addressOfData())};
355 if (lv_payload.empty() || lv_name.empty()){
356 ATH_MSG_WARNING("The read data with chanNum "<<chanNum<<", lv_payload: "<<lv_payload<<", hv_name: "<<lv_name
357 <<". Does not have any fsmCurrentState_LV attribute. "
358 <<"May be this is related to ATLASRECTS-6920 / ATLASRECTS-6879. Skip it");
359 continue;
360 }
361 ATH_MSG_VERBOSE("Channel "<<lv_name<<" "<<lv_payload);
362 auto tokens = tokenize(lv_name, " ");
363
364 if (tokens[0] != "ON") {
365 Identifier ChamberId = identifyChamber(lv_payload);
366 writeCdo.setDeadChamber(ChamberId);
367 }
368 }
369
370 return StatusCode::SUCCESS;
371}
372
373// loadDataDroppedChambers
374StatusCode MdtCondDbAlg::loadDroppedChambers(const EventContext& ctx, MdtCondDbData& writeCdo , bool isMC) const {
377 const CondAttrListCollection* readCdo{*readHandle};
378 if (!readCdo) {
379 ATH_MSG_ERROR("Null pointer to the read conditions object");
380 return StatusCode::FAILURE;
381 }
382 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
383
384 for (const readOutPair& itr : *readCdo) {
385 const coral::AttributeList& atr = itr.second;
386 const std::string& chamber_dropped{*(static_cast<const std::string*>((atr["Chambers_disabled"]).addressOfData()))};
387
388 auto tokens = tokenize(chamber_dropped, " ");
389 for (auto & token : tokens) {
390 if (token != "0") {
391 const auto &chamber_name = token;
392 Identifier ChamberId = identifyChamber(chamber_name);
393 if (ChamberId.is_valid()) { writeCdo.setDeadChamber(ChamberId); }
394 }
395 }
396 }
397 return StatusCode::SUCCESS;
398}
399
400// loadMcDeadElements
401StatusCode MdtCondDbAlg::loadMcDeadElements(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
403 const CondAttrListCollection* readCdo{*readHandle};
404 if (!readCdo) {
405 ATH_MSG_ERROR("Null pointer to the read conditions object");
406 return StatusCode::FAILURE;
407 }
408
409 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
410
411 for (const readOutPair& itr : *readCdo) {
412 const coral::AttributeList& atr = itr.second;
413 const std::string& chamber_name{*(static_cast<const std::string*>((atr["Chambers_Name"]).addressOfData()))};
414 const std::string& list_mlayer{*(static_cast<const std::string*>((atr["Dead_multilayer"]).addressOfData()))};
415 const std::string& list_layer{*(static_cast<const std::string*>((atr["Dead_layer"]).addressOfData()))};
416 const std::string& list_tube{*(static_cast<const std::string*>((atr["Dead_tube"]).addressOfData()))};
417
418 Identifier ChamberId = identifyChamber(chamber_name);
419 auto tokens = tokenize(list_tube, " ");
420 auto tokens_mlayer = tokenize(list_mlayer, " ");
421 auto tokens_layer = tokenize(list_layer, " ");
422
423 for (auto & token : tokens) {
424
425 if (token != "0") {
426 int ml = atoi(token.substr(0, 1));
427 int layer = atoi(token.substr(1, 2));
428 int tube = atoi(token.substr(2));
429 Identifier ChannelId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, ml, layer, tube);
430 writeCdo.setDeadTube(ChannelId);
431 writeCdo.setDeadChamber(ChamberId);
432 }
433 }
434
435 for (unsigned int i = 0; i < tokens_mlayer.size(); i++) {
436 if (tokens_mlayer[i] != "0") {
437 int ml = atoi(tokens_mlayer[i].substr(0));
438 Identifier ChannelId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, ml, 1, 1);
439 writeCdo.setDeadMultilayer(ChannelId);
440 writeCdo.setDeadChamber(ChamberId);
441 }
442 }
443
444 for (unsigned int i = 0; i < tokens_layer.size(); i++) {
445 if (tokens_layer[i] != "0") {
446 int ml = atoi(tokens_layer[i].substr(0, 1));
447 int layer = atoi(tokens_layer[i].substr(1));
448 Identifier ChannelId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, ml, layer, 1);
449 writeCdo.setDeadLayer(ChannelId);
450 writeCdo.setDeadChamber(ChamberId);
451 }
452 }
453 }
454
455 return StatusCode::SUCCESS;
456}
457
458// loadMcDeadTubes
459StatusCode MdtCondDbAlg::loadMcDeadTubes(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
461 const CondAttrListCollection* readCdo{*readHandle};
462 if (!readCdo) {
463 ATH_MSG_ERROR("Null pointer to the read conditions object");
464 return StatusCode::FAILURE;
465 }
466
467 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
468
469 for (const readOutPair& itr : *readCdo) {
470 const coral::AttributeList& atr = itr.second;
471
472 std::string dead_tube = *(static_cast<const std::string*>((atr["DeadTube_List"]).addressOfData()));
473 std::string chamber_name = *(static_cast<const std::string*>((atr["Chamber_Name"]).addressOfData()));
474
475 auto tokens = tokenize(dead_tube, " ");
476 Identifier ChamberId = identifyChamber(std::move(chamber_name));
477
478 for (auto & token : tokens) {
479 int ml = atoi(token.substr(0, 1));
480 int layer = atoi(token.substr(1, 2));
481 int tube = atoi(token.substr(2));
482 Identifier ChannelId = m_idHelperSvc->mdtIdHelper().channelID(ChamberId, ml, layer, tube);
483 writeCdo.setDeadTube(ChannelId);
484 }
485 writeCdo.setDeadChamber(ChamberId);
486 }
487
488 return StatusCode::SUCCESS;
489}
490
491// loadMcNoisyChannels
492StatusCode MdtCondDbAlg::loadMcNoisyChannels(const EventContext& ctx, MdtCondDbData& writeCdo ) const {
494 const CondAttrListCollection* readCdo{*readHandle};
495 if (!readCdo) {
496 ATH_MSG_ERROR("Null pointer to the read conditions object");
497 return StatusCode::FAILURE;
498 }
499
500 ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
501 for (const auto &[chanNum, atr] : *readCdo) {
502 if (!atr.size()) {
503 continue;
504 }
505 const std::string& hv_payload = readCdo->chanName(chanNum);
506 const std::string& hv_name{*(static_cast<const std::string*>((atr["fsm_currentState"]).addressOfData()))};
507
508 auto tokens = tokenize(hv_name, " ");
509
510 auto tokens2 = tokenize(hv_payload, "_");
511
512 if (tokens[0] != "ON") {
513 Identifier ChamberId = identifyChamber(tokens2[2]);
514 writeCdo.setDeadChamber(ChamberId);
515 }
516
517 }
518 return StatusCode::SUCCESS;
519}
520Identifier MdtCondDbAlg::identifyChamber(std::string chamber) const {
521 if (chamber[2] == 'Y' || chamber[2] == 'X') chamber[2] = 'S';
522 auto itr = m_chamberNames.find(chamber.substr(0, chamber.find('_')));
523 if (itr != m_chamberNames.end()) return itr->second;
524 ATH_MSG_DEBUG("The chamber "<<chamber<<" is unknown.");
525 return Identifier{};
526}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
CondAttrListCollection::ChanAttrListPair readOutPair
Base class for conditions algorithms.
This class is a collection of AttributeLists where each one is associated with a channel number.
const std::string & chanName(ChanNum chanNum) const
find name for particular channel
size_type size() const
number of Chan/AttributeList pairs
ChanAttrListMap::value_type ChanAttrListPair
ChanAttrListMap::const_iterator const_iterator
IRDBRecord is one record in the IRDBRecordset object.
Definition IRDBRecord.h:27
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
bool is_valid() const
Check if id is in a valid state.
dataBaseKey_t m_readKey_folder_da_pslv
StatusCode loadDroppedChambers(const EventContext &ctx, MdtCondDbData &dataOut, bool isMC) const
virtual StatusCode initialize() override
dataBaseKey_t m_readKey_folder_mc_deadTubes
Gaudi::Property< bool > m_isOnline
SG::WriteCondHandle< MdtCondDbData > writeHandle_t
StatusCode loadMcDeadTubes(const EventContext &ctx, MdtCondDbData &dataOut) const
dataBaseKey_t m_readKey_folder_da_psv1
StatusCode loadDataLv(const EventContext &ctx, MdtCondDbData &dataOut) const
dataBaseKey_t m_readKey_folder_da_droppedChambers
StatusCode loadMcDeadElements(const EventContext &ctx, MdtCondDbData &dataOut) const
SG::ReadCondHandleKey< CondAttrListCollection > dataBaseKey_t
dataBaseKey_t m_readKey_folder_mc_droppedChambers
dataBaseKey_t m_readKey_folder_da_hv
MdtCondDbAlg(const std::string &name, ISvcLocator *svc)
Identifier identifyChamber(std::string chamber) const
dataBaseKey_t m_readKey_folder_da_psv0
StatusCode loadDependencies(const EventContext &ctx, writeHandle_t &wh) const
StatusCode addDHDependency(const EventContext &ctx, const dataBaseKey_t &key, writeHandle_t &wh) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual StatusCode execute(const EventContext &) const override
StatusCode loadDataPsHv(const EventContext &ctx, MdtCondDbData &dataOut) const
Gaudi::Property< bool > m_isRun1
StatusCode loadDataHv(const EventContext &ctx, MdtCondDbData &dataOut) const
SG::WriteCondHandleKey< MdtCondDbData > m_writeKey
dataBaseKey_t m_readKey_folder_mc_deadElements
Gaudi::Property< bool > m_checkOnSetPoint
dataBaseKey_t m_readKey_folder_mc_noisyChannels
std::map< std::string, Identifier > m_chamberNames
dataBaseKey_t m_readKey_folder_da_pshv
Gaudi::Property< bool > m_isData
StatusCode loadDataPsLv(const EventContext &ctx, MdtCondDbData &dataOut) const
dataBaseKey_t m_readKey_folder_da_lv
StatusCode loadMcNoisyChannels(const EventContext &ctx, MdtCondDbData &dataOut) const
void setDeadTube(const Identifier &ident)
The indiviudal tube is dead.
void setDeadMultilayer(const Identifier &ident)
All tubes in a multi layer are dead.
void setDeadLayer(const Identifier &ident)
All tubes in a drift layer are dead.
void setHvState(const Identifier &multiLayerID, const DcsFsmState state, const float standByVolt, const float readyVolt)
Adds a DCS state to the conditions object multiLayerID -> Identifier of a tube in the multilayer stat...
void setDeadChamber(const Identifier &ident)
All tubes in a chamber are dead.
Identifier multilayerID(const Identifier &channeldID) const
int numberOfMultilayers(const Identifier &id) const
const DataObjID & fullKey() const
const std::string & key() const
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
std::vector< std::string > tokenize(const std::string &the_str, std::string_view delimiters)
Splits the string into smaller substrings.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
DcsFsmState getFsmStateEnum(const std::string &fsmState)
Definition Defs.cxx:8