ATLAS Offline Software
GeoModelXmlTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELSVC_GEOMODELXMLTOOL_H
6 #define GEOMODELSVC_GEOMODELXMLTOOL_H
7 
11 
12 namespace GeoModelIO{
13  class ReadGeoModel;
14 }
15 
16 class GeoPhysVol;
17 class GeoVPhysVol;
18 class GmxInterface;
19 
21 {
22 
23 public:
24  GeoModelXmlTool(const std::string& type, const std::string& name, const IInterface* parent);
25 
26 protected:
27  bool isAvailable(const std::string& versionNode, const std::string& tableNode) const;
28  std::string getBlob(const std::string& versionNode, const std::string& tableNode) const;
29 
30  // method for derived classes to initialize the services needed here
32 
33  // method to check if we are using the Run4 geometry workflow, from a single sqlite file, and if so, return the reader
34  // NB return can be null - used downstream to check if we are using sqlite inputs or not
35  GeoModelIO::ReadGeoModel* getSqliteReader() const;
36 
37  // (optional) containingDetector/envelopeVolume can be used if the geometry tree needs to be further descended to add "topVolume"
38  // (optional) sqlreader steers if using a pre-built sqlite input, or parsing the geometry xml files to build it here
39  const GeoVPhysVol * createTopVolume(GeoPhysVol* worldVol, GmxInterface& interface, const std::string& versionNode, const std::string& tableNode, const std::string& containingDetector="", const std::string& envelopeName="", const GeoModelIO::ReadGeoModel* sqlreader=nullptr) const;
40 
41  Gaudi::Property<std::string> m_gmxFilename{this, "GmxFilename", "", "The name of the local file to read the geometry from"};
42  Gaudi::Property<std::string> m_detectorName{this, "DetectorName", "ITkStrip", ""};
43  ServiceHandle<IRDBAccessSvc> m_rdbAccessSvc{this, "RDBAccessSvc", "RDBAccessSvc", ""};
44  ServiceHandle<IRDBAccessSvc> m_sqliteReadSvc{this, "SqliteReadSvc", "SqliteReadSvc", ""};
45  ServiceHandle<IGeoDbTagSvc> m_geoDbTagSvc{this, "GeoDbTagSvc", "GeoDbTagSvc", ""};
46  Gaudi::Property<std::string> m_dtdName{this, "OverrideDtdName", "", "Override standard .dtd file from GeoModelXml"};
47 
48  Gaudi::Property<bool> m_deduplicateLogVol{this, "enableLogVolDeduplication", false,
49  "Remove duplications of equivalent logical volumes"};
50  Gaudi::Property<bool> m_deduplicatePhysVol{this, "enablePhysVolDeduplication", false,
51  "Remove duplications of equivalent physical volumes"};
52  Gaudi::Property<bool> m_deduplicateShape{this, "enableShapeDeduplication", false,
53  "Remove duplications of equivalent shapes"};
54  Gaudi::Property<bool> m_deduplicateTransf{this, "enableTransDeduplication", false,
55  "Remove duplications of equivalent transform nodes"};
56 
57 
58 private:
59 
60  Gaudi::Property<std::string> m_clobOutputFileName{this, "ClobOutputName", "", "Name of file to dump CLOB content to"};
61  //do the actual creation of the volume from the gmx files
62  void createVolume(GeoPhysVol* worldVol, GmxInterface& interface, const std::string& versionNode, const std::string& tableNode) const;
63 };
64 
65 #endif // GEOMODELSVC_GEOMODELXMLTOOL_H
GeoModelXmlTool::m_rdbAccessSvc
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
Definition: GeoModelXmlTool.h:43
GeoModelXmlTool::createBaseTool
StatusCode createBaseTool()
Definition: GeoModelXmlTool.cxx:26
GeoModelXmlTool::m_clobOutputFileName
Gaudi::Property< std::string > m_clobOutputFileName
Definition: GeoModelXmlTool.h:60
GeoModelXmlTool::isAvailable
bool isAvailable(const std::string &versionNode, const std::string &tableNode) const
Definition: GeoModelXmlTool.cxx:78
GeoModelTool.h
GeoModelXmlTool::createTopVolume
const GeoVPhysVol * createTopVolume(GeoPhysVol *worldVol, GmxInterface &interface, const std::string &versionNode, const std::string &tableNode, const std::string &containingDetector="", const std::string &envelopeName="", const GeoModelIO::ReadGeoModel *sqlreader=nullptr) const
Definition: GeoModelXmlTool.cxx:35
GeoModelXmlTool::m_detectorName
Gaudi::Property< std::string > m_detectorName
Definition: GeoModelXmlTool.h:42
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
GeoModelXmlTool::getSqliteReader
GeoModelIO::ReadGeoModel * getSqliteReader() const
Definition: GeoModelXmlTool.cxx:174
GeoModelXmlTool::m_gmxFilename
Gaudi::Property< std::string > m_gmxFilename
Definition: GeoModelXmlTool.h:41
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
GeoModelTool
Definition: GeoModelTool.h:17
GeoModelXmlTool::createVolume
void createVolume(GeoPhysVol *worldVol, GmxInterface &interface, const std::string &versionNode, const std::string &tableNode) const
Definition: GeoModelXmlTool.cxx:107
GeoModelXmlTool::m_dtdName
Gaudi::Property< std::string > m_dtdName
Definition: GeoModelXmlTool.h:46
GeoModelXmlTool::m_deduplicatePhysVol
Gaudi::Property< bool > m_deduplicatePhysVol
Definition: GeoModelXmlTool.h:50
GeoModelXmlTool::m_deduplicateShape
Gaudi::Property< bool > m_deduplicateShape
Definition: GeoModelXmlTool.h:52
GeoModelIO
Definition: IGeoDbTagSvc.h:12
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
GeoModelXmlTool::getBlob
std::string getBlob(const std::string &versionNode, const std::string &tableNode) const
Definition: GeoModelXmlTool.cxx:94
GeoModelXmlTool::m_deduplicateLogVol
Gaudi::Property< bool > m_deduplicateLogVol
Definition: GeoModelXmlTool.h:48
GeoModelXmlTool
Definition: GeoModelXmlTool.h:21
GeoModelXmlTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition: GeoModelXmlTool.h:45
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
GeoModelXmlTool::m_sqliteReadSvc
ServiceHandle< IRDBAccessSvc > m_sqliteReadSvc
Definition: GeoModelXmlTool.h:44
GeoModelXmlTool::m_deduplicateTransf
Gaudi::Property< bool > m_deduplicateTransf
Definition: GeoModelXmlTool.h:54
IGeoDbTagSvc.h
ServiceHandle< IRDBAccessSvc >
GeoModelXmlTool::GeoModelXmlTool
GeoModelXmlTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: GeoModelXmlTool.cxx:19