| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
GaudiHandleArrayProperty Class Reference

`#include <GaudiKernel/Property.h>`

Inheritance diagram for GaudiHandleArrayProperty:
[legend]
Collaboration diagram for GaudiHandleArrayProperty:
[legend]

## Public Member Functions
| GaudiHandleArrayProperty (std::string name, GaudiHandleArrayBase &ref)
GaudiHandleArrayProperty & | operator= (const GaudiHandleArrayBase &value)
GaudiHandleArrayProperty * | clone () const override
| clones the current property More...
bool | load (PropertyBase &destination) const override
bool | assign (const PropertyBase &source) override
std::string | toString () const override
| value -> string More...
void | toStream (std::ostream &out) const override
| value -> stream More...
StatusCode | fromString (const std::string &s) override
| string -> value More...
const GaudiHandleArrayBase & | value () const
bool | setValue (const GaudiHandleArrayBase &value)
Public Member Functions inherited from PropertyWithHandlers<>
PropertyBase & | declareReadHandler (std::function< void(PropertyBase &)> fun) override
| set new callback for reading More...
PropertyBase & | declareUpdateHandler (std::function< void(PropertyBase &)> fun) override
| set new callback for update More...
const std::function< void(PropertyBase &)> | readCallBack () const override
| get a reference to the readCallBack More...
const std::function< void(PropertyBase &)> | updateCallBack () const override
| get a reference to the updateCallBack More...
void | useReadHandler () const
| use the call-back function at reading, if available More...
bool | useUpdateHandler () override
| use the call-back function at update, if available More...
Public Member Functions inherited from Gaudi::Details::PropertyBase
const std::string | name () const
| property name More...
std::string | documentation () const
| property documentation More...
const std::type_info * | type_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 PropertyBase & | declareReadHandler (std::function< void(PropertyBase &)> fun)=0
| set new callback for reading More...
virtual PropertyBase & | declareUpdateHandler (std::function< void(PropertyBase &)> fun)=0
| set new callback for update More...
template<class HT >
PropertyBase & | declareReadHandler (void(HT::*MF)(PropertyBase &), HT *instance)
template<class HT >
PropertyBase & | declareUpdateHandler (void(HT::*MF)(PropertyBase &), HT *instance)
virtual | ~PropertyBase ()=default
| 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...
virtual std::ostream & | fillStream (std::ostream &) const
| the printout of the property value 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_info * | ownerType () 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...

## Private Attributes
GaudiHandleArrayBase * | m_pValue
| Pointer to the real property. More...

## Additional Inherited Members
Protected Member Functions inherited from Gaudi::Details::PropertyBase
| PropertyBase (const std::type_info &type, std::string name="", std::string doc="")
| 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...
PropertyBase & | operator= (const PropertyBase &)=default
| assignment operator More...

## Detailed Description

Definition at line 869 of file Property.h.

## Constructor & Destructor Documentation

GaudiHandleArrayProperty::GaudiHandleArrayProperty | ( | std::string | name,
|  | GaudiHandleArrayBase & | ref
| ) |  |

Definition at line 143 of file Property.cpp.

144 : PropertyWithHandlers( std::move( name_ ), typeid( GaudiHandleArrayBase ) ), m_pValue( &ref )
145 {
146 m_pValue->setPropertyName( name() );
147 }
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: Property.h:40
PropertyWithHandlers
Helper class to simplify the migration old properties deriving directly from PropertyBase.
Definition: Property.h:786
std::move
T move(T...args)
GaudiHandleArrayBase
Base class of array&#39;s of various gaudihandles.
Definition: GaudiHandle.h:348
GaudiHandleInfo::setPropertyName
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:44
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903

## Member Function Documentation

bool GaudiHandleArrayProperty::assign | ( | const PropertyBase & | source | ) |
| inline override

Definition at line 884 of file Property.h.

884 { return fromString( source.toString() ); }
GaudiHandleArrayProperty::fromString
StatusCode fromString(const std::string &s) override
string -> value
Definition: Property.cpp:169

GaudiHandleArrayProperty* GaudiHandleArrayProperty::clone | ( |  | ) | const
| inline override virtual

clones the current property

Implements Gaudi::Details::PropertyBase.

Definition at line 880 of file Property.h.

880 { return new GaudiHandleArrayProperty( *this ); }
GaudiHandleArrayProperty::GaudiHandleArrayProperty
GaudiHandleArrayProperty(std::string name, GaudiHandleArrayBase &ref)
Definition: Property.cpp:143

StatusCode GaudiHandleArrayProperty::fromString | ( | const std::string & | value | ) |
| override virtual

string -> value

Implements Gaudi::Details::PropertyBase.

Definition at line 169 of file Property.cpp.

170 {
171 // treat as if a Gaudi::Property<std::vector<std::string>>
172 std::vector<std::string> tmp;
173 StatusCode sc = Gaudi::Parsers::parse( tmp, source );
174 if ( sc.isFailure() ) return sc;
175 if ( !m_pValue->setTypesAndNames( std::move( tmp ) ) ) return StatusCode::FAILURE;
176 useUpdateHandler();
177 return StatusCode::SUCCESS;
178 }
StatusCode::SUCCESS
Definition: StatusCode.h:31
StatusCode::FAILURE
Definition: StatusCode.h:31
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:13
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
GaudiHandleArrayBase::setTypesAndNames
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>.
Definition: GaudiHandle.cpp:58
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
std::move
T move(T...args)
std::vector< std::string >
PropertyWithHandlers<>::useUpdateHandler
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:815
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903

bool GaudiHandleArrayProperty::load | ( | PropertyBase & | destination | ) | const
| inline override

Definition at line 882 of file Property.h.

882 { return destination.assign( *this ); }

GaudiHandleArrayProperty& GaudiHandleArrayProperty::operator= | ( | const GaudiHandleArrayBase & | value | ) |
| inline

Definition at line 874 of file Property.h.

875 {
876 setValue( value );
877 return *this;
878 }
GaudiHandleArrayProperty::setValue
bool setValue(const GaudiHandleArrayBase &value)
Definition: Property.cpp:149

bool GaudiHandleArrayProperty::setValue | ( | const GaudiHandleArrayBase & | value | ) |

Definition at line 149 of file Property.cpp.

150 {
151 m_pValue->setTypesAndNames( value.typesAndNames() );
152 return useUpdateHandler();
153 }
GaudiHandleArrayBase::setTypesAndNames
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in <myTypesAndNamesList>.
Definition: GaudiHandle.cpp:58
PropertyWithHandlers<>::useUpdateHandler
bool useUpdateHandler() override
use the call-back function at update, if available
Definition: Property.h:815
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903
GaudiHandleArrayBase::typesAndNames
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:75

void GaudiHandleArrayProperty::toStream | ( | std::ostream & | out | ) | const
| override virtual

value -> stream

Implements Gaudi::Details::PropertyBase.

Definition at line 162 of file Property.cpp.

163 {
164 // treat as if a Gaudi::Property<std::vector<std::string>>
165 useReadHandler();
166 Gaudi::Utils::toStream( m_pValue->typesAndNames(), out );
167 }
Gaudi::Utils::toStream
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
Definition: ToStream.h:293
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903
GaudiHandleArrayBase::typesAndNames
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:75

std::string GaudiHandleArrayProperty::toString | ( |  | ) | const
| override virtual

value -> string

Implements Gaudi::Details::PropertyBase.

Definition at line 155 of file Property.cpp.

156 {
157 // treat as if a Gaudi::Property<std::vector<std::string>>
158 useReadHandler();
159 return Gaudi::Utils::toString( m_pValue->typesAndNames() );
160 }
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:346
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903
GaudiHandleArrayBase::typesAndNames
const std::vector< std::string > typesAndNames() const
Return a vector with "type/name" strings of all handles in the array.
Definition: GaudiHandle.cpp:75

const GaudiHandleArrayBase& GaudiHandleArrayProperty::value | ( |  | ) | const
| inline

Definition at line 892 of file Property.h.

893 {
894 useReadHandler();
895 return *m_pValue;
896 }
PropertyWithHandlers<>::useReadHandler
void useReadHandler() const
use the call-back function at reading, if available
Definition: Property.h:812
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:903

## Member Data Documentation

GaudiHandleArrayBase* GaudiHandleArrayProperty::m_pValue
| private

Pointer to the real property.

Reference would be better, but ROOT does not support references yet

Definition at line 903 of file Property.h.

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

- GaudiKernel/GaudiKernel/Property.h
- GaudiKernel/src/Lib/Property.cpp