42 ATH_CHECK(detStore()->retrieve(theExpt,
"ATLAS"));
54 std::unique_ptr<TRTStrawStatusAccessor> strawStatusAccessor;
58 strawStatusAccessor = std::make_unique<TRTStrawStatusAccessor>();
60 if (strawStatusPath.empty()) {
62 return StatusCode::FAILURE;
65 strawStatusAccessor->fill(strawStatusPath);
68 GeoModelIO::ReadGeoModel* sqliteReader =
m_geoDbTagSvc->getSqliteReader();
75 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Lite" );
78 std::move(strawStatusAccessor),
85 theTRTFactory.
create(world);
91 ATH_MSG_INFO(
"Building TRT with Version Tag: "<< versionKey.
tag() <<
" at Node: " << versionKey.
node() );
94 std::string trtVersionTag = accessSvc->getChildTag(
"TRT", versionKey.
tag(), versionKey.
node());
99 if (trtVersionTag.empty()) {
100 ATH_MSG_INFO(
"No TRT Version. TRT will not be built." );
101 return StatusCode::SUCCESS;
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;
127 ATH_MSG_INFO(
"TRT Geometry Options:" << std::boolalpha );
136 ATH_MSG_INFO(
" Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" );
140 std::move(strawStatusAccessor),
148 theTRTFactory.
create(world);
154 if (!
m_manager)
return StatusCode::FAILURE;
158 return StatusCode::SUCCESS;
168 MsgStream log(msgSvc(), name());
172 StatusCode
sc = StatusCode::FAILURE;
177 if (m_useDynamicAlignFolders){
178 std::string folderName =
"/TRT/AlignL1/TRT";
180 msg(MSG::DEBUG) <<
"Registering callback on global Container with folder " << folderName <<
endmsg;
182 StatusCode trttmp = detStore()->regFcn(&IGeoModelTool::align,
dynamic_cast<IGeoModelTool*
>(
this), calc, folderName);
184 if (trttmp.isFailure()) {
185 msg(MSG::ERROR) <<
"Problem when register callback on global Container with folder " << folderName <<
endmsg;
187 sc = StatusCode::SUCCESS;
190 msg(MSG::WARNING) <<
"Unable to register callback on global Container with folder " << folderName <<
endmsg;
191 return StatusCode::FAILURE;
194 folderName =
"/TRT/AlignL2";
196 if(msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) <<
"Registering callback on AlignableTransformContainer with folder " << folderName <<
endmsg;
198 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align,
dynamic_cast<IGeoModelTool *
>(
this), atc, folderName);
199 if(sctmp.isFailure()) {
200 msg(MSG::ERROR) <<
"Problem when register callback on AlignableTransformContainer with folder " << folderName <<
endmsg;
202 sc = StatusCode::SUCCESS;
206 msg(MSG::WARNING) <<
"Unable to register callback on AlignableTransformContainer with folder "
208 return StatusCode::FAILURE;
212 std::string folderName =
"/TRT/Align";
214 msg(MSG::DEBUG) <<
"Registering callback on AlignableTransformContainer with folder " << folderName <<
endmsg;
216 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align,
dynamic_cast<IGeoModelTool *
>(
this), atc, folderName);
218 if (sctmp.isFailure()) {
219 msg(MSG::ERROR) <<
"Problem when register callback on AlignableTransformContainer with folder " << folderName <<
endmsg;
221 sc = StatusCode::SUCCESS;
224 msg(MSG::WARNING) <<
"Unable to register callback on AlignableTransformContainer with folder "
225 << folderName <<
", Alignments disabled! (Only if no Run2 schema is loaded)" <<
endmsg;
232 std::string folderName =
"/TRT/Calib/DX";
234 msg(MSG::DEBUG) <<
"Registering callback on StrawDxContainer with folder " << folderName <<
endmsg;
236 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align,
dynamic_cast<IGeoModelTool*
>(
this), sdc, folderName);
238 if (sctmp.isFailure()) {
239 msg(MSG::ERROR) <<
"Problem when register callback on StrawDxContainer with folder " << folderName <<
endmsg;
241 sc = StatusCode::SUCCESS;
244 msg(MSG::DEBUG) <<
"Unable to register callback on StrawDxContainer with folder " << folderName <<
endmsg;
249 msg(MSG::INFO) <<
"Alignment disabled. No callback registered" <<
endmsg;
264 return StatusCode::SUCCESS;
272 MsgStream log(msgSvc(), name());
274 msg(MSG::WARNING) <<
"Manager does not exist" <<
endmsg;
275 return StatusCode::FAILURE;
280 msg(MSG::DEBUG) <<
"Alignment disabled. No alignments applied" <<
endmsg;
281 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define IOVSVC_CALLBACK_ARGS_P(I, K)
short hand for IOVSvc call back argument list, to be used when access to formal arguments is needed,...
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Class for storing/accessing trt endpoint corrections data.
an iterator over instances of a given type in StoreGateSvc.
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.
const std::string & node() const
Return the version node.
GeoPhysVol * getPhysVol()
Destructor.
void addManager(const GeoVDetectorManager *)
IRDBRecord is one record in the IRDBRecordset object.
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.
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
This class creates the TRT Geometry.
virtual void create(GeoPhysVol *world) override
virtual const InDetDD::TRT_DetectorManager * getDetectorManager() const override
virtual void create(GeoPhysVol *world) override
virtual const InDetDD::TRT_DetectorManager * getDetectorManager() const override
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring