Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Io/Root/include/ActsExamples/Io/Root/RootSpacepointWriter.hpp>
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 Config & | config () 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::Logger & | logger () 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() |
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
ActsExamples::RootSpacepointWriter::RootSpacepointWriter | ( | const Config & | config, |
Acts::Logging::Level | level | ||
) |
Construct the particle writer.
config | is the configuration object |
level | is 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.
|
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
|
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.
|
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.
|
finalprotectedvirtual |
Type-specific write implementation.
[in] | ctx | is the algorithm context |
[in] | hits | are 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.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
private |
Definition at line 73 of file RootSpacepointWriter.hpp.
View newest version in sPHENIX GitHub at line 73 of file RootSpacepointWriter.hpp
|
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().
|
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().
|
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().