ATLAS Offline Software
LArHVLineIDDetDescrCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 #include "GaudiKernel/MsgStream.h"
10 #include "StoreGate/StoreGateSvc.h"
11 
14 
15 
16 long int
18 {
19  return (storageType());
20 }
21 
24 {
25  // First call parent init
27  return StatusCode::SUCCESS;
28 }
29 
30 //--------------------------------------------------------------------
31 
33 LArHVLineIDDetDescrCnv::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
34 {
35  ATH_MSG_INFO("in createObj: creating a LArHVLineID helper object in the detector store");
36 
37  // Get the dictionary manager from the detector store
38  const IdDictManager* idDictMgr;
39  ATH_CHECK( detStore()->retrieve(idDictMgr, "IdDict") );
40 
41  // create the helper
42  LArHVLineID* hvline_id = new LArHVLineID;
43  // pass a pointer to IMessageSvc to the helper
44  hvline_id->setMessageSvc(msgSvc());
45 
46  ATH_CHECK( idDictMgr->initializeHelper(*hvline_id) == 0 );
47 
48  // Pass a pointer to the container to the Persistency service by reference.
49  pObj = SG::asStorable(hvline_id);
50  return StatusCode::SUCCESS;
51 
52 }
53 
54 //--------------------------------------------------------------------
55 
56 long
58 {
59  return DetDescr_StorageType;
60 }
61 
62 //--------------------------------------------------------------------
63 const CLID&
66 }
67 
68 //--------------------------------------------------------------------
70  :
71  DetDescrConverter(ClassID_traits<LArHVLineID>::ID(), svcloc, "LArHVLineIDDetDescrCnv")
72 {}
73 
74 
75 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::setMessageSvc
virtual void setMessageSvc(IMessageSvc *msgSvc) override
Definition: AtlasDetectorID.cxx:748
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DetDescr_StorageType
const long DetDescr_StorageType
Definition: DetDescrCnvSvc.cxx:20
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
initialize
void initialize()
Definition: run_EoverP.cxx:894
DetDescrAddress.h
SG::asStorable
DataObject * asStorable(T *pObject)
Definition: StorableConversions.h:158
IdDictManager.h
LArHVLineID.h
DetDescrConverter::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Handle to DetectorStore.
Definition: DetDescrConverter.h:33
LArHVLineIDDetDescrCnv::LArHVLineIDDetDescrCnv
LArHVLineIDDetDescrCnv(ISvcLocator *svcloc)
Definition: LArHVLineIDDetDescrCnv.cxx:69
LArHVLineIDDetDescrCnv::storageType
static long storageType()
Definition: LArHVLineIDDetDescrCnv.cxx:57
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
DetDescrConverter
Definition: DetDescrConverter.h:25
LArHVLineIDDetDescrCnv::classID
static const CLID & classID()
Definition: LArHVLineIDDetDescrCnv.cxx:64
LArHVLineIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition: LArHVLineIDDetDescrCnv.cxx:33
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
LArHVLineIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition: LArHVLineIDDetDescrCnv.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdDictManager::initializeHelper
int initializeHelper(IdHelper &helper) const
Return value: 0 OK, >0 error.
Definition: IdDictManager.cxx:44
LArHVLineIDDetDescrCnv.h
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
LArHVLineIDDetDescrCnv::repSvcType
virtual long int repSvcType() const override
Definition: LArHVLineIDDetDescrCnv.cxx:17
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
DetDescrConverter.h
StoreGateSvc.h
LArHVLineID
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.
Definition: LArHVLineID.h:48