ATLAS Offline Software
TileHWIDDetDescrCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 #include "GaudiKernel/MsgStream.h"
10 #include "StoreGate/StoreGateSvc.h"
11 
14 
17 {
18  // First call parent init
20  return StatusCode::SUCCESS;
21 }
22 
23 //--------------------------------------------------------------------
24 
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  // pass a pointer to IMessageSvc to the helper
38  tilehw_id->setMessageSvc(msgSvc());
39 
40  ATH_CHECK( idDictMgr->initializeHelper(*tilehw_id) == 0 );
41 
42  // Pass a pointer to the container to the Persistency service by reference.
43  pObj = SG::asStorable(tilehw_id);
44 
45  return StatusCode::SUCCESS;
46 
47 }
48 
49 //--------------------------------------------------------------------
50 
51 long
53 {
54  return DetDescr_StorageType;
55 }
56 
57 long
59 {
60  return DetDescr_StorageType;
61 }
62 
63 //--------------------------------------------------------------------
64 const CLID&
67 }
68 
69 //--------------------------------------------------------------------
71  :
72  DetDescrConverter(ClassID_traits<TileHWID>::ID(), svcloc, "TileHWIDDetDescrCnv")
73 {}
74 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::setMessageSvc
virtual void setMessageSvc(IMessageSvc *msgSvc) override
Definition: AtlasDetectorID.cxx:748
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DetDescr_StorageType
const long DetDescr_StorageType
Definition: DetDescrCnvSvc.cxx:20
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
TileHWIDDetDescrCnv::TileHWIDDetDescrCnv
TileHWIDDetDescrCnv(ISvcLocator *svcloc)
Definition: TileHWIDDetDescrCnv.cxx:70
initialize
void initialize()
Definition: run_EoverP.cxx:894
TileHWIDDetDescrCnv::classID
static const CLID & classID()
Definition: TileHWIDDetDescrCnv.cxx:65
TileHWIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition: TileHWIDDetDescrCnv.cxx:26
DetDescrAddress.h
IdDictManager.h
DetDescrConverter::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Handle to DetectorStore.
Definition: DetDescrConverter.h:33
TileHWIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition: TileHWIDDetDescrCnv.cxx:16
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
SG::asStorable
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Definition: DataObjectSharedPtr.h:65
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
DetDescrConverter
Definition: DetDescrConverter.h:25
TileHWID.h
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.Classes.TileHWID
TileHWID
Definition: TileIdentifier/python/Classes.py:5
IdDictManager::initializeHelper
int initializeHelper(IdHelper &helper) const
Return value: 0 OK, >0 error.
Definition: IdDictManager.cxx:44
TileHWIDDetDescrCnv.h
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
TileHWIDDetDescrCnv::repSvcType
virtual long repSvcType() const override
Definition: TileHWIDDetDescrCnv.cxx:58
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
DetDescrConverter.h
TileHWIDDetDescrCnv::storageType
static long storageType()
Definition: TileHWIDDetDescrCnv.cxx:52
StoreGateSvc.h