ATLAS Offline Software
Loading...
Searching...
No Matches
InDetGeoModelTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "InDetGeoModelTool.h"
6
9
11
13
16#include "IdDict/IdDictMgr.h"
17
18namespace JiveXML {
19
26 InDetGeoModelTool::InDetGeoModelTool(const std::string& type,const std::string& name,const IInterface* parent):
27 AthAlgTool(type,name,parent) {
28
29 //Only declare the interface
30 declareInterface<IInDetGeoModelTool>(this);
31 }
32
37
41
42 // Get identifier helper
43 if (detStore()->retrieve(m_PixelIDHelper, "PixelID").isFailure()) {
44 ATH_MSG_ERROR( "Could not get Pixel ID helper" );
45 return StatusCode::RECOVERABLE;
46 }
47
51
52 // Get identifier helper
53 if (detStore()->retrieve(m_SCTIDHelper, "SCT_ID").isFailure()) {
54 ATH_MSG_ERROR( "Could not get SCT ID helper" );
55 return StatusCode::RECOVERABLE;
56 }
57
58 // check if SLHC geo is used (TRT not implemented)
59 // if not SLHC, get the TRT Det Descr manager
60 bool isSLHC = false;
61 const IdDictManager* idDictMgr = nullptr;
62 if (detStore()->retrieve(idDictMgr, "IdDict").isFailure()) {
63 ATH_MSG_ERROR( "Could not get IdDictManager !" );
64 return StatusCode::RECOVERABLE;
65 } else {
66 const IdDictDictionary* dict = idDictMgr->manager()->find_dictionary("InnerDetector");
67 if(!dict) {
68 ATH_MSG_ERROR( " Cannot access InnerDetector dictionary " );
69 return StatusCode::RECOVERABLE;
70 }else{
71 // if (dict->file_name().find("SLHC")!=std::string::npos) isSLHC=true;
72 if (dict->version().find("SLHC")!=std::string::npos) isSLHC=true;
73 }
74 }
75
76 if(!isSLHC){
80
81 // Get geo model manager
82 if ( detStore()->retrieve(m_TRTGeoManager, "TRT").isFailure()) {
83 ATH_MSG_ERROR( "Could not get TRT GeoModel Manager!" );
84 return StatusCode::RECOVERABLE;
85 }
86
87 // Get identifier helper
88 if (detStore()->retrieve(m_TRTIDHelper, "TRT_ID").isFailure()) {
89 ATH_MSG_ERROR( "Could not get TRT ID helper" );
90 return StatusCode::RECOVERABLE;
91 }
92 }
93
94 return StatusCode::SUCCESS;
95 }
96
97}//namespace
98
99
100
101
102
#define ATH_MSG_ERROR(x)
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
This is an Identifier helper class for the TRT subdetector.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
IdDictManager is the interface to identifier dictionaries.
const IdDictMgr * manager(void) const
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
InDetGeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor with flags for requested geometry managers.
virtual StatusCode initialize()
Initialize.
const InDetDD::TRT_DetectorManager * m_TRTGeoManager
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.