Analysis Software
Documentation for sPHENIX simulation 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 &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 Configconfig () 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::Loggerlogger () 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
 

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 35 of file CsvParticleReader.hpp.

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

Constructor & Destructor Documentation

ActsExamples::CsvParticleReader::CsvParticleReader ( const Config config,
Acts::Logging::Level  level 
)

Construct the particle reader.

Parameters
configis the configuration object
levelis 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.

+ Here is the call graph for this function:

Member Function Documentation

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

const Config& ActsExamples::CsvParticleReader::config ( ) const
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.

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

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

The algorithm name.

Implements ActsExamples::SequenceElement.

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

+ Here is the call graph for this function:

Member Data Documentation

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

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

Definition at line 65 of file CsvParticleReader.hpp.

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

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

WriteDataHandle<SimParticleContainer> ActsExamples::CsvParticleReader::m_outputParticles
private
Initial value:
{this,
"OutputParticles"}

Definition at line 68 of file CsvParticleReader.hpp.

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

Referenced by CsvParticleReader().


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