ATLAS Offline Software
Loading...
Searching...
No Matches
LArElectrodeIDDetDescrCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 LAr DetDescrCnv package
7 -----------------------------------------
8 ***************************************************************************/
9
10
12
15#include "GaudiKernel/MsgStream.h"
17
20
21
22long int
27
28StatusCode
30{
31 // First call parent init
32 ATH_CHECK( DetDescrConverter::initialize() );
33 return StatusCode::SUCCESS;
34}
35
36//--------------------------------------------------------------------
37
38StatusCode
39LArElectrodeIDDetDescrCnv::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
40{
41 ATH_MSG_INFO("in createObj: creating a LArElectrodeID helper object in the detector store");
42
43 // Get the dictionary manager from the detector store
44 const IdDictManager* idDictMgr;
45 ATH_CHECK( detStore()->retrieve(idDictMgr, "IdDict") );
46
47 // create the helper
48 LArElectrodeID* electrode_id = new LArElectrodeID;
49
50 ATH_CHECK( idDictMgr->initializeHelper(*electrode_id) == 0 );
51
52 // Pass a pointer to the container to the Persistency service by reference.
53 pObj = SG::asStorable(electrode_id);
54 return StatusCode::SUCCESS;
55
56}
57
58//--------------------------------------------------------------------
59
60long
65
66//--------------------------------------------------------------------
67const CLID&
71
72//--------------------------------------------------------------------
74 :
75 DetDescrConverter(ClassID_traits<LArElectrodeID>::ID(), svcloc, "LArElectrodeIDDetDescrCnv")
76{}
#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
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
virtual long int repSvcType() const override
LArElectrodeIDDetDescrCnv(ISvcLocator *svcloc)
Helper for the Liquid Argon Calorimeter cell at the electrode level.
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Default, invalid implementation of ClassID_traits.