33{
34
36
39
40
41 GeoModelExperiment* theExpt{nullptr};
44
45
47
48
53
54 std::unique_ptr<TRTStrawStatusAccessor> strawStatusAccessor;
57
58 strawStatusAccessor = std::make_unique<TRTStrawStatusAccessor>();
60 if (strawStatusPath.empty()) {
62 return StatusCode::FAILURE;
63 }
65 strawStatusAccessor->fill(strawStatusPath);
66 }
67
68 GeoModelIO::ReadGeoModel* sqliteReader =
m_geoDbTagSvc->getSqliteReader();
69
70
71
72
73
74 if (sqliteReader) {
75 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Lite" );
76 TRTDetectorFactory_Lite theTRTFactory(sqliteReader,
78 std::move(strawStatusAccessor),
83 );
84
85 theTRTFactory.create(world);
86 m_manager=theTRTFactory.getDetectorManager();
87 }
88 else {
90
91 ATH_MSG_INFO(
"Building TRT with Version Tag: "<< versionKey.tag() <<
" at Node: " << versionKey.node() );
92
93
94 std::string trtVersionTag = accessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node());
96
97
98
99 if (trtVersionTag.empty()) {
100 ATH_MSG_INFO(
"No TRT Version. TRT will not be built." );
101 return StatusCode::SUCCESS;
102 }
103
104 ATH_MSG_DEBUG(
"Keys for TRT Switches are " << versionKey.tag() <<
" " << versionKey.node() );
105 IRDBRecordset_ptr switchSet = accessSvc->getRecordsetPtr(
"TRTSwitches", versionKey.tag(), versionKey.node());
106 const IRDBRecord *switches = (*switchSet)[0];
107
108 if (switches->
getInt(
"DC1COMPATIBLE")) {
109 ATH_MSG_ERROR(
"DC1COMPATIBLE flag set in database, but DC1 is no longer supported in the code!!");
110 return StatusCode::FAILURE;
111 }
112
116
117
121
124 }
125
127 ATH_MSG_INFO(
"TRT Geometry Options:" << std::boolalpha );
135
136 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" );
137
140 std::move(strawStatusAccessor),
147 );
148 theTRTFactory.create(world);
149 m_manager=theTRTFactory.getDetectorManager();
150
151 }
152
153
154 if (!
m_manager)
return StatusCode::FAILURE;
155
158 return StatusCode::SUCCESS;
159}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
virtual const std::string & getString(const std::string &fieldName) const =0
Get string field value.
virtual int getInt(const std::string &fieldName) const =0
Get int field value.
retrieve(aClass, aKey=None)