Build HV-line/pad map for Barrel //.
166 std::map< std::string, std::vector<int> > fuseBoxPadMapEven;
167 std::map< std::string, std::vector<int> > fuseBoxPadMapOdd;
168 std::vector<int> theVector;
170 const int pads_1A1[ 9] = { 5, 7,13,21,23,30,38,39,41};
171 theVector = std::vector<int>( pads_1A1, pads_1A1+9 );
172 fuseBoxPadMapEven.insert( make_pair(
"1_A1", theVector) );
173 const int pads_1A2[ 6] = { 6, 8,15,16,22,24};
174 theVector = std::vector<int>( pads_1A2, pads_1A2+6 );
175 fuseBoxPadMapEven.insert( make_pair(
"1_A2", theVector) );
176 const int pads_1A3[ 6] = {14,29,31,32,40,42};
177 theVector = std::vector<int>( pads_1A3, pads_1A3+6 );
178 fuseBoxPadMapEven.insert( make_pair(
"1_A3", theVector) );
179 const int pads_1B1[ 9] = { 2, 4,11,12,19,34,35,36,37};
180 theVector = std::vector<int>( pads_1B1, pads_1B1+9 );
181 fuseBoxPadMapEven.insert( make_pair(
"1_B1", theVector) );
182 const int pads_1B2[ 6] = {17,25,26,27,28,33};
183 theVector = std::vector<int>( pads_1B2, pads_1B2+6 );
184 fuseBoxPadMapEven.insert( make_pair(
"1_B2", theVector) );
185 const int pads_1B3[ 6] = { 1, 3, 9,10,18,20};
186 theVector = std::vector<int>( pads_1B3, pads_1B3+6 );
187 fuseBoxPadMapEven.insert( make_pair(
"1_B3", theVector) );
188 const int pads_2A1[12] = { 6, 8,10,15,18,20,49,50,51,61,63,65};
189 theVector = std::vector<int>( pads_2A1, pads_2A1+12);
190 fuseBoxPadMapEven.insert( make_pair(
"2_A1", theVector) );
191 const int pads_2A2[11] = { 7, 9,16,17,19,27,52,53,60,62,64};
192 theVector = std::vector<int>( pads_2A2, pads_2A2+11);
193 fuseBoxPadMapEven.insert( make_pair(
"2_A2", theVector) );
194 const int pads_2A3[10] = {26,28,29,30,37,38,39,40,41,42};
195 theVector = std::vector<int>( pads_2A3, pads_2A3+10);
196 fuseBoxPadMapEven.insert( make_pair(
"2_A3", theVector) );
197 const int pads_2B1[10] = { 2, 4,12,13,24,46,55,57,58,59};
198 theVector = std::vector<int>( pads_2B1, pads_2B1+10);
199 fuseBoxPadMapEven.insert( make_pair(
"2_B1", theVector) );
200 const int pads_2B2[12] = { 1, 3, 5,11,14,21,43,44,45,47,54,56};
201 theVector = std::vector<int>( pads_2B2, pads_2B2+12);
202 fuseBoxPadMapEven.insert( make_pair(
"2_B2", theVector) );
203 const int pads_2B3[10] = {22,23,25,31,32,33,34,35,36,48};
204 theVector = std::vector<int>( pads_2B3, pads_2B3+10);
205 fuseBoxPadMapEven.insert( make_pair(
"2_B3", theVector) );
206 const int pads_3A1[10] = { 9,10,20,23,24,32,33,34,46,54};
207 theVector = std::vector<int>( pads_3A1, pads_3A1+10);
208 fuseBoxPadMapEven.insert( make_pair(
"3_A1", theVector) );
209 const int pads_3A2[10] = {70,72,73,82,84,86,92,93,96,99};
210 theVector = std::vector<int>( pads_3A2, pads_3A2+10);
211 fuseBoxPadMapEven.insert( make_pair(
"3_A2", theVector) );
212 const int pads_3A3[10] = { 8,11,12,21,22,31,35,36,43,44};
213 theVector = std::vector<int>( pads_3A3, pads_3A3+10);
214 fuseBoxPadMapEven.insert( make_pair(
"3_A3", theVector) );
215 const int pads_3A4[10] = {59,71,81,83,85,94,95,97,98,100};
216 theVector = std::vector<int>( pads_3A4, pads_3A4+10);
217 fuseBoxPadMapEven.insert( make_pair(
"3_A4", theVector) );
218 const int pads_3A5[10] = {45,47,48,55,56,57,58,60,68,69};
219 theVector = std::vector<int>( pads_3A5, pads_3A5+10);
220 fuseBoxPadMapEven.insert( make_pair(
"3_A5", theVector) );
221 const int pads_3B1[10] = {51,63,64,66,74,76,78,80,89,90};
222 theVector = std::vector<int>( pads_3B1, pads_3B1+10);
223 fuseBoxPadMapEven.insert( make_pair(
"3_B1", theVector) );
224 const int pads_3B2[10] = { 1, 4, 5, 6,14,15,18,25,27,28};
225 theVector = std::vector<int>( pads_3B2, pads_3B2+10);
226 fuseBoxPadMapEven.insert( make_pair(
"3_B2", theVector) );
227 const int pads_3B3[10] = {61,62,65,67,75,77,79,87,88,91};
228 theVector = std::vector<int>( pads_3B3, pads_3B3+10);
229 fuseBoxPadMapEven.insert( make_pair(
"3_B3", theVector) );
230 const int pads_3B4[10] = { 2, 3, 7,13,16,17,19,26,29,30};
231 theVector = std::vector<int>( pads_3B4, pads_3B4+10);
232 fuseBoxPadMapEven.insert( make_pair(
"3_B4", theVector) );
233 const int pads_3B5[10] = {37,38,39,40,41,42,49,50,52,53};
234 theVector = std::vector<int>( pads_3B5, pads_3B5+10);
235 fuseBoxPadMapEven.insert( make_pair(
"3_B5", theVector) );
237 const int* pads_1C1 = pads_1A1;
238 theVector = std::vector<int>( pads_1C1, pads_1C1+9 );
239 fuseBoxPadMapOdd.insert( make_pair(
"1_A1", theVector) );
240 const int* pads_1C2 = pads_1A3;
241 theVector = std::vector<int>( pads_1C2, pads_1C2+6 );
242 fuseBoxPadMapOdd.insert( make_pair(
"1_A2", theVector) );
243 const int* pads_1C3 = pads_1A2;
244 theVector = std::vector<int>( pads_1C3, pads_1C3+6 );
245 fuseBoxPadMapOdd.insert( make_pair(
"1_A3", theVector) );
246 const int* pads_1D1 = pads_1B1;
247 theVector = std::vector<int>( pads_1D1, pads_1D1+ 9);
248 fuseBoxPadMapOdd.insert( make_pair(
"1_B1", theVector) );
249 const int* pads_1D2 = pads_1B3;
250 theVector = std::vector<int>( pads_1D2, pads_1D2+ 6);
251 fuseBoxPadMapOdd.insert( make_pair(
"1_B2", theVector) );
252 const int* pads_1D3 = pads_1B2;
253 theVector = std::vector<int>( pads_1D3, pads_1D3+ 6);
254 fuseBoxPadMapOdd.insert( make_pair(
"1_B3", theVector) );
255 const int* pads_2C1 = pads_2A1;
256 theVector = std::vector<int>( pads_2C1, pads_2C1+12);
257 fuseBoxPadMapOdd.insert( make_pair(
"2_A1", theVector) );
258 const int* pads_2C2 = pads_2A2;
259 theVector = std::vector<int>( pads_2C2, pads_2C2+11);
260 fuseBoxPadMapOdd.insert( make_pair(
"2_A2", theVector) );
261 const int* pads_2C3 = pads_2A3;
262 theVector = std::vector<int>( pads_2C3, pads_2C3+10);
263 fuseBoxPadMapOdd.insert( make_pair(
"2_A3", theVector) );
264 const int* pads_2D1 = pads_2B1;
265 theVector = std::vector<int>( pads_2D1, pads_2D1+10);
266 fuseBoxPadMapOdd.insert( make_pair(
"2_B1", theVector) );
267 const int* pads_2D2 = pads_2B2;
268 theVector = std::vector<int>( pads_2D2, pads_2D2+12);
269 fuseBoxPadMapOdd.insert( make_pair(
"2_B2", theVector) );
270 const int* pads_2D3 = pads_2B3;
271 theVector = std::vector<int>( pads_2D3, pads_2D3+10);
272 fuseBoxPadMapOdd.insert( make_pair(
"2_B3", theVector) );
273 const int* pads_3C1 = pads_3A2;
274 theVector = std::vector<int>( pads_3C1, pads_3C1+10);
275 fuseBoxPadMapOdd.insert( make_pair(
"3_A1", theVector) );
276 const int* pads_3C2 = pads_3A1;
277 theVector = std::vector<int>( pads_3C2, pads_3C2+10);
278 fuseBoxPadMapOdd.insert( make_pair(
"3_A2", theVector) );
279 const int* pads_3C3 = pads_3A4;
280 theVector = std::vector<int>( pads_3C3, pads_3C3+10);
281 fuseBoxPadMapOdd.insert( make_pair(
"3_A3", theVector) );
282 const int* pads_3C4 = pads_3A3;
283 theVector = std::vector<int>( pads_3C4, pads_3C4+10);
284 fuseBoxPadMapOdd.insert( make_pair(
"3_A4", theVector) );
285 const int* pads_3C5 = pads_3A5;
286 theVector = std::vector<int>( pads_3C5, pads_3C5+10);
287 fuseBoxPadMapOdd.insert( make_pair(
"3_A5", theVector) );
288 const int* pads_3D1 = pads_3B2;
289 theVector = std::vector<int>( pads_3D1, pads_3D1+10);
290 fuseBoxPadMapOdd.insert( make_pair(
"3_B1", theVector) );
291 const int* pads_3D2 = pads_3B1;
292 theVector = std::vector<int>( pads_3D2, pads_3D2+10);
293 fuseBoxPadMapOdd.insert( make_pair(
"3_B2", theVector) );
294 const int* pads_3D3 = pads_3B4;
295 theVector = std::vector<int>( pads_3D3, pads_3D3+10);
296 fuseBoxPadMapOdd.insert( make_pair(
"3_B3", theVector) );
297 const int* pads_3D4 = pads_3B3;
298 theVector = std::vector<int>( pads_3D4, pads_3D4+10);
299 fuseBoxPadMapOdd.insert( make_pair(
"3_B4", theVector) );
300 const int* pads_3D5 = pads_3B5;
301 theVector = std::vector<int>( pads_3D5, pads_3D5+10 );
302 fuseBoxPadMapOdd.insert( make_pair(
"3_B5", theVector) );
303 std::string chanName;
304 chanName.reserve(40);
306 for (
int sector = 0; sector < 32; ++sector ) {
308 int side = (sector+1)%2;
310 const auto & fuseBoxPadMap = (
side == 1)? fuseBoxPadMapOdd : fuseBoxPadMapEven;
312 for (
const auto& [fuseBoxName, padVec] : fuseBoxPadMap){
313 int module = fuseBoxName.front() -
'0' - 1;
315 for (
const auto & pad: padVec ) {
318 ATH_MSG_INFO(
"channel request for invalid barrel HV pad.");
320 chanName =
"HVB_S" +
std::to_string(sector+1) +
"_M" + fuseBoxName +
"_OutputVoltage";
328 ATH_MSG_INFO(
"TRT Barrel HV-line/pad map successfully built - "
332 if(!readBarrelHandle.range(
range)) {
333 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readBarrelHandle.key());
334 return StatusCode::FAILURE;
338 if ( DCSCondFolder ==
nullptr ) {
339 ATH_MSG_WARNING(
"Couldn't retrieve folder /TRT/DCS/HV/BARREL. Has it been loaded into IOVDbSvc?");
340 return StatusCode::FAILURE;
342 if ( DCSCondFolder->name_size() == 0 ) {
343 ATH_MSG_WARNING(
"CondAttrListCollection for folder /TRT/DCS/HV/BARREL is missing ");
344 return StatusCode::FAILURE;
350 for ( nameItr = DCSCondFolder->name_begin(); nameItr != DCSCondFolder->name_end(); ++nameItr ) {
351 int chanNum = (*nameItr).first;
352 std::string chanName = (*nameItr).second;