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

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

+ Inheritance diagram for ActsExamples::RootSimHitReader:
+ Collaboration diagram for ActsExamples::RootSimHitReader:

Classes

struct  Config
 The nested configuration struct. More...
 

Public Member Functions

 RootSimHitReader (const RootSimHitReader &)=delete
 
 RootSimHitReader (const RootSimHitReader &&)=delete
 
 RootSimHitReader (const Config &config, Acts::Logging::Level level)
 
std::string name () const override
 Framework name() method.
 
std::pair< size_t, size_t > availableEvents () const override
 Return the available events range.
 
ProcessCode read (const ActsExamples::AlgorithmContext &context) override
 
const Configconfig () 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::Loggerlogger () const
 Private access to the logging instance.
 

Private Attributes

Config m_cfg
 The config class.
 
WriteDataHandle< SimHitContainerm_outputSimHits {this, "OutputSimHits"}
 
std::unique_ptr< const
Acts::Logger
m_logger
 
std::mutex m_read_mutex
 mutex used to protect multi-threaded reads
 
std::vector< std::tuple
< uint32_t, std::size_t,
std::size_t > > 
m_eventMap
 Vector of {eventNr, entryMin, entryMax}.
 
TChain * m_inputChain = nullptr
 The input tree name.
 
std::unordered_map
< std::string_view, float > 
m_floatColumns
 
std::unordered_map
< std::string_view,
std::uint32_t > 
m_uint32Columns
 
std::unordered_map
< std::string_view,
std::int32_t > 
m_int32Columns
 
std::unordered_map
< std::string_view, unsigned
long long > 
m_uint64Columns
 

Static Private Attributes

static constexpr std::array
< const char *, 12 > 
m_floatKeys
 The keys we have in the ROOT file.
 
static constexpr std::array
< const char *, 2 > 
m_uint64Keys
 
static constexpr std::array
< const char *, 6 > 
m_uint32Keys
 
static constexpr std::array
< const char *, 1 > 
m_int32Keys = {"index"}
 

Detailed Description

Definition at line 36 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 36 of file RootSimHitReader.hpp

Constructor & Destructor Documentation

ActsExamples::RootSimHitReader::RootSimHitReader ( const RootSimHitReader )
delete
ActsExamples::RootSimHitReader::RootSimHitReader ( const RootSimHitReader &&  )
delete
ActsExamples::RootSimHitReader::RootSimHitReader ( const Config config,
Acts::Logging::Level  level 
)

Constructor

Parameters
configThe Configuration struct

Definition at line 25 of file RootSimHitReader.cpp.

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

References KFPMath::a, ACTS_DEBUG, availableEvents(), KFPMath::b, f, ActsExamples::RootSimHitReader::Config::filePath, i, ActsExamples::WriteDataHandle< T >::initialize(), m_cfg, m_eventMap, m_floatColumns, m_floatKeys, m_inputChain, m_int32Columns, m_int32Keys, m_outputSimHits, m_uint32Columns, m_uint32Keys, m_uint64Columns, m_uint64Keys, ActsExamples::RootSimHitReader::Config::simHitCollection, Acts::Experimental::detail::BlueprintHelper::sort(), and ActsExamples::RootSimHitReader::Config::treeName.

+ Here is the call graph for this function:

Member Function Documentation

std::pair< size_t, size_t > ActsExamples::RootSimHitReader::availableEvents ( ) const
overridevirtual

Return the available events range.

Implements ActsExamples::IReader.

Definition at line 104 of file RootSimHitReader.cpp.

View newest version in sPHENIX GitHub at line 104 of file RootSimHitReader.cpp

Referenced by RootSimHitReader().

+ Here is the caller graph for this function:

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

Readonly access to the config.

Definition at line 69 of file RootSimHitReader.hpp.

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

References m_cfg.

const Acts::Logger& ActsExamples::RootSimHitReader::logger ( ) const
inlineprivate

Private access to the logging instance.

Definition at line 73 of file RootSimHitReader.hpp.

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

References m_logger.

std::string ActsExamples::RootSimHitReader::name ( ) const
inlineoverridevirtual

Framework name() method.

Implements ActsExamples::SequenceElement.

Definition at line 58 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 58 of file RootSimHitReader.hpp

ActsExamples::ProcessCode ActsExamples::RootSimHitReader::read ( const ActsExamples::AlgorithmContext context)
overridevirtual

Read out data from the input stream

Parameters
contextThe algorithm context

Implements ActsExamples::IReader.

Definition at line 109 of file RootSimHitReader.cpp.

View newest version in sPHENIX GitHub at line 109 of file RootSimHitReader.cpp

References KFPMath::a, ACTS_DEBUG, ACTS_WARNING, physmon_vertexing::delta, entry, ActsExamples::AlgorithmContext::eventNumber, Acts::UnitConstants::GeV, index, it, Acts::UnitConstants::mm, testing::internal::move(), Acts::UnitConstants::ns, train_ambiguity_solver::pid, Acts::Test::pos4(), and SUCCESS.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::RootSimHitReader::m_cfg
private

The config class.

Definition at line 76 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 76 of file RootSimHitReader.hpp

Referenced by config(), and RootSimHitReader().

std::vector<std::tuple<uint32_t, std::size_t, std::size_t> > ActsExamples::RootSimHitReader::m_eventMap
private

Vector of {eventNr, entryMin, entryMax}.

Definition at line 85 of file RootSimHitReader.hpp.

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

Referenced by RootSimHitReader().

std::unordered_map<std::string_view, float> ActsExamples::RootSimHitReader::m_floatColumns
private

Definition at line 101 of file RootSimHitReader.hpp.

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

Referenced by RootSimHitReader().

constexpr std::array<const char *, 12> ActsExamples::RootSimHitReader::m_floatKeys
staticprivate
Initial value:
= {
"tx", "ty", "tz", "tt", "tpx", "tpy",
"tpz", "te", "deltapx", "deltapy", "deltapz", "deltae"}

The keys we have in the ROOT file.

Definition at line 91 of file RootSimHitReader.hpp.

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

Referenced by RootSimHitReader().

TChain* ActsExamples::RootSimHitReader::m_inputChain = nullptr
private

The input tree name.

Definition at line 88 of file RootSimHitReader.hpp.

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

Referenced by RootSimHitReader().

std::unordered_map<std::string_view, std::int32_t> ActsExamples::RootSimHitReader::m_int32Columns
private

Definition at line 103 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 103 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().

constexpr std::array<const char *, 1> ActsExamples::RootSimHitReader::m_int32Keys = {"index"}
staticprivate

Definition at line 99 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 99 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().

std::unique_ptr<const Acts::Logger> ActsExamples::RootSimHitReader::m_logger
private

Definition at line 79 of file RootSimHitReader.hpp.

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

Referenced by logger().

WriteDataHandle<SimHitContainer> ActsExamples::RootSimHitReader::m_outputSimHits {this, "OutputSimHits"}
private

Definition at line 78 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 78 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().

std::mutex ActsExamples::RootSimHitReader::m_read_mutex
private

mutex used to protect multi-threaded reads

Definition at line 82 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 82 of file RootSimHitReader.hpp

std::unordered_map<std::string_view, std::uint32_t> ActsExamples::RootSimHitReader::m_uint32Columns
private

Definition at line 102 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 102 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().

constexpr std::array<const char *, 6> ActsExamples::RootSimHitReader::m_uint32Keys
staticprivate
Initial value:
= {
"event_id", "volume_id", "boundary_id",
"layer_id", "approach_id", "sensitive_id"}

Definition at line 96 of file RootSimHitReader.hpp.

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

Referenced by RootSimHitReader().

std::unordered_map<std::string_view, unsigned long long> ActsExamples::RootSimHitReader::m_uint64Columns
private

Definition at line 107 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 107 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().

constexpr std::array<const char *, 2> ActsExamples::RootSimHitReader::m_uint64Keys
staticprivate
Initial value:
= {"geometry_id",
"particle_id"}

Definition at line 94 of file RootSimHitReader.hpp.

View newest version in sPHENIX GitHub at line 94 of file RootSimHitReader.hpp

Referenced by RootSimHitReader().


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