6#include "GaudiKernel/IInterface.h"
22 return StatusCode::FAILURE;
34 return StatusCode::FAILURE;
44 std::optional<std::uint32_t> evt{0ul};
45 std::size_t procEvts{0ul};
59 ATH_MSG_INFO(
"Skipped "<<procEvts<<
" events. Corresponding to "
64 return StatusCode::FAILURE;
67 <<
m_batchSize.value()<<
" material events per athena event. Until "
68 <<
m_maxEvents.value()<<
" events are processed or the tree is finished");
69 return StatusCode::SUCCESS;
74 ATH_MSG_ERROR(
"Not all entries / events have been processed. Processed entries: "
78 return StatusCode::SUCCESS;
88 ATH_CHECK(materialTracks.
record(std::make_unique<ActsTrk::RecordedMaterialTrackCollection>()));
93 return StatusCode::SUCCESS;
96 std::size_t nProcEvents{0ul};
103 Acts::RecordedMaterialTrack rmTrack =
m_accessor.read();
118 return StatusCode::SUCCESS;
122 ATH_MSG_DEBUG(
"Batch processing "<<nProcEvents<<
" completed. ");
127 materialTracks->push_back(std::move(rmTrack));
130 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
std::unique_ptr< TChain > m_inputChain
The input chain of entries.
Gaudi::Property< std::size_t > m_batchSize
The batch size (number of track per events).
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
Gaudi::Property< std::size_t > m_skipEvents
The number of events in the file to skip.
virtual StatusCode initialize() override
Gaudi::Property< std::size_t > m_maxEvents
The number of events in the processed.
virtual StatusCode finalize() override
Gaudi::Property< std::vector< std::string > > m_fileNames
The list of input filenames.
Gaudi::Property< std::string > m_treeName
The name of the input tree.
virtual ~MaterialTrackReader()
std::size_t m_nTreeEntries
The number of entries in the tree to read.
SG::WriteHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to write.
std::size_t m_currEntry
The current processed tree entry.
std::size_t m_procEvents
The number of processed tree events.
bool isPresent() const
Is the referenced object present in SG?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.