ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::WhiteBoard Class Reference

#include <acts/blob/master/Examples/Framework/include/ACTFW/Framework/WhiteBoard.hpp>

+ Collaboration diagram for FW::WhiteBoard:

Classes

struct  HolderT
 
struct  IHolder
 

Public Member Functions

 WhiteBoard (std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("WhiteBoard", Acts::Logging::INFO))
 
 WhiteBoard (const WhiteBoard &other)=delete
 
WhiteBoardoperator= (const WhiteBoard &)=delete
 
template<typename T >
void add (const std::string &name, T &&object)
 
template<typename T >
const Tget (const std::string &name) const
 

Private Member Functions

const Acts::Loggerlogger () const
 

Private Attributes

std::unique_ptr< const
Acts::Logger
m_logger
 
std::unordered_map
< std::string, std::unique_ptr
< IHolder > > 
m_store
 

Detailed Description

A container to store arbitrary objects with ownership transfer.

This is an append-only container that takes ownership of the objects added to it. Once an object has been added, it can only be read but not be modified. Trying to replace an existing object is considered an error. Its lifetime is bound to the liftime of the white board.

Definition at line 28 of file WhiteBoard.hpp.

View newest version in sPHENIX GitHub at line 28 of file WhiteBoard.hpp

Constructor & Destructor Documentation

FW::WhiteBoard::WhiteBoard ( std::unique_ptr< const Acts::Logger logger = Acts::getDefaultLogger("WhiteBoard", Acts::Logging::INFO))
inline

Definition at line 77 of file WhiteBoard.hpp.

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

FW::WhiteBoard::WhiteBoard ( const WhiteBoard other)
delete

Member Function Documentation

template<typename T >
void FW::WhiteBoard::add ( const std::string &  name,
T &&  object 
)
inline

Store an object on the white board and transfer ownership.

Parameters
nameNon-empty identifier to store it under
objectMovable reference to the transferable object
Exceptions
std::invalid_argumenton empty or duplicate name

Definition at line 81 of file WhiteBoard.hpp.

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

References ACTS_VERBOSE, and G4Analysis::make_unique().

Referenced by FW::FlattenEvent::execute(), FW::HelloWhiteBoardAlgorithm::execute(), FW::TruthTrackFinder::execute(), FW::HelloRandomAlgorithm::execute(), FW::TrackSelector::execute(), FW::HitSmearing::execute(), FW::DigitizationAlgorithm::execute(), FW::ParticleSmearing::execute(), FW::ParticleSelector::execute(), FW::FittingAlgorithm::execute(), FW::GeantinoRecording::execute(), FW::TruthVerticesToTracksAlgorithm::execute(), FW::MaterialMapping::execute(), FW::HelloService::prepare(), FW::CsvParticleReader::read(), FW::RootVertexAndTracksReader::read(), FW::CsvPlanarClusterReader::read(), FW::RootMaterialTrackReader::read(), and FW::EventGenerator::read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
const T & FW::WhiteBoard::get ( const std::string &  name) const
inline

Get access to a stored object.

Parameters
[in]nameIdentifier for the object
Returns
reference to the stored object
Exceptions
std::out_of_rangeif no object is stored under the requested name

Definition at line 93 of file WhiteBoard.hpp.

View newest version in sPHENIX GitHub at line 93 of file WhiteBoard.hpp

References ACTS_VERBOSE, it, T, and FW::WhiteBoard::IHolder::type().

Referenced by FW::HelloLoggerAlgorithm::execute(), FW::PrintParticles::execute(), FW::FlattenEvent::execute(), FW::HelloWhiteBoardAlgorithm::execute(), FW::TruthTrackFinder::execute(), FW::PrintHits::execute(), FWE::VertexFindingAlgorithm::execute(), FW::TrackSelector::execute(), FWE::VertexFitAlgorithm::execute(), FW::HitSmearing::execute(), FW::DigitizationAlgorithm::execute(), FW::ParticleSmearing::execute(), FW::ParticleSelector::execute(), FW::FittingAlgorithm::execute(), FW::TruthVerticesToTracksAlgorithm::execute(), FW::MaterialMapping::execute(), FW::WriterT< write_data_t >::write(), FW::TrackFinderPerformanceWriter::writeT(), FW::TrackFitterPerformanceWriter::writeT(), FW::CsvPlanarClusterWriter::writeT(), FW::RootPlanarClusterWriter::writeT(), and FW::RootTrajectoryWriter::writeT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Acts::Logger& FW::WhiteBoard::logger ( ) const
inlineprivate

Definition at line 72 of file WhiteBoard.hpp.

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

References m_logger.

WhiteBoard& FW::WhiteBoard::operator= ( const WhiteBoard )
delete

Member Data Documentation

std::unique_ptr<const Acts::Logger> FW::WhiteBoard::m_logger
private

Definition at line 69 of file WhiteBoard.hpp.

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

Referenced by logger().

std::unordered_map<std::string, std::unique_ptr<IHolder> > FW::WhiteBoard::m_store
private

Definition at line 70 of file WhiteBoard.hpp.

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


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