Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::CsvMeasurementWriter Class Referencefinal

#include <acts/blob/sPHENIX/Examples/Io/Csv/include/ActsExamples/Io/Csv/CsvMeasurementWriter.hpp>

+ Inheritance diagram for ActsExamples::CsvMeasurementWriter:
+ Collaboration diagram for ActsExamples::CsvMeasurementWriter:

Classes

struct  Config
 

Public Member Functions

 CsvMeasurementWriter (const Config &config, Acts::Logging::Level level)
 
 ~CsvMeasurementWriter () override
 Virtual destructor.
 
ProcessCode finalize () override
 End-of-run hook.
 
const Configconfig () const
 Get readonly access to the config parameters.
 
- Public Member Functions inherited from ActsExamples::WriterT< MeasurementContainer >
 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 AlgorithmContext &ctx, const MeasurementContainer &measurements) override
 
- Protected Member Functions inherited from ActsExamples::WriterT< MeasurementContainer >
const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 
ReadDataHandle< IndexMultimap
< Index > > 
m_inputMeasurementSimHitsMap
 
ReadDataHandle< ClusterContainerm_inputClusters {this, "InputClusters"}
 

Detailed Description

This writes multiples file per event containing information about the measurement, the associated truth information and the cell/channel details

event000000001-cells.csv
event000000001-measurements.csv
event000000002-cells.csv
event000000002-measurements.csv
...

Intrinsically thread-safe as one file per event.

Definition at line 45 of file CsvMeasurementWriter.hpp.

View newest version in sPHENIX GitHub at line 45 of file CsvMeasurementWriter.hpp

Constructor & Destructor Documentation

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

Constructor with

Parameters
configconfiguration struct
levellogging level

Definition at line 33 of file CsvMeasurementWriter.cpp.

View newest version in sPHENIX GitHub at line 33 of file CsvMeasurementWriter.cpp

References ActsExamples::ReadDataHandle< T >::initialize(), ActsExamples::CsvMeasurementWriter::Config::inputClusters, ActsExamples::CsvMeasurementWriter::Config::inputMeasurementSimHitsMap, m_cfg, m_inputClusters, m_inputMeasurementSimHitsMap, and ActsExamples::DataHandleBase::maybeInitialize().

+ Here is the call graph for this function:

ActsExamples::CsvMeasurementWriter::~CsvMeasurementWriter ( )
overridedefault

Virtual destructor.

Member Function Documentation

const Config& ActsExamples::CsvMeasurementWriter::config ( ) const
inline

Get readonly access to the config parameters.

Definition at line 72 of file CsvMeasurementWriter.hpp.

View newest version in sPHENIX GitHub at line 72 of file CsvMeasurementWriter.hpp

References m_cfg.

ActsExamples::ProcessCode ActsExamples::CsvMeasurementWriter::finalize ( )
overridevirtual

End-of-run hook.

Implements ActsExamples::SequenceElement.

Definition at line 50 of file CsvMeasurementWriter.cpp.

View newest version in sPHENIX GitHub at line 50 of file CsvMeasurementWriter.cpp

References SUCCESS.

ActsExamples::ProcessCode ActsExamples::CsvMeasurementWriter::writeT ( const AlgorithmContext ctx,
const MeasurementContainer measurements 
)
overrideprotectedvirtual

This implementation holds the actual writing method and is called by the WriterT<>::write interface

Parameters
ctxThe Algorithm context with per event information
measurementsis the data to be written out

Implements ActsExamples::WriterT< MeasurementContainer >.

Definition at line 55 of file CsvMeasurementWriter.cpp.

View newest version in sPHENIX GitHub at line 55 of file CsvMeasurementWriter.cpp

References _, ACTS_VERBOSE, Acts::PhysicalConstants::c, ActsExamples::CellData::channel0, ActsExamples::CellData::channel1, clusters, covariance(), Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundPhi, Acts::eBoundSize, Acts::eBoundTheta, Acts::eBoundTime, ActsExamples::AlgorithmContext::eventNumber, ActsExamples::MeasurementData::geometry_id, ActsExamples::CellData::geometry_id, ActsExamples::MeasurementData::local0, ActsExamples::MeasurementData::local1, ActsExamples::MeasurementData::local_key, Acts::UnitConstants::m, m_cfg(), ActsExamples::makeRange(), ActsExamples::MeasurementData::measurement_id, ActsExamples::CellData::measurement_id, Acts::UnitConstants::ns, Dataset::parameters, ActsExamples::perEventFilepath(), ActsExamples::MeasurementData::phi, SUCCESS, ActsExamples::MeasurementData::theta, ActsExamples::MeasurementData::time, ActsExamples::CellData::timestamp, physmon_ckf_tracking::u, Acts::GeometryIdentifier::value(), ActsExamples::CellData::value, ActsExamples::MeasurementData::var_local0, ActsExamples::MeasurementData::var_local1, ActsExamples::MeasurementData::var_phi, ActsExamples::MeasurementData::var_theta, and ActsExamples::MeasurementData::var_time.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::CsvMeasurementWriter::m_cfg
private

Definition at line 84 of file CsvMeasurementWriter.hpp.

View newest version in sPHENIX GitHub at line 84 of file CsvMeasurementWriter.hpp

Referenced by config(), and CsvMeasurementWriter().

ReadDataHandle<ClusterContainer> ActsExamples::CsvMeasurementWriter::m_inputClusters {this, "InputClusters"}
private

Definition at line 88 of file CsvMeasurementWriter.hpp.

View newest version in sPHENIX GitHub at line 88 of file CsvMeasurementWriter.hpp

Referenced by CsvMeasurementWriter().

ReadDataHandle<IndexMultimap<Index> > ActsExamples::CsvMeasurementWriter::m_inputMeasurementSimHitsMap
private
Initial value:
{
this, "InputMeasurementSimHitsMap"}

Definition at line 86 of file CsvMeasurementWriter.hpp.

View newest version in sPHENIX GitHub at line 86 of file CsvMeasurementWriter.hpp

Referenced by CsvMeasurementWriter().


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