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

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

+ Inheritance diagram for FW::CsvParticleWriter:
+ Collaboration diagram for FW::CsvParticleWriter:

Classes

struct  Config
 

Public Member Functions

 CsvParticleWriter (const Config &cfg, Acts::Logging::Level lvl)
 
- Public Member Functions inherited from FW::WriterT< SimParticleContainer >
 WriterT (std::string objectName, std::string writerName, Acts::Logging::Level level)
 
std::string name () const finaloverride
 Provide the name of the writer.
 
ProcessCode write (const AlgorithmContext &context) finaloverride
 Read the object and call the type-specific member function.
 
ProcessCode endRun () override
 No-op default implementation.
 
- Public Member Functions inherited from FW::IWriter
virtual ~IWriter ()=default
 

Protected Member Functions

ProcessCode writeT (const FW::AlgorithmContext &ctx, const SimParticleContainer &particles) finaloverride
 
- Protected Member Functions inherited from FW::WriterT< SimParticleContainer >
const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 Nested configuration struct.
 

Detailed Description

Write out particles in the TrackML comma-separated-value format.

This writer is restricted to outgoing particles, it is designed for generated particle information.

This writes one file per event into the configured output directory. By default it writes to the current working directory. Files are named using the following schema

event000000001-<stem>.csv
event000000002-<stem>.csv
...

and each line in the file corresponds to one particle.

Definition at line 34 of file CsvParticleWriter.hpp.

View newest version in sPHENIX GitHub at line 34 of file CsvParticleWriter.hpp

Constructor & Destructor Documentation

FW::CsvParticleWriter::CsvParticleWriter ( const Config cfg,
Acts::Logging::Level  lvl 
)

Construct the particle writer.

cfg is the configuration object lvl is the logging level

Definition at line 20 of file CsvParticleWriter.cpp.

View newest version in sPHENIX GitHub at line 20 of file CsvParticleWriter.cpp

References m_cfg, and FW::CsvParticleWriter::Config::outputStem.

Member Function Documentation

FW::ProcessCode FW::CsvParticleWriter::writeT ( const FW::AlgorithmContext ctx,
const SimParticleContainer particles 
)
finaloverrideprotectedvirtual

Type-specific write implementation.

Parameters
[in]ctxis the algorithm context
[in]particlesare the particle to be written

Implements FW::WriterT< SimParticleContainer >.

Definition at line 29 of file CsvParticleWriter.cpp.

View newest version in sPHENIX GitHub at line 29 of file CsvParticleWriter.cpp

References dfe::io_dsv_impl::NamedTupleDsvWriter< Delimiter, NamedTuple >::append(), Acts::UnitConstants::e, FW::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, FW::ParticleData::m, Acts::UnitConstants::mm, Acts::UnitConstants::ns, particle, FW::ParticleData::particle_id, FW::ParticleData::particle_type, FW::perEventFilepath(), FW::ParticleData::process, FW::ParticleData::px, FW::ParticleData::py, FW::ParticleData::pz, FW::ParticleData::q, SUCCESS, FW::ParticleData::vt, FW::ParticleData::vx, FW::ParticleData::vy, and FW::ParticleData::vz.

+ Here is the call graph for this function:

Member Data Documentation

Config FW::CsvParticleWriter::m_cfg
private

Nested configuration struct.

Definition at line 62 of file CsvParticleWriter.hpp.

View newest version in sPHENIX GitHub at line 62 of file CsvParticleWriter.hpp

Referenced by CsvParticleWriter().


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