ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileSvc
TileIdCnv
src
TileHWIDDetDescrCnv.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
#include "
TileIdCnv/TileHWIDDetDescrCnv.h
"
6
7
#include "
DetDescrCnvSvc/DetDescrConverter.h
"
8
#include "
DetDescrCnvSvc/DetDescrAddress.h
"
9
#include "GaudiKernel/MsgStream.h"
10
#include "
StoreGate/StoreGateSvc.h
"
11
12
#include "
IdDictDetDescr/IdDictManager.h
"
13
#include "
TileIdentifier/TileHWID.h
"
14
15
StatusCode
16
TileHWIDDetDescrCnv::initialize
()
17
{
18
// First call parent init
19
ATH_CHECK
( DetDescrConverter::initialize() );
20
return
StatusCode::SUCCESS;
21
}
22
23
//--------------------------------------------------------------------
24
25
StatusCode
26
TileHWIDDetDescrCnv::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
48
long
49
TileHWIDDetDescrCnv::storageType
()
50
{
51
return
DetDescr_StorageType
;
52
}
53
54
long
55
TileHWIDDetDescrCnv::repSvcType
()
const
56
{
57
return
DetDescr_StorageType
;
58
}
59
60
//--------------------------------------------------------------------
61
CLID
62
TileHWIDDetDescrCnv::classID
() {
63
return
ClassID_traits<TileHWID>::ID
();
64
}
65
66
//--------------------------------------------------------------------
67
TileHWIDDetDescrCnv::TileHWIDDetDescrCnv
(ISvcLocator* svcloc)
68
:
69
DetDescrConverter
(
ClassID_traits
<
TileHWID
>::ID(), svcloc,
"TileHWIDDetDescrCnv"
)
70
{}
71
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:31
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
StoreGateSvc.h
TileHWIDDetDescrCnv.h
TileHWID.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
TileHWIDDetDescrCnv::TileHWIDDetDescrCnv
TileHWIDDetDescrCnv(ISvcLocator *svcloc)
Definition
TileHWIDDetDescrCnv.cxx:67
TileHWIDDetDescrCnv::repSvcType
virtual long repSvcType() const override
Definition
TileHWIDDetDescrCnv.cxx:55
TileHWIDDetDescrCnv::classID
static CLID classID()
Definition
TileHWIDDetDescrCnv.cxx:62
TileHWIDDetDescrCnv::storageType
static long storageType()
Definition
TileHWIDDetDescrCnv.cxx:49
TileHWIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition
TileHWIDDetDescrCnv.cxx:26
TileHWIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition
TileHWIDDetDescrCnv.cxx:16
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition
TileHWID.h:49
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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