diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt index 246bb445e22a5e19345ea29ca0b464eb32b197ed..ef63407e2ca2a5619bd731b3f1c236ef3449cc95 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/CMakeLists.txt @@ -28,18 +28,19 @@ atlas_depends_on_subdirs( PUBLIC MuonSpectrometer/MuonCnv/MuonTGC_CnvTools MuonSpectrometer/MuonDigitContainer MuonSpectrometer/MuonIdHelpers - MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData ) + MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData + MuonSpectrometer/MuonCablings/MuonCablingData ) # Component(s) in the package: atlas_add_library( MuonByteStreamCnvTestLib src/*.cxx PUBLIC_HEADERS MuonByteStreamCnvTest LINK_LIBRARIES AthenaBaseComps GaudiKernel MuonReadoutGeometry MuonRDO StoreGateLib SGtests RPCcablingInterfaceLib TrigT1RPChardwareLib RPChardware TrigT1RPClogicLib MuonMDT_CablingLib TGCcablingInterfaceLib MuonIdHelpersLib - PRIVATE_LINK_LIBRARIES EventInfo MuonDigitContainer MuonPrepRawData ) + PRIVATE_LINK_LIBRARIES EventInfo MuonDigitContainer MuonPrepRawData MuonCablingData ) atlas_add_component( MuonByteStreamCnvTest src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel RPCcablingInterfaceLib MuonReadoutGeometry MuonRDO TrigT1RPChardwareLib RPChardware TrigT1RPClogicLib EventInfo MuonMDT_CablingLib TGCcablingInterfaceLib MuonDigitContainer MuonIdHelpersLib MuonPrepRawData MuonByteStreamCnvTestLib ) + LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel RPCcablingInterfaceLib MuonReadoutGeometry MuonRDO TrigT1RPChardwareLib RPChardware TrigT1RPClogicLib EventInfo MuonMDT_CablingLib TGCcablingInterfaceLib MuonDigitContainer MuonIdHelpersLib MuonPrepRawData MuonByteStreamCnvTestLib MuonCablingData ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h index d0374bdd2aa54fff90f7a981e6817adaa7c350b9..1d6c3bc8755f04357cb8a3af4daf9cde931e55da 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h @@ -12,6 +12,9 @@ #include "MuonRDO/MdtCsmContainer.h" #include "MuonMDT_Cabling/MuonMDT_CablingSvc.h" +#include "MuonCablingData/MuonMDT_CablingMap.h" +#include "StoreGate/ReadCondHandleKey.h" + class MdtIdHelper; ///////////////////////////////////////////////////////////////////////////// @@ -36,6 +39,8 @@ class MdtDigitToMdtRDO : public AthAlgorithm { bool m_BMEpresent; SG::WriteHandleKey<MdtCsmContainer> m_csmContainerKey{this,"OutputObjectName","MDTCSM","WriteHandleKey for Output MdtCsmContainer"}; SG::ReadHandleKey<MdtDigitContainer> m_digitContainerKey{this,"InputObjectName","MDT_DIGITS","ReadHandleKey for Input MdtDigitContainer"}; + SG::ReadCondHandleKey<MuonMDT_CablingMap> m_readKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"}; + }; #endif diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx index 5f6ce979da6fd800733785a143f99db58d3c7f3f..2a748b23c2076a67e2c07ba1d20915966c5d0901 100644 --- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx +++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx @@ -44,6 +44,7 @@ StatusCode MdtDigitToMdtRDO::initialize() ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey ); ATH_CHECK( detStore()->retrieve(m_mdtIdHelper,"MDTIDHELPER") ); ATH_CHECK( m_cabling.retrieve() ); + ATH_CHECK( m_readKey.initialize() ); if ( fillTagInfo().isFailure() ) { ATH_MSG_WARNING( "Could not fill the tagInfo for MDT cabling" ); @@ -95,6 +96,13 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata() const { MdtCsmIdHash hashF; + SG::ReadCondHandle<MuonMDT_CablingMap> readHandle{m_readKey}; + const MuonMDT_CablingMap* readCdo{*readHandle}; + if(readCdo==0){ + ATH_MSG_ERROR("Null pointer to the read conditions object"); + return StatusCode::FAILURE; + } + // Iterate on the collections collection_iterator it_coll = container->begin(); for ( ; it_coll != container->end(); ++it_coll)