The Gaudi Framework  master (37c0b60a)
Gaudi::Details::PropertyBase Class Referenceabstract

PropertyBase base class allowing PropertyBase* collections to be "homogeneous". More...

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Details/PropertyBase.h>

Inherited by Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< CLID >, Gaudi::Property< double >, Gaudi::Property< float >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< int >, Gaudi::Property< long >, Gaudi::Property< long long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< R >, Gaudi::Property< size_t >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::set< int > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::size_t >, Gaudi::Property< std::string >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::vector >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< std::vector< int > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< std::vector< std::pair< double, double > > >, Gaudi::Property< std::vector< std::pair< int, int > > >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< T >, Gaudi::Property< uint64_t >, Gaudi::Property< unsigned int >, Gaudi::Property< unsigned long >, Gaudi::Property< unsigned long long >, Gaudi::Property< vector< std::string > >, PropertyWithHandlers< Handler >, and PropertyWithHandlers<>.

Collaboration diagram for Gaudi::Details::PropertyBase:

Public Member Functions

const std::string name () const
 property name More...
 
std::string documentation () const
 property documentation More...
 
std::string semantics () const
 property semantics More...
 
const std::type_infotype_info () const
 property type-info More...
 
std::string type () const
 property type More...
 
virtual bool load (PropertyBase &dest) const =0
 export the property value to the destination More...
 
virtual bool assign (const PropertyBase &source)=0
 import the property value form the source More...
 
virtual std::string toString () const =0
 value -> string More...
 
virtual void toStream (std::ostream &out) const =0
 value -> stream More...
 
virtual StatusCode fromString (const std::string &value)=0
 string -> value More...
 
virtual PropertyBasedeclareReadHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for reading More...
 
virtual PropertyBasedeclareUpdateHandler (std::function< void(PropertyBase &)> fun)=0
 set new callback for update More...
 
virtual const std::function< void(PropertyBase &)> readCallBack () const =0
 get a reference to the readCallBack More...
 
virtual const std::function< void(PropertyBase &)> updateCallBack () const =0
 get a reference to the updateCallBack More...
 
virtual bool useUpdateHandler ()=0
 manual trigger for callback for update More...
 
template<class HT >
PropertyBasedeclareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
template<class HT >
PropertyBasedeclareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance)
 
virtual ~PropertyBase ()
 virtual destructor More...
 
void setName (std::string value)
 set the new value for the property name More...
 
void setDocumentation (std::string value)
 set the documentation string More...
 
void setSemantics (std::string value)
 set the semantics string More...
 
virtual std::ostreamfillStream (std::ostream &) const
 the printout of the property value More...
 
virtual PropertyBaseclone () const =0
 clones the current property More...
 
void setOwnerType (const std::type_info &ownerType)
 set the type of the owner class (used for documentation) More...
 
template<class OWNER >
void setOwnerType ()
 set the type of the owner class (used for documentation) More...
 
const std::type_infoownerType () const
 get the type of the owner class (used for documentation) More...
 
std::string ownerTypeName () const
 get the string for the type of the owner class (used for documentation) More...
 

Protected Member Functions

 PropertyBase (const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
 constructor from the property name and the type More...
 
 PropertyBase (std::string name, const std::type_info &type)
 constructor from the property name and the type More...
 
 PropertyBase (const PropertyBase &)=default
 copy constructor More...
 
PropertyBaseoperator= (const PropertyBase &)=default
 assignment operator More...
 

Private Member Functions

void add (WeakPropertyRef *ref)
 
void remove (WeakPropertyRef *ref)
 

Static Private Member Functions

static std::string_view to_view (std::string str)
 helper to map a string to a reliable std::string_view More...
 

Private Attributes

std::string_view m_name
 property name More...
 
std::string_view m_documentation
 property doc string More...
 
std::string_view m_semantics
 property semantics More...
 
const std::type_infom_typeinfo
 property type More...
 
const std::type_infom_ownerType = nullptr
 type of owner of the property (if defined) More...
 
friend WeakPropertyRef
 
std::set< WeakPropertyRef * > m_weakReferences
 

Detailed Description

PropertyBase base class allowing PropertyBase* collections to be "homogeneous".

Author
Paul Maley
CTDay
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Marco Clemencic

Definition at line 35 of file PropertyBase.h.

Constructor & Destructor Documentation

◆ ~PropertyBase()

Gaudi::Details::PropertyBase::~PropertyBase ( )
inlinevirtual

virtual destructor

Definition at line 219 of file PropertyBase.h.

219  {
220  for ( auto ref : m_weakReferences ) { ref->detach(); }
221  }

◆ PropertyBase() [1/3]

Gaudi::Details::PropertyBase::PropertyBase ( const std::type_info type,
std::string  name = "",
std::string  doc = "",
std::string  semantics = "" 
)
inlineprotected

constructor from the property name and the type

Definition at line 118 of file PropertyBase.h.

119  : m_name( to_view( std::move( name ) ) )
120  , m_documentation( to_view( std::move( doc ) ) )
122  , m_typeinfo( &type ) {}

◆ PropertyBase() [2/3]

Gaudi::Details::PropertyBase::PropertyBase ( std::string  name,
const std::type_info type 
)
inlineprotected

constructor from the property name and the type

Definition at line 124 of file PropertyBase.h.

◆ PropertyBase() [3/3]

Gaudi::Details::PropertyBase::PropertyBase ( const PropertyBase )
protecteddefault

copy constructor

Member Function Documentation

◆ add()

void Gaudi::Details::PropertyBase::add ( WeakPropertyRef ref)
inlineprivate

Definition at line 147 of file PropertyBase.h.

147  {
148  if ( ref ) m_weakReferences.insert( ref );
149  }

◆ assign()

virtual bool Gaudi::Details::PropertyBase::assign ( const PropertyBase source)
pure virtual

import the property value form the source

Implemented in DataHandleProperty, Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

◆ clone()

virtual PropertyBase* Gaudi::Details::PropertyBase::clone ( ) const
pure virtual

◆ declareReadHandler() [1/2]

virtual PropertyBase& Gaudi::Details::PropertyBase::declareReadHandler ( std::function< void(PropertyBase &)>  fun)
pure virtual

set new callback for reading

Implemented in Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

◆ declareReadHandler() [2/2]

template<class HT >
PropertyBase& Gaudi::Details::PropertyBase::declareReadHandler ( void(HT::*)(PropertyBase &)  MF,
HT *  instance 
)
inline

Definition at line 76 of file PropertyBase.h.

76  {
77  return declareReadHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
78  }

◆ declareUpdateHandler() [1/2]

virtual PropertyBase& Gaudi::Details::PropertyBase::declareUpdateHandler ( std::function< void(PropertyBase &)>  fun)
pure virtual

set new callback for update

Implemented in Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

◆ declareUpdateHandler() [2/2]

template<class HT >
PropertyBase& Gaudi::Details::PropertyBase::declareUpdateHandler ( void(HT::*)(PropertyBase &)  MF,
HT *  instance 
)
inline

Definition at line 81 of file PropertyBase.h.

81  {
82  return declareUpdateHandler( [=]( PropertyBase& p ) { ( instance->*MF )( p ); } );
83  }

◆ documentation()

std::string Gaudi::Details::PropertyBase::documentation ( ) const
inline

property documentation

Definition at line 41 of file PropertyBase.h.

41 { return std::string{ m_documentation }; }

◆ fillStream()

std::ostream & PropertyBase::fillStream ( std::ostream stream) const
virtual

the printout of the property value

Reimplemented in Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

Definition at line 60 of file Property.cpp.

60  {
61  return stream << " '" << name() << "':" << toString();
62 }

◆ fromString()

virtual StatusCode Gaudi::Details::PropertyBase::fromString ( const std::string value)
pure virtual

string -> value

Implemented in Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, Gaudi::Property< std::vector< std::pair< int, int > > >, GaudiHandleArrayProperty, GaudiHandleProperty, and DataHandleProperty.

◆ load()

virtual bool Gaudi::Details::PropertyBase::load ( PropertyBase dest) const
pure virtual

export the property value to the destination

Implemented in DataHandleProperty, Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

◆ name()

const std::string Gaudi::Details::PropertyBase::name ( ) const
inline

property name

Definition at line 39 of file PropertyBase.h.

39 { return std::string{ m_name }; }

◆ operator=()

PropertyBase& Gaudi::Details::PropertyBase::operator= ( const PropertyBase )
protecteddefault

assignment operator

◆ ownerType()

const std::type_info* Gaudi::Details::PropertyBase::ownerType ( ) const
inline

get the type of the owner class (used for documentation)

Definition at line 109 of file PropertyBase.h.

109 { return m_ownerType; }

◆ ownerTypeName()

std::string Gaudi::Details::PropertyBase::ownerTypeName ( ) const
inline

get the string for the type of the owner class (used for documentation)

Definition at line 112 of file PropertyBase.h.

112  {
113  return m_ownerType ? System::typeinfoName( *m_ownerType ) : std::string( "unknown owner type" );
114  }

◆ readCallBack()

virtual const std::function<void( PropertyBase& )> Gaudi::Details::PropertyBase::readCallBack ( ) const
pure virtual

get a reference to the readCallBack

Implemented in PropertyWithHandlers< Handler >, and Gaudi::Property< TYPE, VERIFIER, HANDLERS >.

◆ remove()

void Gaudi::Details::PropertyBase::remove ( WeakPropertyRef ref)
inlineprivate

Definition at line 150 of file PropertyBase.h.

150 { m_weakReferences.erase( ref ); }

◆ semantics()

std::string Gaudi::Details::PropertyBase::semantics ( ) const
inline

property semantics

Definition at line 43 of file PropertyBase.h.

43 { return std::string{ m_semantics }; }

◆ setDocumentation()

void Gaudi::Details::PropertyBase::setDocumentation ( std::string  value)
inline

set the documentation string

Definition at line 91 of file PropertyBase.h.

91 { m_documentation = to_view( std::move( value ) ); }

◆ setName()

void Gaudi::Details::PropertyBase::setName ( std::string  value)
inline

set the new value for the property name

Definition at line 89 of file PropertyBase.h.

89 { m_name = to_view( std::move( value ) ); }

◆ setOwnerType() [1/2]

template<class OWNER >
void Gaudi::Details::PropertyBase::setOwnerType ( )
inline

set the type of the owner class (used for documentation)

Definition at line 104 of file PropertyBase.h.

104  {
105  setOwnerType( typeid( OWNER ) );
106  }

◆ setOwnerType() [2/2]

void Gaudi::Details::PropertyBase::setOwnerType ( const std::type_info ownerType)
inline

set the type of the owner class (used for documentation)

Definition at line 100 of file PropertyBase.h.

100 { m_ownerType = &ownerType; }

◆ setSemantics()

void Gaudi::Details::PropertyBase::setSemantics ( std::string  value)
inline

set the semantics string

Definition at line 93 of file PropertyBase.h.

93 { m_semantics = to_view( std::move( value ) ); }

◆ to_view()

std::string_view PropertyBase::to_view ( std::string  str)
staticprivate

helper to map a string to a reliable std::string_view

Definition at line 53 of file Property.cpp.

53  {
54  return **( all_strings.insert( std::make_unique<std::string>( std::move( str ) ) ).first );
55 }

◆ toStream()

virtual void Gaudi::Details::PropertyBase::toStream ( std::ostream out) const
pure virtual

value -> stream

Implemented in GaudiHandleArrayProperty, GaudiHandleProperty, Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, Gaudi::Property< std::vector< std::pair< int, int > > >, and DataHandleProperty.

◆ toString()

virtual std::string Gaudi::Details::PropertyBase::toString ( ) const
pure virtual

◆ type()

std::string Gaudi::Details::PropertyBase::type ( ) const
inline

property type

Definition at line 47 of file PropertyBase.h.

47 { return m_typeinfo->name(); }

◆ type_info()

const std::type_info* Gaudi::Details::PropertyBase::type_info ( ) const
inline

property type-info

Definition at line 45 of file PropertyBase.h.

45 { return m_typeinfo; }

◆ updateCallBack()

virtual const std::function<void( PropertyBase& )> Gaudi::Details::PropertyBase::updateCallBack ( ) const
pure virtual

get a reference to the updateCallBack

Implemented in PropertyWithHandlers< Handler >, and Gaudi::Property< TYPE, VERIFIER, HANDLERS >.

◆ useUpdateHandler()

virtual bool Gaudi::Details::PropertyBase::useUpdateHandler ( )
pure virtual

manual trigger for callback for update

Implemented in PropertyWithHandlers< Handler >, PropertyWithHandlers<>, Gaudi::Property< TYPE, VERIFIER, HANDLERS >, Gaudi::Property< std::map< std::string, std::string, std::less<> > >, Gaudi::Property< std::vector< long > >, Gaudi::Property< std::map< std::string, std::vector< int > > >, Gaudi::Property< std::vector< std::vector< std::string > > >, Gaudi::Property< std::size_t >, Gaudi::Property< long >, Gaudi::Property< map< std::string, std::string > >, Gaudi::Property< unsigned long >, Gaudi::Property< std::array< std::string, sizeof...(OUTPUTs)> >, Gaudi::Property< std::array< double, 3 > >, Gaudi::Property< std::vector< Gaudi::XYZVector > >, Gaudi::Property< Gaudi::XYZPoint >, Gaudi::Property< std::vector< int > >, Gaudi::Property< double >, Gaudi::Property< std::vector< unsigned int > >, Gaudi::Property< std::map >, Gaudi::Property< std::map< int, double > >, Gaudi::Property< Gaudi::LorentzVector >, Gaudi::Property< unsigned long long >, Gaudi::Property< std::string >, Gaudi::Property< Gaudi::Utils::TypeNameString >, Gaudi::Property< float >, Gaudi::Property< R >, Gaudi::Property< GaudiUtils::Map< std::string, std::string > >, Gaudi::Property< std::vector< std::string > >, Gaudi::Property< std::unordered_set >, Gaudi::Property< Gaudi::StringKey >, Gaudi::Property< std::unordered_set< std::string > >, Gaudi::Property< std::set< std::string > >, Gaudi::Property< std::set< int > >, Gaudi::Property< int >, Gaudi::Property< std::vector >, Gaudi::Property< T >, Gaudi::Property< CLID >, Gaudi::Property< unsigned int >, Gaudi::Property< std::vector< std::pair< std::string, std::string > > >, Gaudi::Property< boost::array< std::string, 4 > >, Gaudi::Property< std::map< std::string, std::vector< std::string > > >, Gaudi::Property< std::vector< Gaudi::XYZPoint > >, Gaudi::Property< std::vector< DataObjID > >, Gaudi::Property< std::map< int, std::string > >, Gaudi::Property< std::vector< std::vector< double > > >, Gaudi::Property< std::vector< Gaudi::LorentzVector > >, Gaudi::Property< std::vector< bool > >, Gaudi::Property< std::vector< double > >, Gaudi::Property< Gaudi::Histo1DDef >, Gaudi::Property< size_t >, Gaudi::Property< std::unordered_set< int > >, Gaudi::Property< long long >, Gaudi::Property< std::map< unsigned int, std::string > >, Gaudi::Property< Gaudi::XYZVector >, Gaudi::Property< std::vector< unsigned long long > >, Gaudi::Property< std::map< int, int > >, Gaudi::Property< std::unordered_map< std::string, std::string > >, Gaudi::Property< std::vector< long long > >, Gaudi::Property< bool >, Gaudi::Property< boost::array< double, 5 > >, Gaudi::Property< std::tuple< std::string, int, double > >, Gaudi::Property< std::tuple< std::string > >, Gaudi::Property< std::map< std::string, double > >, Gaudi::Property< std::map< std::string, int > >, Gaudi::Property< std::map< std::string, std::string > >, Gaudi::Property< uint64_t >, Gaudi::Property< vector< std::string > >, Gaudi::Property< std::array< int, 1 > >, Gaudi::Property< std::map< std::string, std::vector< double > > >, Gaudi::Property< std::pair< int, int > >, Gaudi::Property< std::pair< double, double > >, Gaudi::Property< Gaudi::Vector5 >, Gaudi::Property< std::unordered_set< float > >, Gaudi::Property< std::vector< std::pair< double, double > > >, and Gaudi::Property< std::vector< std::pair< int, int > > >.

Member Data Documentation

◆ m_documentation

std::string_view Gaudi::Details::PropertyBase::m_documentation
private

property doc string

Definition at line 137 of file PropertyBase.h.

◆ m_name

std::string_view Gaudi::Details::PropertyBase::m_name
private

property name

Definition at line 135 of file PropertyBase.h.

◆ m_ownerType

const std::type_info* Gaudi::Details::PropertyBase::m_ownerType = nullptr
private

type of owner of the property (if defined)

Definition at line 143 of file PropertyBase.h.

◆ m_semantics

std::string_view Gaudi::Details::PropertyBase::m_semantics
private

property semantics

Definition at line 139 of file PropertyBase.h.

◆ m_typeinfo

const std::type_info* Gaudi::Details::PropertyBase::m_typeinfo
private

property type

Definition at line 141 of file PropertyBase.h.

◆ m_weakReferences

std::set<WeakPropertyRef*> Gaudi::Details::PropertyBase::m_weakReferences
private

Definition at line 146 of file PropertyBase.h.

◆ WeakPropertyRef

friend Gaudi::Details::PropertyBase::WeakPropertyRef
private

Definition at line 145 of file PropertyBase.h.


The documentation for this class was generated from the following files:
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: PropertyBase.h:39
Write.stream
stream
Definition: Write.py:32
std::string
STL class.
std::move
T move(T... args)
Gaudi::Details::PropertyBase::type
std::string type() const
property type
Definition: PropertyBase.h:47
std::type_info::name
T name(T... args)
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
Gaudi::Details::PropertyBase::declareReadHandler
virtual PropertyBase & declareReadHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for reading
Gaudi::Details::PropertyBase::ownerType
const std::type_info * ownerType() const
get the type of the owner class (used for documentation)
Definition: PropertyBase.h:109
Gaudi::Details::PropertyBase::m_name
std::string_view m_name
property name
Definition: PropertyBase.h:135
Gaudi::Details::PropertyBase::m_ownerType
const std::type_info * m_ownerType
type of owner of the property (if defined)
Definition: PropertyBase.h:143
Gaudi::Details::PropertyBase::m_documentation
std::string_view m_documentation
property doc string
Definition: PropertyBase.h:137
Gaudi::Details::PropertyBase::PropertyBase
PropertyBase(const std::type_info &type, std::string name="", std::string doc="", std::string semantics="")
constructor from the property name and the type
Definition: PropertyBase.h:118
Gaudi::Details::PropertyBase::semantics
std::string semantics() const
property semantics
Definition: PropertyBase.h:43
Gaudi::Details::PropertyBase::setOwnerType
void setOwnerType()
set the type of the owner class (used for documentation)
Definition: PropertyBase.h:104
Gaudi::Details::PropertyBase::declareUpdateHandler
virtual PropertyBase & declareUpdateHandler(std::function< void(PropertyBase &)> fun)=0
set new callback for update
Gaudi::Details::PropertyBase::m_weakReferences
std::set< WeakPropertyRef * > m_weakReferences
Definition: PropertyBase.h:146
Gaudi::Details::PropertyBase::m_semantics
std::string_view m_semantics
property semantics
Definition: PropertyBase.h:139
Gaudi::Details::PropertyBase::m_typeinfo
const std::type_info * m_typeinfo
property type
Definition: PropertyBase.h:141
Gaudi::Details::PropertyBase::to_view
static std::string_view to_view(std::string str)
helper to map a string to a reliable std::string_view
Definition: Property.cpp:53
Gaudi::Details::PropertyBase::toString
virtual std::string toString() const =0
value -> string
std
STL namespace.
compareRootHistos.ref
ref
Definition: compareRootHistos.py:27