ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace GeoModelIO{
13 class ReadGeoModel;
14}
15
16class GeoPhysVol;
17class GeoVPhysVol;
18class GmxInterface;
19
21{
22
23public:
24 GeoModelXmlTool(const std::string& type, const std::string& name, const IInterface* parent);
25
26protected:
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
31 StatusCode createBaseTool();
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
58private:
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
Definition of the abstract IRDBAccessSvc interface.
std::string getBlob(const std::string &versionNode, const std::string &tableNode) const
ServiceHandle< IRDBAccessSvc > m_sqliteReadSvc
void createVolume(GeoPhysVol *worldVol, GmxInterface &interface, const std::string &versionNode, const std::string &tableNode) const
StatusCode createBaseTool()
Gaudi::Property< bool > m_deduplicateShape
Gaudi::Property< bool > m_deduplicatePhysVol
ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc
Gaudi::Property< std::string > m_dtdName
Gaudi::Property< std::string > m_gmxFilename
bool isAvailable(const std::string &versionNode, const std::string &tableNode) const
GeoModelXmlTool(const std::string &type, const std::string &name, const IInterface *parent)
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
Gaudi::Property< std::string > m_detectorName
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
GeoModelIO::ReadGeoModel * getSqliteReader() const
Gaudi::Property< bool > m_deduplicateTransf
Gaudi::Property< bool > m_deduplicateLogVol
Gaudi::Property< std::string > m_clobOutputFileName