DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
More...
#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/DataObjectHandleBase.h>
|
| DataObjectHandleBase (DataObjID k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) |
|
| DataObjectHandleBase (std::string k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) |
|
| ~DataObjectHandleBase () override |
|
| DataObjectHandleBase (const DataObjectHandleBase &)=delete |
|
| DataObjectHandleBase (DataObjectHandleBase &&) |
|
DataObjectHandleBase & | operator= (const DataObjectHandleBase &) |
|
template<class OWNER , class K , typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>> |
| DataObjectHandleBase (OWNER *owner, Gaudi::DataHandle::Mode m, std::string name, K key={}, std::string doc="") |
| Autodeclaring constructor with property name, mode, key and documentation. More...
|
|
bool | isOptional () const |
| Check if the data object declared is optional for the algorithm. More...
|
|
void | setOptional (bool optional=true) |
|
bool | isValid () const |
|
Public Member Functions inherited from Gaudi::DataHandle |
| DataHandle (DataObjID k, Mode a=Reader, IDataHandleHolder *owner=nullptr) |
|
| DataHandle (DataObjID k, 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 (DataObjID key) const |
|
virtual void | updateKey (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 | isCondition () const |
|
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 35 of file DataObjectHandleBase.h.
◆ DataObjectHandleBase() [1/5]
◆ DataObjectHandleBase() [2/5]
◆ ~DataObjectHandleBase()
DataObjectHandleBase::~DataObjectHandleBase |
( |
| ) |
|
|
override |
◆ DataObjectHandleBase() [3/5]
◆ DataObjectHandleBase() [4/5]
◆ DataObjectHandleBase() [5/5]
template<class OWNER , class K , typename = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>>
Autodeclaring constructor with property name, mode, key and documentation.
- Note
- the use std::enable_if is required to avoid ambiguities
Definition at line 49 of file DataObjectHandleBase.h.
53 p->template setOwnerType<OWNER>();
◆ fetch()
DataObject * DataObjectHandleBase::fetch |
( |
| ) |
const |
|
protected |
Definition at line 65 of file DataObjectHandleBase.cpp.
89 auto tokens = boost::tokenizer<boost::char_separator<char>>{
objKey(), boost::char_separator<char>{
":" } };
92 [&](
const std::string&
n ) { return m_EDS->retrieveObject( n, p ).isSuccess(); } );
93 if ( alt != tokens.end() && *alt !=
objKey() ) {
95 log <<
MSG::DEBUG <<
": could not find \"" <<
objKey() <<
"\" -- using alternative source: \"" << *alt
103 bool expected =
false;
◆ init()
bool DataObjectHandleBase::init |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ isOptional()
bool DataObjectHandleBase::isOptional |
( |
| ) |
const |
|
inline |
◆ isValid()
bool DataObjectHandleBase::isValid |
( |
| ) |
const |
◆ operator=()
◆ setOptional()
void DataObjectHandleBase::setOptional |
( |
bool |
optional = true | ) |
|
|
inline |
◆ operator<<
◆ m_EDS
◆ m_init
bool DataObjectHandleBase::m_init = false |
|
protected |
◆ m_MS
◆ m_optional
bool DataObjectHandleBase::m_optional = false |
|
protected |
◆ m_searchDone
std::atomic<bool> DataObjectHandleBase::m_searchDone = false |
|
mutableprotected |
Whether the search part of the fetch method (so dealing with alt names was already executed or not.
On subsequent calls (when this is true), it will be skipped.
Definition at line 81 of file DataObjectHandleBase.h.
◆ m_searchMutex
A Mutex protecting the calls to the search part of the fetch method, so that we are sure that we only call it once.
Definition at line 87 of file DataObjectHandleBase.h.
The documentation for this class was generated from the following files: