EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::WriterT< write_data_t > Class Template Referenceabstract

#include <acts/blob/sPHENIX/Examples/Framework/include/ActsExamples/Framework/WriterT.hpp>

+ Inheritance diagram for ActsExamples::WriterT< write_data_t >:
+ Collaboration diagram for ActsExamples::WriterT< write_data_t >:

Public Member Functions

 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 ActsExamples::IWriter
virtual ~IWriter ()=default
 

Protected Member Functions

virtual ProcessCode writeT (const AlgorithmContext &context, const write_data_t &t)=0
 
const Acts::Loggerlogger () const
 

Private Attributes

std::string m_objectName
 
std::string m_writerName
 
std::unique_ptr< const
Acts::Logger
m_logger
 

Detailed Description

template<typename write_data_t>
class ActsExamples::WriterT< write_data_t >

A helper class for users to implement framework writers.

Note
This is not an additional interface class and should not be used as such, e.g. as a constrained IWriter substitute. This class should only be used as the base class for a concrete writer implementation.
Template Parameters
TThe object type read from the event store

This class can be used when a writer reads a single object from the event store and writes it to file. Reading from the event store and casting to the specified type is done automatically and the user only needs to implement the type-specific write method.

Default no-op implementations for initialize and finalize are provided but can be overriden by the user.

Definition at line 40 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 40 of file WriterT.hpp

Constructor & Destructor Documentation

template<typename write_data_t >
ActsExamples::WriterT< write_data_t >::WriterT ( std::string  objectName,
std::string  writerName,
Acts::Logging::Level  level 
)
Parameters
objectNameThe object that should be read from the event store
writerNameThe name of the writer, e.g. for logging output
levelThe internal log level

Definition at line 77 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 77 of file WriterT.hpp

References ActsExamples::WriterT< write_data_t >::m_objectName, and ActsExamples::WriterT< write_data_t >::m_writerName.

Member Function Documentation

template<typename write_data_t >
ActsExamples::ProcessCode ActsExamples::WriterT< write_data_t >::endRun ( )
inlineoverridevirtual

No-op default implementation.

Implements ActsExamples::IWriter.

Reimplemented in ActsExamples::RootTrackParameterWriter.

Definition at line 96 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 96 of file WriterT.hpp

References SUCCESS.

template<typename write_data_t>
const Acts::Logger& ActsExamples::WriterT< write_data_t >::logger ( ) const
inlineprotected

Definition at line 66 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 66 of file WriterT.hpp

template<typename write_data_t >
std::string ActsExamples::WriterT< write_data_t >::name ( ) const
inlinefinaloverridevirtual

Provide the name of the writer.

Implements ActsExamples::IWriter.

Definition at line 91 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 91 of file WriterT.hpp

Referenced by eicpy.verify.PythiaHistograms::__init__(), and eicpy.verify.DjangohHistograms::__init__().

+ Here is the caller graph for this function:

template<typename write_data_t >
ActsExamples::ProcessCode ActsExamples::WriterT< write_data_t >::write ( const AlgorithmContext context)
inlinefinaloverridevirtual

Read the object and call the type-specific member function.

Implements ActsExamples::IWriter.

Definition at line 101 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 101 of file WriterT.hpp

References ActsExamples::AlgorithmContext::eventStore, and ActsExamples::WhiteBoard::get().

+ Here is the call graph for this function:

template<typename write_data_t>
virtual ProcessCode ActsExamples::WriterT< write_data_t >::writeT ( const AlgorithmContext context,
const write_data_t &  t 
)
protectedpure virtual

Member Data Documentation

template<typename write_data_t>
std::unique_ptr<const Acts::Logger> ActsExamples::WriterT< write_data_t >::m_logger
private

Definition at line 71 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 71 of file WriterT.hpp

Referenced by ActsExamples::WriterT< TrajectoryContainer >::logger().

template<typename write_data_t>
std::string ActsExamples::WriterT< write_data_t >::m_objectName
private

Definition at line 69 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 69 of file WriterT.hpp

Referenced by ActsExamples::WriterT< write_data_t >::WriterT().

template<typename write_data_t>
std::string ActsExamples::WriterT< write_data_t >::m_writerName
private

Definition at line 70 of file WriterT.hpp.

View newest version in sPHENIX GitHub at line 70 of file WriterT.hpp

Referenced by ActsExamples::WriterT< write_data_t >::WriterT().


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