5#ifndef ACTSMATERIAL_MATERIALTRACKWRITER_H
6#define ACTSMATERIAL_MATERIALTRACKWRITER_H
9#include "GaudiKernel/ServiceHandle.h"
15#include <ActsPlugins/Root/RootMaterialTrackIo.hpp>
36 virtual StatusCode
execute (
const EventContext& ctx)
const override;
37 virtual StatusCode
finalize()
override;
44 Gaudi::Property<std::string>
m_fileName{
this,
"FileName",
"MaterialTracks.root",
"The output file name"};
46 Gaudi::Property<std::string>
m_treeName{
this,
"TreeName",
"material-tracks",
"The output tree name"};
48 Gaudi::Property<bool>
m_storeSurface{
this,
"StoreSurface",
false,
"Write the surface to which the material step correpond"};
50 Gaudi::Property<bool>
m_storeVolume{
this,
"StoreVolume",
false,
"Write the volume to which the material step correpond"};
52 Gaudi::Property<bool>
m_prePostStep{
this,
"PrePostStep",
false,
"Write out pre and post step (for G4), otherwise central step position"};
54 Gaudi::Property<bool>
m_recalculateTotals{
this,
"RecalculateTotals",
false,
"Re-calculate total values from individual steps (for cross-checks)"};
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_treeName
The output file name.
Gaudi::Property< bool > m_recalculateTotals
Re-calculate total values from individual steps (for cross-checks)
TFile * m_outputFile
The output file and tree.
SG::ReadHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to read.
virtual ~MaterialTrackWriter()
Gaudi::Property< bool > m_storeVolume
Write the volume to which the material step correpond.
virtual StatusCode finalize() override
Gaudi::Property< bool > m_storeSurface
Write the surface to which the material step correpond.
std::mutex m_writeMutex
mutex used to protect multi-threaded writes
ActsPlugins::RootMaterialTrackIo m_accessor ATLAS_THREAD_SAFE
The read - write payload.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
The tracking geometry service to retrive the geometry context.
MaterialTrackWriter(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::string > m_fileName
The output file name.
Gaudi::Property< bool > m_prePostStep
Write out pre and post step (for G4), otherwise central step position.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...