diff --git a/GaudiAud/src/CommonAuditor.h b/GaudiAud/src/CommonAuditor.h index 6ec42f5b1cc5347d2d17a3d2c3f54a47426a5ff7..44f15eca2a9cf8eb276c71c8a54b832c879c4fca 100644 --- a/GaudiAud/src/CommonAuditor.h +++ b/GaudiAud/src/CommonAuditor.h @@ -71,7 +71,7 @@ private: m_types = m_customTypes; } } - }; + } Gaudi::Property<std::vector<std::string>> m_types{ this, "EventTypes", {}, "list of event types to audit ([]=all, ['none']=none)" }; diff --git a/GaudiCommonSvc/include/GaudiCommonSvc/Annotation.h b/GaudiCommonSvc/include/GaudiCommonSvc/Annotation.h index cfaded9ba2821af3ff5f90a265ad0f9f34cc0798..3f5ddf8a95b9ff9ccd9fb60a7eeeb508b92a9e57 100644 --- a/GaudiCommonSvc/include/GaudiCommonSvc/Annotation.h +++ b/GaudiCommonSvc/include/GaudiCommonSvc/Annotation.h @@ -55,7 +55,7 @@ namespace AIDA { /// Internal private annotation item class struct AnnotationItem final { AnnotationItem( std::string k = "", std::string v = "", bool vis = true ) - : m_key( std::move( k ) ), m_value( std::move( v ) ), m_sticky( vis ){ /* nop */ }; + : m_key( std::move( k ) ), m_value( std::move( v ) ), m_sticky( vis ) {} ~AnnotationItem() = default; diff --git a/GaudiCommonSvc/src/ChronoStatSvc.h b/GaudiCommonSvc/src/ChronoStatSvc.h index 1800bde4e996e8a925d98da82e28c27874131a93..197eea590adeae51b819f38ef37eb7fc8c504fa0 100644 --- a/GaudiCommonSvc/src/ChronoStatSvc.h +++ b/GaudiCommonSvc/src/ChronoStatSvc.h @@ -156,7 +156,7 @@ private: static MSG::Level int2level( int l ) { return static_cast<MSG::Level>( std::max( std::min( l, static_cast<int>( MSG::FATAL ) ), static_cast<int>( MSG::NIL ) ) ); - }; + } // ============================================================================ /// chrono part ChronoMap m_chronoEntities; diff --git a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp index de0762d1a4fd6cc1e644c3f650dd8fc74733cdb0..da360ad6d2be4851c72758165ff461ea1b0de971 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp @@ -17,7 +17,6 @@ #include <GaudiKernel/MsgStream.h> #include <GaudiKernel/System.h> #include <GaudiKernel/TypeNameString.h> -#include <iostream> #ifndef _WIN32 # include <errno.h> #endif diff --git a/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp b/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp index be9b65908eaf7debb28e748bc2484e1f17a762fc..eb1ef3f40d858306393881a5756f596c8eb6804a 100644 --- a/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp +++ b/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp @@ -43,11 +43,6 @@ namespace { } } - template <typename Container, typename Predicate> - void erase_if( Container& c, Predicate pred ) { - return erase_if( c, std::begin( c ), std::end( c ), std::forward<Predicate>( pred ) ); - } - template <typename Container, typename Iterator, typename Predicate> void erase_if( Container& c, std::pair<Iterator, Iterator> range, Predicate pred ) { return erase_if( c, std::move( range.first ), std::move( range.second ), std::forward<Predicate>( pred ) ); diff --git a/GaudiExamples/TinyExperiment/src/CheckerAlg.cpp b/GaudiExamples/TinyExperiment/src/CheckerAlg.cpp index a3d24eefb58a85fcb8e9df6163598e6431608fdc..e8d60ce76a2e1c6f4f968c59ac47d1df496ab7c2 100644 --- a/GaudiExamples/TinyExperiment/src/CheckerAlg.cpp +++ b/GaudiExamples/TinyExperiment/src/CheckerAlg.cpp @@ -52,7 +52,7 @@ namespace Gaudi::Example::TinyExperiment { ++n_duplicatedTracks; } } - }; + } private: bool almostEqual( float a, float b ) const { return std::abs( a - b ) <= m_maxDeltaTheta; } diff --git a/GaudiFunctional/include/Gaudi/Functional/Consumer.h b/GaudiFunctional/include/Gaudi/Functional/Consumer.h index 966c68d38ed26106894d0f434f83a2667eab0e8e..1a911847a0ebf3feb7b2bf1eb85e5e3037de1b01 100644 --- a/GaudiFunctional/include/Gaudi/Functional/Consumer.h +++ b/GaudiFunctional/include/Gaudi/Functional/Consumer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -13,7 +13,8 @@ #include "details.h" #include "utilities.h" #include <GaudiKernel/FunctionalFilterDecision.h> -#include <utility> + +#include <tuple> namespace Gaudi::Functional { diff --git a/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h b/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h index 3dc8fc9e55f5f84a035031a73839163554ad3dbe..a70bf8a89aea6ba43388b7e480ab3fffee31c08a 100644 --- a/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h +++ b/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -13,8 +13,7 @@ #include "details.h" #include "utilities.h" #include <GaudiKernel/FunctionalFilterDecision.h> -#include <type_traits> -#include <utility> +#include <tuple> namespace Gaudi::Functional { diff --git a/GaudiFunctional/include/Gaudi/Functional/Producer.h b/GaudiFunctional/include/Gaudi/Functional/Producer.h index f05ec7304acb1e984810a66e39093883e427176c..bcdf764779ebbce4d4d1fa5adbf5987faccdceb4 100644 --- a/GaudiFunctional/include/Gaudi/Functional/Producer.h +++ b/GaudiFunctional/include/Gaudi/Functional/Producer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -11,7 +11,8 @@ #pragma once #include "Transformer.h" -#include <utility> + +#include <tuple> namespace Gaudi::Functional { diff --git a/GaudiFunctional/include/Gaudi/Functional/Transformer.h b/GaudiFunctional/include/Gaudi/Functional/Transformer.h index 736bc80cf20b7bb9f7fccf4c07d582463a374072..6c3c34d00cdd9841ad619b08a00b8ccbabdecd40 100644 --- a/GaudiFunctional/include/Gaudi/Functional/Transformer.h +++ b/GaudiFunctional/include/Gaudi/Functional/Transformer.h @@ -14,7 +14,7 @@ #include "utilities.h" #include <GaudiKernel/FunctionalFilterDecision.h> #include <GaudiKernel/GaudiException.h> -#include <type_traits> +#include <tuple> #include <utility> // Adapt an Algorithm (by default, Gaudi::Algorithm) so that derived classes diff --git a/GaudiFunctional/include/Gaudi/Functional/details.h b/GaudiFunctional/include/Gaudi/Functional/details.h index 0b4ba7717797cd53c27fe199a3b453711223e711..c7c6f5f2f3d1f059baeafc646c4bf774e365c9da 100644 --- a/GaudiFunctional/include/Gaudi/Functional/details.h +++ b/GaudiFunctional/include/Gaudi/Functional/details.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -22,7 +22,6 @@ #include <range/v3/view/const.hpp> #include <range/v3/view/zip.hpp> #include <sstream> -#include <stdexcept> #include <type_traits> // upstream has renamed namespace ranges::view ranges::views diff --git a/GaudiFunctional/include/Gaudi/Functional/utilities.h b/GaudiFunctional/include/Gaudi/Functional/utilities.h index 6149d785ea9b649964ac81e639b97da59cb50c87..cdd4c32160400c30266ff4ddf52f60d5ce8b108a 100644 --- a/GaudiFunctional/include/Gaudi/Functional/utilities.h +++ b/GaudiFunctional/include/Gaudi/Functional/utilities.h @@ -13,8 +13,6 @@ #include <GaudiKernel/DataObjectHandle.h> #include <GaudiKernel/SerializeSTL.h> #include <boost/algorithm/string/join.hpp> -#include <initializer_list> -#include <string> namespace Gaudi::Functional { diff --git a/GaudiHive/options/CFinViewTest.py b/GaudiHive/options/CFinViewTest.py index f609806220e1df68e5b9e0ec413d94663bc3fc27..55e733542b752c7d1d110742c35af1f31057db5f 100644 --- a/GaudiHive/options/CFinViewTest.py +++ b/GaudiHive/options/CFinViewTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env gaudirun.py ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -28,7 +28,6 @@ Six instances of ViewTester are used as follows: from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, - CPUCruncher, Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, diff --git a/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py b/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py index 519850aad47d320f1cb7527372e90161db4fa14e..5206de853d8a5aee7b98e529869e0413ae2d9ddf 100644 --- a/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py +++ b/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py @@ -1,6 +1,6 @@ #!/usr/bin/env gaudirun.py ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -12,7 +12,6 @@ """Test a CF configuration with an algorithm shared between branches that can terminate early.""" from Configurables import ( - AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, Gaudi__Sequencer, diff --git a/GaudiHive/options/SubSlotVsSlotIsolation.py b/GaudiHive/options/SubSlotVsSlotIsolation.py index 2006dff058686ad0832c0684c3d98d8ca22ad434..80fe83ec55e22a163364963a143a3729f407ef24 100644 --- a/GaudiHive/options/SubSlotVsSlotIsolation.py +++ b/GaudiHive/options/SubSlotVsSlotIsolation.py @@ -1,6 +1,6 @@ #!/usr/bin/env gaudirun.py ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -29,7 +29,6 @@ The test should stall if isolation is working from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, - CPUCruncher, Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, diff --git a/GaudiHive/options/ViewIsolationTest.py b/GaudiHive/options/ViewIsolationTest.py index af2ff07bbd22fa86fa04b08da6d8a45114177611..f62d6d800a8f6e245bef83b71213206d1f408c02 100644 --- a/GaudiHive/options/ViewIsolationTest.py +++ b/GaudiHive/options/ViewIsolationTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env gaudirun.py ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -29,7 +29,6 @@ Five instances of ViewTester are used as follows: from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, - CPUCruncher, Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, diff --git a/GaudiHive/src/AlgTask.h b/GaudiHive/src/AlgTask.h index b330641a9fbbd8b890ac6dd676d0493f348e1cb0..0de5756fdad892ff379a42c1b956cb524fbc3703 100644 --- a/GaudiHive/src/AlgTask.h +++ b/GaudiHive/src/AlgTask.h @@ -36,7 +36,7 @@ namespace Gaudi { class AlgTask { public: AlgTask( AvalancheSchedulerSvc* scheduler, ISvcLocator* svcLocator, IAlgExecStateSvc* aem, bool asynchronous ) - : m_scheduler( scheduler ), m_aess( aem ), m_serviceLocator( svcLocator ), m_asynchronous( asynchronous ){}; + : m_scheduler( scheduler ), m_aess( aem ), m_serviceLocator( svcLocator ), m_asynchronous( asynchronous ) {} void operator()() const { diff --git a/GaudiHive/src/AlgsExecutionStates.h b/GaudiHive/src/AlgsExecutionStates.h index 639169087c468aff830fa0054bd353be12199a52..d9ab4a6490cb8e7274a263dc3cada130ec8a27c2 100644 --- a/GaudiHive/src/AlgsExecutionStates.h +++ b/GaudiHive/src/AlgsExecutionStates.h @@ -56,7 +56,7 @@ public: m_algsInState[INITIAL].reserve( algsNumber ); for ( unsigned int i = 0; i < algsNumber; ++i ) m_algsInState[INITIAL].insert( i ); - }; + } StatusCode set( unsigned int iAlgo, State newState ); @@ -66,7 +66,7 @@ public: for ( auto& algs : m_algsInState ) algs.clear(); m_algsInState[INITIAL].reserve( m_states.size() ); for ( unsigned int i = 0; i < m_states.size(); ++i ) m_algsInState[INITIAL].insert( i ); - }; + } /// check if the collection contains at least one state of requested type bool contains( State state ) const { return m_algsInState[state].size() > 0; } @@ -82,7 +82,7 @@ public: // states change during scheduler loop over set, so cannot return reference const boost::container::flat_set<int> algsInState( State state ) const { return m_algsInState[state]; } - const State& operator[]( unsigned int i ) const { return m_states.at( i ); }; + const State& operator[]( unsigned int i ) const { return m_states.at( i ); } size_t size() const { return m_states.size(); } diff --git a/GaudiHive/src/AvalancheSchedulerSvc.h b/GaudiHive/src/AvalancheSchedulerSvc.h index 0e9e40780835e97a0c673edb220a2ecd102603a3..4474b4177754e56cf614697b115b96c30e7628d4 100644 --- a/GaudiHive/src/AvalancheSchedulerSvc.h +++ b/GaudiHive/src/AvalancheSchedulerSvc.h @@ -249,13 +249,13 @@ private: std::thread m_thread; /// Convert a name to an integer - inline unsigned int algname2index( const std::string& algoname ) { return m_algname_index_map[algoname]; }; + inline unsigned int algname2index( const std::string& algoname ) { return m_algname_index_map[algoname]; } /// Map to bookkeep the information necessary to the name2index conversion std::unordered_map<std::string, unsigned int> m_algname_index_map; /// Convert an integer to a name - inline const std::string& index2algname( unsigned int index ) { return m_algname_vect[index]; }; + inline const std::string& index2algname( unsigned int index ) { return m_algname_vect[index]; } /// Vector to bookkeep the information necessary to the index2name conversion std::vector<std::string> m_algname_vect; @@ -321,7 +321,7 @@ private: /// Struct to hold entries in the alg queues struct TaskSpec { /// Default constructor - TaskSpec(){}; + TaskSpec() {} TaskSpec( IAlgorithm* algPtr, unsigned int algIndex, const std::string& algName, unsigned int algRank, bool asynchronous, int slotIndex, EventContext* eventContext ) : algPtr( algPtr ) @@ -330,7 +330,7 @@ private: , algRank( algRank ) , asynchronous( asynchronous ) , slotIndex( slotIndex ) - , contextPtr( eventContext ){}; + , contextPtr( eventContext ) {} /// Copy constructor (to keep a lambda capturing a TaskSpec storable as a std::function value) TaskSpec( const TaskSpec& ) = default; /// Assignment operator @@ -377,7 +377,7 @@ public: bool next( TaskSpec& ts, bool asynchronous ) { if ( asynchronous ) { return m_scheduledAsynchronousQueue.try_pop( ts ); } return m_scheduledQueue.try_pop( ts ); - }; + } }; #endif // GAUDIHIVE_AVALANCHESCHEDULERSVC_H diff --git a/GaudiHive/src/CPUCruncher.cpp b/GaudiHive/src/CPUCruncher.cpp index 4c80245dadd2cb3de3515bcb4f381a41ff8d7c2f..c8c061b1d06d524a45b26027e48c59c980d0e41e 100644 --- a/GaudiHive/src/CPUCruncher.cpp +++ b/GaudiHive/src/CPUCruncher.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -17,7 +17,6 @@ #include <tbb/blocked_range.h> #include <tbb/parallel_for.h> #include <tbb/tick_count.h> -#include <thread> CPUCruncher::CHM CPUCruncher::m_name_ncopies_map; diff --git a/GaudiHive/src/EventSlot.h b/GaudiHive/src/EventSlot.h index d0a92d726482a6c3d808b8c58efbc5148e1013c1..8c8ace2e507a7d41722b677b09f9896777033980 100644 --- a/GaudiHive/src/EventSlot.h +++ b/GaudiHive/src/EventSlot.h @@ -24,7 +24,7 @@ struct EventSlot { /// Construct a slot EventSlot( unsigned int numberOfAlgorithms, unsigned int numberOfControlFlowNodes, SmartIF<IMessageSvc> MS ) - : algsStates( numberOfAlgorithms, MS ), controlFlowState( numberOfControlFlowNodes, -1 ){}; + : algsStates( numberOfAlgorithms, MS ), controlFlowState( numberOfControlFlowNodes, -1 ) {} /// Copy constructor EventSlot( const EventSlot& ) = delete; @@ -43,7 +43,7 @@ struct EventSlot { , entryPoint( nodeName ) , parentSlot( &original ) { algsStates.reset(); - }; + } /// Reset all resources in order to reuse the slot (thread-unsafe) void reset( EventContext* theeventContext ) { @@ -55,7 +55,7 @@ struct EventSlot { parentSlot = nullptr; subSlotsByNode.clear(); allSubSlots.clear(); - }; + } /// Add a subslot to the slot (this constructs a new slot and registers it with the parent one) void addSubSlot( std::unique_ptr<EventContext> viewContext, const std::string& nodeName ) { diff --git a/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h b/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h index 52c58d55bb02ffd5470a03905666aa9d8ec61d1c..e977745b6287f6995ce114e59edf865ea9e763bc 100644 --- a/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h +++ b/GaudiHive/src/PRGraph/PrecedenceRulesGraph.h @@ -490,7 +490,7 @@ namespace concurrency { , m_algorithm( algoPtr ) , m_algoIndex( algoIndex ) , m_algoName( algoPtr->name() ) - , m_isAsynchronous( algoPtr->isAsynchronous() ){}; + , m_isAsynchronous( algoPtr->isAsynchronous() ) {} /// Visitor entry point bool accept( IGraphVisitor& visitor ) override; @@ -644,7 +644,7 @@ namespace concurrency { void addHeadNode( const std::string& headName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted ); /// Get head node - DecisionNode* getHeadNode() const { return m_headNode; }; + DecisionNode* getHeadNode() const { return m_headNode; } /// Add algorithm node StatusCode addAlgorithmNode( Gaudi::Algorithm* daughterAlgo, const std::string& parentName ); /// Get the AlgorithmNode from by algorithm name using graph index @@ -670,7 +670,7 @@ namespace concurrency { void printState( std::stringstream& output, EventSlot& slot, const unsigned int& recursionLevel ) const; /// BGL-based facilities - void enableAnalysis() { m_enableAnalysis = true; }; + void enableAnalysis() { m_enableAnalysis = true; } PRVertexDesc node( const std::string& ) const; /// Print out all data origins and destinations, as reflected in the EF graph diff --git a/GaudiHive/src/PRGraph/Visitors/IGraphVisitor.h b/GaudiHive/src/PRGraph/Visitors/IGraphVisitor.h index 87d99021b62fbb7e900631993bd701c2d1889a46..4229dbf1379b5407e76d351316e02923c7d465da 100644 --- a/GaudiHive/src/PRGraph/Visitors/IGraphVisitor.h +++ b/GaudiHive/src/PRGraph/Visitors/IGraphVisitor.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -22,19 +22,19 @@ namespace concurrency { public: virtual ~IGraphVisitor() = default; - virtual bool visitEnter( DecisionNode& ) const { return true; }; - virtual bool visit( DecisionNode& ) { return true; }; + virtual bool visitEnter( DecisionNode& ) const { return true; } + virtual bool visit( DecisionNode& ) { return true; } - virtual bool visitEnter( AlgorithmNode& ) const { return true; }; - virtual bool visit( AlgorithmNode& ) { return true; }; + virtual bool visitEnter( AlgorithmNode& ) const { return true; } + virtual bool visit( AlgorithmNode& ) { return true; } - virtual bool visitEnter( DataNode& ) const { return true; }; - virtual bool visit( DataNode& ) { return true; }; + virtual bool visitEnter( DataNode& ) const { return true; } + virtual bool visit( DataNode& ) { return true; } - virtual bool visitEnter( ConditionNode& ) const { return true; }; - virtual bool visit( ConditionNode& ) { return true; }; + virtual bool visitEnter( ConditionNode& ) const { return true; } + virtual bool visit( ConditionNode& ) { return true; } - virtual void reset(){}; + virtual void reset() {} }; } // namespace concurrency diff --git a/GaudiHive/src/PRGraph/Visitors/Promoters.h b/GaudiHive/src/PRGraph/Visitors/Promoters.h index 8e84fde77ae09ee5b44b8d02eb26903c2673ccb3..d5e820eb921a17e16edbcdc5b89921d59f401ce0 100644 --- a/GaudiHive/src/PRGraph/Visitors/Promoters.h +++ b/GaudiHive/src/PRGraph/Visitors/Promoters.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -22,7 +22,7 @@ namespace concurrency { public: /// Constructor DataReadyPromoter( EventSlot& slot, const Cause& cause, bool ifTrace = false ) - : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ){}; + : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {} using IGraphVisitor::visit; using IGraphVisitor::visitEnter; @@ -49,7 +49,7 @@ namespace concurrency { public: /// Constructor DecisionUpdater( EventSlot& slot, const Cause& cause, bool ifTrace = false ) - : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ){}; + : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {} using IGraphVisitor::visit; @@ -65,7 +65,7 @@ namespace concurrency { public: /// Constructor Supervisor( EventSlot& slot, const Cause& cause, bool ifTrace = false ) - : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ){}; + : m_slot( &slot ), m_cause( cause ), m_trace( ifTrace ) {} using IGraphVisitor::visit; using IGraphVisitor::visitEnter; @@ -87,7 +87,7 @@ namespace concurrency { class RunSimulator : public IGraphVisitor { public: /// Constructor - RunSimulator( EventSlot& slot, const Cause& cause ) : m_slot( &slot ), m_cause( cause ){}; + RunSimulator( EventSlot& slot, const Cause& cause ) : m_slot( &slot ), m_cause( cause ) {} using IGraphVisitor::visit; using IGraphVisitor::visitEnter; @@ -100,7 +100,7 @@ namespace concurrency { bool visit( AlgorithmNode& ) override; - void reset() override { m_nodesSucceeded = 0; }; + void reset() override { m_nodesSucceeded = 0; } EventSlot* m_slot; Cause m_cause; diff --git a/GaudiHive/src/PRGraph/Visitors/Rankers.h b/GaudiHive/src/PRGraph/Visitors/Rankers.h index 4692f24365c85d809e490a89894c77236a489c79..6b23a1110c9ffcd2eb0046a29ff4452cdced76bc 100644 --- a/GaudiHive/src/PRGraph/Visitors/Rankers.h +++ b/GaudiHive/src/PRGraph/Visitors/Rankers.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -30,7 +30,7 @@ namespace concurrency { using IGraphVisitor::visit; bool visit( AlgorithmNode& ) override; - void reset() override { m_nodesSucceeded = 0; }; + void reset() override { m_nodesSucceeded = 0; } void runThroughAdjacents( boost::graph_traits<precedence::PrecTrace>::vertex_descriptor, precedence::PrecTrace ); diff --git a/GaudiHive/src/PRGraph/Visitors/Validators.h b/GaudiHive/src/PRGraph/Visitors/Validators.h index 1855082c107d6a7fd09060f05421df3723560051..0ff0a4359c8d8f1fac205c86a10991ea37a37671 100644 --- a/GaudiHive/src/PRGraph/Visitors/Validators.h +++ b/GaudiHive/src/PRGraph/Visitors/Validators.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -30,14 +30,14 @@ namespace concurrency { using IGraphVisitor::visit; using IGraphVisitor::visitEnter; - bool visitEnter( AlgorithmNode& ) const override { return false; }; - bool visitEnter( DataNode& ) const override { return false; }; - bool visitEnter( ConditionNode& ) const override { return false; }; + bool visitEnter( AlgorithmNode& ) const override { return false; } + bool visitEnter( DataNode& ) const override { return false; } + bool visitEnter( ConditionNode& ) const override { return false; } bool visit( DecisionNode& ) override; - std::string reply() const { return m_status.str(); }; - bool passed() const { return !m_foundViolations; }; + std::string reply() const { return m_status.str(); } + bool passed() const { return !m_foundViolations; } void reset() override { m_foundViolations = false; m_status.clear(); @@ -53,23 +53,23 @@ namespace concurrency { public: /// Constructor ActiveLineageScout( const EventSlot* slot, const ControlFlowNode& node ) - : m_slot( slot ), m_startNode( node ), m_previousNodeName( node.name() ){}; + : m_slot( slot ), m_startNode( node ), m_previousNodeName( node.name() ) {} using IGraphVisitor::visit; using IGraphVisitor::visitEnter; - bool visitEnter( AlgorithmNode& ) const override { return false; }; - bool visitEnter( DataNode& ) const override { return false; }; - bool visitEnter( ConditionNode& ) const override { return false; }; + bool visitEnter( AlgorithmNode& ) const override { return false; } + bool visitEnter( DataNode& ) const override { return false; } + bool visitEnter( ConditionNode& ) const override { return false; } bool visit( DecisionNode& ) override; void reset() override { m_active = true; m_previousNodeName = m_startNode.name(); - }; + } - virtual bool reply() const { return m_active; }; + virtual bool reply() const { return m_active; } virtual void visitParents( DecisionNode& ); @@ -85,7 +85,7 @@ namespace concurrency { public: /// Constructor SubSlotScout( const EventSlot* slot, const ControlFlowNode& node ) - : ActiveLineageScout( slot, node ), m_foundEntryPoint( slot->parentSlot == nullptr ){}; + : ActiveLineageScout( slot, node ), m_foundEntryPoint( slot->parentSlot == nullptr ) {} void reset() override { m_active = true; @@ -93,9 +93,9 @@ namespace concurrency { // Only look for an entry point if we're in a sub-slot m_foundEntryPoint = ( m_slot->parentSlot == nullptr ); m_previousNodeName = m_startNode.name(); - }; + } - bool reply() const override { return m_active && m_foundEntryPoint; }; + bool reply() const override { return m_active && m_foundEntryPoint; } void visitParents( DecisionNode& ) override; @@ -109,19 +109,19 @@ namespace concurrency { using IGraphVisitor::visit; using IGraphVisitor::visitEnter; - bool visitEnter( DataNode& ) const override { return false; }; - bool visitEnter( ConditionNode& ) const override { return false; }; + bool visitEnter( DataNode& ) const override { return false; } + bool visitEnter( ConditionNode& ) const override { return false; } bool visit( DecisionNode& ) override; bool visit( AlgorithmNode& ) override; - bool positive() const { return m_positive; }; - bool negative() const { return m_negative; }; + bool positive() const { return m_positive; } + bool negative() const { return m_negative; } void reset() override { m_positive = false; m_negative = false; - }; + } private: bool m_positive{ false }; @@ -134,8 +134,8 @@ namespace concurrency { using IGraphVisitor::visit; using IGraphVisitor::visitEnter; - bool visitEnter( AlgorithmNode& ) const override { return false; }; - bool visitEnter( DecisionNode& ) const override { return false; }; + bool visitEnter( AlgorithmNode& ) const override { return false; } + bool visitEnter( DecisionNode& ) const override { return false; } bool visit( DataNode& ) override; bool visit( ConditionNode& ) override; @@ -144,12 +144,12 @@ namespace concurrency { bool passed() const { return std::all_of( m_unconditionalProducers.begin(), m_unconditionalProducers.end(), []( const auto& pr ) { return pr.second.size() == 1; } ); - }; + } void reset() override { m_foundViolations = false; m_conditionalProducers.clear(); m_unconditionalProducers.clear(); - }; + } private: bool m_foundViolations{ false }; @@ -171,8 +171,8 @@ namespace concurrency { using IGraphVisitor::visit; using IGraphVisitor::visitEnter; - bool visitEnter( ConditionNode& ) const override { return false; }; - bool visitEnter( DecisionNode& ) const override { return false; }; + bool visitEnter( ConditionNode& ) const override { return false; } + bool visitEnter( DecisionNode& ) const override { return false; } bool visitEnter( AlgorithmNode& node ) const override { // check if the node was already visited return m_lowlinks.find( &node ) != m_lowlinks.end() ? false : true; @@ -183,7 +183,7 @@ namespace concurrency { bool passed() const { return m_scc.empty() || !std::any_of( m_scc.begin(), m_scc.end(), []( const auto& pr ) { return pr.second.size() > 1; } ); - }; + } std::string reply(); @@ -193,7 +193,7 @@ namespace concurrency { m_lowlinks.clear(); m_scc.clear(); m_status = std::ostringstream{ " No strongly connected components found in DF realm" }; - }; + } private: bool on_stack( const AlgorithmNode& node ) const { diff --git a/GaudiHive/src/PrecedenceSvc.h b/GaudiHive/src/PrecedenceSvc.h index f6aaea11b163ca36241ac83f8e5bacdaf3df6ccf..027125ac31e807589eb9c360a54663f24fe851b5 100644 --- a/GaudiHive/src/PrecedenceSvc.h +++ b/GaudiHive/src/PrecedenceSvc.h @@ -72,7 +72,7 @@ public: void dumpPrecedenceTrace( const EventSlot& ) override; /// Precedence rules accessor - const concurrency::PrecedenceRulesGraph* getRules() const { return &m_PRGraph; }; + const concurrency::PrecedenceRulesGraph* getRules() const { return &m_PRGraph; } private: StatusCode assembleCFRules( Gaudi::Algorithm*, const std::string&, unsigned int recursionDepth = 0 ); diff --git a/GaudiKernel/include/Gaudi/Accumulators.h b/GaudiKernel/include/Gaudi/Accumulators.h index 8a80f0346bf0b3fe48057ec2c79032cba344abd8..aa15bc812025c7f7e12afa1fc93e73e33b8e56e7 100644 --- a/GaudiKernel/include/Gaudi/Accumulators.h +++ b/GaudiKernel/include/Gaudi/Accumulators.h @@ -324,7 +324,7 @@ namespace Gaudi::Accumulators { struct BaseValueHandler<Arithmetic, atomicity::none> { using OutputType = Arithmetic; using InternalType = Arithmetic; - static constexpr OutputType getValue( const InternalType& v ) noexcept { return v; }; + static constexpr OutputType getValue( const InternalType& v ) noexcept { return v; } static Arithmetic exchange( InternalType& v, Arithmetic newv ) noexcept { return std::exchange( v, newv ); } }; @@ -337,7 +337,7 @@ namespace Gaudi::Accumulators { using InternalType = std::atomic<Arithmetic>; static constexpr OutputType getValue( const InternalType& v ) noexcept { return v.load( std::memory_order_relaxed ); - }; + } static Arithmetic exchange( InternalType& v, Arithmetic newv ) noexcept { return v.exchange( newv ); } }; @@ -356,7 +356,7 @@ namespace Gaudi::Accumulators { using typename BaseValueHandler<Arithmetic, atomicity::none>::OutputType; using typename BaseValueHandler<Arithmetic, atomicity::none>::InternalType; static constexpr OutputType DefaultValue() { return Arithmetic{}; } - static void merge( InternalType& a, Arithmetic b ) noexcept { a += b; }; + static void merge( InternalType& a, Arithmetic b ) noexcept { a += b; } }; /** @@ -386,7 +386,7 @@ namespace Gaudi::Accumulators { if ( DefaultValue() == b ) return; // avoid atomic operation if b is "0" } fetch_add( a, b ); - }; + } }; /** @@ -406,7 +406,7 @@ namespace Gaudi::Accumulators { static constexpr OutputType DefaultValue() { return Initial(); } static void merge( InternalType& a, Arithmetic b ) noexcept { if ( Compare{}( b, a ) ) a = b; - }; + } }; /** @@ -421,7 +421,7 @@ namespace Gaudi::Accumulators { Arithmetic prev_value = BaseValueHandler<Arithmetic, atomicity::full>::getValue( a ); while ( Compare{}( b, prev_value ) && !a.compare_exchange_weak( prev_value, b ) ) ; - }; + } }; /** @@ -662,7 +662,7 @@ namespace Gaudi::Accumulators { template <atomicity Atomicity, typename Arithmetic = double> struct SquareAccumulator : GenericAccumulator<Arithmetic, Arithmetic, Atomicity, Square> { using GenericAccumulator<Arithmetic, Arithmetic, Atomicity, Square>::GenericAccumulator; - Arithmetic sum2() const { return this->value(); }; + Arithmetic sum2() const { return this->value(); } }; /// helper functor for the TrueAccumulator @@ -678,7 +678,7 @@ namespace Gaudi::Accumulators { template <atomicity Atomicity, typename Arithmetic> struct TrueAccumulator : GenericAccumulator<Arithmetic, unsigned long, Atomicity, TrueTo1> { using GenericAccumulator<Arithmetic, unsigned long, Atomicity, TrueTo1>::GenericAccumulator; - unsigned long nTrueEntries() const { return this->value(); }; + unsigned long nTrueEntries() const { return this->value(); } }; /// helper functor for the FalseAccumulator @@ -694,7 +694,7 @@ namespace Gaudi::Accumulators { template <atomicity Atomicity, typename Arithmetic> struct FalseAccumulator : GenericAccumulator<Arithmetic, unsigned long, Atomicity, FalseTo1> { using GenericAccumulator<Arithmetic, unsigned long, Atomicity, FalseTo1>::GenericAccumulator; - unsigned long nFalseEntries() const { return this->value(); }; + unsigned long nFalseEntries() const { return this->value(); } }; /** @@ -705,7 +705,7 @@ namespace Gaudi::Accumulators { template <atomicity Atomicity, typename Arithmetic> struct BinomialAccumulator : AccumulatorSet<bool, Atomicity, bool, TrueAccumulator, FalseAccumulator> { using AccumulatorSet<bool, Atomicity, bool, TrueAccumulator, FalseAccumulator>::AccumulatorSet; - unsigned long nEntries() const { return this->nTrueEntries() + this->nFalseEntries(); }; + unsigned long nEntries() const { return this->nTrueEntries() + this->nFalseEntries(); } template <typename Result = fp_result_type<Arithmetic>> auto efficiency() const { diff --git a/GaudiKernel/include/Gaudi/Accumulators/StaticHistogram.h b/GaudiKernel/include/Gaudi/Accumulators/StaticHistogram.h index 53a90e08ad92973475f269b08f8430d9333d8b7d..950c93142e48046d5df0c9c158e3bfea72803425 100644 --- a/GaudiKernel/include/Gaudi/Accumulators/StaticHistogram.h +++ b/GaudiKernel/include/Gaudi/Accumulators/StaticHistogram.h @@ -132,7 +132,7 @@ namespace Gaudi::Accumulators { } else { return v; } - }; + } static RegularType exchange( InternalType& v, RegularType newv ) noexcept { if constexpr ( isAtomic ) { return { v.first.exchange( newv.first ), v.second.exchange( newv.second ) }; @@ -149,7 +149,7 @@ namespace Gaudi::Accumulators { a.first += b.first; a.second += b.second; } - }; + } }; /** @@ -198,7 +198,7 @@ namespace Gaudi::Accumulators { : GenericAccumulator<std::pair<Arithmetic, Arithmetic>, Arithmetic, Atomicity, WeightedSquare> { using GenericAccumulator<std::pair<Arithmetic, Arithmetic>, Arithmetic, Atomicity, WeightedSquare>::GenericAccumulator; - Arithmetic sum2() const { return this->value(); }; + Arithmetic sum2() const { return this->value(); } }; /** @@ -239,9 +239,9 @@ namespace Gaudi::Accumulators { details::requireValidTitle( m_title ); recomputeRatio(); for ( const auto& s : m_labels ) details::requireValidTitle( s ); - }; + } explicit Axis( Gaudi::Histo1DDef const& def ) - : Axis( (unsigned int)def.bins(), def.lowEdge(), def.highEdge(), def.title() ){}; + : Axis( (unsigned int)def.bins(), def.lowEdge(), def.highEdge(), def.title() ) {} /// returns the bin number for a given value, ranging from 0 (underflow) to nBins+1 (overflow) unsigned int index( Arithmetic value ) const { @@ -269,24 +269,24 @@ namespace Gaudi::Accumulators { bool inAcceptance( Arithmetic value ) const { return value >= m_minValue && value <= m_maxValue; } // accessors - unsigned int numBins() const { return nBins; }; + unsigned int numBins() const { return nBins; } void setNumBins( unsigned int n ) { nBins = n; recomputeRatio(); } - Arithmetic minValue() const { return m_minValue; }; + Arithmetic minValue() const { return m_minValue; } void setMinValue( Arithmetic v ) { m_minValue = v; recomputeRatio(); } - Arithmetic maxValue() const { return m_maxValue; }; + Arithmetic maxValue() const { return m_maxValue; } void setMaxValue( Arithmetic v ) { m_maxValue = v; recomputeRatio(); } - std::string const& title() const { return m_title; } - void setTitle( std::string const& t ) { m_title = t; }; - std::vector<std::string> const& labels() const { return m_labels; } + std::string const& title() const { return m_title; } + void setTitle( std::string const& t ) { m_title = t; } + std::vector<std::string> const labels() const { return m_labels; } private: /// title of this axis diff --git a/GaudiKernel/include/Gaudi/Histograming/Sink/Utils.h b/GaudiKernel/include/Gaudi/Histograming/Sink/Utils.h index a78dd0a121d3953c17c46237644347ce03436b73..40677d7bb843f68d1ac7ed6e046d78379059399f 100644 --- a/GaudiKernel/include/Gaudi/Histograming/Sink/Utils.h +++ b/GaudiKernel/include/Gaudi/Histograming/Sink/Utils.h @@ -440,7 +440,7 @@ namespace Gaudi::Histograming::Sink { histo.SetBinContent( i, sumWeight ); histo.setBinW2( i, sumWeight2 ); } - }; + } }; template <typename Traits> diff --git a/GaudiKernel/include/Gaudi/Property.h b/GaudiKernel/include/Gaudi/Property.h index 77c17fd3ca0684b5ee9e2d57463e384e81fc769d..fcc45b8d8ffeeef4fc914879cae19dc9b8cc97bf 100644 --- a/GaudiKernel/include/Gaudi/Property.h +++ b/GaudiKernel/include/Gaudi/Property.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2020 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -18,10 +18,8 @@ #include <GaudiKernel/SmartIF.h> #include <GaudiKernel/TaggedBool.h> #include <GaudiKernel/ToStream.h> -#include <stdexcept> #include <string> #include <string_view> -#include <typeinfo> #include <utility> namespace Gaudi { @@ -1068,7 +1066,7 @@ namespace Gaudi { template <unsigned N> StatusCode setProperty( IInterface* component, const std::string& name, const char ( &value )[N], const std::string& doc = "" ) { - if ( 0 == component ) { return StatusCode::FAILURE; } + if ( !component ) { return StatusCode::FAILURE; } return setProperty( component, name, std::string{ value, value + N }, doc ); } // ======================================================================== diff --git a/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h b/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h index 6ca86fc3c78cc39646a4083241aa220af9dbeaf9..4b785423ec65177ad219508af3ae272aef3add04 100644 --- a/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h +++ b/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h @@ -57,7 +57,7 @@ protected: T m_data; public: - AnyDataWrapper( T&& data ) : m_data{ std::move( data ) } {}; + AnyDataWrapper( T&& data ) : m_data{ std::move( data ) } {} AnyDataWrapper( AnyDataWrapper&& ) = delete; AnyDataWrapper( AnyDataWrapper const& ) = delete; AnyDataWrapper& operator=( AnyDataWrapper&& ) = delete; diff --git a/GaudiKernel/include/GaudiKernel/Auditor.h b/GaudiKernel/include/GaudiKernel/Auditor.h index cce83a0741c2ba7abad1bd5fcbddd81718115b4e..2ccd7d4eabf26a3d48cf517cc9f56103458cde5c 100644 --- a/GaudiKernel/include/GaudiKernel/Auditor.h +++ b/GaudiKernel/include/GaudiKernel/Auditor.h @@ -21,7 +21,6 @@ #include <GaudiKernel/ISvcLocator.h> /*used by service(..)*/ #include <GaudiKernel/PropertyHolder.h> #include <string> -#include <vector> // Forward declarations class IService; diff --git a/GaudiKernel/include/GaudiKernel/CommonMessaging.h b/GaudiKernel/include/GaudiKernel/CommonMessaging.h index 3844dfb5631956114ba633f895f776f8a5c7362b..839933467e7f26ad78ea5c352662c66d048acec2 100644 --- a/GaudiKernel/include/GaudiKernel/CommonMessaging.h +++ b/GaudiKernel/include/GaudiKernel/CommonMessaging.h @@ -26,7 +26,7 @@ #include <GaudiKernel/detected.h> #include <boost/thread/tss.hpp> -#include <memory> +#include <string> #include <utility> /** Templated class to add the standard messaging functionalities diff --git a/GaudiKernel/include/GaudiKernel/DataHandle.h b/GaudiKernel/include/GaudiKernel/DataHandle.h index 938a0ca6f72529d3506356b79c0ca9d216425c37..85398886dc096e4b9e0e67a9a3d2b1691114cc60 100644 --- a/GaudiKernel/include/GaudiKernel/DataHandle.h +++ b/GaudiKernel/include/GaudiKernel/DataHandle.h @@ -40,10 +40,10 @@ namespace Gaudi { enum Mode { Reader = 1 << 2, Writer = 1 << 4 }; DataHandle( DataObjID k, Mode a = Reader, IDataHandleHolder* owner = nullptr ) - : m_key( std::move( k ) ), m_owner( owner ), m_mode( a ){}; + : m_key( std::move( k ) ), m_owner( owner ), m_mode( a ) {} DataHandle( DataObjID k, bool isCond, Mode a = Reader, IDataHandleHolder* owner = nullptr ) - : m_key( std::move( k ) ), m_owner( owner ), m_mode( a ), m_isCond( isCond ){}; + : m_key( std::move( k ) ), m_owner( owner ), m_mode( a ), m_isCond( isCond ) {} using PropertyType = DataHandleProperty; @@ -60,7 +60,7 @@ namespace Gaudi { virtual const std::string& objKey() const { return m_key.key(); } virtual const DataObjID& fullKey() const { return m_key; } - virtual void reset( bool ){}; + virtual void reset( bool ) {} virtual std::string pythonRepr() const; virtual bool init() { return true; } diff --git a/GaudiKernel/include/GaudiKernel/DataStreamTool.h b/GaudiKernel/include/GaudiKernel/DataStreamTool.h index 40ab5c8ab419d1eaf70a6d0385c7821442001975..844b649922f25436261136b15eeed23bc45f7e7a 100644 --- a/GaudiKernel/include/GaudiKernel/DataStreamTool.h +++ b/GaudiKernel/include/GaudiKernel/DataStreamTool.h @@ -69,15 +69,15 @@ public: EventSelectorDataStream* lastStream() override; - size_type size() override { return m_streams.size(); }; + size_type size() override { return m_streams.size(); } StatusCode clear() override; - virtual Streams& getStreams() { return m_streams; }; + virtual Streams& getStreams() { return m_streams; } - virtual Streams::iterator beginOfStreams() { return m_streams.begin(); }; + virtual Streams::iterator beginOfStreams() { return m_streams.begin(); } - virtual Streams::iterator endOfStreams() { return m_streams.end(); }; + virtual Streams::iterator endOfStreams() { return m_streams.end(); } protected: StatusCode createSelector( const std::string&, const std::string&, IEvtSelector*& ) override; diff --git a/GaudiKernel/include/GaudiKernel/EventIDBase.h b/GaudiKernel/include/GaudiKernel/EventIDBase.h index b84ef254d557ad1537f789484fdf2ee9b82db7ab..d4741198824d79d473a923e0c26bd4e69653969d 100644 --- a/GaudiKernel/include/GaudiKernel/EventIDBase.h +++ b/GaudiKernel/include/GaudiKernel/EventIDBase.h @@ -76,7 +76,7 @@ public: public: /// \name structors //@{ - EventIDBase(){}; + EventIDBase() {} EventIDBase( number_type run_number, event_number_t event_number, number_type time_stamp = UNDEFNUM, number_type time_stamp_ns_offset = 0, number_type lumi_block = UNDEFNUM, number_type bunch_crossing_id = 0 ); @@ -162,22 +162,22 @@ public: static auto SortByTimeStamp() { return ::details::add_deref( ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_time_stamp, e.m_time_stamp_ns_offset ); } ) ); - }; + } static auto SortByRunEvent() { return ::details::add_deref( ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_run_number, e.m_event_number ); } ) ); - }; + } static auto SortByLumiEvent() { return ::details::add_deref( ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_lumi_block, e.m_event_number ); } ) ); - }; + } static auto SortByRunLumi() { return ::details::add_deref( ::details::make_cmp( []( const EventIDBase& e ) { return std::tie( e.m_run_number, e.m_lumi_block ); } ) ); - }; + } private: enum Type { Invalid = 0, RunEvent = 1 << 1, TimeStamp = 1 << 2, LumiEvent = 1 << 3, RunLumi = 1 << 4 }; diff --git a/GaudiKernel/include/GaudiKernel/EventIDRange.h b/GaudiKernel/include/GaudiKernel/EventIDRange.h index 99995f07e6dcd1cc3655ee2eb00405c8e31793d5..6d5e1399e27846c8ed6751f121d04a2a4c6b76fe 100644 --- a/GaudiKernel/include/GaudiKernel/EventIDRange.h +++ b/GaudiKernel/include/GaudiKernel/EventIDRange.h @@ -34,7 +34,7 @@ class EventIDRange { public: EventIDRange(); EventIDRange( const EventIDBase& start, const EventIDBase& stop ); - EventIDRange( const EventIDRange& r ) : m_start( r.m_start ), m_stop( r.m_stop ){}; + EventIDRange( const EventIDRange& r ) : m_start( r.m_start ), m_stop( r.m_stop ) {} EventIDRange& operator=( const EventIDRange& r ); const EventIDBase& start() const { return m_start; } diff --git a/GaudiKernel/include/GaudiKernel/GaudiHandle.h b/GaudiKernel/include/GaudiKernel/GaudiHandle.h index 7ecebde9dc61aed976dc64a70d7f81e0b5d36b89..4c48936df0b7685adcdcc09c8e834f06c2ad6604 100644 --- a/GaudiKernel/include/GaudiKernel/GaudiHandle.h +++ b/GaudiKernel/include/GaudiKernel/GaudiHandle.h @@ -19,7 +19,6 @@ #include <algorithm> #include <iostream> -#include <stdexcept> #include <string> #include <type_traits> #include <vector> diff --git a/GaudiKernel/include/GaudiKernel/IAlgExecStateSvc.h b/GaudiKernel/include/GaudiKernel/IAlgExecStateSvc.h index cd45a23fb7b3fb946b4e3b137f8cc792a1b70c35..f1123afbd78da9050b69df5aafe6b1173a0e5655 100644 --- a/GaudiKernel/include/GaudiKernel/IAlgExecStateSvc.h +++ b/GaudiKernel/include/GaudiKernel/IAlgExecStateSvc.h @@ -17,7 +17,6 @@ #include <GaudiKernel/StringKey.h> #include <map> #include <sstream> -#include <string> class EventContext; diff --git a/GaudiKernel/include/GaudiKernel/IDataProviderSvc.h b/GaudiKernel/include/GaudiKernel/IDataProviderSvc.h index 20c023ebc0de3851de8795edb1631dadd09d20e9..374e45a6046247fad7011b39655f246fa44f28db 100644 --- a/GaudiKernel/include/GaudiKernel/IDataProviderSvc.h +++ b/GaudiKernel/include/GaudiKernel/IDataProviderSvc.h @@ -38,7 +38,7 @@ class IRegistry; * itself - since the client claims back ownership. Note that this is a * very delicate operation - any reference to the object will be invalid. * Even worse: invalid references cannot be detected. - * <LI> Retrieve objects to the data store. Depending ont he + * <LI> Retrieve objects to the data store. Depending on the * availibility of the requested object in the data store the * represented object will be loaded if possible. * <LI> Find objects beeing present in the store without actually creating diff --git a/GaudiKernel/include/GaudiKernel/IFileMgr.h b/GaudiKernel/include/GaudiKernel/IFileMgr.h index b260b3730ec8c07170f25e789da87aca4441a06d..2a28447dfd32bd668ad42ba34b1a222c0cb3f79c 100644 --- a/GaudiKernel/include/GaudiKernel/IFileMgr.h +++ b/GaudiKernel/include/GaudiKernel/IFileMgr.h @@ -50,7 +50,7 @@ namespace Io { class IoFlags final { public: IoFlags() = default; - IoFlags( unsigned i ) : _f( i ){}; + IoFlags( unsigned i ) : _f( i ) {} unsigned f() const { return _f; } @@ -180,7 +180,7 @@ namespace Io { , m_iflags( fa ) , m_fptr( p ) , m_isOpen( o ) - , m_shared( s ){}; + , m_shared( s ) {} Fd fd() const { return m_fd; } const std::string& name() const { return m_name; } @@ -262,11 +262,11 @@ namespace Io { FileHdlr() = default; FileHdlr( IoTech t, bfcn_open_t o, bfcn_close_t c, bfcn_reopen_t r ) - : tech( t ), b_open_fcn( o ), b_close_fcn( c ), b_reopen_fcn( r ){}; + : tech( t ), b_open_fcn( o ), b_close_fcn( c ), b_reopen_fcn( r ) {} FileHdlr( IoTech t, bfcn_open_t o, bfcn_closeP_t c, bfcn_reopenP_t r ) - : tech( t ), b_open_fcn( o ), b_closeP_fcn( c ), b_reopenP_fcn( r ){}; + : tech( t ), b_open_fcn( o ), b_closeP_fcn( c ), b_reopenP_fcn( r ) {} FileHdlr( IoTech t, bfcn_open_t o, bfcn_close_t c1, bfcn_closeP_t c2, bfcn_reopen_t r1, bfcn_reopenP_t r2 ) - : tech( t ), b_open_fcn( o ), b_close_fcn( c1 ), b_closeP_fcn( c2 ), b_reopen_fcn( r1 ), b_reopenP_fcn( r2 ){}; + : tech( t ), b_open_fcn( o ), b_close_fcn( c1 ), b_closeP_fcn( c2 ), b_reopen_fcn( r1 ), b_reopenP_fcn( r2 ) {} }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/GaudiKernel/include/GaudiKernel/IScheduler.h b/GaudiKernel/include/GaudiKernel/IScheduler.h index 2adc1e9073a1c160421f024daedff8a153592431..479ea393dd6a1b77c4fa60009481afe37c545e4c 100644 --- a/GaudiKernel/include/GaudiKernel/IScheduler.h +++ b/GaudiKernel/include/GaudiKernel/IScheduler.h @@ -50,7 +50,7 @@ public: /// Get the free event processing slots virtual unsigned int freeSlots() = 0; - virtual void dumpState(){}; + virtual void dumpState() {} /// Method to inform the scheduler about event views virtual StatusCode scheduleEventView( const EventContext* sourceContext, const std::string& nodeName, diff --git a/GaudiKernel/include/GaudiKernel/MsgStream.h b/GaudiKernel/include/GaudiKernel/MsgStream.h index 75468a3de693aa7026a5e10d08e0baf06d98ae64..31c4a7675c78a875b0740a427479b773986f7a6c 100644 --- a/GaudiKernel/include/GaudiKernel/MsgStream.h +++ b/GaudiKernel/include/GaudiKernel/MsgStream.h @@ -19,7 +19,6 @@ #include <iomanip> #include <sstream> #include <string> -#include <vector> /** * @class MsgStream MsgStream.h GaudiKernel/MsgStream.h diff --git a/GaudiKernel/include/GaudiKernel/NamedRange.h b/GaudiKernel/include/GaudiKernel/NamedRange.h index 31149d59a592234fc6f7ef5404c78a050adf21a6..1d08818070bee3cdd00d9deaa78950d9cc5117e4 100644 --- a/GaudiKernel/include/GaudiKernel/NamedRange.h +++ b/GaudiKernel/include/GaudiKernel/NamedRange.h @@ -67,29 +67,29 @@ namespace Gaudi { * @param name name of the range */ NamedRange_( typename Base::iterator ibegin, typename Base::iterator iend, std::string name = "" ) - : Base( ibegin, iend ), m_name( std::move( name ) ){}; + : Base( ibegin, iend ), m_name( std::move( name ) ) {} /** constructor from the base class * @param base base objects * @param name name of the range */ - NamedRange_( const Base& base, std::string name = "" ) : Base( base ), m_name( std::move( name ) ){}; + NamedRange_( const Base& base, std::string name = "" ) : Base( base ), m_name( std::move( name ) ) {} /** constructor from the base class * @param base base objects * @param name name of the range */ - NamedRange_( const typename Base::Base& base, std::string name = "" ) : Base( base ), m_name( std::move( name ) ){}; + NamedRange_( const typename Base::Base& base, std::string name = "" ) : Base( base ), m_name( std::move( name ) ) {} /** constructor from the base class * @param base base objects * @param name name of the range */ NamedRange_( const typename Base::Container& base, std::string name = "" ) - : Base( base ), m_name( std::move( name ) ){}; + : Base( base ), m_name( std::move( name ) ) {} /* constructor of empty range/sequence * @param ibegin iterator to begin of empty sequence * @param name name of the range */ NamedRange_( typename Base::iterator ibegin, std::string name = "" ) - : Base( ibegin, ibegin ), m_name( std::move( name ) ){}; + : Base( ibegin, ibegin ), m_name( std::move( name ) ) {} /// destructor ~NamedRange_() = default; // ======================================================================== diff --git a/GaudiKernel/include/GaudiKernel/Range.h b/GaudiKernel/include/GaudiKernel/Range.h index 728c8b1b3794935e96974193aa65a034f6c4826b..f3faad94f2f936175223033ae08c12e4f1dd03ab 100644 --- a/GaudiKernel/include/GaudiKernel/Range.h +++ b/GaudiKernel/include/GaudiKernel/Range.h @@ -17,7 +17,6 @@ // ============================================================================ #include <algorithm> #include <utility> -#include <vector> // ============================================================================ // GaudiKernel // ============================================================================ diff --git a/GaudiKernel/include/GaudiKernel/SmartDataStorePtr.h b/GaudiKernel/include/GaudiKernel/SmartDataStorePtr.h index db0ed8af3c4e0d1e95ea5915ff1c84e8b8d80c93..c99ec9b9088e783ac5935fac816452bff716ccd9 100644 --- a/GaudiKernel/include/GaudiKernel/SmartDataStorePtr.h +++ b/GaudiKernel/include/GaudiKernel/SmartDataStorePtr.h @@ -29,19 +29,19 @@ residing in data stores. The class constructors take several arguments neccessary to be passed - tyo the data services in order to automatically load objects in case + to the data services in order to automatically load objects in case they are not yet loaded. This is achieved through a smart pointer mechanism i.e. by overloading the operator->() at dereferencing time - the the object will be requested from the store. + the object will be requested from the store. The SmartDataStorePtr is meant to be "short living". It only makes sense to keep an object instance within e.g. the scope of one method. "long living" instances do not make sense and in the contrary would be harmful, because the information passed during construction - to would be invalid and returned object pointers would actually + would be invalid and returned object pointers would actually point to hyperspace. - The intrinsic functionality, wether the object will be retrieved or + The intrinsic functionality, whether the object will be retrieved or loaded from the data store is defined by the LOADER::. @@ -64,7 +64,7 @@ public: */ SmartDataStorePtr( IDataProviderSvc* pService, IRegistry* pRegistry, std::string path ) : SmartDataObjectPtr( LOADER::access(), pService, pRegistry, std::move( path ) ), m_pObject( nullptr ) {} - /** Copy constructor: Construct an copy of a SmartDataStorePtr instance. + /** Copy constructor: Construct a copy of a SmartDataStorePtr instance. @param copy Copy of Smart Pointer to object. */ SmartDataStorePtr( const SmartDataObjectPtr& copy ) : SmartDataObjectPtr( copy ), m_pObject( nullptr ) {} diff --git a/GaudiKernel/include/GaudiKernel/StatEntity.h b/GaudiKernel/include/GaudiKernel/StatEntity.h index 7575c537509f20025b88627dfbc7b6624d02c0c3..ad0944e74d5fcef37c8d997828dc66a68f31ee62 100644 --- a/GaudiKernel/include/GaudiKernel/StatEntity.h +++ b/GaudiKernel/include/GaudiKernel/StatEntity.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -67,7 +67,7 @@ public: bool operator<( const StatEntity& se ) const { return std::make_tuple( nEntries(), sum(), min(), max(), sum2() ) < std::make_tuple( se.nEntries(), se.sum(), se.min(), se.max(), se.sum2() ); - }; + } // using AccumulatorSet::operator+=; StatEntity& operator+=( double by ) { this->AccumulatorSet::operator+=( by ); diff --git a/GaudiKernel/include/GaudiKernel/ToStream.h b/GaudiKernel/include/GaudiKernel/ToStream.h index 90d8f740fb6897f8b3b3060a939767a876e1991b..49a4873b4de39780922fea310bfde37a90420204 100644 --- a/GaudiKernel/include/GaudiKernel/ToStream.h +++ b/GaudiKernel/include/GaudiKernel/ToStream.h @@ -24,7 +24,6 @@ #include <set> #include <sstream> #include <string> -#include <type_traits> #include <unordered_set> #include <vector> // ============================================================================ diff --git a/GaudiKernel/src/Lib/Algorithm.cpp b/GaudiKernel/src/Lib/Algorithm.cpp index f4f10e012c782865cb7915fcd8fef5d584cf0def..95acf1e8991a44327e3b3d7e13ad0e8d8bcc0945 100644 --- a/GaudiKernel/src/Lib/Algorithm.cpp +++ b/GaudiKernel/src/Lib/Algorithm.cpp @@ -11,8 +11,6 @@ #include <Gaudi/Algorithm.h> #include <algorithm> -#include <numeric> -#include <set> #include <GaudiKernel/FunctionalFilterDecision.h> #include <GaudiKernel/IAlgContextSvc.h> diff --git a/GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp b/GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp index fceda2c5716a1beb22d5524b0408c949bc21cf56..4bc2c666dc3ee90a07427b636a264e9265b901bc 100644 --- a/GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp +++ b/GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp @@ -77,7 +77,7 @@ std::vector<const IDataHandleHolder*> DHHVisitor::owners_of( const DataObjID& id return { item->second.begin(), item->second.end() }; } return {}; -}; +} std::vector<std::string> DHHVisitor::owners_names_of( const DataObjID& id, bool with_main ) const { std::vector<std::string> tmp; @@ -86,7 +86,7 @@ std::vector<std::string> DHHVisitor::owners_names_of( const DataObjID& id, bool } if ( !tmp.empty() ) { std::sort( tmp.begin(), tmp.end() ); } return tmp; -}; +} MsgStream& DHHVisitor::report( MsgStream& stream ) const { // sort DataObjects by path so that logging is reproducible diff --git a/GaudiKernel/src/Lib/JobHistory.cpp b/GaudiKernel/src/Lib/JobHistory.cpp index a6d73e6a6492dfcbd020b69ef8fab5024c62a1b4..2a12d4948247aad4d109f3fb8db0573d07bb3790 100644 --- a/GaudiKernel/src/Lib/JobHistory.cpp +++ b/GaudiKernel/src/Lib/JobHistory.cpp @@ -30,9 +30,6 @@ using std::endl; using std::ostream; using std::string; -using std::vector; - -using Gaudi::Details::PropertyBase; //********************************************************************** // Member functions. diff --git a/GaudiKernel/src/Util/genconf.cpp b/GaudiKernel/src/Util/genconf.cpp index e19c20a1b3641864a6dbbedbf4d337cc62ed877c..efd58c1153ad0f56c6ad2fb13cb8bfb2890b64d5 100644 --- a/GaudiKernel/src/Util/genconf.cpp +++ b/GaudiKernel/src/Util/genconf.cpp @@ -75,7 +75,6 @@ namespace fs = boost::filesystem; #define LOG_ERROR BOOST_LOG_TRIVIAL( error ) #define LOG_WARNING BOOST_LOG_TRIVIAL( warning ) #define LOG_INFO BOOST_LOG_TRIVIAL( info ) -#define LOG_DEBUG BOOST_LOG_TRIVIAL( debug ) using namespace std; using Gaudi::Details::PropertyBase; diff --git a/GaudiPluginService/src/listcomponents.cpp b/GaudiPluginService/src/listcomponents.cpp index 70e7bbd9c9bf33e2c31dc6f367bd1171166cc13b..e081af2e648ee4f360517062ec3d0561bd851aea 100644 --- a/GaudiPluginService/src/listcomponents.cpp +++ b/GaudiPluginService/src/listcomponents.cpp @@ -16,7 +16,6 @@ #include <iostream> #include <list> #include <memory> -#include <set> #include <string> #include <dlfcn.h>