| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
DataHandleHolderBase< BASE > Class Template Reference

`#include <GaudiKernel/DataHandleHolderBase.h>`

Inheritance diagram for DataHandleHolderBase< BASE >:
[legend]
Collaboration diagram for DataHandleHolderBase< BASE >:
[legend]

## Public Member Functions
std::vector< Gaudi::DataHandle * > | inputHandles () const override
std::vector< Gaudi::DataHandle * > | outputHandles () const override
virtual const DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
void | declare (Gaudi::DataHandle &handle) override
void | renounce (Gaudi::DataHandle &handle) override
const DataObjIDColl & | inputDataObjs () const override
const DataObjIDColl & | outputDataObjs () const override
void | addDependency (const DataObjID &id, const Gaudi::DataHandle::Mode &mode) override
Public Member Functions inherited from extends< BASE, IDataHandleHolder >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...

## Protected Member Functions
void | initDataHandleHolder ()
| initializes all handles - called by the sysInitialize method of any descendant of this More...

## Protected Attributes
DataObjIDColl | m_inputDataObjs
DataObjIDColl | m_outputDataObjs

## Private Attributes
std::unordered_set< Gaudi::DataHandle * > | m_handles
Gaudi::Property< DataObjIDColl > | m_extInputDataObjs {this, "ExtraInputs", DataObjIDColl{}}
Gaudi::Property< DataObjIDColl > | m_extOutputDataObjs {this, "ExtraOutputs", DataObjIDColl{}}

## Additional Inherited Members
Public Types inherited from extends< BASE, IDataHandleHolder >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Detailed Description

### template<class BASE>
class DataHandleHolderBase< BASE >

Definition at line 24 of file DataHandleHolderBase.h.

## Member Function Documentation

## ◆ addDependency()

template<class BASE>

void DataHandleHolderBase< BASE >::addDependency | ( | const DataObjID & | id,
|  | const Gaudi::DataHandle::Mode & | mode
| ) |  |
| inline override

Definition at line 58 of file DataHandleHolderBase.h.

58 {
59 if ( mode & Gaudi::DataHandle::Reader ) m_inputDataObjs.emplace( id );
60 if ( mode & Gaudi::DataHandle::Writer ) m_outputDataObjs.emplace( id );
61 }
Gaudi::DataHandle::Reader
Definition: DataHandle.h:29
DataHandleHolderBase::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:71
std::unordered_set::emplace
T emplace(T... args)
Gaudi::DataHandle::Writer
Definition: DataHandle.h:29
DataHandleHolderBase::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:71

## ◆ declare()

template<class BASE>

void DataHandleHolderBase< BASE >::declare | ( | Gaudi::DataHandle & | handle | ) |
| inline override

Definition at line 38 of file DataHandleHolderBase.h.

38 {
39 if ( !handle.owner() ) handle.setOwner( this );
40
41 if ( handle.owner() != this ) {
42 throw GaudiException( "Attempt to declare foreign handle with algorithm!", this->name(), StatusCode::FAILURE );
43 }
44
45 m_handles.insert( &handle );
46 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
Gaudi::DataHandle::setOwner
virtual void setOwner(IDataHandleHolder *o)
Definition: DataHandle.h:39
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::DataHandle::owner
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:40
std::unordered_set::insert
T insert(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
DataHandleHolderBase::m_handles
std::unordered_set< Gaudi::DataHandle * > m_handles
Definition: DataHandleHolderBase.h:74

## ◆ extraInputDeps()

template<class BASE>

virtual const DataObjIDColl& DataHandleHolderBase< BASE >::extraInputDeps | ( |  | ) | const
| inline override virtual

Definition at line 35 of file DataHandleHolderBase.h.

35 { return m_extInputDataObjs; }
DataHandleHolderBase::m_extInputDataObjs
Gaudi::Property< DataObjIDColl > m_extInputDataObjs
Definition: DataHandleHolderBase.h:76

## ◆ extraOutputDeps()

template<class BASE>

virtual const DataObjIDColl& DataHandleHolderBase< BASE >::extraOutputDeps | ( |  | ) | const
| inline override virtual

Definition at line 36 of file DataHandleHolderBase.h.

36 { return m_extOutputDataObjs; }
DataHandleHolderBase::m_extOutputDataObjs
Gaudi::Property< DataObjIDColl > m_extOutputDataObjs
Definition: DataHandleHolderBase.h:77

## ◆ initDataHandleHolder()

template<class BASE>

void DataHandleHolderBase< BASE >::initDataHandleHolder | ( |  | ) |
| inline protected

initializes all handles - called by the sysInitialize method of any descendant of this

Definition at line 67 of file DataHandleHolderBase.h.

67 {
68 for ( auto h : m_handles ) h->init();
69 }
DataHandleHolderBase::m_handles
std::unordered_set< Gaudi::DataHandle * > m_handles
Definition: DataHandleHolderBase.h:74

## ◆ inputDataObjs()

template<class BASE>

const DataObjIDColl& DataHandleHolderBase< BASE >::inputDataObjs | ( |  | ) | const
| inline override

Definition at line 55 of file DataHandleHolderBase.h.

55 { return m_inputDataObjs; }
DataHandleHolderBase::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:71

## ◆ inputHandles()

template<class BASE>

std::vector<Gaudi::DataHandle*> DataHandleHolderBase< BASE >::inputHandles | ( |  | ) | const
| inline override

Definition at line 28 of file DataHandleHolderBase.h.

28 {
29 return handles( m_handles, Gaudi::DataHandle::Reader );
30 }
Gaudi::DataHandle::Reader
Definition: DataHandle.h:29
DataHandleHolderBase::m_handles
std::unordered_set< Gaudi::DataHandle * > m_handles
Definition: DataHandleHolderBase.h:74

## ◆ outputDataObjs()

template<class BASE>

const DataObjIDColl& DataHandleHolderBase< BASE >::outputDataObjs | ( |  | ) | const
| inline override

Definition at line 56 of file DataHandleHolderBase.h.

56 { return m_outputDataObjs; }
DataHandleHolderBase::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:71

## ◆ outputHandles()

template<class BASE>

std::vector<Gaudi::DataHandle*> DataHandleHolderBase< BASE >::outputHandles | ( |  | ) | const
| inline override

Definition at line 31 of file DataHandleHolderBase.h.

31 {
32 return handles( m_handles, Gaudi::DataHandle::Writer );
33 }
Gaudi::DataHandle::Writer
Definition: DataHandle.h:29
DataHandleHolderBase::m_handles
std::unordered_set< Gaudi::DataHandle * > m_handles
Definition: DataHandleHolderBase.h:74

## ◆ renounce()

template<class BASE>

void DataHandleHolderBase< BASE >::renounce | ( | Gaudi::DataHandle & | handle | ) |
| inline override

Definition at line 48 of file DataHandleHolderBase.h.

48 {
49 if ( handle.owner() != this ) {
50 throw GaudiException( "Attempt to renounce foreign handle with algorithm!", this->name(), StatusCode::FAILURE );
51 }
52 m_handles.erase( &handle );
53 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::DataHandle::owner
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:40
std::unordered_set::erase
T erase(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
DataHandleHolderBase::m_handles
std::unordered_set< Gaudi::DataHandle * > m_handles
Definition: DataHandleHolderBase.h:74

## Member Data Documentation

## ◆ m_extInputDataObjs

template<class BASE>

Gaudi::Property<DataObjIDColl> DataHandleHolderBase< BASE >::m_extInputDataObjs {this, "ExtraInputs", DataObjIDColl{}}
| private

Definition at line 76 of file DataHandleHolderBase.h.

## ◆ m_extOutputDataObjs

template<class BASE>

Gaudi::Property<DataObjIDColl> DataHandleHolderBase< BASE >::m_extOutputDataObjs {this, "ExtraOutputs", DataObjIDColl{}}
| private

Definition at line 77 of file DataHandleHolderBase.h.

## ◆ m_handles

template<class BASE>

std::unordered_set<Gaudi::DataHandle*> DataHandleHolderBase< BASE >::m_handles
| private

Definition at line 74 of file DataHandleHolderBase.h.

## ◆ m_inputDataObjs

template<class BASE>

DataObjIDColl DataHandleHolderBase< BASE >::m_inputDataObjs
| protected

Definition at line 71 of file DataHandleHolderBase.h.

## ◆ m_outputDataObjs

template<class BASE>

DataObjIDColl DataHandleHolderBase< BASE >::m_outputDataObjs
| protected

Definition at line 71 of file DataHandleHolderBase.h.

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

- GaudiKernel/GaudiKernel/DataHandleHolderBase.h