DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.  
 More...
#include </builds/gaudi/Gaudi/GaudiKernel/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... 
 | 
|  | 
| 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 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 | ( |  | ) |  |  | virtual | 
 
 
◆ 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 69 of file DataObjectHandleBase.cpp.
   99     auto tokens = boost::tokenizer<boost::char_separator<char>>{
objKey(), boost::char_separator<char>{
":"}};
 
  102                              [&]( 
const std::string& 
n ) { return m_EDS->retrieveObject( n, p ).isSuccess(); } );
 
  103     if ( alt != tokens.end() ) {
 
  105       log << 
MSG::DEBUG << 
": could not find \"" << 
objKey() << 
"\" -- using alternative source: \"" << *alt
 
  106           << 
"\" instead" << 
endmsg;
 
 
 
 
◆ init()
  
  | 
        
          | bool DataObjectHandleBase::init | ( |  | ) |  |  | overrideprotectedvirtual | 
 
 
◆ initialized()
  
  | 
        
          | bool DataObjectHandleBase::initialized | ( |  | ) | const |  | inline | 
 
 
◆ isOptional()
  
  | 
        
          | bool DataObjectHandleBase::isOptional | ( |  | ) | const |  | inline | 
 
 
◆ isValid()
      
        
          | bool DataObjectHandleBase::isValid | ( |  | ) | const | 
      
 
 
◆ operator=()
◆ setOptional()
  
  | 
        
          | void DataObjectHandleBase::setOptional | ( | bool | optional = true | ) |  |  | inline | 
 
 
◆ setRead()
  
  | 
        
          | void DataObjectHandleBase::setRead | ( | bool | wasRead = true | ) |  |  | inlineprotected | 
 
 
◆ setWritten()
  
  | 
        
          | void DataObjectHandleBase::setWritten | ( | bool | wasWritten = true | ) |  |  | inlineprotected | 
 
 
◆ wasRead()
  
  | 
        
          | bool DataObjectHandleBase::wasRead | ( |  | ) | const |  | inline | 
 
 
◆ wasWritten()
  
  | 
        
          | bool DataObjectHandleBase::wasWritten | ( |  | ) | const |  | inline | 
 
 
◆ operator<<
◆ 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 90 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 96 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: