|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/EventIDBase.h"
13 #include "GaudiKernel/EventIDRange.h"
20 ISvcLocator* pSvcLocator ) :
22 m_cds(
"ASCIICondDbSvc",
name)
38 return StatusCode::SUCCESS;
47 return StatusCode::FAILURE;
51 <<
" e: " <<
evt->eventNumber() );
56 EventIDBase
now(getContext().eventID());
58 if (
evt->eventNumber() == 10) {
59 std::this_thread::sleep_for(std::chrono::milliseconds( 500 ));
65 <<
". In theory this should not be called, but may happen"
66 <<
" if multiple concurrent events are being processed out of order.");
71 <<
" not valid. Getting new info for dbKey \""
72 << wch.
dbKey() <<
"\" from CondDb");
76 if (
m_cds->getRange(wch.
dbKey(), getContext(),
r,
val).isFailure()) {
78 <<
"\" in CondSvc registry");
79 return StatusCode::FAILURE;
83 if (wch.
record(
r, cdo).isFailure()) {
86 <<
" with EventRange " <<
r);
87 return StatusCode::FAILURE;
90 <<
" with range " <<
r);
95 return StatusCode::SUCCESS;
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_dbKey
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
ServiceHandle< IASCIICondDbSvc > m_cds
::StatusCode StatusCode
StatusCode definition for legacy code.
const std::string & dbKey() const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const std::string & key() const
CondAlgX(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize(bool used=true)
SG::ReadHandleKey< xAOD::EventInfo > m_evt
SG::WriteCondHandleKey< CondDataObj > m_wchk
void setDbKey(const std::string &dbKey)
virtual StatusCode execute() override