EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::CsvParticleReader Exception Referencefinal

#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvParticleReader.hpp>

+ Inheritance diagram for ActsExamples::CsvParticleReader:
+ Collaboration diagram for ActsExamples::CsvParticleReader:

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::Loggerlogger () const
 

Private Attributes

Config m_cfg
 
std::pair< size_t, size_t > m_eventsRange
 
std::unique_ptr< const
Acts::Logger
m_logger
 

Detailed Description

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

Constructor & Destructor Documentation

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.

Member Function Documentation

std::pair< size_t, size_t > ActsExamples::CsvParticleReader::availableEvents ( ) const
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

const Acts::Logger& ActsExamples::CsvParticleReader::logger ( ) const
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.

std::string ActsExamples::CsvParticleReader::name ( ) const
finaloverridevirtual

The reader name.

Implements ActsExamples::IReader.

Referenced by eicpy.verify.PythiaHistograms::__init__(), and eicpy.verify.DjangohHistograms::__init__().

+ Here is the caller graph for this function:

ActsExamples::ProcessCode ActsExamples::CsvParticleReader::read ( const ActsExamples::AlgorithmContext ctx)
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.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::CsvParticleReader::m_cfg
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().

std::pair<size_t, size_t> ActsExamples::CsvParticleReader::m_eventsRange
private

Definition at line 56 of file CsvParticleReader.hpp.

View newest version in sPHENIX GitHub at line 56 of file CsvParticleReader.hpp

std::unique_ptr<const Acts::Logger> ActsExamples::CsvParticleReader::m_logger
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().


The documentation for this exception was generated from the following files: