7#include "GaudiKernel/IInterface.h"
28 m_accessor = ActsPlugins::RootMaterialTrackIo{cfg};
33 return StatusCode::SUCCESS;
43 : Acts::GeometryContext::dangerouslyDefaultConstruct();
47 for (
const auto& materialTrack : *materialTracks) {
49 m_accessor.write(geoContext, ctx.evt(), materialTrack);
54 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
Gaudi::Property< std::string > m_outStream
The output file name.
virtual StatusCode initialize() override
ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
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.
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
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
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.