ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
InDetTrackingGeometry
src
TRT_LayerBuilderCond.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetTrackingGeometry/TRT_LayerBuilderCond.h
"
6
//Trk
7
#include "
TrkGeometry/CylinderLayer.h
"
8
#include "
TrkGeometry/DiscLayer.h
"
9
// InDetDD
10
#include "
TRT_ReadoutGeometry/TRT_DetElementContainer.h
"
11
// Athena
12
#include "
AthenaKernel/IOVInfiniteRange.h
"
13
14
// constructor
15
InDet::TRT_LayerBuilderCond::TRT_LayerBuilderCond
(
const
std::string& t,
const
std::string& n,
const
IInterface* p) :
16
base_class(t,n,p)
17
{
18
}
19
20
21
// Athena standard methods
22
// initialize
23
StatusCode
InDet::TRT_LayerBuilderCond::initialize
()
24
{
25
ATH_MSG_DEBUG
(
"initialize()"
);
26
// get TRT Detector Description
27
ATH_CHECK
(
m_readKeyTRTContainer
.initialize());
28
return
StatusCode::SUCCESS;
29
}
30
31
33
std::unique_ptr<const std::vector<Trk::CylinderLayer*> >
34
InDet::TRT_LayerBuilderCond::cylindricalLayers
(
const
EventContext& ctx,
35
SG::WriteCondHandle<Trk::TrackingGeometry>
& whandle)
const
36
{
37
SG::ReadCondHandle<InDetDD::TRT_DetElementContainer>
readHandleTRTContainer{
m_readKeyTRTContainer
,ctx};
38
const
InDetDD::TRT_DetElementContainer
* trtContainer{*readHandleTRTContainer};
39
if
(trtContainer ==
nullptr
){
40
ATH_MSG_ERROR
(
"Aligned TRT could not be retrieved from CondStore: "
<<
m_readKeyTRTContainer
);
41
return
nullptr
;
42
}
43
whandle.
addDependency
(readHandleTRTContainer);
44
return
cylindricalLayersImpl(trtContainer);
45
}
46
47
49
std::unique_ptr<const std::vector<Trk::DiscLayer*> >
50
InDet::TRT_LayerBuilderCond::discLayers
(
const
EventContext& ctx,
51
SG::WriteCondHandle<Trk::TrackingGeometry>
& whandle)
const
52
{
53
SG::ReadCondHandle<InDetDD::TRT_DetElementContainer>
readHandleTRTContainer{
m_readKeyTRTContainer
, ctx};
54
const
InDetDD::TRT_DetElementContainer
* trtContainer{*readHandleTRTContainer};
55
if
(trtContainer ==
nullptr
){
56
ATH_MSG_ERROR
(
"Aligned TRT could not be retrieved from CondStore: "
<<
m_readKeyTRTContainer
);
57
return
nullptr
;
58
}
59
whandle.
addDependency
(readHandleTRTContainer);
60
return
discLayersImpl(trtContainer);
61
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x,...)
Definition
AthMsgStreamMacros.h:43
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
CylinderLayer.h
DiscLayer.h
IOVInfiniteRange.h
TRT_DetElementContainer.h
TRT_LayerBuilderCond.h
InDetDD::TRT_DetElementContainer
Class to hold different TRT detector elements structures.
Definition
TRT_DetElementContainer.h:25
InDet::TRT_LayerBuilderCond::m_readKeyTRTContainer
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_readKeyTRTContainer
Definition
TRT_LayerBuilderCond.h:70
InDet::TRT_LayerBuilderCond::discLayers
virtual std::unique_ptr< const std::vector< Trk::DiscLayer * > > discLayers(const EventContext &ctx, SG::WriteCondHandle< Trk::TrackingGeometry > &whandle) const override final
LayerBuilderCond interface method - returning Endcap-like layers.
Definition
TRT_LayerBuilderCond.cxx:50
InDet::TRT_LayerBuilderCond::cylindricalLayers
virtual std::unique_ptr< const std::vector< Trk::CylinderLayer * > > cylindricalLayers(const EventContext &ctx, SG::WriteCondHandle< Trk::TrackingGeometry > &whandle) const override final
LayerBuilderCond interface method - returning Barrel-like layers.
Definition
TRT_LayerBuilderCond.cxx:34
InDet::TRT_LayerBuilderCond::TRT_LayerBuilderCond
TRT_LayerBuilderCond(const std::string &, const std::string &, const IInterface *)
AlgTool style constructor.
Definition
TRT_LayerBuilderCond.cxx:15
InDet::TRT_LayerBuilderCond::initialize
virtual StatusCode initialize() override final
AlgTool initialize method.
Definition
TRT_LayerBuilderCond.cxx:23
SG::ReadCondHandle
Definition
ReadCondHandle.h:39
SG::WriteCondHandle
Definition
WriteCondHandle.h:26
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition
WriteCondHandle.h:279
Generated on
for ATLAS Offline Software by
1.17.0