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