ATLAS Offline Software
DetDescrCnvSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DETDESCRCNVSVC_DETDESCRCNVSVC_H
6 #define DETDESCRCNVSVC_DETDESCRCNVSVC_H
7 
8 #include "GaudiKernel/ConversionSvc.h"
9 
10 // Forward declarations
11 template <class TYPE>
12 class SvcFactory;
13 
14 class IOpaqueAddress;
15 class StoreGateSvc;
16 
17 class DetDescrCnvSvc : public ConversionSvc {
19  friend class SvcFactory<DetDescrCnvSvc>;
20 
21  public:
23  virtual StatusCode initialize();
24  virtual StatusCode queryInterface(const InterfaceID &riid,
25  void **ppvInterface);
26 
28  virtual StatusCode addToDetStore(const CLID &clid,
29  const std::string &name) const;
30 
32  virtual StatusCode createAddress(long svc_type, const CLID &clid,
33  const std::string *par,
34  const unsigned long *ip,
35  IOpaqueAddress *&refpAddress);
36 
38  virtual StatusCode createAddress(long svc_type, const CLID &clid,
39  const std::string &refAddress,
40  IOpaqueAddress *&refpAddress);
41 
43  virtual StatusCode convertAddress(const IOpaqueAddress *pAddress,
44  std::string &refAddress);
45 
48  DetDescrCnvSvc(const std::string &name, ISvcLocator *svc);
50 
52  virtual ~DetDescrCnvSvc();
53 
54  private:
56 
57  void initTDSItems();
58 
60  StringArrayProperty m_detMgrs{this, "DetectorManagers", {}};
61  StringArrayProperty m_detNodes{this, "DetectorNodes", {}};
62  BooleanProperty m_decodeIdDict{this, "DecodeIdDict", true};
63  BooleanProperty m_idDictFromRDB{this, "IdDictFromRDB", false};
64  StringProperty m_idDictName{this, "IdDictName", ""};
65  StringProperty m_idDictGlobalTag{this, "IdDictGlobalTag", ""};
66  StringProperty m_idDictATLASName{this, "AtlasIDFileName", ""};
67  StringProperty m_idDictInDetName{this, "InDetIDFileName", ""};
68  StringProperty m_idDictLArName{this, "LArIDFileName", ""};
69  StringProperty m_idDictTileName{this, "TileIDFileName", ""};
70  StringProperty m_idDictLVL1Name{this, "CaloIDFileName", ""};
71  StringProperty m_idDictMuonName{this, "MuonIDFileName", ""};
72  StringProperty m_idDictLArHighVoltageName{this, "HighVoltageIDFileName",
73  ""};
74  StringProperty m_idDictLArElectrodeName{this, "LArElectrodeIDFileName", ""};
75  StringProperty m_idDictForwardName{this, "ForwardIDFileName", ""};
76  StringProperty m_fcal2dNeighborsName{this, "FCAL2DNeighborsFileName", ""};
77  StringProperty m_fcal3dNeighborsNextName{this,
78  "FCAL3DNeighborsNextFileName", ""};
79  StringProperty m_fcal3dNeighborsPrevName{this,
80  "FCAL3DNeighborsPrevFileName", ""};
81  StringProperty m_tileNeighborsName{this, "TileNeighborsFileName", ""};
82  StringProperty m_fullAtlasNeighborsName{this, "FullAtlasNeighborsFileName",
83  ""};
84 
85  BooleanProperty m_fromRoot{this, "ReadFromROOT", false};
86  BooleanProperty m_fromNova{this, "ReadFromNova", false};
87  BooleanProperty m_detElemsfromDetNodes{this, "InitDetElemsFromGeoModel",
88  false};
89  BooleanProperty m_compact_ids_only{this, "CompactIDsOnly", false};
90  BooleanProperty m_do_checks{this, "DoIdChecks", false};
91  BooleanProperty m_do_neighbours{this, "DoInitNeighbours", true};
92 
94 
95  BooleanProperty m_hasCSC{this, "HasCSC", false};
96  BooleanProperty m_hasSTGC{this, "HasSTgc", false};
97  BooleanProperty m_hasMM{this, "HasMM", false};
98  BooleanProperty m_hasMDT{this, "HasMDT", true};
99  BooleanProperty m_hasRPC{this, "HasRPC", true};
100  BooleanProperty m_hasTGC{this, "HasTGC", true};
101 
102  BooleanProperty m_useGeomDB_InDet{this, "useGeomDB_InDet", false};
103 
104  inline MsgStream &msg(MSG::Level lvl) const { return msgStream(lvl); }
105 };
106 #endif
DetDescrCnvSvc::m_fromNova
BooleanProperty m_fromNova
Definition: DetDescrCnvSvc.h:86
DetDescrCnvSvc::m_idDictName
StringProperty m_idDictName
Definition: DetDescrCnvSvc.h:64
DetDescrCnvSvc::m_decodeIdDict
BooleanProperty m_decodeIdDict
Definition: DetDescrCnvSvc.h:62
DetDescrCnvSvc::m_detNodes
StringArrayProperty m_detNodes
Definition: DetDescrCnvSvc.h:61
DetDescrCnvSvc
Definition: DetDescrCnvSvc.h:17
DetDescrCnvSvc::m_idDictForwardName
StringProperty m_idDictForwardName
Definition: DetDescrCnvSvc.h:75
SvcFactory
Definition: AthCnvSvc.h:28
DetDescrCnvSvc::m_hasMDT
BooleanProperty m_hasMDT
Definition: DetDescrCnvSvc.h:98
DetDescrCnvSvc::m_idDictMuonName
StringProperty m_idDictMuonName
Definition: DetDescrCnvSvc.h:71
DetDescrCnvSvc::m_idDictLVL1Name
StringProperty m_idDictLVL1Name
Definition: DetDescrCnvSvc.h:70
DetDescrCnvSvc::m_idDictLArHighVoltageName
StringProperty m_idDictLArHighVoltageName
Definition: DetDescrCnvSvc.h:72
DetDescrCnvSvc::initialize
virtual StatusCode initialize()
Initialize the service.
Definition: DetDescrCnvSvc.cxx:52
DetDescrCnvSvc::m_do_checks
BooleanProperty m_do_checks
Definition: DetDescrCnvSvc.h:90
DetDescrCnvSvc::m_idDictTileName
StringProperty m_idDictTileName
Definition: DetDescrCnvSvc.h:69
DetDescrCnvSvc::m_fcal3dNeighborsNextName
StringProperty m_fcal3dNeighborsNextName
Definition: DetDescrCnvSvc.h:77
DetDescrCnvSvc::m_hasSTGC
BooleanProperty m_hasSTGC
Definition: DetDescrCnvSvc.h:96
DetDescrCnvSvc::convertAddress
virtual StatusCode convertAddress(const IOpaqueAddress *pAddress, std::string &refAddress)
Convert address to string form.
Definition: DetDescrCnvSvc.cxx:163
DetDescrCnvSvc::m_idDictLArElectrodeName
StringProperty m_idDictLArElectrodeName
Definition: DetDescrCnvSvc.h:74
DetDescrCnvSvc::m_hasCSC
BooleanProperty m_hasCSC
Switch on/off the muon detectors.
Definition: DetDescrCnvSvc.h:95
DetDescrCnvSvc::m_hasMM
BooleanProperty m_hasMM
Definition: DetDescrCnvSvc.h:97
DetDescrCnvSvc::m_detStore
StoreGateSvc * m_detStore
Definition: DetDescrCnvSvc.h:59
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
DetDescrCnvSvc::m_idDictLArName
StringProperty m_idDictLArName
Definition: DetDescrCnvSvc.h:68
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
DetDescrCnvSvc::m_detElemsfromDetNodes
BooleanProperty m_detElemsfromDetNodes
Definition: DetDescrCnvSvc.h:87
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DetDescrCnvSvc::m_fromRoot
BooleanProperty m_fromRoot
Definition: DetDescrCnvSvc.h:85
DetDescrCnvSvc::m_fcal2dNeighborsName
StringProperty m_fcal2dNeighborsName
Definition: DetDescrCnvSvc.h:76
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
DetDescrCnvSvc::~DetDescrCnvSvc
virtual ~DetDescrCnvSvc()
Standard Destructor.
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
DetDescrCnvSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Identify interfaces to which this service is responsive.
Definition: DetDescrCnvSvc.cxx:36
DetDescrCnvSvc::m_idDictInDetName
StringProperty m_idDictInDetName
Definition: DetDescrCnvSvc.h:67
DetDescrCnvSvc::m_compact_ids_only
BooleanProperty m_compact_ids_only
Definition: DetDescrCnvSvc.h:89
DetDescrCnvSvc::m_idDictATLASName
StringProperty m_idDictATLASName
Definition: DetDescrCnvSvc.h:66
DetDescrCnvSvc::m_useGeomDB_InDet
BooleanProperty m_useGeomDB_InDet
Definition: DetDescrCnvSvc.h:102
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
DetDescrCnvSvc::m_idDictFromRDB
BooleanProperty m_idDictFromRDB
Definition: DetDescrCnvSvc.h:63
DetDescrCnvSvc::msg
MsgStream & msg(MSG::Level lvl) const
Definition: DetDescrCnvSvc.h:104
DetDescrCnvSvc::initTDSItems
void initTDSItems()
DetDescrCnvSvc::createAddress
virtual StatusCode createAddress(long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
Basic create address.
Definition: DetDescrCnvSvc.cxx:126
DetDescrCnvSvc::DetDescrCnvSvc
DetDescrCnvSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
Definition: DetDescrCnvSvc.cxx:25
DetDescrCnvSvc::m_fullAtlasNeighborsName
StringProperty m_fullAtlasNeighborsName
Definition: DetDescrCnvSvc.h:82
DetDescrCnvSvc::m_do_neighbours
BooleanProperty m_do_neighbours
Definition: DetDescrCnvSvc.h:91
DetDescrCnvSvc::addToDetStore
virtual StatusCode addToDetStore(const CLID &clid, const std::string &name) const
Add new address to the Detector Store.
Definition: DetDescrCnvSvc.cxx:174
DetDescrCnvSvc::m_tileNeighborsName
StringProperty m_tileNeighborsName
Definition: DetDescrCnvSvc.h:81
DetDescrCnvSvc::m_detMgrs
StringArrayProperty m_detMgrs
Definition: DetDescrCnvSvc.h:60
DetDescrCnvSvc::fillTDSRefs
StatusCode fillTDSRefs()
DetDescrCnvSvc::m_fcal3dNeighborsPrevName
StringProperty m_fcal3dNeighborsPrevName
Definition: DetDescrCnvSvc.h:79
DetDescrCnvSvc::m_hasRPC
BooleanProperty m_hasRPC
Definition: DetDescrCnvSvc.h:99
DetDescrCnvSvc::m_idDictGlobalTag
StringProperty m_idDictGlobalTag
Definition: DetDescrCnvSvc.h:65
DetDescrCnvSvc::m_hasTGC
BooleanProperty m_hasTGC
Definition: DetDescrCnvSvc.h:100