Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvParticleReader.hpp>
Classes | |
struct | Config |
Public Member Functions | |
CsvParticleReader (const Config &config, Acts::Logging::Level level) | |
std::string | name () const override |
The algorithm name. | |
std::pair< size_t, size_t > | availableEvents () const override |
Return the available events range. | |
ProcessCode | read (const ActsExamples::AlgorithmContext &ctx) override |
Read out data from the input stream. | |
const Config & | config () const |
Readonly access to the config. | |
Public Member Functions inherited from ActsExamples::IReader | |
ProcessCode | internalExecute (const AlgorithmContext &context) final |
ProcessCode | initialize () override |
Fulfill the algorithm interface. | |
ProcessCode | finalize () override |
Fulfill the algorithm interface. | |
Public Member Functions inherited from ActsExamples::SequenceElement | |
virtual | ~SequenceElement ()=default |
const std::vector< const DataHandleBase * > & | writeHandles () const |
const std::vector< const DataHandleBase * > & | readHandles () const |
Private Member Functions | |
const Acts::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
std::pair< size_t, size_t > | m_eventsRange |
std::unique_ptr< const Acts::Logger > | m_logger |
WriteDataHandle < SimParticleContainer > | m_outputParticles |
Read particles in the TrackML comma-separated-value format.
This reads one file per event in the configured input directory and filename. Files are assumed to be named using the following schema
event000000001-<stem>.csv event000000002-<stem>.csv
and each line in the file corresponds to one particle. The input filename can be configured and defaults to particles.csv
.
Definition at line 35 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 35 of file CsvParticleReader.hpp
ActsExamples::CsvParticleReader::CsvParticleReader | ( | const Config & | config, |
Acts::Logging::Level | level | ||
) |
Construct the particle reader.
config | is the configuration object |
level | is the logging level |
Definition at line 30 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 30 of file CsvParticleReader.cpp
References ActsExamples::WriteDataHandle< T >::initialize(), ActsExamples::CsvParticleReader::Config::inputStem, m_cfg, m_outputParticles, and ActsExamples::CsvParticleReader::Config::outputParticles.
|
overridevirtual |
Return the available events range.
Implements ActsExamples::IReader.
Definition at line 51 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 51 of file CsvParticleReader.cpp
|
inline |
Readonly access to the config.
Definition at line 61 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 61 of file CsvParticleReader.hpp
References m_cfg.
|
inlineprivate |
Definition at line 71 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 71 of file CsvParticleReader.hpp
References m_logger.
|
overridevirtual |
The algorithm name.
Implements ActsExamples::SequenceElement.
|
overridevirtual |
Read out data from the input stream.
Implements ActsExamples::IReader.
Definition at line 56 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 56 of file CsvParticleReader.cpp
References configureMap::data, Acts::UnitConstants::e, ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, m_cfg(), Acts::UnitConstants::mm, testing::internal::move(), Acts::UnitConstants::ns, particle, particles, path, ActsExamples::perEventFilepath(), summary::reader, ActsFatras::Particle::setAbsoluteMomentum(), ActsFatras::Particle::setDirection(), ActsFatras::Particle::setPosition4(), ActsFatras::Particle::setProcess(), and SUCCESS.
|
private |
Definition at line 64 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 64 of file CsvParticleReader.hpp
Referenced by config(), and CsvParticleReader().
|
private |
Definition at line 65 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 65 of file CsvParticleReader.hpp
|
private |
Definition at line 66 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 66 of file CsvParticleReader.hpp
Referenced by logger().
|
private |
Definition at line 68 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 68 of file CsvParticleReader.hpp
Referenced by CsvParticleReader().