69{
71 std::stringstream is;
73 bool haveFT=false, haveSlot=false, haveChannel=false;
75
77 if (is.bad()) {
79 return StatusCode::FAILURE;
80 }
81
82 int FTmax;
83 if (bec==0)
84 FTmax=32;
85 else
86 FTmax=24;
87
88
89
90 if (!is.eof()) {
92 haveFT=true;
93
94 }
95 if (!is.eof()) {
96 is >> slot;
97 haveSlot=true;
98 }
99 if (!is.eof()) {
101 haveChannel=true;
102 }
103
104 msg() << MSG::DEBUG <<
"Will exclude: bec="<<
bec <<
" pn=" <<
pn;
105 if (haveFT)
msg() <<
" FT=" <<
FT;
106 if (haveSlot)
msg() <<
" slot=" << slot;
107 if (haveChannel)
msg() <<
" channel=" <<
channel;
109
111 unsigned nDisconnected=0;
112 HWIdentifier chanId;
113 do {
114
115 int slotMax=15;
116 do {
117 int channelMax=128;
118 do {
120 try {
121 chanId=
m_onlineID->channel_Id(bec,pn,FT,slot,channel);
122 if (
cabling->isOnlineConnected(chanId)) {
123 const Identifier cellId=
cabling->cnvToIdentifier(chanId);
124 const IdentifierHash cellhash=
m_offlineID->calo_cell_hash(cellId);
125 m_includedCellsMap.reset(cellhash);
126
127
128 }
129 else
130 nDisconnected++;
131 }
132 catch (const LArOnlID_Exception&) {
133 }
134 catch(const LArID_Exception&) {
135 }
137 }while (!haveChannel && channel<channelMax);
139 if (!haveSlot) slot++;
140 }while (!haveSlot && slot<slotMax);
141 if (!haveSlot) slot=0;
143 } while (!haveFT && FT<FTmax);
144 ATH_MSG_DEBUG (
"Channels selected for exclusion: "<< nChannels <<
". Disconnected: " << nDisconnected);
145 }
146 return StatusCode::SUCCESS;
147}
unsigned int constexpr nChannels