32 const std::string&
name,
37 m_geoDbTagSvc{
"GeoDbTagSvc",
name},
38 m_geometryDBSvc{
"InDetGeometryDBSvc",
name}
41 declareProperty(
"GeoDbTagSvc", m_geoDbTagSvc);
42 declareProperty(
"GeometryDBSvc", m_geometryDBSvc);
60 std::string detectorTag{
""};
61 std::string detectorNode{
""};
62 GeoModelIO::ReadGeoModel* sqliteReader =
m_geoDbTagSvc->getSqliteReader();
68 if (versionKey.tag() ==
"AUTO") {
69 ATH_MSG_ERROR(
"AUTO Atlas version. Please select a version.");
71 ATH_MSG_INFO(
"Building SCT with Version Tag: " << versionKey.tag() <<
" at Node: " << versionKey.node());
73 detectorTag = versionKey.tag();
74 detectorNode = versionKey.node();
76 std::string sctVersionTag{accessSvc->getChildTag(
"SCT", detectorTag, detectorNode)};
82 if (sctVersionTag.empty()) {
86 if (versionKey.custom()) {
87 ATH_MSG_WARNING(
"SCT_DetectorTool: Detector Information coming from a custom configuration!!");
89 ATH_MSG_DEBUG(
"SCT_DetectorTool: Detector Information coming from the database and job options IGNORED.");
90 ATH_MSG_DEBUG(
"Keys for SCT Switches are " << detectorTag <<
" " << detectorNode);
95 std::string versionName;
96 IRDBRecordset_ptr switchSet{accessSvc->getRecordsetPtr(
"SctSwitches", detectorTag, detectorNode)};
100 if (not switches->isFieldNull(
"COSMICLAYOUT")) {
101 m_cosmic = switches->getInt(
"COSMICLAYOUT");
103 if (not switches->isFieldNull(
"VERSIONNAME")) {
104 versionName = switches->getString(
"VERSIONNAME");
107 if (versionName.empty()) {
139 const SCT_ID* idHelper{
nullptr};
147 GeoPhysVol* world{&*theExpt->getPhysVol()};
154 msg(MSG::INFO)<<
"Building the geometry from the SQLite file"<<
endmsg;
158 theSCT.create(world);
164 theSCT.create(world);
171 return StatusCode::FAILURE;
186 return StatusCode::SUCCESS;
197 return StatusCode::SUCCESS;
204 if (m_alignable.value()) {
205 if (m_useDynamicAlignFolders.value()) {
207 if (
detStore()->contains<CondAttrListCollection>(m_run2L1Folder.value())) {
208 ATH_MSG_DEBUG(
"Registering callback on global Container with folder " << m_run2L1Folder.value());
211 sc = StatusCode::SUCCESS;
213 ATH_MSG_WARNING(
"Unable to register callback on global Container with folder " << m_run2L1Folder.value());
214 return StatusCode::FAILURE;
217 if (
detStore()->contains<CondAttrListCollection>(m_run2L2Folder.value())) {
218 ATH_MSG_DEBUG(
"Registering callback on global Container with folder " << m_run2L2Folder.value());
221 sc = StatusCode::SUCCESS;
223 ATH_MSG_WARNING(
"Unable to register callback on global Container with folder " << m_run2L2Folder.value());
224 return StatusCode::FAILURE;
227 if (
detStore()->contains<AlignableTransformContainer>(m_run2L3Folder.value())) {
228 ATH_MSG_DEBUG(
"Registering callback on AlignableTransformContainer with folder " << m_run2L3Folder.value());
231 sc = StatusCode::SUCCESS;
233 ATH_MSG_WARNING(
"Unable to register callback on AlignableTransformContainer with folder " << m_run2L3Folder.value());
234 return StatusCode::FAILURE;
239 if (
detStore()->contains<AlignableTransformContainer>(m_run1Folder.value())) {
240 ATH_MSG_DEBUG(
"Registering callback on AlignableTransformContainer with folder " << m_run1Folder.value());
243 sc = StatusCode::SUCCESS;
245 ATH_MSG_WARNING(
"Unable to register callback on AlignableTransformContainer with folder "
246 << m_run1Folder.value() <<
", Alignment disabled (only if no Run2 scheme is loaded)!");
247 return StatusCode::FAILURE;
252 ATH_MSG_INFO(
"Alignment disabled. No callback registered");
255 return StatusCode::FAILURE;
265 return StatusCode::FAILURE;
271 return StatusCode::SUCCESS;