50 }
catch (
const eformat::Issue &ex) {
52 return StatusCode::SUCCESS;
59 return StatusCode::FAILURE;
61 mmCablingMap = readCondHandle.
cptr();
68 return StatusCode::FAILURE;
70 dcsData = readCondHandle.
cptr();
75 bool seeded_mode(!rdoIdhVect.empty());
79 const std::vector<Muon::nsw::NSWElink *>& elinks = common_decoder.
get_elinks();
81 if (elinks.empty())
return StatusCode::SUCCESS;
85 for (
auto* elink : elinks) {
88 if (elink->isNull())
continue;
92 const char* station_name = elink->elinkId()->is_large_station() ?
"MML" :
"MMS";
93 int station_eta = (int)elink->elinkId()->station_eta();
94 unsigned int station_phi = (
unsigned int)elink->elinkId()->station_phi();
95 unsigned int multi_layer = (
unsigned int)elink->elinkId()->multi_layer();
96 unsigned int gas_gap = (
unsigned int)elink->elinkId()->gas_gap();
100 m_MmIdHelper->get_module_hash(module_ID, module_hashID);
103 if (seeded_mode && std::find(rdoIdhVect.begin(), rdoIdhVect.end(), module_hashID) == rdoIdhVect.end())
continue;
105 std::unique_ptr<MM_RawDataCollection>& rdo = rdo_map[module_hashID];
106 if (!rdo) rdo = std::make_unique<MM_RawDataCollection>(module_hashID);
109 const std::vector<Muon::nsw::VMMChannel *>& channels = elink->get_channels();
110 for (
auto *channel : channels) {
111 unsigned int channel_number = channel->channel_number();
112 if (channel_number == 0)
continue;
116 std::optional<Identifier> correctedChannelId = mmCablingMap->
correctChannel(channel_ID, msgStream());
117 if (!correctedChannelId) {
118 ATH_MSG_DEBUG(
"Channel was shifted outside its connector and is therefore not decoded into and RDO");
121 channel_ID = (*correctedChannelId);
124 if (dcsData && !dcsData->
isGood(ctx,channel_ID))
continue;
126 rdo->push_back(
new MM_RawData(channel_ID, channel_number, channel->tdo(),
127 channel->pdo(), channel->rel_bcid(),
true));
131 return StatusCode::SUCCESS;
virtual StatusCode fillCollection(const EventContext &, const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &, const std::vector< IdentifierHash > &, std::unordered_map< IdentifierHash, std::unique_ptr< MM_RawDataCollection > > &) const override
Convert ROBFragments to RDOs.
bool isGood(const EventContext &ctx, const Identifier &channelId, bool issTgcQ1OuterHv=false) const
Returns whether the channel is alive, i.e. DCS state on, etc...