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 = std::enable_if_t<std::is_base_of_v<IProperty, OWNER>>> |
| | 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 (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 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 36 of file DataObjectHandleBase.h.
◆ PropertyType
◆ DataObjectHandleBase() [1/5]
Definition at line 57 of file DataObjectHandleBase.cpp.
virtual void declare(Gaudi::DataHandle &)=0
virtual IDataHandleHolder * owner() const
IDataHandleHolder * m_owner
◆ DataObjectHandleBase() [2/5]
Definition at line 64 of file DataObjectHandleBase.cpp.
virtual IDataHandleHolder * owner() const
DataObjectHandleBase(const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
◆ ~DataObjectHandleBase()
| DataObjectHandleBase::~DataObjectHandleBase |
( |
| ) |
|
|
virtual |
Definition at line 68 of file DataObjectHandleBase.cpp.
virtual IDataHandleHolder * owner() const
virtual void renounce(Gaudi::DataHandle &)=0
◆ DataObjectHandleBase() [3/5]
◆ DataObjectHandleBase() [4/5]
Definition at line 28 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
◆ 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 50 of file DataObjectHandleBase.h.
54 p->template setOwnerType<OWNER>();
virtual IDataHandleHolder * owner() const
DataObjectHandleBase(const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
◆ fetch()
| DataObject * DataObjectHandleBase::fetch |
( |
| ) |
const |
|
protected |
Definition at line 71 of file DataObjectHandleBase.cpp.
101 auto tokens = boost::tokenizer<boost::char_separator<char>>{
objKey(), boost::char_separator<char>{
":"}};
105 if ( alt != tokens.end() ) {
107 log <<
MSG::DEBUG <<
": could not find \"" <<
objKey() <<
"\" -- using alternative source: \"" << *alt
108 <<
"\" instead" <<
endmsg;
Definition of the MsgStream class used to transmit messages.
virtual IDataHandleHolder * owner() const
virtual const std::string & objKey() const
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.
virtual const std::string & name() const =0
Retrieve the name of the instance.
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Ignore/check StatusCode.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
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...
virtual void setKey(DataObjID key) const
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.
◆ fromString()
| void DataObjectHandleBase::fromString |
( |
const std::string & |
s | ) |
|
Definition at line 141 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.
const StatusCode & ignore() const
Ignore/check StatusCode.
◆ init()
| bool DataObjectHandleBase::init |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from Gaudi::DataHandle.
Definition at line 145 of file DataObjectHandleBase.cpp.
149 if ( !
owner() )
return false;
void setWritten(bool wasWritten=true)
Define general base for Gaudi exception.
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual IDataHandleHolder * owner() const
SmartIF< IDataProviderSvc > m_EDS
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
void setRead(bool wasRead=true)
Base class from which all concrete algorithm classes should be derived.
constexpr static const auto FAILURE
SmartIF< IMessageSvc > m_MS
◆ initialized()
| bool DataObjectHandleBase::initialized |
( |
| ) |
const |
|
inline |
◆ isOptional()
| bool DataObjectHandleBase::isOptional |
( |
| ) |
const |
|
inline |
◆ isValid()
| bool DataObjectHandleBase::isValid |
( |
| ) |
const |
◆ operator=()
Definition at line 41 of file DataObjectHandleBase.cpp.
45 Gaudi::DataHandle::operator=( other );
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.
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
◆ pythonRepr()
◆ setOptional()
| void DataObjectHandleBase::setOptional |
( |
bool |
optional = true | ) |
|
|
inline |
◆ setRead()
| void DataObjectHandleBase::setRead |
( |
bool |
wasRead = true | ) |
|
|
inlineprotected |
◆ setWritten()
| void DataObjectHandleBase::setWritten |
( |
bool |
wasWritten = true | ) |
|
|
inlineprotected |
◆ toString()
◆ wasRead()
| bool DataObjectHandleBase::wasRead |
( |
| ) |
const |
|
inline |
◆ wasWritten()
| bool DataObjectHandleBase::wasWritten |
( |
| ) |
const |
|
inline |
◆ operator<<
Definition at line 178 of file DataObjectHandleBase.cpp.
virtual Mode mode() const
virtual IDataHandleHolder * owner() const
virtual const std::string & name() const =0
Retrieve the name of the instance.
virtual const DataObjID & fullKey() const
bool isOptional() const
Check if the data object declared is optional for the algorithm.
◆ default_type
| std::string const DataObjectHandleBase::default_type = "unknown_t" |
|
staticprotected |
◆ m_EDS
◆ m_init
| bool DataObjectHandleBase::m_init = false |
|
protected |
◆ m_MS
◆ m_optional
| bool DataObjectHandleBase::m_optional = false |
|
protected |
◆ m_searchDone
| 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 97 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 103 of file DataObjectHandleBase.h.
◆ m_wasRead
| bool DataObjectHandleBase::m_wasRead = false |
|
protected |
◆ m_wasWritten
| bool DataObjectHandleBase::m_wasWritten = false |
|
protected |
The documentation for this class was generated from the following files: