The Gaudi Framework  v30r3 (a5ef0a68)
DataHandleHolderBase< BASE > Class Template Reference

#include <GaudiKernel/DataHandleHolderBase.h>

Inheritance diagram for DataHandleHolderBase< BASE >:
Collaboration diagram for DataHandleHolderBase< BASE >:

Public Member Functions

std::vector< Gaudi::DataHandle * > inputHandles () const override
 
std::vector< Gaudi::DataHandle * > outputHandles () const override
 
virtual const DataObjIDCollextraInputDeps () const override
 
virtual const DataObjIDCollextraOutputDeps () const override
 
void declare (Gaudi::DataHandle &handle) override
 
void renounce (Gaudi::DataHandle &handle) override
 
const DataObjIDCollinputDataObjs () const override
 
const DataObjIDColloutputDataObjs () 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::stringgetInterfaceNames () 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< DataObjIDCollm_extInputDataObjs {this, "ExtraInputs", DataObjIDColl{}}
 
Gaudi::Property< DataObjIDCollm_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 26 of file DataHandleHolderBase.h.

Member Function Documentation

template<class BASE>
void DataHandleHolderBase< BASE >::addDependency ( const DataObjID id,
const Gaudi::DataHandle::Mode mode 
)
inlineoverride
template<class BASE>
void DataHandleHolderBase< BASE >::declare ( Gaudi::DataHandle handle)
inlineoverride

Definition at line 43 of file DataHandleHolderBase.h.

44  {
45  if ( !handle.owner() ) handle.setOwner( this );
46 
47  if ( handle.owner() != this ) {
48  throw GaudiException( "Attempt to declare foreign handle with algorithm!", this->name(), StatusCode::FAILURE );
49  }
50 
51  m_handles.insert( &handle );
52  }
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
virtual void setOwner(IDataHandleHolder *o)
Definition: DataHandle.h:41
T insert(T...args)
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:42
std::unordered_set< Gaudi::DataHandle * > m_handles
template<class BASE>
virtual const DataObjIDColl& DataHandleHolderBase< BASE >::extraInputDeps ( ) const
inlineoverridevirtual

Definition at line 40 of file DataHandleHolderBase.h.

40 { return m_extInputDataObjs; }
Gaudi::Property< DataObjIDColl > m_extInputDataObjs
template<class BASE>
virtual const DataObjIDColl& DataHandleHolderBase< BASE >::extraOutputDeps ( ) const
inlineoverridevirtual

Definition at line 41 of file DataHandleHolderBase.h.

41 { return m_extOutputDataObjs; }
Gaudi::Property< DataObjIDColl > m_extOutputDataObjs
template<class BASE>
void DataHandleHolderBase< BASE >::initDataHandleHolder ( )
inlineprotected

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

Definition at line 75 of file DataHandleHolderBase.h.

76  {
77  for ( auto h : m_handles ) h->init();
78  }
std::unordered_set< Gaudi::DataHandle * > m_handles
template<class BASE>
const DataObjIDColl& DataHandleHolderBase< BASE >::inputDataObjs ( ) const
inlineoverride

Definition at line 62 of file DataHandleHolderBase.h.

62 { return m_inputDataObjs; }
template<class BASE>
std::vector<Gaudi::DataHandle*> DataHandleHolderBase< BASE >::inputHandles ( ) const
inlineoverride

Definition at line 31 of file DataHandleHolderBase.h.

32  {
33  return handles( m_handles, Gaudi::DataHandle::Reader );
34  }
std::unordered_set< Gaudi::DataHandle * > m_handles
template<class BASE>
const DataObjIDColl& DataHandleHolderBase< BASE >::outputDataObjs ( ) const
inlineoverride

Definition at line 63 of file DataHandleHolderBase.h.

63 { return m_outputDataObjs; }
DataObjIDColl m_outputDataObjs
template<class BASE>
std::vector<Gaudi::DataHandle*> DataHandleHolderBase< BASE >::outputHandles ( ) const
inlineoverride

Definition at line 35 of file DataHandleHolderBase.h.

36  {
37  return handles( m_handles, Gaudi::DataHandle::Writer );
38  }
std::unordered_set< Gaudi::DataHandle * > m_handles
template<class BASE>
void DataHandleHolderBase< BASE >::renounce ( Gaudi::DataHandle handle)
inlineoverride

Definition at line 54 of file DataHandleHolderBase.h.

55  {
56  if ( handle.owner() != this ) {
57  throw GaudiException( "Attempt to renounce foreign handle with algorithm!", this->name(), StatusCode::FAILURE );
58  }
59  m_handles.erase( &handle );
60  }
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
T erase(T...args)
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:42
std::unordered_set< Gaudi::DataHandle * > m_handles

Member Data Documentation

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

Definition at line 85 of file DataHandleHolderBase.h.

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

Definition at line 86 of file DataHandleHolderBase.h.

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

Definition at line 83 of file DataHandleHolderBase.h.

template<class BASE>
DataObjIDColl DataHandleHolderBase< BASE >::m_inputDataObjs
protected

Definition at line 80 of file DataHandleHolderBase.h.

template<class BASE>
DataObjIDColl DataHandleHolderBase< BASE >::m_outputDataObjs
protected

Definition at line 80 of file DataHandleHolderBase.h.


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