DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DataObjectHandleBase.h>
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
Base class for handles to Data Objects in the Event Store, to simplify access via Properties.
- Author
- Charles Leggett
- Date
- 2015-09-01
Definition at line 34 of file DataObjectHandleBase.h.
◆ DataObjectHandleBase() [1/4]
Definition at line 47 of file DataObjectHandleBase.cpp.
48 : Gaudi::DataHandle( std::move( k ), a,
owner ) {
50}
IDataHandleHolder * m_owner
virtual IDataHandleHolder * owner() const
◆ DataObjectHandleBase() [2/4]
Definition at line 54 of file DataObjectHandleBase.cpp.
DataObjectHandleBase(DataObjID k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
◆ ~DataObjectHandleBase()
| DataObjectHandleBase::~DataObjectHandleBase |
( |
| ) |
|
|
override |
◆ DataObjectHandleBase() [3/4]
◆ DataObjectHandleBase() [4/4]
Definition at line 26 of file DataObjectHandleBase.cpp.
27 : Gaudi::DataHandle( other )
33}
SmartIF< IDataProviderSvc > m_EDS
SmartIF< IMessageSvc > m_MS
◆ fetch()
| DataObject * DataObjectHandleBase::fetch |
( |
| ) |
const |
|
protected |
Definition at line 61 of file DataObjectHandleBase.cpp.
61 {
62
63
65 std::cerr << (
owner() ?
owner()->
name() :
"<UNKNOWN>:" ) <<
"DataObjectHandle: uninitialized data handle"
66 << std::endl;
67 }
70 return p;
71}
virtual const std::string & objKey() const
virtual const std::string & name() const =0
Retrieve the name of the instance.
◆ init()
| bool DataObjectHandleBase::init |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from Gaudi::DataHandle.
Definition at line 75 of file DataObjectHandleBase.cpp.
75 {
77
78 if ( !
owner() )
return false;
79
80 Gaudi::Algorithm* algorithm =
dynamic_cast<Gaudi::Algorithm*
>(
owner() );
81 if ( algorithm ) {
82
85 } else {
86 AlgTool*
tool =
dynamic_cast<AlgTool*
>(
owner() );
87 if ( tool ) {
90 } else {
91 throw GaudiException(
"owner is neither AlgTool nor Gaudi::Algorithm",
"Invalid Cast",
StatusCode::FAILURE );
92 }
93 }
95 return true;
96}
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
constexpr static const auto FAILURE
◆ isOptional()
| bool DataObjectHandleBase::isOptional |
( |
| ) |
const |
|
inline |
◆ isValid()
| bool DataObjectHandleBase::isValid |
( |
| ) |
const |
◆ operator=()
◆ setOptional()
| void DataObjectHandleBase::setOptional |
( |
bool | optional = true | ) |
|
|
inline |
◆ operator<<
Definition at line 104 of file DataObjectHandleBase.cpp.
104 {
105
109 return str;
110}
bool isOptional() const
Check if the data object declared is optional for the algorithm.
virtual Mode mode() const
◆ m_EDS
◆ m_init
| bool DataObjectHandleBase::m_init = false |
|
protected |
◆ m_MS
◆ m_optional
| bool DataObjectHandleBase::m_optional = false |
|
protected |
The documentation for this class was generated from the following files: