| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
Gaudi::DataHandle Class Reference

`#include <GaudiKernel/DataHandle.h>`

Inheritance diagram for Gaudi::DataHandle:
[legend]
Collaboration diagram for Gaudi::DataHandle:
[legend]

## 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 IDataHandleHolder * | owner () const
virtual Mode | mode () const
virtual void | setKey (const DataObjID &key) const
virtual void | updateKey (const std::string &key) const
virtual const std::string & | objKey () const
virtual const DataObjID & | fullKey () 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...
IDataHandleHolder * | m_owner = nullptr

## Private Attributes
Mode | m_mode = Reader
bool | m_isCond = false

## Detailed Description

Definition at line 27 of file DataHandle.h.

## Member Enumeration Documentation

## ◆ Mode

enum Gaudi::DataHandle::Mode

Enumerator
Reader |
Writer |
Updater |

Definition at line 29 of file DataHandle.h.

29 { Reader = 1 << 2, Writer = 1 << 4, Updater = Reader | Writer };
Gaudi::DataHandle::Reader
Definition: DataHandle.h:29
Gaudi::DataHandle::Writer
Definition: DataHandle.h:29
Gaudi::DataHandle::Updater
Definition: DataHandle.h:29

## Constructor & Destructor Documentation

## ◆ DataHandle() [1/2]

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

Definition at line 31 of file DataHandle.h.

32 : m_key( k ), m_owner( owner ), m_mode( a ){};
Gaudi::DataHandle::owner
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:40
Gaudi::DataHandle::m_mode
Mode m_mode
Definition: DataHandle.h:69
Gaudi::DataHandle::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:65
Gaudi::DataHandle::m_owner
IDataHandleHolder * m_owner
Definition: DataHandle.h:66

## ◆ DataHandle() [2/2]

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

Definition at line 34 of file DataHandle.h.

35 : m_key( k ), m_owner( owner ), m_mode( a ), m_isCond( isCond ){};
Gaudi::DataHandle::owner
virtual IDataHandleHolder * owner() const
Definition: DataHandle.h:40
Gaudi::DataHandle::m_mode
Mode m_mode
Definition: DataHandle.h:69
Gaudi::DataHandle::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:65
Gaudi::DataHandle::m_owner
IDataHandleHolder * m_owner
Definition: DataHandle.h:66
Gaudi::DataHandle::m_isCond
bool m_isCond
Definition: DataHandle.h:70

## ◆ ~DataHandle()

virtual Gaudi::DataHandle::~DataHandle | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ fullKey()

virtual const DataObjID& Gaudi::DataHandle::fullKey | ( |  | ) | const
| inline virtual

Definition at line 48 of file DataHandle.h.

48 { return m_key; }
Gaudi::DataHandle::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:65

## ◆ init()

virtual bool Gaudi::DataHandle::init | ( |  | ) |
| inline virtual

Reimplemented in DataObjectHandleBase.

Definition at line 53 of file DataHandle.h.

53 { return true; }

## ◆ isCondition()

virtual bool Gaudi::DataHandle::isCondition | ( |  | ) | const
| inline virtual

Definition at line 56 of file DataHandle.h.

56 { return m_isCond; }
Gaudi::DataHandle::m_isCond
bool m_isCond
Definition: DataHandle.h:70

## ◆ mode()

virtual Mode Gaudi::DataHandle::mode | ( |  | ) | const
| inline virtual

Definition at line 42 of file DataHandle.h.

42 { return m_mode; }
Gaudi::DataHandle::m_mode
Mode m_mode
Definition: DataHandle.h:69

## ◆ objKey()

virtual const std::string& Gaudi::DataHandle::objKey | ( |  | ) | const
| inline virtual

Definition at line 47 of file DataHandle.h.

47 { return m_key.key(); }
Gaudi::DataHandle::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:65
DataObjID::key
const std::string & key() const
Definition: DataObjID.h:48

## ◆ owner()

virtual IDataHandleHolder* Gaudi::DataHandle::owner | ( |  | ) | const
| inline virtual

Definition at line 40 of file DataHandle.h.

40 { return m_owner; }
Gaudi::DataHandle::m_owner
IDataHandleHolder * m_owner
Definition: DataHandle.h:66

## ◆ pythonRepr()

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

Reimplemented in DataObjectHandleBase.

Definition at line 9 of file DataHandle.cpp.

9 {
10 std::ostringstream ost;
11 ost << "DataHandle(\"" << fullKey() << "||" << std::to_string( mode() ) << "\")";
12 return ost.str();
13 }
Gaudi::DataHandle::mode
virtual Mode mode() const
Definition: DataHandle.h:42
std::to_string
T to_string(T... args)
Gaudi::DataHandle::fullKey
virtual const DataObjID & fullKey() const
Definition: DataHandle.h:48
std::ostringstream
STL class.
std::ostringstream::str
T str(T... args)

## ◆ reset()

virtual void Gaudi::DataHandle::reset | ( | bool |  | ) |
| inline virtual

Definition at line 50 of file DataHandle.h.

50 {};

## ◆ setKey()

virtual void Gaudi::DataHandle::setKey | ( | const DataObjID & | key | ) | const
| inline virtual

Definition at line 44 of file DataHandle.h.

44 { m_key = key; }
Gaudi::DataHandle::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:65

## ◆ setOwner()

virtual void Gaudi::DataHandle::setOwner | ( | IDataHandleHolder * | o | ) |
| inline virtual

Definition at line 39 of file DataHandle.h.

39 { m_owner = o; }
Gaudi::DataHandle::m_owner
IDataHandleHolder * m_owner
Definition: DataHandle.h:66

## ◆ updateKey()

virtual void Gaudi::DataHandle::updateKey | ( | const std::string & | key | ) | const
| inline virtual

Definition at line 45 of file DataHandle.h.

45 { m_key.updateKey( key ); }
DataObjID::updateKey
void updateKey(const std::string &key)
Definition: DataObjID.h:93
Gaudi::DataHandle::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:65

## Member Data Documentation

## ◆ m_isCond

bool Gaudi::DataHandle::m_isCond = false
| private

Definition at line 70 of file DataHandle.h.

## ◆ m_key

DataObjID Gaudi::DataHandle::m_key = {"NONE"}
| mutable protected

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

## ◆ m_mode

Mode Gaudi::DataHandle::m_mode = Reader
| private

Definition at line 69 of file DataHandle.h.

## ◆ m_owner

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

Definition at line 66 of file DataHandle.h.

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

- GaudiKernel/GaudiKernel/DataHandle.h
- GaudiKernel/src/Lib/DataHandle.cpp