ATLAS Offline Software
Loading...
Searching...
No Matches
LArHVLineIDDetDescrCnv.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
33LArHVLineIDDetDescrCnv::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
44 ATH_CHECK( idDictMgr->initializeHelper(*hvline_id) == 0 );
45
46 // Pass a pointer to the container to the Persistency service by reference.
47 pObj = SG::asStorable(hvline_id);
48 return StatusCode::SUCCESS;
49
50}
51
52//--------------------------------------------------------------------
53
54long
59
60//--------------------------------------------------------------------
61const CLID&
65
66//--------------------------------------------------------------------
68 :
69 DetDescrConverter(ClassID_traits<LArHVLineID>::ID(), svcloc, "LArHVLineIDDetDescrCnv")
70{}
71
72
73
#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 createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
static const CLID & classID()
LArHVLineIDDetDescrCnv(ISvcLocator *svcloc)
virtual long int repSvcType() const override
virtual StatusCode initialize() override
Helper for the Liquid Argon Calorimeter High-Voltage identifiers.
Definition LArHVLineID.h:43
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Default, invalid implementation of ClassID_traits.