2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5#include "AthenaKernel/StorableConversions.h"
6#include "DetDescrCnvSvc/DetDescrConverter.h"
7#include "IdDictDetDescr/IdDictManager.h"
11template <class IDHELPER>
12T_Muon_IDDetDescrCnv<IDHELPER>::T_Muon_IDDetDescrCnv(ISvcLocator* svcloc, const char* name)
13 : DetDescrConverter(ClassID_traits<IDHELPER>::ID(), svcloc, name)
17template <class IDHELPER>
19T_Muon_IDDetDescrCnv<IDHELPER>::initialize()
21 ATH_CHECK( DetDescrConverter::initialize() );
22 return StatusCode::SUCCESS;
26template <class IDHELPER>
28T_Muon_IDDetDescrCnv<IDHELPER>::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
30 ATH_MSG_DEBUG("in createObj: creating a helper object in the detector store");
32 // Get the dictionary manager from the detector store.
33 const IdDictManager* idDictMgr = nullptr;
34 ATH_CHECK( detStore()->retrieve(idDictMgr, "IdDict") );
37 auto id_helper = new IDHELPER;
38 ATH_CHECK( idDictMgr->initializeHelper(*id_helper)==0 );
40 // Pass a pointer to the container to the Persistency service by reference.
41 pObj = SG::asStorable(id_helper);
43 return StatusCode::SUCCESS;