| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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/IInterface.h"
6 #include "GaudiKernel/System.h"
7 #include "GaudiKernel/GaudiException.h"
8
9 #include <string>
10 #include <algorithm>
11 #include <vector>
12 #include <stdexcept>
13 #include <iostream>
14 #include <type_traits>
15
16 class GAUDI_API GaudiHandleInfo {
17 protected:
26 GaudiHandleInfo( std::string myComponentType, std::string myParentName )
27 : m_componentType(std::move(myComponentType)), m_parentName(std::move(myParentName))
28 {}
29 public:
31 virtual ~GaudiHandleInfo() = default;
32 //
33 // Public member functions
34 //
35 const std::string& componentType() const {
36 return m_componentType;
37 }
38
40 const std::string& propertyName() const {
41 return m_propertyName;
42 }
43
45 void setPropertyName( std::string propName ) {
46 m_propertyName = std::move(propName);
47 }
48
50 const std::string& parentName() const {
51 return m_parentName;
52 }
53
57 virtual std::string pythonPropertyClassName() const = 0;
58
63 virtual std::string pythonRepr() const = 0;
64
65 protected:
66
68 void setComponentType(const std::string& componentType) {
69 m_componentType = componentType;
70 }
71
73 void setParentName(const std::string& parent) {
74 m_parentName = parent;
75 }
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
86
94 class GAUDI_API GaudiHandleBase : public GaudiHandleInfo {
95 //
96 // Ctors etc
97 //
98 protected:
110 GaudiHandleBase( std::string myTypeAndName, std::string myComponentType,
111 std::string myParentName )
112 : GaudiHandleInfo(std::move(myComponentType),std::move(myParentName))
113 {
114 setTypeAndName(std::move(myTypeAndName));
115 }
116 public:
117 //
118 // Public member functions
119 //
121 std::string typeAndName() const {
122 return m_typeAndName;
123 }
124
126 std::string type() const;
127
129 std::string name() const;
130
132 bool empty() const {
133 return m_typeAndName.empty();
134 }
135
137 void setTypeAndName( std::string myTypeAndName );
138
140 void setName( const std::string& myName );
141
145 std::string pythonPropertyClassName() const override;
146
148 std::string messageName() const;
149
153 std::string pythonRepr() const override;
154
155 private:
156 //
157 // Data member
158 //
159 std::string m_typeAndName; // the full type and name: "type/name"
160 };
161
162
171 template< class T >
172 class GAUDI_API GaudiHandle: public GaudiHandleBase {
173 //
174 // Constructors etc.
175 //
176 protected:
177 GaudiHandle( std::string myTypeAndName, std::string myComponentType,
178 std::string myParentName )
179 : GaudiHandleBase(std::move(myTypeAndName), std::move(myComponentType), std::move(myParentName))
180 {}
181
182 public:
183
185 template< typename CT = T,
186 typename NCT = typename std::remove_const<T>::type >
187 GaudiHandle( const GaudiHandle<NCT>& other,
188 typename std::enable_if< std::is_const<CT>::value &&
189 !std::is_same<CT,NCT>::value >::type * = nullptr )
190 : GaudiHandleBase( other ) {
191 m_pObject = other.get();
192 if ( m_pObject ) nonConst(m_pObject)->addRef();
193 }
194
196 GaudiHandle( const GaudiHandle& other )
197 : GaudiHandleBase( other ) {
198 m_pObject = other.m_pObject;
199 if ( m_pObject ) nonConst(m_pObject)->addRef();
200 }
201
203 template< typename CT = T,
204 typename NCT = typename std::remove_const<T>::type >
205 typename std::enable_if< std::is_const<CT>::value && !std::is_same<CT,NCT>::value, GaudiHandle& >::type
206 operator=( const GaudiHandle<NCT>& other ) {
207 GaudiHandleBase::operator=( other );
208 // release any current tool
209 release().ignore();
210 m_pObject = other.get();
211 // update ref-counting
212 if ( m_pObject ) nonConst(m_pObject)->addRef();
213 return *this;
214 }
215
217 GaudiHandle& operator=( const GaudiHandle& other ) {
218 GaudiHandleBase::operator=( other );
219 // release any current tool
220 release().ignore();
221 m_pObject = other.m_pObject;
222 // update ref-counting
223 if ( m_pObject ) nonConst(m_pObject)->addRef();
224 return *this;
225 }
226
228 StatusCode retrieve() const { // not really const, because it updates m_pObject
229 StatusCode sc = StatusCode::SUCCESS;
230 if ( m_pObject && release().isFailure() ) { sc = StatusCode::FAILURE; }
231 if ( sc && retrieve( m_pObject ).isFailure() )
232 {
233 m_pObject = nullptr;
234 sc = StatusCode::FAILURE;
235 }
236 return sc;
237 }
238
240 StatusCode release() const { // not really const, because it updates m_pObject
241 StatusCode sc = StatusCode::SUCCESS;
242 if ( m_pObject )
243 {
244 sc = release( m_pObject );
245 m_pObject = nullptr;
246 }
247 return sc;
248 }
249
251 bool isValid() const { // not really const, because it may update m_pObject
252 return m_pObject || retrieve().isSuccess();
253 }
254
257 operator bool() const { // not really const, because it may update m_pObject
258 return isValid();
259 }
260
262 T * get() { return m_pObject; }
263
265 typename std::add_const<T>::type * get() const {
266 return m_pObject;
267 }
268
270 bool isSet() const {
271 return get();
272 }
273
274 T& operator*() {
275 assertObject();
276 return *m_pObject;
277 }
278
279 T* operator->() {
280 assertObject();
281 return m_pObject;
282 }
283
284 typename std::add_const<T>::type & operator*() const {
285 // not really const, because it may update m_pObject
286 assertObject();
287 return *m_pObject;
288 }
289
290 typename std::add_const<T>::type * operator->() const {
291 // not really const, because it may update m_pObject
292 assertObject();
293 return m_pObject;
294 }
295
297 std::string getDefaultType() {
298 return System::typeinfoName( typeid(T) );
299 }
300
301 std::string getDefaultName() {
302 const auto defName = GaudiHandleBase::type();
303 return ( defName.empty() ? getDefaultType() : defName );
304 }
305
306 protected:
307
309 virtual StatusCode retrieve( T*& ) const = 0; // not really const, because it updates m_pObject
310
313 virtual StatusCode release( T* comp ) const { // not really const, because it updates m_pObject
314 // const cast to support T being a const type
315 nonConst(comp)->release();
316 return StatusCode::SUCCESS;
317 }
318
320 template< class CLASS >
321 typename std::remove_const<CLASS>::type * nonConst( CLASS* p ) const
322 {
323 return const_cast< typename std::remove_const<CLASS>::type * >( p );
324 }
325
326 private:
327
329 void setDefaultTypeAndName() {
330 const std::string& myType = getDefaultType();
331 GaudiHandleBase::setTypeAndName(myType+'/'+myType);
332 }
333
335 void setDefaultType() {
336 GaudiHandleBase::setTypeAndName( getDefaultType() );
337 }
338
341 void assertObject() const { // not really const, because it may update m_pObject
342 if ( UNLIKELY(!isValid()) ) {
343 throw GaudiException("Failed to retrieve " + componentType() + ": " + typeAndName(),
344 componentType() + " retrieve", StatusCode::FAILURE);
345 }
346 }
347
348 private:
349
350 //
351 // Data members
352 //
353 mutable T* m_pObject = nullptr;
354
355 };
356
357
364 class GAUDI_API GaudiHandleArrayBase: public GaudiHandleInfo {
365 protected:
366 GaudiHandleArrayBase( std::string myComponentType, std::string myParentName )
367 : GaudiHandleInfo(std::move(myComponentType),std::move(myParentName))
368 {}
369 public:
370 typedef std::vector< GaudiHandleBase* > BaseHandleArray;
371 typedef std::vector< const GaudiHandleBase* > ConstBaseHandleArray;
372
375 bool setTypesAndNames( const std::vector< std::string >& myTypesAndNamesList );
376
379 const std::vector< std::string > typesAndNames() const;
380
382 const std::vector< std::string > types() const;
383
385 const std::vector< std::string > names() const;
386
389 const std::vector< std::string > getBaseInfos( std::string (GaudiHandleBase::*pMemFunc)() const ) const;
390
394 std::string pythonPropertyClassName() const override;
395
399 std::string pythonRepr() const override;
400
404 virtual bool push_back( const std::string& myHandleTypeAndName ) = 0;
405
407 virtual void clear() = 0;
408
410 virtual bool empty() const = 0;
411
414 virtual ConstBaseHandleArray getBaseArray() const = 0;
415
418 virtual BaseHandleArray getBaseArray() = 0;
419
421 virtual bool retrieved() const = 0;
422
423 };
424
425
427 template <class T>
428 class GAUDI_API GaudiHandleArray: public GaudiHandleArrayBase {
429 public:
430 //
431 // public nested types
432 //
433 typedef std::vector< T > HandleVector;
434 typedef typename HandleVector::value_type value_type;
435 typedef typename HandleVector::size_type size_type;
436 typedef typename HandleVector::reference reference;
437 typedef typename HandleVector::const_reference const_reference;
438 typedef typename HandleVector::iterator iterator;
439 typedef typename HandleVector::const_iterator const_iterator;
440 typedef typename HandleVector::reverse_iterator reverse_iterator;
441 typedef typename HandleVector::const_reverse_iterator const_reverse_iterator;
442
443 protected:
444 //
445 // Constructors
446 //
451 GaudiHandleArray( const std::vector< std::string >& myTypesAndNamesList,
452 std::string myComponentType, std::string myParentName )
453 : GaudiHandleArrayBase(std::move(myComponentType),std::move(myParentName))
454 {
455 setTypesAndNames( myTypesAndNamesList );
456 }
457
462 GaudiHandleArray( const std::string& myComponentType, const std::string& myParentName )
463 : GaudiHandleArrayBase(myComponentType,myParentName)
464 {}
465
466 public:
467 virtual ~GaudiHandleArray() = default;
468
470 GaudiHandleArray& operator=( const std::vector< std::string >& myTypesAndNamesList ) {
471 setTypesAndNames( myTypesAndNamesList );
472 return *this;
473 }
474
475 GaudiHandleArrayBase::BaseHandleArray getBaseArray() override {
476 GaudiHandleArrayBase::BaseHandleArray baseArray;
477 iterator it = begin(), itEnd = end();
478 for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
479 return baseArray;
480 }
481
482 GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray() const override {
483 GaudiHandleArrayBase::ConstBaseHandleArray baseArray;
484 const_iterator it = begin(), itEnd = end();
485 for ( ; it != itEnd; ++it ) baseArray.push_back( &*it );
486 return baseArray;
487 }
488
489 //
490 // Simulate (part of) an std::vector
491 //
492 iterator begin() {
493 return m_handleArray.begin();
494 }
495
496 iterator end() {
497 return m_handleArray.end();
498 }
499
500 const_iterator begin() const {
501 return m_handleArray.begin();
502 }
503
504 const_iterator end() const {
505 return m_handleArray.end();
506 }
507
508 const_iterator rbegin() const {
509 return m_handleArray.rbegin();
510 }
511
512 const_iterator rend() const {
513 return m_handleArray.rend();
514 }
515
516 size_type size() const {
517 return m_handleArray.size();
518 }
519
520 void clear() override {
521 m_handleArray.clear();
522 }
523
524 bool empty() const override {
525 return m_handleArray.empty();
526 }
527
528 T& operator[]( int index ) {
529 return m_handleArray[index];
530 }
531
532 const T& operator[]( int index ) const {
533 return m_handleArray[index];
534 }
535
537 T* operator[]( const std::string& name ) {
538 auto it = std::find_if(begin(),end(),[&](const_reference r) {
539 return r.name() == name;
540 } );
541 return it != end() ? &*it : nullptr;
542 }
543
545 const T* operator[]( const std::string& name ) const {
546 auto it = std::find_if(begin(),end(),[&](const_reference r) {
547 return r.name() == name;
548 } );
549 return it != end() ? &*it : nullptr;
550 }
551
554 using GaudiHandleArrayBase::push_back; // avoid compiler warning
555 virtual bool push_back( const T& myHandle ) {
556 m_handleArray.push_back( myHandle );
557 return true;
558 }
559
561 StatusCode retrieve()
562 {
563 StatusCode sc = StatusCode::SUCCESS;
564 for ( auto& i : *this )
565 {
566 // stop at first failure
567 if ( i.retrieve().isFailure() ) { sc = StatusCode::FAILURE; break; }
568 }
569 if ( sc ) { m_retrieved = true; }
570 return sc;
571 }
572
574 StatusCode release() {
575 StatusCode sc = StatusCode::SUCCESS;
576 for (auto& i : *this ) {
577 // continue trying to release other tools even if we fail...
578 if ( i.release().isFailure() ) sc = StatusCode::FAILURE;
579 }
580 return sc;
581 }
582
584 virtual bool retrieved() const override { return m_retrieved; }
585
586 private:
587 //
588 // Private data members
589 //
590 HandleVector m_handleArray;
591 bool m_retrieved { false };
592 };
593
594 // Easy printing out of Handles and HandleArrays
595 // It prints <propertyName> = <HandleType>( <HandleType(s)AndName(s)> )
596 std::ostream& operator<<( std::ostream& os, const GaudiHandleInfo& handle );
597
598 #endif // ! GAUDIKERNEL_GAUDIHANDLE_H
System.h
GaudiHandle::operator=
GaudiHandle & operator=(const GaudiHandle &other)
Assignment operator for correct ref-counting.
Definition: GaudiHandle.h:217
GaudiHandleArray::const_reference
HandleVector::const_reference const_reference
Definition: GaudiHandle.h:437
GaudiHandleArray::value_type
HandleVector::value_type value_type
Definition: GaudiHandle.h:434
StatusCode::SUCCESS
Definition: StatusCode.h:30
GaudiHandle
Handle to be used in lieu of naked pointers to gaudis.
Definition: GaudiHandle.h:172
GaudiHandleArray::clear
void clear() override
Clear the list of handles.
Definition: GaudiHandle.h:520
GaudiHandle::getDefaultType
std::string getDefaultType()
Helper function to get default type string from the class type.
Definition: GaudiHandle.h:297
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
GaudiHandle::nonConst
std::remove_const< CLASS >::type * nonConst(CLASS *p) const
Cast a pointer to a non const type.
Definition: GaudiHandle.h:321
GaudiHandleArray::iterator
HandleVector::iterator iterator
Definition: GaudiHandle.h:438
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiHandle::m_pObject
T * m_pObject
Definition: GaudiHandle.h:353
StatusCode::FAILURE
Definition: StatusCode.h:29
GaudiHandleArray::getBaseArray
GaudiHandleArrayBase::BaseHandleArray getBaseArray() override
Get a read-write vector of GaudiHandleBase* pointing to the real handles.
Definition: GaudiHandle.h:475
GaudiHandleBase::setTypeAndName
void setTypeAndName(std::string myTypeAndName)
The component "type/name" string.
Definition: GaudiHandle.cpp:9
GaudiHandleArrayBase::ConstBaseHandleArray
std::vector< const GaudiHandleBase * > ConstBaseHandleArray
Definition: GaudiHandle.h:371
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
GaudiHandleArray::getBaseArray
GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray() const override
Get a read-only vector of const GaudiHandleBase* pointing to the real handles.
Definition: GaudiHandle.h:482
GaudiHandleArray::rend
const_iterator rend() const
Definition: GaudiHandle.h:512
GaudiHandleArray::const_reverse_iterator
HandleVector::const_reverse_iterator const_reverse_iterator
Definition: GaudiHandle.h:441
GaudiHandleInfo::setComponentType
void setComponentType(const std::string &componentType)
The component type.
Definition: GaudiHandle.h:68
std::is_same
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
GaudiHandle::getDefaultName
std::string getDefaultName()
Definition: GaudiHandle.h:301
std
STL namespace.
GaudiHandle::operator*
T & operator*()
Definition: GaudiHandle.h:274
GaudiHandle::GaudiHandle
GaudiHandle(std::string myTypeAndName, std::string myComponentType, std::string myParentName)
Definition: GaudiHandle.h:177
GaudiHandleInfo::parentName
const std::string & parentName() const
The name of the parent.
Definition: GaudiHandle.h:50
GaudiHandle::setDefaultType
void setDefaultType()
Helper function to set default type from the class type T.
Definition: GaudiHandle.h:335
GaudiHandle::assertObject
void assertObject() const
Load the pointer to the component.
Definition: GaudiHandle.h:341
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:584
GaudiHandleInfo::pythonPropertyClassName
virtual std::string pythonPropertyClassName() const =0
The python class name for the property in the genconf-generated configurables.
GaudiHandleArray::GaudiHandleArray
GaudiHandleArray(const std::vector< std::string > &myTypesAndNamesList, std::string myComponentType, std::string myParentName)
Generic constructor.
Definition: GaudiHandle.h:451
GaudiHandleArray::size_type
HandleVector::size_type size_type
Definition: GaudiHandle.h:435
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:470
GaudiHandleArray::reference
HandleVector::reference reference
Definition: GaudiHandle.h:436
GaudiHandleArray::push_back
virtual bool push_back(const T &myHandle)
Definition: GaudiHandle.h:555
GaudiHandleInfo::setParentName
void setParentName(const std::string &parent)
The name of the parent.
Definition: GaudiHandle.h:73
GaudiHandle::release
StatusCode release() const
Release the component.
Definition: GaudiHandle.h:240
Gaudi::Functional::details::details2::push_back
void push_back(Container &c, const Value &v, std::true_type)
Definition: FunctionalDetails.h:154
std::enable_if
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:48
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
GaudiHandle::operator->
std::add_const< T >::type * operator->() const
Definition: GaudiHandle.h:290
std::vector::push_back
T push_back(T...args)
GaudiHandle::setDefaultTypeAndName
void setDefaultTypeAndName()
Helper function to set default name and type.
Definition: GaudiHandle.h:329
GaudiHandleArray::operator[]
const T & operator[](int index) const
Definition: GaudiHandle.h:532
GaudiHandleInfo::propertyName
const std::string & propertyName() const
name as used in declareProperty(name,gaudiHandle)
Definition: GaudiHandle.h:40
GaudiHandleArray::m_handleArray
HandleVector m_handleArray
Definition: GaudiHandle.h:590
GaudiHandleArray::retrieve
StatusCode retrieve()
Retrieve all tools.
Definition: GaudiHandle.h:561
GaudiHandleArrayBase::BaseHandleArray
std::vector< GaudiHandleBase * > BaseHandleArray
Definition: GaudiHandle.h:370
GaudiHandleArray::begin
const_iterator begin() const
Definition: GaudiHandle.h:500
GaudiHandle::operator*
std::add_const< T >::type & operator*() const
Definition: GaudiHandle.h:284
GaudiHandleArray::begin
iterator begin()
Definition: GaudiHandle.h:492
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:63
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiException.h
gaudirun.type
type
Definition: gaudirun.py:125
GaudiHandle::get
T * get()
Return the wrapped pointer, not calling retrieve() if null.
Definition: GaudiHandle.h:262
GaudiHandle::retrieve
StatusCode retrieve() const
Retrieve the component.
Definition: GaudiHandle.h:228
GaudiHandleBase::m_typeAndName
std::string m_typeAndName
Definition: GaudiHandle.h:159
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:50
std::move
T move(T...args)
GaudiHandleArray::empty
bool empty() const override
Return whether the list of tools is empty.
Definition: GaudiHandle.h:524
std::add_const
GaudiHandle::operator->
T * operator->()
Definition: GaudiHandle.h:279
std::is_const
std::find_if
T find_if(T...args)
GaudiHandleArray::const_iterator
HandleVector::const_iterator const_iterator
Definition: GaudiHandle.h:439
GaudiHandle::isValid
bool isValid() const
Check if the handle is valid (try to retrive the object is not done yet).
Definition: GaudiHandle.h:251
GaudiHandleArrayBase
Base class of array&#39;s of various gaudihandles.
Definition: GaudiHandle.h:364
GaudiHandleArray::rbegin
const_iterator rbegin() const
Definition: GaudiHandle.h:508
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:26
GaudiHandleInfo::setPropertyName
void setPropertyName(std::string propName)
set name as used in declareProperty(name,gaudiHandle).
Definition: GaudiHandle.h:45
GaudiHandle::isSet
bool isSet() const
True if the wrapped pointer is not null.
Definition: GaudiHandle.h:270
GaudiHandleArray::reverse_iterator
HandleVector::reverse_iterator reverse_iterator
Definition: GaudiHandle.h:440
GaudiHandleArrayBase::push_back
virtual bool push_back(const std::string &myHandleTypeAndName)=0
Add a handle to the array with "type/name" given in <myHandleTypeAndName>.
GaudiHandle::release
virtual StatusCode release(T *comp) const
Release the component.
Definition: GaudiHandle.h:313
GaudiHandleBase::type
std::string type() const
The concrete component class name: the part before the &#39;/&#39;.
Definition: GaudiHandle.cpp:13
operator<<
std::ostream & operator<<(std::ostream &os, const GaudiHandleInfo &handle)
Definition: GaudiHandle.cpp:108
GaudiHandleArray::end
iterator end()
Definition: GaudiHandle.h:496
GaudiHandleArray::operator[]
T & operator[](int index)
Definition: GaudiHandle.h:528
GaudiHandleArray::size
size_type size() const
Definition: GaudiHandle.h:516
GaudiHandleArray::operator[]
const T * operator[](const std::string &name) const
Get const pointer (!) to ToolHandle by instance name.
Definition: GaudiHandle.h:545
GaudiHandleArray::end
const_iterator end() const
Definition: GaudiHandle.h:504
GaudiHandleBase
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:94
std::remove_const
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:366
GaudiHandleArray::operator[]
T * operator[](const std::string &name)
Get pointer (!) to ToolHandle by instance name.
Definition: GaudiHandle.h:537
GaudiHandleInfo::pythonRepr
virtual std::string pythonRepr() const =0
Python representation of handle, i.e.
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:187
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:206
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
IInterface.h
std::ostream
STL class.
GaudiHandleInfo::componentType
const std::string & componentType() const
Definition: GaudiHandle.h:35
GaudiHandleArray::HandleVector
std::vector< T > HandleVector
Definition: GaudiHandle.h:433
Objects::reference
TO * reference(FROM *from)
Definition: KeyedObject.cpp:20
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:196
GaudiHandleBase::empty
bool empty() const
Check if the handle has been set to empty string (i.e.
Definition: GaudiHandle.h:132
GaudiHandleArray
T is the concrete handle type, e.g.
Definition: GaudiHandle.h:428
GaudiHandleInfo::m_parentName
std::string m_parentName
Definition: GaudiHandle.h:83
GaudiHandleArray::release
StatusCode release()
Release all tools.
Definition: GaudiHandle.h:574
GaudiHandleArray::GaudiHandleArray
GaudiHandleArray(const std::string &myComponentType, const std::string &myParentName)
Constructor creating an empty array.
Definition: GaudiHandle.h:462
GaudiHandleInfo
Definition: GaudiHandle.h:16