ATLAS Offline Software
LArElectrodeIDDetDescrCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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"
16 #include "StoreGate/StoreGateSvc.h"
17 
20 
21 
22 long int
24 {
25  return (storageType());
26 }
27 
30 {
31  // First call parent init
33  return StatusCode::SUCCESS;
34 }
35 
36 //--------------------------------------------------------------------
37 
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  // pass a pointer to IMessageSvc to the helper
50  electrode_id->setMessageSvc(msgSvc());
51 
52  ATH_CHECK( idDictMgr->initializeHelper(*electrode_id) == 0 );
53 
54  // Pass a pointer to the container to the Persistency service by reference.
55  pObj = SG::asStorable(electrode_id);
56  return StatusCode::SUCCESS;
57 
58 }
59 
60 //--------------------------------------------------------------------
61 
62 long
64 {
65  return DetDescr_StorageType;
66 }
67 
68 //--------------------------------------------------------------------
69 const CLID&
72 }
73 
74 //--------------------------------------------------------------------
76  :
77  DetDescrConverter(ClassID_traits<LArElectrodeID>::ID(), svcloc, "LArElectrodeIDDetDescrCnv")
78 {}
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArElectrodeIDDetDescrCnv.h
AtlasDetectorID::setMessageSvc
virtual void setMessageSvc(IMessageSvc *msgSvc) override
Definition: AtlasDetectorID.cxx:482
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
LArElectrodeID
Helper for the Liquid Argon Calorimeter cell at the electrode level.
Definition: LArElectrodeID.h:101
initialize
void initialize()
Definition: run_EoverP.cxx:894
LArElectrodeIDDetDescrCnv::repSvcType
virtual long int repSvcType() const override
Definition: LArElectrodeIDDetDescrCnv.cxx:23
LArElectrodeIDDetDescrCnv::LArElectrodeIDDetDescrCnv
LArElectrodeIDDetDescrCnv(ISvcLocator *svcloc)
Definition: LArElectrodeIDDetDescrCnv.cxx:75
DetDescrAddress.h
IdDictManager.h
DetDescrConverter::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Handle to DetectorStore.
Definition: DetDescrConverter.h:33
SG::asStorable
DataObject * asStorable(SG::DataObjectSharedPtr< T > pObject)
Definition: DataObjectSharedPtr.h:65
DetDescrConverter
Definition: DetDescrConverter.h:25
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:37
LArElectrodeIDDetDescrCnv::storageType
static long storageType()
Definition: LArElectrodeIDDetDescrCnv.cxx:63
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdDictManager::initializeHelper
int initializeHelper(IdHelper &helper) const
Return value: 0 OK, >0 error.
Definition: IdDictManager.cxx:44
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
LArElectrodeIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition: LArElectrodeIDDetDescrCnv.cxx:29
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
DetDescrConverter.h
ClassID_traits::ID
static CLID ID()
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:44
LArElectrodeIDDetDescrCnv::classID
static const CLID & classID()
Definition: LArElectrodeIDDetDescrCnv.cxx:70
LArElectrodeID.h
LArElectrodeIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition: LArElectrodeIDDetDescrCnv.cxx:39
StoreGateSvc.h