Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvSimHitReader.hpp>
Classes | |
struct | Config |
Public Member Functions | |
CsvSimHitReader (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 Config & | config () 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::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
std::pair< size_t, size_t > | m_eventsRange |
std::unique_ptr< const Acts::Logger > | m_logger |
WriteDataHandle< SimHitContainer > | m_outputSimHits {this, "OutputSimHits"} |
Read in a simhit collection in comma-separated-value format.
This reads one files per event in the configured input directory. By default it reads files in the current working directory. 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 simhit.
Definition at line 36 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 36 of file CsvSimHitReader.hpp
ActsExamples::CsvSimHitReader::CsvSimHitReader | ( | const Config & | config, |
Acts::Logging::Level | level | ||
) |
Construct the simhit reader.
config | is the configuration object |
level | is the logging level |
Definition at line 26 of file CsvSimHitReader.cpp.
View newest version in sPHENIX GitHub at line 26 of file CsvSimHitReader.cpp
References ActsExamples::WriteDataHandle< T >::initialize(), ActsExamples::CsvSimHitReader::Config::inputStem, m_cfg, m_outputSimHits, and ActsExamples::CsvSimHitReader::Config::outputSimHits.
|
overridevirtual |
Return the available events range.
Implements ActsExamples::IReader.
Definition at line 48 of file CsvSimHitReader.cpp.
View newest version in sPHENIX GitHub at line 48 of file CsvSimHitReader.cpp
|
inline |
Readonly access to the config.
Definition at line 62 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 62 of file CsvSimHitReader.hpp
References m_cfg.
|
inlineprivate |
Definition at line 71 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 71 of file CsvSimHitReader.hpp
References m_logger.
|
overridevirtual |
The algorithm name.
Implements ActsExamples::SequenceElement.
|
overridevirtual |
Read out data from the input stream.
Implements ActsExamples::IReader.
Definition at line 53 of file CsvSimHitReader.cpp.
View newest version in sPHENIX GitHub at line 53 of file CsvSimHitReader.cpp
References configureMap::data, ActsExamples::SimHitData::deltae, ActsExamples::SimHitData::deltapx, ActsExamples::SimHitData::deltapy, ActsExamples::SimHitData::deltapz, ActsExamples::AlgorithmContext::eventNumber, ActsExamples::SimHitData::geometry_id, Acts::UnitConstants::GeV, ActsExamples::SimHitData::index, m_cfg(), Acts::UnitConstants::mm, testing::internal::move(), Acts::UnitConstants::ns, ActsExamples::SimHitData::particle_id, path, ActsExamples::perEventFilepath(), Acts::Test::pos4(), summary::reader, SUCCESS, ActsExamples::SimHitData::te, ActsExamples::SimHitData::tpx, ActsExamples::SimHitData::tpy, ActsExamples::SimHitData::tpz, ActsExamples::SimHitData::tt, ActsExamples::SimHitData::tx, ActsExamples::SimHitData::ty, and ActsExamples::SimHitData::tz.
|
private |
Definition at line 65 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 65 of file CsvSimHitReader.hpp
Referenced by config(), and CsvSimHitReader().
|
private |
Definition at line 66 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 66 of file CsvSimHitReader.hpp
|
private |
Definition at line 67 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 67 of file CsvSimHitReader.hpp
Referenced by logger().
|
private |
Definition at line 69 of file CsvSimHitReader.hpp.
View newest version in sPHENIX GitHub at line 69 of file CsvSimHitReader.hpp
Referenced by CsvSimHitReader().