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

#include <acts/blob/sPHENIX/Examples/Io/Root/include/ActsExamples/Io/Root/RootSpacepointWriter.hpp>

+ Inheritance diagram for ActsExamples::RootSpacepointWriter:
+ Collaboration diagram for ActsExamples::RootSpacepointWriter:

Classes

struct  Config
 

Public Member Functions

 RootSpacepointWriter (const Config &config, Acts::Logging::Level level)
 
 ~RootSpacepointWriter () final
 Ensure underlying file is closed.
 
ProcessCode finalize () final
 End-of-run hook.
 
const Configconfig () const
 Get readonly access to the config parameters.
 
- Public Member Functions inherited from ActsExamples::WriterT< SimSpacePointContainer >
 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 SimSpacePointContainer &spacepoints) final
 
- Protected Member Functions inherited from ActsExamples::WriterT< SimSpacePointContainer >
const Acts::Loggerlogger () const
 

Private Attributes

Config m_cfg
 
std::mutex m_writeMutex
 
TFile * m_outputFile = nullptr
 
TTree * m_outputTree = nullptr
 
uint32_t m_eventId = 0
 Event identifier.
 
uint64_t m_measurementId = 0
 Hit surface identifier.
 
uint64_t m_geometryId = 0
 Space point surface identifier.
 
float m_x = std::numeric_limits<float>::infinity()
 Global space point position components in mm.
 
float m_y = std::numeric_limits<float>::infinity()
 
float m_z = std::numeric_limits<float>::infinity()
 
float m_var_r = std::numeric_limits<float>::infinity()
 
float m_var_z = std::numeric_limits<float>::infinity()
 

Detailed Description

Write out space points as a flat TTree.

Each entry in the TTree corresponds to one space point for optimum writing speed. The event number is part of the written data.

Safe to use from multiple writer threads. To avoid thread-saftey issues, the writer must be the sole owner of the underlying file. Thus, the output file pointer can not be given from the outside.

Definition at line 35 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 35 of file RootSpacepointWriter.hpp

Constructor & Destructor Documentation

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

Construct the particle writer.

Parameters
configis the configuration object
levelis the logging level

Definition at line 25 of file RootSpacepointWriter.cpp.

View newest version in sPHENIX GitHub at line 25 of file RootSpacepointWriter.cpp

References ActsExamples::RootSpacepointWriter::Config::fileMode, ActsExamples::RootSpacepointWriter::Config::filePath, m_cfg, m_eventId, m_geometryId, m_measurementId, m_outputFile, m_outputTree, m_var_r, m_var_z, m_x, m_y, m_z, and ActsExamples::RootSpacepointWriter::Config::treeName.

ActsExamples::RootSpacepointWriter::~RootSpacepointWriter ( )
final

Ensure underlying file is closed.

Definition at line 60 of file RootSpacepointWriter.cpp.

View newest version in sPHENIX GitHub at line 60 of file RootSpacepointWriter.cpp

Member Function Documentation

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

Get readonly access to the config parameters.

Definition at line 61 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 61 of file RootSpacepointWriter.hpp

References m_cfg.

ActsExamples::ProcessCode ActsExamples::RootSpacepointWriter::finalize ( )
finalvirtual

End-of-run hook.

Implements ActsExamples::SequenceElement.

Definition at line 66 of file RootSpacepointWriter.cpp.

View newest version in sPHENIX GitHub at line 66 of file RootSpacepointWriter.cpp

References ACTS_VERBOSE, m_cfg(), and SUCCESS.

+ Here is the call graph for this function:

ActsExamples::ProcessCode ActsExamples::RootSpacepointWriter::writeT ( const AlgorithmContext ctx,
const SimSpacePointContainer spacepoints 
)
finalprotectedvirtual

Type-specific write implementation.

Parameters
[in]ctxis the algorithm context
[in]hitsare the hits to be written

Implements ActsExamples::WriterT< SimSpacePointContainer >.

Definition at line 77 of file RootSpacepointWriter.cpp.

View newest version in sPHENIX GitHub at line 77 of file RootSpacepointWriter.cpp

References ActsExamples::AlgorithmContext::eventNumber, ActsExamples::IndexSourceLink::index(), Acts::UnitConstants::mm, and SUCCESS.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::RootSpacepointWriter::m_cfg
private

Definition at line 72 of file RootSpacepointWriter.hpp.

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

Referenced by config(), and RootSpacepointWriter().

uint32_t ActsExamples::RootSpacepointWriter::m_eventId = 0
private

Event identifier.

Definition at line 77 of file RootSpacepointWriter.hpp.

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

Referenced by RootSpacepointWriter().

uint64_t ActsExamples::RootSpacepointWriter::m_geometryId = 0
private

Space point surface identifier.

Definition at line 81 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 81 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

uint64_t ActsExamples::RootSpacepointWriter::m_measurementId = 0
private

Hit surface identifier.

Definition at line 79 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 79 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

TFile* ActsExamples::RootSpacepointWriter::m_outputFile = nullptr
private

Definition at line 74 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 74 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

TTree* ActsExamples::RootSpacepointWriter::m_outputTree = nullptr
private

Definition at line 75 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 75 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

float ActsExamples::RootSpacepointWriter::m_var_r = std::numeric_limits<float>::infinity()
private

Definition at line 87 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 87 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

float ActsExamples::RootSpacepointWriter::m_var_z = std::numeric_limits<float>::infinity()
private

Definition at line 88 of file RootSpacepointWriter.hpp.

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

Referenced by RootSpacepointWriter().

std::mutex ActsExamples::RootSpacepointWriter::m_writeMutex
private

Definition at line 73 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 73 of file RootSpacepointWriter.hpp

float ActsExamples::RootSpacepointWriter::m_x = std::numeric_limits<float>::infinity()
private

Global space point position components in mm.

Definition at line 83 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 83 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().

float ActsExamples::RootSpacepointWriter::m_y = std::numeric_limits<float>::infinity()
private

Definition at line 84 of file RootSpacepointWriter.hpp.

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

Referenced by RootSpacepointWriter().

float ActsExamples::RootSpacepointWriter::m_z = std::numeric_limits<float>::infinity()
private

Definition at line 85 of file RootSpacepointWriter.hpp.

View newest version in sPHENIX GitHub at line 85 of file RootSpacepointWriter.hpp

Referenced by RootSpacepointWriter().


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