From a007ea9021b98ece89daf042680bd1e257876ae3 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 18 Jun 2018 15:46:49 +0200 Subject: [PATCH] TBRec: CaloCellCorrection methods are const. CaloCellCorrection::MakeCorrection is now const, with an EventContext argument. Adjust uses of it. Working to make more of the calorimeter reconstruction reentrant. Former-commit-id: c4b71645249e6961f975b9f5742d5ee776053b78 --- TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h | 11 ++++++----- TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h | 7 ++++--- TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h | 12 ++++-------- TestBeam/TBRec/src/TBCellNoiseCorrection.cxx | 3 ++- TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx | 4 +++- TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx | 4 ---- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h b/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h index cf0c185412e..8c650eb4278 100644 --- a/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h +++ b/TestBeam/TBRec/TBRec/TBCellNoiseCorrection.h @@ -31,12 +31,13 @@ class TBCellNoiseCorrection : public CaloCellCorrection, virtual public IInciden TBCellNoiseCorrection (const std::string& type, const std::string& name, const IInterface* parent); - ~TBCellNoiseCorrection(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual ~TBCellNoiseCorrection(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; - void MakeCorrection(CaloCell* theCell); - void handle(const Incident&); + void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; + virtual void handle(const Incident&) override; private: diff --git a/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h b/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h index 600de6433ad..6bfd7589ed3 100644 --- a/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h +++ b/TestBeam/TBRec/TBRec/TBEMECCellEtaCorrection.h @@ -33,10 +33,11 @@ class TBEMECCellEtaCorrection : public CaloCellCorrection TBEMECCellEtaCorrection (const std::string& type, const std::string& name, const IInterface* parent); - ~TBEMECCellEtaCorrection(); - virtual StatusCode initialize(); + virtual ~TBEMECCellEtaCorrection(); + virtual StatusCode initialize() override; - void MakeCorrection(CaloCell* theCell); + virtual void MakeCorrection (CaloCell* theCell, + const EventContext& ctx) const override; private: diff --git a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h b/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h index 61d2b8c23ba..f4713b0031b 100755 --- a/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h +++ b/TestBeam/TBRec/TBRec/TBEMECXTalkToyModel.h @@ -9,7 +9,6 @@ class StoreGateSvc; #include "AthenaBaseComps/AthAlgTool.h" #include "CaloInterface/ICaloCellMakerTool.h" #include "CaloEvent/CaloCellContainer.h" -#include "CaloUtils/CaloCellCorrection.h" #include "GaudiKernel/ToolHandle.h" #include "CaloIdentifier/CaloCell_ID.h" @@ -23,15 +22,12 @@ class TBEMECXTalkToyModel: public AthAlgTool, { public: TBEMECXTalkToyModel(const std::string& type, - const std::string& name, - const IInterface* parent) ; + const std::string& name, + const IInterface* parent) ; - typedef ToolHandleArray<CaloCellCorrection> ::iterator - CellCorrectionToolIterator; - - virtual StatusCode initialize() ; + virtual StatusCode initialize() override; // update theCellContainer - virtual StatusCode process( CaloCellContainer * theCellContainer) ; + virtual StatusCode process( CaloCellContainer * theCellContainer) override; private: diff --git a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx index 6644ac25b5d..4d1ad9683f4 100644 --- a/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx +++ b/TestBeam/TBRec/src/TBCellNoiseCorrection.cxx @@ -150,7 +150,8 @@ StatusCode TBCellNoiseCorrection::finalize() } // MakeCorrection: This is called with a pointer to the Cell Object. -void TBCellNoiseCorrection::MakeCorrection(CaloCell* theCell) +void TBCellNoiseCorrection::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { // const CaloDetDescrElement* elt = theCell->caloDDE(); diff --git a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx index ebe2cfd8327..ffe7d593412 100644 --- a/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx +++ b/TestBeam/TBRec/src/TBEMECCellEtaCorrection.cxx @@ -90,7 +90,9 @@ TBEMECCellEtaCorrection::~TBEMECCellEtaCorrection() // MakeCorrection: This is called with a pointer to the Cell Object. -void TBEMECCellEtaCorrection::MakeCorrection(CaloCell* theCell) +void +TBEMECCellEtaCorrection::MakeCorrection (CaloCell* theCell, + const EventContext& /*ctx*/) const { MsgStream log(msgSvc(), name()); diff --git a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx index 55f3305614b..7c06f6e901e 100755 --- a/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx +++ b/TestBeam/TBRec/src/TBEMECXTalkToyModel.cxx @@ -18,10 +18,6 @@ PURPOSE: A simple toy model to simulate longitudinal cross-talk #include "TBRec/TBEMECXTalkToyModel.h" -#include "GaudiKernel/Service.h" -#include "GaudiKernel/Property.h" -#include "GaudiKernel/ListItem.h" - #include "StoreGate/StoreGateSvc.h" -- GitLab