ATLAS Offline Software
Loading...
Searching...
No Matches
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
18
19//<<<<<< INCLUDES >>>>>>
20
24#include "GaudiKernel/ServiceHandle.h"
26//<<<<<< PUBLIC TYPES >>>>>>
27
28class IdDictManager;
29
30//<<<<<< CLASS DECLARATIONS >>>>>>
31
41
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
77 StatusCode getFileNamesFromProperties();
78
80 StatusCode getFileNamesFromTags();
81
83 StatusCode registerFilesWithParser();
84
86 StatusCode registerInfoWithDicts();
87
89 void printDicts(const IdDictManager *dictMgr);
90
93 StatusCode parseXMLDescription();
94
97
99 std::unique_ptr<IdDictParser> m_parser{};
100
102 bool m_doChecks{false};
103
105 bool m_doNeighbours{true};
106
108 std::string m_idDictName{};
109
111 bool m_idDictFromRDB{false};
112
115 bool m_doParsing{true};
116
118 std::string m_atlasIDFileName{};
119
121 std::string m_inDetIDFileName{};
122
124 std::string m_larIDFileName{};
125
127 std::string m_tileIDFileName{};
128
130 std::string m_caloIDFileName{};
131
137 std::string m_tileNeighborsName{};
138
140 std::string m_muonIDFileName{};
141
143 std::string m_forwardIDFileName{};
144
146 std::string m_atlasIdDictTag{};
147
149 std::string m_inDetIdDictTag{};
150
152 std::string m_larIdDictTag{};
153
155 std::string m_tileIdDictTag{};
156
158 std::string m_caloIdDictTag{};
159
161 std::string m_muonIdDictTag{};
162
164 std::string m_forwardIdDictTag{};
165
167 std::string m_inDetIDTag{};
168
169 // Flag to read InDet geometry from the Geom DB
170 bool m_useGeomDB_InDet{false};
171};
172
173#endif // IDDICTDETDESCRCNV_IDDICTDETDESCRCNV_H
uint32_t CLID
The Class ID type.
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
DetDescrConverter(const CLID &myCLID, ISvcLocator *svcloc, const char *name=nullptr)
std::string m_muonIdDictTag
Tag of RDB record for Muon ids.
std::string m_tileIdDictTag
Tag of RDB record for Tile ids.
std::string m_fcal2dNeighborsName
std::string m_atlasIdDictTag
Tag of RDB record for Atlas top-level ids.
std::string m_atlasIDFileName
File to be read for top-level subsystem ids values.
std::string m_tileNeighborsName
std::string m_forwardIdDictTag
Tag of RDB record for forwards det ids.
std::string m_caloIDFileName
File to be read for Calo ids.
void collectCaloNeighbors(IRDBRecordset_ptr recordset)
A helper function for collecting calo neighbor file names from the database.
StatusCode getFileNamesFromTags()
Get file names from properties.
bool m_doParsing
Flag to which determines whether the xml files are parsed or not.
IdDictDetDescrCnv(ISvcLocator *svcloc)
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
std::string m_inDetIdDictTag
Tag of RDB record for InDet ids.
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
void printDicts(const IdDictManager *dictMgr)
Print out the contained dictionaries and version.
static const CLID & classID()
StatusCode registerInfoWithDicts()
Register the requested files and tag with the created id dicts.
bool m_idDictFromRDB
Flag to get dict parameters from Relational DetDescr DB.
virtual StatusCode initialize() override
StatusCode getFileNamesFromProperties()
Get file names from properties.
std::string m_muonIDFileName
File to be read for Muon ids.
std::string m_inDetIDFileName
File to be read for InDet ids.
std::string m_forwardIDFileName
File to be read for Forward det ids.
std::string m_fullAtlasNeighborsName
Files for Calo Neighbors.
virtual long int repSvcType() const override
std::string m_fcal3dNeighborsNextName
virtual StatusCode finalize() override
std::string m_larIdDictTag
Tag of RDB record for LAr ids.
std::string m_tileIDFileName
File to be read for Tile ids.
std::unique_ptr< IdDictParser > m_parser
The xml parser for the dictionary descriptions.
bool m_doNeighbours
Flag to generate neighbor information - for calos.
std::string m_idDictName
Name of top-level xml dict file.
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
std::string m_caloIdDictTag
Tag of RDB record for Calo ids.
StatusCode registerFilesWithParser()
Register the requested files with the xml parser.
SmartIF< IProperty > m_detDescrProxy
Propxy to the DetDescrCnvSvc.
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...
bool m_doChecks
Flag to tell helpers to do Checks.
StatusCode loadProperty(const std::string &propertyName, dType &pipeTo)
Loads the property from the DetDecrCnvSvc and pipes its value Returns failure if either the service,...
std::string m_inDetIDTag
Internal InDet id tag.
std::string m_larIDFileName
File to be read for LAr ids.
StatusCode parseXMLDescription()
Create and (re)initialize the IdDictManager - only create the first time.
static long int storageType()
Storage type and class ID (used by CnvFactory)
std::string m_fcal3dNeighborsPrevName
IdDictManager is the interface to identifier dictionaries.