ATLAS Offline Software
Loading...
Searching...
No Matches
OnlineLumiCalibrationCondAlg.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
3 */
11
12
17
18
22StatusCode
24{
26 ATH_CHECK( m_lumiCalibOutputKey.initialize() );
27 return StatusCode::SUCCESS;
28}
29
30
35StatusCode
36OnlineLumiCalibrationCondAlg::execute (const EventContext& ctx) const
37{
40 EventIDRange range;
41 ATH_CHECK( calibrationFolder.range (range) );
42
43 auto cali = std::make_unique<OnlineLumiCalibrationCondData>();
44 for (const auto& p : *calibrationFolder.retrieve()) {
45 unsigned int channel = p.first;
46 const coral::AttributeList& attrList = p.second;
48 if (!lc.setCalibration(attrList)) {
49 ATH_MSG_WARNING( "error processing calibration for channel " << channel );
50 }
51 else{
52 ATH_MSG_DEBUG( "Calibration for channel " << channel << ": " << lc );
53 cali->set (channel, std::move (lc));
54 }
55 }
56
59 ATH_CHECK( lumiCalib.record (range, std::move (cali)) );
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Produce lumi calibration data from COOL.
SG::WriteCondHandleKey< OnlineLumiCalibrationCondData > m_lumiCalibOutputKey
Output conditions object.
virtual StatusCode execute(const EventContext &ctx) const override final
Algorithm execute method.
virtual StatusCode initialize() override final
Gaudi initialize method.
SG::ReadCondHandleKey< CondAttrListCollection > m_calibrationFolderInputKey
Input conditions object.
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
const_pointer_type retrieve()
bool range(EventIDRange &r)
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED