ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetJiveXML
src
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
7
#include "
TRT_ReadoutGeometry/TRT_DetectorManager.h
"
8
#include "
InDetIdentifier/TRT_ID.h
"
9
10
#include "
InDetIdentifier/SCT_ID.h
"
11
12
#include "
InDetIdentifier/PixelID.h
"
13
14
#include "
IdDictDetDescr/IdDictManager.h
"
15
#include "
IdDict/IdDictDictionary.h
"
16
#include "
IdDict/IdDictMgr.h
"
17
18
namespace
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
36
StatusCode
InDetGeoModelTool::initialize
(){
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
IdDictDictionary.h
IdDictManager.h
IdDictMgr.h
InDetGeoModelTool.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
TRT_DetectorManager.h
TRT_ID.h
This is an Identifier helper class for the TRT subdetector.
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
IdDictDictionary
Definition
IdDictDictionary.h:33
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition
IdDictManager.h:26
IdDictManager::manager
const IdDictMgr * manager(void) const
Definition
IdDictManager.cxx:30
IdDictMgr::find_dictionary
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition
IdDictMgr.cxx:116
JiveXML::InDetGeoModelTool::m_SCTIDHelper
const SCT_ID * m_SCTIDHelper
Definition
InDetGeoModelTool.h:45
JiveXML::InDetGeoModelTool::InDetGeoModelTool
InDetGeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor with flags for requested geometry managers.
Definition
InDetGeoModelTool.cxx:26
JiveXML::InDetGeoModelTool::m_PixelIDHelper
const PixelID * m_PixelIDHelper
Definition
InDetGeoModelTool.h:43
JiveXML::InDetGeoModelTool::m_TRTIDHelper
const TRT_ID * m_TRTIDHelper
Definition
InDetGeoModelTool.h:48
JiveXML::InDetGeoModelTool::initialize
virtual StatusCode initialize()
Initialize.
Definition
InDetGeoModelTool.cxx:36
JiveXML::InDetGeoModelTool::m_TRTGeoManager
const InDetDD::TRT_DetectorManager * m_TRTGeoManager
Definition
InDetGeoModelTool.h:47
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition
BadLArRetriever.cxx:22
type
Generated on
for ATLAS Offline Software by
1.17.0