14 return StatusCode::SUCCESS;
20 return StatusCode::FAILURE;
23 EventIDRange rangeGeo;
24 if (!det_mgr.
range(rangeGeo)) {
26 return StatusCode::FAILURE;
28 EventIDRange rangeIntersection = rangeGeo;
35 return StatusCode::FAILURE;
38 EventIDRange rangeCondDb;
39 if (!condDbHandle.
range(rangeCondDb)) {
41 return StatusCode::FAILURE;
44 rangeIntersection = EventIDRange::intersect(rangeGeo, rangeCondDb);
50 <<
". In theory this should not be called, but may happen"
51 <<
" if multiple concurrent events are being processed out of order.");
52 return StatusCode::SUCCESS;
55 std::unique_ptr<Muon::MuonIntersectGeoData> geo_data =
56 std::make_unique<Muon::MuonIntersectGeoData>(msgStream(), det_mgr.
cptr(),
m_idHelperSvc.get(), condData);
58 if (writeHandle.
record(rangeIntersection, std::move(geo_data)).isFailure()) {
59 ATH_MSG_FATAL(
"Could not record MuonMDT_CablingMap " << writeHandle.
key() <<
" with EventRange " << rangeIntersection
60 <<
" into Conditions Store");
61 return StatusCode::FAILURE;
63 ATH_MSG_DEBUG(
"Recorded successfully the MuonIntersectionGeoData "<<writeHandle.
key()<<
" with EventRange "<<rangeIntersection);
65 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Base class for conditions algorithms.
MuonStationIntersectCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandleKey< MdtCondDbData > m_condKey
virtual StatusCode initialize() override
SG::WriteCondHandleKey< Muon::MuonIntersectGeoData > m_writeKey
bool range(EventIDRange &r)
const_pointer_type cptr()
const std::string & key() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const