ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialJsonDumpAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "Acts/Geometry/TrackingGeometry.hpp"
7
8ActsTrk::MaterialJsonDumpAlg::MaterialJsonDumpAlg(const std::string& name, ISvcLocator* pSvcLocator)
9 : AthReentrantAlgorithm(name, pSvcLocator)
10{}
11
13{
15 ATH_CHECK(m_materialDumper.retrieve());
16 return StatusCode::SUCCESS;
17}
18
19StatusCode ActsTrk::MaterialJsonDumpAlg::execute(const EventContext& /*ctx*/) const
20{
21 return StatusCode::SUCCESS;
22}
23
25{
26 const std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry = m_trackingGeometrySvc->trackingGeometry();
27 if (!trackingGeometry) {
28 ATH_MSG_ERROR("No tracking geometry available to dump the material from");
29 return StatusCode::FAILURE;
30 }
31
32 m_materialDumper->dumpGeometryMaterial(m_trackingGeometrySvc->getNominalContext(), *trackingGeometry);
33
34 return StatusCode::SUCCESS;
35}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
The tracking geometry service holding the decorated geometry.
virtual StatusCode finalize() override
MaterialJsonDumpAlg(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< IMaterialDumperTool > m_materialDumper
The material dumper, shared with the material mapping.
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
An algorithm that can be simultaneously executed in multiple threads.