25 std::atomic<bool> bmgWarningPrinted =
false;
48 return StatusCode::SUCCESS;
64 return StatusCode::SUCCESS;
72 return StatusCode::FAILURE;
79 return StatusCode::FAILURE;
83 std::vector<std::unique_ptr<MdtCsm>> csm_cache{};
87 const Identifier chid1 = mdtCollection->identify();
89 if (!condtionsPtr->isGood(chid1))
continue;
94 return StatusCode::FAILURE;
98 for (
const MdtDigit* mdtDigit : *mdtCollection) {
111 if (!bmgWarningPrinted) {
112 ATH_MSG_WARNING(
"Apparently BMG chambers are disconnected to the cabling. "
113 <<
"This has been checked to only appear in mc16a-like setups as the chambers were installed in "
114 "the end-of-the-year shutdown 2016. "
115 <<
"In any other case, be despaired in facing the villian and check what has gone wrong");
116 bmgWarningPrinted =
true;
121 return StatusCode::FAILURE;
127 int tdc_counts = mdtDigit->tdc();
129 uint16_t coarse = (tdc_counts >> 5) & 0xfff;
133 amtHit->setValues(coarse, fine,
width);
136 ATH_MSG_DEBUG(
" Coarse time : " << coarse <<
" Fine time : " << fine <<
" Width : " <<
width);
142 if (!cabling_ptr->getMultiLayerCode(
cabling_data, csmId, csm_hash, msgStream())) {
144 return StatusCode::FAILURE;
148 std::unique_ptr<MdtCsm>& mdtCsm = csm_cache[csm_hash];
157 wrongCsm.mrod = mdtCsm->
MrodId();
158 wrongCsm.subdetectorId = mdtCsm->
SubDetId();
159 wrongCsm.channelId =0;
162 cabling_ptr->getOfflineId(wrongCsm, msgStream());
164 cabling_ptr->convert(wrongCsm,wrongId);
168 return StatusCode::FAILURE;
175 for (
unsigned int hash= 0;
hash < csm_cache.size(); ++
hash) {
176 if (!csm_cache[
hash])
continue;
179 return StatusCode::SUCCESS;
187 if (tagInfoMgr.retrieve().isFailure()) {
return StatusCode::FAILURE; }
189 std::string cablingType =
"NewMDT_Cabling";
190 StatusCode sc = tagInfoMgr->addTag(
"MDT_CablingType", cablingType);
192 if (
sc.isFailure()) {
193 ATH_MSG_WARNING(
"MDT_CablingType " << cablingType <<
" not added to TagInfo ");
196 ATH_MSG_DEBUG(
"MDT_CablingType " << cablingType <<
" is Added TagInfo ");
199 return StatusCode::SUCCESS;