|
ATLAS Offline Software
|
#include <HGTD_GMX_DetectorTool.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 |
|
Definition at line 17 of file HGTD_GMX_DetectorTool.h.
◆ HGTD_GMX_DetectorTool()
HGTD_GMX_DetectorTool::HGTD_GMX_DetectorTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ align() [1/2]
◆ align() [2/2]
Definition at line 134 of file HGTD_GMX_DetectorTool.cxx.
139 return StatusCode::FAILURE;
142 ATH_MSG_INFO(
"No align method yet implemented for HGTD_DetectorManager. Nothing to do." );
144 return StatusCode::SUCCESS;
◆ ATLAS_NOT_THREAD_SAFE()
virtual StatusCode registerCallback HGTD_GMX_DetectorTool::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
finaloverridevirtual |
◆ clear()
StatusCode HGTD_GMX_DetectorTool::clear |
( |
| ) |
|
|
finaloverridevirtual |
◆ create()
StatusCode HGTD_GMX_DetectorTool::create |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 24 of file HGTD_GMX_DetectorTool.cxx.
35 m_commonItems = std::make_unique<InDetDD::SiCommonItems>(idHelper);
40 std::string
node{
"InnerDetector"};
41 std::string
table{
"HGTDXDD"};
47 ATH_MSG_ERROR(
"No HGTD geometry found. HGTD can not be built.");
48 return StatusCode::FAILURE;
56 GeoPhysVol *world = &*theExpt->getPhysVol();
68 bool useNewIdentifierScheme = idHelper->get_useNewIdentifierScheme();
69 if (useNewIdentifierScheme){
71 gmxInterface.buildReadoutGeometryFromSqlite(
m_sqliteReadSvc.operator->(),sqlreader);
73 ATH_MSG_FATAL(
"SQLite workflow is unsupported for old HGTD identifier scheme!");
74 return StatusCode::FAILURE;
82 return StatusCode::FAILURE;
92 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_alignable
Gaudi::Property<bool> HGTD_GMX_DetectorTool::m_alignable {this, "Alignable", false, ""} |
|
private |
◆ m_alignmentFolderName
Gaudi::Property<std::string> HGTD_GMX_DetectorTool::m_alignmentFolderName {this, "AlignmentFolderName", "/Indet/AlignHGTD", ""} |
|
private |
◆ m_clobOutputFileName
Gaudi::Property<std::string> GeoModelXmlTool::m_clobOutputFileName {this, "ClobOutputName", "", "Name of file to dump CLOB content to"} |
|
privateinherited |
◆ m_commonItems
◆ 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_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_rdbAccessSvc
◆ m_sqliteReadSvc
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
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...
Default, invalid implementation of ClassID_traits.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
#define ATH_MSG_WARNING(x)
IRDBRecord is one record in the IRDBRecordset object.