| The Gaudi Framework v27r1

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

- File List
- File Members

Property.cpp
Go to the documentation of this file.
1 // ============================================================================
2 // Include files
3 // ============================================================================
4 // STD & STL
5 // ============================================================================
6 #include <iostream>
7 #include <vector>
8 #include <string>
9 #include <utility>
10 #include <algorithm>
11 #include <functional>
12 // ============================================================================
13 // GaudiKernel
14 // ============================================================================
15 #include "GaudiKernel/IProperty.h"
16 #include "GaudiKernel/SmartIF.h"
17 #include "GaudiKernel/Property.h"
18 #include "GaudiKernel/GaudiHandle.h"
19 // ============================================================================
20 // Boost
21 // ============================================================================
22 #include "boost/algorithm/string/compare.hpp"
23 // ============================================================================
29 // ============================================================================
30 // The output operator for friendly printout
31 // ============================================================================
32 std::ostream& operator<<( std::ostream& stream ,
33 const Property& prop )
34 { return prop.fillStream ( stream ) ; }
35 // ============================================================================
36 /* constructor from the property name and the type
37 * @param name proeprty name
38 * @param type property C++/RTTI type
39 */
40 // ============================================================================
41 Property::Property
42 ( const std::type_info& type ,
43 std::string name )
44 : m_name ( std::move(name) )
45 , m_documentation ( m_name )
46 , m_typeinfo ( &type )
47 {}
48 // ============================================================================
49 /* constructor from the property name and the type
50 * @param type property C++/RTTI type
51 * @param name proeprty name
52 */
53 // ============================================================================
54 Property::Property
55 ( std::string name ,
56 const std::type_info& type )
57 : m_name ( std::move(name) )
58 , m_documentation ( m_name )
59 , m_typeinfo ( &type )
60 {}
61 // ============================================================================
62 // set new callback for reading
63 // ============================================================================
64 Property& Property::declareReadHandler( std::function<void(Property&)> fun )
65 {
66 m_readCallBack = std::move(fun);
67 return *this;
68 }
69 // ============================================================================
70 // set new callback for update
71 // ============================================================================
72 Property& Property::declareUpdateHandler ( std::function<void(Property&)> fun )
73 {
74 m_updateCallBack = std::move(fun);
75 return *this;
76 }
77 // ============================================================================
78 // use the call-back function at reading
79 // ============================================================================
80 void Property::useReadHandler () const
81 {
82 if ( !m_readCallBack ) { return ; } // RETURN
83 // avoid infinite loop
84 std::function<void(Property&)> theCallBack;
85 theCallBack.swap(m_readCallBack);
86 theCallBack( const_cast<Property&>(*this) ) ;
87 m_readCallBack.swap(theCallBack);
88 }
89 // ============================================================================
90 // use the call-back function at update
91 // ============================================================================
92 bool Property::useUpdateHandler ()
93 {
94 bool sc(true);
95 if ( !m_updateCallBack ) { return sc; } // RETURN
96 // avoid infinite loop
97 std::function<void(Property&)> theCallBack;
98 theCallBack.swap(m_updateCallBack);
99 try {
100 theCallBack( *this ) ;
101 } catch(...) {
102 sc = false;
103 }
104 m_updateCallBack.swap(theCallBack);
105 return sc;
106 }
107 // ============================================================================
108 // the printout of the property value
109 // ============================================================================
110 std::ostream&
111 Property::fillStream ( std::ostream& stream ) const
112 { return stream << " '" <<name() << "':" << toString() ; }
113 // ============================================================================
114 /* simple function which check the existence of the property with
115 * the given name.
116 *
117 * @code
118 *
119 * IInterface* p = .
120 *
121 * const bool = hasProperty( p , "Context" ) ;
122 *
123 * @endcode
124 *
125 * @param p pointer to IInterface object (any component)
126 * @param name property name (case insensitive)
127 * @return true if "p" has a property with such name
128 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
129 * @date 2006-09-09
130 */
131 // ============================================================================
132 bool Gaudi::Utils::hasProperty
133 ( const IInterface* p ,
134 const std::string& name )
135 {
136 // delegate to another method after trivial check
137 return p && getProperty ( p , name ) ;
138 }
139 // ============================================================================
140 /* simple function which check the existence of the property with
141 * the given name.
142 *
143 * @code
144 *
145 * const IProperty* p = ... ;
146 *
147 * const bool = hasProperty( p , "Context" ) ;
148 *
149 * @endcode
150 *
151 * @param p pointer to IProperty object
152 * @param name property name (case insensitive)
153 * @return true if "p" has a property with such name
154 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
155 * @date 2006-09-09
156 */
157 // ============================================================================
158 bool Gaudi::Utils::hasProperty
159 ( const IProperty* p ,
160 const std::string& name )
161 {
162 // delegate the actual work to another method ;
163 return p && getProperty ( p , name ) ;
164 }
165 // ============================================================================
166 //
167 // GaudiHandleProperty implementation
168 //
169 GaudiHandleProperty::GaudiHandleProperty
170 ( std::string name_, GaudiHandleBase& ref )
171 : Property( std::move(name_), typeid( GaudiHandleBase ) ), m_pValue( &ref )
172 {
173 m_pValue->setPropertyName( name() );
174 }
175
176 bool GaudiHandleProperty::setValue( const GaudiHandleBase& value ) {
177 m_pValue->setTypeAndName( value.typeAndName() );
178 return useUpdateHandler();
179 }
180
181 std::string GaudiHandleProperty::toString( ) const {
182 useReadHandler();
183 return m_pValue->typeAndName();
184 }
185
186 void GaudiHandleProperty::toStream(std::ostream& out) const {
187 useReadHandler();
188 out << m_pValue->typeAndName();
189 }
190
191 StatusCode GaudiHandleProperty::fromString( const std::string& s) {
192 m_pValue->setTypeAndName( s );
193 return useUpdateHandler()?StatusCode::SUCCESS:StatusCode::FAILURE;
194 }
195
196
197 //
198 // GaudiHandlePropertyArray implementation
199 //
200 GaudiHandleArrayProperty::GaudiHandleArrayProperty( std::string name_, GaudiHandleArrayBase& ref )
201 : Property( std::move(name_), typeid( GaudiHandleArrayBase ) ), m_pValue( &ref )
202 {
203 m_pValue->setPropertyName( name() );
204 }
205
206 bool GaudiHandleArrayProperty::setValue( const GaudiHandleArrayBase& value ) {
207 m_pValue->setTypesAndNames( value.typesAndNames() );
208 return useUpdateHandler();
209 }
210
211 std::string GaudiHandleArrayProperty::toString() const {
212 // treat as if a StringArrayProperty
213 useReadHandler();
214 return Gaudi::Utils::toString( m_pValue->typesAndNames() );
215 }
216
217 void GaudiHandleArrayProperty::toStream(std::ostream &out) const {
218 // treat as if a StringArrayProperty
219 useReadHandler();
220 Gaudi::Utils::toStream( m_pValue->typesAndNames(), out );
221 }
222
223 StatusCode GaudiHandleArrayProperty::fromString( const std::string& source ) {
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 }
231
232
233
234 // ============================================================================
235 namespace
236 {
237 template <typename C, typename BinaryPredicate>
238 bool equal_(const C& c1, const C& c2, BinaryPredicate&& p) {
239 return c1.size() == c2.size() &&
240 std::equal(std::begin(c1), std::end(c1), std::begin(c2),
241 std::forward<BinaryPredicate>(p) );
242 }
243
244 // match (case insensitive) property by name
245 struct is_iByName
246 {
248 is_iByName ( const std::string& name ) : m_name ( name ) {}
250 bool operator () ( const Property* p ) const
251 {
252 return p && equal_(m_name,p->name(),boost::algorithm::is_iequal{});
253 } ;
254 private:
255 const std::string& m_name ;
256 } ;
257 }
258 // ============================================================================
259 /* simple function which gets the property with given name
260 * from the component
261 *
262 * @code
263 *
264 * const IProperty* p = ... ;
265 *
266 * const Property* pro = getProperty( p , "Context" ) ;
267 *
268 * @endcode
269 *
270 * @param p pointer to IProperty object
271 * @param name property name (case insensitive)
272 * @return property with the given name (if exists), NULL otherwise
273 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
274 * @date 2006-09-09
275 */
276 // ============================================================================
277 Property* Gaudi::Utils::getProperty
278 ( const IProperty* p ,
279 const std::string& name )
280 {
281 // trivial check
282 if ( !p ) { return nullptr ; } // RETURN
283 // get all properties
284 const auto& props = p->getProperties() ;
285 // comparison criteria:
286 auto ifound = std::find_if ( props.begin(), props.end(), is_iByName{ name } );
287 return ifound != props.end() ? *ifound : nullptr;
288 }
289 // ============================================================================
290 /* simple function which gets the property with given name
291 * from the component
292 *
293 * @code
294 *
295 * const IInterface* p = ... ;
296 *
297 * const Property* pro = getProperty( p , "Context" ) ;
298 *
299 * @endcode
300 *
301 * @param p pointer to IInterface object
302 * @param name property name (case insensitive)
303 * @return property with the given name (if exists), NULL otherwise
304 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
305 * @date 2006-09-09
306 */
307 // ============================================================================
308 Property* Gaudi::Utils::getProperty
309 ( const IInterface* p , const std::string& name )
310 {
311 // trivial check
312 if ( !p ) { return nullptr ; } // RETURN
313 // remove const-qualifier
314 IInterface* _i = const_cast<IInterface*>( p ) ;
315 if ( !_i ) { return nullptr ; } // RETURN
316 SmartIF<IProperty> property( _i ) ;
317 return property ? getProperty ( property , name ) : nullptr;
318 }
319 // ============================================================================
320 /* check the property by name from the list of the properties
321 *
322 * @code
323 *
324 * IJobOptionsSvc* svc = ... ;
325 *
326 * const std::string client = ... ;
327 *
328 * // get the property:
329 * bool context =
330 * hasProperty ( svc->getProperties( client ) , "Context" )
331 *
332 * @endcode
333 *
334 * @see IJobOptionsSvc
335 *
336 * @param p list of properties
337 * @param name property name (case insensitive)
338 * @return true if the property exists
339 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
340 * @date 2006-09-09
341 */
342 // ============================================================================
343 bool Gaudi::Utils::hasProperty
344 ( const std::vector<const Property*>* p ,
345 const std::string& name )
346 {
347 // delegate to another method
348 return getProperty ( p , name ) ;
349 }
350 // ============================================================================
351 /* get the property by name from the list of the properties
352 *
353 * @code
354 *
355 * IJobOptionsSvc* svc = ... ;
356 *
357 * const std::string client = ... ;
358 *
359 * // get the property:
360 * const Property* context =
361 * getProperty ( svc->getProperties( client ) , "Context" )
362 *
363 * @endcode
364 *
365 * @see IJobOptionsSvc
366 *
367 * @param p list of properties
368 * @param name property name (case insensitive)
369 * @return property with the given name (if exists), NULL otherwise
370 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
371 * @date 2006-09-09
372 */
373 // ============================================================================
374 const Property* Gaudi::Utils::getProperty
375 ( const std::vector<const Property*>* p ,
376 const std::string& name )
377 {
378 // trivial check
379 if ( !p ) { return nullptr ; } // RETURN
380 auto ifound = std::find_if ( p->begin() , p->end() , is_iByName{ name } ) ;
381 return p->end() != ifound ? *ifound : nullptr ; // RETURN
382 }
383 // ============================================================================
384 /* the full specialization of the
385 * method setProperty( IProperty, std::string, const TYPE&)
386 * for C-strings
387 *
388 * @param component component which needs to be configured
389 * @param name name of the property
390 * @param value value of the property
391 * @param doc the new documentation string
392 *
393 * @see IProperty
394 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
395 * @date 2007-05-13
396 */
397 // ============================================================================
398 StatusCode Gaudi::Utils::setProperty
399 ( IProperty* component ,
400 const std::string& name ,
401 const char* value ,
402 const std::string& doc )
403 {
404 return Gaudi::Utils::setProperty ( component , name , std::string{value} , doc ) ;
405 }
406 // ============================================================================
407 /* the full specialization of the
408 * method Gaudi::Utils::setProperty( IProperty, std::string, const TYPE&)
409 * for standard strings
410 *
411 * @param component component which needs to be configured
412 * @param name name of the property
413 * @param value value of the property
414 *
415 * @see IProperty
416 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
417 * @date 2007-05-13
418 */
419 // ============================================================================
420 StatusCode Gaudi::Utils::setProperty
421 ( IProperty* component ,
422 const std::string& name ,
423 const std::string& value ,
424 const std::string& doc )
425 {
426 if ( !component ) { return StatusCode::FAILURE ; } // RETURN
427 if ( !hasProperty ( component , name ) ) { return StatusCode::FAILURE ; }
428 StatusCode sc = component -> setProperty ( name , value ) ;
429 if ( !doc.empty() )
430 {
431 Property* p = getProperty( component , name ) ;
432 if ( p ) { p -> setDocumentation ( doc ) ; }
433 }
434 sc.ignore() ;
435 return sc ;
436 }
437 // ============================================================================
438 /* simple function to set the property of the given object from another
439 * property
440 *
441 * @code
442 *
443 * IProperty* component = ... ;
444 *
445 * const Property* prop = ... ;
446 * StatusCode sc = setProperty ( component , "Data" , prop ) ;
447 *
448 * @endcode
449 *
450 * @param component component which needs to be configured
451 * @param name name of the property
452 * @param property the property
453 * @param doc the new documentation string
454 *
455 * @see IProperty
456 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
457 * @date 2007-05-13
458 */
459 // ============================================================================
460 StatusCode Gaudi::Utils::setProperty
461 ( IProperty* component ,
462 const std::string& name ,
463 const Property* property ,
464 const std::string& doc )
465 {
466 if ( !component || !property ) return StatusCode::FAILURE ;
467 Property* p = getProperty ( component , name ) ;
468 if ( !p || !p->assign ( *property ) ) return StatusCode::FAILURE ;
469 if ( !doc.empty() ) { p->setDocumentation( doc ) ; }
470 return StatusCode::SUCCESS ;
471 }
472 // ============================================================================
473 /* simple function to set the property of the given object from another
474 * property
475 *
476 * @code
477 *
478 * IProperty* component = ... ;
479 *
480 * const Property& prop = ... ;
481 * StatusCode sc = setProperty ( component , "Data" , prop ) ;
482 *
483 * @endcode
484 *
485 * @param component component which needs to be configured
486 * @param name name of the property
487 * @param property the property
488 * @param doc the new documentation string
489 *
490 * @see IProperty
491 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
492 * @date 2007-05-13
493 */
494 // ============================================================================
495 StatusCode Gaudi::Utils::setProperty
496 ( IProperty* component ,
497 const std::string& name ,
498 const Property& property ,
499 const std::string& doc )
500 { return setProperty ( component , name , &property , doc ) ; }
501 // ============================================================================
502 /* the full specialization of the
503 * method setProperty( IInterface , std::string, const TYPE&)
504 * for standard strings
505 *
506 * @param component component which needs to be configured
507 * @param name name of the property
508 * @param value value of the property
509 * @param doc the new documentation string
510 *
511 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
512 * @date 2007-05-13
513 */
514 // ============================================================================
515 StatusCode Gaudi::Utils::setProperty
516 ( IInterface* component ,
517 const std::string& name ,
518 const std::string& value ,
519 const std::string& doc )
520 {
521 if ( !component ) { return StatusCode::FAILURE ; }
522 SmartIF<IProperty> property ( component ) ;
523 return property ? setProperty ( property , name , value , doc )
524 : StatusCode::FAILURE ;
525 }
526 // ============================================================================
527 /* the full specialization of the
528 * method setProperty( IInterface , std::string, const TYPE&)
529 * for C-strings
530 *
531 * @param component component which needs to be configured
532 * @param name name of the property
533 * @param value value of the property
534 * @param doc the new documentation string
535 *
536 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
537 * @date 2007-05-13
538 */
539 // ============================================================================
540 StatusCode Gaudi::Utils::setProperty
541 ( IInterface* component ,
542 const std::string& name ,
543 const char* value ,
544 const std::string& doc )
545 {
546 return setProperty ( component , name , std::string{ value } , doc ) ;
547 }
548 // ============================================================================
549 /* simple function to set the property of the given object from another
550 * property
551 *
552 * @code
553 *
554 * IInterface* component = ... ;
555 *
556 * const Property* prop = ... ;
557 * StatusCode sc = setProperty ( component , "Data" , prop ) ;
558 *
559 * @endcode
560 *
561 * @param component component which needs to be configured
562 * @param name name of the property
563 * @param property the property
564 * @param doc the new documentation string
565 *
566 * @see IProperty
567 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
568 * @date 2007-05-13
569 */
570 // ============================================================================
571 StatusCode Gaudi::Utils::setProperty
572 ( IInterface* component ,
573 const std::string& name ,
574 const Property* property ,
575 const std::string& doc )
576 {
577 if ( !component ) { return StatusCode::FAILURE ; }
578 SmartIF<IProperty> prop ( component ) ;
579 if ( !prop ) { return StatusCode::FAILURE ; }
580 return setProperty ( prop , name , property , doc ) ;
581 }
582 // ============================================================================
583 /* simple function to set the property of the given object from another
584 * property
585 *
586 * @code
587 *
588 * IInterface* component = ... ;
589 *
590 * const Property& prop = ... ;
591 * StatusCode sc = setProperty ( component , "Data" , prop ) ;
592 *
593 * @endcode
594 *
595 * @param component component which needs to be configured
596 * @param name name of the property
597 * @param property the property
598 * @param doc the new documentation string
599 *
600 * @see IProperty
601 * @author Vanya BELYAEV ibelyaev@physics.syr.edu
602 * @date 2007-05-13
603 */
604 // ============================================================================
605 StatusCode Gaudi::Utils::setProperty
606 ( IInterface* component ,
607 const std::string& name ,
608 const Property& property ,
609 const std::string& doc )
610 { return setProperty ( component , name , &property , doc ) ; }
611 // ============================================================================
612
613 // ============================================================================
614 // The END
615 // ============================================================================
Gaudi::Utils::setProperty
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1187
SmartIF< IProperty >
std::string::empty
T empty(T...args)
Property::useReadHandler
virtual void useReadHandler() const
use the call-back function at reading
Definition: Property.cpp:80
GaudiHandleArrayProperty::setValue
bool setValue(const GaudiHandleArrayBase &value)
Definition: Property.cpp:206
Property::assign
virtual bool assign(const Property &source)=0
import the property value form the source
IProperty::getProperties
virtual const std::vector< Property * > & getProperties() const =0
Get list of properties.
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiHandleBase::setTypeAndName
void setTypeAndName(std::string myTypeAndName)
The component "type/name" string.
Definition: GaudiHandle.cpp:9
std::function
Property::toString
virtual std::string toString() const =0
value -> string
Property::declareUpdateHandler
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:72
Property::name
const std::string & name() const
property name
Definition: Property.h:45
std::function::swap
T swap(T...args)
GaudiHandleProperty::fromString
StatusCode fromString(const std::string &s) override
string -> value
Definition: Property.cpp:191
Gaudi::Utils::hasProperty
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
Definition: Property.cpp:159
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:371
Property::setDocumentation
void setDocumentation(std::string documentation)
set the documentation string
Definition: Property.h:94
std
STL namespace.
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
std::end
T end(T...args)
Gaudi::Utils::getProperty
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:278
getProperty
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
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
Property::fillStream
virtual std::ostream & fillStream(std::ostream &) const
the printout of the property value
Definition: Property.cpp:111
GaudiHandleArrayProperty::toStream
void toStream(std::ostream &out) const override
value -> stream
Definition: Property.cpp:217
std::type_info
Property::declareReadHandler
virtual Property & declareReadHandler(std::function< void(Property &)> fun)
set new callback for reading
Definition: Property.cpp:64
std::string
STL class.
compareRootHistos.ref
string ref
Definition: compareRootHistos.py:14
GaudiHandleProperty::m_pValue
GaudiHandleBase * m_pValue
Pointer to the real property.
Definition: Property.h:808
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
GaudiHandleProperty::GaudiHandleProperty
GaudiHandleProperty(std::string name, GaudiHandleBase &ref)
Definition: Property.cpp:170
gaudirun.type
string type
Definition: gaudirun.py:151
StatusCode::FAILURE
Definition: StatusCode.h:29
HiveAlgSequencer.c2
tuple c2
Definition: HiveAlgSequencer.py:26
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
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
SmartIF.h
GaudiHandleArrayProperty::GaudiHandleArrayProperty
GaudiHandleArrayProperty(std::string name, GaudiHandleArrayBase &ref)
Definition: Property.cpp:200
Property::Property
Property()
setProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
GaudiHandleProperty::toString
std::string toString() const override
value -> string
Definition: Property.cpp:181
std::move
T move(T...args)
Property::m_readCallBack
std::function< void(Property &)> m_readCallBack
Definition: Property.h:120
GaudiHandleArrayProperty::fromString
StatusCode fromString(const std::string &s) override
string -> value
Definition: Property.cpp:223
HiveAlgSequencer.c1
tuple c1
Definition: HiveAlgSequencer.py:25
std::find_if
T find_if(T...args)
GaudiHandleArrayBase
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:320
IProperty.h
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
std::vector< std::string >
GaudiHandleProperty::toStream
void toStream(std::ostream &out) const override
value -> stream
Definition: Property.cpp:186
GaudiHandleInfo::setPropertyName
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:44
std::begin
T begin(T...args)
Property.h
GaudiHandleArrayProperty::m_pValue
GaudiHandleArrayBase * m_pValue
Pointer to the real property.
Definition: Property.h:867
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
Property::m_updateCallBack
std::function< void(Property &)> m_updateCallBack
Definition: Property.h:122
gaudirun.s
string s
Definition: gaudirun.py:245
operator<<
std::ostream & operator<<(std::ostream &stream, const Property &prop)
The output operator for friendly printout.
Definition: Property.cpp:32
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
GaudiHandleBase
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:93
GaudiHandleArrayProperty::toString
std::string toString() const override
value -> string
Definition: Property.cpp:211
GaudiHandleBase::typeAndName
std::string typeAndName() const
The full type and name: "type/name".
Definition: GaudiHandle.h:120
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
std::ostream
STL class.
std::equal
T equal(T...args)
GaudiHandle.h
GaudiHandleProperty::setValue
bool setValue(const GaudiHandleBase &value)
Definition: Property.cpp:176