ATLAS Offline Software
LArOnline_SuperCellIDDetDescrCnv.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 
15 
16 long int
18 {
19  return (storageType());
20 }
21 
24 {
25  // First call parent init
27  return StatusCode::SUCCESS;
28 }
29 
30 //--------------------------------------------------------------------
31 
33 LArOnline_SuperCellIDDetDescrCnv::createObj(IOpaqueAddress* /*pAddr*/, DataObject*& pObj)
34 {
35  ATH_MSG_INFO("in createObj: creating a LArOnline_SuperCellID helper object in the detector store");
36 
37  // Get the dictionary manager from the detector store
38  const IdDictManager* idDictMgr;
39  ATH_CHECK( detStore()->retrieve(idDictMgr, "IdDict") );
40 
41  // create the helper
43  // pass a pointer to IMessageSvc to the helper
44  online_id->setMessageSvc(msgSvc());
45 
46  ATH_CHECK( idDictMgr->initializeHelper(*online_id) == 0 );
47 
48  // Pass a pointer to the container to the Persistency service by reference.
49  pObj = SG::asStorable(online_id);
50 
51  return StatusCode::SUCCESS;
52 
53 }
54 
55 //--------------------------------------------------------------------
56 
57 long
59 {
60  return DetDescr_StorageType;
61 }
62 
63 //--------------------------------------------------------------------
64 const CLID&
67 }
68 
69 //--------------------------------------------------------------------
71  :
72  DetDescrConverter(ClassID_traits<LArOnline_SuperCellID>::ID(), svcloc, "LArOnline_SuperCellIDDetDescrCnv")
73 {}
74 
75 
76 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArOnline_SuperCellIDDetDescrCnv.h
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
LArOnline_SuperCellIDDetDescrCnv::repSvcType
virtual long int repSvcType() const override
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:17
initialize
void initialize()
Definition: run_EoverP.cxx:894
LArOnline_SuperCellIDDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:33
DetDescrAddress.h
IdDictManager.h
LArOnline_SuperCellIDDetDescrCnv::storageType
static long storageType()
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:58
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
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
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:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArOnline_SuperCellIDDetDescrCnv::LArOnline_SuperCellIDDetDescrCnv
LArOnline_SuperCellIDDetDescrCnv(ISvcLocator *svcloc)
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:70
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
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
LArOnline_SuperCellID
Definition: LArOnline_SuperCellID.h:20
LArOnline_SuperCellIDDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:23
DetDescrConverter.h
LArOnline_SuperCellIDDetDescrCnv::classID
static const CLID & classID()
Definition: LArOnline_SuperCellIDDetDescrCnv.cxx:65
LArOnline_SuperCellID.h
StoreGateSvc.h