diff --git a/Rich/Panoptes/options/OfflineDataFiles.py b/Rich/Panoptes/options/OfflineDataFiles.py index eded739439d838cfab8c88a4f0434e21d377af86..05243d8957d4dcada71524434c0545c35ea28b78 100755 --- a/Rich/Panoptes/options/OfflineDataFiles.py +++ b/Rich/Panoptes/options/OfflineDataFiles.py @@ -5,8 +5,8 @@ import glob # Check what is available searchPaths = [ - "/usera/jonesc/NFS/data/Collision15/LHCb/Raw/", # Cambridge "/usera/jonesc/NFS/data/Collision16/LHCb/Raw/", # Cambridge + "/usera/jonesc/NFS/data/Collision15/LHCb/Raw/", # Cambridge "/home/chris/LHCb/Data/" # CRJ's CernVM ] EventSelector().Input = [ ] diff --git a/Rich/Panoptes/options/RichCalibMon-Common.py b/Rich/Panoptes/options/RichCalibMon-Common.py index 774efab11d04558925e65e64193807552dea8253..7d6e749852943c86c23855545f6ecc2c5e13cc93 100644 --- a/Rich/Panoptes/options/RichCalibMon-Common.py +++ b/Rich/Panoptes/options/RichCalibMon-Common.py @@ -6,7 +6,7 @@ from Configurables import Rich__HPDOccupancyTool # Defaults Panoptes().DataType = "2016" Panoptes().DDDBtag = "dddb-20150724" -Panoptes().CondDBtag = "cond-20160517" +Panoptes().CondDBtag = "cond-20161011" # Try and load tags from online settings if Panoptes().UseConditionsMap and Panoptes().Mode != "Offline" : try: diff --git a/Rich/Panoptes/options/RichDAQMon-Common.py b/Rich/Panoptes/options/RichDAQMon-Common.py index dd9d44f21e3270b90d58f4cecb31478fccbe3bb7..430314a324e19ef6caf14e7fb049bb1dc29f2873 100644 --- a/Rich/Panoptes/options/RichDAQMon-Common.py +++ b/Rich/Panoptes/options/RichDAQMon-Common.py @@ -5,7 +5,7 @@ from Configurables import Rich__HPDOccupancyTool # Defaults Panoptes().DataType = "2016" Panoptes().DDDBtag = "dddb-20150724" -Panoptes().CondDBtag = "cond-20160517" +Panoptes().CondDBtag = "cond-20161011" # Try and load tags from online settings if Panoptes().UseConditionsMap and Panoptes().Mode != "Offline" : try: diff --git a/Rich/Panoptes/options/RichHPDImageMon-Common.py b/Rich/Panoptes/options/RichHPDImageMon-Common.py index e97faf8ae3ed5a693982bdb4f04a309a774c9176..b6fda8e4a041b533b803d1211ea3dbc2b69fb7f4 100644 --- a/Rich/Panoptes/options/RichHPDImageMon-Common.py +++ b/Rich/Panoptes/options/RichHPDImageMon-Common.py @@ -5,7 +5,7 @@ from Configurables import Rich__HPDOccupancyTool # Defaults Panoptes().DataType = "2016" Panoptes().DDDBtag = "dddb-20150724" -Panoptes().CondDBtag = "cond-20160517" +Panoptes().CondDBtag = "cond-20161011" # Try and load tags from online settings if Panoptes().UseConditionsMap and Panoptes().Mode != "Offline" : try: diff --git a/Rich/Panoptes/options/RichRingMon-Common.py b/Rich/Panoptes/options/RichRingMon-Common.py index eceae48a5b164538ca6c5c79f40323948ba06deb..3e9bd26d6ad22e834ac9d1e93e8465afbfdb392a 100644 --- a/Rich/Panoptes/options/RichRingMon-Common.py +++ b/Rich/Panoptes/options/RichRingMon-Common.py @@ -5,7 +5,7 @@ from Configurables import CondDB, CondDBAccessSvc # Defaults Panoptes().DataType = "2016" Panoptes().DDDBtag = "dddb-20150724" -Panoptes().CondDBtag = "cond-20160517" +Panoptes().CondDBtag = "cond-20161011" # Try and load tags from online settings if Panoptes().UseConditionsMap and Panoptes().Mode != "Offline" : try: diff --git a/Rich/Panoptes/python/Panoptes/Configuration.py b/Rich/Panoptes/python/Panoptes/Configuration.py index fbcd3dfa84e6ac5c1052a00fabd18e93bb109dac..dbcb8b2e529c112ae6c5fb88576856c0f5363288 100755 --- a/Rich/Panoptes/python/Panoptes/Configuration.py +++ b/Rich/Panoptes/python/Panoptes/Configuration.py @@ -28,7 +28,7 @@ class Panoptes(LHCbConfigurableUser): __used_configurables__ = [ LHCbApp, MessageSvc, Camera, RichMonitoringSysConf ] KnownModes = ['Offline', 'Online', 'OnlineTest', 'Calibration'] - KnownDataTypes = ['DC06' ,'MC09', '2008', '2009', '2010', '2011', '2012', '2015', '2016' ] + KnownDataTypes = ['DC06' ,'MC09', '2008', '2009', '2010', '2011', '2012', '2015', '2016', '2017', '2018' ] KnownPartitions = ['RICH', 'RICH1', 'RICH2', 'LHCb', 'FEST'] maskRaw = 0x1 #all raw events accepted by HLT @@ -44,7 +44,7 @@ class Panoptes(LHCbConfigurableUser): ,"Partition" : None ,"EvtMax" : -1 # Maximum number of events to process ,"SkipEvents" : 0 - ,"DataType" : "2016" + ,"DataType" : "2017" ,"Simulation" : False ,"UseOracle" : False ,"DDDBtag" : "" # geometry database tag diff --git a/Rich/RichDataMerge/src/RichTAEventMergeAlg.h b/Rich/RichDataMerge/src/RichTAEventMergeAlg.h index 2ae6f4227344b2a3fddf03bca8bbd8358edd66b2..a6ae3118403ee558e294ac053979291d5cf46a96 100755 --- a/Rich/RichDataMerge/src/RichTAEventMergeAlg.h +++ b/Rich/RichDataMerge/src/RichTAEventMergeAlg.h @@ -50,9 +50,9 @@ namespace Rich virtual ~TAEventMergeAlg( ); ///< Destructor - virtual StatusCode initialize(); ///< Algorithm initialise - virtual StatusCode execute(); ///< Algorithm execute - virtual StatusCode finalize(); ///< Algorithm finalize + StatusCode initialize() override; ///< Algorithm initialise + StatusCode execute() override; ///< Algorithm execute + StatusCode finalize() override; ///< Algorithm finalize private: diff --git a/Rich/RichMirrorAlignmentOnline/src/MirrPauseHandler.cpp b/Rich/RichMirrorAlignmentOnline/src/MirrPauseHandler.cpp index 9fc7f7ce275134249bf761ed95ff26231ff52712..693c80eb93831500510458b1c8eb240b1927d5ec 100644 --- a/Rich/RichMirrorAlignmentOnline/src/MirrPauseHandler.cpp +++ b/Rich/RichMirrorAlignmentOnline/src/MirrPauseHandler.cpp @@ -28,11 +28,11 @@ class MirrPauseHandler: public GaudiAlgorithm, virtual public IIncidentListener public: MirrPauseHandler(const std::string& name, ISvcLocator* sl); virtual ~MirrPauseHandler(); - virtual StatusCode initialize(); - virtual StatusCode start(); - virtual StatusCode stop(); - virtual void handle(const Incident& inc); - StatusCode execute(); + StatusCode initialize() override; + StatusCode start() override; + StatusCode stop() override; + void handle(const Incident& inc) override; + StatusCode execute() override; void readReference(); IGauchoMonitorSvc *m_MonSvc; // IIncidentSvc *incidentSvc() diff --git a/Rich/RichOnlineCalib/src/OMARichHPDImage.h b/Rich/RichOnlineCalib/src/OMARichHPDImage.h index 96fa82b1812122da11d2813193b99eaeec85cf41..857e238d5983762044f8b729c7ba2e2028ab2c66 100644 --- a/Rich/RichOnlineCalib/src/OMARichHPDImage.h +++ b/Rich/RichOnlineCalib/src/OMARichHPDImage.h @@ -44,11 +44,11 @@ public: /// Standard constructor OMARichHPDImage( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize ()final ; ///< Algorithm finalization - virtual StatusCode analyze (std::string& SaveSet, - std::string Task) final; ///< Algorithm analyze + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization + StatusCode analyze (std::string& SaveSet, + std::string Task) override; ///< Algorithm analyze private: diff --git a/Rich/RichOnlineCalib/src/OMARichRefIndex.h b/Rich/RichOnlineCalib/src/OMARichRefIndex.h index 7a82d609ae44292f3fd806ac6750a958a9afa79c..8fbe004d87780b46bc148958c18e486a41149a20 100644 --- a/Rich/RichOnlineCalib/src/OMARichRefIndex.h +++ b/Rich/RichOnlineCalib/src/OMARichRefIndex.h @@ -56,12 +56,12 @@ public: /// Standard constructor OMARichRefIndex( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize () final; ///< Algorithm finalization - - virtual StatusCode analyze( std::string& SaveSet, - std::string Task ) final; ///< Algorithm analyze + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization + + StatusCode analyze( std::string& SaveSet, + std::string Task ) override; ///< Algorithm analyze private: diff --git a/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.cpp b/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.cpp index d472b261fa7c149ab1d5d6632f8bc9eb08cab3f4..52b5c9cc614ee3686bfea05809985dc7ec124d5c 100644 --- a/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.cpp +++ b/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.cpp @@ -1208,7 +1208,7 @@ void OnlineSummary::fillHistograms() { for ( const auto& Ingress : UKL1.second ) { - for ( const auto& HPD : Ingress.second.hpdData() ) + for ( const auto& HPD : Ingress.second.pdData() ) { // Skip inhibited HPDs @@ -1221,7 +1221,7 @@ void OnlineSummary::fillHistograms() } // HPD identifier - const auto& smartID = HPD.second.hpdID(); + const auto& smartID = HPD.second.pdID(); // skip bad HPD IDs if ( UNLIKELY( !smartID.isValid() ) ) diff --git a/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.h b/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.h index 7a501acddc9501e606e6b406bdd1fa1d47f4ec9c..4b3042b9727091ad2724082ae5bf4202a1e89fd8 100644 --- a/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.h +++ b/Rich/RichOnlineCalib/src/RichOnlineHPDImageSummary.h @@ -83,9 +83,9 @@ namespace Rich /// Standard constructor OnlineSummary( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute() final; ///< Algorithm execute - virtual StatusCode finalize()final ; ///< Algorithm finalization + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute() override; ///< Algorithm execute + StatusCode finalize() override; ///< Algorithm finalization private: @@ -179,7 +179,7 @@ namespace Rich void fillHistograms(); /// Incident callback - virtual void handle( const Incident &incident ); + void handle( const Incident &incident ) override; /// Load camera tool on demand inline ICameraTool * cameraTool() const diff --git a/Rich/RichOnlineMonitors/src/CameraRunFolder.h b/Rich/RichOnlineMonitors/src/CameraRunFolder.h index 4f50afa7a08b7bda0fb09e431ac0021ef5b3984e..455764fae9595cc8bd12eb60a12ee73128cf72c5 100755 --- a/Rich/RichOnlineMonitors/src/CameraRunFolder.h +++ b/Rich/RichOnlineMonitors/src/CameraRunFolder.h @@ -45,12 +45,12 @@ namespace Rich /// Standard constructor CameraRunFolder( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution private: - virtual void handle (const Incident &incident) final; + void handle (const Incident &incident) override; // --------------------------------------------------------------------------- // PRIVATE diff --git a/Rich/RichOnlineMonitors/src/CornerPixelTestPatternTool.h b/Rich/RichOnlineMonitors/src/CornerPixelTestPatternTool.h index 6e3d8b8df3c0fe19108429fd3d9474a20a9352f9..176d83de8139dd512079c7292edb0808aa5fd875 100755 --- a/Rich/RichOnlineMonitors/src/CornerPixelTestPatternTool.h +++ b/Rich/RichOnlineMonitors/src/CornerPixelTestPatternTool.h @@ -23,8 +23,8 @@ namespace Rich { CornerPixelTestPattern(const std::string &type, const std::string &name, const IInterface *parent); - virtual StatusCode initialize() final; - virtual StatusCode finalize() final; + StatusCode initialize() override; + StatusCode finalize() override; /*! * Returns a vector of smart IDs which specify the test pattern hits for the given HPD. @@ -39,7 +39,7 @@ namespace Rich { * If the smart ID contains subpixel information then an ALICE mode pattern * is returned, if not then an LHCb mode pattern. */ - virtual LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool=false) const; + LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool=false) const override; /*! * Return the dimensions of a single HPD test pattern. @@ -53,7 +53,7 @@ namespace Rich { * @param yMin Minimum bin value for the y-axis of the histogram. * @param yMax Maximum bin value for the y-axis of the histogram. */ - virtual StatusCode histogramDimensions(Rich::DetectorType, int &nBinsX, double &xMin, double &xMax, int &nBinsY, double &yMin, double &yMax) const; + StatusCode histogramDimensions(Rich::DetectorType, int &nBinsX, double &xMin, double &xMax, int &nBinsY, double &yMin, double &yMax) const override; /*! * Takes a pixel x/y coordinates from a HPD histogram and converts it to a @@ -75,14 +75,14 @@ namespace Rich { * few bins as possible while maintaining the test pattern shape to ensure it is * recognisable. */ - virtual StatusCode plotCoordinates(Rich::DetectorType, bool, int hpdX, int hpdY, int &patternX, int &patternY, bool=false) const; + StatusCode plotCoordinates(Rich::DetectorType, bool, int hpdX, int hpdY, int &patternX, int &patternY, bool=false) const override; /*! * Returns the total number of hits on the test pattern. * * @return int Total number of pixels in the test pattern. */ - virtual int totalTestPatternPixels() const; + int totalTestPatternPixels() const override; private: diff --git a/Rich/RichOnlineMonitors/src/HPDCountTool.h b/Rich/RichOnlineMonitors/src/HPDCountTool.h index 3717176ec740e9725a2f6916711d571274a0fb8f..d51c870a8a8ca32d72fca06ac04b5aed410e56d5 100755 --- a/Rich/RichOnlineMonitors/src/HPDCountTool.h +++ b/Rich/RichOnlineMonitors/src/HPDCountTool.h @@ -73,7 +73,7 @@ namespace Rich { const IInterface* parent); // Initialization of the tool after creation - virtual StatusCode initialize() final; + StatusCode initialize() override; /*! * Takes a HPD smart ID and compares the number of hits to the upper limit specified in the @@ -88,7 +88,7 @@ namespace Rich { * The test keeps track of the number of times that it has seen a noisey event on the given * HPD and will only report an error if it is seen more than the NoiseyTolerance option. */ - virtual StatusCode performTest(const LHCb::RichSmartID &hitHPD, int nHits, ErrorReport &errReport) final; + StatusCode performTest(const LHCb::RichSmartID &hitHPD, int nHits, ErrorReport &errReport) override; private: diff --git a/Rich/RichOnlineMonitors/src/HalfDiagonalPixelTestPatternTool.h b/Rich/RichOnlineMonitors/src/HalfDiagonalPixelTestPatternTool.h index 648bd0f42c7bd517705a36044af17c1679476fdf..02694b7bc0476df0099e17d2b1fdc5d7f7514da1 100644 --- a/Rich/RichOnlineMonitors/src/HalfDiagonalPixelTestPatternTool.h +++ b/Rich/RichOnlineMonitors/src/HalfDiagonalPixelTestPatternTool.h @@ -23,8 +23,8 @@ namespace Rich { HalfDiagonalPixelTestPattern(const std::string &type, const std::string &name, const IInterface *parent); - virtual StatusCode initialize() final; - virtual StatusCode finalize()final ; + StatusCode initialize() override; + StatusCode finalize() override; /*! * Returns a vector of smart IDs which specify the test pattern hits for the given HPD. @@ -39,7 +39,7 @@ namespace Rich { * If the smart ID contains subpixel information then an ALICE mode pattern * is returned, if not then an LHCb mode pattern. */ - virtual LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool invertRows) const; + LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool invertRows) const override; /*! * Return the dimensions of a single HPD test pattern. @@ -55,7 +55,7 @@ namespace Rich { * * All values are returned by reference and will be -1 in the event that the detector type is invalid. */ - virtual StatusCode histogramDimensions(Rich::DetectorType rich, int &nBinsX, double &xMin, double &xMax, int &nBinsY, double &yMin, double &yMax) const; + StatusCode histogramDimensions(Rich::DetectorType rich, int &nBinsX, double &xMin, double &xMax, int &nBinsY, double &yMin, double &yMax) const override; /*! * Takes a pixel x/y coordinates from a HPD histogram and converts it to a @@ -77,14 +77,14 @@ namespace Rich { * few bins as possible while maintaining the test pattern shape to ensure it is * recognisable. */ - virtual StatusCode plotCoordinates(Rich::DetectorType rich, bool alice, int hpdX, int hpdY, int &patternX, int &patternY, bool invertRows=false) const; + StatusCode plotCoordinates(Rich::DetectorType rich, bool alice, int hpdX, int hpdY, int &patternX, int &patternY, bool invertRows=false) const override; /*! * Returns the total number of hits on the test pattern. * * @return int Total number of pixels in the test pattern. */ - virtual int totalTestPatternPixels() const; + int totalTestPatternPixels() const override; private: diff --git a/Rich/RichOnlineMonitors/src/HotPixelReport.h b/Rich/RichOnlineMonitors/src/HotPixelReport.h index ed4f9013f7270b26ecead8cf4bc6add6e9aaa229..84fcc66a23e44db58b92c35b581f9b76a38c615b 100755 --- a/Rich/RichOnlineMonitors/src/HotPixelReport.h +++ b/Rich/RichOnlineMonitors/src/HotPixelReport.h @@ -36,9 +36,9 @@ namespace Rich const std::string& name, const IInterface* parent); - virtual int FillArray( const LHCb::RichSmartID &hitHPD, - const LHCb::RichSmartID::Vector &pixelHits ) final; - virtual StatusCode PerformTest(int evts, std::list<ErrorReport> * reports) final; + int FillArray( const LHCb::RichSmartID &hitHPD, + const LHCb::RichSmartID::Vector &pixelHits ) override; + StatusCode PerformTest(int evts, std::list<ErrorReport> * reports) override; private: diff --git a/Rich/RichOnlineMonitors/src/IRichTestTool.h b/Rich/RichOnlineMonitors/src/IRichTestTool.h index 13b49732babe5f5d3cc7c48fd38a0d56cfd0f0c0..89f73a94e7155d8e633a9b7f0c8a9fc318f4a589 100755 --- a/Rich/RichOnlineMonitors/src/IRichTestTool.h +++ b/Rich/RichOnlineMonitors/src/IRichTestTool.h @@ -38,7 +38,6 @@ public: // Return the interface ID static const InterfaceID& interfaceID() { return IID_IRichTestTool; } - virtual int performTest(TH2D *H,ErrorReport &instat,std::list<ErrorReport> * reports)=0; virtual int performTest(TH1D *H,ErrorReport &instat,std::list<ErrorReport> * reports)=0; diff --git a/Rich/RichOnlineMonitors/src/RichCalibMonitor.cpp b/Rich/RichOnlineMonitors/src/RichCalibMonitor.cpp index f765800cb0930013ad69a5b435f093641d65ed2e..74336e0b5f0fb7373b7de19ae5d1d509dfe1ea71 100755 --- a/Rich/RichOnlineMonitors/src/RichCalibMonitor.cpp +++ b/Rich/RichOnlineMonitors/src/RichCalibMonitor.cpp @@ -246,39 +246,31 @@ StatusCode CalibMonitor::execute() // // main loop - get all RICH SmartIDs corresponding to HPDs/hits // - const Rich::DAQ::L1Map &l1Map = m_SmartIDDecoder->allRichSmartIDs(); + const auto &l1Map = m_SmartIDDecoder->allRichSmartIDs(); if ( msgLevel(MSG::VERBOSE) ) verbose() << "L1 map has size " << l1Map.size() << endmsg; - for ( Rich::DAQ::L1Map::const_iterator iL1Map = l1Map.begin(); - iL1Map != l1Map.end(); ++iL1Map ) + for ( auto iL1Map = l1Map.begin(); iL1Map != l1Map.end(); ++iL1Map ) { - //const Rich::DAQ::Level1HardwareID l1HardID = iL1Map->first; - //const Rich::DAQ::Level1LogicalID l1LogicalID = m_RichSys->level1LogicalID(l1HardID); - const Rich::DAQ::IngressMap &ingressMap = iL1Map->second; + const auto &ingressMap = iL1Map->second; if ( msgLevel(MSG::VERBOSE) ) verbose() << "IngressMap has size " << ingressMap.size() << endmsg; - for ( Rich::DAQ::IngressMap::const_iterator iIngressMap = ingressMap.begin(); - iIngressMap != ingressMap.end(); ++iIngressMap ) + for ( auto iIngressMap = ingressMap.begin(); iIngressMap != ingressMap.end(); ++iIngressMap ) { - //const Rich::DAQ::L1IngressID & l1IngressID = iIngressMap->first; - const Rich::DAQ::IngressInfo & ingressInfo = iIngressMap->second; + const auto & ingressInfo = iIngressMap->second; - const Rich::DAQ::HPDMap &hpdMap = ingressInfo.hpdData(); + const auto &hpdMap = ingressInfo.pdData(); if ( msgLevel(MSG::VERBOSE) ) verbose() << "HPD map has size " << hpdMap.size() << endmsg; - for ( Rich::DAQ::HPDMap::const_iterator iHPDMap = hpdMap.begin(); - iHPDMap != hpdMap.end(); ++iHPDMap ) + for ( auto iHPDMap = hpdMap.begin(); iHPDMap != hpdMap.end(); ++iHPDMap ) { - //const Rich::DAQ::Level1Input l1Input = iHPDMap->first; - //const Rich::DAQ::L1InputWithinIngress l1InputIngress = l1Input.l1InputWithinIngress(); - const Rich::DAQ::HPDInfo &hpdInfo = iHPDMap->second; - const LHCb::RichSmartID & smartIDHPD = hpdInfo.hpdID(); + const auto &hpdInfo = iHPDMap->second; + const auto &smartIDHPD = hpdInfo.pdID(); // check for valid HPD if (!smartIDHPD.isValid() ) @@ -294,7 +286,7 @@ StatusCode CalibMonitor::execute() //const Rich::DAQ::HPDHardwareID hardID = m_RichSys->hardwareID(smartIDHPD); // corresponding hardware ID //const Rich::DAQ::Level0ID l0ID = m_RichSys->level0ID(smartIDHPD); // L0 - const LHCb::RichSmartID::Vector &hitSmartIDs = hpdInfo.smartIDs(); // vector of SmartIDs with hits + const auto &hitSmartIDs = hpdInfo.smartIDs(); // vector of SmartIDs with hits // const Rich::DetectorType richDetector = smartIDHPD.rich(); // Count hits diff --git a/Rich/RichOnlineMonitors/src/RichCalibMonitor.h b/Rich/RichOnlineMonitors/src/RichCalibMonitor.h index e2b01d1a1dca2a3edd0b64e6d0f8c137d02ceb30..3737ab44947fd9945bba87039021a22e1ba57e60 100755 --- a/Rich/RichOnlineMonitors/src/RichCalibMonitor.h +++ b/Rich/RichOnlineMonitors/src/RichCalibMonitor.h @@ -62,9 +62,9 @@ namespace Rich /// Standard constructor CalibMonitor( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize () final; ///< Algorithm finalization + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization private: diff --git a/Rich/RichOnlineMonitors/src/RichDAQMonitor.cpp b/Rich/RichOnlineMonitors/src/RichDAQMonitor.cpp index 1090732ed715fa24f04d844776a7ade30fadaa32..8a7b5e224003cbb32eb0cc36046eb1539639b777 100755 --- a/Rich/RichOnlineMonitors/src/RichDAQMonitor.cpp +++ b/Rich/RichOnlineMonitors/src/RichDAQMonitor.cpp @@ -84,8 +84,7 @@ StatusCode DAQMonitor::initialize() // vector<int> of hardwareIDs of all monitored HPDs for histogram showing which HPD has hits std::vector<int> hardIDVec; hardIDVec.reserve(activeHPDs.size()); - for ( LHCb::RichSmartID::Vector::const_iterator iHPD = activeHPDs.begin(); - iHPD != activeHPDs.end(); ++iHPD ) + for ( auto iHPD = activeHPDs.begin(); iHPD != activeHPDs.end(); ++iHPD ) { hardIDVec.push_back( (deRichSys()->hardwareID(*iHPD)).data() ); }// for iHPD @@ -468,7 +467,7 @@ StatusCode DAQMonitor::execute() // int nAllHits = 0; // number of hits seen in total so far in this event - const Rich::DAQ::L1Map & l1Map = smartIDDecoder()->allRichSmartIDs(m_TaeLocation); + const auto & l1Map = smartIDDecoder()->allRichSmartIDs(m_TaeLocation); if ( msgLevel(MSG::VERBOSE) ) verbose() << "L1 map has size " << l1Map.size() << endmsg; @@ -479,13 +478,13 @@ StatusCode DAQMonitor::execute() // to use each time. Saves repeatedly constructing one. const std::string emptyString(""); - for ( Rich::DAQ::L1Map::const_iterator iL1Map = l1Map.begin(); iL1Map != l1Map.end(); ++iL1Map ) + for ( auto iL1Map = l1Map.begin(); iL1Map != l1Map.end(); ++iL1Map ) { - const Rich::DAQ::Level1HardwareID l1HardID = iL1Map->first; - const Rich::DAQ::Level1LogicalID l1LogicalID = deRichSys()->level1LogicalID(l1HardID); - const Rich::DAQ::IngressMap& ingressMap = iL1Map->second; - const Rich::DetectorType richDetector = deRichSys()->richDetector(l1HardID); + const auto l1HardID = iL1Map->first; + const auto l1LogicalID = deRichSys()->level1LogicalID(l1HardID); + const auto& ingressMap = iL1Map->second; + const auto richDetector = deRichSys()->richDetector(l1HardID); bool UKL1HasSuppressedIngress = false; @@ -495,17 +494,16 @@ StatusCode DAQMonitor::execute() << " L1 logical ID " << l1LogicalID << " IngressMap has size " << ingressMap.size() << endmsg; - for ( Rich::DAQ::IngressMap::const_iterator iIngressMap = ingressMap.begin(); - iIngressMap != ingressMap.end(); ++iIngressMap) + for ( auto iIngressMap = ingressMap.begin(); iIngressMap != ingressMap.end(); ++iIngressMap) { - const Rich::DAQ::L1IngressID & l1IngressID = iIngressMap->first; - const Rich::DAQ::IngressInfo & ingressInfo = iIngressMap->second; + const auto & l1IngressID = iIngressMap->first; + const auto & ingressInfo = iIngressMap->second; // // check Ingress Header information // - const Rich::DAQ::L1IngressHeader &ingressHeader = ingressInfo.ingressHeader(); + const auto &ingressHeader = ingressInfo.ingressHeader(); if ( msgLevel(MSG::VERBOSE) ) { verbose() << "IngressHeader Event ID " << ingressHeader.eventID() @@ -610,21 +608,20 @@ StatusCode DAQMonitor::execute() } // if checkOdin - const Rich::DAQ::HPDMap & hpdMap = ingressInfo.hpdData(); + const auto & hpdMap = ingressInfo.pdData(); if ( msgLevel(MSG::VERBOSE) ) verbose() << "HPD map has size " << hpdMap.size() << endmsg; int nInhibitedHPDs = 0; - for ( Rich::DAQ::HPDMap::const_iterator iHPDMap = hpdMap.begin(); - iHPDMap != hpdMap.end(); ++iHPDMap ) + for ( auto iHPDMap = hpdMap.begin(); iHPDMap != hpdMap.end(); ++iHPDMap ) { - const Rich::DAQ::Level1Input l1Input = iHPDMap->first; - const Rich::DAQ::HPDInfo& hpdInfo = iHPDMap->second; + const auto l1Input = iHPDMap->first; + const auto& hpdInfo = iHPDMap->second; - const Rich::DAQ::L1InputWithinIngress l1InputIngress = l1Input.l1InputWithinIngress(); - const LHCb::RichSmartID& smartIDHPD = hpdInfo.hpdID(); + const auto l1InputIngress = l1Input.l1InputWithinIngress(); + const auto& smartIDHPD = hpdInfo.pdID(); // // TEMPORARY - Skip 4 inhibited HPDs. To be removed at Sept TS // //============================================================ diff --git a/Rich/RichOnlineMonitors/src/RichDAQMonitor.h b/Rich/RichOnlineMonitors/src/RichDAQMonitor.h index 2cc9a535593484dc76898918946abf7f6449ee72..8e7df00df27c3c12372dd77c234abd4d25050319 100755 --- a/Rich/RichOnlineMonitors/src/RichDAQMonitor.h +++ b/Rich/RichOnlineMonitors/src/RichDAQMonitor.h @@ -56,9 +56,9 @@ namespace Rich /// Standard constructor DAQMonitor( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode finalize () final; ///< Algorithm finalization - virtual StatusCode execute () final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode finalize () override; ///< Algorithm finalise + StatusCode execute () override; ///< Algorithm execution private: diff --git a/Rich/RichOnlineMonitors/src/RichHPDImageMovement.cpp b/Rich/RichOnlineMonitors/src/RichHPDImageMovement.cpp index 562d516f8aa7534a87d43a04a3cee4a0fab8c44e..432f8abaa7d568c709e35322233c4057c3831e7c 100644 --- a/Rich/RichOnlineMonitors/src/RichHPDImageMovement.cpp +++ b/Rich/RichOnlineMonitors/src/RichHPDImageMovement.cpp @@ -99,14 +99,14 @@ namespace Rich int icounter = 0; - for ( m_iter = m_map.begin() ; m_iter != m_map.end() ; ++m_iter ){ + for ( auto iter = m_map.begin() ; iter != m_map.end() ; ++iter ){ - if ( NULL == m_iter->second ) { + if ( NULL == iter->second ) { warning() << " Problem initializing HPD objects " << endmsg; return StatusCode::FAILURE; } - unsigned int intID = m_iter->first ; + unsigned int intID = iter->first ; Rich::DAQ::Level0ID hardID( intID ); @@ -179,21 +179,16 @@ namespace Rich } // Standard loop over Rich Smart IDs - const Rich::DAQ::L1Map& mapUKL1 = m_SmartIDDecoder->allRichSmartIDs(); - Rich::DAQ::L1Map::const_iterator iUKL1; - - for ( iUKL1 = mapUKL1.begin(); iUKL1 != mapUKL1.end(); ++iUKL1 ){ - const Rich::DAQ::IngressMap& mapIngress = iUKL1->second; - Rich::DAQ::IngressMap::const_iterator iIngress; - - for ( iIngress = mapIngress.begin(); iIngress != mapIngress.end(); ++iIngress ){ - - const Rich::DAQ::HPDMap& mapHPD = (iIngress->second).hpdData() ; - Rich::DAQ::HPDMap::const_iterator iHPD; - - for ( iHPD = mapHPD.begin(); iHPD != mapHPD.end(); ++iHPD ){ - - const LHCb::RichSmartID &smartID = (iHPD->second).hpdID(); + const auto & mapUKL1 = m_SmartIDDecoder->allRichSmartIDs(); + for ( auto iUKL1 = mapUKL1.begin(); iUKL1 != mapUKL1.end(); ++iUKL1 ) + { + const auto & mapIngress = iUKL1->second; + for ( auto iIngress = mapIngress.begin(); iIngress != mapIngress.end(); ++iIngress ) + { + const auto & mapHPD = (iIngress->second).pdData() ; + for ( auto iHPD = mapHPD.begin(); iHPD != mapHPD.end(); ++iHPD ) + { + const auto & smartID = (iHPD->second).pdID(); if ( !smartID.isValid() ) { if ( m_displayWarnings ) { @@ -202,17 +197,15 @@ namespace Rich continue; } - const Rich::DAQ::Level0ID hardID = m_RichSys->level0ID( smartID );; - const LHCb::RichSmartID::Vector& hitIDs = (iHPD->second).smartIDs() ; - - LHCb::RichSmartID::Vector::const_iterator iHit; + const auto hardID = m_RichSys->level0ID( smartID );; + const auto& hitIDs = (iHPD->second).smartIDs() ; IRichHPDImageCentre* hpdCentre = m_map[hardID.data()]; // Update the HPD image position with each hit if ( hpdCentre ) { - for ( iHit = hitIDs.begin(); iHit != hitIDs.end(); ++iHit ) + for ( auto iHit = hitIDs.begin(); iHit != hitIDs.end(); ++iHit ) { if ( hpdCentre->update( iHit->pixelCol(), iHit->pixelRow() ) ) { @@ -249,10 +242,10 @@ namespace Rich { if ( msgLevel(MSG::DEBUG) ) debug() << " Updating histograms" << endmsg; - for ( m_iter = m_map.begin() ; m_iter != m_map.end() ; ++m_iter ){ - unsigned int intID = m_iter->first; - m_histo[intID]->fill( (m_iter->second)->averageCol(), - (m_iter->second)->averageRow() ); + for ( auto iter = m_map.begin() ; iter != m_map.end() ; ++iter ){ + unsigned int intID = iter->first; + m_histo[intID]->fill( (iter->second)->averageCol(), + (iter->second)->averageRow() ); } return ; @@ -272,8 +265,8 @@ namespace Rich debug() << " Algorithm has seen " << m_nEvt << " events" << endmsg; } - for ( m_iter = m_map.begin() ; m_iter != m_map.end() ; ++m_iter ){ - delete m_iter->second; + for ( auto iter = m_map.begin() ; iter != m_map.end() ; ++iter ){ + delete iter->second; } m_histo.clear() ; diff --git a/Rich/RichOnlineMonitors/src/RichHPDImageMovement.h b/Rich/RichOnlineMonitors/src/RichHPDImageMovement.h index 0503fbf8a927e62a446631d59fe86897faae84d4..134803c4a4c0d932be43d897163645f55876eda3 100644 --- a/Rich/RichOnlineMonitors/src/RichHPDImageMovement.h +++ b/Rich/RichOnlineMonitors/src/RichHPDImageMovement.h @@ -28,7 +28,7 @@ namespace Rich class IRichHPDImageCentre { public: - virtual ~IRichHPDImageCentre() {}; + virtual ~IRichHPDImageCentre() {} virtual const double& averageCol() const = 0; virtual const double& averageRow() const = 0; virtual bool update( const int COL, const int ROW ) = 0; @@ -44,11 +44,10 @@ namespace Rich virtual ~RichHPDImageCentreWithCuts() ; - bool update( const int COL , const int ROW ) ; - - const double& averageCol() const ; - const double& averageRow() const ; + bool update( const int COL , const int ROW ) override; + const double& averageCol() const override; + const double& averageRow() const override; protected: @@ -86,12 +85,12 @@ namespace Rich virtual ~RichHPDImageCentre() ; - bool update( const int COL , const int ROW ) ; + bool update( const int COL , const int ROW ) override; // void reset() ; - const double& averageCol() const ; - const double& averageRow() const ; + const double& averageCol() const override; + const double& averageRow() const override; private: @@ -124,11 +123,11 @@ namespace Rich virtual ~RichHPDImageMovement( ); ///< Destructor - virtual StatusCode initialize(); ///< Algorithm initialization + StatusCode initialize() override; ///< Algorithm initialization - virtual StatusCode execute (); ///< Algorithm execution + StatusCode execute () override; ///< Algorithm execution - virtual StatusCode finalize (); ///< Algorithm finalization + StatusCode finalize () override; ///< Algorithm finalization protected: @@ -136,7 +135,7 @@ namespace Rich const double COL, const double ROW ); - void updateHistograms() ; + void updateHistograms(); private: @@ -171,9 +170,6 @@ namespace Rich /// Map between RichHardID and object describing image centre std::map< unsigned int , IRichHPDImageCentre* > m_map ; - /// Iterator for map - std::map< unsigned int, IRichHPDImageCentre* >::iterator m_iter ; - /// Histograms std::map< unsigned int, AIDA::IHistogram2D*> m_histo; std::map< unsigned int, AIDA::IHistogram2D*>::iterator m_histoiter; diff --git a/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.cpp b/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.cpp index e3002315c3ce9ed6121b58ac28773ea254c2e696..80b6de6b62c2e441be58d3977f9cda93c7bf7dc8 100755 --- a/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.cpp +++ b/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.cpp @@ -123,10 +123,9 @@ StatusCode HPDNHitMonitor::initialize() } std::string taeEventList; - for ( std::vector<std::string>::const_iterator taeIter = m_taeEvents.begin(); - taeIter != m_taeEvents.end(); ++taeIter ) + for ( const auto& taeIter : m_taeEvents ) { - taeEventList.append(*taeIter); + taeEventList.append(taeIter); } if ( !taeEventList.empty() ) info() << "Add to histogram name : " << taeEventList << endmsg; @@ -310,38 +309,35 @@ StatusCode HPDNHitMonitor::execute() // // main loop - get all RICH SmartIDs corresponding to HPDs/hits // - const Rich::DAQ::L1Map &l1Map = smartIDDecoder()->allRichSmartIDs(m_taeEvents); + const auto &l1Map = smartIDDecoder()->allRichSmartIDs(m_taeEvents); if ( msgLevel(MSG::VERBOSE) ) verbose() << "L1 map has size " << l1Map.size() << endmsg; - for ( Rich::DAQ::L1Map::const_iterator iL1Map = l1Map.begin(); - iL1Map != l1Map.end(); ++iL1Map ) + for ( const auto& L1 : l1Map ) { - const Rich::DAQ::Level1HardwareID l1HardID = iL1Map->first; - const Rich::DAQ::IngressMap &ingressMap = iL1Map->second; + const auto l1HardID = L1.first; + const auto &ingressMap = L1.second; if ( msgLevel(MSG::VERBOSE) ) verbose() << "IngressMap has size " << ingressMap.size() << endmsg; - for ( Rich::DAQ::IngressMap::const_iterator iIngressMap = ingressMap.begin(); - iIngressMap != ingressMap.end(); ++iIngressMap ) + for ( const auto ingress : ingressMap ) { - const Rich::DAQ::L1IngressID & l1IngressID = iIngressMap->first; - const Rich::DAQ::IngressInfo & ingressInfo = iIngressMap->second; + const auto & l1IngressID = ingress.first; + const auto & ingressInfo = ingress.second; - const Rich::DAQ::HPDMap & hpdMap = ingressInfo.hpdData(); + const auto & hpdMap = ingressInfo.pdData(); if ( msgLevel(MSG::VERBOSE) ) verbose() << "HPD map has size " << hpdMap.size() << endmsg; - for ( Rich::DAQ::HPDMap::const_iterator iHPDMap = hpdMap.begin(); - iHPDMap != hpdMap.end(); ++iHPDMap ) + for ( const auto& HPD : hpdMap ) { - const Rich::DAQ::Level1Input &l1Input = iHPDMap->first; // SmartID of HPD with hits - const Rich::DAQ::L1InputWithinIngress &l1InputIngress = l1Input.l1InputWithinIngress(); - const Rich::DAQ::HPDInfo &hpdInfo = iHPDMap->second; - const LHCb::RichSmartID &smartIDHPD = hpdInfo.hpdID(); + const auto &l1Input = HPD.first; // SmartID of HPD with hits + const auto &l1InputIngress = l1Input.l1InputWithinIngress(); + const auto &hpdInfo = HPD.second; + const auto &smartIDHPD = hpdInfo.pdID(); // check for valid HPD if (!smartIDHPD.isValid() ) @@ -358,9 +354,9 @@ StatusCode HPDNHitMonitor::execute() continue; } //if inhibit - const Rich::DAQ::HPDHardwareID hardID = deRichSys()->hardwareID(smartIDHPD); // corresponding hardware ID - const LHCb::RichSmartID::Vector & hitSmartIDs = hpdInfo.smartIDs(); // vector of SmartIDs with hits - const Rich::DetectorType richDetector = smartIDHPD.rich(); + const auto hardID = deRichSys()->hardwareID(smartIDHPD); // corresponding hardware ID + const auto & hitSmartIDs = hpdInfo.smartIDs(); // vector of SmartIDs with hits + const auto richDetector = smartIDHPD.rich(); nAllHits += hitSmartIDs.size(); nHits = hitSmartIDs.size(); @@ -374,8 +370,8 @@ StatusCode HPDNHitMonitor::execute() << " #hits " << nHits << " #hits so far " << m_NHitMap[hardID] << endmsg; - for ( LHCb::RichSmartID::Vector::const_iterator iHit = hitSmartIDs.begin(); - iHit != hitSmartIDs.end(); ++iHit ) + for ( auto iHit = hitSmartIDs.cbegin(); + iHit != hitSmartIDs.cend(); ++iHit ) { verbose() << "Next hit at" << (*iHit) << endmsg; } diff --git a/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.h b/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.h index 01f01a6cebf7d9d99d54eca79ee43a791c5a84ab..f7f470f4188492abfea262365149e600329edb6c 100755 --- a/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.h +++ b/Rich/RichOnlineMonitors/src/RichHPDNHitMonitor.h @@ -69,9 +69,9 @@ namespace Rich /// Standard constructor HPDNHitMonitor( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize () final; ///< Algorithm finalization + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization // --------------------------------------------------------------------------- // PRIVATE Methods diff --git a/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.cpp b/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.cpp index a552a3e60122f6f86267570034acf25da52dbada..7a6dc49c308be62f4f43dc29b47408a52ede9515 100755 --- a/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.cpp +++ b/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.cpp @@ -123,7 +123,7 @@ namespace Rich { ++m_allEvents; // Event number used for hot/cold pixel finder // Get the smart IDs. - const Rich::DAQ::L1Map &allSmartIDs = mp_SmartIDDecoder->allRichSmartIDs(); + const auto &allSmartIDs = mp_SmartIDDecoder->allRichSmartIDs(); // Loop over all HPDs/Pixels and fill the histograms if (msgLevel(MSG::VERBOSE)) @@ -142,19 +142,17 @@ namespace Rich { std::list<TH2D*> hotPixHistos; // Loop over L1 boards - for (Rich::DAQ::L1Map::const_iterator iL1 = allSmartIDs.begin(); - iL1 != allSmartIDs.end(); ++iL1) + for ( auto iL1 = allSmartIDs.begin(); iL1 != allSmartIDs.end(); ++iL1) { // loop over ingresses for this L1 board - for (Rich::DAQ::IngressMap::const_iterator iIn = iL1->second.begin(); - iIn != iL1->second.end(); ++iIn) + for ( auto iIn = iL1->second.begin(); iIn != iL1->second.end(); ++iIn) { // Loop over HPDs in this ingress - for (Rich::DAQ::HPDMap::const_iterator iAllSmartIDs= iIn->second.hpdData().begin(); - iAllSmartIDs != iIn->second.hpdData().end(); ++iAllSmartIDs) + for ( auto iAllSmartIDs = iIn->second.pdData().begin(); + iAllSmartIDs != iIn->second.pdData().end(); ++iAllSmartIDs) { - const Rich::DAQ::HPDInfo &hpdInfo = iAllSmartIDs->second; - const LHCb::RichSmartID &smartIDHPD = hpdInfo.hpdID(); + const auto &hpdInfo = iAllSmartIDs->second; + const auto &smartIDHPD = hpdInfo.pdID(); // Check for valid HPD if (!smartIDHPD.isValid() ) { @@ -170,7 +168,7 @@ namespace Rich { }// HPD active // Get the HPD hits. - const LHCb::RichSmartID::Vector &smartIDHits = hpdInfo.smartIDs(); + const auto &smartIDHits = hpdInfo.smartIDs(); // Now perform the HPD count test, if necessary. if (m_hpdCntEnabled) { diff --git a/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.h b/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.h index 57aea37c0def59a83ac9eb2add07414cf5321d8d..e3f00f72a0916ca9379d2de6771b203db0e9f4cd 100755 --- a/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.h +++ b/Rich/RichOnlineMonitors/src/RichHitMapsMonitor.h @@ -56,36 +56,29 @@ namespace Rich { * Only a default constructor is provided. The member variable must be initialised * once the object is constructed. */ - inline HitMapsInfo() - : mp_hitsPerHPDMap(NULL) - , mp_lowResHitMapLhcb(NULL) - , mp_highResHitMapLhcb(NULL) - , mp_lowResHitMapAlice(NULL) - , mp_highResHitMapAlice(NULL) - { - }// HitMapsInfo() + inline HitMapsInfo() = default; // The class has only a default constructor as we never own the pointer to the // histograms and it is up to Gaudi to deal with their deletion. ///< Stores a pointer to the hit per HPD hit map. - AIDA::IHistogram2D *mp_hitsPerHPDMap; + AIDA::IHistogram2D *mp_hitsPerHPDMap = nullptr; ///< Stores a pointer to the full resolution hit map for LHCb mode. - AIDA::IHistogram2D *mp_lowResHitMapLhcb; + AIDA::IHistogram2D *mp_lowResHitMapLhcb = nullptr; ///< Stores a pointer to the low resolution hit map for LHCb mode. - AIDA::IHistogram2D *mp_highResHitMapLhcb; + AIDA::IHistogram2D *mp_highResHitMapLhcb = nullptr; ///< Stores a pointer to the full resolution hit map for ALICE mode. - AIDA::IHistogram2D *mp_lowResHitMapAlice; + AIDA::IHistogram2D *mp_lowResHitMapAlice = nullptr; ///< Stores a pointer to the low resolution hit map for ALICE mode. - AIDA::IHistogram2D *mp_highResHitMapAlice; + AIDA::IHistogram2D *mp_highResHitMapAlice = nullptr; };// class HitMapsInfo public: HitMapsMonitor(const std::string& name, ISvcLocator* pSvcLocator ); ///< Constructor - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution private: /*! diff --git a/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.cpp b/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.cpp index c007e5ca5e9dfa383b546842db254cf82ffc125c..7b287d764ff5100f69c4d2c8a939d4d15f69af24 100755 --- a/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.cpp +++ b/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.cpp @@ -91,10 +91,10 @@ StatusCode MissingHPDMonitor::execute() { for ( const auto & ingress : L1.second ) { - for ( const auto & HPD : ingress.second.hpdData() ) + for ( const auto & HPD : ingress.second.pdData() ) { // HPD smart ID - const auto & smartIDHPD = HPD.second.hpdID(); + const auto & smartIDHPD = HPD.second.pdID(); // check for valid HPD if ( !smartIDHPD.isValid() ) { continue; } diff --git a/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.h b/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.h index 55041d835c46695ae5eefce5f388afc4dd8578e5..ef717bd0d9ad3b381c50da8190fa76cf45d508ce 100755 --- a/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.h +++ b/Rich/RichOnlineMonitors/src/RichMissingHPDMonitor.h @@ -57,9 +57,9 @@ namespace Rich /// Standard constructor MissingHPDMonitor( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize () final; ///< Algorithm finalization + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization // --------------------------------------------------------------------------- // PRIVATE Methods diff --git a/Rich/RichOnlineMonitors/src/RichOnlineAlarmTest.h b/Rich/RichOnlineMonitors/src/RichOnlineAlarmTest.h index 8ae0d82260e2e5623304a5af703cde1f19c8d3d2..5705cd2bcb15eb6fb87c83ffdc338e5572b2fa38 100755 --- a/Rich/RichOnlineMonitors/src/RichOnlineAlarmTest.h +++ b/Rich/RichOnlineMonitors/src/RichOnlineAlarmTest.h @@ -42,8 +42,8 @@ namespace Rich /// Standard constructor OnlineAlarmTest( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution private: diff --git a/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.cpp b/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.cpp index 1bf51207cb9f89fd5a9216cf873bdd1b958bd047..61a9e6e6e1375c521f2651a13a02183252938813 100755 --- a/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.cpp +++ b/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.cpp @@ -98,13 +98,13 @@ StatusCode HPDAnalysisAlg::processTAEEvent( const std::string & taeEvent ) { for ( const auto& ingress : L1.second ) { - for ( const auto& hpd : ingress.second.hpdData() ) + for ( const auto& hpd : ingress.second.pdData() ) { // HPD ID - const LHCb::RichSmartID & hpdID = hpd.second.hpdID(); + const auto & hpdID = hpd.second.pdID(); // Vector of SmartIDs - const LHCb::RichSmartID::Vector & rawIDs = hpd.second.smartIDs(); + const auto & rawIDs = hpd.second.smartIDs(); // Loop over HPD tools for ( const auto* t : m_tools ) diff --git a/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.h b/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.h index ae126d9a524bb9267b0a562a4c69d8902b0148be..fcf2e1482864a3afe614cc1549aab3aa1549a1e8 100755 --- a/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.h +++ b/Rich/RichOnlineMonitors/src/RichOnlineHPDAnalysisAlg.h @@ -51,8 +51,8 @@ namespace Rich /// Standard constructor HPDAnalysisAlg( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute() final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute() override; ///< Algorithm execution private: diff --git a/Rich/RichOnlineMonitors/src/RichRandomTestErrors.h b/Rich/RichOnlineMonitors/src/RichRandomTestErrors.h index 2262f1254d0ada03874983ba3e50db2eb726baf9..553bd2ffb74f6ae057b943dbde7c94da8df0bc61 100644 --- a/Rich/RichOnlineMonitors/src/RichRandomTestErrors.h +++ b/Rich/RichOnlineMonitors/src/RichRandomTestErrors.h @@ -34,9 +34,9 @@ namespace Rich /// Standard constructor RandomTestErrors( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution - virtual StatusCode finalize () final; ///< Algorithm finalization + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution + StatusCode finalize () override; ///< Algorithm finalization private: diff --git a/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.cpp b/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.cpp index 4a4770a6cf8c33b72b39ad277e71a9626b9454db..13b2a07ca624f782f20f458dd491ec1d07be55f7 100755 --- a/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.cpp +++ b/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.cpp @@ -248,7 +248,7 @@ StatusCode SingleEventSnapshot::execute() { for ( const auto& Ingress : UKL1.second ) { - for ( const auto& HPD : Ingress.second.hpdData() ) + for ( const auto& HPD : Ingress.second.pdData() ) { for ( const auto& hit : HPD.second.smartIDs() ) { diff --git a/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.h b/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.h index 0683126139c6828df0f891140129db784658f1b9..7434d69197687f79dd2c3aaee4183b3b88f4e9d9 100755 --- a/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.h +++ b/Rich/RichOnlineMonitors/src/RichSingleEventSnapshot.h @@ -67,8 +67,8 @@ namespace Rich /// Standard constructor SingleEventSnapshot( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; ///< Algorithm initialization - virtual StatusCode execute () final; ///< Algorithm execution + StatusCode initialize() override; ///< Algorithm initialization + StatusCode execute () override; ///< Algorithm execution // --------------------------------------------------------------------------- // PRIVATE diff --git a/Rich/RichOnlineMonitors/src/RichTestPatternMon.cpp b/Rich/RichOnlineMonitors/src/RichTestPatternMon.cpp index a4ed8820ca8cb78e6661363da10774521432cbfb..0316cdf0070c1cd7f19da9408339a591eead5759 100755 --- a/Rich/RichOnlineMonitors/src/RichTestPatternMon.cpp +++ b/Rich/RichOnlineMonitors/src/RichTestPatternMon.cpp @@ -270,48 +270,35 @@ StatusCode Rich::Mon::TestPatternMonitor::execute() //START LOOP OVER ACTIVE HPDs // // Obtain smart IDs of HPDs with hits from the raw decoding. - const Rich::DAQ::L1Map &l1Map(mp_decoder->allRichSmartIDs()); + const auto &l1Map ( mp_decoder->allRichSmartIDs() ); - // Iterate over all the HPDs getting to find the hits. - Rich::DAQ::L1Map::const_iterator iL1Map; - const Rich::DAQ::L1Map::const_iterator iL1MapBegin(l1Map.begin()); - const Rich::DAQ::L1Map::const_iterator iL1MapEnd(l1Map.end()); // Holds the L1 ID of the current L1 board in the loop. - - for (iL1Map=iL1MapBegin; iL1Map!=iL1MapEnd; ++iL1Map) + for ( const auto & L1 : l1Map ) { // We must search through the HPDs on a per Ingress FPGA basis. // const Rich::DAQ::Level1ID &l1ID(iL1Map->first); // could be useful one day, but commented out to suppress warning about unused variables. - const Rich::DAQ::IngressMap &ingressMap(iL1Map->second); + const auto &ingressMap(L1.second); // These are useful for error print out. - const Rich::DAQ::Level1HardwareID l1HardID(iL1Map->first); - const Rich::DetectorType richDetector(mp_richSys->richDetector(l1HardID)); - const Rich::DAQ::Level1LogicalID l1LogicalID(mp_richSys->level1LogicalID(l1HardID)); + const auto l1HardID(L1.first); + const auto richDetector(mp_richSys->richDetector(l1HardID)); + const auto l1LogicalID(mp_richSys->level1LogicalID(l1HardID)); // Iterate over the Ingress FPGAs to get the each HPD found on them. - Rich::DAQ::IngressMap::const_iterator iIngressMap; - const Rich::DAQ::IngressMap::const_iterator iIngressMapBegin(ingressMap.begin()); - const Rich::DAQ::IngressMap::const_iterator iIngressMapEnd(ingressMap.end()); - - for (iIngressMap=iIngressMapBegin; iIngressMap!=iIngressMapEnd; ++iIngressMap) + for ( auto & ingress : ingressMap ) { // Get a list of all the HPDs on this Ingress FPGA. - const Rich::DAQ::L1IngressID &l1IngressID = iIngressMap->first; - const Rich::DAQ::IngressInfo &ingressInfo(iIngressMap->second); - const Rich::DAQ::HPDMap &hpdMap(ingressInfo.hpdData()); + const auto &l1IngressID = ingress.first; + const auto &ingressInfo(ingress.second); + const auto &hpdMap(ingressInfo.pdData()); // Now we can loop over these HPDs for this Ingress FPGA and retrieve the hit map for this HPD. - Rich::DAQ::HPDMap::const_iterator iHPDMap; - const Rich::DAQ::HPDMap::const_iterator iHPDMapBegin(hpdMap.begin()); - const Rich::DAQ::HPDMap::const_iterator iHPDMapEnd(hpdMap.end()); - - for (iHPDMap=iHPDMapBegin; iHPDMap!=iHPDMapEnd; iHPDMap++) + for ( const auto & hpd : hpdMap ) { // Smart and hardware ID of the current HPD under observation. - const Rich::DAQ::Level1Input l1Input(iHPDMap->first); - const Rich::DAQ::HPDInfo &hpdInfo(iHPDMap->second); - const Rich::DAQ::L1InputWithinIngress l1InputIngress(l1Input.l1InputWithinIngress()); - const LHCb::RichSmartID &hpdSmartID(hpdInfo.hpdID()); + const auto l1Input(hpd.first); + const auto &hpdInfo(hpd.second); + const auto l1InputIngress(l1Input.l1InputWithinIngress()); + const auto &hpdSmartID(hpdInfo.pdID()); // Check for error conditions on the smart ID that would prevent us analysing the data. if (!hpdSmartID.isValid()) diff --git a/Rich/RichOnlineMonitors/src/RichTestPatternMon.h b/Rich/RichOnlineMonitors/src/RichTestPatternMon.h index 965b9f410f56697a39f4cd53b19734ae87460a50..2b1371a3491f6f615f2ec28ee838a59b388c0e91 100755 --- a/Rich/RichOnlineMonitors/src/RichTestPatternMon.h +++ b/Rich/RichOnlineMonitors/src/RichTestPatternMon.h @@ -184,13 +184,13 @@ namespace Rich { TestPatternMonitor(const std::string &name, ISvcLocator *pSvcLocator); /* Algorithm initialization. */ - virtual StatusCode initialize() final; + StatusCode initialize() override; /* Algorithm execution. */ - virtual StatusCode execute () final; + StatusCode execute () override; /* Algorithm finalization. */ - virtual StatusCode finalize () final; + StatusCode finalize () override; private: /*! diff --git a/Rich/RichOnlineMonitors/src/RowPixelTestPatternTool.h b/Rich/RichOnlineMonitors/src/RowPixelTestPatternTool.h index 9876a347e12ecfa3175cf3307ffd26b6a84c8065..e8a704456ef69823bf1c21e96489141afec06e8c 100644 --- a/Rich/RichOnlineMonitors/src/RowPixelTestPatternTool.h +++ b/Rich/RichOnlineMonitors/src/RowPixelTestPatternTool.h @@ -23,8 +23,8 @@ namespace Rich { RowPixelTestPattern(const std::string &type, const std::string &name, const IInterface *parent); - virtual StatusCode initialize() final; - virtual StatusCode finalize() final; + StatusCode initialize() override; + StatusCode finalize() override; /*! * Returns a vector of smart IDs which specify the test pattern hits for the given HPD. @@ -39,7 +39,7 @@ namespace Rich { * If the smart ID contains subpixel information then an ALICE mode pattern * is returned, if not then an LHCb mode pattern. */ - virtual LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool invertRows=false) const; + LHCb::RichSmartID::Vector testPatternHits(const LHCb::RichSmartID &hpdId, bool invertRows=false) const override; /*! * Return the dimensions of a single HPD test pattern. @@ -55,8 +55,10 @@ namespace Rich { * * All values are returned by reference and will be -1 in the event that the detector type is invalid. */ - virtual StatusCode histogramDimensions(Rich::DetectorType rich, int &nBinsX, double &xMin, double &xMax, int &nBinsY, double &yMin, double &yMax) const; - + StatusCode histogramDimensions(Rich::DetectorType rich, + int &nBinsX, double &xMin, double &xMax, + int &nBinsY, double &yMin, double &yMax) const override; + /*! * Takes a pixel x/y coordinates from a HPD histogram and converts it to a * HPD test pattern coordinate. @@ -77,14 +79,16 @@ namespace Rich { * few bins as possible while maintaining the test pattern shape to ensure it is * recognisable. */ - virtual StatusCode plotCoordinates(Rich::DetectorType rich, bool alice, int hpdX, int hpdY, int &patternX, int &patternY, bool invertRows=false) const; - + StatusCode plotCoordinates(Rich::DetectorType rich, bool alice, + int hpdX, int hpdY, + int &patternX, int &patternY, bool invertRows=false) const override; + /*! * Returns the total number of hits on the test pattern. * * @return int Total number of pixels in the test pattern. */ - virtual int totalTestPatternPixels() const; + int totalTestPatternPixels() const override; private: diff --git a/Rich/RichOnlineMonitors/src/Sleeper.h b/Rich/RichOnlineMonitors/src/Sleeper.h index 90146c99e2ad126370aeadfa0d11fa07de099ad4..df4702ccd8d932cb4e631f93a8e9f603b3cd7f84 100755 --- a/Rich/RichOnlineMonitors/src/Sleeper.h +++ b/Rich/RichOnlineMonitors/src/Sleeper.h @@ -23,15 +23,15 @@ namespace Rich // Standard constructor Sleeper( const std::string& name, ISvcLocator* pSvcLocator ); - virtual StatusCode initialize() final; // Algorithm initialization - virtual StatusCode execute () final; // Algorithm execution - virtual StatusCode finalize () final; // Algorithm finalization + virtual StatusCode initialize() override; // Algorithm initialization + virtual StatusCode execute () override; // Algorithm execution + virtual StatusCode finalize () override; // Algorithm finalization private: std::string m_myname; - int m_val1; - int m_val2; + int m_val1{0}; + int m_val2{0}; }; }