Skip to content
Snippets Groups Projects
Commit b2d8b549 authored by Chikuma Kato's avatar Chikuma Kato
Browse files

adding readCdo in MdtDigitToMdtRDO

Former-commit-id: 7cacde5d
parent b7dd46bd
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
......
......@@ -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
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment