The Gaudi Framework  v33r1 (b1225454)
Gaudi::DataHandle Class Reference

#include <GaudiKernel/DataHandle.h>

Inheritance diagram for Gaudi::DataHandle:
Collaboration diagram for Gaudi::DataHandle:

Public Types

enum  Mode { Reader = 1 << 2, Writer = 1 << 4, Updater = Reader | Writer }
 

Public Member Functions

 DataHandle (const DataObjID &k, Mode a=Reader, IDataHandleHolder *owner=nullptr)
 
 DataHandle (const DataObjID &k, const bool &isCond, Mode a=Reader, IDataHandleHolder *owner=nullptr)
 
virtual ~DataHandle ()=default
 
virtual void setOwner (IDataHandleHolder *o)
 
virtual IDataHandleHolderowner () const
 
virtual Mode mode () const
 
virtual void setKey (DataObjID key) const
 
virtual void updateKey (std::string key) const
 
virtual const std::stringobjKey () const
 
virtual const DataObjIDfullKey () const
 
virtual void reset (bool)
 
virtual std::string pythonRepr () const
 
virtual bool init ()
 
virtual bool isCondition () const
 

Protected Attributes

DataObjID m_key = {"NONE"}
 The key of the object behind this DataHandle Although it may look strange to have it mutable, this can actually change in case the object had alternative names, and it should not be visible to the end user, for which the Handle is still the same. More...
 
IDataHandleHolderm_owner = nullptr
 

Private Attributes

Mode m_mode = Reader
 
bool m_isCond = false
 

Detailed Description

Definition at line 37 of file DataHandle.h.

Member Enumeration Documentation

◆ Mode

enum Gaudi::DataHandle::Mode
Enumerator
Reader 
Writer 
Updater 

Definition at line 39 of file DataHandle.h.

Constructor & Destructor Documentation

◆ DataHandle() [1/2]

Gaudi::DataHandle::DataHandle ( const DataObjID k,
Mode  a = Reader,
IDataHandleHolder owner = nullptr 
)
inline

Definition at line 41 of file DataHandle.h.

42  : m_key( k ), m_owner( owner ), m_mode( a ){};
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:50
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75
IDataHandleHolder * m_owner
Definition: DataHandle.h:76

◆ DataHandle() [2/2]

Gaudi::DataHandle::DataHandle ( const DataObjID k,
const bool &  isCond,
Mode  a = Reader,
IDataHandleHolder owner = nullptr 
)
inline

Definition at line 44 of file DataHandle.h.

45  : m_key( k ), m_owner( owner ), m_mode( a ), m_isCond( isCond ){};
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:50
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75
IDataHandleHolder * m_owner
Definition: DataHandle.h:76

◆ ~DataHandle()

virtual Gaudi::DataHandle::~DataHandle ( )
virtualdefault

Member Function Documentation

◆ fullKey()

virtual const DataObjID& Gaudi::DataHandle::fullKey ( ) const
inlinevirtual

Definition at line 58 of file DataHandle.h.

58 { return m_key; }
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75

◆ init()

virtual bool Gaudi::DataHandle::init ( )
inlinevirtual

Reimplemented in DataObjectHandleBase.

Definition at line 63 of file DataHandle.h.

63 { return true; }

◆ isCondition()

virtual bool Gaudi::DataHandle::isCondition ( ) const
inlinevirtual

Definition at line 66 of file DataHandle.h.

66 { return m_isCond; }

◆ mode()

virtual Mode Gaudi::DataHandle::mode ( ) const
inlinevirtual

Definition at line 52 of file DataHandle.h.

52 { return m_mode; }

◆ objKey()

virtual const std::string& Gaudi::DataHandle::objKey ( ) const
inlinevirtual

Definition at line 57 of file DataHandle.h.

57 { return m_key.key(); }
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75
const std::string & key() const
Definition: DataObjID.h:58

◆ owner()

virtual IDataHandleHolder* Gaudi::DataHandle::owner ( ) const
inlinevirtual

Definition at line 50 of file DataHandle.h.

50 { return m_owner; }
IDataHandleHolder * m_owner
Definition: DataHandle.h:76

◆ pythonRepr()

std::string Gaudi::DataHandle::pythonRepr ( ) const
virtual

Reimplemented in DataObjectHandle< AnyDataWrapper< T > >, DataObjectHandle< Gaudi::NamedRange_< T > >, DataObjectHandle< Gaudi::Range_< T > >, DataObjectHandle< T >, DataObjectHandle<::details::Payload_t< T > >, DataObjectHandle< DataObject >, and DataObjectHandleBase.

Definition at line 19 of file DataHandle.cpp.

19  {
21  ost << "DataHandle(\"" << fullKey() << "||" << std::to_string( mode() ) << "\")";
22  return ost.str();
23  }
virtual Mode mode() const
Definition: DataHandle.h:52
T to_string(T... args)
virtual const DataObjID & fullKey() const
Definition: DataHandle.h:58
T str(T... args)

◆ reset()

virtual void Gaudi::DataHandle::reset ( bool  )
inlinevirtual

Definition at line 60 of file DataHandle.h.

60 {};

◆ setKey()

virtual void Gaudi::DataHandle::setKey ( DataObjID  key) const
inlinevirtual

Definition at line 54 of file DataHandle.h.

54 { m_key = std::move( key ); }
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75
T move(T... args)

◆ setOwner()

virtual void Gaudi::DataHandle::setOwner ( IDataHandleHolder o)
inlinevirtual

Definition at line 49 of file DataHandle.h.

49 { m_owner = o; }
IDataHandleHolder * m_owner
Definition: DataHandle.h:76

◆ updateKey()

virtual void Gaudi::DataHandle::updateKey ( std::string  key) const
inlinevirtual

Definition at line 55 of file DataHandle.h.

55 { m_key.updateKey( std::move( key ) ); }
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable,...
Definition: DataHandle.h:75
T move(T... args)
void updateKey(std::string key)
Definition: DataObjID.h:103

Member Data Documentation

◆ m_isCond

bool Gaudi::DataHandle::m_isCond = false
private

Definition at line 80 of file DataHandle.h.

◆ m_key

DataObjID Gaudi::DataHandle::m_key = {"NONE"}
mutableprotected

The key of the object behind this DataHandle Although it may look strange to have it mutable, this can actually change in case the object had alternative names, and it should not be visible to the end user, for which the Handle is still the same.

Definition at line 75 of file DataHandle.h.

◆ m_mode

Mode Gaudi::DataHandle::m_mode = Reader
private

Definition at line 79 of file DataHandle.h.

◆ m_owner

IDataHandleHolder* Gaudi::DataHandle::m_owner = nullptr
protected

Definition at line 76 of file DataHandle.h.


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