Go to the documentation of this file.
18 #include <boost/tokenizer.hpp>
27 :
Gaudi::DataHandle( other )
28 , m_EDS(
std::move( other.m_EDS ) )
29 , m_MS(
std::move( other.m_MS ) )
30 , m_init( other.m_init )
31 , m_optional( other.m_optional )
32 , m_wasRead( other.m_wasRead )
33 , m_wasWritten( other.m_wasWritten )
34 , m_searchDone( other.m_searchDone ) {
43 Gaudi::DataHandle::operator=( other );
56 :
Gaudi::DataHandle( k, a, owner ) {
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;
123 if ( !
owner() )
return false;
132 m_MS = algorithm->msgSvc();
SmartIF< IDataProviderSvc > m_EDS
SmartIF< IMessageSvc > m_MS
std::ostream & operator<<(std::ostream &str, const DataObjectHandleBase &d)
bool m_searchDone
Whether the search part of the fetch method (so dealing with alt names was already executed or not.
DataObjectHandleBase(const DataObjID &k, Gaudi::DataHandle::Mode a, IDataHandleHolder *owner)
virtual void setKey(DataObjID key) const
virtual const std::string & name() const =0
Retrieve the name of the instance.
DataObjectHandleBase & operator=(const DataObjectHandleBase &)
bool isOptional() const
Check if the data object declared is optional for the algorithm.
virtual void declare(Gaudi::DataHandle &)=0
void setRead(bool wasRead=true)
virtual IDataHandleHolder * owner() const
Base class from which all concrete algorithm classes should be derived.
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
virtual void renounce(Gaudi::DataHandle &)=0
virtual const std::string & objKey() const
IDataHandleHolder * m_owner
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Header file for std:chrono::duration-based Counters.
DataObject * fetch() const
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
virtual Mode mode() const
void setWritten(bool wasWritten=true)
virtual ~DataObjectHandleBase()
constexpr static const auto FAILURE
const DataObjID INVALID_DATAOBJID
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 const DataObjID & fullKey() const