ATLAS Offline Software
ActsTrackingGeometryTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 ActsTrackingGeometryTool::ActsTrackingGeometryTool(const std::string& type, const std::string& name,
8  const IInterface* parent)
9  : base_class(type, name, parent)
10 {
11 }
12 
15 {
16  ATH_MSG_INFO(name() << " initializing");
17 
18  ATH_CHECK( m_trackingGeometrySvc.retrieve() );
19 
21 
22  return StatusCode::SUCCESS;
23 }
24 
25 std::shared_ptr<const Acts::TrackingGeometry>
27 {
28  return m_trackingGeometrySvc->trackingGeometry();
29 }
30 
32 ActsTrackingGeometryTool::getGeometryContext(const EventContext& ctx) const
33 {
34  ATH_MSG_DEBUG("Creating alignment context for event");
36 
37  if(!rch.isValid()) {
38  ATH_MSG_ERROR("Creating alignment context failed: read cond handle invalid!");
39  }
40 
41  return *rch;
42 }
43 
46 
47  return m_trackingGeometrySvc->getNominalContext();
48 }
50  return getGeometryContext(Gaudi::Hive::currentContext());
51 }
52 
ActsTrackingGeometryTool::getGeometryContext
const ActsGeometryContext & getGeometryContext() const override
Definition: ActsTrackingGeometryTool.cxx:49
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrackingGeometryTool::initialize
StatusCode initialize() override
Definition: ActsTrackingGeometryTool.cxx:14
ActsTrackingGeometryTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrackingGeometryTool::ActsTrackingGeometryTool
ActsTrackingGeometryTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ActsTrackingGeometryTool.cxx:7
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:28
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ActsTrackingGeometryTool::getNominalGeometryContext
virtual const ActsGeometryContext & getNominalGeometryContext() const override
Definition: ActsTrackingGeometryTool.cxx:45
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrackingGeometryTool::m_trackingGeometrySvc
ServiceHandle< IActsTrackingGeometrySvc > m_trackingGeometrySvc
Definition: ActsTrackingGeometryTool.h:51
ActsTrackingGeometryTool::m_rchk
SG::ReadHandleKey< ActsGeometryContext > m_rchk
Definition: ActsTrackingGeometryTool.h:53
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrackingGeometryTool::trackingGeometry
virtual std::shared_ptr< const Acts::TrackingGeometry > trackingGeometry() const override
Definition: ActsTrackingGeometryTool.cxx:26