ATLAS Offline Software
Tracking
Acts
ActsGeometry
src
ActsWriteTrackingGeometry.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
ActsGeometry/ActsWriteTrackingGeometry.h
"
5
6
// ATHENA
7
#include "
AthenaKernel/RNGWrapper.h
"
8
#include "Acts/Utilities/Logger.hpp"
9
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
10
#include "GaudiKernel/ISvcLocator.h"
11
#include "
ActsInterop/Logger.h
"
12
13
// PACKAGE
14
#include "
ActsGeometryInterfaces/IActsTrackingGeometrySvc.h
"
15
#include "
ActsGeometryInterfaces/IActsMaterialJsonWriterTool.h
"
16
#include "
ActsGeometryInterfaces/ActsGeometryContext.h
"
17
18
// STL
19
#include <string>
20
21
ActsWriteTrackingGeometry::ActsWriteTrackingGeometry
(
const
std::string&
name
,
22
ISvcLocator* pSvcLocator)
23
:
AthReentrantAlgorithm
(
name
, pSvcLocator)
24
{
25
}
26
27
StatusCode
ActsWriteTrackingGeometry::initialize
() {
28
ATH_MSG_INFO
(
"initializing"
);
29
30
ATH_CHECK
(
m_objWriterTool
.retrieve());
31
ATH_CHECK
(
m_trackingGeometryTool
.retrieve());
32
ATH_CHECK
(
m_materialJsonWriterTool
.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
49
StatusCode
ActsWriteTrackingGeometry::finalize
() {
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
Generated on Mon Dec 23 2024 21:06:37 for ATLAS Offline Software by
1.8.18