ATLAS Offline Software
ActsWriteTrackingGeometry.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
5 
6 // ATHENA
8 #include "Acts/Utilities/Logger.hpp"
10 #include "GaudiKernel/ISvcLocator.h"
11 #include "ActsInterop/Logger.h"
12 
13 // PACKAGE
17 
18 // STL
19 #include <string>
20 
22  ISvcLocator* pSvcLocator)
23  : AthReentrantAlgorithm(name, pSvcLocator)
24 {
25 }
26 
28  ATH_MSG_INFO("initializing");
29 
30  ATH_CHECK(m_objWriterTool.retrieve());
33 
34 
35  return StatusCode::SUCCESS;
36 }
37 
38 StatusCode ActsWriteTrackingGeometry::execute(const EventContext& ctx) const {
39  auto trackingGeometry = m_trackingGeometryTool->trackingGeometry();
40 
41  // Use the geometry context
42  const ActsGeometryContext& gctx = m_trackingGeometryTool->getGeometryContext(ctx);
43 
44  m_objWriterTool->write(gctx, *trackingGeometry);
45  m_materialJsonWriterTool->write(gctx, *trackingGeometry);
46  return StatusCode::SUCCESS;
47 }
48 
50  return StatusCode::SUCCESS;
51 }
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ActsWriteTrackingGeometry::m_trackingGeometryTool
ToolHandle< ActsTrackingGeometryTool > m_trackingGeometryTool
Definition: ActsWriteTrackingGeometry.h:40
ActsGeometryContext.h
ActsWriteTrackingGeometry::m_materialJsonWriterTool
ToolHandle< IActsMaterialJsonWriterTool > m_materialJsonWriterTool
Definition: ActsWriteTrackingGeometry.h:43
ActsWriteTrackingGeometry::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: ActsWriteTrackingGeometry.cxx:38
ActsWriteTrackingGeometry::finalize
virtual StatusCode finalize() override
Definition: ActsWriteTrackingGeometry.cxx:49
ActsWriteTrackingGeometry.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IActsTrackingGeometrySvc.h
ActsWriteTrackingGeometry::initialize
virtual StatusCode initialize() override
Definition: ActsWriteTrackingGeometry.cxx:27
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsWriteTrackingGeometry::m_objWriterTool
ToolHandle< ActsObjWriterTool > m_objWriterTool
Definition: ActsWriteTrackingGeometry.h:42
RNGWrapper.h
IActsMaterialJsonWriterTool.h
Logger.h
ActsWriteTrackingGeometry::ActsWriteTrackingGeometry
ActsWriteTrackingGeometry(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ActsWriteTrackingGeometry.cxx:21