ATLAS Offline Software
LayerProviderCond.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Trk include
9 #include "TrkGeometry/Layer.h"
10 
11 // constructor
13  const std::string& n,
14  const IInterface* p)
15  : base_class(t, n, p)
16 {
17 }
18 
19 // initialize
22 {
23  if (m_layerBuilder.retrieve().isFailure()) {
24  ATH_MSG_WARNING("Could not retrieve layer builder");
25  }
26  return StatusCode::SUCCESS;
27 }
28 
30 const std::vector<Trk::Layer*>
31 Trk::LayerProviderCond::centralLayers(const EventContext& ctx,
33 {
34  // retrieving the cylinder layers from the layer builder
35  std::unique_ptr<const std::vector<Trk::CylinderLayer*> >
36  cylinderLayers = m_layerBuilder->cylindricalLayers(ctx, whandle);
37  return cylindricalLayersToCentralLayers(std::move(cylinderLayers));
38 }
39 
41 std::pair<const std::vector<Trk::Layer*>, const std::vector<Trk::Layer*> >
42 Trk::LayerProviderCond::endcapLayer(const EventContext& ctx,
44 {
45  // retrieving the cylinder layers from the layer builder
46  std::unique_ptr<const std::vector<Trk::DiscLayer*> > discLayers =
47  m_layerBuilder->discLayers(ctx, whandle);
48  return discLayersToEndcapLayers(std::move(discLayers));
49 }
50 
51 const std::string&
53 {
54  return m_layerBuilder->identification();
55 }
Trk::LayerProviderCond::initialize
virtual StatusCode initialize() override final
initialize
Definition: LayerProviderCond.cxx:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DiscLayer.h
Layer.h
Trk::LayerProviderCond::identification
virtual const std::string & identification() const override final
Name identification.
Definition: LayerProviderCond.cxx:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CylinderLayer.h
Trk::LayerProviderCond::endcapLayer
virtual std::pair< const std::vector< Layer * >, const std::vector< Layer * > > endcapLayer(const EventContext &ctx, SG::WriteCondHandle< TrackingGeometry > &whandle) const override final
LayerBuilder interface method - returning the layers in the endcaps.
Definition: LayerProviderCond.cxx:42
Trk::LayerProviderCond::LayerProviderCond
LayerProviderCond(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: LayerProviderCond.cxx:12
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::LayerProviderCond::centralLayers
virtual const std::vector< Layer * > centralLayers(const EventContext &ctx, SG::WriteCondHandle< TrackingGeometry > &whandle) const override final
LayerBuilder interface method - returning the central layers.
Definition: LayerProviderCond.cxx:31
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
LayerProviderCond.h