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

#include <TrigCaloDataAccessSvc.h>

Inheritance diagram for TrigCaloDataAccessSvc:

Classes

struct  HLTCaloEventCache
 convience structure to keep together a collection and auxiliar full collection selectors More...

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual StatusCode loadCollections (const EventContext &context, const IRoiDescriptor &roi, const DETID detID, const int sampling, LArTT_Selector< LArCellCont > &loadedCells) override
virtual StatusCode loadCollections (const EventContext &context, const IRoiDescriptor &roi, std::vector< const TileCell * > &loadedCells) override
virtual StatusCode loadMBTS (const EventContext &context, std::vector< const TileCell * > &loadedCells) override
virtual StatusCode loadFullCollections (const EventContext &context, CaloConstCellContainer &cont) override

Private Member Functions

void reset_LArCol (LArCellCollection *coll)
void reset_TileCol (TileCellCollection *col)
void lateInit (const EventContext &context)
void convertROBs (const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &robFrags, LArCellCont *larcell, LArRodBlockStructure *&larRodBlockStructure, uint16_t rodMinorVersion, uint32_t robBlockType, const LArDeadOTXFromSC *dead)
void convertROBs (const EventContext &context, const std::vector< IdentifierHash > &rIds, TileCellCont *tilecell, TileROD_Decoder::D0CellsHLT *d0cells)
void missingROBs (const std::vector< uint32_t > &request, const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &response, std::set< uint32_t > &missing) const
 fill the set of missing robs given the request and response from RoBDatProvider
void clearMissing (const std::vector< uint32_t > &request, const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &response, LArCellCont *larcell)
 clear fragments of the collection for which ROBs were not available
StatusCode prepareLArCollections (const EventContext &context, const IRoiDescriptor &roi, const int sampling, DETID detector)
 LAr TT collections preparation code.
StatusCode prepareTileCollections (const EventContext &context, const IRoiDescriptor &roi)
StatusCode prepareMBTSCollections (const EventContext &context)
StatusCode prepareLArFullCollections (const EventContext &context)
StatusCode prepareTileFullCollections (const EventContext &context)

Private Attributes

PublicToolHandle< LArRodDecoderm_larDecoder { this, "LArDecoderTool", "LArRodDecoder/LArRodDecoder", "Tool to decode LAr raw data" }
PublicToolHandle< TileROD_Decoderm_tileDecoder { this, "TileDecoderTool", "TileROD_Decoder/TileROD_Decoder", "Tool to decode Tile raw data" }
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Tool to monitor performance of the service" }
ServiceHandle< IROBDataProviderSvcm_robDataProvider { this, "ROBDataProvider", "ROBDataProviderSvc/ROBDataProviderSvc", ""}
ToolHandle< IRegSelToolm_regionSelector_TTEM { this, "RegSelToolEM", "RegSelTool/RegSelTool_TTEM" }
ToolHandle< IRegSelToolm_regionSelector_TTHEC { this, "RegSelToolHEC", "RegSelTool/RegSelTool_TTHEC" }
ToolHandle< IRegSelToolm_regionSelector_FCALEM { this, "RegSelToolFCALEM", "RegSelTool/RegSelTool_FCALEM" }
ToolHandle< IRegSelToolm_regionSelector_FCALHAD { this, "RegSelToolFCALHAD", "RegSelTool/RegSelTool_FCALHAD" }
ToolHandle< IRegSelToolm_regionSelector_TILE { this, "RegSelToolTILE", "RegSelTool/RegSelTool_TILE" }
Gaudi::Property< bool > m_applyOffsetCorrection { this, "ApplyOffsetCorrection", true, "Enable offset correction" }
SG::ReadHandleKey< CaloBCIDAveragem_bcidAvgKey {this, "BCIDAvgKey", "CaloBCIDAverage", "SG Key of CaloBCIDAverage object"}
SG::ReadCondHandleKey< LArMCSymm_mcsymKey {this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_onOffIdMappingKey {this, "CablingKey", "LArOnOffIdMap", "SG Key for LArOnOffIdMapping"}
SG::ReadCondHandleKey< LArFebRodMappingm_febRodMappingKey {this, "RodFebKey", "LArFebRodMap", "SG Key for LArFebRodMapping"}
SG::ReadCondHandleKey< LArBadChannelContm_bcContKey {this, "LArBadChannelKey", "LArBadChannel", "Key of the LArBadChannelCont CDO" }
SG::ReadCondHandleKey< LArRoIMapm_larRoIMapKey {this, "LArRoIMapKey", "LArRoIMap", "Key of the LArRoIMap CDO" }
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
SG::ReadCondHandleKey< TileHid2RESrcIDm_tileHid2RESrcIDKey {this, "TileHid2RESrcID", "TileHid2RESrcIDHLT", "SG Key of TileHid2RESrcID object"}
SG::ReadHandleKey< LArDeadOTXFromSCm_deadOTXFromSCKey {this, "LArDeadOTXFromSC", "DeadOTXFromSC", "Key of the DeadOTXFromSC CDO" }
bool m_correctDead {false}
std::vector< unsigned int > m_insertedCells
SG::SlotSpecificObj< HLTCaloEventCachem_hLTCaloSlot
std::mutex m_getCollMutex
std::mutex m_lardecoderProtect
std::mutex m_tiledecoderProtect
std::once_flag m_lateInitFlag
std::vector< uint32_t > m_vrodid32fullDet
std::vector< uint32_t > m_vrodid32tile
std::vector< IdentifierHashm_rIdstile
std::vector< std::vector< uint32_t > > m_vrodid32fullDetHG

Detailed Description

Definition at line 46 of file TrigCaloDataAccessSvc.h.

Member Function Documentation

◆ clearMissing()

void TrigCaloDataAccessSvc::clearMissing ( const std::vector< uint32_t > & request,
const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > & response,
LArCellCont * larcell )
private

clear fragments of the collection for which ROBs were not available

Definition at line 582 of file TrigCaloDataAccessSvc.cxx.

584 {
585 std::set<uint32_t> missing;
586 missingROBs( request, response, missing );
587 for ( uint32_t robID : missing ) {
588 const auto it = larcell->find( robID );
589 if ( it != larcell->end() && not (*it)->empty() ) { // Already decoded collection
590 reset_LArCol ( *it );
591 }
592 }
593}
MDT_Response response
const std::vector< LArCellCollection * >::const_iterator find(const HWIdentifier &id) const
Finds a collection by its LArReadoutModuleID.
void missingROBs(const std::vector< uint32_t > &request, const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &response, std::set< uint32_t > &missing) const
fill the set of missing robs given the request and response from RoBDatProvider
void reset_LArCol(LArCellCollection *coll)

◆ convertROBs() [1/2]

void TrigCaloDataAccessSvc::convertROBs ( const EventContext & context,
const std::vector< IdentifierHash > & rIds,
TileCellCont * tilecell,
TileROD_Decoder::D0CellsHLT * d0cells )
private

Definition at line 521 of file TrigCaloDataAccessSvc.cxx.

524 {
525
526 TileCellCollection* mbts = tilecell->MBTS_collection();
527 const TileHid2RESrcID* hid2re = tilecell->getHashIdToROD();
528
529 std::vector<unsigned int> tile{0};
530 // Tile likes rob by rob
531 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFrags;
532 for (size_t i = 0; i < rIds.size(); ++i){
533 tile[0] = tilecell->find_rod(rIds[i]);
534 m_robDataProvider->getROBData(context,tile,robFrags);
535 // Find the collection to fill
536 const auto it = tilecell->find(rIds[i]);
537 if (it == tilecell->end()) continue;
538
539 TileCellCollection* col = *it;
540 if ( !robFrags.empty() && col != nullptr ) {
541 const size_t roddatasize = robFrags[0]->rod_ndata();
542 // insert data into vector (to be removed soon)
543 if (roddatasize < 3) {
544 ATH_MSG_WARNING( "Error reading bytestream"<<
545 "event: Empty ROD block (less than 3 words) : 0x"
546 << std::hex << tile[0] << std::dec );
547 if ( !tilecell->cached(rIds[i])){
548 // resets collection
549 reset_TileCol(col);
550 }
551 robFrags.clear();
552 } else {
553 std::scoped_lock decoderLock{m_tiledecoderProtect};
554 if ( !tilecell->cached(rIds[i]) ) {
555 m_tileDecoder->fillCollectionHLT(robFrags[0],*col,*d0cells,mbts,hid2re);
556 }
557 m_tileDecoder->mergeD0cellsHLT(*d0cells,*col);
558 robFrags.clear();
559 }
560 } // end of if robFrags.size
561 } // End of for through RobFrags
562
563 ATH_MSG_DEBUG( "finished decoding" );
564}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
unsigned int find_rod(const unsigned int &id) const
const std::vector< TileCellCollection * >::const_iterator find(const unsigned int &id) const
Finds a collection.
const TileCellCollection * MBTS_collection(void) const
bool cached(const unsigned int &rodid)
const TileHid2RESrcID * getHashIdToROD() const
PublicToolHandle< TileROD_Decoder > m_tileDecoder
void reset_TileCol(TileCellCollection *col)
ServiceHandle< IROBDataProviderSvc > m_robDataProvider

◆ convertROBs() [2/2]

void TrigCaloDataAccessSvc::convertROBs ( const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > & robFrags,
LArCellCont * larcell,
LArRodBlockStructure *& larRodBlockStructure,
uint16_t rodMinorVersion,
uint32_t robBlockType,
const LArDeadOTXFromSC * dead )
private

Definition at line 451 of file TrigCaloDataAccessSvc.cxx.

453 {
454
455 for ( auto rob: robFrags ) {
456 uint32_t sourceID = rob->source_id();
457 const auto it = larcell->find( sourceID );
458 //TB The find also switches the state of the collection to "decoded" so repeated decoding is avoided
459
460 if ( it != larcell->end() && ( *it )->size() != 0 ) { // Already decoded collection
461
462 // TB if we have entered here it means the decoding did not occur yet ( or failed )
463 //
464 LArCellCollection* coll = *it;
465 ATH_MSG_DEBUG( "ROB of ID " << sourceID << " to be decoded" );
466
467 std::scoped_lock decoderLock{m_lardecoderProtect};
468 //TB next two lines seem danger, as they seem to rely on the decoder state
469 const HWIdentifier& feb_id_local = larcell->findsec( sourceID );
470 m_larDecoder->setsecfeb( feb_id_local );
471 if ( ! m_larDecoder->check_valid( rob, msg() ) ){
472 ATH_MSG_WARNING( "Error reading bytestream"<<
473 "event: Bad ROB block ( eformat checks ) : 0x"
474 << std::hex << sourceID << std::dec );
475 // Data seems corrupted
476 reset_LArCol ( coll );
477
478 } else {
479 // Get Rod Data and size of fragment
480 const uint32_t* roddata = 0;
481 rob->rod_data( roddata );
482 const size_t roddatasize = rob->rod_ndata();
483 if ( roddatasize < 3 ) {
484 ATH_MSG_WARNING( "Error reading bytestream"<<
485 "event: Empty ROD block ( less than 3 words ) : 0x"
486 << std::hex << sourceID << std::dec );
487 // Data seems corrupted
488 reset_LArCol ( coll );
489 } else {
490 //TB the converter has state
491 m_larDecoder->fillCollectionHLT( *rob, roddata, roddatasize, *coll, larRodBlockStructure_per_slot, rodMinorVersion, robBlockType );
492 if ( deadHandle ){
493 if ( deadHandle->isThisOTXdead(feb_id_local) ) {
494 const std::vector<float>& corr = deadHandle->correctionFromThisOTXdead(feb_id_local);
495 // The sizes here are guaranteed by construction
496 for(size_t i=0;i<128;i++) {
497 (*coll)[i+128]->set(corr[i],0,0,0x1000,CaloGain::LARHIGHGAIN);
498 }
499 }
500 HWIdentifier feb_id_local2(larRodBlockStructure_per_slot->getFEBID());
501 if ( deadHandle->isThisOTXdead(feb_id_local2) ) {
502 const std::vector<float>& corr = deadHandle->correctionFromThisOTXdead(feb_id_local2);
503 // The sizes here are guaranteed by construction
504 for(size_t i=0;i<128;i++) {
505 (*coll)[i]->set(corr[i],0,0,0x1000,CaloGain::LARHIGHGAIN);
506 }
507 }
508 }
509
510 if ( m_applyOffsetCorrection ) larcell->applyBCIDCorrection( sourceID );
511 }
512
513 }
514 } else {
515 ATH_MSG_VERBOSE( "ROB of ID " << sourceID << " already decoded" );
516 }
517 }
518 ATH_MSG_DEBUG( "finished decoding" );
519}
#define ATH_MSG_VERBOSE(x)
void applyBCIDCorrection(unsigned int rodid)
method to apply correction based on the luminosity to the energy
HWIdentifier findsec(unsigned int id) const
Each Collection contains data from 2 FEBs.
Gaudi::Property< bool > m_applyOffsetCorrection
PublicToolHandle< LArRodDecoder > m_larDecoder
@ LARHIGHGAIN
Definition CaloGain.h:18
setEventNumber uint32_t
MsgStream & msg
Definition testRead.cxx:32

◆ finalize()

StatusCode TrigCaloDataAccessSvc::finalize ( )
overridevirtual

Definition at line 42 of file TrigCaloDataAccessSvc.cxx.

42 {
43
44 m_vrodid32fullDet.clear();
45 m_vrodid32fullDetHG.clear();
46 for (HLTCaloEventCache& cache : m_hLTCaloSlot) {
47 if (cache.larContainer) ATH_CHECK( cache.larContainer->finalize() );
48 if (cache.tileContainer) ATH_CHECK( cache.tileContainer->finalize() );
49 if (cache.d0cells) cache.d0cells->clear();
50 if (cache.fullcont) {
51 for (unsigned int i : m_insertedCells) delete cache.fullcont->at(i);
52 }
53 }
54
55 return StatusCode::SUCCESS;
56}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::vector< std::vector< uint32_t > > m_vrodid32fullDetHG
SG::SlotSpecificObj< HLTCaloEventCache > m_hLTCaloSlot
std::vector< unsigned int > m_insertedCells
std::vector< uint32_t > m_vrodid32fullDet
const IIntersectionCache * cache() const
Retrieve the associated cache block, if it exists.
convience structure to keep together a collection and auxiliar full collection selectors

◆ initialize()

StatusCode TrigCaloDataAccessSvc::initialize ( )
overridevirtual

Temporary fix

Definition at line 14 of file TrigCaloDataAccessSvc.cxx.

14 {
15
17 m_autoRetrieveTools = false;
18 m_checkToolDeps = false;
19
20 ATH_CHECK( m_larDecoder.retrieve() );
21 ATH_CHECK( m_tileDecoder.retrieve() );
22 ATH_CHECK( m_robDataProvider.retrieve() );
23 ATH_CHECK( m_bcidAvgKey.initialize() );
24 ATH_CHECK( m_onOffIdMappingKey.initialize() );
25 ATH_CHECK( m_larRoIMapKey.initialize() );
26 ATH_CHECK( m_febRodMappingKey.initialize() );
27 ATH_CHECK( m_regionSelector_TTEM.retrieve() );
28 ATH_CHECK( m_mcsymKey.initialize() );
29 ATH_CHECK( m_bcContKey.initialize() );
30 ATH_CHECK( m_caloMgrKey.initialize());
34 ATH_CHECK( m_regionSelector_TILE.retrieve() );
37 ATH_CHECK( m_tileHid2RESrcIDKey.initialize() );
38
39 return StatusCode::SUCCESS;
40}
ToolHandle< IRegSelTool > m_regionSelector_TTHEC
SG::ReadCondHandleKey< TileHid2RESrcID > m_tileHid2RESrcIDKey
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
SG::ReadCondHandleKey< LArFebRodMapping > m_febRodMappingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_onOffIdMappingKey
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
ToolHandle< IRegSelTool > m_regionSelector_FCALEM
SG::ReadHandleKey< LArDeadOTXFromSC > m_deadOTXFromSCKey
SG::ReadCondHandleKey< LArRoIMap > m_larRoIMapKey
ToolHandle< IRegSelTool > m_regionSelector_TTEM
ToolHandle< IRegSelTool > m_regionSelector_FCALHAD
ToolHandle< IRegSelTool > m_regionSelector_TILE
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::ReadCondHandleKey< LArMCSym > m_mcsymKey

◆ lateInit()

void TrigCaloDataAccessSvc::lateInit ( const EventContext & context)
private

Definition at line 259 of file TrigCaloDataAccessSvc.cxx.

259 { // non-const this thing
260
261 ATH_MSG_DEBUG( "Performing late init" );
262
263 // preparing full container list of ROBs - tile will be included soon
264 std::vector<uint32_t> vrodid32lar;
265 std::vector<uint32_t> vrodid32em;
266 std::vector<uint32_t> vrodid32hec;
267 std::vector<uint32_t> vrodid32hec0;
268 std::vector<uint32_t> vrodid32hec1;
269 std::vector<uint32_t> vrodid32hec2;
270 std::vector<uint32_t> vrodid32hec3;
271 std::vector<uint32_t> vrodid32fcalem;
272 std::vector<uint32_t> vrodid32fcalhad;
273
274 TrigRoiDescriptor tmproi(true);
275 std::vector<uint32_t> vrodid32tile;
276 std::vector<IdentifierHash> rIdstile;
277 // TTEM
278 m_regionSelector_TTEM->lookup(context)->ROBIDList(-1,tmproi,vrodid32em);
279 // TTHEC
280 m_regionSelector_TTHEC->lookup(context)->ROBIDList(0,tmproi,vrodid32hec0);
281 m_regionSelector_TTHEC->lookup(context)->ROBIDList(1,tmproi,vrodid32hec1);
282 m_regionSelector_TTHEC->lookup(context)->ROBIDList(2,tmproi,vrodid32hec2);
283 m_regionSelector_TTHEC->lookup(context)->ROBIDList(3,tmproi,vrodid32hec3);
284 // FCALHAD
285 m_regionSelector_FCALEM->lookup(context)->ROBIDList(-1,tmproi,vrodid32fcalem);
286 m_regionSelector_FCALHAD->lookup(context)->ROBIDList(-1,tmproi,vrodid32fcalhad);
287 m_regionSelector_TILE->lookup(context)->ROBIDList(tmproi,vrodid32tile);
288 m_regionSelector_TILE->lookup(context)->HashIDList(tmproi,rIdstile);
289
290 m_vrodid32tile.resize( vrodid32tile.size() );
291 m_rIdstile.resize(rIdstile.size() );
292 // Tile RODs and ID coming from the Tile tables are not unique
293 // iii and iij are local variables helping to clear non-unique IDs
294 auto iii = std::unique_copy(vrodid32tile.begin(),vrodid32tile.end(),m_vrodid32tile.begin());
295 auto iij = std::unique_copy(rIdstile.begin(),rIdstile.end(),m_rIdstile.begin());
296 std::sort( m_vrodid32tile.begin(), iii );
297 std::sort( m_rIdstile.begin(), iij );
298 iii = std::unique_copy(m_vrodid32tile.begin(),iii,m_vrodid32tile.begin());
299 iij = std::unique_copy(m_rIdstile.begin(),iij,m_rIdstile.begin());
300 m_vrodid32tile.resize( std::distance(m_vrodid32tile.begin(), iii) );
301 m_rIdstile.resize( std::distance(m_rIdstile.begin(), iij) );
302
303 vrodid32lar.insert(vrodid32lar.end(),vrodid32em.begin(),vrodid32em.end());
304 vrodid32hec.insert(vrodid32hec.end(),vrodid32hec0.begin(),vrodid32hec0.end());
305 vrodid32lar.insert(vrodid32lar.end(),vrodid32hec.begin(),vrodid32hec.end());
306 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalhad.begin(),vrodid32fcalhad.end());
307 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalem.begin(),vrodid32fcalem.end());
308 m_vrodid32fullDet.insert(m_vrodid32fullDet.end(), vrodid32lar.begin(), vrodid32lar.end() );
309
310
311 SG::ReadCondHandle<LArMCSym> mcsym (m_mcsymKey, context);
312 SG::ReadCondHandle<LArFebRodMapping> febrod(m_febRodMappingKey, context);
313 SG::ReadCondHandle<LArBadChannelCont> larBadChan{ m_bcContKey, context };
314 SG::ReadCondHandle<LArOnOffIdMapping> onoff ( m_onOffIdMappingKey, context);
315 SG::ReadCondHandle<LArRoIMap> roimap ( m_larRoIMapKey, context);
316 SG::ReadCondHandle<TileHid2RESrcID> tileHid2RESrcID ( m_tileHid2RESrcIDKey, context);
317
318 const unsigned int nFebs=70;
319 const unsigned int high_granu = (unsigned int)ceilf(m_vrodid32fullDet.size()/((float)nFebs) );
320 unsigned int jj=0;
321 unsigned int kk=0;
322 m_vrodid32fullDetHG.resize(high_granu);
323 for( unsigned int ii=0; ii<m_vrodid32fullDet.size();ii++){
324 if ( kk >= nFebs ) {
325 kk-=nFebs;
326 jj++;
327 }
328 m_vrodid32fullDetHG[jj].push_back(m_vrodid32fullDet[ii]);
329 kk++;
330 }
331 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey, context};
332 const CaloDetDescrManager* theCaloDDM = *caloMgrHandle;
333 const CaloCell_ID* theCaloCCIDM = theCaloDDM->getCaloCell_ID();
334 const unsigned int hashMax = theCaloCCIDM->calo_cell_hash_max();
335
336 // Prepare cache containers to be used for LAr unpacking.
337 size_t slot = 0;
338 for (HLTCaloEventCache& cache : m_hLTCaloSlot) {
339 cache.larContainer = std::make_unique<LArCellCont>();
340 cache.larRodBlockStructure_per_slot = nullptr;
341
342 cache.larContainer->initialize(**roimap, **onoff, **mcsym, **febrod, **larBadChan, *theCaloDDM).
343 orThrow("Cannot initialize LAr container", name());
344
345 std::vector<CaloCell*> local_cell_copy;
346 local_cell_copy.reserve(200000);
347 const LArCellCont* larcell = cache.larContainer.get();
348 const LArBadChannelCont& badchannel = **larBadChan;
349
350 cache.lastFSEvent = 0xFFFFFFFF;
351 auto cachefullcont = std::make_unique<CaloCellContainer>(SG::VIEW_ELEMENTS);
352 cachefullcont->reserve(190000);
353
354 for(unsigned int lcidx=0; lcidx < larcell->size(); lcidx++){
355 LArCellCollection* lcc = larcell->at(lcidx);
356 for(unsigned int lccidx=0; lccidx<lcc->size(); lccidx++){
357 CaloCell* cell = lcc->at(lccidx);
358 if ( cell && cell->caloDDE() ) {
359 const LArBadChannel& bc = badchannel.offlineStatus(cell->ID());
360 const bool bad = !bc.good() &&
361 // only consider specific problems
362 (bc.deadReadout() || bc.deadPhys() || bc.highNoiseHG() ||
364
365 if ( !bad ) local_cell_copy.push_back( cell );
366 }
367 } // end of loop over cells
368 } // end of loop over collection
369
370 // This should stay here as this will be enabled when tile is ready to be decoded as well
371
372 auto tilecell = std::make_unique<TileCellCont>();
373 tilecell->setHashIdToROD( *tileHid2RESrcID );
374 tilecell->initialize().orThrow("Cannot initialize Tile container", name());
375
376 for (unsigned int i=0; i<4; i++) {
377 m_tileDecoder->loadRw2Cell ( i, tilecell->Rw2CellMap(i) );
378 m_tileDecoder->loadRw2Pmt ( i, tilecell->Rw2PmtMap (i) );
379 }
380 m_tileDecoder->loadMBTS( tilecell->MBTS_map(), tilecell->MBTS_channel() );
381
382 auto d0cellsp = std::make_unique<TileROD_Decoder::D0CellsHLT>();
383 for (unsigned int lcidx=0; lcidx < tilecell->size(); lcidx++){
384 TileCellCollection* lcc = tilecell->at(lcidx);
385 for (unsigned int lccidx=0; lccidx<lcc->size(); lccidx++){
386 CaloCell* cell = lcc->at(lccidx);
387 if ( cell ) local_cell_copy.push_back( cell );
388 } // end of loop over cells
389
390 TileRawChannelCollection::ID frag_id = ((*lcc).identify() & 0x0FFF);
391 const int ros = (frag_id >> 8);
392 if ( ros == 1 ) { //treatment for d0Cells in barrel
393 const int drawer = (frag_id & 0xFF);
394 TileCellCollection::iterator pCell = lcc->begin();
395 pCell+=2;
396 d0cellsp->m_cells[drawer] = *pCell;
397 }
398 } // end of loop over collection
399 cache.tileContainer = std::move(tilecell);
400
401 // d0merge cells
402 cache.d0cells = std::move(d0cellsp);
403
404 // For the moment the container has to be completed by hand (again, because of tile)
405 for(unsigned int i=0; i<hashMax; i++){
406 cachefullcont->push_back_fast(nullptr);
407 }
408
409 for(unsigned int i=0; i<local_cell_copy.size(); i++){
410 unsigned int j = local_cell_copy.at(i)->caloDDE()->calo_hash();
411 if ( j < hashMax ) {
412 cachefullcont->at(j) = local_cell_copy.at(i);
413 }
414 }
415 for(unsigned int i=0;i<hashMax;i++)
416 if ( cachefullcont->at(i) == nullptr ){
417 Identifier id = theCaloCCIDM->cell_id(i);
418 if ( id!=0 ){
419 const CaloDetDescrElement* el = theCaloDDM->get_element(id);
420 if ( el->is_tile() ) {
421 cachefullcont->at(i) = new TileCell(el,0,0,0,0,CaloGain::TILEHIGHHIGH);
422 } else {
423 cachefullcont->at(i) = new LArCell(el,0,0,0,CaloGain::LARHIGHGAIN);
424 }
425
426 if (slot==0) m_insertedCells.push_back(i);
427 }
428 }
429
430 cachefullcont->setHasCalo(CaloCell_ID::LAREM);
431 cachefullcont->setHasCalo(CaloCell_ID::LARHEC);
432 cachefullcont->setHasCalo(CaloCell_ID::LARFCAL);
433 cachefullcont->setHasCalo(CaloCell_ID::TILE); //lying... But this needs to be checked later
434
435 // make sure this "map" container has a good hashID
436 cachefullcont->order();
437
438 if ( hashMax != cachefullcont->size() ) {
439 ATH_MSG_ERROR("Problem in the size of the full container");
440 }
441
442 cachefullcont->setIsOrdered(true);
443 cachefullcont->setIsOrderedAndComplete(true);
444 cache.fullcont = std::move(cachefullcont);
445
446 local_cell_copy.clear();
447 ++slot;
448 }
449}
#define ATH_MSG_ERROR(x)
LArBadXCont< LArBadChannel > LArBadChannelCont
Athena::TPCnvVers::Current TrigRoiDescriptor
size_type calo_cell_hash_max() const
cell 'global' hash table max size
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
const T * at(size_type n) const
Access an element, as an rvalue.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition DataVector.h:842
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool deadReadout() const
bool highNoiseHG() const
bool problematicForUnknownReason() const
bool highNoiseMG() const
bool highNoiseLG() const
bool deadPhys() const
bool good() const
Returns true if no problems at all (all bits at zero).
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
std::vector< uint32_t > m_vrodid32tile
std::vector< IdentifierHash > m_rIdstile
@ TILEHIGHHIGH
Definition CaloGain.h:15
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ loadCollections() [1/2]

StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext & context,
const IRoiDescriptor & roi,
const DETID detID,
const int sampling,
LArTT_Selector< LArCellCont > & loadedCells )
overridevirtual

Definition at line 73 of file TrigCaloDataAccessSvc.cxx.

77 {
78
79 std::vector<IdentifierHash> requestHashIDs;
80
81 ATH_MSG_DEBUG( "LArTT requested for event " << context << " and RoI " << roi );
82 ATH_CHECK( prepareLArCollections(context, roi, sampling, detID) );
83
84 {
85 // this has to be guarded because getTT called on the LArCollection bu other threads updates internal map
86 std::scoped_lock lock{m_hLTCaloSlot.get( context )->mutex};
87 switch ( detID ) {
88 case TTEM: {m_regionSelector_TTEM->lookup(context)->HashIDList( sampling, roi, requestHashIDs ); break; }
89 case TTHEC: {m_regionSelector_TTHEC->lookup(context)->HashIDList( sampling, roi, requestHashIDs ); break; }
90 case FCALEM: {m_regionSelector_FCALEM->lookup(context)->HashIDList( sampling, roi, requestHashIDs ); break; }
91 case FCALHAD: {m_regionSelector_FCALHAD->lookup(context)->HashIDList( sampling, roi, requestHashIDs ); break; }
92 default: break;
93 }
94 }
95
96 ATH_MSG_DEBUG( "requestHashIDs.size() in LoadColl = " << requestHashIDs.size() << " hash checksum "
97 << std::accumulate( requestHashIDs.begin(), requestHashIDs.end(), IdentifierHash( 0 ),
98 []( IdentifierHash h1, IdentifierHash h2 ){ return h1+h2; } ) );
99 if ( msgLvl( MSG::VERBOSE ) ) {
100 for( unsigned int i = 0 ; i < requestHashIDs.size() ; i++ )
101 ATH_MSG_VERBOSE( "m_rIds[" << i << "]=" << requestHashIDs[i] );
102 }
103 SG::ReadCondHandle<LArRoIMap> roimap ( m_larRoIMapKey, context);
104 loadedCells.setContainer( m_hLTCaloSlot.get( context )->larContainer.get() );
105 loadedCells.setMap( *roimap );
106
107 {
108 // this has to be guarded because getTT called on the LArCollection bu other threads updates internal map
109 std::scoped_lock lock{m_hLTCaloSlot.get( context )->mutex};
110 loadedCells.setRoIs( requestHashIDs );
111 }
112 return StatusCode::SUCCESS;
113}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
@ FCALEM
Definition RegSelEnums.h:35
@ TTHEC
Definition RegSelEnums.h:29
@ FCALHAD
Definition RegSelEnums.h:36
@ TTEM
Definition RegSelEnums.h:28
void setRoIs(const VEC_TT_ID &ids)
void setMap(const LArRoIMap *map)
void setContainer(const CONTAINER *c)
StatusCode prepareLArCollections(const EventContext &context, const IRoiDescriptor &roi, const int sampling, DETID detector)
LAr TT collections preparation code.

◆ loadCollections() [2/2]

StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext & context,
const IRoiDescriptor & roi,
std::vector< const TileCell * > & loadedCells )
overridevirtual

Definition at line 115 of file TrigCaloDataAccessSvc.cxx.

117 {
118 std::vector<IdentifierHash> requestHashIDs;
119
120 ATH_MSG_DEBUG( "Tile requested for event " << context << " and RoI " << roi );
121 ATH_CHECK( prepareTileCollections(context, roi) );
122
123 {
124 // this has to be guarded because getTT called on the LArCollection bu other threads updates internal map
125 std::scoped_lock lock{m_hLTCaloSlot.get( context )->mutex};
126
127 m_regionSelector_TILE->lookup(context)->HashIDList( roi, requestHashIDs );
128 }
129 ATH_MSG_DEBUG( "requestHashIDs.size() in LoadColl = " << requestHashIDs.size() << " hash checksum "
130 << std::accumulate( requestHashIDs.begin(), requestHashIDs.end(), IdentifierHash( 0 ),
131 []( IdentifierHash h1, IdentifierHash h2 ){ return h1+h2; } ) );
132 if ( msgLvl( MSG::VERBOSE ) ) {
133 for( unsigned int i = 0 ; i < requestHashIDs.size() ; i++ )
134 ATH_MSG_VERBOSE( "requestHashIDs[" << i << "]=" << requestHashIDs[i] );
135 }
136
137 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
138 const TileCellCont* tilecell = cache->tileContainer.get();
139
140 loadedCells.clear();
141 for (size_t i = 0; i < requestHashIDs.size(); ++i){
142 // Find the collection to dump
143 const auto it = tilecell->find(requestHashIDs[i]);
144 if (it == tilecell->end()) continue;
145
146 TileCellCollection* col = *it;
147 if ( col == nullptr ) continue;
148
149 for (const TileCell* cell : *col) {
150 loadedCells.push_back( cell );
151 }
152 }
153
154 return StatusCode::SUCCESS;
155}
StatusCode prepareTileCollections(const EventContext &context, const IRoiDescriptor &roi)

◆ loadFullCollections()

StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext & context,
CaloConstCellContainer & cont )
overridevirtual

Definition at line 158 of file TrigCaloDataAccessSvc.cxx.

159 {
160
162
164
165 m_hLTCaloSlot.get(context)->lastFSEvent = context.evt();
166
167 std::scoped_lock lock{m_getCollMutex};
168
169 const CaloCellContainer* cont_to_copy = m_hLTCaloSlot.get(context)->fullcont.get() ;
170 cont.clear();
171 cont.reserve( cont_to_copy->size() );
172 for( const CaloCell* c : *cont_to_copy ) {
173 cont.push_back_fast( c );
174 }
175 cont.setIsOrdered(true);
176 cont.setIsOrderedAndComplete(true);
177
178 return StatusCode::SUCCESS;
179}
void setIsOrderedAndComplete(bool ordered)
indicate that the container is complete and in order
void setIsOrdered(bool ordered)
indicates that the container is ordered
void push_back_fast(const CaloCell *cell)
reimplementation of push_back to gain speed in readin
void clear()
Erase all the elements in the collection.
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
StatusCode prepareLArFullCollections(const EventContext &context)
StatusCode prepareTileFullCollections(const EventContext &context)

◆ loadMBTS()

StatusCode TrigCaloDataAccessSvc::loadMBTS ( const EventContext & context,
std::vector< const TileCell * > & loadedCells )
overridevirtual

Definition at line 715 of file TrigCaloDataAccessSvc.cxx.

716 {
717
718 ATH_MSG_DEBUG( "MBTS requested for event " << context );
720
721 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
722 {
723 std::scoped_lock lock{cache->mutex};
724 TileCellCollection* mbts = cache->tileContainer->MBTS_collection();
725 loadedCells.reserve(mbts->size());
726 for (size_t i=0; i<mbts->size(); ++i) {
727 loadedCells.push_back(mbts->at(i));
728 }
729 }
730 return StatusCode::SUCCESS;
731
732}
StatusCode prepareMBTSCollections(const EventContext &context)

◆ missingROBs()

void TrigCaloDataAccessSvc::missingROBs ( const std::vector< uint32_t > & request,
const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > & response,
std::set< uint32_t > & missing ) const
private

fill the set of missing robs given the request and response from RoBDatProvider

Definition at line 566 of file TrigCaloDataAccessSvc.cxx.

568 {
569
570 std::set<uint32_t> receivedROBsSet;
571 for ( auto rob: response ) {
572 receivedROBsSet.insert( rob->source_id() );
573 }
574
575 std::set<uint32_t> requestedROBsSet( request.begin(), request.end() );
576 std::set_difference( requestedROBsSet.begin(), requestedROBsSet.end(),
577 receivedROBsSet.begin(), receivedROBsSet.end(),
578 std::inserter( missing, missing.begin() ) );
579}

◆ prepareLArCollections()

StatusCode TrigCaloDataAccessSvc::prepareLArCollections ( const EventContext & context,
const IRoiDescriptor & roi,
const int sampling,
DETID detector )
private

LAr TT collections preparation code.

Definition at line 596 of file TrigCaloDataAccessSvc.cxx.

599 {
600
601 std::call_once(m_lateInitFlag, &TrigCaloDataAccessSvc::lateInit, this, context);
602
603 // If the full event was already unpacked, don't need to unpack RoI
604 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
605 if ( cache->lastFSEvent == context.evt() ) return StatusCode::SUCCESS;
606
607 std::vector<uint32_t> requestROBs;
608
609 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFrags;
610 switch ( detector ) {
611 case TTEM: {m_regionSelector_TTEM->lookup(context)->ROBIDList( sampling, roi, requestROBs ); break; }
612 case TTHEC: {m_regionSelector_TTHEC->lookup(context)->ROBIDList( sampling, roi, requestROBs ); break; }
613 case FCALEM: {m_regionSelector_FCALEM->lookup(context)->ROBIDList( sampling, roi, requestROBs ); break; }
614 case FCALHAD: {m_regionSelector_FCALHAD->lookup(context)->ROBIDList( sampling, roi, requestROBs ); break; }
615 default: break;
616 }
617
618 m_robDataProvider->getROBData( context, requestROBs, robFrags );
619 if ( robFrags.empty() && !requestROBs.empty() ) {
620 return StatusCode::SUCCESS;
621 }
622
623 auto lockTime = Monitored::Timer ( "TIME_locking_LAr_RoI" );
624 std::scoped_lock lock{cache->mutex};
625 lockTime.stop();
626
627 // TB, what would happen from now inside the collection unapcking
628 // if this event number is different than the one for each collection the unpacking will happen,
629 // if it is the same the unpacking will not be repeated
630 // same in prepareLArFullCollections
631 cache->larContainer->eventNumber( context.evt() );
632 if ( m_applyOffsetCorrection && cache->larContainer->lumiBCIDCheck( context ) ) {
633 SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
634 SG::ReadCondHandle<LArOnOffIdMapping> onoff ( m_onOffIdMappingKey, context);
635 if ( avg.cptr() && onoff.cptr() ) cache->larContainer->updateBCID( *avg, **onoff );
636 }
637
638 const LArDeadOTXFromSC* deadHandle = nullptr;
639 if ( m_correctDead ){
640 SG::ReadHandle<LArDeadOTXFromSC> deadHdl(m_deadOTXFromSCKey, context);
641 if ( !deadHdl.isValid() ){
642 ATH_MSG_WARNING("Should not try to use LArDEADOTXFromSC" );
643 } else {
644 deadHandle = deadHdl.cptr();
645 }
646 }
647
648 convertROBs( robFrags, cache->larContainer.get(), cache->larRodBlockStructure_per_slot,
649 cache->rodMinorVersion, cache->robBlockType, deadHandle );
650
651 if ( requestROBs.size() != robFrags.size() ) {
652 ATH_MSG_DEBUG( "Missing ROBs, requested " << requestROBs.size() << " obtained " << robFrags.size() );
653 clearMissing( requestROBs, robFrags, cache->larContainer.get() );
654 }
655 auto roiROBs = Monitored::Scalar( "roiROBs_LAr", robFrags.size() );
656 auto roiEta = Monitored::Scalar( "roiEta_LAr", roi.eta() );
657 auto roiPhi = Monitored::Scalar( "roiPhi_LAr", roi.phi() );
658
659 Monitored::Group( m_monTool, lockTime, roiEta, roiPhi, roiROBs );
660 return StatusCode::SUCCESS;
661}
virtual double eta() const =0
virtual double phi() const =0
Methods to retrieve data members.
void lateInit(const EventContext &context)
void convertROBs(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &robFrags, LArCellCont *larcell, LArRodBlockStructure *&larRodBlockStructure, uint16_t rodMinorVersion, uint32_t robBlockType, const LArDeadOTXFromSC *dead)
void clearMissing(const std::vector< uint32_t > &request, const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &response, LArCellCont *larcell)
clear fragments of the collection for which ROBs were not available
ToolHandle< GenericMonitoringTool > m_monTool
constexpr float roiPhi(const AnyRoIPointer &roi)
avg(a, b)
Definition Recovery.py:79
setTeId setLumiBlock setRoiId setRoiSubsystem setRoiNumber roiEta

◆ prepareLArFullCollections()

StatusCode TrigCaloDataAccessSvc::prepareLArFullCollections ( const EventContext & context)
private

Definition at line 182 of file TrigCaloDataAccessSvc.cxx.

182 {
183
184 std::call_once(m_lateInitFlag, &TrigCaloDataAccessSvc::lateInit, this, context);
185
186 ATH_MSG_DEBUG( "Full Col " << " requested for event " << context );
187
188 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
189
190 auto lockTime = Monitored::Timer ( "TIME_locking_LAr_FullDet" );
191 std::scoped_lock lock{cache->mutex};
192
193 lockTime.stop();
194
195 // If the full event was already unpacked, don't need to unpack RoI
196 if ( cache->lastFSEvent == context.evt() ) return StatusCode::SUCCESS;
197 cache->larContainer->eventNumber( context.evt() ) ;
198
199 if ( m_applyOffsetCorrection && cache->larContainer->lumiBCIDCheck( context ) ) {
200 SG::ReadHandle<CaloBCIDAverage> avg (m_bcidAvgKey, context);
201 SG::ReadCondHandle<LArOnOffIdMapping> onoff (m_onOffIdMappingKey, context);
202 if ( avg.cptr() && onoff.cptr() ) {
203 cache->larContainer->updateBCID( *avg, **onoff );
204 }
205 }
206
207 const LArDeadOTXFromSC* deadHandle = nullptr;
208 if ( m_correctDead ){
209 SG::ReadHandle<LArDeadOTXFromSC> deadHdl(m_deadOTXFromSCKey, context);
210 if ( !deadHdl.isValid() ){
211 ATH_MSG_WARNING("Should not try to use LArDEADOTXFromSC" );
212 } else {
213 deadHandle = deadHdl.cptr();
214 }
215 }
216
217 for(std::vector<uint32_t>& vrodid32fullDet : m_vrodid32fullDetHG) {
218 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFrags;
219 m_robDataProvider->getROBData( context, vrodid32fullDet, robFrags );
220
221 convertROBs( robFrags, cache->larContainer.get(), cache->larRodBlockStructure_per_slot,
222 cache->rodMinorVersion, cache->robBlockType, deadHandle );
223
224 if ( vrodid32fullDet.size() != robFrags.size() ) {
225 ATH_MSG_DEBUG( "Missing ROBs, requested " << vrodid32fullDet.size() << " obtained " << robFrags.size() );
226 clearMissing( vrodid32fullDet, robFrags, cache->larContainer.get() );
227 }
228 } // end of for m_vrodid32fullDetHG.size()
229
230 Monitored::Group( m_monTool, lockTime );
231 return StatusCode::SUCCESS;
232}

◆ prepareMBTSCollections()

StatusCode TrigCaloDataAccessSvc::prepareMBTSCollections ( const EventContext & context)
private

Definition at line 688 of file TrigCaloDataAccessSvc.cxx.

688 {
689
690 std::call_once(m_lateInitFlag, &TrigCaloDataAccessSvc::lateInit, this, context);
691
692 // If the full event was already unpacked, don't need to unpack RoI
693 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
694 if ( cache->lastFSEvent == context.evt() ) return StatusCode::SUCCESS;
695
696 std::scoped_lock lock{cache->mutex};
697 if ( cache->tileContainer->eventNumber() != context.evt() ) {
698 cache->d0cells->clear();
699 }
700 cache->tileContainer->eventNumber( context.evt() );
701
702 const std::vector<unsigned int>* ids = cache->tileContainer->MBTS_IDs();
703 std::vector<IdentifierHash> tileIds;
704 tileIds.reserve(ids->size());
705 for (size_t i=0; i<ids->size(); i++) {
706 tileIds.push_back( (*ids)[i] );
707 }
708 convertROBs( context, tileIds, cache->tileContainer.get(), cache->d0cells.get() );
709
710 return StatusCode::SUCCESS;
711}

◆ prepareTileCollections()

StatusCode TrigCaloDataAccessSvc::prepareTileCollections ( const EventContext & context,
const IRoiDescriptor & roi )
private

Definition at line 663 of file TrigCaloDataAccessSvc.cxx.

664 {
665
666 std::call_once(m_lateInitFlag, &TrigCaloDataAccessSvc::lateInit, this, context);
667
668 // If the full event was already unpacked, don't need to unpack RoI
669 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
670 if ( cache->lastFSEvent == context.evt() ) return StatusCode::SUCCESS;
671
672 std::vector<uint32_t> requestROBs;
673 std::vector<IdentifierHash> rIds;
674 m_regionSelector_TILE->lookup(context)->ROBIDList( 0, roi, requestROBs );
675 m_regionSelector_TILE->lookup(context)->HashIDList(roi, rIds);
676
677 std::scoped_lock lock{cache->mutex};
678 if ( cache->tileContainer->eventNumber() != context.evt() ) {
679 cache->d0cells->clear();
680 }
681 cache->tileContainer->eventNumber( context.evt() );
682
683 convertROBs( context, rIds, cache->tileContainer.get(), cache->d0cells.get() );
684
685 return StatusCode::SUCCESS;
686}

◆ prepareTileFullCollections()

StatusCode TrigCaloDataAccessSvc::prepareTileFullCollections ( const EventContext & context)
private

Definition at line 234 of file TrigCaloDataAccessSvc.cxx.

234 {
235
236 std::call_once(m_lateInitFlag, &TrigCaloDataAccessSvc::lateInit, this, context);
237
238 ATH_MSG_DEBUG( "Full Col " << " requested for event " << context );
239
240 HLTCaloEventCache* cache = m_hLTCaloSlot.get( context );
241
242 auto lockTime = Monitored::Timer ( "TIME_locking_LAr_FullDet" );
243 std::scoped_lock lock{cache->mutex};
244 lockTime.stop();
245
246 // If the full event was already unpacked, don't need to unpack RoI
247 if ( cache->lastFSEvent == context.evt() ) return StatusCode::SUCCESS;
248 if ( cache->tileContainer->eventNumber() != context.evt() ) {
249 cache->d0cells->clear();
250 }
251 cache->tileContainer->eventNumber( context.evt() );
252
253 convertROBs( context, m_rIdstile, cache->tileContainer.get(), cache->d0cells.get() );
254
255 Monitored::Group( m_monTool, lockTime );
256 return StatusCode::SUCCESS;
257}

◆ reset_LArCol()

void TrigCaloDataAccessSvc::reset_LArCol ( LArCellCollection * coll)
private

Definition at line 58 of file TrigCaloDataAccessSvc.cxx.

58 {
59 for (LArCell* cell : *coll) {
60 cell->setEnergyFast(0.0);
61 }
62}

◆ reset_TileCol()

void TrigCaloDataAccessSvc::reset_TileCol ( TileCellCollection * col)
private

Definition at line 64 of file TrigCaloDataAccessSvc.cxx.

64 {
65 for (TileCell* cell: *col) {
66 cell->setEnergy_nonvirt(0.0F, 0.0F, 0, CaloGain::INVALIDGAIN);
67 cell->setTime_nonvirt(-100.0F);
68 cell->setQuality_nonvirt(static_cast<unsigned char>(255), 0, 0);
69 cell->setQuality_nonvirt(static_cast<unsigned char>(255), 0, 1);
70 }
71}
@ INVALIDGAIN
Definition CaloGain.h:18

Member Data Documentation

◆ m_applyOffsetCorrection

Gaudi::Property<bool> TrigCaloDataAccessSvc::m_applyOffsetCorrection { this, "ApplyOffsetCorrection", true, "Enable offset correction" }
private

Definition at line 87 of file TrigCaloDataAccessSvc.h.

87{ this, "ApplyOffsetCorrection", true, "Enable offset correction" };

◆ m_bcContKey

SG::ReadCondHandleKey<LArBadChannelCont> TrigCaloDataAccessSvc::m_bcContKey {this, "LArBadChannelKey", "LArBadChannel", "Key of the LArBadChannelCont CDO" }
private

Definition at line 97 of file TrigCaloDataAccessSvc.h.

98{this, "LArBadChannelKey", "LArBadChannel", "Key of the LArBadChannelCont CDO" };

◆ m_bcidAvgKey

SG::ReadHandleKey<CaloBCIDAverage> TrigCaloDataAccessSvc::m_bcidAvgKey {this, "BCIDAvgKey", "CaloBCIDAverage", "SG Key of CaloBCIDAverage object"}
private

Definition at line 89 of file TrigCaloDataAccessSvc.h.

90{this, "BCIDAvgKey", "CaloBCIDAverage", "SG Key of CaloBCIDAverage object"} ;

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> TrigCaloDataAccessSvc::m_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
private

Definition at line 101 of file TrigCaloDataAccessSvc.h.

102{this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_correctDead

bool TrigCaloDataAccessSvc::m_correctDead {false}
private

Definition at line 107 of file TrigCaloDataAccessSvc.h.

107{false};

◆ m_deadOTXFromSCKey

SG::ReadHandleKey<LArDeadOTXFromSC> TrigCaloDataAccessSvc::m_deadOTXFromSCKey {this, "LArDeadOTXFromSC", "DeadOTXFromSC", "Key of the DeadOTXFromSC CDO" }
private

Definition at line 105 of file TrigCaloDataAccessSvc.h.

106{this, "LArDeadOTXFromSC", "DeadOTXFromSC", "Key of the DeadOTXFromSC CDO" };

◆ m_febRodMappingKey

SG::ReadCondHandleKey<LArFebRodMapping> TrigCaloDataAccessSvc::m_febRodMappingKey {this, "RodFebKey", "LArFebRodMap", "SG Key for LArFebRodMapping"}
private

Definition at line 95 of file TrigCaloDataAccessSvc.h.

96{this, "RodFebKey", "LArFebRodMap", "SG Key for LArFebRodMapping"} ;

◆ m_getCollMutex

std::mutex TrigCaloDataAccessSvc::m_getCollMutex
private

Definition at line 129 of file TrigCaloDataAccessSvc.h.

◆ m_hLTCaloSlot

SG::SlotSpecificObj< HLTCaloEventCache > TrigCaloDataAccessSvc::m_hLTCaloSlot
private

Definition at line 127 of file TrigCaloDataAccessSvc.h.

◆ m_insertedCells

std::vector<unsigned int> TrigCaloDataAccessSvc::m_insertedCells
private

Definition at line 125 of file TrigCaloDataAccessSvc.h.

◆ m_larDecoder

PublicToolHandle<LArRodDecoder> TrigCaloDataAccessSvc::m_larDecoder { this, "LArDecoderTool", "LArRodDecoder/LArRodDecoder", "Tool to decode LAr raw data" }
private

Definition at line 75 of file TrigCaloDataAccessSvc.h.

75{ this, "LArDecoderTool", "LArRodDecoder/LArRodDecoder", "Tool to decode LAr raw data" };

◆ m_lardecoderProtect

std::mutex TrigCaloDataAccessSvc::m_lardecoderProtect
private

Definition at line 130 of file TrigCaloDataAccessSvc.h.

◆ m_larRoIMapKey

SG::ReadCondHandleKey<LArRoIMap> TrigCaloDataAccessSvc::m_larRoIMapKey {this, "LArRoIMapKey", "LArRoIMap", "Key of the LArRoIMap CDO" }
private

Definition at line 99 of file TrigCaloDataAccessSvc.h.

100{this, "LArRoIMapKey", "LArRoIMap", "Key of the LArRoIMap CDO" };

◆ m_lateInitFlag

std::once_flag TrigCaloDataAccessSvc::m_lateInitFlag
private

Definition at line 137 of file TrigCaloDataAccessSvc.h.

◆ m_mcsymKey

SG::ReadCondHandleKey<LArMCSym> TrigCaloDataAccessSvc::m_mcsymKey {this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"}
private

Definition at line 91 of file TrigCaloDataAccessSvc.h.

92{this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"} ;

◆ m_monTool

ToolHandle<GenericMonitoringTool> TrigCaloDataAccessSvc::m_monTool { this, "MonTool", "", "Tool to monitor performance of the service" }
private

Definition at line 78 of file TrigCaloDataAccessSvc.h.

78{ this, "MonTool", "", "Tool to monitor performance of the service" };

◆ m_onOffIdMappingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> TrigCaloDataAccessSvc::m_onOffIdMappingKey {this, "CablingKey", "LArOnOffIdMap", "SG Key for LArOnOffIdMapping"}
private

Definition at line 93 of file TrigCaloDataAccessSvc.h.

94{this, "CablingKey", "LArOnOffIdMap", "SG Key for LArOnOffIdMapping"} ;

◆ m_regionSelector_FCALEM

ToolHandle<IRegSelTool> TrigCaloDataAccessSvc::m_regionSelector_FCALEM { this, "RegSelToolFCALEM", "RegSelTool/RegSelTool_FCALEM" }
private

Definition at line 83 of file TrigCaloDataAccessSvc.h.

83{ this, "RegSelToolFCALEM", "RegSelTool/RegSelTool_FCALEM" };

◆ m_regionSelector_FCALHAD

ToolHandle<IRegSelTool> TrigCaloDataAccessSvc::m_regionSelector_FCALHAD { this, "RegSelToolFCALHAD", "RegSelTool/RegSelTool_FCALHAD" }
private

Definition at line 84 of file TrigCaloDataAccessSvc.h.

84{ this, "RegSelToolFCALHAD", "RegSelTool/RegSelTool_FCALHAD" };

◆ m_regionSelector_TILE

ToolHandle<IRegSelTool> TrigCaloDataAccessSvc::m_regionSelector_TILE { this, "RegSelToolTILE", "RegSelTool/RegSelTool_TILE" }
private

Definition at line 85 of file TrigCaloDataAccessSvc.h.

85{ this, "RegSelToolTILE", "RegSelTool/RegSelTool_TILE" };

◆ m_regionSelector_TTEM

ToolHandle<IRegSelTool> TrigCaloDataAccessSvc::m_regionSelector_TTEM { this, "RegSelToolEM", "RegSelTool/RegSelTool_TTEM" }
private

Definition at line 81 of file TrigCaloDataAccessSvc.h.

81{ this, "RegSelToolEM", "RegSelTool/RegSelTool_TTEM" };

◆ m_regionSelector_TTHEC

ToolHandle<IRegSelTool> TrigCaloDataAccessSvc::m_regionSelector_TTHEC { this, "RegSelToolHEC", "RegSelTool/RegSelTool_TTHEC" }
private

Definition at line 82 of file TrigCaloDataAccessSvc.h.

82{ this, "RegSelToolHEC", "RegSelTool/RegSelTool_TTHEC" };

◆ m_rIdstile

std::vector<IdentifierHash> TrigCaloDataAccessSvc::m_rIdstile
private

Definition at line 176 of file TrigCaloDataAccessSvc.h.

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> TrigCaloDataAccessSvc::m_robDataProvider { this, "ROBDataProvider", "ROBDataProviderSvc/ROBDataProviderSvc", ""}
private

Definition at line 80 of file TrigCaloDataAccessSvc.h.

80{ this, "ROBDataProvider", "ROBDataProviderSvc/ROBDataProviderSvc", ""};

◆ m_tileDecoder

PublicToolHandle<TileROD_Decoder> TrigCaloDataAccessSvc::m_tileDecoder { this, "TileDecoderTool", "TileROD_Decoder/TileROD_Decoder", "Tool to decode Tile raw data" }
private

Definition at line 76 of file TrigCaloDataAccessSvc.h.

76{ this, "TileDecoderTool", "TileROD_Decoder/TileROD_Decoder", "Tool to decode Tile raw data" };

◆ m_tiledecoderProtect

std::mutex TrigCaloDataAccessSvc::m_tiledecoderProtect
private

Definition at line 131 of file TrigCaloDataAccessSvc.h.

◆ m_tileHid2RESrcIDKey

SG::ReadCondHandleKey<TileHid2RESrcID> TrigCaloDataAccessSvc::m_tileHid2RESrcIDKey {this, "TileHid2RESrcID", "TileHid2RESrcIDHLT", "SG Key of TileHid2RESrcID object"}
private

Definition at line 103 of file TrigCaloDataAccessSvc.h.

104{this, "TileHid2RESrcID", "TileHid2RESrcIDHLT", "SG Key of TileHid2RESrcID object"} ;

◆ m_vrodid32fullDet

std::vector<uint32_t> TrigCaloDataAccessSvc::m_vrodid32fullDet
private

Definition at line 174 of file TrigCaloDataAccessSvc.h.

◆ m_vrodid32fullDetHG

std::vector<std::vector<uint32_t> > TrigCaloDataAccessSvc::m_vrodid32fullDetHG
private

Definition at line 177 of file TrigCaloDataAccessSvc.h.

◆ m_vrodid32tile

std::vector<uint32_t> TrigCaloDataAccessSvc::m_vrodid32tile
private

Definition at line 175 of file TrigCaloDataAccessSvc.h.


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