ATLAS Offline Software
OnlineLumiCalibrationCondAlg.cxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
3  */
17 
18 
24 {
27  return StatusCode::SUCCESS;
28 }
29 
30 
36 OnlineLumiCalibrationCondAlg::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 
58  (m_lumiCalibOutputKey, ctx);
59  ATH_CHECK( lumiCalib.record (range, std::move (cali)) );
60  return StatusCode::SUCCESS;
61 }
OnlineLumiCalibrationCondAlg::initialize
virtual StatusCode initialize() override final
Gaudi initialize method.
Definition: OnlineLumiCalibrationCondAlg.cxx:23
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
OnlineLumiCalibrationCondAlg.h
Produce lumi calibration data from COOL.
OnlineLumiCalibrationCondAlg::m_lumiCalibOutputKey
SG::WriteCondHandleKey< OnlineLumiCalibrationCondData > m_lumiCalibOutputKey
Output conditions object.
Definition: OnlineLumiCalibrationCondAlg.h:50
OnlineLumiCalibrationCondAlg::m_calibrationFolderInputKey
SG::ReadCondHandleKey< CondAttrListCollection > m_calibrationFolderInputKey
Input conditions object.
Definition: OnlineLumiCalibrationCondAlg.h:46
SG::ReadCondHandle::range
bool range(EventIDRange &r)
Definition: ReadCondHandle.h:224
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
SG::WriteCondHandle::record
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
Definition: WriteCondHandle.h:157
ReadCondHandle.h
OnlineLumiCalibrator
Utility class to apply calibrations from /TDAQ/OLC/CALIBRATIONS folder.
Definition: OnlineLumiCalibrator.h:20
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
SG::ReadCondHandle::retrieve
const_pointer_type retrieve()
Definition: ReadCondHandle.h:162
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
WriteCondHandle.h
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
OnlineLumiCalibrator.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
OnlineLumiCalibrationCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Algorithm execute method.
Definition: OnlineLumiCalibrationCondAlg.cxx:36
SG::WriteCondHandle
Definition: WriteCondHandle.h:26