8 #include "Identifier/Identifier.h"
17 #include "GeoModelKernel/throwExcept.h"
25 m_idHelperSvc(idHelperSvc),
26 m_muonGeoMgr(muonGeoMgr){}
29 ostr <<
" timeSince " <<
obj.timeSince <<
" timeUntil " <<
obj.timeUntil <<
" elink " <<
obj.elink;
37 return static_cast<unsigned int>(
hash)*(idHelper.gasGapMax()) + (idHelper.gasGap(chan_id) -1);
40 return static_cast<unsigned int>(
hash)*(idHelper.gasGapMax()) + (idHelper.gasGap(chan_id) -1);
55 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
57 const unsigned int channel = idHelper.channel(chnlId)-1;
70 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
71 DcsModule& dcs_mod = dcsMap.at(array_idx);
72 const unsigned int channel = idHelper.channel(chnlId)-1;
90 if (array_idx >=
data.size())
data.resize(array_idx + 1);
92 x.timeSince = timeSince;
93 x.timeUntil = timeUntil;
95 x.permanentlyDisabled = permanentlyDisabled;
96 data[array_idx][chnlId].insert(
x);
103 if (array_idx >=
data.size())
data.resize(array_idx + 1);
112 std::vector<Identifier>
114 std::vector<Identifier> chnls;
118 chnls.reserve(dcsMap.size());
120 if(
module.channels.empty())
continue;
121 if(
side ==
"A" && idHelper.stationEta(
module.layer_id) < 0)
continue;
122 if(
side ==
"C" && idHelper.stationEta(
module.layer_id) > 0)
continue;
123 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
124 if(!
module.channels[chn -1])
continue;
125 chnls.push_back(idHelper.channelID(
module.layer_id, idHelper.multilayer(
module.layer_id), idHelper.gasGap(
module.layer_id), chn ));
131 chnls.reserve(dcsMap.size());
133 if(
module.channels.empty())
continue;
134 if(
side ==
"A" && idHelper.stationEta(
module.layer_id) < 0)
continue;
135 if(
side ==
"C" && idHelper.stationEta(
module.layer_id) > 0)
continue;
136 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
137 if(!
module.channels[chn -1])
continue;
138 chnls.push_back(idHelper.channelID(
module.layer_id, idHelper.multilayer(
module.layer_id),
139 idHelper.gasGap(
module.layer_id), idHelper.channelType(
module.layer_id), chn ));
150 if(!idHelper.is_mm(
channelId))
return nullptr;
154 const unsigned int channel = idHelper.channel(dcsChannelIdStripHv) -1;
155 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
158 if(!idHelper.is_mm(
channelId))
return nullptr;
162 const unsigned int channel = idHelper.channel(dcsChannelIdDriftHv) -1;
163 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
166 if(!idHelper.is_stgc(
channelId))
return nullptr;
169 if(std::abs(idHelper.stationEta(
channelId))!= 1) {issTgcQ1OuterHv=
false;}
173 const unsigned int channel = idHelper.channel(dcsChannelId) -1;
174 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
185 bool permanentlyDisabled{
false};
206 return driftHvIsGood && stripHvIsGood;
214 if(
data.size()<=array_idx ||
data[array_idx].empty())
return true;
215 const std::map<Identifier, std::set<TDaqConstants>>& dataInRoElement =
data[array_idx];
228 mapper.elink_info(std::abs(idHelper.stationEta(
channelId))-1, idHelper.channel(
channelId), elink);
231 auto elm = dataInRoElement.find(mapIdentifier);
232 if(elm == dataInRoElement.end())
return true;
234 uint64_t evtTime = ctx.eventID().time_stamp()*1e9;
235 evtTime += ctx.eventID().time_stamp_ns_offset();
236 x.timeSince = evtTime;
237 x.timeUntil = evtTime;
240 auto disabledLink = elm->second.find(
x);
241 if(disabledLink != elm->second.end()){
242 permanentlyDisabled = disabledLink->permanentlyDisabled;
251 if(
data.size()<=array_idx ||
data[array_idx].empty())
return true;
266 if(!detectorReadoutElement) {
274 int channel_number = idHelper.channel(
channelId);
276 if(channel_number <= channelDesign->nMissedBottomStereo || channel_number >= channelDesign->
totalStrips - channelDesign->
nMissedTopStereo) {
280 if(channel_number <= channelDesign->nMissedBottomEta || channel_number >= channelDesign->
totalStrips - channelDesign->
nMissedTopEta) {