ATLAS Offline Software
Loading...
Searching...
No Matches
LArCellContHVCorrTool Class Reference

#include <LArCellContHVCorrTool.h>

Inheritance diagram for LArCellContHVCorrTool:
Collaboration diagram for LArCellContHVCorrTool:

Public Member Functions

 ~LArCellContHVCorrTool ()=default
virtual StatusCode initialize () override final
virtual StatusCode process (CaloCellContainer *cellCollection, const EventContext &ctx) const override final

Private Attributes

SG::ReadCondHandleKey< LArHVCorrm_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}

Detailed Description

Definition at line 18 of file LArCellContHVCorrTool.h.

Constructor & Destructor Documentation

◆ ~LArCellContHVCorrTool()

LArCellContHVCorrTool::~LArCellContHVCorrTool ( )
default

Member Function Documentation

◆ initialize()

StatusCode LArCellContHVCorrTool::initialize ( )
finaloverridevirtual

Definition at line 12 of file LArCellContHVCorrTool.cxx.

12 {
13
15
16 return StatusCode::SUCCESS;
17}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< LArHVCorr > m_offlineHVScaleCorrKey

◆ process()

StatusCode LArCellContHVCorrTool::process ( CaloCellContainer * cellCollection,
const EventContext & ctx ) const
finaloverridevirtual

Definition at line 19 of file LArCellContHVCorrTool.cxx.

19 {
20
21 // get offline HVScaleCorr
22 SG::ReadCondHandle<LArHVCorr> oflHVCorrHdl(m_offlineHVScaleCorrKey, ctx);
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_MSG_ERROR(x)
virtual const float & HVScaleCorr(const HWIdentifier &chid) const override final
Definition LArHVCorr.cxx:19

Member Data Documentation

◆ m_offlineHVScaleCorrKey

SG::ReadCondHandleKey<LArHVCorr> LArCellContHVCorrTool::m_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}
private

Definition at line 31 of file LArCellContHVCorrTool.h.

31{this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"};

The documentation for this class was generated from the following files: