DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
More...
#include <GaudiKernel/DataObjectHandleBase.h>
|
| DataObjectHandleBase (const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) |
|
| DataObjectHandleBase (const std::string &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner) |
|
virtual | ~DataObjectHandleBase () |
|
| DataObjectHandleBase (const DataObjectHandleBase &)=delete |
|
| DataObjectHandleBase (DataObjectHandleBase &&) |
|
DataObjectHandleBase & | operator= (const DataObjectHandleBase &) |
|
template<class OWNER , class K , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type> |
| DataObjectHandleBase (OWNER *owner, Gaudi::DataHandle::Mode m, std::string name, const K &key={}, std::string doc="") |
| Autodeclaring constructor with property name, mode, key and documentation. More...
|
|
std::string | toString () const |
|
std::string | pythonRepr () const override |
|
void | fromString (const std::string &s) |
|
bool | isOptional () const |
| Check if the data object declared is optional for the algorithm. More...
|
|
void | setOptional (bool optional=true) |
|
bool | initialized () const |
|
bool | wasRead () const |
|
bool | wasWritten () const |
|
bool | isValid () const |
|
Public Member Functions inherited from Gaudi::DataHandle |
| 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 StatusCode | commit () |
|
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 25 of file DataObjectHandleBase.h.
Definition at line 55 of file DataObjectHandleBase.cpp.
DataObjectHandleBase(const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
DataObjectHandleBase::~DataObjectHandleBase |
( |
| ) |
|
|
virtual |
Definition at line 61 of file DataObjectHandleBase.cpp.
virtual void renounce(Gaudi::DataHandle &)=0
virtual IDataHandleHolder * owner() const
Definition at line 16 of file DataObjectHandleBase.cpp.
virtual void declare(Gaudi::DataHandle &)=0
SmartIF< IDataProviderSvc > m_EDS
bool m_searchDone
Whether the search part of the fetch method (so dealing with alt names was already executed or not...
IDataHandleHolder * m_owner
SmartIF< IMessageSvc > m_MS
template<class OWNER , class K , typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
Autodeclaring constructor with property name, mode, key and documentation.
- Note
- the use std::enable_if is required to avoid ambiguities
Definition at line 40 of file DataObjectHandleBase.h.
45 p->template setOwnerType<OWNER>();
virtual IDataHandleHolder * owner() const
DataObjectHandleBase(const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
DataObject * DataObjectHandleBase::fetch |
( |
| ) |
const |
|
protected |
Definition at line 64 of file DataObjectHandleBase.cpp.
95 auto tokens = boost::tokenizer<boost::char_separator<char>>{
objKey(), boost::char_separator<char>{
":"}};
99 if ( alt != tokens.end() ) {
101 log <<
MSG::DEBUG <<
": could not find \"" <<
objKey() <<
"\" -- using alternative source: \"" << *alt
102 <<
"\" instead" <<
endmsg;
Definition of the MsgStream class used to transmit messages.
virtual const std::string & objKey() const
bool isSuccess() const
Test for a status code of SUCCESS.
SmartIF< IDataProviderSvc > m_EDS
virtual void setKey(const DataObjID &key) const
bool m_searchDone
Whether the search part of the fetch method (so dealing with alt names was already executed or not...
This class is used for returning status codes from appropriate routines.
std::mutex m_searchMutex
A Mutex protecting the calls to the search part of the fetch method, so that we are sure that we only...
SmartIF< IMessageSvc > m_MS
A DataObject is the base class of any identifiable object on any data store.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual IDataHandleHolder * owner() const
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
void DataObjectHandleBase::fromString |
( |
const std::string & |
s | ) |
|
Definition at line 121 of file DataObjectHandleBase.cpp.
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
bool DataObjectHandleBase::init |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from Gaudi::DataHandle.
Definition at line 125 of file DataObjectHandleBase.cpp.
130 if ( !
owner() )
return false;
void setWritten(bool wasWritten=true)
Define general base for Gaudi exception.
SmartIF< IDataProviderSvc > m_EDS
void setRead(bool wasRead=true)
Base class from which all concrete algorithm classes should be derived.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
SmartIF< IMessageSvc > m_MS
virtual IDataHandleHolder * owner() const
bool DataObjectHandleBase::initialized |
( |
| ) |
const |
|
inline |
bool DataObjectHandleBase::isOptional |
( |
| ) |
const |
|
inline |
bool DataObjectHandleBase::isValid |
( |
| ) |
const |
Definition at line 30 of file DataObjectHandleBase.cpp.
SmartIF< IDataProviderSvc > m_EDS
bool m_searchDone
Whether the search part of the fetch method (so dealing with alt names was already executed or not...
PropertyMgr & operator=(const PropertyMgr &)=delete
std::mutex m_searchMutex
A Mutex protecting the calls to the search part of the fetch method, so that we are sure that we only...
SmartIF< IMessageSvc > m_MS
void DataObjectHandleBase::setOptional |
( |
bool |
optional = true | ) |
|
|
inline |
void DataObjectHandleBase::setRead |
( |
bool |
wasRead = true | ) |
|
|
inlineprotected |
void DataObjectHandleBase::setWritten |
( |
bool |
wasWritten = true | ) |
|
|
inlineprotected |
bool DataObjectHandleBase::wasRead |
( |
| ) |
const |
|
inline |
bool DataObjectHandleBase::wasWritten |
( |
| ) |
const |
|
inline |
Definition at line 159 of file DataObjectHandleBase.cpp.
virtual Mode mode() const
virtual const DataObjID & fullKey() const
bool isOptional() const
Check if the data object declared is optional for the algorithm.
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual IDataHandleHolder * owner() const
bool DataObjectHandleBase::m_init = false |
|
protected |
bool DataObjectHandleBase::m_optional = false |
|
protected |
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 86 of file DataObjectHandleBase.h.
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 92 of file DataObjectHandleBase.h.
bool DataObjectHandleBase::m_wasRead = false |
|
protected |
bool DataObjectHandleBase::m_wasWritten = false |
|
protected |
The documentation for this class was generated from the following files: