Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Examples/Framework/include/ActsExamples/Framework/WhiteBoard.hpp>
Classes | |
struct | HolderT |
struct | IHolder |
Public Member Functions | |
WhiteBoard (std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("WhiteBoard", Acts::Logging::INFO), std::unordered_map< std::string, std::string > objectAliases={}) | |
WhiteBoard (const WhiteBoard &other)=delete | |
WhiteBoard & | operator= (const WhiteBoard &)=delete |
bool | exists (const std::string &name) const |
Private Member Functions | |
template<typename T > | |
void | add (const std::string &name, T &&object) |
template<typename T > | |
const T & | get (const std::string &name) const |
std::vector< std::string_view > | similarNames (const std::string_view &name, int distThreshold, std::size_t maxNumber) const |
Find similar names for suggestions with levenshtein-distance. | |
const Acts::Logger & | logger () const |
Static Private Member Functions | |
static std::string | typeMismatchMessage (const std::string &name, const char *req, const char *act) |
Private Attributes | |
std::unique_ptr< const Acts::Logger > | m_logger |
std::unordered_map < std::string, std::shared_ptr < IHolder > > | m_store |
std::unordered_map < std::string, std::string > | m_objectAliases |
Friends | |
template<typename T > | |
class | WriteDataHandle |
template<typename T > | |
class | ReadDataHandle |
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 lifetime of the white board.
Definition at line 34 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 34 of file WhiteBoard.hpp
|
inline |
Definition at line 102 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 102 of file WhiteBoard.hpp
|
delete |
|
inlineprivate |
Store an object on the white board and transfer ownership.
name | Non-empty identifier to store it under |
object | Movable reference to the transferable object |
std::invalid_argument | on empty or duplicate name |
Definition at line 108 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 108 of file WhiteBoard.hpp
References ACTS_VERBOSE, it, perf_headwind::name, and Acts::UnitConstants::T.
Referenced by ActsExamples::WriteDataHandle< std::vector< Acts::BoundTrackParameters > >::operator()().
|
inline |
Definition at line 156 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 156 of file WhiteBoard.hpp
Referenced by Acts::Python::addFramework().
|
inlineprivate |
Get access to a stored object.
[in] | name | Identifier for the object |
std::out_of_range | if no object is stored under the requested name |
Definition at line 125 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 125 of file WhiteBoard.hpp
References ACTS_VERBOSE, i, it, Acts::UnitConstants::min, perf_headwind::name, TauVsDIS_MachineLearning_Differentiation::names, Acts::UnitConstants::T, and ActsExamples::WhiteBoard::IHolder::type().
Referenced by ActsExamples::ReadDataHandle< std::vector< Acts::BoundTrackParameters > >::operator()().
|
inlineprivate |
Definition at line 88 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 88 of file WhiteBoard.hpp
References m_logger.
|
delete |
|
private |
Find similar names for suggestions with levenshtein-distance.
Definition at line 60 of file WhiteBoard.cpp.
View newest version in sPHENIX GitHub at line 60 of file WhiteBoard.cpp
References KFPMath::a, KFPMath::b, h, i, m_store, Acts::UnitConstants::min, n, TauVsDIS_MachineLearning_Differentiation::names, and Acts::Experimental::detail::BlueprintHelper::sort().
|
staticprivate |
Definition at line 81 of file WhiteBoard.cpp.
View newest version in sPHENIX GitHub at line 81 of file WhiteBoard.cpp
|
friend |
Definition at line 97 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 97 of file WhiteBoard.hpp
|
friend |
Definition at line 94 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 94 of file WhiteBoard.hpp
|
private |
Definition at line 84 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 84 of file WhiteBoard.hpp
Referenced by logger().
|
private |
Definition at line 86 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 86 of file WhiteBoard.hpp
|
private |
Definition at line 85 of file WhiteBoard.hpp.
View newest version in sPHENIX GitHub at line 85 of file WhiteBoard.hpp
Referenced by similarNames().