ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArIdCnv
src
LArElectrodeIDDetDescrCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
LAr DetDescrCnv package
7
-----------------------------------------
8
***************************************************************************/
9
10
11
#include "
LArIdCnv/LArElectrodeIDDetDescrCnv.h
"
12
13
#include "
DetDescrCnvSvc/DetDescrConverter.h
"
14
#include "
DetDescrCnvSvc/DetDescrAddress.h
"
15
#include "GaudiKernel/MsgStream.h"
16
#include "
StoreGate/StoreGateSvc.h
"
17
18
#include "
IdDictDetDescr/IdDictManager.h
"
19
#include "
LArIdentifier/LArElectrodeID.h
"
20
21
22
long
int
23
LArElectrodeIDDetDescrCnv::repSvcType
()
const
24
{
25
return
(
storageType
());
26
}
27
28
StatusCode
29
LArElectrodeIDDetDescrCnv::initialize
()
30
{
31
// First call parent init
32
ATH_CHECK
( DetDescrConverter::initialize() );
33
return
StatusCode::SUCCESS;
34
}
35
36
//--------------------------------------------------------------------
37
38
StatusCode
39
LArElectrodeIDDetDescrCnv::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
60
long
61
LArElectrodeIDDetDescrCnv::storageType
()
62
{
63
return
DetDescr_StorageType
;
64
}
65
66
//--------------------------------------------------------------------
67
CLID
68
LArElectrodeIDDetDescrCnv::classID
() {
69
return
ClassID_traits<LArElectrodeID>::ID
();
70
}
71
72
//--------------------------------------------------------------------
73
LArElectrodeIDDetDescrCnv::LArElectrodeIDDetDescrCnv
(ISvcLocator* svcloc)
74
:
75
DetDescrConverter
(
ClassID_traits
<
LArElectrodeID
>::ID(), svcloc,
"LArElectrodeIDDetDescrCnv"
)
76
{}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x,...)
Definition
AthMsgStreamMacros.h:45
DetDescrAddress.h
DetDescr_StorageType
const long DetDescr_StorageType
Definition
DetDescrCnvSvc.cxx:20
DetDescrConverter.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IdDictManager.h
LArElectrodeIDDetDescrCnv.h
LArElectrodeID.h
StoreGateSvc.h
DetDescrConverter::DetDescrConverter
DetDescrConverter(const CLID &myCLID, ISvcLocator *svcloc, const char *name=nullptr)
Definition
DetDescrConverter.cxx:34
DetDescrConverter::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Handle to DetectorStore.
Definition
DetDescrConverter.h:33
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition
IdDictManager.h:26
IdDictManager::initializeHelper
int initializeHelper(IdHelper &helper) const
Return value: 0 OK, >0 error.
Definition
IdDictManager.cxx:37
LArElectrodeIDDetDescrCnv::storageType
static long storageType()
Definition
LArElectrodeIDDetDescrCnv.cxx:61
LArElectrodeIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition
LArElectrodeIDDetDescrCnv.cxx:29
LArElectrodeIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition
LArElectrodeIDDetDescrCnv.cxx:39
LArElectrodeIDDetDescrCnv::repSvcType
virtual long int repSvcType() const override
Definition
LArElectrodeIDDetDescrCnv.cxx:23
LArElectrodeIDDetDescrCnv::LArElectrodeIDDetDescrCnv
LArElectrodeIDDetDescrCnv(ISvcLocator *svcloc)
Definition
LArElectrodeIDDetDescrCnv.cxx:73
LArElectrodeIDDetDescrCnv::classID
static CLID classID()
Definition
LArElectrodeIDDetDescrCnv.cxx:68
LArElectrodeID
Helper for the Liquid Argon Calorimeter cell at the electrode level.
Definition
LArElectrodeID.h:95
SG::asStorable
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Definition
DataObjectSharedPtr.h:31
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
ClassID_traits::ID
static constexpr CLID ID()
Definition
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:44
Generated on
for ATLAS Offline Software by
1.17.0