ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsMaterial
src
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
5
#include "
MaterialJsonDumpAlg.h
"
6
#include "Acts/Geometry/TrackingGeometry.hpp"
7
8
ActsTrk::MaterialJsonDumpAlg::MaterialJsonDumpAlg
(
const
std::string& name, ISvcLocator* pSvcLocator)
9
:
AthReentrantAlgorithm
(name, pSvcLocator)
10
{}
11
12
StatusCode
ActsTrk::MaterialJsonDumpAlg::initialize
()
13
{
14
ATH_CHECK
(
m_trackingGeometrySvc
.retrieve());
15
ATH_CHECK
(
m_materialDumper
.retrieve());
16
return
StatusCode::SUCCESS;
17
}
18
19
StatusCode
ActsTrk::MaterialJsonDumpAlg::execute
(
const
EventContext&
/*ctx*/
)
const
20
{
21
return
StatusCode::SUCCESS;
22
}
23
24
StatusCode
ActsTrk::MaterialJsonDumpAlg::finalize
()
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
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
MaterialJsonDumpAlg.h
ActsTrk::MaterialJsonDumpAlg::m_trackingGeometrySvc
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
The tracking geometry service holding the decorated geometry.
Definition
MaterialJsonDumpAlg.h:38
ActsTrk::MaterialJsonDumpAlg::finalize
virtual StatusCode finalize() override
Definition
MaterialJsonDumpAlg.cxx:24
ActsTrk::MaterialJsonDumpAlg::MaterialJsonDumpAlg
MaterialJsonDumpAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MaterialJsonDumpAlg.cxx:8
ActsTrk::MaterialJsonDumpAlg::m_materialDumper
ToolHandle< IMaterialDumperTool > m_materialDumper
The material dumper, shared with the material mapping.
Definition
MaterialJsonDumpAlg.h:35
ActsTrk::MaterialJsonDumpAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
MaterialJsonDumpAlg.cxx:19
ActsTrk::MaterialJsonDumpAlg::initialize
virtual StatusCode initialize() override
Definition
MaterialJsonDumpAlg.cxx:12
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
Generated on
for ATLAS Offline Software by
1.17.0