diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/ITileRawChannelTool.h b/TileCalorimeter/TileRecUtils/TileRecUtils/ITileRawChannelTool.h index 27b58b3894e945139dc4c24b00cde4176b603f78..8cfd9c492887f678d568c46b2c60cc57e01bfbf8 100644 --- a/TileCalorimeter/TileRecUtils/TileRecUtils/ITileRawChannelTool.h +++ b/TileCalorimeter/TileRecUtils/TileRecUtils/ITileRawChannelTool.h @@ -13,15 +13,13 @@ class TileRawChannelContainer ; #include "GaudiKernel/IAlgTool.h" -static const InterfaceID IID_ITileRawChannelTool("ITileRawChannelTool", 1 , 0); - -class ITileRawChannelTool: virtual public IAlgTool { - +class ITileRawChannelTool: virtual public IAlgTool +{ public: - // update TileRawChannelContainer, subtract common mode noise for example - virtual StatusCode process(TileRawChannelContainer * rchCnt)=0 ; + DeclareInterfaceID (ITileRawChannelTool, 1, 0); - static const InterfaceID& interfaceID() { return IID_ITileRawChannelTool;} + // update TileRawChannelContainer, subtract common mode noise for example + virtual StatusCode process(TileRawChannelContainer * rchCnt) const = 0; }; #endif diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelNoiseFilter.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelNoiseFilter.h index 4b77aea3255bca4b5c368cb54294bf0cc5a0bd58..677b80da2091ee8d6cfd496cbd7bd4ba1aeabfd0 100644 --- a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelNoiseFilter.h +++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelNoiseFilter.h @@ -32,7 +32,8 @@ class TileBeamInfoProvider; @class TileRawChannelNoiseFilter @brief This tool subtracts common-mode noise from all TileRawChannels in one container */ -class TileRawChannelNoiseFilter: public AthAlgTool, virtual public ITileRawChannelTool { +class TileRawChannelNoiseFilter: public extends<AthAlgTool, ITileRawChannelTool> +{ public: /** AlgTool like constructor */ @@ -42,16 +43,13 @@ class TileRawChannelNoiseFilter: public AthAlgTool, virtual public ITileRawChann /** Virtual destructor */ virtual ~TileRawChannelNoiseFilter() {}; - /** AlgTool InterfaceID */ - static const InterfaceID& interfaceID(); - /** AlgTool initialize method.*/ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** AlgTool finalize method */ - virtual StatusCode finalize(); + virtual StatusCode finalize() override; /** proceed the coherent noise subtruction algorithm and correct TileRawChannel amplitudes */ - virtual StatusCode process(TileRawChannelContainer *rchCnt); + virtual StatusCode process(TileRawChannelContainer *rchCnt) const override; private: diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelOF1Corrector.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelOF1Corrector.h index 6aa0872edf0ead840beefb38e8177ad47fba746c..cb5b8ba9e1df2729a01b5f125ff2fe53a8c7e729 100644 --- a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelOF1Corrector.h +++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelOF1Corrector.h @@ -36,8 +36,9 @@ class TileCondToolEmscale; @class TileRawChannelOF1Corrector @brief This tool correct TileRawChannels amplitudes which came from OF1 DSP if pedestal changed */ -class TileRawChannelOF1Corrector: public AthAlgTool, virtual public ITileRawChannelTool { - public: +class TileRawChannelOF1Corrector: public extends<AthAlgTool, ITileRawChannelTool> +{ +public: /** AlgTool like constructor */ TileRawChannelOF1Corrector(const std::string& type, const std::string& name, const IInterface* parent); @@ -45,16 +46,13 @@ class TileRawChannelOF1Corrector: public AthAlgTool, virtual public ITileRawChan /** Virtual destructor */ virtual ~TileRawChannelOF1Corrector() {}; - /** AlgTool InterfaceID */ - static const InterfaceID& interfaceID(); - /** AlgTool initialize method.*/ virtual StatusCode initialize() override; /** AlgTool finalize method */ virtual StatusCode finalize() override; /** Correct TileRawChannel amplitudes if pedestal changed */ - virtual StatusCode process(TileRawChannelContainer* rawChannelContainer) override; + virtual StatusCode process(TileRawChannelContainer* rawChannelContainer) const override; private: diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx index bde807b6800504c9edc795034dbe9d2fc6e94aaf..8c7a8362b82a1e25ccbc96564c926264c0930b40 100644 --- a/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx @@ -17,17 +17,12 @@ #include "TileConditions/TileCondToolNoiseSample.h" #include "TileRecUtils/TileBeamInfoProvider.h" -static const InterfaceID IID_ITileRawChannelNoiseFilter("TileRawChannelNoiseFilter", 1, 0); - -const InterfaceID& TileRawChannelNoiseFilter::interfaceID() { - return IID_ITileRawChannelNoiseFilter; -} //======================================================== // constructor TileRawChannelNoiseFilter::TileRawChannelNoiseFilter(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent) + : base_class(type, name, parent) , m_tileHWID(0) , m_tileToolEmscale("TileCondToolEmscale") , m_tileToolNoiseSample("TileCondToolNoiseSample") @@ -38,9 +33,6 @@ TileRawChannelNoiseFilter::TileRawChannelNoiseFilter(const std::string& type, , m_useTwoGaussNoise(false) // do not use 2G - has no sense for ADC HF noise for the moment , m_useGapCells(false) // use gap cells for noise filter as all normal cells { - declareInterface<ITileRawChannelTool>(this); - declareInterface<TileRawChannelNoiseFilter>(this); - declareProperty("TileCondToolEmscale", m_tileToolEmscale); declareProperty("TileCondToolNoiseSample", m_tileToolNoiseSample); declareProperty("TileBadChanTool", m_tileBadChanTool); @@ -88,9 +80,9 @@ StatusCode TileRawChannelNoiseFilter::initialize() { // ============================================================================ // process container -StatusCode TileRawChannelNoiseFilter::process( - TileRawChannelContainer *rchCont) { - +StatusCode TileRawChannelNoiseFilter::process ( + TileRawChannelContainer *rchCont) const +{ ATH_MSG_DEBUG("in process()"); TileRawChannelUnit::UNIT rChUnit = rchCont->get_unit(); @@ -111,6 +103,7 @@ StatusCode TileRawChannelNoiseFilter::process( ATH_MSG_VERBOSE( "Units in container is " << units[rChUnit] ); // Now retrieve the TileDQStatus + // FIXME: const violation const TileDQstatus* DQstatus = m_beamInfo->getDQstatus(); TileRawChannelContainer::const_iterator collItr = rchCont->begin(); diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelOF1Corrector.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelOF1Corrector.cxx index 0c937e2655cff95f65a4fa015f298294f4639a44..804a59cbc39c8964059538112324251845b58057 100644 --- a/TileCalorimeter/TileRecUtils/src/TileRawChannelOF1Corrector.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelOF1Corrector.cxx @@ -18,17 +18,11 @@ #include "StoreGate/ReadHandle.h" #include "AthenaKernel/errorcheck.h" -static const InterfaceID IID_ITileRawChannelOF1Corrector("TileRawChannelOF1Corrector", 1, 0); - -const InterfaceID& TileRawChannelOF1Corrector::interfaceID() { - return IID_ITileRawChannelOF1Corrector; -} - //======================================================== // constructor TileRawChannelOF1Corrector::TileRawChannelOF1Corrector(const std::string& type, const std::string& name, const IInterface* parent) - : AthAlgTool(type, name, parent) + : base_class(type, name, parent) , m_tileHWID(0) , m_tileToolNoiseSample("TileCondToolNoiseSample") , m_tileCondToolOfc("TileCondToolOfcCool/TileCondToolOfcCoolOF1") @@ -36,9 +30,6 @@ TileRawChannelOF1Corrector::TileRawChannelOF1Corrector(const std::string& type, , m_tileToolEms("TileCondToolEmscale") , m_tileDspThreshold("TileCondToolDspThreshold") { - declareInterface<ITileRawChannelTool>(this); - declareInterface<TileRawChannelOF1Corrector>(this); - declareProperty("TileCondToolNoiseSample", m_tileToolNoiseSample); declareProperty("TileCondToolOfc", m_tileCondToolOfc); declareProperty("TileCondToolTiming", m_tileToolTiming); @@ -97,8 +88,8 @@ StatusCode TileRawChannelOF1Corrector::initialize() { // ============================================================================ // process container -StatusCode TileRawChannelOF1Corrector::process(TileRawChannelContainer* rawChannelContainer) { - +StatusCode TileRawChannelOF1Corrector::process(TileRawChannelContainer* rawChannelContainer) const +{ ATH_MSG_DEBUG("in process()"); TileFragHash::TYPE rawChannelType = rawChannelContainer->get_type(); @@ -153,6 +144,7 @@ StatusCode TileRawChannelOF1Corrector::process(TileRawChannelContainer* rawChann float onlinePedestalDifference = m_tileToolNoiseSample->getOnlinePedestalDifference(drawerIdx, channel, gain, rawChannelUnit); float phase = -m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain); + // FIXME: const violation const TileOfcWeightsStruct* weights = m_tileCondToolOfc->getOfcWeights(drawerIdx, channel, gain, phase, false); float weightsSum(0.0); for (int i = 0; i < weights->n_samples; ++i) weightsSum += weights->w_a[i];