ATLAS Offline Software
Loading...
Searching...
No Matches
LArCellContHVCorrTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9
10
11
13
15
16 return StatusCode::SUCCESS;
17}
18
19StatusCode LArCellContHVCorrTool::process(CaloCellContainer* cellCollection, const EventContext& ctx) const {
20
21 // get offline HVScaleCorr
23 const LArHVCorr *oflHVCorr = *oflHVCorrHdl;
24 if(!oflHVCorr) {
25 ATH_MSG_ERROR("Do not have ofline HV corr. conditions object !!!!");
26 return StatusCode::FAILURE;
27 }
28
29 if (!cellCollection) {
30 ATH_MSG_ERROR( "Cell Correction tool receives invalid cell Collection" );
31 return StatusCode::FAILURE;
32 }
33
34
35 for (CaloCell* theCell : *cellCollection) {
36 const float hvcorr = oflHVCorr->HVScaleCorr(theCell->ID());
37 theCell->scaleEnergy(hvcorr);
38 }// End loop over cell-container
39 return StatusCode::SUCCESS;
40}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
Container class for CaloCell.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
virtual StatusCode initialize() override final
SG::ReadCondHandleKey< LArHVCorr > m_offlineHVScaleCorrKey
virtual StatusCode process(CaloCellContainer *cellCollection, const EventContext &ctx) const override final
virtual const float & HVScaleCorr(const HWIdentifier &chid) const override final
Definition LArHVCorr.cxx:19