| The Gaudi Framework v30r0 (c919700c)

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

- File List
- File Members

GaudiHandle.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_GAUDIHANDLE_H
2 #define GAUDIKERNEL_GAUDIHANDLE_H
3
4 // Includes
5 #include "GaudiKernel/GaudiException.h"
6 #include "GaudiKernel/IInterface.h"
7 #include "GaudiKernel/System.h"
8
9 #include <algorithm>
10 #include <iostream>
11 #include <stdexcept>
12 #include <string>
13 #include <type_traits>
14 #include <vector>
15
16 namespace details
17 {
19 template <class T>
20 std::remove_const_t<T>* nonConst( T* p )
21 {
22 return const_cast<std::remove_const_t<T>*>( p );
23 }
24 }
25
26 class GAUDI_API GaudiHandleInfo
27 {
28 protected:
37 GaudiHandleInfo( std::string myComponentType, std::string myParentName )
38 : m_componentType( std::move( myComponentType ) ), m_parentName( std::move( myParentName ) )
39 {
40 }
41
42 public:
44 virtual ~GaudiHandleInfo() = default;
45 //
46 // Public member functions
47 //
48 const std::string& componentType() const { return m_componentType; }
49
51 const std::string& propertyName() const { return m_propertyName; }
52
54 void setPropertyName( std::string propName ) { m_propertyName = std::move( propName ); }
55
57 const std::string& parentName() const { return m_parentName; }
58
62 virtual std::string pythonPropertyClassName() const = 0;
63
68 virtual std::string pythonRepr() const = 0;
69
70 protected:
72 void setComponentType( const std::string& componentType ) { m_componentType = componentType; }
73
75 void setParentName( const std::string& parent ) { m_parentName = parent; }
76
77 private:
78 //
79 // Data members
80 //
81 std::string m_componentType; // e.g.: "PublicTool","PrivateTool","Service"
82 std::string m_propertyName; // name as used in declareProperty(name,gaudiHandle)
83 std::string m_parentName; // name of the parent having this handle as a member
84 };
85
93 class GAUDI_API GaudiHandleBase : public GaudiHandleInfo
94 {
95 //
96 // Ctors etc
97 //
98 protected:
110 GaudiHandleBase( std::string myTypeAndName, std::string myComponentType, std::string myParentName )
111 : GaudiHandleInfo( std::move( myComponentType ), std::move( myParentName ) )
112 {
113 setTypeAndName( std::move( myTypeAndName ) );
114 }
115
116 public:
117 //
118 // Public member functions
119 //
121 std::string typeAndName() const { return m_typeAndName; }
122
124 std::string type() const;
125
127 std::string name() const;
128
130 bool empty() const { return m_typeAndName.empty(); }
131
133 void setTypeAndName( std::string myTypeAndName );
134
136 void setName( const std::string& myName );
137
141 std::string pythonPropertyClassName() const override;
142
144 std::string messageName() const;
145
149 std::string pythonRepr() const override;
150
151 private:
152 //
153 // Data member
154 //
155 std::string m_typeAndName; // the full type and name: "type/name"
156 };
157
166 template <class T>
167 class GAUDI_API GaudiHandle : public GaudiHandleBase
168 {
169 //
170 // Constructors etc.
171 //
172 protected:
173 GaudiHandle( std::string myTypeAndName, std::string myComponentType, std::string myParentName )
174 : GaudiHandleBase( std::move( myTypeAndName ), std::move( myComponentType ), std::move( myParentName ) )
175 {
176 }
177
178 public:
180 template <typename CT = T, typename NCT = typename std::remove_const<T>::type>
181 GaudiHandle( const GaudiHandle<NCT>& other,
182 typename std::enable_if<std::is_const<CT>::value && !std::is_same<CT, NCT>::value>::type* = nullptr )
183 : GaudiHandleBase( other )
184 {
185 m_pObject = other.get();
186 if ( m_pObject ) details::nonConst( m_pObject )->addRef();
187 }
188
190 GaudiHandle( const GaudiHandle& other ) : GaudiHandleBase( other )
191 {
192 m_pObject = other.m_pObject;
193 if ( m_pObject ) details::nonConst( m_pObject )->addRef();
194 }
195
197 template <typename CT = T, typename NCT = typename std::remove_const<T>::type>
198 typename std::enable_if<std::is_const<CT>::value && !std::is_same<CT, NCT>::value, GaudiHandle&>::type
199 operator=( const GaudiHandle<NCT>& other )
200 {
201 GaudiHandleBase::operator=( other );
202 // release any current tool
203 release().ignore();
204 m_pObject = other.get();
205 // update ref-counting
206 if ( m_pObject ) details::nonConst( m_pObject )->addRef();
207 return *this;
208 }
209
211 GaudiHandle& operator=( const GaudiHandle& other )
212 {
213 GaudiHandleBase::operator=( other );
214 // release any current tool
215 release().ignore();
216 m_pObject = other.m_pObject;
217 // update ref-counting
218 if ( m_pObject ) details::nonConst( m_pObject )->addRef();
219 return *this;
220 }
221
223 StatusCode retrieve() const
224 { // not really const, because it updates m_pObject
225 StatusCode sc = StatusCode::SUCCESS;
226 if ( m_pObject && release().isFailure() ) {
227 sc = StatusCode::FAILURE;
228 }
229 if ( sc && retrieve( m_pObject ).isFailure() ) {
230 m_pObject = nullptr;
231 sc = StatusCode::FAILURE;
232 }
233 return sc;
234 }
235
237 StatusCode release() const
238 { // not really const, because it updates m_pObject
239 StatusCode sc = StatusCode::SUCCESS;
240 if ( m_pObject ) {
241 sc = release( m_pObject );
242 m_pObject = nullptr;
243 }
244 return sc;
245 }
246
248 bool isValid() const
249 { // not really const, because it may update m_pObject
250 return m_pObject || retrieve().isSuccess();
251 }
252
255 operator bool() const
256 { // not really const, because it may update m_pObject
257 return isValid();
258 }
259
261 T* get() { return m_pObject; }
262
264 typename std::add_const<T>::type* get() const { return m_pObject; }
265
267 bool isSet() const { return get(); }
268
269 T& operator*()
270 {
271 assertObject();
272 return *m_pObject;
273 }
274
275 T* operator->()
276 {
277 assertObject();
278 return m_pObject;
279 }
280
281 typename std::add_const<T>::type& operator*() const
282 {
283 // not really const, because it may update m_pObject
284 assertObject();
285 return *m_pObject;
286 }
287
288 typename std::add_const<T>::type* operator->() const
289 {
290 // not really const, because it may update m_pObject
291 assertObject();
292 return m_pObject;
293 }
294
296 std::string getDefaultType() { return System::typeinfoName( typeid( T ) ); }
297
298 std::string getDefaultName()
299 {
300 const auto defName = GaudiHandleBase::type();
301 return ( defName.empty() ? getDefaultType() : defName );
302 }
303
304 protected:
306 virtual StatusCode retrieve( T*& ) const = 0; // not really const, because it updates m_pObject
307
310 virtual StatusCode release( T* comp ) const
311 { // not really const, because it updates m_pObject
312 // const cast to support T being a const type
313 details::nonConst( comp )->release();
314 return StatusCode::SUCCESS;
315 }
316
317 private:
319 void setDefaultTypeAndName()
320 {
321 const std::string& myType = getDefaultType();
322 GaudiHandleBase::setTypeAndName( myType + '/' + myType );
323 }
324
326 void setDefaultType() { GaudiHandleBase::setTypeAndName( getDefaultType() ); }
327
330 void assertObject() const
331 { // not really const, because it may update m_pObject
332 if ( UNLIKELY( !isValid() ) ) {
333 throw GaudiException( "Failed to retrieve " + componentType() + ": " + typeAndName(),
334 componentType() + " retrieve", StatusCode::FAILURE );
335 }
336 }
337
338 private:
339 //
340 // Data members
341 //
342 mutable T* m_pObject = nullptr;
343 };
344
351 class GAUDI_API GaudiHandleArrayBase : public GaudiHandleInfo
352 {
353 protected:
354 GaudiHandleArrayBase( std::string myComponentType, std::string myParentName )
355 : GaudiHandleInfo( std::move( myComponentType ), std::move( myParentName ) )
356 {
357 }
358
359 public:
360 typedef std::vector<GaudiHandleBase*> BaseHandleArray;
361 typedef std::vector<const GaudiHandleBase*> ConstBaseHandleArray;
362
365 bool setTypesAndNames( const std::vector<std::string>& myTypesAndNamesList );
366
369 const std::vector<std::string> typesAndNames() const;
370
372 const std::vector<std::string> types() const;
373
375 const std::vector<std::string> names() const;
376
379 const std::vector<std::string> getBaseInfos( std::string ( GaudiHandleBase::*pMemFunc )() const ) const;
380
384 std::string pythonPropertyClassName() const override;
385
389 std::string pythonRepr() const override;
390
394 virtual bool push_back( const std::string& myHandleTypeAndName ) = 0;
395
397 virtual void clear() = 0;
398
400 virtual bool empty() const = 0;
401
404 virtual ConstBaseHandleArray getBaseArray() const = 0;
405
408 virtual BaseHandleArray getBaseArray() = 0;
409
411 virtual bool retrieved() const = 0;
412 };
413
415 template <class T>
416 class GAUDI_API GaudiHandleArray : public GaudiHandleArrayBase
417 {
418 public:
419 //
420 // public nested types
421 //
422 typedef std::vector<T> HandleVector;
423 typedef typename HandleVector::value_type value_type;
424 typedef typename HandleVector::size_type size_type;
425 typedef typename HandleVector::reference reference;
426 typedef typename HandleVector::const_reference const_reference;
427 typedef typename HandleVector::iterator iterator;
428 typedef typename HandleVector::const_iterator const_iterator;
429 typedef typename HandleVector::reverse_iterator reverse_iterator;
430 typedef typename HandleVector::const_reverse_iterator const_reverse_iterator;
431
432 protected:
433 //
434 // Constructors
435 //
440 GaudiHandleArray( const std::vector<std::string>& myTypesAndNamesList, std::string myComponentType,
441 std::string myParentName )
442 : GaudiHandleArrayBase( std::move( myComponentType ), std::move( myParentName ) )
443 {
444 setTypesAndNames( myTypesAndNamesList );
445 }
446
451 GaudiHandleArray( const std::string& myComponentType, const std::string& myParentName )
452 : GaudiHandleArrayBase( myComponentType, myParentName )
453 {
454 }
455
456 public:
457 virtual ~GaudiHandleArray() = default;
458
460 GaudiHandleArray& operator=( const std::vector<std::string>& myTypesAndNamesList )
461 {
462 setTypesAndNames( myTypesAndNamesList );
463 return *this;
464 }
465
466 GaudiHandleArrayBase::BaseHandleArray getBaseArray() override
467 {
468 GaudiHandleArrayBase::BaseHandleArray baseArray;
469 iterator it = begin(), itEnd = end();
470 for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
471 return baseArray;
472 }
473
474 GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray() const override
475 {
476 GaudiHandleArrayBase::ConstBaseHandleArray baseArray;
477 const_iterator it = begin(), itEnd = end();
478 for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
479 return baseArray;
480 }
481
482 //
483 // Simulate (part of) an std::vector
484 //
485 iterator begin() { return m_handleArray.begin(); }
486
487 iterator end() { return m_handleArray.end(); }
488
489 const_iterator begin() const { return m_handleArray.begin(); }
490
491 const_iterator end() const { return m_handleArray.end(); }
492
493 const_iterator rbegin() const { return m_handleArray.rbegin(); }
494
495 const_iterator rend() const { return m_handleArray.rend(); }
496
497 size_type size() const { return m_handleArray.size(); }
498
499 void clear() override { m_handleArray.clear(); }
500
501 bool empty() const override { return m_handleArray.empty(); }
502
503 T& operator[]( int index ) { return m_handleArray[index]; }
504
505 const T& operator[]( int index ) const { return m_handleArray[index]; }
506
508 T* operator[]( const std::string& name )
509 {
510 auto it = std::find_if( begin(), end(), [&]( const_reference r ) { return r.name() == name; } );
511 return it != end() ? &*it : nullptr;
512 }
513
515 const T* operator[]( const std::string& name ) const
516 {
517 auto it = std::find_if( begin(), end(), [&]( const_reference r ) { return r.name() == name; } );
518 return it != end() ? &*it : nullptr;
519 }
520
523 using GaudiHandleArrayBase::push_back; // avoid compiler warning
524 virtual bool push_back( const T& myHandle )
525 {
526 m_handleArray.push_back( myHandle );
527 return true;
528 }
529
531 StatusCode retrieve()
532 {
533 StatusCode sc = StatusCode::SUCCESS;
534 for ( auto& i : *this ) {
535 // stop at first failure
536 if ( i.retrieve().isFailure() ) {
537 sc = StatusCode::FAILURE;
538 break;
539 }
540 }
541 if ( sc ) {
542 m_retrieved = true;
543 }
544 return sc;
545 }
546
548 StatusCode release()
549 {
550 StatusCode sc = StatusCode::SUCCESS;
551 for ( auto& i : *this ) {
552 // continue trying to release other tools even if we fail...
553 if ( i.release().isFailure() ) sc = StatusCode::FAILURE;
554 }
555 return sc;
556 }
557
559 virtual bool retrieved() const override { return m_retrieved; }
560
561 private:
562 //
563 // Private data members
564 //
565 HandleVector m_handleArray;
566 bool m_retrieved{false};
567 };
568
569 // Easy printing out of Handles and HandleArrays
570 // It prints <propertyName> = <HandleType>( <HandleType(s)AndName(s)> )
571 std::ostream& operator<<( std::ostream& os, const GaudiHandleInfo& handle );
572
573 #endif // ! GAUDIKERNEL_GAUDIHANDLE_H
System.h
GaudiHandle::operator=
GaudiHandle & operator=(const GaudiHandle &other)
Assignment operator for correct ref-counting.
Definition: GaudiHandle.h:211
GaudiHandleArray::const_reference
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:426
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
StatusCode::SUCCESS
Definition: StatusCode.h:29
GaudiHandleArray::value_type
HandleVector::value_type value_type
Definition: GaudiHandle.h:423
GaudiHandle
Handle to be used in lieu of naked pointers to gaudis.
Definition: GaudiHandle.h:167
GaudiHandleArray::clear
void clear() override
Clear the list of handles.
Definition: GaudiHandle.h:499
GaudiHandle::getDefaultType
std::string getDefaultType()
Helper function to get default type string from the class type.
Definition: GaudiHandle.h:296
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
GaudiHandleArray::iterator
HandleVector::iterator iterator
Definition: GaudiHandle.h:427
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
GaudiHandle::m_pObject
T * m_pObject
Definition: GaudiHandle.h:342
GaudiHandleArray::getBaseArray
GaudiHandleArrayBase::BaseHandleArray getBaseArray() override
Get a read-write vector of GaudiHandleBase* pointing to the real handles.
Definition: GaudiHandle.h:466
GaudiHandleBase::setTypeAndName
void setTypeAndName(std::string myTypeAndName)
The component "type/name" string.
Definition: GaudiHandle.cpp:9
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:336
GaudiHandleArray::getBaseArray
GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray() const override
Get a read-only vector of const GaudiHandleBase* pointing to the real handles.
Definition: GaudiHandle.h:474
GaudiHandleArray::HandleVector
std::vector< T > HandleVector
Definition: GaudiHandle.h:422
GaudiHandleArray::rend
const_iterator rend() const
Definition: GaudiHandle.h:495
GaudiHandleArray::const_reverse_iterator
HandleVector::const_reverse_iterator const_reverse_iterator
Definition: GaudiHandle.h:430
GaudiHandleInfo::setComponentType
void setComponentType(const std::string &componentType)
The component type.
Definition: GaudiHandle.h:72
std::is_same
GaudiHandle::getDefaultName
std::string getDefaultName()
Definition: GaudiHandle.h:298
std
STL namespace.
GaudiHandle::operator*
T & operator*()
Definition: GaudiHandle.h:269
GaudiHandle::GaudiHandle
GaudiHandle(std::string myTypeAndName, std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:173
GaudiHandleInfo::parentName
const std::string & parentName() const
The name of the parent.
Definition: GaudiHandle.h:57
GaudiHandle::setDefaultType
void setDefaultType()
Helper function to set default type from the class type T.
Definition: GaudiHandle.h:326
GaudiHandle::assertObject
void assertObject() const
Load the pointer to the component.
Definition: GaudiHandle.h:330
GaudiHandleInfo::m_componentType
std::string m_componentType
Definition: GaudiHandle.h:81
GaudiHandleArray::retrieved
virtual bool retrieved() const override
has Array been retreived?
Definition: GaudiHandle.h:559
GaudiHandleArray::GaudiHandleArray
GaudiHandleArray(const std::vector< std::string > &myTypesAndNamesList, std::string myComponentType, std::string myParentName)
Generic constructor.
Definition: GaudiHandle.h:440
GaudiHandleArray::size_type
HandleVector::size_type size_type
Definition: GaudiHandle.h:424
GaudiHandleArray::operator=
GaudiHandleArray & operator=(const std::vector< std::string > &myTypesAndNamesList)
Set the array of GaudiHandles from typeAndNames given in vector of strings.
Definition: GaudiHandle.h:460
GaudiHandleArray::reference
HandleVector::reference reference
Definition: GaudiHandle.h:425
GaudiHandleArray::push_back
virtual bool push_back(const T &myHandle)
Definition: GaudiHandle.h:524
GaudiHandleInfo::setParentName
void setParentName(const std::string &parent)
The name of the parent.
Definition: GaudiHandle.h:75
GaudiHandle::release
StatusCode release() const
Release the component.
Definition: GaudiHandle.h:237
Gaudi::Functional::details::details2::push_back
void push_back(Container &c, const Value &v, std::true_type)
Definition: FunctionalDetails.h:215
GaudiHandle::operator=
std::enable_if< std::is_const< CT >::value &&!std::is_same< CT, NCT >::value, GaudiHandle & >::type operator=(const GaudiHandle< NCT > &other)
Assignment operator for correct ref-counting.
Definition: GaudiHandle.h:199
std::enable_if
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:58
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
GaudiHandle::operator->
std::add_const< T >::type * operator->() const
Definition: GaudiHandle.h:288
std::vector::push_back
T push_back(T...args)
GaudiHandle::setDefaultTypeAndName
void setDefaultTypeAndName()
Helper function to set default name and type.
Definition: GaudiHandle.h:319
GaudiHandleArray::operator[]
const T & operator[](int index) const
Definition: GaudiHandle.h:505
GaudiHandleInfo::propertyName
const std::string & propertyName() const
name as used in declareProperty(name,gaudiHandle)
Definition: GaudiHandle.h:51
GaudiHandleArray::m_handleArray
HandleVector m_handleArray
Definition: GaudiHandle.h:565
GaudiHandleArray::retrieve
StatusCode retrieve()
Retrieve all tools.
Definition: GaudiHandle.h:531
GaudiHandleArray::begin
const_iterator begin() const
Definition: GaudiHandle.h:489
GaudiHandle::operator*
std::add_const< T >::type & operator*() const
Definition: GaudiHandle.h:281
GaudiHandleArray::begin
iterator begin()
Definition: GaudiHandle.h:485
details
Definition: compose.h:3
details::nonConst
std::remove_const_t< T > * nonConst(T *p)
Cast a pointer to a non const type.
Definition: GaudiHandle.h:20
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiException.h
gaudirun.type
type
Definition: gaudirun.py:133
GaudiHandle::get
T * get()
Return the wrapped pointer, not calling retrieve() if null.
Definition: GaudiHandle.h:261
GaudiHandle::retrieve
StatusCode retrieve() const
Retrieve the component.
Definition: GaudiHandle.h:223
GaudiHandleBase::m_typeAndName
std::string m_typeAndName
Definition: GaudiHandle.h:155
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:64
GaudiHandleArrayBase::ConstBaseHandleArray
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:361
std::move
T move(T...args)
GaudiHandleArray::empty
bool empty() const override
Return whether the list of tools is empty.
Definition: GaudiHandle.h:501
std::add_const
GaudiHandle::operator->
T * operator->()
Definition: GaudiHandle.h:275
std::is_const
std::find_if
T find_if(T...args)
GaudiHandleArray::const_iterator
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:428
GaudiHandle::isValid
bool isValid() const
Check if the handle is valid (try to retrive the object is not done yet).
Definition: GaudiHandle.h:248
GaudiHandleArrayBase
Base class of array&#39;s of various gaudihandles.
Definition: GaudiHandle.h:351
GaudiHandleArray::rbegin
const_iterator rbegin() const
Definition: GaudiHandle.h:493
std::vector
STL class.
GaudiHandleInfo::GaudiHandleInfo
GaudiHandleInfo(std::string myComponentType, std::string myParentName)
Some basic information and helper functions shared between various handles/arrays.
Definition: GaudiHandle.h:37
GaudiHandleInfo::setPropertyName
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:54
GaudiHandle::isSet
bool isSet() const
True if the wrapped pointer is not null.
Definition: GaudiHandle.h:267
GaudiHandleArray::reverse_iterator
HandleVector::reverse_iterator reverse_iterator
Definition: GaudiHandle.h:429
GaudiHandleArrayBase::push_back
virtual bool push_back(const std::string &myHandleTypeAndName)=0
Add a handle to the array with "type/name" given in <myHandleTypeAndName>.
GaudiHandleArrayBase::BaseHandleArray
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:360
GaudiHandle::release
virtual StatusCode release(T *comp) const
Release the component.
Definition: GaudiHandle.h:310
GaudiHandleBase::type
std::string type() const
The concrete component class name: the part before the &#39;/&#39;.
Definition: GaudiHandle.cpp:11
operator<<
std::ostream & operator<<(std::ostream &os, const GaudiHandleInfo &handle)
Definition: GaudiHandle.cpp:104
GaudiHandleArray::end
iterator end()
Definition: GaudiHandle.h:487
GaudiHandleArray::operator[]
T & operator[](int index)
Definition: GaudiHandle.h:503
GaudiHandleArray::size
size_type size() const
Definition: GaudiHandle.h:497
GaudiHandleArray::operator[]
const T * operator[](const std::string &name) const
Get const pointer (!) to ToolHandle by instance name.
Definition: GaudiHandle.h:515
GaudiHandleArray::end
const_iterator end() const
Definition: GaudiHandle.h:491
StatusCode::FAILURE
Definition: StatusCode.h:29
GaudiHandleBase
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:93
GaudiHandleBase::typeAndName
std::string typeAndName() const
The full type and name: "type/name".
Definition: GaudiHandle.h:121
GaudiHandleArrayBase::GaudiHandleArrayBase
GaudiHandleArrayBase(std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:354
GaudiHandleArray::operator[]
T * operator[](const std::string &name)
Get pointer (!) to ToolHandle by instance name.
Definition: GaudiHandle.h:508
GaudiHandle::GaudiHandle
GaudiHandle(const GaudiHandle< NCT > &other, typename std::enable_if< std::is_const< CT >::value &&!std::is_same< CT, NCT >::value >::type *=nullptr)
Copy constructor needed for correct ref-counting.
Definition: GaudiHandle.h:181
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
IInterface.h
std::ostream
STL class.
GaudiHandleInfo::componentType
const std::string & componentType() const
Definition: GaudiHandle.h:48
Objects::reference
TO * reference(FROM *from)
Definition: KeyedObject.cpp:21
GaudiHandleBase::GaudiHandleBase
GaudiHandleBase(std::string myTypeAndName, std::string myComponentType, std::string myParentName)
Create a handle (&#39;smart pointer&#39;) to a gaudi component.
Definition: GaudiHandle.h:110
GaudiHandleInfo::m_propertyName
std::string m_propertyName
Definition: GaudiHandle.h:82
GaudiHandle::GaudiHandle
GaudiHandle(const GaudiHandle &other)
Copy constructor needed for correct ref-counting.
Definition: GaudiHandle.h:190
GaudiHandleBase::empty
bool empty() const
Check if the handle has been set to empty string (i.e.
Definition: GaudiHandle.h:130
GaudiHandleArray
T is the concrete handle type, e.g.
Definition: GaudiHandle.h:416
GaudiHandleInfo::m_parentName
std::string m_parentName
Definition: GaudiHandle.h:83
GaudiHandleArray::release
StatusCode release()
Release all tools.
Definition: GaudiHandle.h:548
GaudiHandleArray::GaudiHandleArray
GaudiHandleArray(const std::string &myComponentType, const std::string &myParentName)
Constructor creating an empty array.
Definition: GaudiHandle.h:451
GaudiHandleInfo
Definition: GaudiHandle.h:26