diff --git a/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.h b/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.h index 4f82517311334524d0e89fcc1a6c6f3508bd1d71..012e69f1daef976031458ce661a1c40a5901960a 100755 --- a/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.h +++ b/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef LARRAWUTILS_LARTT_SELECTOR_H @@ -7,11 +7,9 @@ #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "CxxUtils/checker_macros.h" -class LArRoI_Map; +class LArRoIMap; -// Not thread-safe due to the use of LArRoI_Map. template <class CONTAINER > class LArTT_Selector { @@ -87,18 +85,17 @@ class LArTT_Selector friend class const_iterator; - LArTT_Selector ( const LArRoI_Map* map= 0, - const CONTAINER* c=NULL ); + LArTT_Selector ( const LArRoIMap* map= 0, + const CONTAINER* c=NULL ); virtual ~LArTT_Selector () {} ; - void setMap(const LArRoI_Map* map) ; + void setMap(const LArRoIMap* map) ; void setContainer(const CONTAINER* c) ; // set RoI according TT, + a sam number. // void setRoIs( const VEC_TT_ID& ids, int sam ) ; - // Not thread-safe due to the use of LArRoI_Map. - void setRoIs ATLAS_NOT_THREAD_SAFE ( const VEC_TT_ID& ids ) ; + void setRoIs ( const VEC_TT_ID& ids ) ; // set RoI according to combined TT_Sampling ID (unsigned int). // void setRoIs( const VEC_TT_SAM_ID& ids ) ; @@ -109,7 +106,7 @@ class LArTT_Selector private: void initialize(); - const LArRoI_Map* m_roiMap; + const LArRoIMap* m_roiMap; const CONTAINER* m_container; VEC_ITPAIR m_vecItPair; diff --git a/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.icc b/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.icc index d4bf18ecd92bf754d2911dbf81b3aec0f25bbd1b..758422edb87de0bc8abf8c0e1ae0206995c42c42 100755 --- a/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.icc +++ b/LArCalorimeter/LArRawUtils/LArRawUtils/LArTT_Selector.icc @@ -1,8 +1,8 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ -#include "LArRawUtils/LArRoI_Map.h" +#include "LArRecConditions/LArRoIMap.h" #include "LArRawUtils/LArTT_Sampling.h" // Implementation of const_iterator @@ -125,8 +125,8 @@ LArTT_Selector<CONTAINER>::const_iterator:: operator * () // Constructor template <class CONTAINER > -LArTT_Selector<CONTAINER> ::LArTT_Selector ( const LArRoI_Map* m, - const CONTAINER* c ): +LArTT_Selector<CONTAINER> ::LArTT_Selector ( const LArRoIMap* m, + const CONTAINER* c ): m_roiMap(m), m_container(c) { @@ -136,7 +136,7 @@ m_container(c) // set methods template <class CONTAINER > -void LArTT_Selector<CONTAINER> :: setMap(const LArRoI_Map* m) { +void LArTT_Selector<CONTAINER> :: setMap(const LArRoIMap* m) { m_roiMap = m; } @@ -169,11 +169,11 @@ void LArTT_Selector<CONTAINER> :: setRoIs ATLAS_NOT_THREAD_SAFE ( const VEC_TT_I // LArTT_Sampling ttSam(rId,sam); // unsigned int combId = ttSam.combinedId(); // std::vector<COLL_ID> cIDs = -// m_roiMap->CollectionID( combId ); +// m_roiMap->collectionID( combId ); unsigned int combId= (unsigned int) rId ; const std::vector<COLL_ID>& cIDs = - m_roiMap->CollectionID( combId ); + m_roiMap->collectionID( combId ); COLL_ID_IT cId_it = cIDs.begin(); COLL_ID_IT cId_it_end = cIDs.end(); // cout<< " Number of Collections for this RoI"<<cIDs.size()<<endl; @@ -220,7 +220,7 @@ void LArTT_Selector<CONTAINER> :: setRoIs( const VEC_TT_SAM_ID& ids ) const TT_SAM_ID& rId = (*it); std::vector<COLL_ID> cIDs = - m_roiMap->CollectionID( rId ); + m_roiMap->collectionID( rId ); COLL_ID_IT cId_it = cIDs.begin(); COLL_ID_IT cId_it_end = cIDs.end(); // cout<< " Number of Collections for this RoI"<<cIDs.size()<<endl; diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h b/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h index 5bb253ed2a4390be0c2ab6f061e08e3c49a42bbb..db3d8971714c79317f46d73dbf06fb7050bbde0c 100644 --- a/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h +++ b/LArCalorimeter/LArRecUtils/LArRecUtils/MakeLArCellFromRaw.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef LARCELLREC_MAKELARCELLFROMRAW_H @@ -18,14 +18,13 @@ #include "CaloUtils/CaloCellCorrection.h" #include "CaloIdentifier/CaloGain.h" #include "AthAllocators/DataPool.h" -#include "CxxUtils/checker_macros.h" #include <map> #include <vector> class CaloDetDescrElement ; -class LArCablingLegacyService ; -class LArRoI_Map; +class LArRoIMap; +class LArOnOffIdMapping; class MakeLArCellFromRaw { @@ -56,7 +55,8 @@ public: /** initialize the internal map */ - void initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* map, + void initialize ( const LArRoIMap& roiMap, + const LArOnOffIdMapping& onOffMap, const std::vector<const CaloCellCorrection*>* pCorr, unsigned int poolMaxSize =190000); /** access by Identifier @@ -94,8 +94,6 @@ private: size_t m_poolMaxSize; IMessageSvc * m_msgSvc ; - LArCablingLegacyService* m_cablingSvc ; - const LArOnlineID* m_onlineID; float m_ethreshold ; // common threshold in MeV diff --git a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx index 398a6849b67665a9ea3a7c35cb87e335d38deb0b..3cc8b1777ad7503ea27ff2c5b82e54722212bd80 100644 --- a/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx +++ b/LArCalorimeter/LArRecUtils/src/MakeLArCellFromRaw.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // implementation of MakeLArCellFromRaw @@ -14,8 +14,8 @@ #include "CaloIdentifier/LArEM_ID.h" #include "CaloIdentifier/LArHEC_ID.h" #include "CaloIdentifier/LArFCAL_ID.h" -#include "LArCabling/LArCablingLegacyService.h" -#include "LArRawUtils/LArRoI_Map.h" +#include "LArCabling/LArOnOffIdMapping.h" +#include "LArRecConditions/LArRoIMap.h" #include "GaudiKernel/Bootstrap.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IToolSvc.h" @@ -31,7 +31,6 @@ using CLHEP::GeV; MakeLArCellFromRaw::MakeLArCellFromRaw() : m_poolMaxSize(0), m_msgSvc (0), - m_cablingSvc (0), m_onlineID (0), m_ethreshold(-1.e5) { @@ -43,7 +42,8 @@ MakeLArCellFromRaw::~MakeLArCellFromRaw() return ; } -void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* roiMap , +void MakeLArCellFromRaw::initialize ( const LArRoIMap& roiMap, + const LArOnOffIdMapping& onOffMap, const std::vector<const CaloCellCorrection*>* pCorr, unsigned int poolMaxSize ) { const EventContext& ctx = Gaudi::Hive::currentContext(); @@ -80,20 +80,6 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro return; } - IToolSvc* p_toolSvc; - StatusCode status = svcLoc->service( "ToolSvc",p_toolSvc ); - if(status.isFailure()) - { - log <<MSG::ERROR << "cannot find ToolSvc in MakeLArCellFromRaw " << endmsg; - return; - } - sc = p_toolSvc->retrieveTool("LArCablingLegacyService",m_cablingSvc); - if (sc.isFailure()) - { - log <<MSG::INFO<< "cannot find LArCablingLegacyService in MakeLArCellFromRaw " << endmsg; - return; - } - // create DataPool if requested if (poolMaxSize!=0) { @@ -141,13 +127,6 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro info0.eCorr=1.; info0.elem = 0 ; - // Make sure that the OnOff map has been set up. - if (!m_cablingSvc->checkOnOff().isSuccess()) { - MsgStream log(m_msgSvc, "MakeLArCellFromRaw"); - log << MSG::ERROR << "Accessing OnOff map" << endmsg; - } - - // EM std::vector<Identifier>::const_iterator it = emIds.begin(); std::vector<Identifier>::const_iterator it2 = emIds.end(); @@ -157,9 +136,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro try{ - HWIdentifier sigId - =m_cablingSvc->createSignalChannelID(chan_id); -// GU + HWIdentifier sigId = onOffMap.createSignalChannelID(chan_id); HWIdentifier feb = m_onlineID->feb_Id(sigId); CELL_VEC::size_type chan = m_onlineID->channel(sigId); CELL_VEC& cellVec= m_cellMap[ feb.get_identifier32().get_compact() ] ; @@ -167,7 +144,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro CellInfo& cell = cellVec[chan] ; - if(roiMap) cell.tt = roiMap->TrigTowerID(sigId); + cell.tt = roiMap.trigTowerID(sigId); const CaloDetDescrElement* caloDDE =man->get_element( chan_id); @@ -201,8 +178,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro try{ - HWIdentifier sigId - =m_cablingSvc->createSignalChannelID(chan_id); + HWIdentifier sigId = onOffMap.createSignalChannelID(chan_id); // to change using LArOnline methods HWIdentifier feb = m_onlineID->feb_Id(sigId); CELL_VEC::size_type chan = m_onlineID->channel(sigId); @@ -211,7 +187,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro CellInfo& cell = cellVec[chan] ; - if(roiMap) cell.tt = roiMap->TrigTowerID(sigId); + cell.tt = roiMap.trigTowerID(sigId); const CaloDetDescrElement* caloDDE =man->get_element( chan_id); @@ -242,8 +218,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro try{ - HWIdentifier sigId - =m_cablingSvc->createSignalChannelID(chan_id); + HWIdentifier sigId = onOffMap.createSignalChannelID(chan_id); // GU to change to use LArOnlineID method HWIdentifier feb = m_onlineID->feb_Id(sigId); CELL_VEC::size_type chan = m_onlineID->channel(sigId); @@ -252,7 +227,7 @@ void MakeLArCellFromRaw::initialize ATLAS_NOT_THREAD_SAFE ( const LArRoI_Map* ro CellInfo& cell = cellVec[chan] ; - if(roiMap) cell.tt = roiMap->TrigTowerID(sigId); + cell.tt = roiMap.trigTowerID(sigId); const CaloDetDescrElement* caloDDE =man->get_element( chan_id); diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h index 96bff3e2e83d4c8c2c3c58146a03ebfbf5a833e7..0ffce417265732598e9ed8e22c1dd83dec836984 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/LArCellCont.h @@ -31,7 +31,8 @@ class ILArBadFebMasker; class CaloBCIDAverage; -class LArRoI_Map; +class LArRoIMap; +class LArOnOffIdMapping; static std::vector<float> corrBCIDref_example; /** Class which contains statically allocated LArCellCollections */ @@ -71,7 +72,9 @@ class LArCellCont : public std::vector<LArCellCollection*> virtual ~LArCellCont() { }; /** initialize method. Builds all cells and collections. */ - StatusCode initialize( const LArRoI_Map* roiMap, const LArMCSym& mcsym, const LArFebRodMapping& febrod, const LArBadChannelCont& badchannel ) ; + StatusCode initialize( const LArRoIMap& roiMap, + const LArOnOffIdMapping& onOffMap, + const LArMCSym& mcsym, const LArFebRodMapping& febrod, const LArBadChannelCont& badchannel ) ; /** finalize method. Destroys all cells and collections. */ StatusCode finalize( void ) ; /** sets Event Number */ diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py index 34bab855511fb92e655232b3bea1d0ca0ca16279..e3f199cd22a68cf64743acd57589e8aa2cda082c 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py @@ -3,30 +3,6 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.AccumulatorCache import AccumulatorCache -def LArRoIMapCfg( flags ): - acc = ComponentAccumulator() - LArRoI_Map=CompFactory.LArRoI_Map - - from LArCabling.LArCablingConfig import LArFebRodMappingCfg, LArCalibIdMappingCfg - - LArCablingLegacyService=CompFactory.LArCablingLegacyService - cablingTool = LArCablingLegacyService() # this is realy a tool - # needed by above - acc.merge( LArFebRodMappingCfg( flags )) - acc.merge( LArCalibIdMappingCfg( flags )) - - CaloTriggerTowerService=CompFactory.CaloTriggerTowerService - triggerTowerTool = CaloTriggerTowerService() - from CaloConditions.CaloConditionsConfig import LArTTCellMapCfg, CaloTTIdMapCfg - acc.merge(LArTTCellMapCfg(flags)) - acc.merge(CaloTTIdMapCfg(flags)) - LArRoI_Map = LArRoI_Map() - LArRoI_Map.CablingSvc = cablingTool - LArRoI_Map.TriggerTowerSvc = triggerTowerTool - acc.addPublicTool( LArRoI_Map ) # should become private tool - - return acc - CaloDataAccessSvcDependencies = [('TileEMScale' , 'ConditionStore+TileEMScale'), ('TileBadChannels' , 'ConditionStore+TileBadChannels'), ('IRegSelLUTCondData', 'ConditionStore+RegSelLUTCondData_TTEM'), @@ -76,8 +52,9 @@ def trigCaloDataAccessSvcCfg( flags ): from TileGeoModel.TileGMConfig import TileGMCfg acc.merge( TileGMCfg( flags ) ) - - acc.merge( LArRoIMapCfg( flags ) ) + + from LArRecUtils.LArRecUtilsConfig import LArRoIMapCondAlgCfg + acc.merge( LArRoIMapCondAlgCfg( flags ) ) from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg, LArFebRodMappingCfg acc.merge( LArOnOffIdMappingCfg( flags )) @@ -162,8 +139,6 @@ if __name__ == "__main__": acc.printConfig(True) - print(acc.getPublicTool("LArRoI_Map")) # noqa: ATL901 - print("running this configuration") # noqa: ATL901 of = open("test.pkl", "wb") acc.store(of) diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx index 28c013482399a8ab7235dc303140cd8a61f1b9b8..fb80caf3ca2a76595f7aff9ce1bc8cdc27f69c1c 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/LArCellCont.cxx @@ -6,8 +6,8 @@ #include "TrigT2CaloCommon/LArCellCont.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IToolSvc.h" -#include "LArRawUtils/LArRoI_Map.h" #include "LArRecUtils/MakeLArCellFromRaw.h" +#include "LArRecConditions/LArRoIMap.h" #include "LArBadChannelTool/LArBadFebMasker.h" #include "CaloUtils/CaloCellCorrection.h" #include "GaudiKernel/EventContext.h" @@ -18,7 +18,9 @@ LArCellCont::LArCellCont() : m_event(0), m_lumi_block(0), m_bcid(5000), m_bcidEv {} StatusCode -LArCellCont::initialize( const LArRoI_Map* roiMap, const LArMCSym& mcsym, const LArFebRodMapping& febrod, const LArBadChannelCont& badchannel ) { +LArCellCont::initialize( const LArRoIMap& roiMap, + const LArOnOffIdMapping& onOffMap, + const LArMCSym& mcsym, const LArFebRodMapping& febrod, const LArBadChannelCont& badchannel ) { #ifdef TRIGLARCELLDEBUG std::cout << "LArCellCont \t\t DEBUG \t in initialize" << std::endl; @@ -75,7 +77,7 @@ std::vector<const CaloCellCorrection*> LArCellCorrTools; MakeLArCellFromRaw makeCell; makeCell.setThreshold(-100); -makeCell.initialize( roiMap, &LArCellCorrTools, 0 ); +makeCell.initialize( roiMap, onOffMap, &LArCellCorrTools, 0 ); //sc = toolSvc->retrieveTool("LArBadChannelMasker", m_masker); @@ -129,7 +131,7 @@ m_hashSym.resize(onlineId->febHashMax()); << std::endl; #endif // get all channels for a FEB - std::map<LArRoI_Map::TT_ID,std::vector<LArCell* > > collMap; + std::map<LArRoIMap::TT_ID,std::vector<LArCell* > > collMap; if ( (*this)[idx]->size() != 0 ) { // This is the second FEB m_second[idx] = febid; } @@ -137,7 +139,7 @@ m_hashSym.resize(onlineId->febHashMax()); hashTab.reserve(256); unsigned int febidcomp = febid.get_identifier32().get_compact(); for(int ch=0;ch<128;ch++){ - LArRoI_Map::TT_ID ttId; + LArRoIMap::TT_ID ttId; LArCell* larcell = makeCell.getLArCell(febidcomp,ch,0,0,0,ttId); if ( larcell ) { // if it is a good cell // Fixes default value @@ -175,9 +177,9 @@ m_hashSym.resize(onlineId->febHashMax()); hashTab.push_back( indexsetmax); } // end of if bad cell } // end of for ch loop - std::map<LArRoI_Map::TT_ID,std::vector<LArCell* > >::const_iterator + std::map<LArRoIMap::TT_ID,std::vector<LArCell* > >::const_iterator mapIt = collMap.begin(); - std::map<LArRoI_Map::TT_ID,std::vector<LArCell* > >::const_iterator + std::map<LArRoIMap::TT_ID,std::vector<LArCell* > >::const_iterator mapItEnd = collMap.end(); for (;mapIt!=mapItEnd;++mapIt) { // Ones needs to dump the mapped vector to an allocated vector diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx index 91a9ec596e00d40678a0a2e2f7b228b451b468df..e14dae777d192a78bd4fd1ec84862b0273e064f0 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx @@ -21,12 +21,12 @@ StatusCode TrigCaloDataAccessSvc::initialize() { m_autoRetrieveTools = false; m_checkToolDeps = false; - CHECK( m_roiMapTool.retrieve() ); CHECK( m_larDecoder.retrieve() ); CHECK( m_tileDecoder.retrieve() ); CHECK( m_robDataProvider.retrieve() ); CHECK( m_bcidAvgKey.initialize() ); CHECK( m_onOffIdMappingKey.initialize() ); + CHECK( m_larRoIMapKey.initialize() ); CHECK( m_febRodMappingKey.initialize() ); CHECK( m_regionSelector_TTEM.retrieve() ); CHECK( m_mcsymKey.initialize() ); @@ -104,8 +104,9 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context, for( unsigned int i = 0 ; i < requestHashIDs.size() ; i++ ) ATH_MSG_VERBOSE( "m_rIds[" << i << "]=" << requestHashIDs[i] ); } + SG::ReadCondHandle<LArRoIMap> roimap ( m_larRoIMapKey, context); loadedCells.setContainer( ( m_hLTCaloSlot.get( context )->larContainer ) ); - loadedCells.setMap( m_roiMapTool.operator->() ); + loadedCells.setMap( *roimap ); { // this has to be guarded because getTT called on the LArCollection bu other threads updates internal map @@ -337,6 +338,8 @@ unsigned int TrigCaloDataAccessSvc::lateInit(const EventContext& context) { // n SG::ReadCondHandle<LArMCSym> mcsym (m_mcsymKey, context); SG::ReadCondHandle<LArFebRodMapping> febrod(m_febRodMappingKey, context); SG::ReadCondHandle<LArBadChannelCont> larBadChan{ m_bcContKey, context }; + SG::ReadCondHandle<LArOnOffIdMapping> onoff ( m_onOffIdMappingKey, context); + SG::ReadCondHandle<LArRoIMap> roimap ( m_larRoIMapKey, context); unsigned int nFebs=70; unsigned int high_granu = (unsigned int)ceilf(m_vrodid32fullDet.size()/((float)nFebs) ); @@ -362,7 +365,7 @@ unsigned int TrigCaloDataAccessSvc::lateInit(const EventContext& context) { // n ec.setSlot( slot ); HLTCaloEventCache *cache = m_hLTCaloSlot.get( ec ); cache->larContainer = new LArCellCont(); - if ( cache->larContainer->initialize( m_roiMapTool.get(), **mcsym, **febrod, **larBadChan ).isFailure() ) + if ( cache->larContainer->initialize( **roimap, **onoff, **mcsym, **febrod, **larBadChan ).isFailure() ) return 0x1; // dummy code std::vector<CaloCell*> local_cell_copy; local_cell_copy.reserve(200000); diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h index dcd2d5a294bee0cfa4e95b5a860ca10af250cf6e..07aa44f928112c4ae09489be9a8cc7d759fb3b04 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.h @@ -28,6 +28,7 @@ #include "LArCabling/LArOnOffIdMapping.h" #include "LArRecConditions/LArFebRodMapping.h" #include "LArRecConditions/LArBadChannelCont.h" +#include "LArRecConditions/LArRoIMap.h" class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc> { public: @@ -62,9 +63,6 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc> PublicToolHandle<LArRodDecoder> m_larDecoder { this, "LArDecoderTool", "LArRodDecoder/LArRodDecoder", "Tool to decode LAr raw data" }; PublicToolHandle<TileROD_Decoder> m_tileDecoder { this, "TileDecoderTool", "TileROD_Decoder/TileROD_Decoder", "Tool to decode Tile raw data" }; - //!< LArRoI_Map used by LArTT_Selector, TB this is apparently a tool! - PublicToolHandle<LArRoI_Map> m_roiMapTool { this, "LArRoIMapTool", "LArRoI_Map/LArRoI_Map", "Tool used by selectors" }; - ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Tool to monitor performance of the service" }; ServiceHandle<IROBDataProviderSvc> m_robDataProvider{ this, "ROBDataProvider", "ROBDataProviderSvc/ROBDataProviderSvc", ""}; @@ -85,6 +83,8 @@ class TrigCaloDataAccessSvc : public extends<AthService, ITrigCaloDataAccessSvc> {this, "RodFebKey", "LArFebRodMap", "SG Key for LArFebRodMapping"} ; SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey {this, "LArBadChannelKey", "LArBadChannel", "Key of the LArBadChannelCont CDO" }; + SG::ReadCondHandleKey<LArRoIMap> m_larRoIMapKey + {this, "LArRoIMapKey", "LArRoIMap", "Key of the LArRoIMap CDO" }; void reset_LArCol ( LArCellCollection* coll ){ for(LArCellCollection::iterator ii=coll->begin();ii!=coll->end();++ii)