Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvParticleWriter.hpp>
Classes | |
struct | Config |
Public Member Functions | |
CsvParticleWriter (const Config &cfg, Acts::Logging::Level lvl) | |
const Config & | config () const |
Get readonly access to the config parameters. | |
Public Member Functions inherited from ActsExamples::WriterT< SimParticleContainer > | |
WriterT (std::string objectName, std::string writerName, Acts::Logging::Level level) | |
std::string | name () const override |
Provide the name of the writer. | |
ProcessCode | write (const AlgorithmContext &context) override |
Read the object and call the type-specific member function. | |
ProcessCode | finalize () override |
No-op default implementation. | |
Public Member Functions inherited from ActsExamples::IWriter | |
ProcessCode | internalExecute (const AlgorithmContext &context) final |
ProcessCode | initialize () override |
Fulfil 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 |
Protected Member Functions | |
ProcessCode | writeT (const ActsExamples::AlgorithmContext &ctx, const SimParticleContainer &particles) override |
Protected Member Functions inherited from ActsExamples::WriterT< SimParticleContainer > | |
const Acts::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
Nested configuration struct. | |
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 38 of file CsvParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 38 of file CsvParticleWriter.hpp
ActsExamples::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 24 of file CsvParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 24 of file CsvParticleWriter.cpp
References m_cfg, and ActsExamples::CsvParticleWriter::Config::outputStem.
|
inline |
Get readonly access to the config parameters.
Definition at line 58 of file CsvParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 58 of file CsvParticleWriter.hpp
References m_cfg.
|
overrideprotectedvirtual |
Type-specific write implementation.
[in] | ctx | is the algorithm context |
[in] | particles | are the particle to be written |
Implements ActsExamples::WriterT< SimParticleContainer >.
Definition at line 34 of file CsvParticleWriter.cpp.
View newest version in sPHENIX GitHub at line 34 of file CsvParticleWriter.cpp
References configureMap::data, Acts::UnitConstants::e, ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, ActsExamples::ParticleData::m, m_cfg(), Acts::UnitConstants::mm, Acts::UnitConstants::ns, merge_hashes::p, particle, ActsExamples::ParticleData::particle_id, ActsExamples::ParticleData::particle_type, ActsExamples::perEventFilepath(), ActsExamples::ParticleData::process, tgeo-response2json::process(), ActsExamples::ParticleData::px, ActsExamples::ParticleData::py, ActsExamples::ParticleData::pz, ActsExamples::ParticleData::q, SUCCESS, ActsExamples::ParticleData::vt, ActsExamples::ParticleData::vx, ActsExamples::ParticleData::vy, ActsExamples::ParticleData::vz, and writer.
|
private |
Nested configuration struct.
Definition at line 69 of file CsvParticleWriter.hpp.
View newest version in sPHENIX GitHub at line 69 of file CsvParticleWriter.hpp
Referenced by config(), and CsvParticleWriter().