![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/ISvcLocator.h"
13 #include "GaudiKernel/IToolSvc.h"
14 #include "GaudiKernel/IConversionSvc.h"
15 #include "GaudiKernel/ServiceHandle.h"
47 p_RDBAccessSvc(nullptr),
48 p_GeoModelSvc(nullptr),
49 m_svcName(
"AGDDtoGeoSvc") {
55 std::cout<<
"MuonAGDDToolHelper\tunable to access GeoModelSvc "<<std::endl;
60 std::cout<<
"MuonAGDDToolHelper\tunable to access RBDAccessSvc "<<std::endl;
66 std::vector<std::string> structuresFromFlags;
69 if(!agdd2geoVersion.empty())
71 std::string TheKEYNAME;
74 for(
unsigned int i=0;
i<pIRDBRecordset->size();
i++)
77 TheKEYNAME = record->
getString(
"KEYNAME");
78 TheKEYVALUE = record->
getInt(
"KEYVALUE");
79 if ( TheKEYVALUE == 1 )
81 structuresFromFlags.push_back(TheKEYNAME);
87 std::cout<<
"MuonAGDDToolHelper\tagdd2geoVersion is empty " <<std::endl;
89 return structuresFromFlags;
97 if(!geoModel)
return "";
100 if(!accessSvc)
return "";
105 std::string detectorKey = MuonVersion.empty() ?
AtlasVersion : MuonVersion;
106 std::string detectorNode = MuonVersion.empty() ?
"ATLAS" :
"MuonSpectrometer";
107 if ( MuonVersion ==
"CUSTOM"){
109 detectorNode =
"ATLAS" ;
114 if(!recordsetAGDD)
return "";
116 const IRDBRecord *recordAGDD = (*recordsetAGDD)[0];
117 if(!recordAGDD)
return "";
118 std::string AgddString = recordAGDD->
getString(
"DATA");
120 size_t pos=AgddString.find(
"AGDD.dtd");
121 if (
pos!=std::string::npos) AgddString.replace(
pos-21,32,
"-- Reference to AGDD.dtd automatically removed -->");
122 std::ofstream GeneratedFile;
125 std::ofstream GeneratedFile;
127 GeneratedFile<<AgddString;
128 GeneratedFile.close();
138 ISvcLocator* svcLocator = Gaudi::svcLocator();
139 if (svcLocator->service(
"DetectorStore",pDetStore).isFailure())
return false;
141 if (pDetStore->retrieve(muonMgr).isFailure())
return false;
143 return readoutGeoDone;
149 if (Gaudi::svcLocator()->service(
m_svcName,agddsvc).isFailure()) {
150 throw std::runtime_error(
"MuonAGDDToolHelper::SetNSWComponents() - Could not retrieve "
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
Ensure that the Athena extensions are properly loaded.
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
A pointer together with a movable lock.
static bool BuildReadoutGeometry(MuonGM::MuonDetectorManager *mgr, const NswPassivationDbData *)
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
Definition of the abstract IRDBAccessSvc interface.
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const std::string & muonVersionOverride() const =0
virtual const std::string & muonVersion() const =0
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual void addHandler(XMLHandler *)=0
virtual LockedController getController()=0
Definition of the abstract IRDBRecord interface.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
IRDBRecord is one record in the IRDBRecordset object.
Definition of the abstract IRDBRecordset interface.
virtual const std::string & atlasVersion() const =0