ATLAS Offline Software
Loading...
Searching...
No Matches
LArOnlineIDDetDescrCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9#include "GaudiKernel/MsgStream.h"
11
14
15
16long int
18{
19 return (storageType());
20}
21
22StatusCode
24{
25 // First call parent init
26 ATH_CHECK( DetDescrConverter::initialize() );
27 return StatusCode::SUCCESS;
28}
29
30//--------------------------------------------------------------------
31
32StatusCode
33LArOnlineIDDetDescrCnv::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
34{
35 ATH_MSG_INFO("in createObj: creating a LArOnlineID 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 LArOnlineID* online_id = new LArOnlineID;
43
44 ATH_CHECK( idDictMgr->initializeHelper(*online_id) == 0 );
45
46 // Pass a pointer to the container to the Persistency service by reference.
47 pObj = SG::asStorable(online_id);
48
49 return StatusCode::SUCCESS;
50
51}
52
53//--------------------------------------------------------------------
54
55long
60
61//--------------------------------------------------------------------
62const CLID&
66
67//--------------------------------------------------------------------
69 :
70 DetDescrConverter(ClassID_traits<LArOnlineID>::ID(), svcloc, "LArOnlineIDDetDescrCnv")
71{}
72
73
74
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
std::vector< Identifier > ID
const long DetDescr_StorageType
uint32_t CLID
The Class ID type.
DetDescrConverter(const CLID &myCLID, ISvcLocator *svcloc, const char *name=nullptr)
const ServiceHandle< StoreGateSvc > & detStore() const
Handle to DetectorStore.
IdDictManager is the interface to identifier dictionaries.
int initializeHelper(IdHelper &helper) const
Return value: 0 OK, >0 error.
virtual StatusCode initialize() override
static const CLID & classID()
virtual long int repSvcType() const override
LArOnlineIDDetDescrCnv(ISvcLocator *svcloc)
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Default, invalid implementation of ClassID_traits.