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

#include <acts/blob/master/Examples/Io/Csv/include/ACTFW/Io/Csv/CsvParticleReader.hpp>

+ Inheritance diagram for FW::CsvParticleReader:
+ Collaboration diagram for FW::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 FW::AlgorithmContext &ctx) finaloverride
 Read out data from the input stream.
 
- Public Member Functions inherited from FW::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

FW::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 24 of file CsvParticleReader.cpp.

View newest version in sPHENIX GitHub at line 24 of file CsvParticleReader.cpp

References FW::CsvParticleReader::Config::inputStem, m_cfg, and FW::CsvParticleReader::Config::outputParticles.

Member Function Documentation

std::pair< size_t, size_t > FW::CsvParticleReader::availableEvents ( ) const
finaloverridevirtual

Return the available events range.

Implements FW::IReader.

Definition at line 42 of file CsvParticleReader.cpp.

View newest version in sPHENIX GitHub at line 42 of file CsvParticleReader.cpp

const Acts::Logger& FW::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 FW::CsvParticleReader::name ( ) const
finaloverridevirtual

The reader name.

Implements FW::IReader.

FW::ProcessCode FW::CsvParticleReader::read ( const FW::AlgorithmContext ctx)
finaloverridevirtual

Read out data from the input stream.

Implements FW::IReader.

Definition at line 46 of file CsvParticleReader.cpp.

View newest version in sPHENIX GitHub at line 46 of file CsvParticleReader.cpp

References FW::WhiteBoard::add(), Acts::UnitConstants::e, FW::AlgorithmContext::eventNumber, FW::AlgorithmContext::eventStore, Acts::UnitConstants::GeV, Acts::UnitConstants::mm, Acts::UnitConstants::ns, particle, FW::perEventFilepath(), 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 FW::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> FW::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> FW::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: