EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvParticleReader.hpp>
Classes | |
struct | Config |
Public Member Functions | |
CsvParticleReader (const Config &cfg, Acts::Logging::Level lvl) | |
std::string | name () const finaloverride |
The reader name. | |
std::pair< size_t, size_t > | availableEvents () const finaloverride |
Return the available events range. | |
ProcessCode | read (const ActsExamples::AlgorithmContext &ctx) finaloverride |
Read out data from the input stream. | |
Public Member Functions inherited from ActsExamples::IReader | |
virtual | ~IReader ()=default |
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 |
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 29 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 29 of file CsvParticleReader.hpp
ActsExamples::CsvParticleReader::CsvParticleReader | ( | const Config & | cfg, |
Acts::Logging::Level | lvl | ||
) |
Construct the particle reader.
cfg is the configuration object lvl is the logging level
Definition at line 26 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 26 of file CsvParticleReader.cpp
References ActsExamples::CsvParticleReader::Config::inputStem, m_cfg, and ActsExamples::CsvParticleReader::Config::outputParticles.
|
finaloverridevirtual |
Return the available events range.
Implements ActsExamples::IReader.
Definition at line 45 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 45 of file CsvParticleReader.cpp
|
inlineprivate |
Definition at line 59 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 59 of file CsvParticleReader.hpp
References m_logger.
|
finaloverridevirtual |
The reader name.
Implements ActsExamples::IReader.
Referenced by eicpy.verify.PythiaHistograms::__init__(), and eicpy.verify.DjangohHistograms::__init__().
|
finaloverridevirtual |
Read out data from the input stream.
Implements ActsExamples::IReader.
Definition at line 50 of file CsvParticleReader.cpp.
View newest version in sPHENIX GitHub at line 50 of file CsvParticleReader.cpp
References ActsExamples::WhiteBoard::add(), data, Acts::UnitConstants::e, ActsExamples::AlgorithmContext::eventNumber, ActsExamples::AlgorithmContext::eventStore, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, particle, ActsExamples::perEventFilepath(), reader(), ActsFatras::Particle::setAbsMomentum(), ActsFatras::Particle::setDirection(), ActsFatras::Particle::setPosition4(), ActsFatras::Particle::setProcess(), and SUCCESS.
|
private |
Definition at line 55 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 55 of file CsvParticleReader.hpp
Referenced by CsvParticleReader().
|
private |
Definition at line 56 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 56 of file CsvParticleReader.hpp
|
private |
Definition at line 57 of file CsvParticleReader.hpp.
View newest version in sPHENIX GitHub at line 57 of file CsvParticleReader.hpp
Referenced by logger().