ATLAS Offline Software
Loading...
Searching...
No Matches
TileHWIDDetDescrCnv.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
15StatusCode
17{
18 // First call parent init
19 ATH_CHECK( DetDescrConverter::initialize() );
20 return StatusCode::SUCCESS;
21}
22
23//--------------------------------------------------------------------
24
25StatusCode
26TileHWIDDetDescrCnv::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
27{
28 ATH_MSG_INFO("in createObj: creating a TileHWID helper object in the detector store");
29
30 // Get the dictionary manager from the detector store
31 const IdDictManager* idDictMgr;
32 ATH_CHECK( detStore()->retrieve(idDictMgr, "IdDict") );
33
34 // create the helper
35 TileHWID* tilehw_id = new TileHWID;
36
37 ATH_CHECK( idDictMgr->initializeHelper(*tilehw_id) == 0 );
38
39 // Pass a pointer to the container to the Persistency service by reference.
40 pObj = SG::asStorable(tilehw_id);
41
42 return StatusCode::SUCCESS;
43
44}
45
46//--------------------------------------------------------------------
47
48long
53
54long
59
60//--------------------------------------------------------------------
61const CLID&
65
66//--------------------------------------------------------------------
68 :
69 DetDescrConverter(ClassID_traits<TileHWID>::ID(), svcloc, "TileHWIDDetDescrCnv")
70{}
71
#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.
TileHWIDDetDescrCnv(ISvcLocator *svcloc)
virtual long repSvcType() const override
static const CLID & classID()
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
virtual StatusCode initialize() override
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Default, invalid implementation of ClassID_traits.