33{
34
36
39
40
41 GeoModelExperiment* theExpt{nullptr};
42 ATH_CHECK(detStore()->retrieve(theExpt,
"ATLAS"));
44
45
49
50 std::unique_ptr<TRTStrawStatusAccessor> strawStatusAccessor;
53
54 strawStatusAccessor = std::make_unique<TRTStrawStatusAccessor>();
56 if (strawStatusPath.empty()) {
58 return StatusCode::FAILURE;
59 }
61 strawStatusAccessor->fill(strawStatusPath);
62 }
63
64 GeoModelIO::ReadGeoModel* sqliteReader =
m_geoDbTagSvc->getSqliteReader();
65
66
67
68
69
70 if (sqliteReader) {
71 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Lite" );
72 TRTDetectorFactory_Lite theTRTFactory(sqliteReader,
74 std::move(strawStatusAccessor),
79 );
80
81 theTRTFactory.create(world);
82 m_manager=theTRTFactory.getDetectorManager();
83 }
84 else {
86
87 ATH_MSG_INFO(
"Building TRT with Version Tag: "<< versionKey.tag() <<
" at Node: " << versionKey.node() );
88
89
90 std::string trtVersionTag = accessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node());
92
93
94
95 if (trtVersionTag.empty()) {
97 return StatusCode::SUCCESS;
98 }
99
100 ATH_MSG_DEBUG(
"Keys for TRT Switches are " << versionKey.tag() <<
" " << versionKey.node() );
101 IRDBRecordset_ptr switchSet = accessSvc->getRecordsetPtr(
"TRTSwitches", versionKey.tag(), versionKey.node());
102 const IRDBRecord *switches = (*switchSet)[0];
103
104 if (switches->
getInt(
"DC1COMPATIBLE")) {
105 ATH_MSG_ERROR(
"DC1COMPATIBLE flag set in database, but DC1 is no longer supported in the code!!");
106 return StatusCode::FAILURE;
107 }
108
112
113
117
120 }
121
123 ATH_MSG_INFO(
"TRT Geometry Options:" << std::boolalpha );
131
132 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" );
133
136 std::move(strawStatusAccessor),
143 );
144 theTRTFactory.create(world);
145 m_manager=theTRTFactory.getDetectorManager();
146
147 }
148
149
150 if (!
m_manager)
return StatusCode::FAILURE;
151
154 return StatusCode::SUCCESS;
155}
#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.