ATLAS Offline Software
Loading...
Searching...
No Matches
FixLArIdMap Class Reference

#include <FixLArIdMap.h>

Inheritance diagram for FixLArIdMap:
Collaboration diagram for FixLArIdMap:

Public Member Functions

 FixLArIdMap (const std::string &name, ISvcLocator *pSvcLocator)
 Author Hong Ma hma@b.nosp@m.nl.g.nosp@m.ov
virtual ~FixLArIdMap ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
StatusCode fix1 ()
StatusCode fix2 ()
StatusCode fix3 ()
StatusCode fix4 ()
StatusCode fix5 ()
StatusCode fix6 ()
StatusCode fix7 ()
StatusCode fix8 ()
StatusCode fix9 ()
StatusCode fix10 ()
StatusCode fix11 ()
StatusCode fix12 ()
void dumpId ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_fixFlag
bool m_dumpIds
std::string m_febToRodMap
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 13 of file FixLArIdMap.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FixLArIdMap()

FixLArIdMap::FixLArIdMap ( const std::string & name,
ISvcLocator * pSvcLocator )

Author Hong Ma hma@b.nosp@m.nl.g.nosp@m.ov

Purpose: read in the IdMap, apply fix to the same data object in DetStore, ready to be written out again as a new version.

This should be used with FixLArIdMap_jobOptions.py to write a new POOL file.

Implemented fixes:

  1. Flag = 1 Read in LArIdMap used prior to release 12, which used the id dictionary with slot=1-14 for FCAL. Fix the id map, so that the FCAL channels are mapped to id with slot = 1-7,9-15

    Barrel strips, eta=0, used to have no calibration line. This fix add back the calib line.

  2. Flag ==2 Incremental to Fix1 Corrections from Dominik:

Changes in ECC: FT3R Calib. ch : 2->60, 3->61 pn=-2, ft=7 FT3L Calib. ch : 68->124 ,69->125 pn=-2, ft=8 FT8L Calib. ch : 72->124, 73->125 pn=-2, ft=24

Changes in ECA: FT2L Calib. ch (slot CAL1): 0->108, 1->109 pn=3, ft=2 (CalibModule is in FT2L, but the signal channels are in FT2R,ft=2) FT9L Signal ch (ATI02, Slot L2): 122->124 pn=3, ft=16,slot=2 FT11L Calib. ch : 64->60, 65->61, 66->124, 67->125 pn=2, ft=20 FT13R Signal ch (ATI04, Slot FRT2): 88->64, 89->65, 90->66, 91->67, 92->68, 93->69, 94->70, 95->71 pn=2, ft=23,slot=4

  1. Flag ==3 Incremental to Fix2 Corrections from Dominik/Francesco/Cleland for EMEC inner wheel channel swapping on the baseplane

    FTs: 2L, 6L, 9L and 12L in endcap A and C

    Endcap A pn=3, ft=3,10,16,22 Endcap C pn=-3, ft=10,3,22,16

    Channels: 26<->28, 27<->29, 58<->60, 59<->61, 90<->92, 91<->93, 122<->124, 123<->125.

    except for pn=3,ft=16,slot=2, the swaping 122->124 is already done in fix2.

Fix4.  FCAL mapping change. 

For the C-side, old: OfflineID OnlineID [4.-3.-2.3.15.2] [4.4.1.0.6.14.95] disconnected [4.-3.-2.3.15.10] [4.4.1.0.6.15.95] disconnected [4.3.-2.3.15.5] [4.4.1.0.6.14.47] connected [4.3.-2.3.15.13] [4.4.1.0.6.15.47] connected

new: OfflineID OnlineID [4.3.-2.3.15.2] [4.4.1.0.6.14.95] connected [4.3.-2.3.15.10] [4.4.1.0.6.15.95] connected [4.-3.-2.3.15.5] [4.4.1.0.6.14.47] disconnected [4.-3.-2.3.15.13] [4.4.1.0.6.15.47] disconnected

For A-side old OfflineID OnlineID [4.-3.2.3.15.2] [4.4.1.1.6.14.47] disconnected [4.-3.2.3.15.10] [4.4.1.1.6.15.47] disconnected [4.3.2.3.15.5] [4.4.1.1.6.14.95] connected [4.3.2.3.15.13] [4.4.1.1.6.15.95] connected

new OfflineID OnlineID [4.3.2.3.15.2] [4.4.1.1.6.14.47] connected [4.3.2.3.15.10] [4.4.1.1.6.15.47] connected [4.-3.2.3.15.5] [4.4.1.1.6.14.95] disconnected [4.-3.2.3.15.13] [4.4.1.1.6.15.95] disconnected

  1. Flag ==5 FCAL Calibline change, according John Rutherfoord.

pulser channels 0 to 31 and channels 64 to 95 are pair-wise swapped in the FEB channels they feed while pulser channels 32 to 63 and 96 to 127 are pulsing the corresponding FEB channels, as expected.

Flag==6 here is the summary of mapping errors in HEC, found from the newest commissioning data (with good patterns). There are basically three errors, two on single module, one which affects all 8 modules in HEC quadrant:

1. Feb slot | Feb ch. | Present calib. line || Correct calib line

9 | 100 | 55 || 56 9 | 101 | 54, 55 || 55, 56

2. Feb slot | Feb ch. | Present calib. line || Correct calib line

10 | 100 | 119 || 120 10 | 101 | 118, 119 || 119, 120

3. Feb slot | Feb ch. | Present calib. line || Correct calib line

7 | 36 | 13 || 12 7 | 37 | 13, 14 || 11, 12 7 | 38 | 3 || 5

7 | 39 | 3 || 5

7 | 44 | 29 || 28 7 | 45 | 29, 30 || 27, 28 7 | 46 | 19 || 21

7 | 47 | 19 || 21

7 | 100 | 45 || 44 7 | 101 | 45, 46 || 43, 44 7 | 102 | 35 || 37

7 | 103 | 35 || 37

7 | 108 | 61 || 60 7 | 109 | 61, 62 || 59, 60 7 | 110 | 51 || 53

7 | 111 | 51 || 53

8 | 36 | 77 || 76 8 | 37 | 77, 78 || 75, 76 8 | 38 | 67 || 69

8 | 39 | 67 || 69

8 | 44 | 93 || 92 8 | 45 | 93, 94 || 91, 92 8 | 46 | 83 || 85

8 | 47 | 83 || 85

8 | 100 | 109 || 108 8 | 101 | 109, 110 || 107, 108 8 | 102 | 99 || 101

8 | 103 | 99 || 101

8 | 108 | 125 || 124 8 | 109 | 125, 126 || 123, 124 8 | 110 | 115 || 117

8 | 111 | 115 || 117

Fix 7. Remap FCAL online and offline id. read both connected and disconnected channels from FCal-online-map-disc.txt

Fix 8. Import the FEB to ROD map

Fix 9. Fix barrel cabling (Julien Labbe)

Fix 10: HEC FEB fiber cable Swap (Emanuel Rauter)

Fix 11: EMEC-C FEB fiber cable swap

Fix 12: EMEC-A FEB fiber cable swap

Definition at line 195 of file FixLArIdMap.cxx.

195 :
196 AthAlgorithm(name,pSvcLocator) ,m_fixFlag(0), m_dumpIds(false)
197{
198
199 declareProperty("FixFlag", m_fixFlag);
200 declareProperty("FEBtoRODMap", m_febToRodMap);
201 declareProperty("DumpIds", m_dumpIds);
202
203 //std::cout<<" In FixLArIdMap constructor"<<std::endl;
204}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_febToRodMap
Definition FixLArIdMap.h:41

◆ ~FixLArIdMap()

FixLArIdMap::~FixLArIdMap ( )
virtual

Definition at line 206 of file FixLArIdMap.cxx.

207{ }

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ dumpId()

void FixLArIdMap::dumpId ( )

Definition at line 265 of file FixLArIdMap.cxx.

266{
267 // Fix the FCal Map.
268 // The jobs should be run with LAr IdDict for the new Identifier
269 // definition, i.e., No slot=8 for FCAL (1-7, 9-15).
270
271 // fix calibLine for Strip eta=0 in barrel
272
273 // LArOnOffIdMap
274 const LArOnOffIdMap * onOffIdMap_c;
275 sc=detStore()->retrieve(onOffIdMap_c);
276 if(sc!=StatusCode::SUCCESS){
277 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
278 // return sc;
279 }
280 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
281
282 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
283
284 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
285
286
287 VONOFF::const_iterator it = onOffId_P->m_v.begin();
288 VONOFF::const_iterator it_e = onOffId_P->m_v.end();
289
290 ATH_MSG_DEBUG(" Dump of OnOffIdMap" );
291 ATH_MSG_DEBUG(" Persistent LArOnOffId_P version = "<<onOffId_P->m_version );
292 for (; it!=it_e;++it)
293 {
294 const LArOnOffId_P::LArOnOffId_P_t& t = *it;
295 ATH_MSG_DEBUG(" det="<<t.det
296 <<" pn="<<t.pn
297 <<" sample="<<t.sample
298 <<" region="<<t.region
299 <<" eta="<<t.eta
300 <<" phi="<<t.phi
301 <<" ft="<<t.ft_num
302 <<" slot="<<t.feb_slot
303 <<" chan="<<t.feb_chan
304 <<" calib_slot="<<t.calib_slot
305 <<" calib_line="<<t.calib_line );
306 }
307
308
309 // LArFebRodMap
310
311 const LArFebRodMap * febRodMap_c;
312 sc=detStore->retrieve(febRodMap_c);
313 if(sc!=StatusCode::SUCCESS){
314 ATH_MSG_ERROR(" Can not find LArFebRodMap" );
315 // return sc;
316 }
317
318 LArFebRodMap* febRodMap=const_cast<LArFebRodMap*>(febRodMap_c);
319
320 LArFebRod_P* febRod_P = febRodMap->getP();
321
322 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
323
324
325 VFEBROD::const_iterator it2 = febRod_P->m_v.begin();
326 VFEBROD::const_iterator it2_e = febRod_P->m_v.end();
327
328 ATH_MSG_DEBUG(" Dump of LArFebRodMap" );
329 ATH_MSG_DEBUG(" Persistent LArFebRod_P version = "<< febRod_P->m_version );
330
331 for (; it2!=it2_e;++it2)
332 {
333 const LArFebRod_P::LArFebRod_P_t& t = *it2;
334 ATH_MSG_DEBUG(" hashid="<<t.hashid
335 <<" det="<<t.det
336 <<" rosfrag="<<t.rosfrag
337 <<" robfrag="<<t.robfrag
338 <<" rodfrag="<<t.rodfrag
339 <<" rodcrate="<<t.rodcrate
340 <<" rodslot="<<t.rodslot
341 <<" ft_det="<<t.ft_det
342 <<" ft_pn="<<t.ft_pn
343 <<" ft_num="<<t.ft_num
344 <<" ft_slot="<<t.ft_slot );
345 }
346
347 return;
348
349}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode FixLArIdMap::execute ( )

Definition at line 213 of file FixLArIdMap.cxx.

214{
215 ATH_MSG_DEBUG(" in execute, fix = "<<m_fixFlag );
216 return StatusCode::SUCCESS;
217}

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode FixLArIdMap::finalize ( )

Definition at line 219 of file FixLArIdMap.cxx.

220{
221 ATH_MSG_INFO(" in finalize, fix = "<<m_fixFlag );
222
223 if(m_dumpIds) dumpId();
224
225 if(m_fixFlag==1)
226 return fix1();
227
228 if(m_fixFlag==2)
229 return fix2();
230
231 if(m_fixFlag==3)
232 return fix3();
233
234 if(m_fixFlag==4)
235 return fix4();
236
237 if(m_fixFlag==5)
238 return fix5();
239
240 if(m_fixFlag==6)
241 return fix6();
242
243 if(m_fixFlag==7)
244 return fix7();
245
246 if(m_fixFlag==8)
247 return fix8();
248
249 if(m_fixFlag==9)
250 return fix9();
251
252 if(m_fixFlag==10)
253 return fix10();
254
255 if(m_fixFlag==11)
256 return fix11();
257
258 if(m_fixFlag==12)
259 return fix12();
260
261 return StatusCode::SUCCESS;
262
263}
#define ATH_MSG_INFO(x)
StatusCode fix6()
StatusCode fix3()
StatusCode fix5()
StatusCode fix10()
StatusCode fix9()
StatusCode fix7()
StatusCode fix4()
StatusCode fix8()
StatusCode fix1()
StatusCode fix11()
StatusCode fix12()
StatusCode fix2()

◆ fix1()

StatusCode FixLArIdMap::fix1 ( )

Definition at line 351 of file FixLArIdMap.cxx.

351 {
352
353
354 // Fix the FCal Map.
355 // The jobs should be run with LAr IdDict for the new Identifier
356 // definition, i.e., No slot=8 for FCAL (1-7, 9-15).
357
358 // fix calibLine for Strip eta=0 in barrel
359
360/*
361 // retrieve LArOnlineID
362 LArOnlineID* onlineID;
363 sc = detStore()->retrieve(onlineID);
364 if (sc.isFailure()) {
365 log << MSG::ERROR
366 << "Unable to retrieve pointer to LArOnlineID "
367 << endmsg;
368 return sc;
369 }
370 log << MSG::DEBUG << "Retrieved LArOnlineID" << endmsg;
371
372 // retrieve DetDescrManager and LArCablingService
373 IToolSvc* toolSvc;
374 if( service("ToolSvc", toolSvc) != StatusCode::SUCCESS){
375 log<< MSG::ERROR <<" Failed to get ToolSvc" <<endmsg;
376 // return StatusCode::FAILURE ;
377 return;
378 }
379
380
381 if(StatusCode::SUCCESS != toolSvc->retrieveTool("LArCablingService",m_cablingSvc) ) {
382 log<< MSG::ERROR <<" Failed to get LArCablingService" <<endmsg;
383 // return StatusCode::FAILURE ;
384 return;
385 }
386*/
387
388 // LArOnOffIdMap
389 const LArOnOffIdMap * onOffIdMap_c;
390 sc=detStore()->retrieve(onOffIdMap_c);
391 if(sc!=StatusCode::SUCCESS){
392 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
393 // return sc;
394 }
395 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
396
397 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
398
399 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
400
401
402 if( onOffId_P->m_version!=0){
403 ATH_MSG_ERROR(" The FCAL Fix should only be done toversion=0" );
404 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
405 return StatusCode::FAILURE;
406 }
407
408 VONOFF::iterator it = onOffId_P->m_v.begin();
409 VONOFF::iterator it_e = onOffId_P->m_v.end();
410
411 // set the version to 1.
412 onOffId_P->m_version = 1 ;
413 for (; it!=it_e;++it)
414 {
415 LArOnOffId_P::LArOnOffId_P_t& t = *it;
416 if( t.det == 2 // FCAL connected channels
417 || t.det == 7 // FCAL disconnected channels
418 ){
419 unsigned int feb = t.feb_slot ;
420 if(feb>=8) {
421 ATH_MSG_INFO(" Fixing this FCAL channel, before and after" );
422
423 ATH_MSG_DEBUG(" det="<<t.det
424 <<" pn="<<t.pn
425 <<" sample="<<t.sample
426 <<" region="<<t.region
427 <<" eta="<<t.eta
428 <<" phi="<<t.phi
429 <<" ft="<<t.ft_num
430 <<" slot="<<t.feb_slot
431 <<" chan="<<t.feb_chan
432 <<" calib_slot="<<t.calib_slot
433 <<" calib_line="<<t.calib_line );
434
435 // The fix. shift it by one.
436 t.feb_slot=t.feb_slot+1;
437
438 ATH_MSG_DEBUG(" det="<<t.det
439 <<" pn="<<t.pn
440 <<" sample="<<t.sample
441 <<" region="<<t.region
442 <<" eta="<<t.eta
443 <<" phi="<<t.phi
444 <<" ft="<<t.ft_num
445 <<" slot="<<t.feb_slot
446 <<" chan="<<t.feb_chan
447 <<" calib_slot="<<t.calib_slot
448 <<" calib_line="<<t.calib_line );
449
450 }
451 } // FCAL
452
453 if( t.det==9 && abs(t.pn)==1 && t.sample==1 && t.region==0 && t.eta==0 ) {
454
455 ATH_MSG_INFO(" Fixing this Barrel Strip channel, before and after" );
456
457 ATH_MSG_DEBUG(" det="<<t.det
458 <<" pn="<<t.pn
459 <<" sample="<<t.sample
460 <<" region="<<t.region
461 <<" eta="<<t.eta
462 <<" phi="<<t.phi
463 <<" ft="<<t.ft_num
464 <<" slot="<<t.feb_slot
465 <<" chan="<<t.feb_chan
466 <<" calib_slot="<<t.calib_slot
467 <<" calib_line="<<t.calib_line );
468
469 // this disconnected channel is pulsed .
470 t.calib_slot=15;
471 t.calib_line=0;
472
473 ATH_MSG_DEBUG(" det="<<t.det
474 <<" pn="<<t.pn
475 <<" sample="<<t.sample
476 <<" region="<<t.region
477 <<" eta="<<t.eta
478 <<" phi="<<t.phi
479 <<" ft="<<t.ft_num
480 <<" slot="<<t.feb_slot
481 <<" chan="<<t.feb_chan
482 <<" calib_slot="<<t.calib_slot
483 <<" calib_line="<<t.calib_line );
484
485 } // barrel strip
486
487
488 } // channel loop
489
490
491 // LArFebRodMap
492 const LArFebRodMap * febRodMap_c;
493 sc=detStore()->retrieve(febRodMap_c);
494 if(sc!=StatusCode::SUCCESS){
495 ATH_MSG_ERROR(" Can not find LArFebRodMap" );
496 // return sc;
497 }
498
499 LArFebRodMap* febRodMap=const_cast<LArFebRodMap*>(febRodMap_c);
500
501 LArFebRod_P* febRod_P = febRodMap->getP();
502
503 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
504
505 VFEBROD::iterator it2 = febRod_P->m_v.begin();
506 VFEBROD::iterator it2_e = febRod_P->m_v.end();
507
508 if(febRod_P->m_version!=0){
509
510 ATH_MSG_ERROR(" wrong Persistent LArFebRod_P version = "<< febRod_P->m_version );
511 ATH_MSG_ERROR(" this fix should only fix version 0 " );
512 return StatusCode::FAILURE;
513 }
514
515
516 // increment the version
517 febRod_P->m_version = 1;
518
519 for (; it2!=it2_e;++it2)
520 {
521 LArFebRod_P::LArFebRod_P_t& t = *it2;
522
523 if( (t.det ==71 || t.det ==72 ) && t.ft_slot>=8 )
524 {
525
526 ATH_MSG_INFO( " Fixing FEB slot number, before and after " );
527
528 ATH_MSG_DEBUG(" hashid="<<t.hashid
529 <<" det="<<t.det
530 <<" rosfrag="<<t.rosfrag
531 <<" robfrag="<<t.robfrag
532 <<" rodfrag="<<t.rodfrag
533 <<" rodcrate="<<t.rodcrate
534 <<" rodslot="<<t.rodslot
535 <<" ft_det="<<t.ft_det
536 <<" ft_pn="<<t.ft_pn
537 <<" ft_num="<<t.ft_num
538 <<" ft_slot="<<t.ft_slot );
539
540 t.ft_slot=t.ft_slot+1;
541 ATH_MSG_DEBUG(" hashid="<<t.hashid
542 <<" det="<<t.det
543 <<" rosfrag="<<t.rosfrag
544 <<" robfrag="<<t.robfrag
545 <<" rodfrag="<<t.rodfrag
546 <<" rodcrate="<<t.rodcrate
547 <<" rodslot="<<t.rodslot
548 <<" ft_det="<<t.ft_det
549 <<" ft_pn="<<t.ft_pn
550 <<" ft_num="<<t.ft_num
551 <<" ft_slot="<<t.ft_slot );
552 }
553
554 }
555
556
557
558 return StatusCode::SUCCESS;
559}

◆ fix10()

StatusCode FixLArIdMap::fix10 ( )

Definition at line 1643 of file FixLArIdMap.cxx.

1644{
1645 // Fix HEC FEB Swapping run 0-56450
1646
1647 ATH_MSG_INFO(" In fix10() HEC-C Cabling Fix" );
1648
1649 // LArOnOffIdMap
1650 const LArOnOffIdMap * onOffIdMap_c = nullptr;
1651 ATH_CHECK( detStore()->retrieve(onOffIdMap_c) );
1652
1653 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1654
1655 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1656
1657
1658 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1659
1660 ATH_MSG_INFO(" LArOnOffIdMap version "<<onOffId_P->m_version );
1661
1662 if( onOffId_P->m_version!=8){
1663 ATH_MSG_ERROR(" This should only fix map with version 8" );
1664 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1665 return StatusCode::FAILURE;
1666 }
1667
1668 // set the version to .
1669 onOffId_P->m_version = 9 ;
1670
1671 /*
1672 VONOFF::iterator it = onOffId_P->m_v.begin();
1673 VONOFF::iterator it_e = onOffId_P->m_v.end();
1674
1675
1676 typedef std::map<unsigned short,LArOnOffId_P> MAPCHAN;
1677 typedef std::map<unsigned short,MAPCHAN> MAPFEB;
1678 typedef std::map<unsigned short,MAPFEB> MAPFT;
1679
1680 MAPFT map_ft ;
1681
1682 int n = 0;
1683 for (; it!=it_e;++it)
1684 {
1685 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1686
1687
1688 if( t.det == 1 || t.det==8 ) // HEC
1689 {
1690 if( t.pn== -2 ) // HEC-C
1691 {
1692 ++n ;
1693 map_ft[t.ft_num][t.feb_slot][t.feb_chan]=t ;
1694 }
1695
1696 }
1697 }
1698
1699 log<<MSG::INFO<" number of HEC-C channels"<<n<<endmsg;
1700
1701 */
1702 std::map<int,int> nfixes ;
1703
1704 VONOFF::iterator it = onOffId_P->m_v.begin();
1705 VONOFF::iterator it_e = onOffId_P->m_v.end();
1706
1707 for (; it!=it_e;++it)
1708 {
1709 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1710
1711 if( t.det == 1 || t.det==8 ) // HEC
1712 {
1713 if( t.pn== -2 ) // HEC-C
1714 {
1715 if( t.ft_num== 3 || t.ft_num== 10 || t.ft_num== 16 || t.ft_num== 22 )
1716 {
1717 unsigned short islot = 100;
1718 if (t.feb_slot==5) islot=6;
1719 else if(t.feb_slot==6) islot=5;
1720 else if(t.feb_slot==7) islot=8;
1721 else if(t.feb_slot==8) islot=7;
1722 else if(t.feb_slot==9) islot=10;
1723 else if(t.feb_slot==10) islot=9;
1724
1725 if(islot!=100){
1726 t.feb_slot = islot ;
1727 nfixes[islot] +=1 ;
1728 }
1729
1730 }
1731
1732 }
1733 }
1734 }
1735
1736 std::map<int,int>::const_iterator map_it=nfixes.begin();
1737 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1738 for (;map_it!=map_it_e;++map_it){
1739 log<<" slot and nfixes "<<(*map_it).first<<" " <<(*map_it).second <<endmsg;
1740 }
1741
1742 return StatusCode::SUCCESS;
1743
1744}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ fix11()

StatusCode FixLArIdMap::fix11 ( )

Definition at line 1746 of file FixLArIdMap.cxx.

1747{
1748 // Fix EMEC-C Cabling
1749
1750 ATH_MSG_INFO(" In fix11() EMEC Cabling Fix" );
1751
1752 // LArOnOffIdMap
1753 const LArOnOffIdMap * onOffIdMap_c = nullptr;
1754 ATH_CHECK( detStore->retrieve(onOffIdMap_c) );
1755
1756 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1757
1758 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1759
1760 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1761
1762 log<<MSG::INFO<<" LArOnOffIdMap version "<<onOffId_P->m_version<< endmsg;
1763
1764 if( onOffId_P->m_version!=9){
1765 ATH_MSG_ERROR(" This should only fix map with version 9" );
1766 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1767 return StatusCode::FAILURE;
1768 }
1769
1770
1771 VONOFF::iterator it = onOffId_P->m_v.begin();
1772 VONOFF::iterator it_e = onOffId_P->m_v.end();
1773
1774 // set the version to .
1775 onOffId_P->m_version = 10 ;
1776 std::map<int,int> nfixes ;
1777
1778 for (; it!=it_e;++it)
1779 {
1780 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1781
1782 if( t.det == 0 || t.det==9 ) // EM
1783 {
1784 if( t.pn== -2 ) // EMEC-C
1785 {
1786 if( t.ft_num== 21 )
1787 {
1788 unsigned short islot = 100;
1789 if (t.feb_slot==5) islot=8;
1790 else if(t.feb_slot==8) islot=5;
1791
1792 if(islot!=100){
1793 t.feb_slot = islot ;
1794 nfixes[islot] +=1 ;
1795 }
1796
1797 }
1798
1799 }
1800 }
1801 }
1802
1803 std::map<int,int>::const_iterator map_it=nfixes.begin();
1804 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1805 for (;map_it!=map_it_e;++map_it){
1806 ATH_MSG_VERBOSE(" slot and nfixes "<<(*map_it).first<<" "<< (*map_it).second );
1807 }
1808
1809
1810 // Fix FEB ROD map
1811
1812 // LArFebRodMap
1813 const LArFebRodMap * febRodMap_c = nullptr;
1814 sc=detStore->retrieve(febRodMap_c);
1815 if(sc!=StatusCode::SUCCESS){
1816 ATH_MSG_ERROR(" Can not find LArFebRodMap" );
1817 // return sc;
1818 }
1819
1820 LArFebRodMap* febRodMap=const_cast<LArFebRodMap*>(febRodMap_c);
1821
1822 LArFebRod_P* febRod_P = febRodMap->getP();
1823
1824 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
1825
1826 VFEBROD::iterator it2 = febRod_P->m_v.begin();
1827 VFEBROD::iterator it2_e = febRod_P->m_v.end();
1828
1829 if(febRod_P->m_version!=2){
1830
1831 ATH_MSG_ERROR(" wrong Persistent LArFebRod_P version = "<< febRod_P->m_version );
1832 ATH_MSG_ERROR(" this fix should only fix version 2 " );
1833 return StatusCode::FAILURE;
1834 }
1835
1836
1837 // increment the version
1838 febRod_P->m_version = 3;
1839
1840 int nfix = 0;
1841 for (; it2!=it2_e;++it2)
1842 {
1843 LArFebRod_P::LArFebRod_P_t& t = *it2;
1844
1845 bool fixed = false ;
1846 if( t.det ==68 && t.ft_det==1 && t.ft_pn==0 && t.ft_num==21 && t.ft_slot==5 )
1847 {
1848 fixed=true;
1849 t.ft_slot=8;
1850 }else
1851 if( t.det ==68 && t.ft_det==1 && t.ft_pn==0 && t.ft_num==21 && t.ft_slot==8 )
1852 {
1853 fixed=true;
1854 t.ft_slot=5;
1855 }
1856 ATH_MSG_INFO( " Fixing FEB slot number, before and after " );
1857
1858 if(fixed) {
1859 ++nfix;
1860 ATH_MSG_DEBUG(" fixed: hashid="<<t.hashid
1861 <<" det="<<t.det
1862 <<" rosfrag="<<t.rosfrag
1863 <<" robfrag="<<t.robfrag
1864 <<" rodfrag="<<t.rodfrag
1865 <<" rodcrate="<<t.rodcrate
1866 <<" rodslot="<<t.rodslot
1867 <<" ft_det="<<t.ft_det
1868 <<" ft_pn="<<t.ft_pn
1869 <<" ft_num="<<t.ft_num
1870 <<" ft_slot="<<t.ft_slot );
1871
1872 }
1873
1874 }
1875
1876 return StatusCode::SUCCESS;
1877}
#define ATH_MSG_VERBOSE(x)

◆ fix12()

StatusCode FixLArIdMap::fix12 ( )

Definition at line 1879 of file FixLArIdMap.cxx.

1880{
1881 // Fix EMEC-A Cabling
1882
1883 ATH_MSG_INFO(" In fix12() EMEC Cabling Fix" );
1884
1885 // LArOnOffIdMap
1886 const LArOnOffIdMap * onOffIdMap_c = nullptr;
1887 ATH_CHECK( detStore()->retrieve(onOffIdMap_c) );
1888
1889 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1890
1891 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1892
1893 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1894
1895 ATH_MSG_INFO(" LArOnOffIdMap version "<<onOffId_P->m_version );
1896 if( onOffId_P->m_version!=10){
1897 ATH_MSG_ERROR(" This should only fix map with version 10" );
1898 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1899 return StatusCode::FAILURE;
1900 }
1901
1902
1903 VONOFF::iterator it = onOffId_P->m_v.begin();
1904 VONOFF::iterator it_e = onOffId_P->m_v.end();
1905
1906 // set the version to .
1907 onOffId_P->m_version = 11 ;
1908 std::map<int,int> nfixes ;
1909
1910 for (; it!=it_e;++it)
1911 {
1912 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1913
1914 if( t.det == 0 || t.det==9 ) // EM
1915 {
1916 if( t.pn== 2 ) // EMEC-A
1917 {
1918 if( t.ft_num== 9 )
1919 {
1920 unsigned short islot = 100;
1921 if (t.feb_slot==7) islot=8;
1922 else if(t.feb_slot==8) islot=7;
1923
1924 if(islot!=100){
1925 t.feb_slot = islot ;
1926 nfixes[islot] +=1 ;
1927 }
1928
1929 }
1930
1931 }
1932 }
1933 }
1934
1935 std::map<int,int>::const_iterator map_it=nfixes.begin();
1936 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1937 for (;map_it!=map_it_e;++map_it){
1938 ATH_MSG_VERBOSE(" slot and nfixes "<<(*map_it).first<<" "<< (*map_it).second );
1939 }
1940
1941 return StatusCode::SUCCESS;
1942
1943}

◆ fix2()

StatusCode FixLArIdMap::fix2 ( )

Definition at line 564 of file FixLArIdMap.cxx.

564 {
565 // Fix the EMEC mapping
566 // both calibration channel, and signal.
567
568/*
569 // retrieve LArOnlineID
570 LArOnlineID* onlineID;
571 sc = detStore()->retrieve(onlineID);
572 if (sc.isFailure()) {
573 log << MSG::ERROR
574 << "Unable to retrieve pointer to LArOnlineID "
575 << endmsg;
576 return sc;
577 }
578 log << MSG::DEBUG << "Retrieved LArOnlineID" << endmsg;
579
580 // retrieve DetDescrManager and LArCablingService
581 IToolSvc* toolSvc;
582 if( service("ToolSvc", toolSvc) != StatusCode::SUCCESS){
583 log<< MSG::ERROR <<" Failed to get ToolSvc" <<endmsg;
584 // return StatusCode::FAILURE ;
585 return;
586 }
587
588
589 if(StatusCode::SUCCESS != toolSvc->retrieveTool("LArCablingService",m_cablingSvc) ) {
590 log<< MSG::ERROR <<" Failed to get LArCablingService" <<endmsg;
591 // return StatusCode::FAILURE ;
592 return;
593 }
594*/
595
596 // LArOnOffIdMap
597 const LArOnOffIdMap * onOffIdMap_c;
598 sc=detStore()->retrieve(onOffIdMap_c);
599 std::vector<int> nfixes;
600 nfixes.resize(30,0);
601
602 if(sc!=StatusCode::SUCCESS){
603 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
604 // return sc;
605 }
606 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
607
608 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
609
610 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
611
612
613 if( onOffId_P->m_version!=1){
614 ATH_MSG_ERROR(" This should only fix map with version=1" );
615 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
616 return StatusCode::FAILURE;
617 }
618
619 VONOFF::iterator it = onOffId_P->m_v.begin();
620 VONOFF::iterator it_e = onOffId_P->m_v.end();
621
622 // set the version to 2.
623 onOffId_P->m_version = 2 ;
624 for (; it!=it_e;++it)
625 {
626 LArOnOffId_P::LArOnOffId_P_t& t = *it;
627 int ifix = 0;
628 if( t.det == 0 ) // for EM (emec, actually)
629 {
630 if(t.pn==-2 || t.pn==-3) // Endcap-C
631 {
632// FT3R Calib. ch : 2->60, 3->61 pn=-2, ft=7
633// FT3L Calib. ch : 68->124 ,69->125 pn=-2, ft=8
634// FT8L Calib. ch : 72->124, 73->125 pn=-2, ft=24
635 if(t.ft_num==7){
636 if( t.calib_line==2) {
637 t.calib_line=60;
638 ifix = 1;
639 }
640 if( t.calib_line==3) {
641 t.calib_line=61;
642 ifix = 2;
643 }
644 }
645 if(t.ft_num==8){
646 if( t.calib_line==68){
647 t.calib_line=124;
648 ifix = 3;
649 }
650 if( t.calib_line==69) {
651 t.calib_line=125;
652 ifix=4;
653 }
654
655 }
656 if(t.ft_num==24){
657 if( t.calib_line==72) {
658 t.calib_line=124;
659 ifix = 5;
660 }
661
662 if( t.calib_line==73) {
663 t.calib_line=125;
664 ifix = 6;
665 }
666 }
667
668 }
669
670 if(t.pn==2 || t.pn==3 ) // Endcap-A
671 {
672// FT2L Calib. ch (slot CAL1): 0->108, 1->109 pn=2, ft=2
673// (CalibModule is in FT2L, but the signal channels are in FT2R)
674// FT9L Signal ch (ATI02, Slot L2): 122->124 pn=2, ft=16,slot=2
675// FT11L Calib. ch : 64->60, 65->61, 66->124, 67->125 pn=2, ft=20
676// FT13R Signal ch (ATI04, Slot FRT2): 88->64, 89->65, 90->66, 91->67,
677// 92->68, 93->69, 94->70, 95->71 pn=2, ft=23,slot=4
678
679// calib line fix
680 if(t.ft_num==2){
681 if( t.calib_slot==4 && t.calib_line==0) {
682 t.calib_line=108;
683 ifix = 7;
684 }
685 if( t.calib_slot==4 && t.calib_line==1) {
686 t.calib_line=109;
687 ifix = 8;
688 }
689 }
690
691
692 if(t.ft_num==20){
693 if( t.calib_line==64) {
694 t.calib_line=60;
695 ifix = 9;
696 }
697 if( t.calib_line==65) {
698 t.calib_line=61;
699 ifix = 10;
700 }
701 if( t.calib_line==66) {
702 t.calib_line=124;
703 ifix = 11;
704 }
705 if( t.calib_line==67) {
706 t.calib_line=125;
707 ifix = 12;
708 }
709 }
710
711// signal channel
712
713 if(t.ft_num==16 && t.feb_slot==2){
714 if(t.feb_chan==122){
715 t.feb_chan=124 ;
716 ifix = 13;
717 }
718 }
719
720 if(t.ft_num==23 && t.feb_slot==4){
721 if(t.feb_chan>=64 && t.feb_chan<=71){
722 // 64-->88, etc
723 ifix = 14+ (t.feb_chan-64) ;
724 t.feb_chan= t.feb_chan+24 ;
725 }
726 }
727
728 }
729 } //
730
731 // disconnected channel
732 if( t.det == 9 ) // for EM disconnected (emec, actually)
733 {
734
735 if(t.pn==2 || t.pn==3) // Endcap-C
736 {
737 if(t.ft_num==16 && t.feb_slot==2){
738 if(t.feb_chan==124){
739 t.feb_chan=122 ;
740 ifix = 22;
741 }
742 }
743 if(t.ft_num==23 && t.feb_slot==4){
744 if(t.feb_chan>=88 && t.feb_chan<=95){
745 // 64-->88, etc
746 ifix = 23+ (t.feb_chan-88) ;
747 t.feb_chan= t.feb_chan-24 ;
748 }
749 }
750 }
751
752 }
753
754 if(ifix != 0) {
755 nfixes[ifix-1] +=1;
756
757 ATH_MSG_INFO(" Fix number " << ifix );
758
759 ATH_MSG_DEBUG(" det="<<t.det
760 <<" pn="<<t.pn
761 <<" sample="<<t.sample
762 <<" region="<<t.region
763 <<" eta="<<t.eta
764 <<" phi="<<t.phi
765 <<" ft="<<t.ft_num
766 <<" slot="<<t.feb_slot
767 <<" chan="<<t.feb_chan
768 <<" calib_slot="<<t.calib_slot
769 <<" calib_line="<<t.calib_line );
770 }
771
772
773 } // channel loop
774
775
776 for(unsigned int i=0;i<30;++i){
777 ATH_MSG_INFO( nfixes[i] << " fixes for " << i+1 );
778 }
779
780 return StatusCode::SUCCESS;
781}

◆ fix3()

StatusCode FixLArIdMap::fix3 ( )

Definition at line 783 of file FixLArIdMap.cxx.

783 {
784
785 // Fix the EMEC inner wheel channel swapping
786
787 // LArOnOffIdMap
788 const LArOnOffIdMap * onOffIdMap_c;
789 sc=detStore()->retrieve(onOffIdMap_c);
790 std::vector<int> nfixes;
791 nfixes.resize(16,0);
792
793 if(sc!=StatusCode::SUCCESS){
794 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
795 // return sc;
796 }
797 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
798
799 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
800
801 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
802
803
804 if( onOffId_P->m_version!=2){
805 ATH_MSG_ERROR(" This should only fix map with version=2" );
806 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
807 return StatusCode::FAILURE;
808 }
809
810 VONOFF::iterator it = onOffId_P->m_v.begin();
811 VONOFF::iterator it_e = onOffId_P->m_v.end();
812
813 // set the version to 3.
814 onOffId_P->m_version = 3 ;
815 for (; it!=it_e;++it)
816 {
817 int ifix = -1;
818 LArOnOffId_P::LArOnOffId_P_t& t = *it;
819 if( t.det == 0 || t.det==9 ) // for EM (emec, actually)
820 { // connected or disconnected.
821 if(t.pn==-3 || t.pn==3) // Inner wheel
822 {
823
824
825// ft=10,3,22,16
826// slot = 1, 2
827// Channels:
828// 26<->28, 27<->29, 58<->60, 59<->61,
829// 90<->92, 91<->93, 122<->124, 123<->125.
830
831 if(t.ft_num==3 || t.ft_num==10 || t.ft_num==16 || t.ft_num==22){
832 if( t.feb_slot==1 || t.feb_slot==2 ) {
833
834 bool special = t.pn==3 && t.ft_num==16 && t.feb_slot==2;
835
836 if(t.feb_chan==26)
837 { t.feb_chan=28 ;
838 ifix = 0;
839 }else
840 if(t.feb_chan==28)
841 { t.feb_chan=26 ;
842 ifix = 1;
843 }else
844 if(t.feb_chan==27)
845 { t.feb_chan=29 ;
846 ifix = 2;
847 }else
848 if(t.feb_chan==29)
849 { t.feb_chan=27 ;
850 ifix = 3;
851 }else
852 if(t.feb_chan==58)
853 { t.feb_chan=60 ;
854 ifix = 4;
855 }else
856 if(t.feb_chan==60)
857 { t.feb_chan=58 ;
858 ifix = 5;
859 }else
860 if(t.feb_chan==59)
861 { t.feb_chan=61 ;
862 ifix = 6;
863 }else
864 if(t.feb_chan==61)
865 { t.feb_chan=59 ;
866 ifix = 7;
867 }else
868 if(t.feb_chan==90)
869 { t.feb_chan=92 ;
870 ifix = 8;
871 }else
872 if(t.feb_chan==92)
873 { t.feb_chan=90 ;
874 ifix = 9;
875 }else
876 if(t.feb_chan==91)
877 { t.feb_chan=93 ;
878 ifix = 10;
879 }else
880 if(t.feb_chan==93)
881 { t.feb_chan=91 ;
882 ifix = 11;
883 }else
884 if(t.feb_chan==122 && !special)
885 { t.feb_chan=124 ;
886 ifix = 12;
887 }else
888 if(t.feb_chan==124 && !special)
889 { t.feb_chan=122 ;
890 ifix = 13;
891 }else
892 if(t.feb_chan==123)
893 { t.feb_chan=125 ;
894 ifix = 14;
895 }else
896 if(t.feb_chan==125)
897 { t.feb_chan=123 ;
898 ifix = 15;
899 }
900
901 }
902 }
903
904 }
905 }
906
907 if(ifix != -1) {
908 nfixes[ifix] +=1;
909
910 ATH_MSG_INFO(" Fix number " << ifix );
911
912 ATH_MSG_DEBUG(" det="<<t.det
913 <<" pn="<<t.pn
914 <<" sample="<<t.sample
915 <<" region="<<t.region
916 <<" eta="<<t.eta
917 <<" phi="<<t.phi
918 <<" ft="<<t.ft_num
919 <<" slot="<<t.feb_slot
920 <<" chan="<<t.feb_chan
921 <<" calib_slot="<<t.calib_slot
922 <<" calib_line="<<t.calib_line );
923 }
924
925
926 }//channel loop
927
928 for(unsigned int i=0;i<nfixes.size();++i){
929 ATH_MSG_INFO( nfixes[i] << " fixes for " << i );
930 }
931
932 return StatusCode::SUCCESS;
933}

◆ fix4()

StatusCode FixLArIdMap::fix4 ( )

Definition at line 935 of file FixLArIdMap.cxx.

935 {
936
937 // Fix the FCAL mapping
938
939
940 // LArOnOffIdMap
941 const LArOnOffIdMap * onOffIdMap_c;
942 sc=detStore()->retrieve(onOffIdMap_c);
943 std::vector<int> nfixes;
944 nfixes.resize(8,0);
945
946 if(sc!=StatusCode::SUCCESS){
947 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
948 // return sc;
949 }
950 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
951
952 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
953
954 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
955
956 if( onOffId_P->m_version!=3){
957 ATH_MSG_ERROR(" This should only fix map with version=3" );
958 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
959 return StatusCode::FAILURE;
960 }
961
962 VONOFF::iterator it = onOffId_P->m_v.begin();
963 VONOFF::iterator it_e = onOffId_P->m_v.end();
964
965 // set the version to 3.
966 onOffId_P->m_version = onOffId_P->m_version+1 ;
967 for (; it!=it_e;++it)
968 {
969 int ifix = -1;
970 LArOnOffId_P::LArOnOffId_P_t& t = *it;
971
972 //negative side
973 if( t.det == 7 && t.pn==-2 && t.ft_num==6 &&
974 t.feb_slot==14 && t.feb_chan==95 )
975 { // [4.4.1.0.6.14.95] disconnected
976 t.det=2 ; // make it connected
977 t.calib_slot=16 ;
978 t.calib_line=t.feb_chan;
979 ifix=0 ;
980 }else
981 if( t.det == 7 && t.pn==-2 && t.ft_num==6 &&
982 t.feb_slot==15 && t.feb_chan==95 )
983 { // [4.4.1.0.6.15.95] disconnected
984 t.det=2 ; // make it connected
985 t.calib_slot=16 ;
986 t.calib_line=t.feb_chan;
987 ifix=1 ;
988 }else
989 if( t.det == 2 && t.pn==-2 && t.ft_num==6 &&
990 t.feb_slot==14 && t.feb_chan==47 )
991 { // [4.4.1.0.6.14.47] connected
992 t.det=7 ; // make it disconnected
993 t.calib_slot=0 ;
994 t.calib_line=0 ;
995 ifix=2 ;
996 }else
997 if( t.det == 2 && t.pn==-2 && t.ft_num==6 &&
998 t.feb_slot==15 && t.feb_chan==47 )
999 { // [4.4.1.0.6.15.47] connected
1000 t.det=7 ; // make it discconnected
1001 t.calib_slot=0 ;
1002 t.calib_line=0 ;
1003 ifix=3 ;
1004 }else
1005 // positive side
1006 if( t.det == 7 && t.pn==2 && t.ft_num==6 &&
1007 t.feb_slot==14 && t.feb_chan==47 )
1008 { // [4.4.1.1.6.14.47] disconnected
1009 t.det=2 ; // make it connected
1010 t.calib_slot=16 ;
1011 t.calib_line=t.feb_chan;
1012 ifix=4 ;
1013 }else
1014 if( t.det == 7 && t.pn==2 && t.ft_num==6 &&
1015 t.feb_slot==15 && t.feb_chan==47 )
1016 { // [4.4.1.1.6.15.47] disconnected
1017 t.det=2 ; // make it connected
1018 t.calib_slot=16 ;
1019 t.calib_line=t.feb_chan;
1020 ifix=5 ;
1021 }else
1022 if( t.det == 2 && t.pn==2 && t.ft_num==6 &&
1023 t.feb_slot==14 && t.feb_chan==95 )
1024 { // [4.4.1.1.6.14.95] connected
1025 t.det=7 ; // make it disconnected
1026 t.calib_slot=0 ;
1027 t.calib_line=0 ;
1028 ifix=6 ;
1029 }else
1030 if( t.det == 2 && t.pn==2 && t.ft_num==6 &&
1031 t.feb_slot==15 && t.feb_chan==95 )
1032 { // [4.4.1.1.6.15.95] connected
1033 t.det=7 ; // make it discconnected
1034 t.calib_slot=0 ;
1035 t.calib_line=0 ;
1036 ifix=7 ;
1037 }
1038
1039 if(ifix != -1) {
1040 nfixes[ifix] +=1;
1041
1042 ATH_MSG_INFO(" Fix number " << ifix );
1043
1044 ATH_MSG_DEBUG(" det="<<t.det
1045 <<" pn="<<t.pn
1046 <<" sample="<<t.sample
1047 <<" region="<<t.region
1048 <<" eta="<<t.eta
1049 <<" phi="<<t.phi
1050 <<" ft="<<t.ft_num
1051 <<" slot="<<t.feb_slot
1052 <<" chan="<<t.feb_chan
1053 <<" calib_slot="<<t.calib_slot
1054 <<" calib_line="<<t.calib_line );
1055 }
1056
1057
1058 }//channel loop
1059
1060 for(unsigned int i=0;i<nfixes.size();++i){
1061 ATH_MSG_INFO( nfixes[i] << " fixes for " << i );
1062 }
1063
1064 return StatusCode::SUCCESS;
1065}

◆ fix5()

StatusCode FixLArIdMap::fix5 ( )

Definition at line 1068 of file FixLArIdMap.cxx.

1068 {
1069
1070 // Fix the FCAL mapping
1071
1072 // LArOnOffIdMap
1073 const LArOnOffIdMap * onOffIdMap_c;
1074 sc=detStore()->retrieve(onOffIdMap_c);
1075 int nfixes = 0;
1076
1077 if(sc!=StatusCode::SUCCESS){
1078 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
1079 // return sc;
1080 }
1081 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1082
1083 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1084
1085 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1086
1087 if( onOffId_P->m_version!=3){
1088 ATH_MSG_ERROR(" This should only fix map with version=3" );
1089 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1090 return StatusCode::FAILURE;
1091 }
1092
1093 VONOFF::iterator it = onOffId_P->m_v.begin();
1094 VONOFF::iterator it_e = onOffId_P->m_v.end();
1095
1096 // set the version to .
1097 onOffId_P->m_version = 5 ;
1098 for (; it!=it_e;++it)
1099 {
1100 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1101
1102 //negative side
1103 if( t.det == 7 || t.det == 2)
1104 {
1105 // FCAL, connected or disconnected
1106 t.calib_slot = 16;
1107 ++nfixes ;
1108 int q = t.feb_chan/32 ;
1109 if (q==0 || q==2){
1110 int r = t.feb_chan%2 ;
1111 if (r==0) t.calib_line = t.feb_chan+1;
1112 else t.calib_line = t.feb_chan-1;
1113 }
1114 else
1115 {
1116 t.calib_line = t.feb_chan;
1117 }
1118
1119 }// FCAL
1120 }//channel loop
1121
1122 ATH_MSG_INFO( " Number of fixes:" << nfixes );
1123
1124 return StatusCode::SUCCESS;
1125}
int r
Definition globals.cxx:22

◆ fix6()

StatusCode FixLArIdMap::fix6 ( )

Definition at line 1129 of file FixLArIdMap.cxx.

1129 {
1130
1131 // Fix the HEC Calib mapping
1132
1133 // LArOnOffIdMap
1134 const LArOnOffIdMap * onOffIdMap_c;
1135 sc=detStore()->retrieve(onOffIdMap_c);
1136 std::vector<int> nfixes;
1137 nfixes.resize(44,0);
1138
1139
1140 int nentries=44;
1141 int hec_calib_fix[ ] = {
1142 9 , 100 , 55 , 56,
1143 9 , 101 , 54 , 56,
1144 10 , 100 , 119 , 120,
1145 10 , 101 , 118 , 120,
1146 7 , 36 , 13 , 12,
1147 7 , 37 , 13 , 11,
1148 7 , 37 , 14 , 12,
1149 7 , 38 , 3 , 5,
1150 7 , 39 , 3 , 5,
1151 7 , 44 , 29 , 28,
1152 7 , 45 , 29 , 27,
1153 7 , 45 , 30 , 28,
1154 7 , 46 , 19 , 21,
1155 7 , 47 , 19 , 21,
1156 7 , 100 , 45 , 44,
1157 7 , 101 , 45 , 43,
1158 7 , 101 , 46 , 44,
1159 7 , 102 , 35 , 37,
1160 7 , 103 , 35 , 37,
1161 7 , 108 , 61 , 60,
1162 7 , 109 , 61 , 59,
1163 7 , 109 , 62 , 60,
1164 7 , 110 , 51 , 53,
1165 7 , 111 , 51 , 53,
1166 8 , 36 , 77 , 76,
1167 8 , 37 , 77 , 75,
1168 8 , 37 , 78 , 76,
1169 8 , 38 , 67 , 69,
1170 8 , 39 , 67 , 69,
1171 8 , 44 , 93 , 92,
1172 8 , 45 , 93 , 91,
1173 8 , 45 , 94 , 92,
1174 8 , 46 , 83 , 85,
1175 8 , 47 , 83 , 85,
1176 8 , 100 , 109 , 108,
1177 8 , 101 , 109 , 107,
1178 8 , 101 , 110 , 108,
1179 8 , 102 , 99 , 101,
1180 8 , 103 , 99 , 101,
1181 8 , 108 , 125 , 124,
1182 8 , 109 , 125 , 123,
1183 8 , 109 , 126 , 124,
1184 8 , 110 , 115 , 117,
1185 8 , 111 , 115 , 117 };
1186
1187 if(sc!=StatusCode::SUCCESS){
1188 ATH_MSG_ERROR(" Can not find LArOnOffIdMap" );
1189 // return sc;
1190 }
1191 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1192
1193 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1194
1195 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1196
1197 if( onOffId_P->m_version!=5){
1198 ATH_MSG_ERROR(" This should only fix map with version 5" );
1199 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1200 return StatusCode::FAILURE;
1201 }
1202
1203 VONOFF::iterator it = onOffId_P->m_v.begin();
1204 VONOFF::iterator it_e = onOffId_P->m_v.end();
1205
1206 // set the version to .
1207 onOffId_P->m_version = 6 ;
1208 int ifix=-1;
1209 for (; it!=it_e;++it)
1210 {
1211 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1212
1213 //negative side
1214 if( t.det == 1 ) //HEC
1215 {
1216 if( t.ft_num==3 || t.ft_num==10 ||t.ft_num==16 ||t.ft_num==22)
1217 {
1218 ifix=-1;
1219 for( int i = 0;i<nentries;++i)
1220 {
1221 int j = 4*i;
1222 int slot = hec_calib_fix[j+0];
1223 int chan = hec_calib_fix[j+1];
1224 int line_old = hec_calib_fix[j+2];
1225 int line_new = hec_calib_fix[j+3];
1226 if (t.feb_slot == slot)
1227 {
1228 if (t.feb_chan == chan )
1229 {
1230 if(t.calib_line==line_old)
1231 {
1232 ifix=i;
1233 t.calib_line = line_new;
1234 break;
1235 }
1236 }
1237 }
1238 }
1239
1240 if(ifix != -1) {
1241 nfixes[ifix] +=1;
1242
1243 ATH_MSG_INFO(" Fix number " << ifix );
1244
1245 ATH_MSG_DEBUG(" det="<<t.det
1246 <<" pn="<<t.pn
1247 <<" sample="<<t.sample
1248 <<" region="<<t.region
1249 <<" eta="<<t.eta
1250 <<" phi="<<t.phi
1251 <<" ft="<<t.ft_num
1252 <<" slot="<<t.feb_slot
1253 <<" chan="<<t.feb_chan
1254 <<" calib_slot="<<t.calib_slot
1255 <<" calib_line="<<t.calib_line );
1256 }
1257 }
1258 } //HEC
1259 }//channel loop
1260
1261 for(int i=0;i<nentries;++i){
1262 ATH_MSG_INFO( nfixes[i] << " fixes for " << i+1 );
1263 }
1264
1265 return StatusCode::SUCCESS;
1266}

◆ fix7()

StatusCode FixLArIdMap::fix7 ( )

Definition at line 1269 of file FixLArIdMap.cxx.

1269 {
1270
1271 // Fix the FCAL mapping
1272
1273
1274 const LArFCAL_ID* fcal_id ;
1275 ATH_CHECK( detStore()->retrieve(fcal_id) );
1276
1277 // read in the map from file
1278 std::ifstream fcal_map("FCal-online-map-disc.txt");
1279
1280 // skip two lines
1281 char buffer[128];
1282 fcal_map.getline(buffer,128,'\n');
1283 fcal_map.getline(buffer,128,'\n');
1284 std::string side;
1285 int module,phi,eta,slot,chan;
1286 std::string group ;
1287 int trig_eta;
1288 std::string trig_phi;
1289
1290 LArOnOffId_P::LArOnOffId_P_t tt = {0,0,0,0,0,0,0,0,0,0,0};
1291 tt.ft_num = 6 ;
1292
1293 std::set<LArOnOffId_P::LArOnOffId_P_t> t_set ;
1294 int nread_disc=0 ;
1295 int nread=0 ;
1296 while ( fcal_map>>side>>module>>phi>>eta>>slot>>chan>> group >>trig_eta>>trig_phi)
1297 {
1298 ATH_MSG_DEBUG("side="<<side<< "module= "<<module
1299 << " phi "<<phi
1300 << " eta "<<eta
1301 << " slot "<<slot
1302 << " chan "<<chan
1303 << " group "<<group
1304 << " trig_eta "<<trig_eta
1305 << " trig_phi "<<trig_phi );
1306
1307 if(side=="A"){
1308 tt.pn= 2;
1309 } else
1310 if(side=="C") {
1311 tt.pn= -2;
1312 } else {
1313 ATH_MSG_WARNING(" unknown side "<<side );
1314 return StatusCode::FAILURE ;
1315 }
1316
1317 try{
1318 /*Identifier id = */fcal_id->channel_id(tt.pn,tt.sample,tt.eta,tt.phi);
1319 } catch (LArID_Exception& ex)
1320 {
1321 ATH_MSG_DEBUG( " LArID_Exception" << ex.message() );
1322 }
1323 tt.region=module;
1324 tt.sample=module;
1325 tt.eta=eta;
1326 tt.phi=phi;
1327 tt.feb_slot=slot;
1328 tt.feb_chan=chan;
1329
1330 tt.calib_slot = 16;
1331 int q = tt.feb_chan/32 ;
1332 if (q==0 || q==2){
1333 int r = tt.feb_chan%2 ;
1334 if (r==0) tt.calib_line = tt.feb_chan+1;
1335 else tt.calib_line = tt.feb_chan-1;
1336 }
1337 else
1338 {
1339 tt.calib_line = tt.feb_chan;
1340 }
1341
1342 if(trig_eta<0){ // disconnected channels
1343 tt.det=7 ;
1344 ++nread_disc;
1345 } else // connected channels
1346 {
1347 tt.det=2 ;
1348 }
1349
1350 t_set.insert(tt);
1351 ++nread ;
1352
1353 }
1354
1355 ATH_MSG_DEBUG(" read number of entries " << nread
1356 <<" number of disconnected channels= " << nread_disc
1357 <<" number of unique=" << t_set.size() );
1358
1359
1360 // LArOnOffIdMap
1361 const LArOnOffIdMap * onOffIdMap_c;
1362 ATH_CHECK( detStore()->retrieve(onOffIdMap_c) );
1363
1364 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1365
1366 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1367
1368 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1369
1370 if( onOffId_P->m_version!=6){
1371 ATH_MSG_ERROR(" This should only fix map with version 6" );
1372 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1373 return StatusCode::FAILURE;
1374 }
1375
1376 VONOFF::iterator it = onOffId_P->m_v.begin();
1377 VONOFF::iterator it_e = onOffId_P->m_v.end();
1378
1379 // set the version to .
1380 onOffId_P->m_version = 7 ;
1381
1382 // remove all the current FCAL entries.
1383 int n_conn=0;
1384 int n_disc=0;
1385
1386 VONOFF new_v;
1387
1388 for (; it!=it_e;++it)
1389 {
1390 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1391
1392 //negative side
1393 if( t.det == 2 || t.det == 7 ) //FCAL
1394 {
1395 if (t.det==2) ++n_conn;
1396 if (t.det==7) ++n_disc;
1397
1398 ATH_MSG_DEBUG(" Dropping FCAL det="<<t.det
1399 <<" pn="<<t.pn
1400 <<" sample="<<t.sample
1401 <<" region="<<t.region
1402 <<" eta="<<t.eta
1403 <<" phi="<<t.phi
1404 <<" ft="<<t.ft_num
1405 <<" slot="<<t.feb_slot
1406 <<" chan="<<t.feb_chan
1407 <<" calib_slot="<<t.calib_slot
1408 <<" calib_line="<<t.calib_line );
1409
1410 } else
1411 new_v.push_back(t);
1412
1413 }
1414 ATH_MSG_INFO(" Number of connected channels removed"<<n_conn );
1415 ATH_MSG_INFO(" Number of disconnected channels removed"<<n_disc );
1416
1417 std::set<LArOnOffId_P::LArOnOffId_P_t>::const_iterator it2 =t_set.begin();
1418 std::set<LArOnOffId_P::LArOnOffId_P_t>::const_iterator it2_e =t_set.end();
1419
1420 for ( ; it2!=it2_e;++it2){
1421 new_v.push_back(*it2);
1422 }
1423
1424 ATH_MSG_INFO(" number of old channels "<<onOffId_P->m_v.size() );
1425
1426 onOffId_P->m_v = new_v;
1427 ATH_MSG_INFO(" number of new channels "<<onOffId_P->m_v.size() );
1428
1429 return StatusCode::SUCCESS;
1430}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
void message(const std::string &l_message)
set error message

◆ fix8()

StatusCode FixLArIdMap::fix8 ( )

Definition at line 1485 of file FixLArIdMap.cxx.

1486{
1487 // Import new FEB ROD map
1488
1489 ATH_MSG_INFO(" In fix8()" );
1490
1491 // retrieve DetDescrManager and LArCablingService
1492 IToolSvc* toolSvc = nullptr;
1493 ATH_CHECK( service("ToolSvc", toolSvc) );
1494
1495 LArCablingService* cablingSvc = nullptr;
1496 ATH_CHECK( toolSvc->retrieveTool("LArCablingService",cablingSvc) );
1497
1498 // WARNING: LArFebRodMap should not have been retrieved before this call.
1499 // so far it will be created by LArCablingService from file.
1500 if (m_febToRodMap.empty()) {
1501
1502 ATH_MSG_ERROR(" FEBtoRODMap filename is empty. Please specify through jobOpt" );
1503 return StatusCode::FAILURE ;
1504
1505 }
1506
1507 ATH_MSG_DEBUG(" FEBtoRODMap filename is " << m_febToRodMap );
1508
1509 int flag = cablingSvc->fillFEB_RODmap(m_febToRodMap) ;
1510
1511 if (flag!=0) {
1512 ATH_MSG_ERROR(" Fail load the map file" );
1513 return StatusCode::FAILURE ;
1514 }
1515
1516 // LArFebRodMap
1517 LArFebRodMap * febRodMap = nullptr;
1518 ATH_CHECK( detStore()->retrieve(febRodMap,"LArFebRodMapAtlas") );
1519
1520 LArFebRod_P* febRod_P = febRodMap->getP();
1521 febRod_P->m_version = 4;
1522
1523 ATH_MSG_INFO(" Number of entries in new map"<< febRod_P->m_v.size() );
1524 ATH_MSG_INFO(" Set LArFebRodMap version to "<<febRod_P->m_version );
1525
1526 return StatusCode::SUCCESS ;
1527}
bool flag
Definition master.py:29

◆ fix9()

StatusCode FixLArIdMap::fix9 ( )

Definition at line 1531 of file FixLArIdMap.cxx.

1532{
1533 // Import new FEB ROD map
1534
1535 ATH_MSG_INFO(" In fix9() Barrel Cabling Fix" );
1536
1537 // LArOnOffIdMap
1538 const LArOnOffIdMap * onOffIdMap_c = nullptr;
1539 ATH_CHECK( detStore()->retrieve(onOffIdMap_c) );
1540
1541 LArOnOffIdMap* onOffIdMap=const_cast<LArOnOffIdMap*>(onOffIdMap_c);
1542
1543 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1544
1545
1546 unsigned int ntype=4 ;
1547 std::vector<int> nfixes;
1548 nfixes.resize(ntype);
1549
1550 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1551
1552 ATH_MSG_INFO(" LArOnOffIdMap version "<<onOffId_P->m_version );
1553
1554 if( onOffId_P->m_version!=7){
1555 ATH_MSG_ERROR(" This should only fix map with version 7" );
1556 ATH_MSG_ERROR(" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1557 return StatusCode::FAILURE;
1558 }
1559
1560 VONOFF::iterator it = onOffId_P->m_v.begin();
1561 VONOFF::iterator it_e = onOffId_P->m_v.end();
1562
1563 // set the version to .
1564 onOffId_P->m_version = 8 ;
1565
1566 for (; it!=it_e;++it)
1567 {
1568 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1569
1570 if( t.det == 0 || t.det==9 ) //EM
1571 {
1572 if( t.pn== -1 ) // Barrel C
1573 {
1574
1575 // type 0
1576 if ( (t.ft_num==5 && t.feb_slot== 6) ||
1577 (t.ft_num==29 && t.feb_slot==5) ||
1578 (t.ft_num==29 && t.feb_slot==7)
1579 ){
1580 // channel (1-63)<-> (64-127)
1581 if( t.feb_chan<64) {
1582 t.feb_chan= t.feb_chan+64;
1583 }else{
1584 t.feb_chan= t.feb_chan-64;
1585 }
1586 nfixes[0]+=1;
1587 }
1588
1589 // type 1 in Barrel-C
1590 if ( t.ft_num==0 && t.feb_slot== 8 ) {
1591 if ( t.feb_chan>=32 && t.feb_chan<=39 ){
1592 t.feb_chan = t.feb_chan+8 ;
1593 nfixes[1]+=1;
1594 }
1595 else
1596 if( t.feb_chan>=40 && t.feb_chan<=47 ){
1597 t.feb_chan = t.feb_chan-8 ;
1598 nfixes[1]+=1;
1599 }
1600 }
1601 }
1602 else if( t.pn== 1 ) // Barrel A
1603 {
1604 // type 2
1605 if( (t.ft_num==6 && t.feb_slot==2 )|| (t.ft_num==17 && t.feb_slot==3 ))
1606 {
1607
1608 if ( t.feb_chan>=112 && t.feb_chan<=119 ){
1609 t.feb_chan = t.feb_chan+8 ;
1610 nfixes[2]+=1;
1611 }
1612 else if( t.feb_chan>=120 && t.feb_chan<=127 ){
1613 t.feb_chan = t.feb_chan-8 ;
1614 nfixes[2]+=1;
1615 }
1616 }
1617
1618 if( (t.ft_num==22 && t.feb_slot==7 ) )
1619 {
1620 if ( t.feb_chan>=32 && t.feb_chan<=39 ){
1621 t.feb_chan = t.feb_chan+8 ;
1622 nfixes[3]+=1;
1623 }
1624 else if( t.feb_chan>=40 && t.feb_chan<=47 ){
1625 t.feb_chan = t.feb_chan-8 ;
1626 nfixes[3]+=1;
1627 }
1628 }
1629
1630 }
1631 } // EM
1632
1633 }//channel loop
1634
1635 for(unsigned int i=0;i<ntype;++i){
1636 ATH_MSG_INFO( nfixes[i] << " fixes for type " << i );
1637 }
1638
1639 return StatusCode::SUCCESS;
1640}

◆ initialize()

StatusCode FixLArIdMap::initialize ( )

Definition at line 209 of file FixLArIdMap.cxx.

209 {
210 return StatusCode::SUCCESS;
211}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dumpIds

bool FixLArIdMap::m_dumpIds
private

Definition at line 40 of file FixLArIdMap.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_febToRodMap

std::string FixLArIdMap::m_febToRodMap
private

Definition at line 41 of file FixLArIdMap.h.

◆ m_fixFlag

int FixLArIdMap::m_fixFlag
private

Definition at line 39 of file FixLArIdMap.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: