| The Gaudi Framework v27r1

- 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
| clone: "virtual constructor" More...
bool | load (Property &destination) const override
| export the property value to the destination More...
bool | assign (const Property &source) override
| import the property value form the source More...
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 Property
const std::string & | name () const
| property name More...
const 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...
const std::function< void(Property &)> & | readCallBack () const
| get a reference to the readCallBack More...
const std::function< void(Property &)> & | updateCallBack () const
| get a reference to the updateCallBack More...
virtual Property & | declareReadHandler (std::function< void(Property &)> fun)
| set new callback for reading More...
virtual Property & | declareUpdateHandler (std::function< void(Property &)> fun)
| set new callback for update More...
template<class HT >
Property & | declareReadHandler (void(HT::*MF)(Property &), HT *instance)
template<class HT >
Property & | declareUpdateHandler (void(HT::*MF)(Property &), HT *instance)
virtual void | useReadHandler () const
| use the call-back function at reading More...
virtual bool | useUpdateHandler ()
| use the call-back function at update More...
virtual | ~Property ()=default
| virtual destructor More...
void | setName (std::string value)
| set the new value for the property name More...
void | setDocumentation (std::string documentation)
| set the documentation string More...
virtual std::ostream & | fillStream (std::ostream &) const
| the printout of the property value More...

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

## Additional Inherited Members
Protected Member Functions inherited from Property
| Property (const std::type_info &type, std::string name="")
| constructor from the property name and the type More...
| Property (std::string name, const std::type_info &type)
| constructor from the property name and the type More...
| Property (const Property &)=default
| copy constructor More...
Property & | operator= (const Property &)=default
| assignment operator More...
Protected Attributes inherited from Property
std::function< void(Property &)> | m_readCallBack
std::function< void(Property &)> | m_updateCallBack

## Detailed Description

Definition at line 841 of file Property.h.

## Constructor & Destructor Documentation

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

Definition at line 200 of file Property.cpp.

201 : Property( std::move(name_), typeid( GaudiHandleArrayBase ) ), m_pValue( &ref )
202 {
203 m_pValue->setPropertyName( name() );
204 }
Property::name
const std::string & name() const
property name
Definition: Property.h:45
Property::Property
Property()
std::move
T move(T...args)
GaudiHandleArrayBase
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:320
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:867

## Member Function Documentation

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

import the property value form the source

Implements Property.

Definition at line 888 of file Property.h.

888 {
889 return fromString( source.toString() ) != 0;
890 }
Property::toString
virtual std::string toString() const =0
value -> string
GaudiHandleArrayProperty::fromString
StatusCode fromString(const std::string &s) override
string -> value
Definition: Property.cpp:223

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

clone: "virtual constructor"

Implements Property.

Definition at line 880 of file Property.h.

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

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

string -> value

Implements Property.

Definition at line 223 of file Property.cpp.

223 {
224 // treat as if a StringArrayProperty
225 std::vector< std::string > tmp;
226 StatusCode sc = Gaudi::Parsers::parse ( tmp , source );
227 if ( sc.isFailure() ) return sc;
228 if ( !m_pValue->setTypesAndNames( std::move(tmp) ) ) return StatusCode::FAILURE;
229 return useUpdateHandler()?StatusCode::SUCCESS:StatusCode::FAILURE;
230 }
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:11
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
StatusCode::FAILURE
Definition: StatusCode.h:29
GaudiHandleArrayBase::setTypesAndNames
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
StatusCode::SUCCESS
Definition: StatusCode.h:30
Property::useUpdateHandler
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::move
T move(T...args)
std::vector< std::string >
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867

bool GaudiHandleArrayProperty::load | ( | Property & | dest | ) | const
| inline override virtual

export the property value to the destination

Implements Property.

Definition at line 884 of file Property.h.

884 {
885 return destination.assign( *this );
886 }

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

Definition at line 875 of file Property.h.

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

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

Definition at line 206 of file Property.cpp.

206 {
207 m_pValue->setTypesAndNames( value.typesAndNames() );
208 return useUpdateHandler();
209 }
GaudiHandleArrayBase::setTypesAndNames
bool setTypesAndNames(const std::vector< std::string > &myTypesAndNamesList)
Set the array of handles from list of "type/name" strings in .
Definition: GaudiHandle.cpp:63
Property::useUpdateHandler
virtual bool useUpdateHandler()
use the call-back function at update
Definition: Property.cpp:92
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
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:78

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

value -> stream

Implements Property.

Definition at line 217 of file Property.cpp.

217 {
218 // treat as if a StringArrayProperty
219 useReadHandler();
220 Gaudi::Utils::toStream( m_pValue->typesAndNames(), out );
221 }
Property::useReadHandler
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
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:319
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
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:78

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

value -> string

Implements Property.

Definition at line 211 of file Property.cpp.

211 {
212 // treat as if a StringArrayProperty
213 useReadHandler();
214 return Gaudi::Utils::toString( m_pValue->typesAndNames() );
215 }
Property::useReadHandler
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
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:78

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

Definition at line 892 of file Property.h.

892 {
893 useReadHandler();
894 return *m_pValue;
895 }
Property::useReadHandler
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867

## 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 867 of file Property.h.

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

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