The Gaudi Framework  v30r3 (a5ef0a68)
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 (const DataObjID &key) const
 
virtual void updateKey (const 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 28 of file DataHandle.h.

Member Enumeration Documentation

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

Definition at line 31 of file DataHandle.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file DataHandle.h.

34  : m_key( k ), m_owner( owner ), m_mode( a ){};
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable...
Definition: DataHandle.h:67
IDataHandleHolder * m_owner
Definition: DataHandle.h:68
Gaudi::DataHandle::DataHandle ( const DataObjID k,
const bool &  isCond,
Mode  a = Reader,
IDataHandleHolder owner = nullptr 
)
inline

Definition at line 36 of file DataHandle.h.

37  : m_key( k ), m_owner( owner ), m_mode( a ), m_isCond( isCond ){};
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable...
Definition: DataHandle.h:67
IDataHandleHolder * m_owner
Definition: DataHandle.h:68
virtual Gaudi::DataHandle::~DataHandle ( )
virtualdefault

Member Function Documentation

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

Definition at line 50 of file DataHandle.h.

50 { 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:67
virtual bool Gaudi::DataHandle::init ( )
inlinevirtual

Reimplemented in DataObjectHandleBase.

Definition at line 55 of file DataHandle.h.

55 { return true; }
virtual bool Gaudi::DataHandle::isCondition ( ) const
inlinevirtual

Definition at line 58 of file DataHandle.h.

58 { return m_isCond; }
virtual Mode Gaudi::DataHandle::mode ( ) const
inlinevirtual

Definition at line 44 of file DataHandle.h.

44 { return m_mode; }
virtual const std::string& Gaudi::DataHandle::objKey ( ) const
inlinevirtual

Definition at line 49 of file DataHandle.h.

49 { 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:67
const std::string & key() const
Definition: DataObjID.h:49
virtual IDataHandleHolder* Gaudi::DataHandle::owner ( ) const
inlinevirtual

Definition at line 42 of file DataHandle.h.

42 { return m_owner; }
IDataHandleHolder * m_owner
Definition: DataHandle.h:68
std::string Gaudi::DataHandle::pythonRepr ( ) const
virtual

Reimplemented in DataObjectHandleBase.

Definition at line 10 of file DataHandle.cpp.

11  {
13  ost << "DataHandle(\"" << fullKey() << "||" << std::to_string( mode() ) << "\")";
14  return ost.str();
15  }
virtual Mode mode() const
Definition: DataHandle.h:44
T to_string(T...args)
virtual const DataObjID & fullKey() const
Definition: DataHandle.h:50
virtual void Gaudi::DataHandle::reset ( bool  )
inlinevirtual

Definition at line 52 of file DataHandle.h.

52 {};
virtual void Gaudi::DataHandle::setKey ( const DataObjID key) const
inlinevirtual

Definition at line 46 of file DataHandle.h.

46 { 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:67
virtual void Gaudi::DataHandle::setOwner ( IDataHandleHolder o)
inlinevirtual

Definition at line 41 of file DataHandle.h.

41 { m_owner = o; }
IDataHandleHolder * m_owner
Definition: DataHandle.h:68
virtual void Gaudi::DataHandle::updateKey ( const std::string key) const
inlinevirtual

Definition at line 47 of file DataHandle.h.

47 { m_key.updateKey( key ); }
void updateKey(const std::string &key)
Definition: DataObjID.h:96
DataObjID m_key
The key of the object behind this DataHandle Although it may look strange to have it mutable...
Definition: DataHandle.h:67

Member Data Documentation

bool Gaudi::DataHandle::m_isCond = false
private

Definition at line 72 of file DataHandle.h.

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 67 of file DataHandle.h.

Mode Gaudi::DataHandle::m_mode = Reader
private

Definition at line 71 of file DataHandle.h.

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

Definition at line 68 of file DataHandle.h.


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