7#include "GaudiKernel/IInterface.h"
28 m_accessor = ActsPlugins::RootMaterialTrackIo{cfg};
34 return StatusCode::SUCCESS;
38 const EventContext& ctx = Gaudi::Hive::currentContext();
45 : Acts::GeometryContext::dangerouslyDefaultConstruct();
49 for (
const auto& materialTrack : *materialTracks) {
51 m_accessor.write(geoContext, ctx.evt(), materialTrack);
56 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< std::string > m_outStream
The output file name.
virtual StatusCode initialize() override
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
The tracking geometry service to retrive the geometry context.
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)
Gaudi::Property< bool > m_useTrackingGeo
SG::ReadHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to read.
virtual StatusCode execute() override
ActsPlugins::RootMaterialTrackIo::Config Config_t
virtual ~MaterialTrackWriter()
Gaudi::Property< bool > m_storeVolume
Write the volume to which the material step correpond.
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
Gaudi::Property< bool > m_storeSurface
Write the surface to which the material step correpond.
TTree * m_outputTree
The output file and tree.
std::mutex m_writeMutex
mutex used to protect multi-threaded writes
Gaudi::Property< bool > m_prePostStep
Write out pre and post step (for G4), otherwise central step position.
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
std::vector< Acts::RecordedMaterialTrack > RecordedMaterialTrackCollection
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.