ATLAS Offline Software
IdDictDetDescrCnv.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IDDICTDETDESCRCNV_IDDICTDETDESCRCNV_H
6 #define IDDICTDETDESCRCNV_IDDICTDETDESCRCNV_H
7 
19 //<<<<<< INCLUDES >>>>>>
20 
24 #include "GaudiKernel/ServiceHandle.h"
26 //<<<<<< PUBLIC TYPES >>>>>>
27 
28 class IdDictManager;
29 
30 //<<<<<< CLASS DECLARATIONS >>>>>>
31 
43  public:
44  virtual long int repSvcType() const override;
45  virtual StatusCode initialize() override;
46  virtual StatusCode finalize() override;
47  virtual StatusCode createObj(IOpaqueAddress *pAddr,
48  DataObject *&pObj) override;
49 
51  static long int storageType();
52  static const CLID &classID();
53 
54  IdDictDetDescrCnv(ISvcLocator *svcloc);
55 
56  private:
57 
58  ServiceHandle<IGeoDbTagSvc> m_geoDbTagSvc{"GeoDbTagSvc/GeoDbTagSvc", "IdDictDetDescrCnv"};
59  ServiceHandle<IRDBAccessSvc> m_rdbAccessSvc{"RDBAccessSvc/RDBAccessSvc", "IdDictDetDescrCnv"};
60 
62  SmartIF<IProperty> m_detDescrProxy;
63 
67  template <class dType>
68  StatusCode loadProperty(const std::string &propertyName, dType &pipeTo);
69 
72  template <class dType>
73  StatusCode loadPropertyWithParse(const std::string &propertyName,
74  dType &pipeTo);
75 
78 
81 
84 
87 
89  void printDicts(const IdDictManager *dictMgr);
90 
94 
96  std::unique_ptr<IdDictParser> m_parser{};
97 
99  bool m_doChecks{false};
100 
102  bool m_doNeighbours{true};
103 
105  std::string m_idDictName{};
106 
108  bool m_idDictFromRDB{false};
109 
112  bool m_doParsing{true};
113 
115  std::string m_atlasIDFileName{};
116 
118  std::string m_inDetIDFileName{};
119 
121  std::string m_larIDFileName{};
122 
124  std::string m_tileIDFileName{};
125 
127  std::string m_caloIDFileName{};
128 
131  std::string m_fcal2dNeighborsName{};
134  std::string m_tileNeighborsName{};
135 
137  std::string m_muonIDFileName{};
138 
140  std::string m_forwardIDFileName{};
141 
143  std::string m_atlasIdDictTag{};
144 
146  std::string m_inDetIdDictTag{};
147 
149  std::string m_larIdDictTag{};
150 
152  std::string m_tileIdDictTag{};
153 
155  std::string m_caloIdDictTag{};
156 
158  std::string m_muonIdDictTag{};
159 
161  std::string m_forwardIdDictTag{};
162 
164  std::string m_inDetIDTag{};
165 
166  // Flag to read InDet geometry from the Geom DB
167  bool m_useGeomDB_InDet{false};
168 };
169 
170 #endif // IDDICTDETDESCRCNV_IDDICTDETDESCRCNV_H
IdDictDetDescrCnv::m_tileIdDictTag
std::string m_tileIdDictTag
Tag of RDB record for Tile ids.
Definition: IdDictDetDescrCnv.h:152
IdDictDetDescrCnv::m_idDictName
std::string m_idDictName
Name of top-level xml dict file.
Definition: IdDictDetDescrCnv.h:105
IdDictDetDescrCnv::loadProperty
StatusCode loadProperty(const std::string &propertyName, dType &pipeTo)
Loads the property from the DetDecrCnvSvc and pipes its value Returns failure if either the service,...
Definition: IdDictDetDescrCnv.cxx:639
IdDictDetDescrCnv::m_atlasIDFileName
std::string m_atlasIDFileName
File to be read for top-level subsystem ids values.
Definition: IdDictDetDescrCnv.h:115
IdDictDetDescrCnv::m_fcal3dNeighborsPrevName
std::string m_fcal3dNeighborsPrevName
Definition: IdDictDetDescrCnv.h:133
IdDictDetDescrCnv::registerInfoWithDicts
StatusCode registerInfoWithDicts()
Register the requested files and tag with the created id dicts.
Definition: IdDictDetDescrCnv.cxx:589
IdDictDetDescrCnv::m_inDetIDTag
std::string m_inDetIDTag
Internal InDet id tag.
Definition: IdDictDetDescrCnv.h:164
IdDictDetDescrCnv::m_atlasIdDictTag
std::string m_atlasIdDictTag
Tag of RDB record for Atlas top-level ids.
Definition: IdDictDetDescrCnv.h:143
IdDictDetDescrCnv::getFileNamesFromTags
StatusCode getFileNamesFromTags()
Get file names from properties.
Definition: IdDictDetDescrCnv.cxx:322
IdDictDetDescrCnv::m_doNeighbours
bool m_doNeighbours
Flag to generate neighbor information - for calos.
Definition: IdDictDetDescrCnv.h:102
IdDictDetDescrCnv::m_muonIDFileName
std::string m_muonIDFileName
File to be read for Muon ids.
Definition: IdDictDetDescrCnv.h:137
IdDictDetDescrCnv::m_fullAtlasNeighborsName
std::string m_fullAtlasNeighborsName
Files for Calo Neighbors.
Definition: IdDictDetDescrCnv.h:130
IdDictDetDescrCnv::m_detDescrProxy
SmartIF< IProperty > m_detDescrProxy
Propxy to the DetDescrCnvSvc.
Definition: IdDictDetDescrCnv.h:62
IdDictDetDescrCnv::m_fcal2dNeighborsName
std::string m_fcal2dNeighborsName
Definition: IdDictDetDescrCnv.h:131
IdDictDetDescrCnv::finalize
virtual StatusCode finalize() override
Definition: IdDictDetDescrCnv.cxx:48
IdDictDetDescrCnv::m_forwardIDFileName
std::string m_forwardIDFileName
File to be read for Forward det ids.
Definition: IdDictDetDescrCnv.h:140
IdDictDetDescrCnv::m_tileIDFileName
std::string m_tileIDFileName
File to be read for Tile ids.
Definition: IdDictDetDescrCnv.h:124
IdDictDetDescrCnv::parseXMLDescription
StatusCode parseXMLDescription()
Create and (re)initialize the IdDictManager - only create the first time.
Definition: IdDictDetDescrCnv.cxx:110
IdDictDetDescrCnv::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
Definition: IdDictDetDescrCnv.cxx:54
IdDictDetDescrCnv::m_larIDFileName
std::string m_larIDFileName
File to be read for LAr ids.
Definition: IdDictDetDescrCnv.h:121
IdDictDetDescrCnv::m_tileNeighborsName
std::string m_tileNeighborsName
Definition: IdDictDetDescrCnv.h:134
IdDictDetDescrCnv
Converter for the DetDescrCnvSvc which parses the identifier xml dictionaries and creates an IdDictMa...
Definition: IdDictDetDescrCnv.h:42
IdDictDetDescrCnv::m_inDetIdDictTag
std::string m_inDetIdDictTag
Tag of RDB record for InDet ids.
Definition: IdDictDetDescrCnv.h:146
IdDictDetDescrCnv::IdDictDetDescrCnv
IdDictDetDescrCnv(ISvcLocator *svcloc)
Definition: IdDictDetDescrCnv.cxx:246
IdDictParser.h
DetDescrConverter
Definition: DetDescrConverter.h:25
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
IdDictDetDescrCnv::m_larIdDictTag
std::string m_larIdDictTag
Tag of RDB record for LAr ids.
Definition: IdDictDetDescrCnv.h:149
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IdDictDetDescrCnv::m_doChecks
bool m_doChecks
Flag to tell helpers to do Checks.
Definition: IdDictDetDescrCnv.h:99
IdDictDetDescrCnv::initialize
virtual StatusCode initialize() override
Definition: IdDictDetDescrCnv.cxx:36
IdDictDetDescrCnv::registerFilesWithParser
StatusCode registerFilesWithParser()
Register the requested files with the xml parser.
Definition: IdDictDetDescrCnv.cxx:536
IdDictDetDescrCnv::m_inDetIDFileName
std::string m_inDetIDFileName
File to be read for InDet ids.
Definition: IdDictDetDescrCnv.h:118
IdDictDetDescrCnv::m_useGeomDB_InDet
bool m_useGeomDB_InDet
Definition: IdDictDetDescrCnv.h:167
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
IdDictDetDescrCnv::m_fcal3dNeighborsNextName
std::string m_fcal3dNeighborsNextName
Definition: IdDictDetDescrCnv.h:132
IdDictDetDescrCnv::m_muonIdDictTag
std::string m_muonIdDictTag
Tag of RDB record for Muon ids.
Definition: IdDictDetDescrCnv.h:158
IdDictDetDescrCnv::repSvcType
virtual long int repSvcType() const override
Definition: IdDictDetDescrCnv.cxx:30
IdDictDetDescrCnv::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: IdDictDetDescrCnv.h:58
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
IdDictDetDescrCnv::m_caloIdDictTag
std::string m_caloIdDictTag
Tag of RDB record for Calo ids.
Definition: IdDictDetDescrCnv.h:155
IdDictDetDescrCnv::classID
static const CLID & classID()
Definition: IdDictDetDescrCnv.cxx:241
IdDictDetDescrCnv::m_rdbAccessSvc
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
Definition: IdDictDetDescrCnv.h:59
DetDescrConverter.h
IdDictDetDescrCnv::m_forwardIdDictTag
std::string m_forwardIdDictTag
Tag of RDB record for forwards det ids.
Definition: IdDictDetDescrCnv.h:161
IdDictDetDescrCnv::m_caloIDFileName
std::string m_caloIDFileName
File to be read for Calo ids.
Definition: IdDictDetDescrCnv.h:127
IdDictDetDescrCnv::loadPropertyWithParse
StatusCode loadPropertyWithParse(const std::string &propertyName, dType &pipeTo)
Same as loadProperty but additionally m_doParsing is set to true if the input value does not match th...
Definition: IdDictDetDescrCnv.cxx:665
IdDictDetDescrCnv::m_parser
std::unique_ptr< IdDictParser > m_parser
The xml parser for the dictionary descriptions.
Definition: IdDictDetDescrCnv.h:96
IdDictDetDescrCnv::printDicts
void printDicts(const IdDictManager *dictMgr)
Print out the contained dictionaries and version.
Definition: IdDictDetDescrCnv.cxx:250
IdDictDetDescrCnv::getFileNamesFromProperties
StatusCode getFileNamesFromProperties()
Get file names from properties.
Definition: IdDictDetDescrCnv.cxx:293
IdDictDetDescrCnv::m_idDictFromRDB
bool m_idDictFromRDB
Flag to get dict parameters from Relational DetDescr DB.
Definition: IdDictDetDescrCnv.h:108
IdDictDetDescrCnv::m_doParsing
bool m_doParsing
Flag to which determines whether the xml files are parsed or not.
Definition: IdDictDetDescrCnv.h:112
IGeoDbTagSvc.h
IdDictDetDescrCnv::storageType
static long int storageType()
Storage type and class ID (used by CnvFactory)
Definition: IdDictDetDescrCnv.cxx:236
ServiceHandle< IGeoDbTagSvc >