|
ATLAS Offline Software
|
#include <ServiceExtensionTool.h>
|
Gaudi::Property< std::string > | m_gmxFilename {this, "GmxFilename", "", "The name of the local file to read the geometry from"} |
|
Gaudi::Property< std::string > | m_detectorName {this, "DetectorName", "ITkStrip", ""} |
|
ServiceHandle< IRDBAccessSvc > | m_rdbAccessSvc {this, "RDBAccessSvc", "RDBAccessSvc", ""} |
|
ServiceHandle< IRDBAccessSvc > | m_sqliteReadSvc {this, "SqliteReadSvc", "SqliteReadSvc", ""} |
|
ServiceHandle< IGeoDbTagSvc > | m_geoDbTagSvc {this, "GeoDbTagSvc", "GeoDbTagSvc", ""} |
|
Gaudi::Property< std::string > | m_dtdName {this, "OverrideDtdName", "", "Override standard .dtd file from GeoModelXml"} |
|
Gaudi::Property< bool > | m_deduplicateLogVol |
|
Gaudi::Property< bool > | m_deduplicatePhysVol |
|
Gaudi::Property< bool > | m_deduplicateShape |
|
Gaudi::Property< bool > | m_deduplicateTransf |
|
GeoVDetectorManager * | m_detector |
|
|
const ServiceExtensionManager * | m_detManager {} |
|
Gaudi::Property< std::string > | m_containingDetectorName {this, "ContainingDetector", "LArBarrel", "Containing detector name"} |
|
Gaudi::Property< std::string > | m_envelopeVolumeName {this, "EnvelopeVolume", "", "Envelope volume name"} |
|
Gaudi::Property< std::string > | m_node {this,"DataBaseNode","InnerDetector", "Node name in Geometry Database"} |
|
Gaudi::Property< std::string > | m_table {this,"DataBaseTable","ITKSERVICESXDD", "Table name in Geometry Database"} |
|
Gaudi::Property< std::string > | m_ServiceExtensionManagerName {this, "ServiceExtensionManagerName", "ITkServiceExtension", "Service Extension Manager Name"} |
|
Gaudi::Property< std::string > | m_clobOutputFileName {this, "ClobOutputName", "", "Name of file to dump CLOB content to"} |
|
Definition at line 19 of file ServiceExtensionTool.h.
◆ ServiceExtensionTool()
ITk::ServiceExtensionTool::ServiceExtensionTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~ServiceExtensionTool()
virtual ITk::ServiceExtensionTool::~ServiceExtensionTool |
( |
| ) |
|
|
virtualdefault |
◆ align()
◆ ATLAS_NOT_THREAD_SAFE()
virtual StatusCode registerCallback GeoModelTool::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
overridevirtualinherited |
◆ clear()
StatusCode GeoModelTool::clear |
( |
| ) |
|
|
overridevirtualinherited |
Reimplemented in ITk::StripDetectorTool, PixelDetectorTool, ITk::PixelDetectorTool, HGTD_DetectorTool, TRT_DetectorTool, MuonDetectorTool, MuonGMR4::MuonDetectorTool, PLRDetectorTool, SCT_DetectorTool, BCMPrimeDetectorTool, TileDetectorTool, HGTD_GMX_DetectorTool, BeamPipeDetectorTool, ForDetEnvelopeTool, LUCID_DetectorTool, LArDetectorToolNV, InDetServMatTool, and CavernInfraDetectorTool.
Definition at line 28 of file GeoModelTool.cxx.
30 return StatusCode::SUCCESS;
◆ create()
StatusCode ITk::ServiceExtensionTool::create |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 22 of file ServiceExtensionTool.cxx.
35 ATH_MSG_ERROR(
"No ServiceExtension geometry found. ServiceExtension can not be built.");
36 return StatusCode::FAILURE;
47 GmxInterface gmxInterface;
51 return StatusCode::FAILURE;
60 return StatusCode::SUCCESS;
◆ createBaseTool()
StatusCode GeoModelXmlTool::createBaseTool |
( |
| ) |
|
|
protectedinherited |
◆ createTopVolume()
const GeoVPhysVol * GeoModelXmlTool::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 |
|
protectedinherited |
Definition at line 35 of file GeoModelXmlTool.cxx.
39 if(!sqlreader)
createVolume(world, gmxInterface, vNode, tableName);
42 unsigned int nChildren = world->getNChildVols();
44 const GeoVPhysVol * envVol =
nullptr;
45 const GeoVPhysVol * topVol =
nullptr;
47 bool foundEnvelope =
false;
48 bool foundContainingDetector =
false;
54 if(containingDetector!=
"") detectorName = containingDetector;
56 for (
int iChild = nChildren - 1; iChild>=0; --iChild) {
57 if (world->getNameOfChildVol(iChild) == detectorName) {
60 envVol = &*world->getChildVol(iChild);
61 foundContainingDetector =
true;
62 if(envelopeName==
"") {topVol = envVol;
break;}
63 unsigned int nGrandchildren = envVol->getNChildVols();
64 for (
int iGchild = nGrandchildren - 1; iGchild>=0; --iGchild) {
65 if (envVol->getNameOfChildVol(iGchild) == envelopeName) {
66 topVol = &*(envVol->getChildVol(iGchild));
73 if(containingDetector!=
"" && !foundContainingDetector)
ATH_MSG_ERROR(
"Couldn't find the containing detector "<<containingDetector<<
" in the world hierarchy!");
74 else if(envelopeName!=
"" && !foundEnvelope)
ATH_MSG_ERROR(
"Couldn't find the envelope volume "<<envelopeName<<
" in the world hierarchy!");
◆ createVolume()
void GeoModelXmlTool::createVolume |
( |
GeoPhysVol * |
worldVol, |
|
|
GmxInterface & |
interface, |
|
|
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
privateinherited |
Definition at line 107 of file GeoModelXmlTool.cxx.
109 std::string gmxInput;
115 gmxInput =
getBlob(vNode,tableName);
116 if (gmxInput.empty()) {
117 std::string errMessage(
"GeoModelXmlTool::createTopVolume: Empty response received from the database.");
118 throw std::runtime_error(errMessage);
124 if (gmxInput.empty()) {
125 std::string errMessage(
"GeoModelXmlTool::createTopVolume: Unable to find file " +
m_gmxFilename +
126 " with PathResolver; check filename and DATAPATH environment variable");
127 throw std::runtime_error(errMessage);
133 std::string replacementName =
"GeoModelXml/";
135 std::string startdelim =
"SYSTEM \"";
136 std::string enddelim =
"\" [";
137 unsigned startpos = gmxInput.find(startdelim) + startdelim.length();
138 unsigned endpos = gmxInput.find(enddelim);
139 std::string searchName = gmxInput.substr(startpos,(endpos - startpos));
140 if(searchName==
"geomodel.dtd") replacementName+=
"geomodel_v0.dtd";
141 else replacementName+=searchName;
142 ATH_MSG_DEBUG(
"Searching for "<<searchName<<
" and replacing it with "<<replacementName);
143 size_t chars = searchName.length();
144 size_t index = gmxInput.find(searchName);
146 if (
index != std::string::npos) {
149 gmxInput.replace(
index,chars, dtdFile);
151 throw std::runtime_error(
"GeoModelXmlTool::createTopVolume: Did not find valid .dtd in the gmx input string.");
161 std::ifstream in(gmxInput);
171 Gmx2Geo gmx2Geo(gmxInput, world, gmxInterface,
flags);
◆ getBlob()
std::string GeoModelXmlTool::getBlob |
( |
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
protectedinherited |
Definition at line 94 of file GeoModelXmlTool.cxx.
98 if (!recordSet || recordSet->size() == 0) {
100 throw std::runtime_error(
"Unable to obtain recordSet");
103 std::string clobString = record->
getString(
"XMLCLOB");
◆ getSqliteReader()
GeoModelIO::ReadGeoModel * GeoModelXmlTool::getSqliteReader |
( |
| ) |
const |
|
protectedinherited |
◆ isAvailable()
bool GeoModelXmlTool::isAvailable |
( |
const std::string & |
versionNode, |
|
|
const std::string & |
tableNode |
|
) |
| const |
|
protectedinherited |
Definition at line 78 of file GeoModelXmlTool.cxx.
82 const std::string& versionTag = versionKey.tag();
83 const std::string& versionNode = versionKey.node();
◆ manager() [1/2]
GeoVDetectorManager * GeoModelTool::manager |
( |
| ) |
|
|
virtualinherited |
The Detector Node corresponding to this tool.
Definition at line 21 of file GeoModelTool.cxx.
◆ manager() [2/2]
const GeoVDetectorManager * GeoModelTool::manager |
( |
| ) |
const |
|
virtualinherited |
◆ m_clobOutputFileName
Gaudi::Property<std::string> GeoModelXmlTool::m_clobOutputFileName {this, "ClobOutputName", "", "Name of file to dump CLOB content to"} |
|
privateinherited |
◆ m_containingDetectorName
Gaudi::Property<std::string> ITk::ServiceExtensionTool::m_containingDetectorName {this, "ContainingDetector", "LArBarrel", "Containing detector name"} |
|
private |
◆ m_deduplicateLogVol
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateLogVol |
|
protectedinherited |
Initial value:{this, "enableLogVolDeduplication", false,
"Remove duplications of equivalent logical volumes"}
Definition at line 48 of file GeoModelXmlTool.h.
◆ m_deduplicatePhysVol
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicatePhysVol |
|
protectedinherited |
Initial value:{this, "enablePhysVolDeduplication", false,
"Remove duplications of equivalent physical volumes"}
Definition at line 50 of file GeoModelXmlTool.h.
◆ m_deduplicateShape
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateShape |
|
protectedinherited |
Initial value:{this, "enableShapeDeduplication", false,
"Remove duplications of equivalent shapes"}
Definition at line 52 of file GeoModelXmlTool.h.
◆ m_deduplicateTransf
Gaudi::Property<bool> GeoModelXmlTool::m_deduplicateTransf |
|
protectedinherited |
Initial value:{this, "enableTransDeduplication", false,
"Remove duplications of equivalent transform nodes"}
Definition at line 54 of file GeoModelXmlTool.h.
◆ m_detector
GeoVDetectorManager* GeoModelTool::m_detector |
|
protectedinherited |
◆ m_detectorName
Gaudi::Property<std::string> GeoModelXmlTool::m_detectorName {this, "DetectorName", "ITkStrip", ""} |
|
protectedinherited |
◆ m_detManager
◆ m_dtdName
Gaudi::Property<std::string> GeoModelXmlTool::m_dtdName {this, "OverrideDtdName", "", "Override standard .dtd file from GeoModelXml"} |
|
protectedinherited |
◆ m_envelopeVolumeName
Gaudi::Property<std::string> ITk::ServiceExtensionTool::m_envelopeVolumeName {this, "EnvelopeVolume", "", "Envelope volume name"} |
|
private |
◆ m_geoDbTagSvc
◆ m_gmxFilename
Gaudi::Property<std::string> GeoModelXmlTool::m_gmxFilename {this, "GmxFilename", "", "The name of the local file to read the geometry from"} |
|
protectedinherited |
◆ m_node
Gaudi::Property<std::string> ITk::ServiceExtensionTool::m_node {this,"DataBaseNode","InnerDetector", "Node name in Geometry Database"} |
|
private |
◆ m_rdbAccessSvc
◆ m_ServiceExtensionManagerName
Gaudi::Property<std::string> ITk::ServiceExtensionTool::m_ServiceExtensionManagerName {this, "ServiceExtensionManagerName", "ITkServiceExtension", "Service Extension Manager Name"} |
|
private |
◆ m_sqliteReadSvc
◆ m_table
Gaudi::Property<std::string> ITk::ServiceExtensionTool::m_table {this,"DataBaseTable","ITKSERVICESXDD", "Table name in Geometry Database"} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
GeoPhysVol * getPhysVol()
Destructor.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
void addManager(const GeoVDetectorManager *)
IRDBRecord is one record in the IRDBRecordset object.