diff --git a/Calorimeter/CaloTriggerTool/CMakeLists.txt b/Calorimeter/CaloTriggerTool/CMakeLists.txt index c24a672fa974575fcd665741bebce6c9fc91eafa..f3bc0669028d573c98c4e5eedf31f1a83396e393 100644 --- a/Calorimeter/CaloTriggerTool/CMakeLists.txt +++ b/Calorimeter/CaloTriggerTool/CMakeLists.txt @@ -2,13 +2,15 @@ # Declare the package name: atlas_subdir( CaloTriggerTool ) +find_package( ROOT COMPONENTS Core ) # Component(s) in the package: atlas_add_library( CaloTriggerToolLib src/*.cxx PUBLIC_HEADERS CaloTriggerTool + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES AthenaBaseComps AthenaKernel CaloIdentifier GaudiKernel Identifier StoreGateLib TrigT1CaloCalibConditions - PRIVATE_LINK_LIBRARIES LArCablingLib LArIdentifier ) + PRIVATE_LINK_LIBRARIES LArCablingLib LArIdentifier ${ROOT_LIBARIES} ) atlas_add_component( CaloTriggerTool src/components/*.cxx diff --git a/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx b/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx index 5ca29e644f9fd6044cd2f48583ca15874441ab56..5ec8c020c8477d80226bb12fc490eb44e48c1d37 100644 --- a/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx +++ b/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx @@ -17,6 +17,7 @@ #include "CaloIdentifier/LArEM_ID.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/ServiceHandle.h" +#include "TClass.h" //=========================================================== CaloTriggerTowerService::CaloTriggerTowerService( const std::string& type, @@ -94,6 +95,17 @@ StatusCode CaloTriggerTowerService::initialize () msg() << MSG::DEBUG << "Successfully accessed LArOnlineID helper" << endmsg; } + // Make sure the dictionaries for the LArTTCellMap persistent classes + // are available. We used to read this object via a conditions callback, + // but callbacks are not thread-friendly, so this was changed to retrieving + // it from detStore during event processing. However, this meant that + // the TClass's for the persistent objects were also being loaded + // at that time. As of root 6.22.00, at least, TClass can sometimes + // fail to properly load a dictionary when it's being run in a multithreaded + // context. So force the needed dictionaries to load now. + TClass::GetClass ("LArTTCell_P"); + TClass::GetClass ("LArTTCell_P::LArTTCell_P_t"); + msg()<<MSG::INFO<<" ====> ...CaloTriggerTowerService::init() OK "<< endmsg; return StatusCode::SUCCESS; }