ATLAS Offline Software
TRTHWMapCondAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TRTHWMapCondAlg.h"
6 #include "CoralBase/AttributeListSpecification.h"
7 #include <memory>
8 
10  , ISvcLocator* pSvcLocator )
11  : ::AthAlgorithm(name,pSvcLocator)
12 {}
14 
16 {
17  // Read key
21 
22  // Register write handle
24 
25  return StatusCode::SUCCESS;
26 }
27 
29 {
30  ATH_MSG_DEBUG("execute " << name());
31 
32  // ____________ Construct Write Cond Handle and check its validity ____________
33 
35 
36  // Do we have a valid Write Cond Handle for current time?
37  if(writeHandle.isValid()) {
38  ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
39  << ". In theory this should not be called, but may happen"
40  << " if multiple concurrent events are being processed out of order.");
41 
42  return StatusCode::SUCCESS;
43  }
44 
45 
46 
47  // // ____________ Construct new Write Cond Object ____________
48 
49  std::unique_ptr<TRTCond::HWMap> writeCdo=std::make_unique<TRTCond::HWMap>();
50 
51  // ____________ Compute the Write Cond Object (HWMap) ____________
52 
53  EventIDRange rangeBarrel, rangeEndcap;
54 
55  if(StatusCode::SUCCESS != build_BarrelHVLinePadMaps(rangeBarrel, writeCdo.get() ) ) {
56  ATH_MSG_ERROR ("Problem filling barrel map.");
57  return StatusCode::FAILURE;
58  }
59  if(StatusCode::SUCCESS != build_EndcapHVLinePadMaps(rangeEndcap, writeCdo.get() ) ) {
60  ATH_MSG_ERROR ("Problem filling endcap map.");
61  return StatusCode::FAILURE;
62  }
63 
64  EventIDRange rangeW=EventIDRange::intersect(rangeBarrel,rangeEndcap);
65 
66  // Record CDO
67  if(writeHandle.record(rangeW,std::move(writeCdo)).isFailure()) {
68  ATH_MSG_ERROR("Could not record " << writeHandle.key()
69  << " with EventRange " << rangeW
70  << " into Conditions Store");
71  return StatusCode::FAILURE;
72  }
73 
74  return StatusCode::SUCCESS;
75 }
79 int TRTHWMapCondAlg::hashThisBarrelPad( int sector, int module, int padNum ) const{
80 
81  int hashedPad = -1;
82 
83  /*---------------------------------
84  * Pad counting details:
85  * 32 sectors ( expect sector in range(0,31) )
86  * 3 modules ( expect module in range(0,2) )
87  * 42 pads in type1 module ( expect padNum in range(1,42) )
88  * 65 pads in type2 module ( expect padNum in range(1,65) )
89  * 100 pads in type3 module ( expect padNum in range(1,100) )
90  */
91  padNum -= 1; // shift range down to (0,n-1)
92  const int nPadsPerSector = 42+65+100;
93 
94  int padOffset = -1;
95  switch( module ) {
96  case 0: padOffset = 0; break;
97  case 1: padOffset = 42; break;
98  case 2: padOffset = 42+65; break;
99  default:
100  ATH_MSG_ERROR("Couldn't hash this pad: "
101  << sector << "," << module << "," << padNum);
102  return -1;
103  }
104 
105  hashedPad = 0;
106  hashedPad += sector*nPadsPerSector;
107  hashedPad += padNum + padOffset;
108 
109  return hashedPad;
110 }
111 
115 int TRTHWMapCondAlg::hashThisEndcapCell( int sector, int wheel, int layer, int cellNum ) const{
116 
117  int hashedCell = -1;
118 
119  /*---------------------------------
120  * Cell counting details:
121  * 32 sectors ( expect sector in range(0,31) )
122  * 14 wheels ( expect wheel in range(0,13) )
123  * typeA: (0,5) wheelType = 0
124  * typeB: (6,13) wheelType = 1
125  * 4 4-plane layers in typeA ( expect layer in range(0,3) )
126  * 2 4-plane layers in typeB ( expect layer in range(0,1) )
127  * 3 cells per sector in one 4-plane wheel ( expect cell in range(0,2) )
128  */
129 
130  // Trick for counting
131  int wheelType = -1;
132  if ( wheel >= 0 && wheel < 6 ) wheelType = 0; // A wheel
133  if ( wheel >= 6 && wheel < 14 ) wheelType = 1; // B wheel
134  if ( wheelType == -1 ) {
135  ATH_MSG_ERROR("Invalid wheel number.");
136  return -1;
137  }
138 
139  const int nCellsPerSector = (6*4+8*2)*3; // 6 A-wheels + 8 B-wheels
140  int fourPlaneWheelNum;
141  if ( wheelType == 0 ) {
142  fourPlaneWheelNum = layer + 4*wheel; // 0-23
143  } else {
144  fourPlaneWheelNum = layer + 24 + 2*(wheel-6); // 24-39
145  }
146 
147  hashedCell = cellNum + 3*fourPlaneWheelNum + sector*nCellsPerSector;
148 
149  return hashedCell;
150 }
151 
152 
153 
155 {
156  ATH_MSG_DEBUG("finalize " << name());
157  return StatusCode::SUCCESS;
158 }
159 
164  StatusCode sc(StatusCode::SUCCESS);
165 
166  std::map< std::string, std::vector<int> > fuseBoxPadMapEven;
167  std::map< std::string, std::vector<int> > fuseBoxPadMapOdd;
168  std::vector<int> theVector;
169  // Even stacks (in HW numbering): Fuseboxes A & B
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) );
236  // Odd stacks (in HW numbering): Fuseboxes C & D
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);
305  // Loop through sectors
306  for ( int sector = 0; sector < 32; ++sector ) {
307  // Odd Stacks = Side A (1) Fusebox C & D, Even = Side C (0) Fusebox A & B
308  int side = (sector+1)%2;
309  // Pick the appropriate Fusebox/Pad map
310  const auto & fuseBoxPadMap = (side == 1)? fuseBoxPadMapOdd : fuseBoxPadMapEven;
311  // Loop through all fusebox lines in this stack
312  for (const auto& [fuseBoxName, padVec] : fuseBoxPadMap){
313  int module = fuseBoxName.front() - '0' - 1;
314  // Loop through pads
315  for ( const auto & pad: padVec ) {
316  int hashedPad = hashThisBarrelPad( sector, module, pad );
317  if ( hashedPad >= (int)writeCdo->get_Barrel_HV_Names()->size() || hashedPad<0) {
318  ATH_MSG_INFO("channel request for invalid barrel HV pad.");
319  } else {
320  chanName = "HVB_S" + std::to_string(sector+1) + "_M" + fuseBoxName + "_OutputVoltage";
321  writeCdo->setBarrelName(hashedPad,chanName);
322  }
323  }
324  }
325  }
326 
327 
328  ATH_MSG_INFO("TRT Barrel HV-line/pad map successfully built - "
329  << writeCdo->get_Barrel_HV_Names()->size() << " channels.");
330 
332  if(!readBarrelHandle.range(range)) {
333  ATH_MSG_ERROR("Failed to retrieve validity range for " << readBarrelHandle.key());
334  return StatusCode::FAILURE;
335  }
336 
337  const CondAttrListCollection* DCSCondFolder{*readBarrelHandle};
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;
341  }
342  if ( DCSCondFolder->name_size() == 0 ) {
343  ATH_MSG_WARNING("CondAttrListCollection for folder /TRT/DCS/HV/BARREL is missing ");
344  return StatusCode::FAILURE;
345  }
346 
347 
348  // Loop through the channel names.
350  for ( nameItr = DCSCondFolder->name_begin(); nameItr != DCSCondFolder->name_end(); ++nameItr ) {
351  int chanNum = (*nameItr).first;
352  std::string chanName = (*nameItr).second;
353  for ( int itr = 0; itr < (int)writeCdo->get_Barrel_HV_Names()->size(); ++itr ) {
354  if ( writeCdo->get_Barrel_HV_Names()->at(itr) == chanName ) writeCdo->setBarrelNum(itr , chanNum );
355  }
356  }
357 
358 
359  return sc;
360 }
361 
366  StatusCode sc(StatusCode::SUCCESS);
367 
368  // Loop through all possible pads
369 
370  // Loop through phi-sectors
371  for ( int sector = 0; sector < 32; ++sector ) {
372  // Loop through wheels (type A and B)
373  for ( int wheel = 0; wheel < 14; ++wheel ) {
374  // Loop through 4-plane layers in each wheel
375  int nLayers = -1;
376  if ( wheel >= 0 && wheel < 6 ) nLayers = 4;
377  if ( wheel >= 6 && wheel < 14 ) nLayers = 2;
378  for ( int layer = 0; layer < nLayers; ++layer ) {
379  // Construct the HV-line logical name for this cell (COOL style)
380  std::stringstream lineName;
381  // SectorPair
382  int sectorLeft = 0;
383  int sectorRight = 0;
384  if ( sector%2 == 0 ) {
385  sectorLeft = sector+1;
386  sectorRight = sector+2;
387  } else {
388  sectorLeft = sector;
389  sectorRight = sector+1;
390  }
391  lineName << "S" << sectorLeft << "S" << sectorRight << "_";
392  if ( sectorLeft%2 == 0 ) {
393  ATH_MSG_WARNING("Mistake in sector pairing!!!");
394  break;
395  }
396  // Wheel
397  if ( wheel >= 0 && wheel < 6 ) lineName << "WA" << (wheel+1) << "_";
398  else lineName << "WB" << (wheel-5) << "_";
399  // 4-plane layer
400  if ( wheel >= 0 && wheel < 6 ) {
401  if ( layer == 0 ) lineName << "1B";
402  if ( layer == 1 ) lineName << "1T";
403  if ( layer == 2 ) lineName << "2B";
404  if ( layer == 3 ) lineName << "2T";
405  } else {
406  if ( layer == 0 ) lineName << "B";
407  if ( layer == 1 ) lineName << "T";
408  }
409  lineName << "_OutputVoltage";
410  // Final names for ECA and ECC
411  std::stringstream lineNameA;
412  std::stringstream lineNameC;
413  lineNameA << "HVA_" << lineName.str();
414  lineNameC << "HVC_" << lineName.str();
415  // Add them to the maps
416  for ( int cellNum = 0; cellNum < 3; ++cellNum ) {
417  int hashedCell = hashThisEndcapCell( sector, wheel, layer, cellNum );
418  if ( hashedCell >= (int)writeCdo->get_EndcapA_HV_Names()->size() || hashedCell<0) {
419  ATH_MSG_WARNING("channel request for invalid endcap HV pad.");
420  }else{
421  writeCdo->setEndcapAName(hashedCell,lineNameA.str());
422  writeCdo->setEndcapCName(hashedCell,lineNameC.str());
423  }
424  }
425  }
426  }
427  }
428 
429  // Apply corrections to the map
430  int hashedCellToFix = hashThisEndcapCell( 5, 12, 0, 2 );
431  if ( hashedCellToFix >= (int)writeCdo->get_EndcapA_HV_Names()->size() || hashedCellToFix<0) {
432  ATH_MSG_WARNING("channel request for invalid endcap HV pad.");
433  }else{
434  writeCdo->setEndcapAName(hashedCellToFix, "HVA_S7S8_WB7_B_OutputVoltage");
435  }
436  ATH_MSG_INFO("Endcap HV-line/pad maps successfully built - ECA: "
437  << writeCdo->get_EndcapA_HV_Names()->size() << " channels; ECC: "
438  << writeCdo->get_EndcapC_HV_Names()->size() << " channels.");
439 
440 
441  // EndcapA
442 
443  // Get the CondAttrListCollection for Endcap A
444  EventIDRange rangeA;
446  if(!readEndAHandle.range(rangeA)) {
447  ATH_MSG_ERROR("Failed to retrieve validity range for " << readEndAHandle.key());
448  return StatusCode::FAILURE;
449  }
450 
451  const CondAttrListCollection* DCSCondFolder{*readEndAHandle};
452  if ( DCSCondFolder == nullptr ) {
453  ATH_MSG_WARNING("Couldn't retrieve folder /TRT/DCS/HV/ENDCAPA. Has it been loaded into IOVDbSvc?");
454  return StatusCode::FAILURE;
455  }
456  if ( DCSCondFolder->name_size() == 0 ) {
457  ATH_MSG_WARNING("CondAttrListCollection for folder /TRT/DCS/HV/ENDCAPA is missing");
458  return StatusCode::FAILURE;
459  }
460 
461  // Loop through the channel names.
463  for ( nameItr = DCSCondFolder->name_begin(); nameItr != DCSCondFolder->name_end(); ++nameItr ) {
464  int chanNum = (*nameItr).first;
465  std::string chanName = (*nameItr).second;
466  for ( int itr = 0; itr < (int)writeCdo->get_EndcapA_HV_Names()->size(); ++itr ) {
467  if ( writeCdo->get_EndcapA_HV_Names()->at(itr) == chanName ) writeCdo->setEndcapANum(itr , chanNum );
468  }
469  }
470 
471  // EndcapC
472 
473  // Get the CondAttrListCollection for Endcap C
474  EventIDRange rangeC;
476  const CondAttrListCollection* DCSCondFolder1{*readEndCHandle};
477  if(!readEndCHandle.range(rangeC)) {
478  ATH_MSG_ERROR("Failed to retrieve validity range for " << readEndCHandle.key());
479  return StatusCode::FAILURE;
480  }
481  if ( DCSCondFolder1 == nullptr ) {
482  ATH_MSG_WARNING("Couldn't retrieve folder /TRT/DCS/HV/ENDCAPC. Has it been loaded into IOVDbSvc?");
483  return StatusCode::FAILURE;
484  }
485  if ( DCSCondFolder1->name_size() == 0 ) {
486  ATH_MSG_WARNING("CondAttrListCollection for folder /TRT/DCS/HV/ENDCAPC is missing");
487  return StatusCode::FAILURE;
488  }
489 
490 
491  // Loop through the channel names.
492  for ( nameItr = DCSCondFolder1->name_begin(); nameItr != DCSCondFolder1->name_end(); ++nameItr ) {
493  int chanNum = (*nameItr).first;
494  std::string chanName = (*nameItr).second;
495  for ( int itr = 0; itr < (int)writeCdo->get_EndcapC_HV_Names()->size(); ++itr ) {
496  if ( writeCdo->get_EndcapC_HV_Names()->at(itr) == chanName ) writeCdo->setEndcapCNum(itr , chanNum );
497  }
498  }
499 
500  range=EventIDRange::intersect(rangeA,rangeC);
501  return sc;
502 }
503 
504 
TRTHWMapCondAlg::m_EndAReadKey
SG::ReadCondHandleKey< CondAttrListCollection > m_EndAReadKey
Definition: TRTHWMapCondAlg.h:34
TRTHWMapCondAlg::execute
virtual StatusCode execute() override
Definition: TRTHWMapCondAlg.cxx:28
TRTCond::HWMap::setBarrelNum
void setBarrelNum(int i, const int &channel_number)
Definition: HWMap.h:49
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TRTCond::HWMap::setEndcapCName
void setEndcapCName(int i, const std::string &name)
Definition: HWMap.h:45
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TRTHWMapCondAlg::m_BarrelReadKey
SG::ReadCondHandleKey< CondAttrListCollection > m_BarrelReadKey
Definition: TRTHWMapCondAlg.h:33
TRTHWMapCondAlg::m_WriteKey
SG::WriteCondHandleKey< TRTCond::HWMap > m_WriteKey
Definition: TRTHWMapCondAlg.h:36
TRTCond::HWMap::get_Barrel_HV_Names
const std::vector< std::string > * get_Barrel_HV_Names() const
Definition: HWMap.h:32
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TRTCond::HWMap
Definition: HWMap.h:12
TRT::Hit::side
@ side
Definition: HitInfo.h:83
TRTCond::HWMap::setEndcapANum
void setEndcapANum(int i, const int &channel_number)
Definition: HWMap.h:53
python.PyAthena.module
module
Definition: PyAthena.py:131
CondAttrListCollection::name_const_iterator
ChanNameMap::const_iterator name_const_iterator
Definition: CondAttrListCollection.h:69
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
TRTCond::HWMap::get_EndcapA_HV_Names
const std::vector< std::string > * get_EndcapA_HV_Names() const
Definition: HWMap.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TRTCond::HWMap::setEndcapCNum
void setEndcapCNum(int i, const int &channel_number)
Definition: HWMap.h:57
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TRTHWMapCondAlg::build_EndcapHVLinePadMaps
StatusCode build_EndcapHVLinePadMaps(EventIDRange &range, TRTCond::HWMap *writeCdo) const
Build HV-line/pad maps for Endcaps //.
Definition: TRTHWMapCondAlg.cxx:365
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TRTHWMapCondAlg::m_EndCReadKey
SG::ReadCondHandleKey< CondAttrListCollection > m_EndCReadKey
Definition: TRTHWMapCondAlg.h:35
AthAlgorithm
Definition: AthAlgorithm.h:47
TRTHWMapCondAlg::initialize
virtual StatusCode initialize() override
Definition: TRTHWMapCondAlg.cxx:15
TRTHWMapCondAlg::TRTHWMapCondAlg
TRTHWMapCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TRTHWMapCondAlg.cxx:9
TRTHWMapCondAlg::hashThisEndcapCell
int hashThisEndcapCell(int sector, int wheel, int layer, int cellNum) const
Hash an endcap HV cell by sector/wheel/layer/cell# //.
Definition: TRTHWMapCondAlg.cxx:115
TRTCond::HWMap::setEndcapAName
void setEndcapAName(int i, const std::string &name)
Definition: HWMap.h:42
TRTCond::HWMap::get_EndcapC_HV_Names
const std::vector< std::string > * get_EndcapC_HV_Names() const
Definition: HWMap.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TRTHWMapCondAlg::finalize
virtual StatusCode finalize() override
Definition: TRTHWMapCondAlg.cxx:154
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TRTHWMapCondAlg::hashThisBarrelPad
int hashThisBarrelPad(int sector, int module, int padNum) const
Hash an HV pad by sector/module/pad# //.
Definition: TRTHWMapCondAlg.cxx:79
TRTCond::HWMap::setBarrelName
void setBarrelName(int i, const std::string &name)
Definition: HWMap.h:39
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
Definition: GeoPrimitivesHelpers.h:347
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRTHWMapCondAlg::~TRTHWMapCondAlg
virtual ~TRTHWMapCondAlg() override
TRTHWMapCondAlg::build_BarrelHVLinePadMaps
StatusCode build_BarrelHVLinePadMaps(EventIDRange &range, TRTCond::HWMap *writeCdo) const
Build HV-line/pad map for Barrel //.
Definition: TRTHWMapCondAlg.cxx:163
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
TRTHWMapCondAlg.h