diff --git a/Gaudi/python/Gaudi/CommonGaudiConfigurables.py b/Gaudi/python/Gaudi/CommonGaudiConfigurables.py index 23d322604d4aa9311dd4f5879ba41a8acff0e7c5..7ef419319f1cd7efb99602b57fcdc5a371254d08 100644 --- a/Gaudi/python/Gaudi/CommonGaudiConfigurables.py +++ b/Gaudi/python/Gaudi/CommonGaudiConfigurables.py @@ -15,7 +15,7 @@ packages = ['GaudiCoreSvc', 'GaudiCommonSvc', 'GaudiSvc', 'GaudiAlg', 'GaudiAud', 'GaudiPoolDb', 'RootHistCnv', 'GaudiUtils', 'RootCnv'] -#--Loop open all listed packages and populate __all__ with the names and +# --Loop open all listed packages and populate __all__ with the names and # the local scope with the Configurable classes for package in packages: try: @@ -30,7 +30,7 @@ for package in packages: # ignore the configurables from missing packages. pass -#--Fix some of the name idiosyncrasies in Gaudi +# --Fix some of the name idiosyncrasies in Gaudi aliases = { 'EventDataSvc': 'EvtDataSvc', 'DetectorDataSvc': 'DetDataSvc', diff --git a/Gaudi/python/Gaudi/Main.py b/Gaudi/python/Gaudi/Main.py index 6113e643cd4b18b065a35ce089f28c5c0e961e12..e4163029a76e7686d9535f0ed781f400ec53b4c2 100644 --- a/Gaudi/python/Gaudi/Main.py +++ b/Gaudi/python/Gaudi/Main.py @@ -228,7 +228,7 @@ class gaudimain(object): return "\n".join(out) def _writepickle(self, filename): - #--- Lets take the first file input file as the name of the pickle file + # --- Lets take the first file input file as the name of the pickle file import pickle output = open(filename, 'wb') # Dump only the the configurables that make sense to dump (not User ones) @@ -379,7 +379,7 @@ class gaudimain(object): self.log.debug('gaudiPythonInit: done') def runSerial(self, attach_debugger): - #--- Instantiate the ApplicationMgr------------------------------ + # --- Instantiate the ApplicationMgr------------------------------ if (self.mainLoop or os.environ.get('GAUDIRUN_USE_GAUDIPYTHON')): self.gaudiPythonInit() diff --git a/Gaudi/scripts/gaudirun.py b/Gaudi/scripts/gaudirun.py index 92a41b9f6c3bc1ae7f3f8b2588f9b5a537d20ca7..672d5e83a65d787e54a93e67a1c6a55e771545bd 100755 --- a/Gaudi/scripts/gaudirun.py +++ b/Gaudi/scripts/gaudirun.py @@ -119,7 +119,7 @@ def getArgsFromQmt(qmtfile): return args -#--------------------------------------------------------------------- +# --------------------------------------------------------------------- if __name__ == "__main__": # ensure that we (and the subprocesses) use the C standard localization if os.environ.get('LC_ALL') != 'C': diff --git a/GaudiAlg/GaudiAlg/FunctionalDetails.h b/GaudiAlg/GaudiAlg/FunctionalDetails.h index f5006902595d33339d0152ebfd1111ee845584a0..8419301b04dafe471a226bc878a4ea557a617d8f 100644 --- a/GaudiAlg/GaudiAlg/FunctionalDetails.h +++ b/GaudiAlg/GaudiAlg/FunctionalDetails.h @@ -301,8 +301,8 @@ namespace Gaudi details2::push_back( m_containers, std::forward<T>( container ), std::integral_constant<bool, is_optional>{} ); } // note: does not copy its argument, so we're not really a container... - iterator begin() const { return m_containers.begin(); } - iterator end() const { return m_containers.end(); } + iterator begin() const { return m_containers.begin(); } + iterator end() const { return m_containers.end(); } size_type size() const { return m_containers.size(); } const Container& operator[]( size_type i ) const { return *m_containers[i]; } const Container& at( size_type i ) const @@ -486,21 +486,21 @@ namespace Gaudi } template <std::size_t N = 0> - const std::string& inputLocation() const + const std::string& inputLocation() const { return std::get<N>( m_inputs ).objKey(); } unsigned int inputLocationSize() const { return std::tuple_size<decltype( m_inputs )>::value; } template <std::size_t N = 0> - const std::string& outputLocation() const + const std::string& outputLocation() const { return std::get<N>( m_outputs ).objKey(); } unsigned int outputLocationSize() const { return std::tuple_size<decltype( m_outputs )>::value; } protected: - std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; + std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; std::tuple<details::OutputHandle_t<Traits_, Out>...> m_outputs; }; @@ -532,7 +532,7 @@ namespace Gaudi } template <std::size_t N = 0> - const std::string& inputLocation() const + const std::string& inputLocation() const { return std::get<N>( m_inputs ).objKey(); } @@ -569,7 +569,7 @@ namespace Gaudi } template <std::size_t N = 0> - const std::string& outputLocation() const + const std::string& outputLocation() const { return std::get<N>( m_outputs ).objKey(); } diff --git a/GaudiAlg/GaudiAlg/GaudiAlgorithm.h b/GaudiAlg/GaudiAlg/GaudiAlgorithm.h index 0dac2e43af048a034f5c138cc0e31a862ff75c90..dd62382ea9f690abac4eaecfc564ff7a468d315d 100644 --- a/GaudiAlg/GaudiAlg/GaudiAlgorithm.h +++ b/GaudiAlg/GaudiAlg/GaudiAlgorithm.h @@ -311,7 +311,7 @@ public: */ template <class TYPE> inline typename Gaudi::Utils::GetData<TYPE>::return_type get( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<Algorithm>::get<TYPE>( evtSvc(), location, useRootInTES ); } @@ -350,7 +350,7 @@ public: */ template <class TYPE> inline typename Gaudi::Utils::GetData<TYPE>::return_type getIfExists( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<Algorithm>::getIfExists<TYPE>( evtSvc(), location, useRootInTES ); } @@ -402,7 +402,7 @@ public: * @retval NULL If the detector object does not exist. */ template <class TYPE> - inline typename Gaudi::Utils::GetData<TYPE>::return_type getDetIfExists( IDataProviderSvc* svc, + inline typename Gaudi::Utils::GetData<TYPE>::return_type getDetIfExists( IDataProviderSvc* svc, const std::string& location ) const { return GaudiCommon<Algorithm>::getIfExists<TYPE>( svc, location, false ); @@ -626,7 +626,7 @@ public: */ template <class TYPE, class TYPE2> inline typename Gaudi::Utils::GetData<TYPE>::return_type getOrCreate( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<Algorithm>::getOrCreate<TYPE, TYPE2>( evtSvc(), location, useRootInTES ); } diff --git a/GaudiAlg/GaudiAlg/GaudiCommon.h b/GaudiAlg/GaudiAlg/GaudiCommon.h index da27a74f2c054495753650fa94c2f929421c0ef5..44870dbb641b7e634466c1aa27c28ff6b77a01d9 100644 --- a/GaudiAlg/GaudiAlg/GaudiCommon.h +++ b/GaudiAlg/GaudiAlg/GaudiCommon.h @@ -457,7 +457,7 @@ public: * @param sc StatusCode */ void Exception( const std::string& msg = "no message", - const StatusCode sc = StatusCode( StatusCode::FAILURE, true ) ) const; + const StatusCode sc = StatusCode( StatusCode::FAILURE, true ) ) const; public: // ========================================================================== diff --git a/GaudiAlg/GaudiAlg/GaudiCommonImp.h b/GaudiAlg/GaudiAlg/GaudiCommonImp.h index a691a57157476dca4d5585a8d40990a06024ae4a..c0e36e5821b4c7138bd18e53ee789c97cfdf2c6c 100644 --- a/GaudiAlg/GaudiAlg/GaudiCommonImp.h +++ b/GaudiAlg/GaudiAlg/GaudiCommonImp.h @@ -22,7 +22,7 @@ // ============================================================================ template <class PBASE> inline const std::string GaudiCommon<PBASE>::fullTESLocation( const std::string& location, - const bool useRootInTES ) const + const bool useRootInTES ) const { // The logic is: // if no R.I.T., give back location @@ -112,8 +112,8 @@ inline TOOL* GaudiCommon<PBASE>::tool( const std::string& type, const std::strin if ( name.empty() ) return tool<TOOL>( type, parent, create ); Assert( this->toolSvc(), "tool():: IToolSvc* points to NULL!" ); // get the tool from Tool Service - TOOL* Tool = nullptr; - const StatusCode sc = this->toolSvc()->retrieveTool( type, name, Tool, parent, create ); + TOOL* Tool = nullptr; + const StatusCode sc = this->toolSvc()->retrieveTool( type, name, Tool, parent, create ); if ( sc.isFailure() ) { Exception( "tool():: Could not retrieve Tool '" + type + "'/'" + name + "'", sc ); } @@ -136,8 +136,8 @@ inline TOOL* GaudiCommon<PBASE>::tool( const std::string& type, const IInterface // check the environment Assert( PBASE::toolSvc(), "IToolSvc* points to NULL!" ); // retrieve the tool from Tool Service - TOOL* Tool = nullptr; - const StatusCode sc = this->toolSvc()->retrieveTool( type, Tool, parent, create ); + TOOL* Tool = nullptr; + const StatusCode sc = this->toolSvc()->retrieveTool( type, Tool, parent, create ); if ( sc.isFailure() ) { Exception( "tool():: Could not retrieve Tool '" + type + "'", sc ); } diff --git a/GaudiAlg/GaudiAlg/GaudiHistos.h b/GaudiAlg/GaudiAlg/GaudiHistos.h index 904ccdfd58e9ae853aaa7a76c411c88f35c4fb2a..ea26a23c8f98b21c18845e3817246c9035a41aca 100644 --- a/GaudiAlg/GaudiAlg/GaudiHistos.h +++ b/GaudiAlg/GaudiAlg/GaudiHistos.h @@ -2785,8 +2785,8 @@ private: "Top level histogram directory (take care that it ends with '/')"}; Gaudi::Property<std::string> m_histoDir{ this, "HistoDir", boost::algorithm::replace_all_copy( this->name(), ":", "_" ), "Histogram Directory"}; - Gaudi::Property<bool> m_fullDetail{this, "FullDetail", false}; - Gaudi::Property<bool> m_declareMoniHists{this, "MonitorHistograms", true}; + Gaudi::Property<bool> m_fullDetail{this, "FullDetail", false}; + Gaudi::Property<bool> m_declareMoniHists{this, "MonitorHistograms", true}; Gaudi::Property<std::string> m_histo1DTableFormat{this, "FormatFor1DHistoTable", Gaudi::Utils::Histos::Formats::format(), "Format string for printout of 1D histograms"}; diff --git a/GaudiAlg/GaudiAlg/GaudiSequencer.h b/GaudiAlg/GaudiAlg/GaudiSequencer.h index 24f02497bcd5598d55a7e709a7655105938a4aec..8e3df3937ed90453a8767ca47f7a4d758c847bc8 100644 --- a/GaudiAlg/GaudiAlg/GaudiSequencer.h +++ b/GaudiAlg/GaudiAlg/GaudiSequencer.h @@ -53,14 +53,14 @@ protected: void setReverse( bool flag ) { m_reverse = flag; } Algorithm* algorithm() const { return m_algorithm; } - bool reverse() const { return m_reverse; } + bool reverse() const { return m_reverse; } void setTimer( int nb ) { m_timer = nb; } - int timer() const { return m_timer; } + int timer() const { return m_timer; } private: Algorithm* m_algorithm = nullptr; ///< Algorithm pointer - bool m_reverse = false; ///< Indicates that the flag has to be inverted - int m_timer = 0; ///< Timer number for this algorithm + bool m_reverse = false; ///< Indicates that the flag has to be inverted + int m_timer = 0; ///< Timer number for this algorithm }; /** Decode a vector of string. */ @@ -78,16 +78,16 @@ private: GaudiSequencer& operator=( const GaudiSequencer& a ) = delete; Gaudi::Property<std::vector<std::string>> m_names{this, "Members", {}, "list of algorithms"}; - Gaudi::Property<bool> m_sequential{this, "Sequential", false, "execute members one at a time"}; - Gaudi::Property<bool> m_modeOR{this, "ModeOR", false, "use OR logic instead of AND"}; - Gaudi::Property<bool> m_ignoreFilter{this, "IgnoreFilterPassed", false, "always continue"}; - Gaudi::Property<bool> m_measureTime{this, "MeasureTime", false, "measure time"}; + Gaudi::Property<bool> m_sequential{this, "Sequential", false, "execute members one at a time"}; + Gaudi::Property<bool> m_modeOR{this, "ModeOR", false, "use OR logic instead of AND"}; + Gaudi::Property<bool> m_ignoreFilter{this, "IgnoreFilterPassed", false, "always continue"}; + Gaudi::Property<bool> m_measureTime{this, "MeasureTime", false, "measure time"}; Gaudi::Property<bool> m_returnOK{this, "ReturnOK", false, "forces the sequencer to return a good status"}; Gaudi::Property<bool> m_shortCircuit{this, "ShortCircuit", true, "stop processing as soon as possible"}; Gaudi::Property<bool> m_invert{this, "Invert", false, "invert the logic result of the sequencer"}; - std::vector<AlgorithmEntry> m_entries; ///< List of algorithms to process. - ISequencerTimerTool* m_timerTool = nullptr; ///< Pointer to the timer tool - int m_timer; ///< Timer number for the sequencer + std::vector<AlgorithmEntry> m_entries; ///< List of algorithms to process. + ISequencerTimerTool* m_timerTool = nullptr; ///< Pointer to the timer tool + int m_timer; ///< Timer number for the sequencer }; #endif // GAUDISEQUENCER_H diff --git a/GaudiAlg/GaudiAlg/GaudiTool.h b/GaudiAlg/GaudiAlg/GaudiTool.h index 778c557d9c1cf2de6cb6cb35aaf9262ef80e5c41..e7d94f0af97bb4945c5b6e50c811d0980ed3b447 100644 --- a/GaudiAlg/GaudiAlg/GaudiTool.h +++ b/GaudiAlg/GaudiAlg/GaudiTool.h @@ -329,7 +329,7 @@ public: */ template <class TYPE> inline typename Gaudi::Utils::GetData<TYPE>::return_type get( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<AlgTool>::get<TYPE>( evtSvc(), location, useRootInTES ); } @@ -368,7 +368,7 @@ public: */ template <class TYPE> inline typename Gaudi::Utils::GetData<TYPE>::return_type getIfExists( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<AlgTool>::getIfExists<TYPE>( evtSvc(), location, useRootInTES ); } @@ -420,7 +420,7 @@ public: * @retval NULL If the detector object does not exist. */ template <class TYPE> - inline typename Gaudi::Utils::GetData<TYPE>::return_type getDetIfExists( IDataProviderSvc* svc, + inline typename Gaudi::Utils::GetData<TYPE>::return_type getDetIfExists( IDataProviderSvc* svc, const std::string& location ) const { return GaudiCommon<AlgTool>::getIfExists<TYPE>( svc, location, false ); @@ -638,7 +638,7 @@ public: */ template <class TYPE, class TYPE2> inline typename Gaudi::Utils::GetData<TYPE>::return_type getOrCreate( const std::string& location, - const bool useRootInTES = true ) const + const bool useRootInTES = true ) const { return GaudiCommon<AlgTool>::getOrCreate<TYPE, TYPE2>( evtSvc(), location, useRootInTES ); } @@ -755,8 +755,8 @@ private: /// Returns the current active algorithm name via the context service inline std::string getCurrentAlgName() const { - const IAlgContextSvc* asvc = this->contextSvc(); - const IAlgorithm* current = ( asvc ? asvc->currentAlg() : NULL ); + const IAlgContextSvc* asvc = this->contextSvc(); + const IAlgorithm* current = ( asvc ? asvc->currentAlg() : NULL ); return ( current ? " [" + current->name() + "]" : "" ); } // ========================================================================== diff --git a/GaudiAlg/GaudiAlg/GaudiTuples.h b/GaudiAlg/GaudiAlg/GaudiTuples.h index a9c058e309a339daf4a170c0d8770d7c342f2748..600c4eb8c31c907ca2a663bb29d08ace5541e368 100644 --- a/GaudiAlg/GaudiAlg/GaudiTuples.h +++ b/GaudiAlg/GaudiAlg/GaudiTuples.h @@ -349,9 +349,9 @@ private: Gaudi::Property<bool> m_splitNTupleDir{this, "NTupleSplitDir", false, "split long directory names into short pieces (suitable for HBOOK)"}; Gaudi::Property<TupleID::NumericID> m_nTupleOffSet{this, "NTupleOffSet", 0, "offset for numerical N-tuple ID"}; - Gaudi::Property<std::string> m_nTupleLUN{this, "NTupleLUN", "FILE1", "Logical File Unit for N-tuples"}; - Gaudi::Property<std::string> m_nTupleTopDir{this, "NTupleTopDir", "", "top-level directory for N-Tuples"}; - Gaudi::Property<std::string> m_nTupleDir{ + Gaudi::Property<std::string> m_nTupleLUN{this, "NTupleLUN", "FILE1", "Logical File Unit for N-tuples"}; + Gaudi::Property<std::string> m_nTupleTopDir{this, "NTupleTopDir", "", "top-level directory for N-Tuples"}; + Gaudi::Property<std::string> m_nTupleDir{ this, "NTupleDir", boost::algorithm::replace_all_copy( this->name(), ":", "_" ), "subdirectory for N-Tuples"}; Gaudi::Property<bool> m_produceEvtCols{this, "EvtColsProduce", false, diff --git a/GaudiAlg/GaudiAlg/GetData.h b/GaudiAlg/GaudiAlg/GetData.h index 42ae4146fbe5181894046ed5d47b4f4f7bce577a..079002224325a806c6b421b27937120e527a0db2 100644 --- a/GaudiAlg/GaudiAlg/GetData.h +++ b/GaudiAlg/GaudiAlg/GetData.h @@ -160,7 +160,7 @@ namespace Gaudi // ====================================================================== /// the actual return type typedef Gaudi::Range_<std::vector<const TYPE*>> Type; - typedef typename _GetType<Type>::return_type return_type; + typedef typename _GetType<Type>::return_type return_type; // ====================================================================== public: // ====================================================================== @@ -181,7 +181,7 @@ namespace Gaudi if ( object ) { /// 2. try to get the selection typedef typename TYPE::Selection Selection_; - const Selection_* sel = dynamic_cast<Selection_*>( object ); + const Selection_* sel = dynamic_cast<Selection_*>( object ); if ( sel ) { if ( common.msgLevel( MSG::DEBUG ) ) { common.debug() << "The object of type '" << System::typeinfoName( typeid( *object ) ) @@ -191,7 +191,7 @@ namespace Gaudi } /// 3. try to get the container typedef typename TYPE::Container Container_; - const Container_* cnt = dynamic_cast<Container_*>( object ); + const Container_* cnt = dynamic_cast<Container_*>( object ); if ( cnt ) { if ( common.msgLevel( MSG::DEBUG ) ) { common.debug() << "The object of type '" << System::typeinfoName( typeid( *object ) ) @@ -252,7 +252,7 @@ namespace Gaudi // ====================================================================== /// the actual return type typedef Gaudi::NamedRange_<std::vector<const TYPE*>> Type; - typedef typename _GetType<Type>::return_type return_type; + typedef typename _GetType<Type>::return_type return_type; // ====================================================================== public: // ====================================================================== @@ -279,7 +279,7 @@ namespace Gaudi return return_type(); } static const std::string s_empty = ""; - const IRegistry* reg = cnt->registry(); + const IRegistry* reg = cnt->registry(); return return_type( m_range.make_range( cnt ), reg ? reg->identifier() : s_empty ); } // create the range from the selection @@ -289,7 +289,7 @@ namespace Gaudi return return_type(); } static const std::string s_empty = ""; - const IRegistry* reg = cnt->registry(); + const IRegistry* reg = cnt->registry(); return return_type( m_range.make_range( cnt ), reg ? reg->identifier() : s_empty ); } // ====================================================================== @@ -516,7 +516,7 @@ namespace Gaudi private: // ====================================================================== typedef Gaudi::NamedRange_<std::vector<const TYPE*>> Range; - typedef Gaudi::Range_<std::vector<const TYPE*>> Range_; + typedef Gaudi::Range_<std::vector<const TYPE*>> Range_; typedef GetOrCreateData<Range_, TYPE2> Helper; /// the actual data getter typedef GetData<Range> Getter; // the actual data getter diff --git a/GaudiAlg/GaudiAlg/HbookName.h b/GaudiAlg/GaudiAlg/HbookName.h index 2c6ea9bd0835d41ce2041df4396e3f4f065c1f4e..6f287bd9f03bdd814658ac5f5193d7df4156bcfd 100644 --- a/GaudiAlg/GaudiAlg/HbookName.h +++ b/GaudiAlg/GaudiAlg/HbookName.h @@ -39,7 +39,7 @@ namespace std::string old( addr ); // remove long names if ( 0 < maxLen && maxLen < (int)old.size() ) { - auto p1 = old.begin(); + auto p1 = old.begin(); const char sep( '/' ); while ( old.end() != p1 ) { p1 = std::find_if( p1, old.end(), [&]( const char& c ) { return c != sep; } ); diff --git a/GaudiAlg/GaudiAlg/ITupleTool.h b/GaudiAlg/GaudiAlg/ITupleTool.h index b56d9edd8dfb86506a264d7a8251805fe176aa6f..76f244f5ab53c72047be1613032af3c046b9fdb8 100644 --- a/GaudiAlg/GaudiAlg/ITupleTool.h +++ b/GaudiAlg/GaudiAlg/ITupleTool.h @@ -34,7 +34,7 @@ public: DeclareInterfaceID( ITupleTool, 2, 0 ); typedef Tuples::TupleID TupleID; - typedef Tuples::Tuple Tuple; + typedef Tuples::Tuple Tuple; /** get N-tuple object ( book on-demand ) with unique identifier * diff --git a/GaudiAlg/GaudiAlg/MergingTransformer.h b/GaudiAlg/GaudiAlg/MergingTransformer.h index cb298ecf4541baa9e95cabf580cd6757ab454b1f..017318ffe3bc195689b5269a06b1ad67342255f3 100644 --- a/GaudiAlg/GaudiAlg/MergingTransformer.h +++ b/GaudiAlg/GaudiAlg/MergingTransformer.h @@ -41,15 +41,15 @@ namespace Gaudi // if In is a pointer, it signals optional (as opposed to mandatory) input template <typename T> using InputHandle_t = details::InputHandle_t<Traits_, typename std::remove_pointer<T>::type>; - std::vector<std::string> m_inputLocations; // TODO/FIXME: remove this duplication... - std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... + std::vector<std::string> m_inputLocations; // TODO/FIXME: remove this duplication... + std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... }; template <typename Out, typename In, typename Traits_> MergingTransformer<Out( const vector_of_const_<In>& ), Traits_>::MergingTransformer( const std::string& name, - ISvcLocator* pSvcLocator, + ISvcLocator* pSvcLocator, const KeyValues& inputs, - const KeyValue& output ) + const KeyValue& output ) : base_class( name, pSvcLocator, output ), m_inputLocations( inputs.second ) { // TODO/FIXME: replace vector of string property + call-back with a diff --git a/GaudiAlg/GaudiAlg/ScalarTransformer.h b/GaudiAlg/GaudiAlg/ScalarTransformer.h index 13395c1be5d23dcd06089d0821add68b5b87a1b9..1ab5901fe31a24839b0497c928ab09b36ca5dcff 100644 --- a/GaudiAlg/GaudiAlg/ScalarTransformer.h +++ b/GaudiAlg/GaudiAlg/ScalarTransformer.h @@ -34,7 +34,7 @@ namespace Gaudi Out operator()( const In&... in ) const override final { const auto inrange = details::zip::const_range( in... ); - Out out; + Out out; out.reserve( inrange.size() ); auto& scalar = scalarOp(); for ( const auto&& i : inrange ) { @@ -87,7 +87,7 @@ namespace Gaudi /// The main operator std::tuple<Out...> operator()( const In&... in ) const final { - const auto inrange = details::zip::const_range( in... ); + const auto inrange = details::zip::const_range( in... ); std::tuple<Out...> out; reserve( out, inrange.size(), std::index_sequence_for<Out...>{} ); auto& scalar = scalarOp(); diff --git a/GaudiAlg/GaudiAlg/Sequencer.h b/GaudiAlg/GaudiAlg/Sequencer.h index 255eff1cd253df926cb6b954d04a8004d6521c7c..2d5ae81b8177be50d3b21d80f146ca77487102f3 100644 --- a/GaudiAlg/GaudiAlg/Sequencer.h +++ b/GaudiAlg/GaudiAlg/Sequencer.h @@ -26,8 +26,8 @@ public: /** ** Constructor(s) **/ - Sequencer( const std::string& name, // The path object's name - ISvcLocator* svcloc // A pointer to a service location service + Sequencer( const std::string& name, // The path object's name + ISvcLocator* svcloc // A pointer to a service location service ); /** @@ -131,9 +131,9 @@ public: ** directly via the new operator is preferred since then the framework ** may take care of all of the necessary book-keeping. **/ - StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm - const std::string& name, // The name to be given to the algorithm - Algorithm*& pAlgorithm // Set to point to the newly created algorithm object + StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm + const std::string& name, // The name to be given to the algorithm + Algorithm*& pAlgorithm // Set to point to the newly created algorithm object ); /** @@ -165,7 +165,7 @@ public: ** by the first element, which is the filter algorithm. **/ const std::vector<Algorithm*>& branchAlgorithms() const; - std::vector<Algorithm*>& branchAlgorithms(); + std::vector<Algorithm*>& branchAlgorithms(); /// Decode Member Name list StatusCode decodeMemberNames(); @@ -188,9 +188,9 @@ protected: ** directly via the new operator is preferred since then the framework ** may take care of all of the necessary book-keeping. **/ - StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm - const std::string& name, // The name to be given to the algorithm - Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object + StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm + const std::string& name, // The name to be given to the algorithm + Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object std::vector<Algorithm*>& theAlgs ); /** @@ -233,9 +233,9 @@ private: Gaudi::Property<std::vector<std::string>> m_branchNames{this, "BranchMembers", {}, "branch member names"}; Gaudi::Property<bool> m_stopOverride{this, "StopOverride", false, "stop on filter failure override"}; - std::vector<bool> m_isInverted; // Member logic inverted list - std::vector<Algorithm*> m_branchAlgs; // Branch algorithms - std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list + std::vector<bool> m_isInverted; // Member logic inverted list + std::vector<Algorithm*> m_branchAlgs; // Branch algorithms + std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list bool m_branchFilterPassed = false; // Branch filter passed flag }; diff --git a/GaudiAlg/GaudiAlg/SplittingTransformer.h b/GaudiAlg/GaudiAlg/SplittingTransformer.h index f7e2896c2d6ba87cfe08102e9b830102656eb133..deca554701bf2f5a3240f60d77c279c9edecf01c 100644 --- a/GaudiAlg/GaudiAlg/SplittingTransformer.h +++ b/GaudiAlg/GaudiAlg/SplittingTransformer.h @@ -45,7 +45,7 @@ namespace Gaudi // accessor to output Locations const std::string& outputLocation( unsigned int n ) const { return m_outputLocations[n]; } - unsigned int outputLocationSize() const { return m_outputLocations.size(); } + unsigned int outputLocationSize() const { return m_outputLocations.size(); } // derived classes can NOT implement execute StatusCode execute() override final { return invoke( std::index_sequence_for<In...>{} ); } diff --git a/GaudiAlg/GaudiAlg/Tuple.h b/GaudiAlg/GaudiAlg/Tuple.h index 646fe5d1eed7f5665652e038fb13b81c3023f35d..9ba6b2f1463e7c20a6ccaf79d9f307f5f5eb3944 100644 --- a/GaudiAlg/GaudiAlg/Tuple.h +++ b/GaudiAlg/GaudiAlg/Tuple.h @@ -283,8 +283,8 @@ namespace Tuples const ITEM& value() const { return m_value; } private: - std::string m_name; ///< The column name - ITEM m_value; ///< The column value + std::string m_name; ///< The column name + ITEM m_value; ///< The column value }; /** helper function to create 'on-the-fly' the diff --git a/GaudiAlg/GaudiAlg/TupleDetail.h b/GaudiAlg/GaudiAlg/TupleDetail.h index ad06056fce8dfa9f8a2075a3c9221b44e5302e99..b23cdc7c7c6817ff02ac74f224222225e66e42f3 100644 --- a/GaudiAlg/GaudiAlg/TupleDetail.h +++ b/GaudiAlg/GaudiAlg/TupleDetail.h @@ -180,7 +180,7 @@ namespace Tuples private: const OBJECT* m_obj = nullptr; - FUNCTION m_fun; + FUNCTION m_fun; }; /** Templated helper functions allow to avoid heavy semantics of diff --git a/GaudiAlg/GaudiAlg/TupleObj.h b/GaudiAlg/GaudiAlg/TupleObj.h index 747a439373c9e41a03b66212fc897a7a229e85b2..88789e8e5237ba6d35e57a8bc8b9aa7782fb6a36 100644 --- a/GaudiAlg/GaudiAlg/TupleObj.h +++ b/GaudiAlg/GaudiAlg/TupleObj.h @@ -793,8 +793,8 @@ namespace Tuples { auto scs = std::initializer_list<StatusCode>{ this->column( std::get<I>( tup ).first, Gaudi::invoke( std::get<I>( tup ).second, value ) )...}; - auto is_ok = []( const StatusCode& sc ) -> bool { return sc; }; - auto i = std::find_if_not( begin( scs ), end( scs ), is_ok ); + auto is_ok = []( const StatusCode& sc ) -> bool { return sc; }; + auto i = std::find_if_not( begin( scs ), end( scs ), is_ok ); if ( i != end( scs ) ) { // avoid unchecked StatusCodes... std::for_each( std::next( i ), end( scs ), is_ok ); @@ -1553,8 +1553,8 @@ namespace Tuples *len = std::distance( first, last ); // get the array itself - auto cols = std::distance( funF, funL ); - FMatrix* var = fMatrix( name, len, cols ); + auto cols = std::distance( funF, funL ); + FMatrix* var = fMatrix( name, len, cols ); if ( !var ) { return InvalidColumn; } diff --git a/GaudiAlg/GaudiAlg/TuplePut.h b/GaudiAlg/GaudiAlg/TuplePut.h index b92d21e6b451eed2e2abc7b9fdef6b578424c4ce..f0acbea3bb4628d2e51f772b85178ef46546ac12 100644 --- a/GaudiAlg/GaudiAlg/TuplePut.h +++ b/GaudiAlg/GaudiAlg/TuplePut.h @@ -128,7 +128,7 @@ inline StatusCode Tuples::TupleObj::put( const std::string& name, const TYPE* ob } // RETURN // static block: The type description & the flag - static bool s_fail = false; // STATIC + static bool s_fail = false; // STATIC static TClass* s_type = nullptr; // STATIC // check the status if ( s_fail ) { diff --git a/GaudiAlg/src/components/SequencerTimerTool.cpp b/GaudiAlg/src/components/SequencerTimerTool.cpp index c8a0728f8873f4fa7db421acd4a0a341aad8e4f4..19f2ac44925a887d6c786ccb454c7db89a1a9a0a 100644 --- a/GaudiAlg/src/components/SequencerTimerTool.cpp +++ b/GaudiAlg/src/components/SequencerTimerTool.cpp @@ -38,7 +38,7 @@ StatusCode SequencerTimerTool::initialize() { const StatusCode sc = GaudiHistoTool::initialize(); if ( sc.isFailure() ) return sc; - double sum = 0; + double sum = 0; TimerForSequencer norm( "normalize", m_headerSize, m_normFactor ); norm.start(); IRndmGenSvc* rsvc = svc<IRndmGenSvc>( "RndmGenSvc", true ); @@ -105,13 +105,13 @@ void SequencerTimerTool::saveHistograms() { if ( produceHistos() ) { info() << "Saving Timing histograms" << endmsg; - const size_t bins = m_timerList.size(); + const size_t bins = m_timerList.size(); AIDA::IHistogram1D* histoTime = book( "ElapsedTime", 0, bins, bins ); AIDA::IHistogram1D* histoCPU = book( "CPUTime", 0, bins, bins ); AIDA::IHistogram1D* histoCount = book( "Count", 0, bins, bins ); - TH1D* tHtime = Gaudi::Utils::Aida2ROOT::aida2root( histoTime ); - TH1D* tHCPU = Gaudi::Utils::Aida2ROOT::aida2root( histoCPU ); - TH1D* tHCount = Gaudi::Utils::Aida2ROOT::aida2root( histoCount ); + TH1D* tHtime = Gaudi::Utils::Aida2ROOT::aida2root( histoTime ); + TH1D* tHCPU = Gaudi::Utils::Aida2ROOT::aida2root( histoCPU ); + TH1D* tHCount = Gaudi::Utils::Aida2ROOT::aida2root( histoCount ); for ( const auto& tfsq : m_timerList ) { tHtime->Fill( tfsq.name().c_str(), tfsq.elapsedTotal() ); tHCPU->Fill( tfsq.name().c_str(), tfsq.cpuTotal() ); diff --git a/GaudiAlg/src/components/SequencerTimerTool.h b/GaudiAlg/src/components/SequencerTimerTool.h index 2608125263e68fe1a3d58436a076b22ffe103c95..36d846dc30bef70672c474cc5d34228575d663ec 100644 --- a/GaudiAlg/src/components/SequencerTimerTool.h +++ b/GaudiAlg/src/components/SequencerTimerTool.h @@ -73,15 +73,15 @@ public: void saveHistograms() override; private: - Gaudi::Property<int> m_shots{this, "Shots", 3500000, "number of shots for CPU normalization"}; + Gaudi::Property<int> m_shots{this, "Shots", 3500000, "number of shots for CPU normalization"}; Gaudi::Property<bool> m_normalised{this, "Normalised", false, "normalise the time to a nominal PIII"}; Gaudi::Property<bool> m_globalTiming{this, "GlobalTiming", false}; Gaudi::Property<std::string::size_type> m_headerSize{this, "NameSize", 30, "number of characters to be used in algorithm name column"}; - int m_indent = 0; ///< Amount of indentation + int m_indent = 0; ///< Amount of indentation std::vector<TimerForSequencer> m_timerList; - double m_normFactor = 0.001; ///< Factor to convert to standard CPU (1 GHz PIII) - double m_speedRatio = 0; + double m_normFactor = 0.001; ///< Factor to convert to standard CPU (1 GHz PIII) + double m_speedRatio = 0; }; #endif // SEQUENCERTIMERTOOL_H diff --git a/GaudiAlg/src/components/TimerForSequencer.h b/GaudiAlg/src/components/TimerForSequencer.h index 6099dcbc55d85ad5f97634ab12ecc795f590ef5f..1d8f3bfeadc63d83b0a49416eb64ed3cf16b4524 100644 --- a/GaudiAlg/src/components/TimerForSequencer.h +++ b/GaudiAlg/src/components/TimerForSequencer.h @@ -66,11 +66,11 @@ public: static std::string header( std::string::size_type size ); private: - std::string m_name; + std::string m_name; unsigned int m_size; - double m_factor; - uint64_t m_startClock = 0ULL; - uint64_t m_startCpu = 0ULL; + double m_factor; + uint64_t m_startClock = 0ULL; + uint64_t m_startCpu = 0ULL; uint64_t m_num = 0ULL; uint64_t m_lastTime = 0ULL; diff --git a/GaudiAlg/src/components/TimingAuditor.cpp b/GaudiAlg/src/components/TimingAuditor.cpp index f9e9f5698849e8db23519cdbdbcf53d239da5b33..da1d84558f5c39a41da4890a36333c463021134f 100644 --- a/GaudiAlg/src/components/TimingAuditor.cpp +++ b/GaudiAlg/src/components/TimingAuditor.cpp @@ -279,9 +279,9 @@ void TimingAuditor::before( CustomEventTypeRef evt, const std::string& name ) } // look for the user timer in the map - int timer = 0; - std::string nick = name + ":" + evt; - auto found = m_mapUser.find( nick ); + int timer = 0; + std::string nick = name + ":" + evt; + auto found = m_mapUser.find( nick ); if ( m_mapUser.end() == found ) { // add a new timer if not yet available @@ -301,8 +301,8 @@ void TimingAuditor::after( CustomEventTypeRef evt, const std::string& name, cons } // look for the user timer in the map - std::string nick = name + ":" + evt; - auto found = m_mapUser.find( nick ); + std::string nick = name + ":" + evt; + auto found = m_mapUser.find( nick ); // We cannot do much if the timer is not available if ( m_mapUser.end() == found ) { diff --git a/GaudiAlg/src/components/TupleTool.h b/GaudiAlg/src/components/TupleTool.h index c0c7a471f918811d65971e71af384b26d888d58e..fa9b50e89ca70330fc6fb18151c1c0666ec0b677 100644 --- a/GaudiAlg/src/components/TupleTool.h +++ b/GaudiAlg/src/components/TupleTool.h @@ -18,7 +18,7 @@ class TupleTool : public GaudiTupleTool, virtual public ITupleTool { public: - typedef Tuples::Tuple Tuple; + typedef Tuples::Tuple Tuple; typedef GaudiAlg::TupleID TupleID; /** Standard constructor diff --git a/GaudiAlg/src/lib/GaudiCommon.icpp b/GaudiAlg/src/lib/GaudiCommon.icpp index 142cc7ed270165820d82342541568bff37fd8173..55a30ac89a5a1599a8dcfddc002fb6cfdf2cadbd 100644 --- a/GaudiAlg/src/lib/GaudiCommon.icpp +++ b/GaudiAlg/src/lib/GaudiCommon.icpp @@ -149,7 +149,7 @@ StatusCode GaudiCommon<PBASE>:: // get root of DataManager SmartIF<IDataManagerSvc> dataMgrSvc( PBASE::evtSvc() ); - auto rootName = dataMgrSvc->rootName(); + auto rootName = dataMgrSvc->rootName(); if ( !rootName.empty() && '/' != rootName.back() ) rootName += "/"; auto fixLocation = [this, rootName]( const std::string& location ) -> std::string { @@ -575,7 +575,7 @@ long GaudiCommon<PBASE>::printProps( const MSG::Level level ) const { // print ALL properties - MsgStream& msg = this->msgStream( level ); + MsgStream& msg = this->msgStream( level ); const auto& properties = this->getProperties(); msg << "List of ALL properties of " << System::typeinfoName( typeid( *this ) ) << "/" << this->name() << " #properties = " << properties.size() << endmsg; diff --git a/GaudiAlg/src/lib/GaudiSequencer.cpp b/GaudiAlg/src/lib/GaudiSequencer.cpp index d5d9801b663560e3514e1763244f950d4400d9e4..ede48f30107abf57206a74dd7b295e1cd800625e 100644 --- a/GaudiAlg/src/lib/GaudiSequencer.cpp +++ b/GaudiAlg/src/lib/GaudiSequencer.cpp @@ -24,8 +24,8 @@ namespace class populate_JobOptionsSvc_t { std::vector<std::unique_ptr<Gaudi::Details::PropertyBase>> m_props; - IJobOptionsSvc* m_jos; - std::string m_name; + IJobOptionsSvc* m_jos; + std::string m_name; template <typename T> void process( T&& t ) @@ -258,11 +258,11 @@ StatusCode GaudiSequencer::decodeNames() auto appMgr = service<IAlgManager>( "ApplicationMgr" ); for ( const auto& item : m_names.value() ) { const Gaudi::Utils::TypeNameString typeName( item ); - const std::string& theName = typeName.name(); - const std::string& theType = typeName.type(); + const std::string& theName = typeName.name(); + const std::string& theType = typeName.type(); //== Check wether the specified algorithm already exists. If not, create it - StatusCode result = StatusCode::SUCCESS; + StatusCode result = StatusCode::SUCCESS; SmartIF<IAlgorithm> myIAlg = appMgr->algorithm( typeName, false ); // do not create it now if ( !myIAlg ) { // ensure some magic properties are set while we create the subalgorithm so @@ -324,7 +324,7 @@ StatusCode GaudiSequencer::decodeNames() if ( m_modeOR ) msg << "OR "; msg << "Member list: "; ostream_joiner( msg, m_entries, ", ", []( const AlgorithmEntry& e ) { - Algorithm* alg = e.algorithm(); + Algorithm* alg = e.algorithm(); std::string typ = System::typeinfoName( typeid( *alg ) ); return ( alg->name() == typ ) ? alg->name() : ( typ + "/" + alg->name() ); } ); @@ -378,10 +378,10 @@ std::ostream& GaudiSequencer::toControlFlowExpression( std::ostream& os ) const // if we have only one element, we do not need a name if ( m_entries.size() > 1 ) os << "seq("; - const auto op = m_modeOR ? " | " : " & "; - const auto first = begin( m_entries ); - const auto last = end( m_entries ); - auto iterator = first; + const auto op = m_modeOR ? " | " : " & "; + const auto first = begin( m_entries ); + const auto last = end( m_entries ); + auto iterator = first; while ( iterator != last ) { if ( iterator != first ) os << op; if ( iterator->reverse() ) os << "~"; diff --git a/GaudiAlg/src/lib/GaudiTool.cpp b/GaudiAlg/src/lib/GaudiTool.cpp index fb3a8f8fdede673260936dc9986808d47f5ed84e..2f45742ca20d5bdeba11bf267ba336bc3ed8dea6 100644 --- a/GaudiAlg/src/lib/GaudiTool.cpp +++ b/GaudiAlg/src/lib/GaudiTool.cpp @@ -93,7 +93,7 @@ namespace GaudiToolLocal private: // ======================================================================== typedef std::map<std::string, long> Map; - Map m_map; + Map m_map; std::string m_message; // ======================================================================== }; @@ -197,7 +197,7 @@ bool GaudiTool::isPublic() const { const IAlgTool* tool = this; // Recurse down the ownership tree, to see with we ever end up at the ToolSvc - bool ownedByToolSvc = false; + bool ownedByToolSvc = false; unsigned int sanityCheck( 0 ); while ( tool && ++sanityCheck < 99999 ) { ownedByToolSvc = ( nullptr != dynamic_cast<const IToolSvc*>( tool->parent() ) ); diff --git a/GaudiAlg/src/lib/GetAlgs.cpp b/GaudiAlg/src/lib/GetAlgs.cpp index c8e7378aa6af451fa6d79f3adc3dd967ea309596..f254398e11e6b0fffdccef00858aae975be23693 100644 --- a/GaudiAlg/src/lib/GetAlgs.cpp +++ b/GaudiAlg/src/lib/GetAlgs.cpp @@ -37,7 +37,7 @@ namespace return nullptr; } // RETURN const auto& algs = svc->algorithms(); - auto it = std::find_if( algs.rbegin(), algs.rend(), Gaudi::Utils::AlgTypeSelector<TYPE>{} ); + auto it = std::find_if( algs.rbegin(), algs.rend(), Gaudi::Utils::AlgTypeSelector<TYPE>{} ); if ( algs.rend() == it ) { return nullptr; } // RETURN @@ -159,7 +159,7 @@ IAlgorithm* Gaudi::Utils::getSequencer( const IAlgContextSvc* svc ) } // RETURN // AlgTypeSelector<GaudiSequencer> sel1; - AlgTypeSelector<Sequencer> sel2; + AlgTypeSelector<Sequencer> sel2; const auto& algs = svc->algorithms(); auto a = std::find_if( algs.rbegin(), algs.rend(), [&]( IAlgorithm* alg ) { return sel1( alg ) || sel2( alg ); } ); diff --git a/GaudiAlg/src/lib/Sequencer.cpp b/GaudiAlg/src/lib/Sequencer.cpp index 54883c89d59aadb29785e3e93c02b0e938c210e5..aaf63b6c2a2101e0290eef2a458349bed55d9c25 100644 --- a/GaudiAlg/src/lib/Sequencer.cpp +++ b/GaudiAlg/src/lib/Sequencer.cpp @@ -88,7 +88,7 @@ StatusCode Sequencer::reinitialize() StatusCode Sequencer::execute() { StatusCode result = StatusCode::SUCCESS; - ON_DEBUG debug() << name() << " Sequencer::execute( )" << endmsg; + ON_DEBUG debug() << name() << " Sequencer::execute( )" << endmsg; // Bypass the loop if this sequencer is disabled or has already been executed if ( isEnabled() && !isExecuted() ) { @@ -352,7 +352,7 @@ StatusCode Sequencer::createAndAppend( const std::string& type, const std::strin if ( !theAlgMgr ) return StatusCode::FAILURE; IAlgorithm* tmp; - StatusCode result = theAlgMgr->createAlgorithm( type, algName, tmp ); + StatusCode result = theAlgMgr->createAlgorithm( type, algName, tmp ); if ( result.isSuccess() ) { try { pAlgorithm = dynamic_cast<Algorithm*>( tmp ); @@ -370,7 +370,7 @@ StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& th std::vector<Algorithm*>& theAlgs, std::vector<bool>& theLogic ) { StatusCode result; - auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); + auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); if ( theAlgMgr ) { // Clear the existing list of algorithms theAlgs.clear(); @@ -386,8 +386,8 @@ StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& th // Where <name> is the algorithm instance name, and <type> is the // algorithm class type (being a subclass of Algorithm). const Gaudi::Utils::TypeNameString typeName( n ); - std::string theName = typeName.name(); - std::string theType = typeName.type(); + std::string theName = typeName.name(); + std::string theType = typeName.type(); // Parse the name for a syntax of the form: // @@ -395,8 +395,8 @@ StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& th // // Where <name> is the algorithm instance name and ":invert" // indicates that the filter passed logic is inverted. - bool isInverted = false; - std::string::size_type invert = theName.find_first_of( ":" ); + bool isInverted = false; + std::string::size_type invert = theName.find_first_of( ":" ); // Skip all occurrences of "::" (allow namespaces) while ( std::string::npos != invert && invert < ( theName.size() - 1 ) && theName[invert + 1] == ':' ) invert = theName.find_first_of( ":", invert + 2 ); @@ -411,9 +411,9 @@ StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& th } // Check whether the supplied name corresponds to an existing // Algorithm object. - SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName, false ); - Algorithm* theAlgorithm = nullptr; - StatusCode status = StatusCode::SUCCESS; + SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName, false ); + Algorithm* theAlgorithm = nullptr; + StatusCode status = StatusCode::SUCCESS; if ( theIAlg ) { try { theAlgorithm = dynamic_cast<Algorithm*>( theIAlg.get() ); @@ -544,7 +544,7 @@ std::ostream& Sequencer::toControlFlowExpression( std::ostream& os ) const os << "seq("; const auto algs_count = theAlgs.size(); const auto op = isStopOverride() ? " >> " : " & "; - size_t i = 0; + size_t i = 0; while ( i < algs_count ) { if ( i ) os << op; if ( m_isInverted[i] ) os << "~"; diff --git a/GaudiAlg/src/lib/TupleObj.cpp b/GaudiAlg/src/lib/TupleObj.cpp index bd02beeb7113828d3a3560a14fddb5acafa3af8b..71b6c05a540e5dfdc529a730f7e3c4d299b3bed9 100644 --- a/GaudiAlg/src/lib/TupleObj.cpp +++ b/GaudiAlg/src/lib/TupleObj.cpp @@ -251,8 +251,8 @@ namespace std::vector<std::string> tokenize( const std::string& value, const std::string& separators = " " ) { std::vector<std::string> tokens; - auto it1 = value.begin(); - auto it2 = value.begin(); + auto it1 = value.begin(); + auto it2 = value.begin(); while ( value.end() != it1 && value.end() != it2 ) { it2 = std::find_first_of( it1, value.end(), separators.begin(), separators.end() ); if ( it2 != it1 ) { diff --git a/GaudiAud/src/ChronoAuditor.h b/GaudiAud/src/ChronoAuditor.h index 99a8a5a190732442815672b78337ae472085b774..3e5fc7e728e7e840f185b5e7e9cdf2a2406cd63a 100644 --- a/GaudiAud/src/ChronoAuditor.h +++ b/GaudiAud/src/ChronoAuditor.h @@ -31,7 +31,7 @@ private: inline std::string i_id( CustomEventTypeRef evt, const std::string& caller ) { return caller + ":" + evt; } SmartIF<IChronoStatSvc>& chronoSvc() { return m_chronoSvc; } - SmartIF<IChronoStatSvc> m_chronoSvc; + SmartIF<IChronoStatSvc> m_chronoSvc; }; #endif diff --git a/GaudiAud/src/MemStatAuditor.h b/GaudiAud/src/MemStatAuditor.h index 49d03c5bb8f44b9e5169a50471b245f683fcb33c..a3155d6cc254e2e7bcb5d5e6913003d5cbcfc9a6 100644 --- a/GaudiAud/src/MemStatAuditor.h +++ b/GaudiAud/src/MemStatAuditor.h @@ -27,7 +27,7 @@ private: void i_printinfo( const std::string& msg, CustomEventTypeRef evt, const std::string& caller ) override; SmartIF<IChronoStatSvc>& statSvc() { return m_stat; } - SmartIF<IChronoStatSvc> m_stat; + SmartIF<IChronoStatSvc> m_stat; /// vsize of the previous call to printinfo double m_vSize = -1; diff --git a/GaudiAud/src/ProcStats.cpp b/GaudiAud/src/ProcStats.cpp index f53488b66b528753522346028940e3951948fd3a..926980f57d0ea7bc0c370c8b1bc7f75e4598cbba 100644 --- a/GaudiAud/src/ProcStats.cpp +++ b/GaudiAud/src/ProcStats.cpp @@ -191,41 +191,41 @@ using std::endl; (divide by sysconf(_SC_CLK_TCK). */ struct linux_proc { - int pid; - char comm[400]; - char state; - int ppid; - int pgrp; - int session; - int tty; - int tpgid; - unsigned long flags; - unsigned long minflt; - unsigned long cminflt; - unsigned long majflt; - unsigned long cmajflt; - unsigned long utime; - unsigned long stime; - long cutime; - long cstime; - long priority; - long nice; - long num_threads; - long itrealvalue; + int pid; + char comm[400]; + char state; + int ppid; + int pgrp; + int session; + int tty; + int tpgid; + unsigned long flags; + unsigned long minflt; + unsigned long cminflt; + unsigned long majflt; + unsigned long cmajflt; + unsigned long utime; + unsigned long stime; + long cutime; + long cstime; + long priority; + long nice; + long num_threads; + long itrealvalue; unsigned long long starttime; - unsigned long vsize; - long rss; - unsigned long rlim; - unsigned long startcode; - unsigned long endcode; - unsigned long startstack; - unsigned long kstkesp; - unsigned long kstkeip; - unsigned long signal; - unsigned long blocked; - unsigned long sigignore; - unsigned long sigcatch; - unsigned long wchan; + unsigned long vsize; + long rss; + unsigned long rlim; + unsigned long startcode; + unsigned long endcode; + unsigned long startstack; + unsigned long kstkesp; + unsigned long kstkeip; + unsigned long signal; + unsigned long blocked; + unsigned long sigignore; + unsigned long sigcatch; + unsigned long wchan; }; #endif // __linux__ or __APPLE__ @@ -267,9 +267,9 @@ bool ProcStats::fetch( procInfo& f ) if ( valid == false ) return false; #if defined( __linux__ ) or defined( __APPLE__ ) - double pr_size, pr_rssize; + double pr_size, pr_rssize; linux_proc pinfo; - int cnt; + int cnt; fd.lseek( 0, SEEK_SET ); diff --git a/GaudiAud/src/ProcStats.h b/GaudiAud/src/ProcStats.h index 68875646b68f13a496f8343f51e6eb39867b4ff8..7e1ff31fe5571b944af30f777bc586b5c2718cfe 100644 --- a/GaudiAud/src/ProcStats.h +++ b/GaudiAud/src/ProcStats.h @@ -99,12 +99,12 @@ private: } }; - unique_fd fd; - double pg_size; - procInfo curr; + unique_fd fd; + double pg_size; + procInfo curr; std::string fname; - char buf[500]; - bool valid; + char buf[500]; + bool valid; static ProcStats* inst; }; diff --git a/GaudiCommonSvc/GaudiCommonSvc/Annotation.h b/GaudiCommonSvc/GaudiCommonSvc/Annotation.h index 27268a78c1d14fafb5da342c73f5713ef17d8347..661ea9ccdf77e18f01ddaed34c9215e6427b3223 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/Annotation.h +++ b/GaudiCommonSvc/GaudiCommonSvc/Annotation.h @@ -53,7 +53,7 @@ namespace AIDA std::string m_key; std::string m_value; - bool m_sticky; + bool m_sticky; }; /// The vector of the annotation items diff --git a/GaudiCommonSvc/GaudiCommonSvc/Generic1D.h b/GaudiCommonSvc/GaudiCommonSvc/Generic1D.h index cdd2c11dfa1c5dd193102a8a8e357c1ed4f86d0c..94f55755b26a944fd00def31b8fafb7c4398e516 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/Generic1D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/Generic1D.h @@ -243,8 +243,8 @@ namespace Gaudi template <class INTERFACE, class IMPLEMENTATION> int Generic1D<INTERFACE, IMPLEMENTATION>::write( const char* file_name ) const { - TFile* f = TFile::Open( file_name, "RECREATE" ); - Int_t nbytes = m_rep->Write(); + TFile* f = TFile::Open( file_name, "RECREATE" ); + Int_t nbytes = m_rep->Write(); f->Close(); return nbytes; } diff --git a/GaudiCommonSvc/GaudiCommonSvc/Generic2D.h b/GaudiCommonSvc/GaudiCommonSvc/Generic2D.h index 72941c100f554b415cbaf5cd5e953e044ef38350..390c5a478ec0788e31d3ee22e7f0201f2595fbdf 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/Generic2D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/Generic2D.h @@ -382,8 +382,8 @@ namespace Gaudi template <class INTERFACE, class IMPLEMENTATION> int Generic2D<INTERFACE, IMPLEMENTATION>::write( const char* file_name ) const { - TFile* f = TFile::Open( file_name, "RECREATE" ); - Int_t nbytes = m_rep->Write(); + TFile* f = TFile::Open( file_name, "RECREATE" ); + Int_t nbytes = m_rep->Write(); f->Close(); return nbytes; } diff --git a/GaudiCommonSvc/GaudiCommonSvc/Generic3D.h b/GaudiCommonSvc/GaudiCommonSvc/Generic3D.h index eed2f1946094c64bf2b8625be7eaf50334216242..dea17de8149568a3fc3aeaa9095c7b56530a4fe8 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/Generic3D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/Generic3D.h @@ -336,8 +336,8 @@ namespace Gaudi template <class INTERFACE, class IMPLEMENTATION> int Generic3D<INTERFACE, IMPLEMENTATION>::write( const char* file_name ) const { - TFile* f = TFile::Open( file_name, "RECREATE" ); - Int_t nbytes = m_rep->Write(); + TFile* f = TFile::Open( file_name, "RECREATE" ); + Int_t nbytes = m_rep->Write(); f->Close(); return nbytes; } diff --git a/GaudiCommonSvc/GaudiCommonSvc/H1D.h b/GaudiCommonSvc/GaudiCommonSvc/H1D.h index b41215582c69a7cbde2ebbf7fa3bed00465755f6..3614d660327f5f562ce088d0302bd7794835a4e8 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/H1D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/H1D.h @@ -46,7 +46,7 @@ namespace Gaudi /// Create new histogram from any AIDA based histogram void copyFromAida( const AIDA::IHistogram1D& h ); /// Retrieve reference to class defininition identifier - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_H1D; } /** Serialization mechanism, Serialize the object for reading. * @param s the StreamBuffer containing the data to be read diff --git a/GaudiCommonSvc/GaudiCommonSvc/H2D.h b/GaudiCommonSvc/GaudiCommonSvc/H2D.h index 225d7937a522ddc9f266e8b71b206edd5d842a9c..274d8aee27ae764bdb5635f3a3f1d6e5228869ce 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/H2D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/H2D.h @@ -36,7 +36,7 @@ namespace Gaudi /// Create new histogram from any AIDA based histogram void copyFromAida( const AIDA::IHistogram2D& h ); /// Retrieve reference to class defininition identifier - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_H2D; } protected: diff --git a/GaudiCommonSvc/GaudiCommonSvc/H3D.h b/GaudiCommonSvc/GaudiCommonSvc/H3D.h index 133c9d22c64a5c18810e10fd437b3f918ac87e1a..e1e3275196c9cda809f5f1c8f649cc81d7c86624 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/H3D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/H3D.h @@ -37,7 +37,7 @@ namespace Gaudi /// Create new histogram from any AIDA based histogram void copyFromAida( const AIDA::IHistogram3D& h ); /// Retrieve reference to class defininition identifier - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_H3D; } protected: diff --git a/GaudiCommonSvc/GaudiCommonSvc/HistogramSvc.h b/GaudiCommonSvc/GaudiCommonSvc/HistogramSvc.h index 86883e6b99d8ebf6fbe7ddcf88ab20a6979a9ee9..87fc389c870ff8b7c6d2d0b31f541b184bd5e4b3 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/HistogramSvc.h +++ b/GaudiCommonSvc/GaudiCommonSvc/HistogramSvc.h @@ -60,8 +60,8 @@ private: void not_implemented() const { error() << "Sorry, not yet implemented..." << endmsg; } protected: - typedef AIDA::IHistogram3D H3D; - typedef AIDA::IProfile2D P2D; + typedef AIDA::IHistogram3D H3D; + typedef AIDA::IProfile2D P2D; typedef AIDA::IBaseHistogram Base; struct Helper { @@ -71,7 +71,7 @@ protected: StatusCode retrieve( A1 a1, A3*& a3 ) { DataObject* pObject = nullptr; - StatusCode sc = m_svc->DataSvc::retrieveObject( a1, pObject ); + StatusCode sc = m_svc->DataSvc::retrieveObject( a1, pObject ); a3 = dynamic_cast<A3*>( pObject ); return sc; } @@ -79,7 +79,7 @@ protected: StatusCode retrieve( A1 a1, A2 a2, A3*& a3 ) { DataObject* pObject = nullptr; - StatusCode sc = m_svc->DataSvc::retrieveObject( a1, a2, pObject ); + StatusCode sc = m_svc->DataSvc::retrieveObject( a1, a2, pObject ); a3 = dynamic_cast<A3*>( pObject ); return sc; } @@ -87,7 +87,7 @@ protected: StatusCode find( A1 a1, A3*& a3 ) { DataObject* pObject = nullptr; - StatusCode sc = m_svc->DataSvc::findObject( a1, pObject ); + StatusCode sc = m_svc->DataSvc::findObject( a1, pObject ); a3 = dynamic_cast<A3*>( pObject ); return sc; } @@ -95,14 +95,14 @@ protected: StatusCode find( A1 a1, A2 a2, A3*& a3 ) { DataObject* pObject = nullptr; - StatusCode sc = m_svc->DataSvc::findObject( a1, a2, pObject ); + StatusCode sc = m_svc->DataSvc::findObject( a1, a2, pObject ); a3 = dynamic_cast<A3*>( pObject ); return sc; } template <class R, class S, class T1, class T2> static R* act( R* res, const S& b, void ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) { - auto h1 = Gaudi::getRepresentation<R, T1>( *res ); + auto h1 = Gaudi::getRepresentation<R, T1>( *res ); const auto h2 = Gaudi::getRepresentation<R, T2>( b ); if ( h1 && h2 ) { ( h1->*pmf )( h2, scale ); @@ -113,7 +113,7 @@ protected: template <class R, class S, class T1, class T2> static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) { - auto h1 = Gaudi::getRepresentation<R, T1>( *res ); + auto h1 = Gaudi::getRepresentation<R, T1>( *res ); const auto h2 = Gaudi::getRepresentation<R, T2>( b ); if ( h1 && h2 ) { ( h1->*pmf )( h2, scale ); @@ -124,7 +124,7 @@ protected: template <class R, class S, class T1, class T2> static R* act( R* res, const S& b, void ( T1::*pmf )( const T2* ) ) { - auto h1 = Gaudi::getRepresentation<R, T1>( *res ); + auto h1 = Gaudi::getRepresentation<R, T1>( *res ); const auto h2 = Gaudi::getRepresentation<R, T2>( b ); if ( h1 && h2 ) { ( h1->*pmf )( h2 ); @@ -135,7 +135,7 @@ protected: template <class R, class S, class T1, class T2> static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2* ) ) { - auto h1 = Gaudi::getRepresentation<R, T1>( *res ); + auto h1 = Gaudi::getRepresentation<R, T1>( *res ); const auto h2 = Gaudi::getRepresentation<R, T2>( b ); if ( h1 && h2 ) { ( h1->*pmf )( h2 ); @@ -1098,7 +1098,7 @@ public: private: Gaudi::Property<DBaseEntries> m_input{this, "Input", {}, "input streams"}; - Gaudi::Property<Histo1DMap> m_defs1D{this, "Predefined1DHistos", {}, "histograms with predefined parameters"}; + Gaudi::Property<Histo1DMap> m_defs1D{this, "Predefined1DHistos", {}, "histograms with predefined parameters"}; // modified histograms: std::set<std::string> m_mods1D; diff --git a/GaudiCommonSvc/GaudiCommonSvc/P1D.h b/GaudiCommonSvc/GaudiCommonSvc/P1D.h index 401d5c814d890cd9605816511d7aee2245a37415..17496847b39939a19842d9305da786f496f633b0 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/P1D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/P1D.h @@ -35,7 +35,7 @@ namespace Gaudi bool fill( double x, double y, double weight = 1. ) override; virtual bool setBinContents( int i, int entries, double height, double error, double spread, double centre ); /// Retrieve reference to class defininition identifier - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_ProfileH; } }; // end class IProfile1D } // end namespace Gaudi diff --git a/GaudiCommonSvc/GaudiCommonSvc/P2D.h b/GaudiCommonSvc/GaudiCommonSvc/P2D.h index 718007a9563df5a45cfa2bfdd783e746c7d8c02d..06a3de50812effb00ec722c8254233f0ecb3f6dd 100644 --- a/GaudiCommonSvc/GaudiCommonSvc/P2D.h +++ b/GaudiCommonSvc/GaudiCommonSvc/P2D.h @@ -35,7 +35,7 @@ namespace Gaudi return true; } /// Retrieve reference to class defininition identifier - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_ProfileH2; } }; } diff --git a/GaudiCommonSvc/src/AuditorSvc.cpp b/GaudiCommonSvc/src/AuditorSvc.cpp index 92d6b8478234393eec69f3c2224644b11a2401a2..0080e451ac3bced9653326772b4f1b658c3b4f21 100644 --- a/GaudiCommonSvc/src/AuditorSvc.cpp +++ b/GaudiCommonSvc/src/AuditorSvc.cpp @@ -22,9 +22,9 @@ DECLARE_COMPONENT( AuditorSvc ) SmartIF<IAuditor> AuditorSvc::newAuditor_( MsgStream& log, const std::string& name ) { // locate the auditor factory, instantiate a new auditor, initialize it - StatusCode sc; + StatusCode sc; Gaudi::Utils::TypeNameString item( name ); - SmartIF<IAuditor> aud{Auditor::Factory::create( item.type(), item.name(), serviceLocator().get() )}; + SmartIF<IAuditor> aud{Auditor::Factory::create( item.type(), item.name(), serviceLocator().get() )}; if ( aud ) { if ( m_targetState >= Gaudi::StateMachine::INITIALIZED ) { sc = aud->sysInitialize(); @@ -43,7 +43,7 @@ SmartIF<IAuditor> AuditorSvc::findAuditor_( const std::string& name ) { // find an auditor by name, return 0 on error const std::string item_name = Gaudi::Utils::TypeNameString( name ).name(); - auto it = std::find_if( std::begin( m_pAudList ), std::end( m_pAudList ), + auto it = std::find_if( std::begin( m_pAudList ), std::end( m_pAudList ), [&]( const IAuditor* i ) { return i->name() == item_name; } ); return SmartIF<IAuditor>{it != std::end( m_pAudList ) ? *it : nullptr}; } diff --git a/GaudiCommonSvc/src/AuditorSvc.h b/GaudiCommonSvc/src/AuditorSvc.h index db61c9ab3983139e4e5d6ca015edb225b3484e5d..808ce39fca3c713f566913559b2c020c43e83062 100644 --- a/GaudiCommonSvc/src/AuditorSvc.h +++ b/GaudiCommonSvc/src/AuditorSvc.h @@ -89,7 +89,7 @@ private: // management helper SmartIF<IAuditor> newAuditor_( MsgStream&, const std::string& ); SmartIF<IAuditor> findAuditor_( const std::string& ); - StatusCode syncAuditors_(); + StatusCode syncAuditors_(); Gaudi::Property<std::vector<std::string>> m_audNameList{this, "Auditors", {}, "list of auditors names"}; Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "enable/disable alltogether the auditors"}; diff --git a/GaudiCommonSvc/src/ChronoStatSvc.cpp b/GaudiCommonSvc/src/ChronoStatSvc.cpp index 676298b76fab38241d3d557b55c01d2c8eb13994..7714ac69ff18a1e49a537a0c0ee9e885ea40a8a8 100644 --- a/GaudiCommonSvc/src/ChronoStatSvc.cpp +++ b/GaudiCommonSvc/src/ChronoStatSvc.cpp @@ -61,7 +61,7 @@ void ChronoStatSvc::merge( const ChronoStatSvc& css ) // Merge Chronomaps for ( auto& item : css.m_chronoEntities ) { const IChronoStatSvc::ChronoTag& key = item.first; - const ChronoEntity& val = item.second; + const ChronoEntity& val = item.second; if ( m_chronoEntities.count( key ) ) m_chronoEntities[key] += val; else @@ -71,7 +71,7 @@ void ChronoStatSvc::merge( const ChronoStatSvc& css ) // Merge StatMaps for ( auto& item : css.m_statEntities ) { const IChronoStatSvc::StatTag& key = item.first; - const StatEntity& val = item.second; + const StatEntity& val = item.second; if ( m_statEntities.count( key ) ) m_statEntities[key] += val; else @@ -167,7 +167,7 @@ StatusCode ChronoStatSvc::finalize() /// Is the final chrono table to be printed? if ( m_chronoTableFlag && !m_chronoEntities.empty() && ( m_printUserTime || m_printSystemTime ) ) { /// decoration - MsgStream log( msgSvc(), "*****Chrono*****" ); + MsgStream log( msgSvc(), "*****Chrono*****" ); const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' ); if ( m_chronoCoutFlag ) { std::cout << stars << std::endl; @@ -328,7 +328,7 @@ const ChronoEntity* ChronoStatSvc::chronoStop( const IChronoStatSvc::ChronoTag& // Implementation of IChronoStatSvc::chronoDelta // ============================================================================ IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag, - IChronoStatSvc::ChronoType theType ) + IChronoStatSvc::ChronoType theType ) { return m_chronoEntities[chronoTag].delta( theType ); } @@ -503,7 +503,7 @@ void ChronoStatSvc::printStats() // prepare container for printing typedef std::pair<const StatEntity*, const StatTag*> SPair; typedef std::vector<SPair> SCont; - SCont tmpCont; + SCont tmpCont; std::transform( std::begin( m_statEntities ), std::end( m_statEntities ), std::back_inserter( tmpCont ), []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } ); // sort it diff --git a/GaudiCommonSvc/src/ChronoStatSvc.h b/GaudiCommonSvc/src/ChronoStatSvc.h index 436e29a906746e823c7c86bacc389aba5638694e..04d930ddae02b0bade77135c16d405686a98c050 100644 --- a/GaudiCommonSvc/src/ChronoStatSvc.h +++ b/GaudiCommonSvc/src/ChronoStatSvc.h @@ -36,7 +36,7 @@ public: // ============================================================================ /// some useful typedefs typedef std::map<IChronoStatSvc::ChronoTag, ChronoEntity> ChronoMap; - typedef std::map<IChronoStatSvc::StatTag, StatEntity> StatMap; + typedef std::map<IChronoStatSvc::StatTag, StatEntity> StatMap; // ============================================================================ public: // ============================================================================ @@ -61,7 +61,7 @@ public: * @see IChronoStatSvc */ virtual IChronoStatSvc::ChronoTime chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag, - IChronoStatSvc::ChronoType theType ) override; + IChronoStatSvc::ChronoType theType ) override; // ============================================================================ /** Implementation of IChronoStatSvc::chronoPrint * @see IChronoStatSvc @@ -144,7 +144,7 @@ private: "decide if the final printout should be performed"}; Gaudi::Property<bool> m_chronoCoutFlag{this, "ChronoDestinationCout", false, "define the destination of the table to be printed"}; - Gaudi::Property<int> m_intChronoPrintLevel{this, "ChronoPrintLevel", MSG::INFO, "print level"}; + Gaudi::Property<int> m_intChronoPrintLevel{this, "ChronoPrintLevel", MSG::INFO, "print level"}; Gaudi::Property<bool> m_chronoOrderFlag{this, "ChronoTableToBeOrdered", true, "should the printout be ordered"}; Gaudi::Property<bool> m_printUserTime{this, "PrintUserTime", true}; Gaudi::Property<bool> m_printSystemTime{this, "PrintSystemTime", false}; @@ -153,7 +153,7 @@ private: "decide if the final printout should be performed"}; Gaudi::Property<bool> m_statCoutFlag{this, "StatDestinationCout", false, "define the destination of the table to be printed"}; - Gaudi::Property<int> m_intStatPrintLevel{this, "StatPrintLevel", MSG::INFO, "print level"}; + Gaudi::Property<int> m_intStatPrintLevel{this, "StatPrintLevel", MSG::INFO, "print level"}; Gaudi::Property<bool> m_statOrderFlag{this, "StatTableToBeOrdered", true, "should the printout be ordered"}; Gaudi::Property<long> m_numberOfSkippedEventsForMemStat{ @@ -181,7 +181,7 @@ private: Gaudi::Property<std::string> m_perEventFile{this, "PerEventFile", "", "File name for per-event deltas"}; typedef std::map<ChronoTag, std::vector<IChronoSvc::ChronoTime>> TimeMap; - TimeMap m_perEvtTime; + TimeMap m_perEvtTime; std::ofstream m_ofd; // ============================================================================ diff --git a/GaudiCommonSvc/src/CounterSvc.cpp b/GaudiCommonSvc/src/CounterSvc.cpp index 37db09d1a7b1aa2d2f359c136c961c6ad44f5560..4ea3e59054ce08a3ff2e2f909800716c8fdb17bd 100644 --- a/GaudiCommonSvc/src/CounterSvc.cpp +++ b/GaudiCommonSvc/src/CounterSvc.cpp @@ -159,11 +159,11 @@ public: private: typedef GaudiUtils::HashMap<std::string, Counter*> NameMap; - typedef GaudiUtils::HashMap<std::string, NameMap> CountMap; + typedef GaudiUtils::HashMap<std::string, NameMap> CountMap; // the actual map of counters CountMap m_counts; ///< the actual map of counters - Gaudi::Property<bool> m_print{this, "PrintStat", true, "print statistics"}; + Gaudi::Property<bool> m_print{this, "PrintStat", true, "print statistics"}; Gaudi::Property<std::string> m_header{this, "StatTableHeader", " Counter :: Group | # | sum | " "mean/eff^* | rms/err^* | min | max |", @@ -204,7 +204,7 @@ CounterSvc::Counter* CounterSvc::get( const std::string& grp, const std::string& ICounterSvc::Counters CounterSvc::get( const std::string& group ) const { ICounterSvc::Counters result; - auto i = m_counts.find( group ); + auto i = m_counts.find( group ); if ( i != m_counts.end() ) { std::transform( i->second.begin(), i->second.end(), std::back_inserter( result ), [&]( const NameMap::value_type& j ) { @@ -254,7 +254,7 @@ StatusCode CounterSvc::create( const std::string& grp, const std::string& nam, l // =========================================================================== CounterSvc::CountObject CounterSvc::create( const std::string& group, const std::string& name, longlong initial_value ) { - Counter* p = nullptr; + Counter* p = nullptr; StatusCode sc = create( group, name, initial_value, p ); if ( sc.isSuccess() && p ) { return CountObject( p, group, name ); @@ -321,7 +321,7 @@ namespace { private: CounterSvc::Printout* printer; - MsgStream* log; + MsgStream* log; public: conditionalPrint( CounterSvc::Printout& _p, MsgStream& _l ) : printer( &_p ), log( &_l ) {} diff --git a/GaudiCommonSvc/src/DataSvc/MultiStoreSvc.cpp b/GaudiCommonSvc/src/DataSvc/MultiStoreSvc.cpp index c8c274091988992bac2588131151b4e5e67cec57..dcd301787e504895cbe733f5ad0613698cce2e3c 100644 --- a/GaudiCommonSvc/src/DataSvc/MultiStoreSvc.cpp +++ b/GaudiCommonSvc/src/DataSvc/MultiStoreSvc.cpp @@ -40,17 +40,17 @@ class MultiStoreSvc; typedef const std::string CSTR; -typedef IDataStoreAgent AGENT; -typedef DataObject OBJECT; -typedef IOpaqueAddress ADDRESS; -typedef StatusCode STATUS; +typedef IDataStoreAgent AGENT; +typedef DataObject OBJECT; +typedef IOpaqueAddress ADDRESS; +typedef StatusCode STATUS; namespace { struct Partition final { SmartIF<IDataProviderSvc> dataProvider; - SmartIF<IDataManagerSvc> dataManager; - std::string name; + SmartIF<IDataManagerSvc> dataManager; + std::string name; }; } @@ -71,11 +71,11 @@ protected: typedef std::vector<std::string> PartitionDefs; typedef std::map<std::string, Partition> Partitions; - Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110, "CLID of root entry"}; - Gaudi::Property<std::string> m_rootName{this, "RootName", "/Event", "name of root entry"}; + Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110, "CLID of root entry"}; + Gaudi::Property<std::string> m_rootName{this, "RootName", "/Event", "name of root entry"}; Gaudi::Property<PartitionDefs> m_partitionDefs{this, "Partitions", {}, "datastore partition definitions"}; - Gaudi::Property<std::string> m_loader{this, "DataLoader", "EventPersistencySvc", "data loader name"}; - Gaudi::Property<std::string> m_defaultPartition{this, "DefaultPartition", "Default", "default partition name"}; + Gaudi::Property<std::string> m_loader{this, "DataLoader", "EventPersistencySvc", "data loader name"}; + Gaudi::Property<std::string> m_defaultPartition{this, "DefaultPartition", "Default", "default partition name"}; /// Pointer to data loader service SmartIF<IConversionSvc> m_dataLoader; @@ -84,11 +84,11 @@ protected: /// Root type (address or object) enum { no_type = 0, address_type = 1, object_type = 2 }; struct tagROOT { - int type = no_type; + int type = no_type; std::string path; union { ADDRESS* address; - OBJECT* object; + OBJECT* object; } root; tagROOT() { root.address = nullptr; } } m_root; diff --git a/GaudiCommonSvc/src/DataSvc/PartitionSwitchAlg.cpp b/GaudiCommonSvc/src/DataSvc/PartitionSwitchAlg.cpp index b9fbabcecbb251e69c7820e82020a353d3381c96..29962729632b0438e5ba2d0a005730a1823dfd07 100644 --- a/GaudiCommonSvc/src/DataSvc/PartitionSwitchAlg.cpp +++ b/GaudiCommonSvc/src/DataSvc/PartitionSwitchAlg.cpp @@ -45,7 +45,7 @@ public: STATUS initialize() override { SmartIF<IAlgTool> tool( m_actor ); - STATUS sc = toolSvc()->retrieveTool( m_toolType, m_actor, this ); + STATUS sc = toolSvc()->retrieveTool( m_toolType, m_actor, this ); if ( sc.isFailure() ) { error() << "Unable to load PartitionSwitchTool " << m_toolType << endmsg; return sc; diff --git a/GaudiCommonSvc/src/DataSvc/RecordDataSvc.cpp b/GaudiCommonSvc/src/DataSvc/RecordDataSvc.cpp index 513cfea4613fe99da575efb870c4e9dbfcd1df6c..8a4bcdde7e7677d50ab0598f89389e860d5ad28f 100644 --- a/GaudiCommonSvc/src/DataSvc/RecordDataSvc.cpp +++ b/GaudiCommonSvc/src/DataSvc/RecordDataSvc.cpp @@ -93,7 +93,7 @@ void RecordDataSvc::handle( const Incident& incident ) { if ( incident.type() == "FILE_OPEN_READ" ) { typedef ContextIncident<IOpaqueAddress*> Ctxt; - auto inc = dynamic_cast<const Ctxt*>( &incident ); + auto inc = dynamic_cast<const Ctxt*>( &incident ); if ( !inc ) { always() << "Received invalid incident of type:" << incident.type() << endmsg; } else { @@ -116,9 +116,9 @@ void RecordDataSvc::loadRecords( IRegistry* pObj ) error() << "Failed to load records object: " << pObj->identifier() << endmsg; } else { vector<IRegistry*> leaves; - DataObject* p = nullptr; - const string& id0 = pObj->identifier(); - StatusCode sc = retrieveObject( id0, p ); + DataObject* p = nullptr; + const string& id0 = pObj->identifier(); + StatusCode sc = retrieveObject( id0, p ); if ( sc.isSuccess() ) { debug() << "Loaded records object: " << id0 << endmsg; sc = objectLeaves( pObj, leaves ); diff --git a/GaudiCommonSvc/src/DataSvc/RecordDataSvc.h b/GaudiCommonSvc/src/DataSvc/RecordDataSvc.h index 2f85246694eaf397f8733a1913b3139f94365918..8d96d9e4d3bbcb5730a1e386b6c0e74767cff8d3 100644 --- a/GaudiCommonSvc/src/DataSvc/RecordDataSvc.h +++ b/GaudiCommonSvc/src/DataSvc/RecordDataSvc.h @@ -44,7 +44,7 @@ protected: void loadRecords( IRegistry* pReg ); protected: - Gaudi::Property<bool> m_autoLoad{this, "AutoLoad", true, "autoload of records"}; + Gaudi::Property<bool> m_autoLoad{this, "AutoLoad", true, "autoload of records"}; Gaudi::Property<std::string> m_incidentName{this, "IncidentName", "", "name of incident to be fired if new record arrives"}; Gaudi::Property<std::string> m_saveIncidentName{this, "SaveIncident", "SAVE_RECORD", "name of the 'save' incident"}; diff --git a/GaudiCommonSvc/src/DataSvc/StoreExplorerAlg.cpp b/GaudiCommonSvc/src/DataSvc/StoreExplorerAlg.cpp index 81ae76b56047682c8dada366bd653f135d96d996..bbcdbd96b0289e1a1037bd22e2b41e3e7d3ccad6 100644 --- a/GaudiCommonSvc/src/DataSvc/StoreExplorerAlg.cpp +++ b/GaudiCommonSvc/src/DataSvc/StoreExplorerAlg.cpp @@ -32,13 +32,13 @@ class StoreExplorerAlg : public Algorithm { - Gaudi::Property<bool> m_load{this, "Load", false, "load non existing items"}; - Gaudi::Property<long> m_print{this, "PrintEvt", 1, "limit printout to first N events"}; - Gaudi::Property<long> m_printMissing{this, "PrintMissing", 0, "indicate if missing entities should be printed"}; + Gaudi::Property<bool> m_load{this, "Load", false, "load non existing items"}; + Gaudi::Property<long> m_print{this, "PrintEvt", 1, "limit printout to first N events"}; + Gaudi::Property<long> m_printMissing{this, "PrintMissing", 0, "indicate if missing entities should be printed"}; Gaudi::Property<double> m_frequency{this, "PrintFreq", 0.0, "printout frequency"}; - Gaudi::Property<bool> m_exploreRelations{this, "ExploreRelations", false, "if relations should be followed"}; + Gaudi::Property<bool> m_exploreRelations{this, "ExploreRelations", false, "if relations should be followed"}; Gaudi::Property<std::string> m_dataSvcName{this, "DataSvc", "EventDataSvc", "name of the data provider service"}; - Gaudi::Property<bool> m_testAccess{this, "TestAccess", false, + Gaudi::Property<bool> m_testAccess{this, "TestAccess", false, "test access to objects (DataObject and ContainedObject)"}; Gaudi::Property<bool> m_accessForeign{this, "AccessForeign", false, "indicate if foreign files should be opened"}; @@ -103,8 +103,8 @@ public: ObjectContainerBase* base = dynamic_cast<ObjectContainerBase*>( p ); if ( base ) { try { - int numObj = base->numberOfObjects(); - const CLID id = p->clID(); + int numObj = base->numberOfObjects(); + const CLID id = p->clID(); log << " [" << numObj << "]"; if ( m_testAccess ) { CLID idd = id >> 16; @@ -140,13 +140,13 @@ public: auto mgr = eventSvc().as<IDataManagerSvc>(); if ( mgr ) { std::vector<IRegistry*> leaves; - StatusCode sc = mgr->objectLeaves( pObj, leaves ); - const std::string* par0 = nullptr; - if ( pObj->address() ) par0 = pObj->address()->par(); + StatusCode sc = mgr->objectLeaves( pObj, leaves ); + const std::string* par0 = nullptr; + if ( pObj->address() ) par0 = pObj->address()->par(); if ( sc.isSuccess() ) { for ( auto i = leaves.begin(); i != leaves.end(); i++ ) { const std::string& id = ( *i )->identifier(); - DataObject* p = nullptr; + DataObject* p = nullptr; if ( !m_accessForeign && ( *i )->address() ) { if ( par0 ) { const std::string* par1 = ( *i )->address()->par(); @@ -207,7 +207,7 @@ public: if ( ( ( m_print > m_total++ ) || ( m_frequency * m_total > m_frqPrint ) ) && root ) { if ( m_frequency * m_total > m_frqPrint ) m_frqPrint++; std::string store_name = "Unknown"; - IRegistry* pReg = root->registry(); + IRegistry* pReg = root->registry(); if ( pReg ) { auto isvc = SmartIF<IService>{pReg->dataSvc()}; if ( isvc ) store_name = isvc->name(); diff --git a/GaudiCommonSvc/src/DataSvc/StoreSnifferAlg.cpp b/GaudiCommonSvc/src/DataSvc/StoreSnifferAlg.cpp index 6fd1d24e66577326d7344519d5aa5a230ed96abd..1a54e386afb6a0028094700bc87247d618b42057 100644 --- a/GaudiCommonSvc/src/DataSvc/StoreSnifferAlg.cpp +++ b/GaudiCommonSvc/src/DataSvc/StoreSnifferAlg.cpp @@ -30,14 +30,14 @@ public: SmartIF<IDataManagerSvc> m_mgr; struct LeafInfo final { - int count; - int id; + int count; + int id; CLID clid; }; typedef map<string, LeafInfo> SniffInfo; typedef map<string, map<int, int>> Correlations; - SniffInfo m_info, m_curr; + SniffInfo m_info, m_curr; Correlations m_corr, m_links; /// Standard algorithm constructor @@ -51,13 +51,13 @@ public: auto mgr = eventSvc().as<IDataManagerSvc>(); if ( mgr ) { vector<IRegistry*> leaves; - StatusCode sc = m_mgr->objectLeaves( pObj, leaves ); + StatusCode sc = m_mgr->objectLeaves( pObj, leaves ); if ( sc.isSuccess() ) { for ( auto& pReg : leaves ) { /// We are only interested in leaves with an object if ( !pReg->address() || !pReg->object() ) continue; const string& id = pReg->identifier(); - auto j = m_info.find( id ); + auto j = m_info.find( id ); if ( j == m_info.end() ) { m_info[id] = LeafInfo(); j = m_info.find( id ); @@ -150,7 +150,7 @@ public: } for ( const auto& l : m_curr ) { const auto& id = l.second.id; - auto k = c->second.find( id ); + auto k = c->second.find( id ); if ( k == c->second.end() ) k = c->second.emplace( id, 0 ).first; ++( k->second ); } @@ -165,12 +165,12 @@ public: LinkManager* m = obj->linkMgr(); for ( long l = 0; l < m->size(); ++l ) { auto* lnk = m->link( l ); - auto il = m_curr.find( lnk->path() ); + auto il = m_curr.find( lnk->path() ); // cout << "Link:" << lnk->path() << " " << (char*)(il != m_curr.end() ? "Found" : "Not there") << endl; if ( il == m_curr.end() ) continue; if ( !lnk->object() ) continue; const auto& id = il->second.id; - auto k = c->second.find( id ); + auto k = c->second.find( id ); if ( k == c->second.end() ) k = c->second.emplace( id, 0 ).first; ++( k->second ); } diff --git a/GaudiCommonSvc/src/HistogramSvc/Factory.cpp b/GaudiCommonSvc/src/HistogramSvc/Factory.cpp index 6d8373d796f986dfe46bcf4beebd5977e6dd06b2..6e265251752d1a3adbe2aa33c66a4382ce4996a0 100644 --- a/GaudiCommonSvc/src/HistogramSvc/Factory.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/Factory.cpp @@ -10,9 +10,9 @@ namespace { typedef Gaudi::Histogram1D H1D; - typedef Gaudi::Profile1D P1D; + typedef Gaudi::Profile1D P1D; typedef Gaudi::Histogram2D H2D; - typedef Gaudi::Profile2D P2D; + typedef Gaudi::Profile2D P2D; typedef Gaudi::Histogram3D H3D; } diff --git a/GaudiCommonSvc/src/HistogramSvc/H1D.cpp b/GaudiCommonSvc/src/HistogramSvc/H1D.cpp index b864b6db0ee7cfb69db95c8fb7921c5bb614b471..3328c773595fae4db2198bf18f5a050370857b4c 100644 --- a/GaudiCommonSvc/src/HistogramSvc/H1D.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/H1D.cpp @@ -31,7 +31,7 @@ std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D( const std::string& std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D( const AIDA::IHistogram1D& hist ) { TH1D* h = getRepresentation<AIDA::IHistogram1D, TH1D>( hist ); - auto n = ( h ? new Histogram1D( new TH1D( *h ) ) : nullptr ); + auto n = ( h ? new Histogram1D( new TH1D( *h ) ) : nullptr ); return {n, n}; } namespace Gaudi @@ -224,7 +224,7 @@ StreamBuffer& Gaudi::Histogram1D::serialize( StreamBuffer& s ) { // DataObject::serialize(s); std::string title; - int size; + int size; s >> size; for ( int j = 0; j < size; j++ ) { std::string key, value; @@ -235,7 +235,7 @@ StreamBuffer& Gaudi::Histogram1D::serialize( StreamBuffer& s ) } } double lowerEdge, upperEdge, binHeight, binError; - int isFixedBinning, bins; + int isFixedBinning, bins; s >> isFixedBinning >> bins; if ( isFixedBinning ) { @@ -275,8 +275,8 @@ StreamBuffer& Gaudi::Histogram1D::serialize( StreamBuffer& s ) const s << annotation().value( i ); } const AIDA::IAxis& axis( this->axis() ); - const int isFixedBinning = axis.isFixedBinning(); - const int bins = axis.bins(); + const int isFixedBinning = axis.isFixedBinning(); + const int bins = axis.bins(); s << isFixedBinning << bins; if ( isFixedBinning ) { s << axis.lowerEdge(); diff --git a/GaudiCommonSvc/src/HistogramSvc/H2D.cpp b/GaudiCommonSvc/src/HistogramSvc/H2D.cpp index 4c9b758a9f8fc4d26e1b95505b0ed3e565d2695a..9739292a73e47ff6fc5daaad576a86491b511b8b 100644 --- a/GaudiCommonSvc/src/HistogramSvc/H2D.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/H2D.cpp @@ -48,7 +48,7 @@ std::pair<DataObject*, IHistogram2D*> Gaudi::createH2D( TH2D* rep ) std::pair<DataObject*, IHistogram2D*> Gaudi::createH2D( const IHistogram2D& hist ) { - TH2D* h = getRepresentation<AIDA::IHistogram2D, TH2D>( hist ); + TH2D* h = getRepresentation<AIDA::IHistogram2D, TH2D>( hist ); Histogram2D* n = h ? new Histogram2D( new TH2D( *h ) ) : nullptr; return {n, n}; } @@ -56,7 +56,7 @@ std::pair<DataObject*, IHistogram2D*> Gaudi::createH2D( const IHistogram2D& hist std::pair<DataObject*, IHistogram1D*> Gaudi::slice1DX( const std::string& nam, const IHistogram2D& hist, int first, int last ) { - TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); + TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); TH1D* t = r ? r->ProjectionX( "_px", first, last, "e" ) : nullptr; if ( t ) t->SetName( nam.c_str() ); Histogram1D* p = ( t ? new Histogram1D( t ) : nullptr ); @@ -66,7 +66,7 @@ std::pair<DataObject*, IHistogram1D*> Gaudi::slice1DX( const std::string& nam, c std::pair<DataObject*, IHistogram1D*> Gaudi::slice1DY( const std::string& nam, const IHistogram2D& hist, int first, int last ) { - TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); + TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); TH1D* t = r ? r->ProjectionY( "_py", first, last, "e" ) : nullptr; if ( t ) t->SetName( nam.c_str() ); Histogram1D* p = ( t ? new Histogram1D( t ) : nullptr ); @@ -76,7 +76,7 @@ std::pair<DataObject*, IHistogram1D*> Gaudi::slice1DY( const std::string& nam, c std::pair<DataObject*, IHistogram1D*> Gaudi::project1DY( const std::string& nam, const IHistogram2D& hist, int first, int last ) { - TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); + TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); TH1D* t = r ? r->ProjectionY( "_px", first, last, "e" ) : nullptr; if ( t ) t->SetName( nam.c_str() ); Histogram1D* p = ( t ? new Histogram1D( t ) : nullptr ); @@ -86,7 +86,7 @@ std::pair<DataObject*, IHistogram1D*> Gaudi::project1DY( const std::string& nam, std::pair<DataObject*, IProfile1D*> Gaudi::profile1DX( const std::string& nam, const IHistogram2D& hist, int first, int last ) { - TH2* r = Gaudi::getRepresentation<IHistogram2D, TH2>( hist ); + TH2* r = Gaudi::getRepresentation<IHistogram2D, TH2>( hist ); TProfile* t = r ? r->ProfileX( "_pfx", first, last, "e" ) : nullptr; if ( t ) t->SetName( nam.c_str() ); Profile1D* p = ( t ? new Profile1D( t ) : nullptr ); @@ -96,7 +96,7 @@ std::pair<DataObject*, IProfile1D*> Gaudi::profile1DX( const std::string& nam, c std::pair<DataObject*, IProfile1D*> Gaudi::profile1DY( const std::string& nam, const IHistogram2D& hist, int first, int last ) { - TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); + TH2* r = getRepresentation<IHistogram2D, TH2>( hist ); TProfile* t = r ? r->ProfileY( "_pfx", first, last, "e" ) : nullptr; if ( t ) t->SetName( nam.c_str() ); Profile1D* p = ( t ? new Profile1D( t ) : nullptr ); diff --git a/GaudiCommonSvc/src/HistogramSvc/H3D.cpp b/GaudiCommonSvc/src/HistogramSvc/H3D.cpp index 3df5c8e9d7bfe25374af52a25bc434f4f1823ce1..4a5afec2cb5344d72ed73dfefb1c13fa1dff0de0 100644 --- a/GaudiCommonSvc/src/HistogramSvc/H3D.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/H3D.cpp @@ -57,7 +57,7 @@ std::pair<DataObject*, AIDA::IHistogram3D*> Gaudi::createH3D( const std::string& std::pair<DataObject*, AIDA::IHistogram3D*> Gaudi::createH3D( const AIDA::IHistogram3D& hist ) { - TH3D* h = getRepresentation<AIDA::IHistogram3D, TH3D>( hist ); + TH3D* h = getRepresentation<AIDA::IHistogram3D, TH3D>( hist ); Histogram3D* n = h ? new Histogram3D( new TH3D( *h ) ) : nullptr; return {n, n}; } diff --git a/GaudiCommonSvc/src/HistogramSvc/HistogramSvc.cpp b/GaudiCommonSvc/src/HistogramSvc/HistogramSvc.cpp index b2d7e51cc0e1d7294653883213260679e18fb3c4..cd8a80234cd5b7597f66e1cc3e7392fd194f48b6 100644 --- a/GaudiCommonSvc/src/HistogramSvc/HistogramSvc.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/HistogramSvc.cpp @@ -63,7 +63,7 @@ namespace { for ( auto it = m.begin(); m.end() != it; ++it ) { if ( 0 == it->first.find( lead ) ) { - string addr = string( it->first, lead.size() ); + string addr = string( it->first, lead.size() ); Gaudi::Histo1DDef hdef = it->second; m.erase( it ); // remove m[addr] = hdef; // insert @@ -170,11 +170,11 @@ DataObject* HistogramSvc::createPath( const string& newPath ) tmpPath.erase( tmpPath.rfind( SEPARATOR ), 1 ); } DataObject* pObject = nullptr; - StatusCode sc = DataSvc::findObject( tmpPath, pObject ); + StatusCode sc = DataSvc::findObject( tmpPath, pObject ); if ( sc.isSuccess() ) { return pObject; } - int sep = tmpPath.rfind( SEPARATOR ); + int sep = tmpPath.rfind( SEPARATOR ); string rest( tmpPath, sep + 1, tmpPath.length() - sep ); string subPath( tmpPath, 0, sep ); if ( 0 != sep ) { @@ -193,7 +193,7 @@ DataObject* HistogramSvc::createDirectory( const string& parentDir, const string std::unique_ptr<DataObject> directory{new DataObject()}; if ( directory ) { DataObject* pnode; - StatusCode status = DataSvc::retrieveObject( parentDir, pnode ); + StatusCode status = DataSvc::retrieveObject( parentDir, pnode ); if ( status.isSuccess() ) { status = DataSvc::registerObject( pnode, subDir, directory.get() ); if ( !status.isSuccess() ) { @@ -218,13 +218,13 @@ HistogramSvc::~HistogramSvc() //------------------------------------------------------------------------------ StatusCode HistogramSvc::connectInput( const string& ident ) { - using Parser = Gaudi::Utils::AttribStringParser; - DataObject* pO = nullptr; - StatusCode status = this->findObject( m_rootName, pO ); + using Parser = Gaudi::Utils::AttribStringParser; + DataObject* pO = nullptr; + StatusCode status = this->findObject( m_rootName, pO ); if ( status.isSuccess() ) { string::size_type loc = ident.find( " " ); - string filename, auth, svc = "", typ = ""; - string logname = ident.substr( 0, loc ); + string filename, auth, svc = "", typ = ""; + string logname = ident.substr( 0, loc ); for ( auto attrib : Parser( ident.substr( loc + 1 ) ) ) { switch (::toupper( attrib.tag[0] ) ) { case 'F': // FILE='<file name>' @@ -360,8 +360,8 @@ AIDA::IHistogram1D* HistogramSvc::book( DataObject* pPar, const string& rel, con if ( m_defs1D.empty() ) { return i_book( pPar, rel, title, Gaudi::createH1D( title, nx, lowx, upx ) ); } - string hn = histoAddr( pPar, rel ); - auto ifound = m_defs1D.find( hn ); + string hn = histoAddr( pPar, rel ); + auto ifound = m_defs1D.find( hn ); if ( m_defs1D.end() == ifound ) { return i_book( pPar, rel, title, Gaudi::createH1D( title, nx, lowx, upx ) ); } diff --git a/GaudiCommonSvc/src/HistogramSvc/P1D.cpp b/GaudiCommonSvc/src/HistogramSvc/P1D.cpp index a2a05170af2df3968b15ed31ced1d55c230eb1cf..99e1d8e56e4a290f50d0e6c2c666f1c6e52dfbe0 100644 --- a/GaudiCommonSvc/src/HistogramSvc/P1D.cpp +++ b/GaudiCommonSvc/src/HistogramSvc/P1D.cpp @@ -36,7 +36,7 @@ std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::createProf1D( const std::string std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::createProf1D( const AIDA::IProfile1D& hist ) { TProfile* h = getRepresentation<AIDA::IProfile1D, TProfile>( hist ); - auto n = ( h ? new Profile1D( new TProfile( *h ) ) : nullptr ); + auto n = ( h ? new Profile1D( new TProfile( *h ) ) : nullptr ); return {n, n}; } diff --git a/GaudiCommonSvc/src/PersistencySvc/DataSvcFileEntriesTool.cpp b/GaudiCommonSvc/src/PersistencySvc/DataSvcFileEntriesTool.cpp index ab22cb6084550f1186561aa2db8bbf794c5c9397..2125a874e3a1c302438c75de451b1f147856a6c0 100644 --- a/GaudiCommonSvc/src/PersistencySvc/DataSvcFileEntriesTool.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/DataSvcFileEntriesTool.cpp @@ -53,7 +53,7 @@ public: private: Gaudi::Property<std::string> m_dataSvcName{this, "DataService", "EventDataSvc", "Name of the data service to use"}; Gaudi::Property<std::string> m_rootNode{this, "Root", "", "Path to the element from which to start the scan"}; - Gaudi::Property<bool> m_scanOnBeginEvent{ + Gaudi::Property<bool> m_scanOnBeginEvent{ this, "ScanOnBeginEvent", false, "If the scan has to be started during the BeginEvent incident (true) or on demand (false, default)"}; Gaudi::Property<bool> m_ignoreOriginChange{ @@ -170,7 +170,7 @@ const IDataStoreLeaves::LeavesList& DataSvcFileEntriesTool::leaves() const IRegistry* DataSvcFileEntriesTool::i_getRootNode() { DataObject* obj = nullptr; - StatusCode sc = m_dataSvc->retrieveObject( m_rootNode, obj ); + StatusCode sc = m_dataSvc->retrieveObject( m_rootNode, obj ); if ( sc.isFailure() ) { throw GaudiException( "Cannot get " + m_rootNode + " from " + m_dataSvcName, name(), StatusCode::FAILURE ); } @@ -197,7 +197,7 @@ void DataSvcFileEntriesTool::i_collectLeaves( IRegistry* reg ) name(), StatusCode::FAILURE ); std::vector<IRegistry*> lfs; // leaves of the current object - StatusCode sc = m_dataMgrSvc->objectLeaves( reg, lfs ); + StatusCode sc = m_dataMgrSvc->objectLeaves( reg, lfs ); if ( sc.isSuccess() ) { for ( const auto& i : lfs ) { // Continue if the leaf has the same database as the parent diff --git a/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.cpp b/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.cpp index ca4502e263e0f22e9d61d09eb639312e965d1b3a..304e60850b2f7ef19c0b83ce7f73c5d7cebb1646 100644 --- a/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.cpp @@ -66,8 +66,8 @@ void EvtCollectionStream::clearItems() { m_itemList.clear(); } // Add item to output streamer list void EvtCollectionStream::addItem( const std::string& descriptor ) { - auto sep = descriptor.rfind( "#" ); - int level = 0; + auto sep = descriptor.rfind( "#" ); + int level = 0; std::string obj_path = descriptor.substr( 0, sep ); if ( sep != std::string::npos ) { std::string slevel = descriptor.substr( sep + 1 ); diff --git a/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.h b/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.h index faa959ad3a12a25703cefad40e8f745527c46eb0..f9851d61f2984c1f46652e41948228753ca54fa3 100644 --- a/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.h +++ b/GaudiCommonSvc/src/PersistencySvc/EvtCollectionStream.h @@ -26,7 +26,7 @@ class EvtCollectionStream : public Algorithm { protected: Gaudi::Property<std::vector<std::string>> m_itemNames{this, "ItemList", {}, "vector of item names"}; - Gaudi::Property<std::string> m_storeName{this, "EvtDataSvc", "TagCollectionSvc", + Gaudi::Property<std::string> m_storeName{this, "EvtDataSvc", "TagCollectionSvc", "name of the service managing the data store"}; /// Reference to Tuple service for event collection (may or may not be NTuple service) diff --git a/GaudiCommonSvc/src/PersistencySvc/OutputStream.cpp b/GaudiCommonSvc/src/PersistencySvc/OutputStream.cpp index 2cb47a062ebf9e8c67292cd4a96831551cb97568..ef716daf3199ade0960e0c94815542e6ff8d598e 100644 --- a/GaudiCommonSvc/src/PersistencySvc/OutputStream.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/OutputStream.cpp @@ -189,7 +189,7 @@ StatusCode OutputStream::writeObjects() } for ( auto& j : *sel ) { try { - IRegistry* pReg = j->registry(); + IRegistry* pReg = j->registry(); const StatusCode iret = m_pConversionSvc->fillRepRefs( pReg->address(), j ); if ( !iret.isSuccess() ) status = iret; } catch ( const std::exception& excpt ) { @@ -266,7 +266,7 @@ StatusCode OutputStream::collectObjects() // Collect objects dependent on particular algorithms for ( const auto& iAlgItems : m_algDependentItems ) { - Algorithm* alg = iAlgItems.first; + Algorithm* alg = iAlgItems.first; const Items& items = iAlgItems.second; if ( alg->isExecuted() && alg->filterPassed() ) { ON_DEBUG @@ -289,7 +289,7 @@ StatusCode OutputStream::collectObjects() if ( status.isSuccess() ) { // Remove duplicates from the list of objects, preserving the order in the list - std::set<DataObject*> unique; + std::set<DataObject*> unique; std::vector<DataObject*> tmp; // temporary vector with the reduced list tmp.reserve( m_objects.size() ); for ( auto& o : m_objects ) { @@ -318,8 +318,8 @@ void OutputStream::clearItems( Items& itms ) // Find single item identified by its path (exact match) DataStoreItem* OutputStream::findItem( const std::string& path ) { - auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; }; - auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath ); + auto matchPath = [&]( const DataStoreItem* i ) { return i->path() == path; }; + auto i = std::find_if( m_itemList.begin(), m_itemList.end(), matchPath ); if ( i == m_itemList.end() ) { i = std::find_if( m_optItemList.begin(), m_optItemList.end(), matchPath ); if ( i == m_optItemList.end() ) return nullptr; @@ -330,8 +330,8 @@ DataStoreItem* OutputStream::findItem( const std::string& path ) // Add item to output streamer list void OutputStream::addItem( Items& itms, const std::string& descriptor ) { - int level = 0; - auto sep = descriptor.rfind( "#" ); + int level = 0; + auto sep = descriptor.rfind( "#" ); std::string obj_path = descriptor.substr( 0, sep ); if ( sep != std::string::npos ) { std::string slevel = descriptor.substr( sep + 1 ); @@ -408,8 +408,8 @@ StatusCode OutputStream::connectConversionSvc() // If this is not desired, then a specialized OutputStream must overwrite // this value. if ( !dbType.empty() || !svc.empty() ) { - std::string typ = !dbType.empty() ? dbType : svc; - auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName ); + std::string typ = !dbType.empty() ? dbType : svc; + auto ipers = serviceLocator()->service<IPersistencySvc>( m_persName ); if ( !ipers ) { fatal() << "Unable to locate IPersistencySvc interface of " << m_persName << endmsg; return StatusCode::FAILURE; @@ -504,7 +504,7 @@ Algorithm* OutputStream::decodeAlgorithm( const std::string& theName ) } StatusCode OutputStream::decodeAlgorithms( Gaudi::Property<std::vector<std::string>>& theNames, - std::vector<Algorithm*>& theAlgs ) + std::vector<Algorithm*>& theAlgs ) { // Reset the list of Algorithms theAlgs.clear(); diff --git a/GaudiCommonSvc/src/PersistencySvc/OutputStream.h b/GaudiCommonSvc/src/PersistencySvc/OutputStream.h index 5b247b14b40ad4d9d617409176c5d3fb5b31363f..cc510dd5b8872e57cd114bcaab095a4ea7736946 100644 --- a/GaudiCommonSvc/src/PersistencySvc/OutputStream.h +++ b/GaudiCommonSvc/src/PersistencySvc/OutputStream.h @@ -30,8 +30,8 @@ class OutputStream : public Algorithm { public: typedef std::vector<DataStoreItem*> Items; - typedef std::vector<std::string> ItemNames; - typedef std::map<Algorithm*, Items> AlgDependentItems; + typedef std::vector<std::string> ItemNames; + typedef std::map<Algorithm*, Items> AlgDependentItems; typedef std::map<std::string, ItemNames> AlgDependentItemNames; protected: diff --git a/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp b/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp index 21fbc94fc435bbb431c7814018169df37cf6ee5c..495d36132af0b09bb879f348ca6184ef5370ee68 100644 --- a/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.cpp @@ -35,7 +35,7 @@ #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLvel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() // Instantiation of a static factory class used by clients to create @@ -226,7 +226,7 @@ IConverter* PersistencySvc::converter( const CLID& /*clid*/ ) { return nullptr; SmartIF<IConversionSvc>& PersistencySvc::service( const std::string& nam ) { Gaudi::Utils::TypeNameString tn( nam ); - auto it = std::find_if( m_cnvServices.begin(), m_cnvServices.end(), + auto it = std::find_if( m_cnvServices.begin(), m_cnvServices.end(), [&]( Services::const_reference i ) { return i.second.service()->name() == tn.name(); } ); if ( it != m_cnvServices.end() ) return it->second.conversionSvc(); @@ -341,8 +341,8 @@ StatusCode PersistencySvc::convertAddress( const IOpaqueAddress* pAddress, std:: svc_type = pAddress->svcType(); clid = pAddress->clID(); } - IAddressCreator* svc = addressCreator( svc_type ); - StatusCode status = BAD_STORAGE_TYPE; // Preset error + IAddressCreator* svc = addressCreator( svc_type ); + StatusCode status = BAD_STORAGE_TYPE; // Preset error refAddress.clear(); if ( svc ) { @@ -363,8 +363,8 @@ StatusCode PersistencySvc::createAddress( long /* svc_type */, const CLID& /* cl // Assumption is that the Persistency service decodes that header // and requests the conversion service referred to by the service // type to decode the rest - long new_svc_type = 0; - CLID new_clid = 0; + long new_svc_type = 0; + CLID new_clid = 0; std::string address_trailer; decodeAddrHdr( refAddress, new_svc_type, new_clid, address_trailer ); IAddressCreator* svc = addressCreator( new_svc_type ); @@ -377,7 +377,7 @@ void PersistencySvc::encodeAddrHdr( long service_type, const CLID& clid, std::st // For address header, use xml-style format of // <addrhdr service_type="xxx" clid="yyy" /> std::stringstream stream; - int svctyp = service_type; // must put int into stream, not char + int svctyp = service_type; // must put int into stream, not char stream << "<address_header service_type=\"" << svctyp << "\" clid=\"" << clid << "\" /> "; address = stream.str(); } @@ -448,7 +448,7 @@ StatusCode PersistencySvc::getService( long service_type, IConversionSvc*& refpS StatusCode PersistencySvc::getService( const std::string& service_type, IConversionSvc*& refpSvc ) { const char* imp = service_type.c_str(); - long len = service_type.length(); + long len = service_type.length(); if (::strncasecmp( imp, "SICB", len ) == 0 ) return getService( SICB_StorageType, refpSvc ); else if (::strncasecmp( imp, "ZEBRA", len ) == 0 ) diff --git a/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.h b/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.h index d9027ea3f6012c869b7a7e04a5924e6244b67afa..fdb3375f0f0ce5c5dc107fa79191da244de7767e 100644 --- a/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.h +++ b/GaudiCommonSvc/src/PersistencySvc/PersistencySvc.h @@ -52,9 +52,9 @@ class PersistencySvc : public extends<Service, IConversionSvc, IPersistencySvc, protected: class ServiceEntry final { - long m_serviceType; - mutable SmartIF<IService> m_service; - mutable SmartIF<IConversionSvc> m_cnvService; + long m_serviceType; + mutable SmartIF<IService> m_service; + mutable SmartIF<IConversionSvc> m_cnvService; mutable SmartIF<IAddressCreator> m_addrCreator; public: @@ -74,10 +74,10 @@ protected: } ServiceEntry( const ServiceEntry& ) = default; - SmartIF<IService>& service() const { return m_service; } - SmartIF<IConversionSvc>& conversionSvc() const { return m_cnvService; } + SmartIF<IService>& service() const { return m_service; } + SmartIF<IConversionSvc>& conversionSvc() const { return m_cnvService; } SmartIF<IAddressCreator>& addrCreator() const { return m_addrCreator; } - long svcType() const { return m_serviceType; } + long svcType() const { return m_serviceType; } }; typedef std::map<long, ServiceEntry> Services; /* diff --git a/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.cpp b/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.cpp index 434a0e0eb7f7d19f1b75cc75d248be7be8df6fab..26362e2b9b1fa42d3c71ada3879c38fea89dd12c 100644 --- a/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.cpp @@ -53,10 +53,10 @@ void SequentialOutputStream::makeFilename() if ( m_events % m_eventsPerFile != 0 ) return; bf::path outputPath( m_outputName ); - string filename = outputPath.filename().string(); - bf::path dir = outputPath.parent_path(); - string stem = outputPath.stem().string(); - string extension = outputPath.extension().string(); + string filename = outputPath.filename().string(); + bf::path dir = outputPath.parent_path(); + string stem = outputPath.stem().string(); + string extension = outputPath.extension().string(); if ( !dir.empty() ) { if ( !bf::exists( dir ) ) { @@ -75,7 +75,7 @@ void SequentialOutputStream::makeFilename() throw GaudiException( msg, "error", StatusCode::FAILURE ); } } - string iFile = std::to_string( m_iFile ); + string iFile = std::to_string( m_iFile ); unsigned int length = 0; if ( stem.length() > iFile.length() ) { diff --git a/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.h b/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.h index e7241890088d762e37391df39c6f7d35c8ba90f1..d73e846ccafd6ba8a986633a6fe41e94e669e93b 100644 --- a/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.h +++ b/GaudiCommonSvc/src/PersistencySvc/SequentialOutputStream.h @@ -28,7 +28,7 @@ public: private: Gaudi::Property<unsigned int> m_eventsPerFile{this, "EventsPerFile", std::numeric_limits<unsigned int>::max()}; - Gaudi::Property<bool> m_numericFilename{this, "NumericFilename", false}; + Gaudi::Property<bool> m_numericFilename{this, "NumericFilename", false}; Gaudi::Property<unsigned int> m_nNumbersAdded{this, "NumbersAdded", 6}; // Data members diff --git a/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.cpp b/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.cpp index 2121fe24ed46af57e643a43d85a37c7b351d7116..e91e22cb86a7b949372e19f9936e1848b8dad597 100644 --- a/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.cpp +++ b/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.cpp @@ -61,7 +61,7 @@ StatusCode TagCollectionStream::initialize() } m_output = std::move( tmp ); { - auto& tag = m_tagName.value(); + auto& tag = m_tagName.value(); std::string::size_type idx = ( tag[0] == SEPARATOR ) ? tag.find( SEPARATOR, 1 ) : 0; log_node = tag.substr( idx, tag.find( SEPARATOR, idx + 1 ) ); } @@ -148,7 +148,7 @@ StatusCode TagCollectionStream::writeObjects() << endmsg; return StatusCode::FAILURE; } - std::string* par = (std::string*)m_addr->par(); + std::string* par = (std::string*)m_addr->par(); unsigned long* ipar = (unsigned long*)m_addr->ipar(); m_addr->setClID( pA->clID() ); m_addr->setSvcType( pA->svcType() ); diff --git a/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.h b/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.h index 40f54069832ed00bb09a0ff7fa6e2886a3220ffb..7d778ca1f523bf236e4c1d2a2b56b85541ee6f63 100644 --- a/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.h +++ b/GaudiCommonSvc/src/PersistencySvc/TagCollectionStream.h @@ -66,7 +66,7 @@ protected: Gaudi::Property<std::string> m_addrColName{this, "AddressColumn", "Address", "name of the address column of the tag collection"}; Gaudi::Property<std::string> m_collSvcName{this, "TagCollectionSvc", "NTupleSvc", "name of the collection service"}; - Gaudi::Property<bool> m_objectsFirst{this, "ObjectsFirst", true, + Gaudi::Property<bool> m_objectsFirst{this, "ObjectsFirst", true, "flag to indicate that the objects should be written first"}; Gaudi::Property<std::string> m_tagName{this, "Collection", "", "name of the tag collection in the transient store"}; diff --git a/GaudiCommonSvc/src/StatusCodeSvc.h b/GaudiCommonSvc/src/StatusCodeSvc.h index 81121916a1b614eac2772ce129444fbac1c63b91..40fb6e76a81b48305c6cfec08805e7e2943f6021 100644 --- a/GaudiCommonSvc/src/StatusCodeSvc.h +++ b/GaudiCommonSvc/src/StatusCodeSvc.h @@ -30,7 +30,7 @@ private: struct StatCodeDat final { std::string fnc; std::string lib; - int count; + int count; }; void parseFilter( const std::string& str, std::string& fnc, std::string& lib ); @@ -38,9 +38,9 @@ private: void filterLib( const std::string& ); Gaudi::Property<std::vector<std::string>> m_pFilter{this, "Filter"}; - Gaudi::Property<bool> m_abort{this, "AbortOnError", false}; - Gaudi::Property<bool> m_suppress{this, "SuppressCheck", false}; - Gaudi::Property<bool> m_dict{this, "IgnoreDicts", true}; + Gaudi::Property<bool> m_abort{this, "AbortOnError", false}; + Gaudi::Property<bool> m_suppress{this, "SuppressCheck", false}; + Gaudi::Property<bool> m_dict{this, "IgnoreDicts", true}; std::map<std::string, StatCodeDat> m_dat; std::set<std::string> m_filterfnc, m_filterlib; diff --git a/GaudiCoreSvc/src/AlgExecStateSvc/AlgExecStateSvc.h b/GaudiCoreSvc/src/AlgExecStateSvc/AlgExecStateSvc.h index 7631793bf248cd4ef1a64a71960b187578a803c4..ad5bc9c1db7c110befe22417d87c0ad5240345a6 100644 --- a/GaudiCoreSvc/src/AlgExecStateSvc/AlgExecStateSvc.h +++ b/GaudiCoreSvc/src/AlgExecStateSvc/AlgExecStateSvc.h @@ -55,18 +55,18 @@ private: // one vector entry per event slot // typedef std::map<Gaudi::StringKey, AlgExecState> AlgStateMap_t; typedef std::vector<AlgStateMap_t> AlgStates_t; - AlgStates_t m_algStates; + AlgStates_t m_algStates; std::vector<EventStatus::Status> m_eventStatus; - std::vector<Gaudi::StringKey> m_preInitAlgs; + std::vector<Gaudi::StringKey> m_preInitAlgs; typedef std::map<Gaudi::StringKey, std::atomic<unsigned int>> AlgErrorMap_t; AlgErrorMap_t m_errorCount; - void init(); - void checkInit() const; + void init(); + void checkInit() const; std::once_flag m_initFlag; - bool m_isInit; + bool m_isInit; std::mutex m_mut; }; diff --git a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp index d56a86f3c4ac717cb691d432f490f78d52996627..30a4b29dd820b10d6cb393be76ed13af42799a2d 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp @@ -167,7 +167,7 @@ StatusCode AlgorithmManager::stop() StatusCode AlgorithmManager::finalize() { StatusCode rc; - auto it = m_algs.begin(); + auto it = m_algs.begin(); while ( it != m_algs.end() ) { // finalize and remove from the list the managed algorithms if ( it->managed ) { rc = it->algorithm->sysFinalize(); diff --git a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.h b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.h index 84cfd132ecc1e45d2f31de054ea62027b6fd8539..e8062470598092bed85545bf7d746172392a15f4 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.h +++ b/GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.h @@ -34,7 +34,7 @@ public: struct AlgorithmItem final { AlgorithmItem( IAlgorithm* s, bool managed = false ) : algorithm( s ), managed( managed ) {} SmartIF<IAlgorithm> algorithm; - bool managed; + bool managed; inline bool operator==( const std::string& name ) const { return algorithm->name() == name; } inline bool operator==( const IAlgorithm* ptr ) const { return algorithm.get() == ptr; } }; @@ -83,7 +83,7 @@ public: SmartIF<IAlgorithm>& algorithm( const Gaudi::Utils::TypeNameString& typeName, const bool createIf = true ) override; - AlgTypeAliasesMap& typeAliases() { return m_algTypeAliases; } + AlgTypeAliasesMap& typeAliases() { return m_algTypeAliases; } const AlgTypeAliasesMap& typeAliases() const { return m_algTypeAliases; } /// Function to call to update the outputLevel of the components (after a change in MessageSvc). diff --git a/GaudiCoreSvc/src/ApplicationMgr/AppMgrRunable.h b/GaudiCoreSvc/src/ApplicationMgr/AppMgrRunable.h index 9a23664f6a35f1ab01f466774015e9fe04358ab2..930bdaf5433c37876b5c5db40f879140e134218f 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/AppMgrRunable.h +++ b/GaudiCoreSvc/src/ApplicationMgr/AppMgrRunable.h @@ -29,7 +29,7 @@ class AppMgrRunable : public extends<Service, IRunable> { protected: /// Reference to application manager UI - IAppMgrUI* m_appMgrUI = nullptr; + IAppMgrUI* m_appMgrUI = nullptr; Gaudi::Property<int> m_evtMax{this, "EvtMax", 0xFEEDBABE, "number of events to be processed"}; public: diff --git a/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp b/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp index b18214f545173c1914f3521ac2e3a7995922b28b..6d7d096813868407d0b016db8e2d3307c2677841 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.cpp @@ -328,8 +328,8 @@ StatusCode ApplicationMgr::configure() for ( auto& var : m_environment ) { const std::string& name = var.first; const std::string& value = var.second; - std::string old = System::getEnv( name.c_str() ); - const MSG::Level lvl = ( !old.empty() && ( old != "UNKNOWN" ) ) ? MSG::WARNING : MSG::DEBUG; + std::string old = System::getEnv( name.c_str() ); + const MSG::Level lvl = ( !old.empty() && ( old != "UNKNOWN" ) ) ? MSG::WARNING : MSG::DEBUG; if ( UNLIKELY( m_outputLevel <= lvl ) ) log << lvl << "Setting " << name << " = " << value << endmsg; System::setEnv( name, value ); } @@ -494,7 +494,7 @@ StatusCode ApplicationMgr::initialize() StatusCode ApplicationMgr::start() { - MsgStream log( m_messageSvc, name() ); + MsgStream log( m_messageSvc, name() ); StatusCode sc; if ( m_state == Gaudi::StateMachine::RUNNING ) { @@ -546,7 +546,7 @@ StatusCode ApplicationMgr::nextEvent( int maxevt ) StatusCode ApplicationMgr::stop() { - MsgStream log( m_messageSvc, name() ); + MsgStream log( m_messageSvc, name() ); StatusCode sc; if ( m_state == Gaudi::StateMachine::INITIALIZED ) { @@ -913,7 +913,7 @@ StatusCode ApplicationMgr::restart() void ApplicationMgr::SIGoHandler( Gaudi::Details::PropertyBase& ) { - MsgStream log( m_messageSvc, name() ); + MsgStream log( m_messageSvc, name() ); StatusCode sc; // Re-initialize everything @@ -961,10 +961,10 @@ void ApplicationMgr::createSvcNameListHandler( Gaudi::Details::PropertyBase& /* //============================================================================ StatusCode ApplicationMgr::decodeCreateSvcNameList() { - StatusCode result = StatusCode::SUCCESS; + StatusCode result = StatusCode::SUCCESS; const auto& theNames = m_createSvcNameList.value(); - auto it = theNames.begin(); - auto et = theNames.end(); + auto it = theNames.begin(); + auto et = theNames.end(); while ( result.isSuccess() && it != et ) { Gaudi::Utils::TypeNameString item( *it++ ); if ( ( result = svcManager()->addService( item, ServiceManager::DEFAULT_SVC_PRIORITY ) ).isFailure() ) { @@ -1039,7 +1039,7 @@ void ApplicationMgr::multiThreadSvcNameListHandler( Gaudi::Details::PropertyBase //============================================================================ StatusCode ApplicationMgr::decodeMultiThreadSvcNameList() { - StatusCode result = StatusCode::SUCCESS; + StatusCode result = StatusCode::SUCCESS; const auto& theNames = m_multiThreadSvcNameList.value(); for ( int iCopy = 0; iCopy < m_noOfEvtThreads; ++iCopy ) { for ( const auto& it : theNames ) { @@ -1068,7 +1068,7 @@ StatusCode ApplicationMgr::decodeMultiThreadSvcNameList() StatusCode ApplicationMgr::declareMultiSvcType( const std::string& name, const std::string& type ) { StatusCode result = StatusCode::SUCCESS; - MsgStream log( m_messageSvc, m_name ); + MsgStream log( m_messageSvc, m_name ); if ( 0 == m_noOfEvtThreads ) { result = svcManager()->declareSvcType( name, type ); if ( result.isFailure() ) { @@ -1098,7 +1098,7 @@ StatusCode ApplicationMgr::addMultiSvc( const Gaudi::Utils::TypeNameString& type { using Gaudi::Utils::TypeNameString; StatusCode result = StatusCode::SUCCESS; - MsgStream log( m_messageSvc, m_name ); + MsgStream log( m_messageSvc, m_name ); if ( 0 == m_noOfEvtThreads ) { result = svcManager()->addService( typeName, prio ); // result = svcManager()->addService(name, type, prio); // CHECKME??? @@ -1111,7 +1111,7 @@ StatusCode ApplicationMgr::addMultiSvc( const Gaudi::Utils::TypeNameString& type } else { for ( int iCopy = 0; iCopy < m_noOfEvtThreads; ++iCopy ) { const std::string& type = typeName.type(); - std::string thrName( typeName.name() + getGaudiThreadIDfromID( iCopy ) ); + std::string thrName( typeName.name() + getGaudiThreadIDfromID( iCopy ) ); result = svcManager()->addService( TypeNameString( thrName, type ), prio ); if ( result.isFailure() ) { log << MSG::ERROR << "addMultiSvc: Cannot add service " << type << "/" << thrName << endmsg; @@ -1140,7 +1140,7 @@ void ApplicationMgr::dllNameListHandler( Gaudi::Details::PropertyBase& /* thePro StatusCode ApplicationMgr::decodeDllNameList() { - MsgStream log( m_messageSvc, m_name ); + MsgStream log( m_messageSvc, m_name ); StatusCode result = StatusCode::SUCCESS; // Clean up multiple entries from DLL list diff --git a/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.h b/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.h index fed7eef28a2499c06a13d8398c68de38efa58c28..4aa115a2764088f23f7dfb7f03bbd759d463d67e 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.h +++ b/GaudiCoreSvc/src/ApplicationMgr/ApplicationMgr.h @@ -113,7 +113,7 @@ public: void evtLoopPropertyHandler( Gaudi::Details::PropertyBase& theProp ); StatusCode decodeExtSvcNameList(); StatusCode decodeCreateSvcNameList(); - void createSvcNameListHandler( Gaudi::Details::PropertyBase& ); + void createSvcNameListHandler( Gaudi::Details::PropertyBase& ); void extSvcNameListHandler( Gaudi::Details::PropertyBase& theProp ); StatusCode decodeMultiThreadSvcNameList(); void multiThreadSvcNameListHandler( Gaudi::Details::PropertyBase& theProp ); @@ -192,16 +192,16 @@ protected: /// any service!) SmartIF<DLLClassManager> m_classManager; ///< Reference to the class manager - Gaudi::Property<int> m_SIGo{this, "Go", 0, "For SI's \"Go\" command via callback"}; - Gaudi::Property<int> m_SIExit{this, "Exit", 0, "For SI's \"Exit\" command via callback"}; + Gaudi::Property<int> m_SIGo{this, "Go", 0, "For SI's \"Go\" command via callback"}; + Gaudi::Property<int> m_SIExit{this, "Exit", 0, "For SI's \"Exit\" command via callback"}; Gaudi::Property<std::vector<std::string>> m_topAlgNameList{this, "TopAlg", {}, "List of top level algorithms names"}; Gaudi::Property<std::vector<std::string>> m_outStreamNameList{this, "OutStream", {}, "List of output stream names"}; - Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream", + Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream", "[[deprecated]] Output stream type"}; Gaudi::Property<std::string> m_messageSvcType{this, "MessageSvcType", "MessageSvc", "MessageSvc type"}; Gaudi::Property<std::string> m_jobOptionsSvcType{this, "JobOptionsSvcType", "JobOptionsSvc", "JobOptionsSvc type"}; - std::string m_name = "ApplicationMgr"; ///< Name + std::string m_name = "ApplicationMgr"; ///< Name Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE; ///< Internal State Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE; ///< Internal State @@ -209,10 +209,10 @@ protected: Gaudi::Property<std::vector<std::string>> m_svcOptMapping{ this, "SvcOptMapping", {}, "Default mapping of optional services"}; - SmartIF<IMessageSvc> m_messageSvc; ///< Reference to the message service - SmartIF<IRunable> m_runable; ///< Reference to the runable object + SmartIF<IMessageSvc> m_messageSvc; ///< Reference to the message service + SmartIF<IRunable> m_runable; ///< Reference to the runable object SmartIF<IEventProcessor> m_processingMgr; ///< Reference to processing manager object - SmartIF<IJobOptionsSvc> m_jobOptionsSvc; ///< Reference to JobOption service + SmartIF<IJobOptionsSvc> m_jobOptionsSvc; ///< Reference to JobOption service // // The public ApplicationMgr properties @@ -220,12 +220,12 @@ protected: Gaudi::Property<int> m_evtMax{this, "EvtMax", -1, "Number of events to be processed (-1 means all events)"}; Gaudi::Property<std::vector<std::string>> m_extSvcNameList{this, "ExtSvc", {}, "List of external services names"}; - Gaudi::Property<bool> m_extSvcCreates{this, "ExtSvcCreates", true, + Gaudi::Property<bool> m_extSvcCreates{this, "ExtSvcCreates", true, "LHCb (default) or ATLAS definition of \"ExtSvc\""}; /// List of external services names for which we want a copy per evt thread Gaudi::Property<std::vector<std::string>> m_multiThreadSvcNameList{this, "MultiThreadExtSvc"}; - Gaudi::Property<int> m_noOfEvtThreads{this, "NoOfThreads", 0, "MultiThreadSvc copies"}; + Gaudi::Property<int> m_noOfEvtThreads{this, "NoOfThreads", 0, "MultiThreadSvc copies"}; Gaudi::Property<std::vector<std::string>> m_dllNameList{this, "Dlls", {}, "List of DDL's names"}; Gaudi::Property<std::string> m_jobOptionsType{this, "JobOptionsType", "FILE", "Source type (e.g. dbase, file...)"}; @@ -238,12 +238,12 @@ protected: Gaudi::Property<std::string> m_eventLoopMgr{this, "EventLoop", "EventLoopMgr", "Processing manager type"}; Gaudi::Property<std::string> m_evtsel{this, "EvtSel", {}, "Event selection"}; Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "NONE", "Name of the Hist Pers Svc"}; - Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::INFO, "Message output level"}; + Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::INFO, "Message output level"}; Gaudi::Property<std::string> m_appName{this, "AppName", "ApplicationMgr", "The name of the application"}; Gaudi::Property<std::string> m_appVersion{this, "AppVersion", {}, "The version of the application"}; - Gaudi::Property<bool> m_actHistory{this, "ActivateHistory", false, "Activate HistorySvc"}; - Gaudi::Property<bool> m_codeCheck{this, "StatusCodeCheck", false, "Activate StatusCode checking"}; - Gaudi::Property<int> m_pluginDebugLevel{this, "PluginDebugLevel", 0, "Debug level for the plugin system"}; + Gaudi::Property<bool> m_actHistory{this, "ActivateHistory", false, "Activate HistorySvc"}; + Gaudi::Property<bool> m_codeCheck{this, "StatusCodeCheck", false, "Activate StatusCode checking"}; + Gaudi::Property<int> m_pluginDebugLevel{this, "PluginDebugLevel", 0, "Debug level for the plugin system"}; Gaudi::Property<std::vector<std::string>> m_createSvcNameList{ this, "CreateSvc", {}, "List of extra services to be created"}; diff --git a/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.cpp b/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.cpp index f8e668dfcdf057a4973407e2ca84fbd2eba2ea02..4347491038fded10a107a14b14379f7a2277f3b7 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.cpp @@ -36,8 +36,8 @@ StatusCode DLLClassManager::loadModule( const std::string& module, bool fireInci std::string mod = module == "" ? System::moduleNameFull() : module; if ( module == "NONE" ) return StatusCode::SUCCESS; - void* libHandle = nullptr; - StatusCode status = StatusCode::FAILURE; + void* libHandle = nullptr; + StatusCode status = StatusCode::FAILURE; try { status = System::loadDynamicLib( module, &libHandle ); } catch ( const std::exception& excpt ) { @@ -58,7 +58,7 @@ StatusCode DLLClassManager::loadModule( const std::string& module, bool fireInci if ( fireIncident && !module.empty() ) { // now fire ModuleLoadedIncident const bool CREATEIF( true ); - auto pIncidentSvc = m_svclocator->service<IIncidentSvc>( "IncidentSvc", CREATEIF ); + auto pIncidentSvc = m_svclocator->service<IIncidentSvc>( "IncidentSvc", CREATEIF ); if ( !pIncidentSvc ) { log << MSG::FATAL << "Can not locate IncidentSvc" << endmsg; throw GaudiException( "Error retrieving IncidentSvc", "DLLClassManager::DLLClassManager", StatusCode::FAILURE ); diff --git a/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.h b/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.h index faecaacb4de8578bc00697b0eb54a771231a6a77..349384c3e8696a3501dcc003fef925953b11ed41 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.h +++ b/GaudiCoreSvc/src/ApplicationMgr/DLLClassManager.h @@ -41,6 +41,6 @@ public: private: SmartIF<ISvcLocator> m_svclocator; // Service locator reference SmartIF<IMessageSvc> m_msgsvc; // Message Service reference - SmartIF<IInterface> m_pOuter; // Interface hub reference (ApplicationMgr) + SmartIF<IInterface> m_pOuter; // Interface hub reference (ApplicationMgr) }; #endif // GAUDI_DLLCLASSMANAGER_H diff --git a/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.cpp b/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.cpp index f7cdab5658aed929b3588446fde5cdd7ce18afe0..4dd97980bb53369907304de0bf1d1a4410f0c766 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.cpp @@ -21,7 +21,7 @@ DECLARE_COMPONENT( EventLoopMgr ) #define ON_DEBUG if ( UNLIKELY( outputLevel() <= MSG::DEBUG ) ) #define ON_VERBOSE if ( UNLIKELY( outputLevel() <= MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() //-------------------------------------------------------------------------------------------- @@ -201,7 +201,7 @@ StatusCode EventLoopMgr::finalize() if ( objects->size() > 0 ) { for ( auto& i : *objects ) { IOpaqueAddress* pAddr = nullptr; - StatusCode iret = m_histoPersSvc->createRep( i, pAddr ); + StatusCode iret = m_histoPersSvc->createRep( i, pAddr ); if ( iret.isSuccess() ) { i->registry()->setAddress( pAddr ); } else { @@ -280,13 +280,13 @@ StatusCode EventLoopMgr::nextEvent( int maxevt ) // DP Monitoring // Calculate runtime typedef std::chrono::high_resolution_clock Clock; - typedef Clock::time_point time_point; + typedef Clock::time_point time_point; const float oneOver1024 = 1.f / 1024.f; - static int total_nevt = 0; - DataObject* pObject = nullptr; - StatusCode sc( StatusCode::SUCCESS, true ); + static int total_nevt = 0; + DataObject* pObject = nullptr; + StatusCode sc( StatusCode::SUCCESS, true ); // loop over events if the maxevt (received as input) if different from -1. // if evtmax is -1 it means infinite loop diff --git a/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.h b/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.h index 1a34b56f196082c726c667e71e87ee88ebeb83d9..379da97d172db458c3563724aaddce86bfbb0b61 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.h +++ b/GaudiCoreSvc/src/ApplicationMgr/EventLoopMgr.h @@ -43,7 +43,7 @@ protected: Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", {}, "name of the Hist Pers type"}; Gaudi::Property<std::string> m_evtsel{this, "EvtSel", {}, "event selector"}; - Gaudi::Property<bool> m_warnings{this, "Warnings", true, "set to false to suppress warning messages"}; + Gaudi::Property<bool> m_warnings{this, "Warnings", true, "set to false to suppress warning messages"}; /// Reference to the Event Data Service's IDataManagerSvc interface SmartIF<IDataManagerSvc> m_evtDataMgrSvc = nullptr; diff --git a/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp b/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp index a6f55f179a8159bfeeb0620c6eac20ddf2fba2f4..3c06e932eecab971019ed8c15086c1f5f09ef825 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.cpp @@ -20,7 +20,7 @@ #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() /// needed when no service is found or could be returned @@ -69,7 +69,7 @@ SmartIF<IService>& ServiceManager::createService( const Gaudi::Utils::TypeNameSt } const std::string& name = typeName.name(); - std::string type = typeName.type(); + std::string type = typeName.type(); if ( !typeName.haveType() ) { // the type is not explicit // see we have some specific type mapping for the name auto it = m_maptype.find( typeName.name() ); @@ -105,7 +105,7 @@ StatusCode ServiceManager::addService( IService* svc, int prio ) //------------------------------------------------------------------------------ { ListSvc::iterator it = find( svc ); - LockGuard_t lck( m_gLock ); + LockGuard_t lck( m_gLock ); if ( it != m_listsvc.end() ) { it->priority = prio; // if the service is already known, it is equivalent to a setPriority it->active = true; // and make it active @@ -174,7 +174,7 @@ SmartIF<IService>& ServiceManager::service( const Gaudi::Utils::TypeNameString& // then release global lock LockGuard_t lk( m_gLock ); - auto mit = m_lockMap.find( name ); + auto mit = m_lockMap.find( name ); if ( mit == m_lockMap.end() ) { mit = m_lockMap.emplace( name, std::unique_ptr<Mutex_t>( new Mutex_t ) ).first; } @@ -421,7 +421,7 @@ StatusCode ServiceManager::finalize() // get list of PostFinalize clients std::vector<IIncidentListener*> postFinList; - auto p_inc = service<IIncidentSvc>( "IncidentSvc", false ); + auto p_inc = service<IIncidentSvc>( "IncidentSvc", false ); if ( p_inc ) { p_inc->getListeners( postFinList, IncidentType::SvcPostFinalize ); p_inc.reset(); diff --git a/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.h b/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.h index c0177797d00dbe4bce78c40bd5193a871aa25c1f..8d5c724e4094f083a79677c3cc15b2aca573639a 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.h +++ b/GaudiCoreSvc/src/ApplicationMgr/ServiceManager.h @@ -39,8 +39,8 @@ public: struct ServiceItem final { ServiceItem( IService* s, long p = 0, bool act = false ) : service( s ), priority( p ), active( act ) {} SmartIF<IService> service; - long priority; - bool active; + long priority; + bool active; inline bool operator==( const std::string& name ) const { return service->name() == name; } inline bool operator==( const IService* ptr ) const { return service.get() == ptr; } inline bool operator<( const ServiceItem& rhs ) const { return priority < rhs.priority; } @@ -155,22 +155,22 @@ private: } private: - ListSvc m_listsvc; ///< List of service maintained by ServiceManager - /// This contains SmartIF<T> for all services -- - /// and because there can be SmartIF<T>& 'out there' that - /// refer to these specific SmarIF<T>, we - /// *unfortunately* must guarantee that they _never_ move - /// after creation. Hence, we cannot use a plain std::vector - /// here, as that may cause relocation and/or swapping of - /// SmartIF<T>'s, and then the already handed out references - /// may refer to the wrong item.... Note that we could use - /// an std::vector<std::unique_ptr<ServiceItem>> (sometimes known - /// as 'stable vector') as then the individual ServiceItems - /// would stay pinned in their original location, but that - /// would put ServiceItem on the heap... - /// And maybe I'm way too paranoid... - MapType m_maptype; ///< Map of service name and service type - bool m_loopCheck = true; ///< Check for service initialization loops + ListSvc m_listsvc; ///< List of service maintained by ServiceManager + /// This contains SmartIF<T> for all services -- + /// and because there can be SmartIF<T>& 'out there' that + /// refer to these specific SmarIF<T>, we + /// *unfortunately* must guarantee that they _never_ move + /// after creation. Hence, we cannot use a plain std::vector + /// here, as that may cause relocation and/or swapping of + /// SmartIF<T>'s, and then the already handed out references + /// may refer to the wrong item.... Note that we could use + /// an std::vector<std::unique_ptr<ServiceItem>> (sometimes known + /// as 'stable vector') as then the individual ServiceItems + /// would stay pinned in their original location, but that + /// would put ServiceItem on the heap... + /// And maybe I'm way too paranoid... + MapType m_maptype; ///< Map of service name and service type + bool m_loopCheck = true; ///< Check for service initialization loops /// Pointer to the application IService interface. SmartIF<IService> m_appSvc; @@ -181,7 +181,7 @@ private: GaudiUtils::Map<InterfaceID, SmartIF<IInterface>> m_defaultImplementations; /// Mutex to synchronize shared service initialization between threads - typedef boost::recursive_mutex Mutex_t; + typedef boost::recursive_mutex Mutex_t; typedef boost::lock_guard<Mutex_t> LockGuard_t; mutable Mutex_t m_gLock; diff --git a/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp b/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp index 9c17f3adb7ad69b338cf0a3937bf99894d465670..2ffea8379029f830ec1abccb27fe810990fc100d 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp +++ b/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.cpp @@ -135,12 +135,12 @@ StatusCode ToolSvc::finalize() + minimum number of refcounts */ boost::circular_buffer<IAlgTool*> finalizedTools( m_instancesTools.size() ); // list of tools that have been finalized - bool fail( false ); - size_t toolCount = m_instancesTools.size(); - unsigned long startRefCount = 0; - unsigned long endRefCount = totalToolRefCount(); - unsigned long startMinRefCount = 0; - unsigned long endMinRefCount = minimumToolRefCount(); + bool fail( false ); + size_t toolCount = m_instancesTools.size(); + unsigned long startRefCount = 0; + unsigned long endRefCount = totalToolRefCount(); + unsigned long startMinRefCount = 0; + unsigned long endMinRefCount = minimumToolRefCount(); while ( toolCount > 0 && endRefCount > 0 && ( endRefCount != startRefCount || endMinRefCount != startMinRefCount ) ) { ON_DEBUG if ( endMinRefCount != startMinRefCount ) { @@ -192,7 +192,7 @@ StatusCode ToolSvc::finalize() // Therefore, the check on non-finalised tools should happen *after* the deletion // of the finalized tools. ON_DEBUG debug() << "Deleting " << finalizedTools.size() << " finalized tools" << endmsg; - auto maxLoop = totalRefCount( finalizedTools ) + 1; + auto maxLoop = totalRefCount( finalizedTools ) + 1; while ( --maxLoop > 0 && !finalizedTools.empty() ) { IAlgTool* pTool = finalizedTools.front(); finalizedTools.pop_front(); @@ -287,7 +287,7 @@ StatusCode ToolSvc::retrieve( const std::string& tooltype, const std::string& to std::lock_guard<CallMutex> lock( m_mut ); - IAlgTool* itool = nullptr; + IAlgTool* itool = nullptr; StatusCode sc( StatusCode::FAILURE ); tool = nullptr; @@ -339,7 +339,7 @@ std::vector<std::string> ToolSvc::getInstances( const std::string& toolType ) { std::lock_guard<CallMutex> lock( m_mut ); - std::vector<std::string> tools; + std::vector<std::string> tools; for ( const auto& tool : m_instancesTools ) { if ( tool->type() == toolType ) tools.push_back( tool->name() ); } @@ -350,7 +350,7 @@ std::vector<std::string> ToolSvc::getInstances() const //------------------------------------------------------------------------------ { std::lock_guard<CallMutex> lock( m_mut ); - std::vector<std::string> tools{m_instancesTools.size()}; + std::vector<std::string> tools{m_instancesTools.size()}; std::transform( std::begin( m_instancesTools ), std::end( m_instancesTools ), std::begin( tools ), []( const IAlgTool* t ) { return t->name(); } ); return tools; @@ -367,7 +367,7 @@ StatusCode ToolSvc::releaseTool( IAlgTool* tool ) //------------------------------------------------------------------------------ { std::lock_guard<CallMutex> lock( m_mut ); - StatusCode sc( StatusCode::SUCCESS ); + StatusCode sc( StatusCode::SUCCESS ); // test if tool is in known list (protect trying to access a previously deleted tool) if ( m_instancesTools.rend() != std::find( m_instancesTools.rbegin(), m_instancesTools.rend(), tool ) ) { unsigned long count = tool->refCount(); @@ -613,7 +613,7 @@ bool ToolSvc::existsTool( const std::string& fullname ) const //------------------------------------------------------------------------------ { std::lock_guard<CallMutex> lock( m_mut ); - auto i = std::find_if( std::begin( m_instancesTools ), std::end( m_instancesTools ), + auto i = std::find_if( std::begin( m_instancesTools ), std::end( m_instancesTools ), [&]( const IAlgTool* tool ) { return tool->name() == fullname; } ); return i != std::end( m_instancesTools ); } @@ -625,7 +625,7 @@ StatusCode ToolSvc::finalizeTool( IAlgTool* itool ) const // Cache tool name in case of errors const std::string toolName = itool->name(); - StatusCode sc; + StatusCode sc; // Finalise the tool inside a try block try { @@ -673,7 +673,7 @@ void ToolSvc::registerObserver( IToolSvc::Observer* obs ) std::lock_guard<CallMutex> lock( m_mut ); obs->setUnregister( [this, obs]() { std::lock_guard<CallMutex> lock( m_mut ); - auto i = std::find( m_observers.begin(), m_observers.end(), obs ); + auto i = std::find( m_observers.begin(), m_observers.end(), obs ); if ( i != m_observers.end() ) m_observers.erase( i ); } ); m_observers.push_back( obs ); diff --git a/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.h b/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.h index 4da5d322c8fdff1d04e1b0afaafdeb8f621287da..3813d92b61f9dc3568e68699a8598546286a6bbb 100644 --- a/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.h +++ b/GaudiCoreSvc/src/ApplicationMgr/ToolSvc.h @@ -101,7 +101,7 @@ private: // data std::vector<IToolSvc::Observer*> m_observers; typedef std::recursive_mutex CallMutex; - mutable CallMutex m_mut; + mutable CallMutex m_mut; }; #endif diff --git a/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.cpp b/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.cpp index f550c3dbdbef2b45bb42d64ebca2ff6018dc8175..90d261b101a4af95c7d45740020504b650c7db23 100644 --- a/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.cpp +++ b/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.cpp @@ -28,12 +28,12 @@ public: typedef std::list<std::string> ListName; private: - GenericAddress* m_pAddressBuffer = nullptr; - const EventCollectionSelector* m_pSelector = nullptr; - ListName m_files; - std::string m_criteria; - ListName::const_iterator m_fileIterator; - std::string m_currentInput; + GenericAddress* m_pAddressBuffer = nullptr; + const EventCollectionSelector* m_pSelector = nullptr; + ListName m_files; + std::string m_criteria; + ListName::const_iterator m_fileIterator; + std::string m_currentInput; public: /// Standard constructor @@ -42,10 +42,10 @@ public: ~EventCollectionContext() override; const std::string& currentInput() const { return m_currentInput; } void setCurrentInput( const std::string& v ) { m_currentInput = v; } - ListName& files() { return m_files; } - void* identifier() const override { return (void*)m_pSelector; } + ListName& files() { return m_files; } + void* identifier() const override { return (void*)m_pSelector; } void setCriteria( const std::string& crit ) { m_criteria = crit; } - ListName::const_iterator fileIterator() { return m_fileIterator; } + ListName::const_iterator fileIterator() { return m_fileIterator; } void setFileIterator( ListName::const_iterator new_iter ) { m_fileIterator = new_iter; } }; @@ -83,7 +83,7 @@ StatusCode EventCollectionSelector::initialize() // Connect collection to selector StatusCode EventCollectionSelector::connectDataSource( const std::string& db, const std::string& /* typ */ ) const { - StatusCode status = StatusCode::FAILURE; + StatusCode status = StatusCode::FAILURE; SmartIF<IDataSourceMgr> svc( m_tupleSvc ); if ( svc && !db.empty() ) { std::string ident = name() + ' '; @@ -105,8 +105,8 @@ StatusCode EventCollectionSelector::connectDataSource( const std::string& db, co StatusCode EventCollectionSelector::connectTuple( const std::string& nam, const std::string& itName, NTuple::Tuple*& tup, NTuple::Item<IOpaqueAddress*>*& item ) const { - std::string top = "/NTUPLES/" + name() + '/' + nam; - StatusCode status = m_tupleSvc->retrieveObject( top, (DataObject*&)tup ); + std::string top = "/NTUPLES/" + name() + '/' + nam; + StatusCode status = m_tupleSvc->retrieveObject( top, (DataObject*&)tup ); if ( status.isSuccess() ) { item = new NTuple::Item<IOpaqueAddress*>(); status = tup->item( itName, *item ); @@ -148,7 +148,7 @@ StatusCode EventCollectionSelector::getNextRecord( NTuple::Tuple* tuple ) const status = m_tupleSvc->readRecord( tuple ); if ( status.isSuccess() ) { ISelectStatement* statement = tuple->selector(); - bool use_it = ( statement ) ? ( *statement )( tuple ) : true; + bool use_it = ( statement ) ? ( *statement )( tuple ) : true; if ( use_it ) { return status; } @@ -174,7 +174,7 @@ StatusCode EventCollectionSelector::getPreviousRecord( NTuple::Tuple* tuple ) co status = m_tupleSvc->readRecord( tuple ); if ( status.isSuccess() ) { ISelectStatement* statement = tuple->selector(); - bool use_it = ( statement ) ? ( *statement )( tuple ) : true; + bool use_it = ( statement ) ? ( *statement )( tuple ) : true; if ( use_it ) { return status; } @@ -223,7 +223,7 @@ StatusCode EventCollectionSelector::createContext( Context*& refpCtxt ) const { refpCtxt = nullptr; std::unique_ptr<MyContextType> ctxt( new MyContextType() ); - StatusCode status = connectCollection( ctxt.get() ); + StatusCode status = connectCollection( ctxt.get() ); if ( !status.isSuccess() ) { error() << "Unable to connect Collection file \"" << m_database << "\"" << endmsg; return status; diff --git a/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.h b/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.h index 91049749b5f6d75351555a78efd8fec2bc9895f5..92221437808eef604bd203e09373439409b42a2e 100644 --- a/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.h +++ b/GaudiCoreSvc/src/EventSelector/EventCollectionSelector.h @@ -45,10 +45,10 @@ public: class MyContextType : public IEvtSelector::Context { public: - std::string criteria; - NTuple::Tuple* tuple; + std::string criteria; + NTuple::Tuple* tuple; NTuple::Item<IOpaqueAddress*>* item; - IOpaqueAddress* addressBuffer; + IOpaqueAddress* addressBuffer; MyContextType( NTuple::Tuple* t, NTuple::Item<IOpaqueAddress*>* i ) { addressBuffer = new GenericAddress(); @@ -77,7 +77,7 @@ public: protected: /// Reference to Tuple service - mutable SmartIF<INTupleSvc> m_tupleSvc; + mutable SmartIF<INTupleSvc> m_tupleSvc; mutable SmartIF<IAddressCreator> m_pAddrCreator; // Properties diff --git a/GaudiCoreSvc/src/EventSelector/EventIterator.h b/GaudiCoreSvc/src/EventSelector/EventIterator.h index 8479ca44a13c981068842195f82a01e9293b3cd0..2b3cafd23b0a593abcb1c1482b2cfbfd91644f17 100644 --- a/GaudiCoreSvc/src/EventSelector/EventIterator.h +++ b/GaudiCoreSvc/src/EventSelector/EventIterator.h @@ -95,7 +95,7 @@ public: /// Access counter long numEvent() const { return m_count; } /// Access counter within stream - long numStreamEvent() const { return m_strCount; } + long numStreamEvent() const { return m_strCount; } void* identifier() const override { return (void*)m_pSelector; } }; #endif // GAUDISVC_EVENTSELECTOR_EVENTITERATOR_H diff --git a/GaudiCoreSvc/src/EventSelector/EventSelector.cpp b/GaudiCoreSvc/src/EventSelector/EventSelector.cpp index 074dc745d6efa3aa956e9ae9878b88428ca40b6f..e547b1a4ab107d7e2d9a0a8a6d3fe7d808056cc6 100644 --- a/GaudiCoreSvc/src/EventSelector/EventSelector.cpp +++ b/GaudiCoreSvc/src/EventSelector/EventSelector.cpp @@ -44,7 +44,7 @@ void EventSelector::printEvtInfo( const EvtSelectorContext* iter ) const // IEvtSelector::first() StatusCode EventSelector::firstOfNextStream( bool shutDown, EvtSelectorContext& iter ) const { - StatusCode status = StatusCode::SUCCESS; + StatusCode status = StatusCode::SUCCESS; IDataStreamTool::size_type iter_id = ( m_reconfigure ) ? 0 : iter.ID() + 1; if ( m_reconfigure ) const_cast<EventSelector*>( this )->m_reconfigure = false; if ( shutDown ) { @@ -120,9 +120,9 @@ StatusCode EventSelector::lastOfPreviousStream( bool shutDown, EvtSelectorContex } } - IDataStreamTool::size_type iter_id = iter.ID() - 1; - const EventSelectorDataStream* s = nullptr; - status = m_streamtool->getPreviousStream( s, iter_id ); + IDataStreamTool::size_type iter_id = iter.ID() - 1; + const EventSelectorDataStream* s = nullptr; + status = m_streamtool->getPreviousStream( s, iter_id ); if ( status.isSuccess() ) { @@ -187,9 +187,9 @@ StatusCode EventSelector::next( Context& refCtxt, int /* jump */ ) const EvtSelectorContext* pIt = dynamic_cast<EvtSelectorContext*>( &refCtxt ); if ( pIt ) { if ( pIt->ID() != -1 ) { - const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); - Context* it = pIt->context(); - IEvtSelector* sel = s->selector(); + const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); + Context* it = pIt->context(); + IEvtSelector* sel = s->selector(); if ( it && sel ) { // First exploit the current stream StatusCode sc = sel->next( *it ); // This stream is empty: advance to the next stream if ( !sc.isSuccess() ) { @@ -228,9 +228,9 @@ StatusCode EventSelector::previous( Context& refCtxt, int jump ) const if ( pIt && jump > 0 ) { StatusCode sc = StatusCode::SUCCESS; for ( int i = 0; i < jump && sc.isSuccess(); ++i ) { - const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); - Context* it = pIt->context(); - IEvtSelector* sel = s->selector(); + const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); + Context* it = pIt->context(); + IEvtSelector* sel = s->selector(); if ( it && sel ) { // First exploit the current stream // This stream is empty: advance to the next stream sc = sel->previous( *it ); // This stream is empty: advance to the next stream @@ -286,15 +286,15 @@ StatusCode EventSelector::rewind( Context& refCtxt ) const StatusCode EventSelector::createAddress( const Context& refCtxt, IOpaqueAddress*& refpAddr ) const { const EvtSelectorContext* cpIt = dynamic_cast<const EvtSelectorContext*>( &refCtxt ); - EvtSelectorContext* pIt = const_cast<EvtSelectorContext*>( cpIt ); + EvtSelectorContext* pIt = const_cast<EvtSelectorContext*>( cpIt ); refpAddr = nullptr; if ( pIt ) { - const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); - Context* it = pIt->context(); - IEvtSelector* sel = s->selector(); + const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); + Context* it = pIt->context(); + IEvtSelector* sel = s->selector(); if ( it && sel ) { IOpaqueAddress* pAddr = nullptr; - StatusCode sc = sel->createAddress( *it, pAddr ); + StatusCode sc = sel->createAddress( *it, pAddr ); if ( sc.isSuccess() ) refpAddr = pAddr; pIt->set( it, pAddr ); return sc; @@ -306,12 +306,12 @@ StatusCode EventSelector::createAddress( const Context& refCtxt, IOpaqueAddress* // Release existing event iteration context StatusCode EventSelector::releaseContext( Context*& refCtxt ) const { - const EvtSelectorContext* cpIt = dynamic_cast<const EvtSelectorContext*>( refCtxt ); + const EvtSelectorContext* cpIt = dynamic_cast<const EvtSelectorContext*>( refCtxt ); std::unique_ptr<EvtSelectorContext> pIt{const_cast<EvtSelectorContext*>( cpIt )}; if ( pIt && pIt->ID() >= 0 && pIt->ID() < (long)m_streamtool->size() ) { - const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); - Context* it = pIt->context(); - IEvtSelector* sel = s->selector(); + const EventSelectorDataStream* s = m_streamtool->getStream( pIt->ID() ); + Context* it = pIt->context(); + IEvtSelector* sel = s->selector(); if ( it && sel ) { StatusCode sc = sel->releaseContext( it ); if ( sc.isSuccess() ) { @@ -354,7 +354,7 @@ StatusCode EventSelector::initialize() // a pointer to a tool which gets finalized and released by the ToolSvc // during ToolSvc::finalize, and we don't want dangling pointers... SmartIF<ISvcManager> mgr( serviceLocator() ); - auto prio = mgr->getPriority( "ToolSvc" ); + auto prio = mgr->getPriority( "ToolSvc" ); mgr->setPriority( name(), prio + 1 ).ignore(); status = m_toolSvc->retrieveTool( m_streamManager, m_streamtool, this ); diff --git a/GaudiCoreSvc/src/EventSelector/EventSelector.h b/GaudiCoreSvc/src/EventSelector/EventSelector.h index 15706490428e9c2205daad87f6d247d093ba97e8..0a6ba8b4044a46cb91cf3b067c7120f0a5cabb4d 100644 --- a/GaudiCoreSvc/src/EventSelector/EventSelector.h +++ b/GaudiCoreSvc/src/EventSelector/EventSelector.h @@ -53,8 +53,8 @@ class IDataStreamTool; class EventSelector : public extends<Service, IEvtSelector> { public: - typedef std::vector<EventSelectorDataStream*> Streams; - typedef std::vector<std::string> StreamSpecs; + typedef std::vector<EventSelectorDataStream*> Streams; + typedef std::vector<std::string> StreamSpecs; typedef std::vector<Gaudi::Property<std::string>> Properties; long int m_streamID; @@ -78,9 +78,9 @@ protected: // Properties Gaudi::Property<StreamSpecs> m_streamSpecs{this, "Input", {}, "input stream specifiers (for job options)"}; - Gaudi::Property<int> m_firstEvent{this, "FirstEvent", 0, "first event to be processed"}; - Gaudi::Property<int> m_evtMax{this, "EvtMax", INT_MAX, "maximum number of events to be processed"}; - Gaudi::Property<int> m_evtPrintFrequency{this, "PrintFreq", 10, "printout frequency"}; + Gaudi::Property<int> m_firstEvent{this, "FirstEvent", 0, "first event to be processed"}; + Gaudi::Property<int> m_evtMax{this, "EvtMax", INT_MAX, "maximum number of events to be processed"}; + Gaudi::Property<int> m_evtPrintFrequency{this, "PrintFreq", 10, "printout frequency"}; Gaudi::Property<std::string> m_streamManager{this, "StreamManager", "DataStreamTool", ""}; /// Progress report diff --git a/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.cpp b/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.cpp index 872e19c3d63264c8bfaa4b1f7fd7f11813a3e042..5a39338efe17ba2a70096fcde38b375b95cc166f 100644 --- a/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.cpp +++ b/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.cpp @@ -395,7 +395,7 @@ StatusCode DataOnDemandSvc::setup() StatusCode DataOnDemandSvc::setupNodeHandlers() { std::string nam, typ, tag; - StatusCode sc = StatusCode::SUCCESS; + StatusCode sc = StatusCode::SUCCESS; // Setup for node leafs, where simply a constructor is called... for ( auto node : m_nodeMapping ) { using Parser = Gaudi::Utils::AttribStringParser; @@ -520,9 +520,9 @@ namespace /// type/name given a path and a list of mapping tools. class Finder { - const ToolGetter getter; + const ToolGetter getter; const std::vector<IDODNodeMapper*>& nodes; - const std::vector<IDODAlgMapper*>& algs; + const std::vector<IDODAlgMapper*>& algs; /// Looping algorithm. template <class R, class C> R find( const C& l ) const @@ -714,7 +714,7 @@ void DataOnDemandSvc::dump( const MSG::Level level, const bool mode ) const } typedef std::pair<std::string, std::string> Pair; - std::map<std::string, Pair> _m; + std::map<std::string, Pair> _m; for ( auto& alg : m_algs ) { auto check = _m.find( alg.first ); if ( _m.end() != check ) { @@ -790,7 +790,7 @@ void DataOnDemandSvc::dump( const MSG::Level level, const bool mode ) const // const std::string _f = " | %%1$-%1%.%1%s | %%2$-%2%.%2%s | %%3$%3%.%3%s |"; - boost::format _ff( _f ); + boost::format _ff( _f ); _ff % n1 % n2 % n3; const std::string _format = _ff.str(); @@ -807,7 +807,7 @@ void DataOnDemandSvc::dump( const MSG::Level level, const bool mode ) const fmt1 % "Address" % "Creator" % ( mode ? "S" : "#" ); // const std::string header = fmt1.str(); - std::string line = std::string( header.size(), '-' ); + std::string line = std::string( header.size(), '-' ); line[0] = ' '; msg << '\n' << line << '\n' << header << '\n' << line; diff --git a/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h b/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h index be99dfce65375bbb3005eefe3980aca09dfaf960..cf81e4a079afd569db0e0b866eb09cb8893352d2 100644 --- a/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h +++ b/GaudiCoreSvc/src/IncidentSvc/DataOnDemandSvc.h @@ -93,7 +93,7 @@ public: // ========================================================================== // Typedefs typedef std::vector<std::string> Setup; - typedef TClass* ClassH; + typedef TClass* ClassH; // ========================================================================== /** @struct Protection * Helper class of the DataOnDemandSvc @@ -113,10 +113,10 @@ public: struct Node { // ======================================================================== /// the actual class - ClassH clazz; // the actual class - std::string name; - unsigned long num = 0; - bool executing = false; + ClassH clazz; // the actual class + std::string name; + unsigned long num = 0; + bool executing = false; /// trivial object? DataObject? bool dataObject = false; // trivial object? DataObject? // ======================================================================= @@ -136,13 +136,13 @@ public: // ========================================================================== /// @struct Leaf struct Leaf { - IAlgorithm* algorithm = nullptr; - std::string name; - std::string type; - unsigned long num = 0; - bool executing = false; - Leaf() = default; - Leaf( const Leaf& l ) = default; + IAlgorithm* algorithm = nullptr; + std::string name; + std::string type; + unsigned long num = 0; + bool executing = false; + Leaf() = default; + Leaf( const Leaf& l ) = default; Leaf( std::string t, std::string n ) : name( std::move( n ) ), type( std::move( t ) ) {} }; // ========================================================================== @@ -163,8 +163,8 @@ public: * @param svc [IN] Pointer to service locator * @return Reference to DataOnDemandSvc object. */ - DataOnDemandSvc( const std::string& name, // Service instance name - ISvcLocator* svc ); // Pointer to service locator + DataOnDemandSvc( const std::string& name, // Service instance name + ISvcLocator* svc ); // Pointer to service locator /// Standard destructor. ~DataOnDemandSvc() override = default; // Standard destructor // ========================================================================== @@ -231,19 +231,19 @@ private: bool m_updateRequired = true; // ========================================================================== ChronoEntity m_total; - ulonglong m_statAlg = 0; - ulonglong m_statNode = 0; - ulonglong m_stat = 0; + ulonglong m_statAlg = 0; + ulonglong m_statNode = 0; + ulonglong m_stat = 0; // ========================================================================== ChronoEntity m_timer_nodes; ChronoEntity m_timer_algs; ChronoEntity m_timer_all; - bool m_locked_nodes = false; - bool m_locked_algs = false; - bool m_locked_all = false; + bool m_locked_nodes = false; + bool m_locked_algs = false; + bool m_locked_all = false; // ========================================================================== std::vector<IDODNodeMapper*> m_nodeMappers; - std::vector<IDODAlgMapper*> m_algMappers; + std::vector<IDODAlgMapper*> m_algMappers; // ========================================================================== // Properties Gaudi::Property<std::string> m_trapType{this, "IncidentName", "DataFault", "the type of handled Incident"}; diff --git a/GaudiCoreSvc/src/IncidentSvc/IncidentProcAlg.cpp b/GaudiCoreSvc/src/IncidentSvc/IncidentProcAlg.cpp index cde9f55f9539b9546d8490a7f1db3b452ce35ed4..f123ff51b6738b2eaa0fc8399774e515febdf5fe 100644 --- a/GaudiCoreSvc/src/IncidentSvc/IncidentProcAlg.cpp +++ b/GaudiCoreSvc/src/IncidentSvc/IncidentProcAlg.cpp @@ -8,7 +8,7 @@ DECLARE_COMPONENT( IncidentProcAlg ) #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() namespace @@ -40,8 +40,8 @@ StatusCode IncidentProcAlg::initialize() StatusCode IncidentProcAlg::execute() { const EventContext& context = Gaudi::Hive::currentContext(); - auto incPack = m_incSvc->getIncidents( &context ); - MsgStream log( msgSvc(), name() ); + auto incPack = m_incSvc->getIncidents( &context ); + MsgStream log( msgSvc(), name() ); log << MSG::DEBUG << " Number of Incidents to process = " << incPack.incidents.size() << " Context= " << Gaudi::Hive::currentContext() << endmsg; while ( incPack.incidents.size() ) { diff --git a/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.cpp b/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.cpp index fc8e232aecfd062a5e34a88a48303da001c60939..afdc8f36f51c65091968f1534131694bf91f5d24 100644 --- a/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.cpp +++ b/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.cpp @@ -42,7 +42,7 @@ namespace #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() // ============================================================================ @@ -90,7 +90,7 @@ StatusCode IncidentSvc::finalize() void IncidentSvc::addListener( IIncidentListener* lis, const std::string& type, long prio, bool rethrow, bool singleShot ) { - static const std::string all{"ALL"}; + static const std::string all{"ALL"}; std::unique_lock<std::recursive_mutex> lock( m_listenerMapMutex ); const std::string& ltype = ( !type.empty() ? type : all ); @@ -258,7 +258,7 @@ void IncidentSvc::fireIncident( std::unique_ptr<Incident> incident ) void IncidentSvc::getListeners( std::vector<IIncidentListener*>& l, const std::string& type ) const { - static const std::string ALL{"ALL"}; + static const std::string ALL{"ALL"}; std::unique_lock<std::recursive_mutex> lock( m_listenerMapMutex ); const std::string& ltype = ( !type.empty() ? type : ALL ); diff --git a/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.h b/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.h index 90b2e19720d60755bb0b6dc617f9e8661146ca5c..5cac278297b315fa7018358fd85ce5b8173446c6 100644 --- a/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.h +++ b/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.h @@ -39,9 +39,9 @@ class IncidentSvc : public extends<Service, IIncidentSvc> public: struct Listener final { IIncidentListener* iListener; - long priority; - bool rethrow; - bool singleShot; + long priority; + bool rethrow; + bool singleShot; Listener( IIncidentListener* il, long pri, bool thr = false, bool single = false ) : iListener( il ), priority( pri ), rethrow( thr ), singleShot( single ) @@ -97,7 +97,7 @@ private: /// timer & it's lock mutable ChronoEntity m_timer; - mutable bool m_timerLock = false; + mutable bool m_timerLock = false; // ========================================================================== // When TBB supports unique_ptrs in concurrent queue typedef should be changed // typedef tbb::concurrent_queue<std::unique_ptr<Incident>> IncQueue_t; diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Analyzer.cpp b/GaudiCoreSvc/src/JobOptionsSvc/Analyzer.cpp index 11c182f1d4b6e601ff5eab6173ec6de636dfb9bf..3ff176cd68fbad47c2130f29bdd256a351871278 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Analyzer.cpp +++ b/GaudiCoreSvc/src/JobOptionsSvc/Analyzer.cpp @@ -27,7 +27,7 @@ static bool IncludeNode( gp::Node* node, const std::string& search_path, gp::Inc gp::Messages* messages ) { gp::Node include_root; - bool status = gp::Parse( node->position, node->value, search_path, included, messages, &include_root ); + bool status = gp::Parse( node->position, node->value, search_path, included, messages, &include_root ); if ( !status ) return false; node->value = include_root.value; // Save absolute file path node->children.reserve( node->children.size() + include_root.children.size() ); @@ -40,7 +40,7 @@ static bool UnitsNode( gp::Node* node, const std::string& search_path, gp::Inclu gp::Messages* messages ) { gp::Node units_root; - bool status = gp::ParseUnits( node->position, node->value, search_path, included, messages, &units_root ); + bool status = gp::ParseUnits( node->position, node->value, search_path, included, messages, &units_root ); if ( !status ) return false; node->value = units_root.value; // Save absolute file path node->children.reserve( node->children.size() + units_root.children.size() ); @@ -78,8 +78,8 @@ static std::unique_ptr<gp::PropertyValue> GetPropertyValue( const gp::Node* node // if ( node->children.size() == 1 ) { // Unit is presented - std::string unit_name = node->children[0].value; - double unit_value = 0; + std::string unit_name = node->children[0].value; + double unit_value = 0; if ( units->Find( unit_name, unit_value ) ) { // We have found a unit double val = std::stod( node->value ); @@ -126,8 +126,8 @@ static std::unique_ptr<gp::PropertyValue> GetPropertyValue( const gp::Node* node } // ------------------------------------------------------------------------ case gp::Node::kProperty: { - auto property = GetPropertyName( node ); - gp::Property* exists = catalog->Find( property->client(), property->property() ); + auto property = GetPropertyName( node ); + gp::Property* exists = catalog->Find( property->client(), property->property() ); if ( exists ) { value.reset( new gp::PropertyValue( exists->property_value() ) ); } else { @@ -191,8 +191,8 @@ static bool AssignNode( const gp::Node* node, gp::Messages* messages, gp::Catalo return false; } // ------------------------------------------------------------------------ - bool reassign = false; - gp::Property* exists = catalog->Find( property->client(), property->property() ); + bool reassign = false; + gp::Property* exists = catalog->Find( property->client(), property->property() ); // ---------------------------------------------------------------------------- if ( exists ) { // ---------------------------------------------------------------------- @@ -238,9 +238,9 @@ static bool AssignNode( const gp::Node* node, gp::Messages* messages, gp::Catalo static bool UnitNode( const gp::Node* node, gp::Messages* messages, gp::Units* units, bool is_print ) { // -------------------------------------------------------------------------- - double left = std::stod( node->children[0].value ); - std::string name = node->children[1].value; - double right = std::stod( node->children[2].value ); + double left = std::stod( node->children[0].value ); + std::string name = node->children[1].value; + double right = std::stod( node->children[2].value ); // -------------------------------------------------------------------------- gp::Units::Container::mapped_type exists; if ( units->Find( name, exists ) ) { @@ -282,10 +282,10 @@ static bool Analyze( gp::Node* node, const std::string& search_path, gp::Include gp::Messages* messages, gp::Catalog* catalog, gp::Units* units, gp::PragmaOptions* pragma ) { // ---------------------------------------------------------------------------- - bool result = true; - bool local_result = true; - bool skip_childs = true; - gp::Node* next_root = node; + bool result = true; + bool local_result = true; + bool skip_childs = true; + gp::Node* next_root = node; // ------------------------------------------------------------------------ switch ( node->type ) { // ------------------------------------------------------------------------ @@ -373,9 +373,9 @@ bool Unreference( gp::Catalog& catalog, gp::Messages* messages ) for ( auto& client : catalog ) { for ( auto& current : client.second ) { if ( current.IsReference() ) { - gp::PropertyValue& value = current.property_value(); - const std::vector<std::string>& names = value.Vector(); - gp::Property* property = catalog.Find( names[0], names[1] ); + gp::PropertyValue& value = current.property_value(); + const std::vector<std::string>& names = value.Vector(); + gp::Property* property = catalog.Find( names[0], names[1] ); if ( !property ) { messages->AddError( value.position(), "Could not unreference " + current.ValueAsString() ); unreference_result = false; @@ -394,7 +394,7 @@ bool gp::ReadOptions( const std::string& filename, const std::string& search_pat { // Extract Path IncludedFiles included; - bool result = Parse( filename, search_path, &included, messages, root ); + bool result = Parse( filename, search_path, &included, messages, root ); if ( !result ) return false; bool result1 = Analyze( root, search_path, &included, messages, catalog, units, pragma ); diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Catalog.h b/GaudiCoreSvc/src/JobOptionsSvc/Catalog.h index 87e86d79856a46a0f5fb7931b853aac8efdc3b5d..848d9ad6c5d0fa366266efc77baa3400e37e0aa2 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Catalog.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Catalog.h @@ -32,15 +32,15 @@ namespace Gaudi { public: typedef boost::ptr_set<Property, Property::LessThen> PropertySet; - typedef std::map<std::string, PropertySet> CatalogSet; + typedef std::map<std::string, PropertySet> CatalogSet; - typedef CatalogSet::value_type value_type; - typedef CatalogSet::iterator iterator; + typedef CatalogSet::value_type value_type; + typedef CatalogSet::iterator iterator; typedef CatalogSet::const_iterator const_iterator; - iterator begin() { return catalog_.begin(); } + iterator begin() { return catalog_.begin(); } const_iterator begin() const { return catalog_.begin(); } - iterator end() { return catalog_.end(); } + iterator end() { return catalog_.end(); } const_iterator end() const { return catalog_.end(); } std::vector<std::string> ClientNames() const; diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Grammar.h b/GaudiCoreSvc/src/JobOptionsSvc/Grammar.h index 0c03a98016eefe4897291d047c45f45542b82cb9..2000c2a3880bacfc27ccae2ebc7723cc75f31f6a 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Grammar.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Grammar.h @@ -71,7 +71,7 @@ namespace Gaudi } //----------------------------------------------------------------------------- qi::rule<Iterator, std::string(), qi::locals<char>, Skipper> str; - qi::rule<Iterator, char()> begin_quote; + qi::rule<Iterator, char()> begin_quote; qi::rule<Iterator, void( char )> quote; //----------------------------------------------------------------------------- }; @@ -90,7 +90,7 @@ namespace Gaudi inner = qi::alpha >> *( qi::alnum | qi::char_( '_' ) ); } // ---------------------------------------------------------------------------- - qi::rule<Iterator, Node(), Skipper> ident; + qi::rule<Iterator, Node(), Skipper> ident; qi::rule<Iterator, std::string(), Skipper> str; qi::rule<Iterator, std::string()> inner; ph::function<NodeOperations> op; @@ -193,13 +193,13 @@ namespace Gaudi simple_value, pair, units, print_options, pragma, pragma_print, pragma_tree, pragma_dump_file; qi::rule<Iterator, Node(), qi::locals<std::string>> shell; qi::rule<Iterator, Node(), qi::locals<Iterator>, Skipper> statement, value; - qi::rule<Iterator, Node(), qi::locals<char>, Skipper> vector_value; + qi::rule<Iterator, Node(), qi::locals<char>, Skipper> vector_value; qi::rule<Iterator, Node(), qi::locals<Node, Node>, Skipper> condition; - qi::rule<Iterator, char()> begin_vector; - qi::rule<Iterator, void( char )> end_vector; - StringGrammar<Iterator, Skipper> gstring; - BoolGrammar<Iterator, Skipper> gbool; - RealGrammar<Iterator, Skipper> greal; + qi::rule<Iterator, char()> begin_vector; + qi::rule<Iterator, void( char )> end_vector; + StringGrammar<Iterator, Skipper> gstring; + BoolGrammar<Iterator, Skipper> gbool; + RealGrammar<Iterator, Skipper> greal; IdentifierGrammar<Iterator, Skipper> gidentifier; ph::function<NodeOperations> op; }; diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Iterator.h b/GaudiCoreSvc/src/JobOptionsSvc/Iterator.h index 1acc8b856371f7f249336bfbdde48c64d758376c..66585a23e25c2f509c77c24a1e26fbc0e7255bfd 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Iterator.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Iterator.h @@ -13,9 +13,9 @@ #include <boost/spirit/include/classic_position_iterator.hpp> #include <boost/spirit/include/support_multi_pass.hpp> // ============================================================================ -typedef std::string::const_iterator BaseIterator; -typedef boost::spirit::multi_pass<BaseIterator> ForwardIterator; +typedef std::string::const_iterator BaseIterator; +typedef boost::spirit::multi_pass<BaseIterator> ForwardIterator; typedef boost::spirit::classic::position_iterator2<ForwardIterator> Iterator; -typedef boost::spirit::classic::file_position_base<std::string> IteratorPosition; +typedef boost::spirit::classic::file_position_base<std::string> IteratorPosition; // ============================================================================ #endif diff --git a/GaudiCoreSvc/src/JobOptionsSvc/JobOptionsSvc.cpp b/GaudiCoreSvc/src/JobOptionsSvc/JobOptionsSvc.cpp index b5ddedbf95fb7b0adea792b06f12d5cb409c97bd..43b4bf8b9b57cdb4639f4b22b138aed5cf4f59de 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/JobOptionsSvc.cpp +++ b/GaudiCoreSvc/src/JobOptionsSvc/JobOptionsSvc.cpp @@ -46,7 +46,7 @@ StatusCode JobOptionsSvc::initialize() } // ============================================================================ -StatusCode JobOptionsSvc::addPropertyToCatalogue( const std::string& client, +StatusCode JobOptionsSvc::addPropertyToCatalogue( const std::string& client, const Gaudi::Details::PropertyBase& property ) { std::unique_ptr<Gaudi::Details::PropertyBase> p{new Gaudi::Property<std::string>( property.name(), "" )}; @@ -118,12 +118,12 @@ StatusCode JobOptionsSvc::readOptions( const std::string& file, const std::strin if ( msgLevel( MSG::DEBUG ) ) debug() << "Reading options from the file " << "'" << file << "'" << endmsg; - gp::Messages messages( msgStream() ); - gp::Catalog catalog; - gp::Units units; + gp::Messages messages( msgStream() ); + gp::Catalog catalog; + gp::Units units; gp::PragmaOptions pragma; - gp::Node ast; - StatusCode sc = gp::ReadOptions( file, path, &messages, &catalog, &units, &pragma, &ast ); + gp::Node ast; + StatusCode sc = gp::ReadOptions( file, path, &messages, &catalog, &units, &pragma, &ast ); // -------------------------------------------------------------------------- if ( sc.isSuccess() ) { diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Node.h b/GaudiCoreSvc/src/JobOptionsSvc/Node.h index 10853ead467236af38b61829e2fd1ad8db52716d..e55fe96c7bcc02a71cd717bb952ec469bfe8cd95 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Node.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Node.h @@ -60,10 +60,10 @@ namespace Gaudi kPropertyRef, number_of_node_types }; - NodeType type = kRoot; - std::string value; + NodeType type = kRoot; + std::string value; std::vector<Node> children; - Position position; + Position position; Node() = default; std::string name() const; diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Parser.cpp b/GaudiCoreSvc/src/JobOptionsSvc/Parser.cpp index bf01b663ee8d8583b309b4548b7e7bd1bb736b86..a3b1ce7a77e87415e7762e6ed86fa7e207e4b510 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Parser.cpp +++ b/GaudiCoreSvc/src/JobOptionsSvc/Parser.cpp @@ -31,7 +31,7 @@ namespace // ============================================================================ void GetLastLineAndColumn( std::ifstream& ifs, int& line, int& column ) { - int n = 0; + int n = 0; std::string str; while ( !ifs.eof() ) { getline( ifs, str ); @@ -63,7 +63,7 @@ namespace Iterator position_begin( fwd_begin, fwd_end, stream_name ); Iterator position_end; - Grammar gr; + Grammar gr; gp::SkipperGrammar<Iterator> skipper; root->value = stream_name; diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Position.h b/GaudiCoreSvc/src/JobOptionsSvc/Position.h index d4e909e6a85d62811c10e237d3e09d8dd871bdab..72cba975784669462bb3d94375268e7678089465 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Position.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Position.h @@ -21,16 +21,16 @@ namespace Gaudi { } const std::string& filename() const { return filename_; } - unsigned line() const { return line_; } - unsigned column() const { return column_; } + unsigned line() const { return line_; } + unsigned column() const { return column_; } void set_filename( std::string filename ) { filename_ = std::move( filename ); } - std::string ToString() const; - bool Exists() const { return line_ != 0; } + std::string ToString() const; + bool Exists() const { return line_ != 0; } private: std::string filename_; - unsigned line_ = 0; - unsigned column_ = 0; + unsigned line_ = 0; + unsigned column_ = 0; }; // ============================================================================ } /* Gaudi */ diff --git a/GaudiCoreSvc/src/JobOptionsSvc/PragmaOptions.h b/GaudiCoreSvc/src/JobOptionsSvc/PragmaOptions.h index 46654f2bd80019a0f39ab8103441603a582c949f..ea71225e92e7e37e79c49089ae7cc0aab4db2f96 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/PragmaOptions.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/PragmaOptions.h @@ -44,9 +44,9 @@ namespace Gaudi bool HasDumpFile() { return !m_dump_file.empty(); } private: - bool m_is_print = true; - bool m_is_print_options = false; - bool m_is_print_tree = false; + bool m_is_print = true; + bool m_is_print_options = false; + bool m_is_print_tree = false; std::string m_dump_file; }; // =========================================================================== diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Property.h b/GaudiCoreSvc/src/JobOptionsSvc/Property.h index f9ac2addd58334d7560266adc0b7ac8474a9108e..d3aa89a84bbe4577bf61290c23e607457876c83b 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Property.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/Property.h @@ -44,7 +44,7 @@ namespace Gaudi } // ---------------------------------------------------------------------------- const PropertyName& property_name() const { return property_name_; } - PropertyValue& property_value() { return property_value_; } + PropertyValue& property_value() { return property_value_; } // ---------------------------------------------------------------------------- Property& operator+=( const PropertyValue& value ) { @@ -58,24 +58,24 @@ namespace Gaudi } // ---------------------------------------------------------------------------- const Position& DefinedPosition() const; - bool HasDefinedPosition() const { return DefinedPosition().Exists(); } + bool HasDefinedPosition() const { return DefinedPosition().Exists(); } // ---------------------------------------------------------------------------- const Position& ValuePosition() const; - bool HasValuePosition() const { return ValuePosition().Exists(); } + bool HasValuePosition() const { return ValuePosition().Exists(); } // ---------------------------------------------------------------------------- const std::string& ClientName() const; const std::string& NameInClient() const; - std::string FullName() const; - std::string ValueAsString() const; - std::string ToString() const; - bool IsSimple() const; - bool IsVector() const; - bool IsMap() const; - bool IsReference() const { return property_value_.IsReference(); } + std::string FullName() const; + std::string ValueAsString() const; + std::string ToString() const; + bool IsSimple() const; + bool IsVector() const; + bool IsMap() const; + bool IsReference() const { return property_value_.IsReference(); } // ---------------------------------------------------------------------------- private: // ---------------------------------------------------------------------------- - PropertyName property_name_; + PropertyName property_name_; PropertyValue property_value_; }; // ============================================================================ diff --git a/GaudiCoreSvc/src/JobOptionsSvc/PropertyName.h b/GaudiCoreSvc/src/JobOptionsSvc/PropertyName.h index 33c8b4c1dfcd5264b7e3afec9f804f52bd492575..c0431b87883608b2c8ea4d6fcd043838d6ca9d42 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/PropertyName.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/PropertyName.h @@ -33,16 +33,16 @@ namespace Gaudi } const std::string& client() const { return client_; } const std::string& property() const { return property_; } - const Position& position() const { return position_; } - std::string FullName() const; - std::string ToString() const; - bool HasClient() const { return !client_.empty(); } - bool HasPosition() const { return position_.Exists(); } + const Position& position() const { return position_; } + std::string FullName() const; + std::string ToString() const; + bool HasClient() const { return !client_.empty(); } + bool HasPosition() const { return position_.Exists(); } private: std::string client_; std::string property_; - Position position_; + Position position_; }; // ============================================================================ } /* Gaudi */ diff --git a/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.cpp b/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.cpp index 13a88999d3e4adbc12ce85d6e181b55b2a2f555b..5b2274cf2668301ce8b2737c1b27bfd8f8d14c25 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.cpp +++ b/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.cpp @@ -44,7 +44,7 @@ gp::PropertyValue& gp::PropertyValue::operator+=( const PropertyValue& right ) if ( !right.IsMap() ) { throw PropertyValueException::WrongRValue(); } - MapOfStrings& map = boost::get<MapOfStrings>( value_ ); + MapOfStrings& map = boost::get<MapOfStrings>( value_ ); const MapOfStrings& rmap = boost::get<MapOfStrings>( right.value_ ); for ( const auto& item : rmap ) { map.insert( item ); diff --git a/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.h b/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.h index bf16e4e12ab9e633e1ea69325ab909f388e389af..f2791bf2696b6b12df4777ec72c6b6509741cecc 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/PropertyValue.h @@ -39,21 +39,21 @@ namespace Gaudi // ---------------------------------------------------------------------------- const Position& position() const { return position_; } // ---------------------------------------------------------------------------- - std::string& String() { return boost::get<std::string>( value_ ); } + std::string& String() { return boost::get<std::string>( value_ ); } const std::string& String() const { return boost::get<std::string>( value_ ); } - VectorOfStrings& Vector() { return boost::get<VectorOfStrings>( value_ ); } + VectorOfStrings& Vector() { return boost::get<VectorOfStrings>( value_ ); } const VectorOfStrings& Vector() const { return boost::get<VectorOfStrings>( value_ ); } - MapOfStrings& Map() { return boost::get<MapOfStrings>( value_ ); } + MapOfStrings& Map() { return boost::get<MapOfStrings>( value_ ); } const MapOfStrings& Map() const { return boost::get<MapOfStrings>( value_ ); } // ---------------------------------------------------------------------------- std::string ToString() const; - bool HasPosition() const { return position_.Exists(); } - bool IsSimple() const; - bool IsVector() const; - bool IsMap() const; - bool IsReference() const { return is_reference_; }; + bool HasPosition() const { return position_.Exists(); } + bool IsSimple() const; + bool IsVector() const; + bool IsMap() const; + bool IsReference() const { return is_reference_; }; // ---------------------------------------------------------------------------- // Operators: // ---------------------------------------------------------------------------- @@ -64,9 +64,9 @@ namespace Gaudi const PropertyValue operator-( const PropertyValue& right ); // bool operator == (const PropertyValue& right) const; private: - Value value_; + Value value_; Position position_; - bool is_reference_; + bool is_reference_; // ---------------------------------------------------------------------------- }; // class PropertyValue // ============================================================================ @@ -74,7 +74,7 @@ namespace Gaudi { public: PropertyValueException( const std::string& message ) : std::runtime_error( message ) {} - static PropertyValueException WrongLValue() + static PropertyValueException WrongLValue() { return PropertyValueException( "Cannot apply +=/-= operation to left value." ); } diff --git a/GaudiCoreSvc/src/JobOptionsSvc/SvcCatalog.h b/GaudiCoreSvc/src/JobOptionsSvc/SvcCatalog.h index 9edfffc3e64a0ef14e3f1aad4f24f770546f88b2..bd5ceabb1fda9fb0567547d47be3db057837b010 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/SvcCatalog.h +++ b/GaudiCoreSvc/src/JobOptionsSvc/SvcCatalog.h @@ -33,7 +33,7 @@ public: StatusCode removeProperty( const std::string& client, const std::string& name ); const PropertiesT* getProperties( const std::string& client ) const; - std::vector<std::string> getClients() const; + std::vector<std::string> getClients() const; const Gaudi::Details::PropertyBase* getProperty( const std::string& client, const std::string& name ) const; public: diff --git a/GaudiCoreSvc/src/JobOptionsSvc/Utils.cpp b/GaudiCoreSvc/src/JobOptionsSvc/Utils.cpp index 612240664468406b7bc3f49f0268090aaba84770..af7beeb3a5f9bd91d5a1949c21393f621b0edad4 100644 --- a/GaudiCoreSvc/src/JobOptionsSvc/Utils.cpp +++ b/GaudiCoreSvc/src/JobOptionsSvc/Utils.cpp @@ -19,11 +19,11 @@ std::string gpu::replaceEnvironments( const std::string& input ) { static const boost::regex expression( "\\$(([A-Za-z0-9_]+)|\\(([A-Za-z0-9_]+)\\))" ); - std::string result = input; - auto start = input.begin(); - auto end = input.end(); + std::string result = input; + auto start = input.begin(); + auto end = input.end(); boost::match_results<std::string::const_iterator> what; - boost::match_flag_type flags = boost::match_default; + boost::match_flag_type flags = boost::match_default; while ( boost::regex_search( start, end, what, expression, flags ) ) { std::string var{what[2].first, what[2].second}; if ( var.empty() ) var = std::string{what[3].first, what[3].second}; diff --git a/GaudiCoreSvc/src/MessageSvc/InertMessageSvc.h b/GaudiCoreSvc/src/MessageSvc/InertMessageSvc.h index 8929ea91cce05e89b63226f2a5cef7df38798271..76554d3a35ce922dff463db3f20e23071315fd22 100644 --- a/GaudiCoreSvc/src/MessageSvc/InertMessageSvc.h +++ b/GaudiCoreSvc/src/MessageSvc/InertMessageSvc.h @@ -55,7 +55,7 @@ private: typedef std::function<void()> messageAction; /// This is done since the copy of the lambda storage is too expensive - typedef std::shared_ptr<messageAction> messageActionPtr; + typedef std::shared_ptr<messageAction> messageActionPtr; tbb::concurrent_bounded_queue<messageActionPtr> m_messageActionsQueue; std::thread m_thread; diff --git a/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp b/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp index 3007fb9df8dcdf2665f327e8cffd083e5af0453d..99fbeeedcf622167f15b58199856a0fd635d0b96 100644 --- a/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp +++ b/GaudiCoreSvc/src/MessageSvc/MessageSvc.cpp @@ -139,7 +139,7 @@ StatusCode MessageSvc::reinitialize() void MessageSvc::setupColors( Gaudi::Details::PropertyBase& prop ) { const std::string& pname = prop.name(); - int level; + int level; if ( pname == "fatalColorCode" ) level = MSG::FATAL; else if ( pname == "errorColorCode" ) @@ -465,7 +465,7 @@ void MessageSvc::reportMessage( const StatusCode& code, const std::string& sourc void MessageSvc::i_reportMessage( const StatusCode& code, const std::string& source ) { - int level = outputLevel( source ); + int level = outputLevel( source ); auto report = [&]( Message mesg ) { mesg.setSource( source ); Message stat_code( source, mesg.getType(), "Status Code " + std::to_string( code.getCode() ) ); @@ -606,7 +606,7 @@ int MessageSvc::outputLevel( const std::string& source ) const { // --------------------------------------------------------------------------- std::unique_lock<std::recursive_mutex> lock( m_thresholdMapMutex ); - auto it = m_thresholdMap.find( source ); + auto it = m_thresholdMap.find( source ); return it != m_thresholdMap.end() ? it->second : m_outputLevel.value(); } diff --git a/GaudiCoreSvc/src/MessageSvc/MessageSvc.h b/GaudiCoreSvc/src/MessageSvc/MessageSvc.h index d1311fad4dd36929dd0e1eb3d3000603c2a4d589..00382b73dbbaba5a054a84740cbd90d3a50ea3b0 100644 --- a/GaudiCoreSvc/src/MessageSvc/MessageSvc.h +++ b/GaudiCoreSvc/src/MessageSvc/MessageSvc.h @@ -31,9 +31,9 @@ class MessageSvc : public extends<Service, IMessageSvc, IInactiveMessageCounter> { public: typedef std::pair<std::string, std::ostream*> NamedStream; - typedef std::multimap<int, NamedStream> StreamMap; - typedef std::multimap<StatusCode, Message> MessageMap; - typedef std::map<std::string, int> ThresholdMap; + typedef std::multimap<int, NamedStream> StreamMap; + typedef std::multimap<StatusCode, Message> MessageMap; + typedef std::map<std::string, int> ThresholdMap; // Default constructor. MessageSvc( const std::string& name, ISvcLocator* svcloc ); @@ -131,9 +131,9 @@ protected: virtual void i_reportMessage( const StatusCode& code, const std::string& source ); private: - Gaudi::Property<std::string> m_defaultFormat{this, "Format", Message::getDefaultFormat(), ""}; - Gaudi::Property<std::string> m_defaultTimeFormat{this, "timeFormat", Message::getDefaultTimeFormat(), ""}; - Gaudi::Property<bool> m_stats{this, "showStats", false, ""}; + Gaudi::Property<std::string> m_defaultFormat{this, "Format", Message::getDefaultFormat(), ""}; + Gaudi::Property<std::string> m_defaultTimeFormat{this, "timeFormat", Message::getDefaultTimeFormat(), ""}; + Gaudi::Property<bool> m_stats{this, "showStats", false, ""}; Gaudi::Property<unsigned int> m_statLevel{this, "statLevel", 0, ""}; std::array<Gaudi::Property<std::vector<std::string>>, MSG::NUM_LEVELS> m_thresholdProp{{{/*ignored*/}, @@ -178,10 +178,10 @@ private: this, "loggedStreams", {}, "MessageStream sources we want to dump into a logfile"}; std::ostream* m_defaultStream = &std::cout; ///< Pointer to the output stream. - Message m_defaultMessage; ///< Default Message - StreamMap m_streamMap; ///< Stream map - MessageMap m_messageMap; ///< Message map - ThresholdMap m_thresholdMap; ///< Output level threshold map + Message m_defaultMessage; ///< Default Message + StreamMap m_streamMap; ///< Stream map + MessageMap m_messageMap; ///< Message map + ThresholdMap m_thresholdMap; ///< Output level threshold map std::string m_logColorCodes[MSG::NUM_LEVELS]; diff --git a/GaudiCoreSvc/src/MessageSvc/TBBMessageSvc.h b/GaudiCoreSvc/src/MessageSvc/TBBMessageSvc.h index 55a87f36bd474e253e90399b5eb9c3aad8ed2c25..2f74c18075bd01dd1e5445f8fda3aee7027eb827 100644 --- a/GaudiCoreSvc/src/MessageSvc/TBBMessageSvc.h +++ b/GaudiCoreSvc/src/MessageSvc/TBBMessageSvc.h @@ -54,7 +54,7 @@ private: MessageTaskCommon( TBBMessageSvc& svc ) : m_svc( svc ), m_sender( std::this_thread::get_id() ) {} protected: - TBBMessageSvc& m_svc; + TBBMessageSvc& m_svc; std::thread::id m_sender; }; @@ -70,7 +70,7 @@ private: private: Message m_msg; - int m_level; + int m_level; }; /// Specialized class to report a message with implicit output level. @@ -99,7 +99,7 @@ private: virtual void run() override { m_svc.i_reportMessage( m_sc, m_source ); } private: - StatusCode m_sc; + StatusCode m_sc; std::string m_source; }; diff --git a/GaudiExamples/GaudiExamples/Collision.h b/GaudiExamples/GaudiExamples/Collision.h index 50420d8e8460bd10c2837886bf6aa347c095ae57..d6bf27475f18858a5ef9db0f547735bd79953319 100644 --- a/GaudiExamples/GaudiExamples/Collision.h +++ b/GaudiExamples/GaudiExamples/Collision.h @@ -27,11 +27,11 @@ namespace Gaudi ~Collision() override = default; /// Retrieve reference to class definition structure - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_Collision; } void setCollision( int num ) { m_collision = num; } - int collision() const { return m_collision; } + int collision() const { return m_collision; } // std::vector<double, CLHEP::HepGenMatrix::Alloc<double,25> >& matrix() { // return m_matrix; // } diff --git a/GaudiExamples/GaudiExamples/Counter.h b/GaudiExamples/GaudiExamples/Counter.h index fd6aab48357bbc41f95dcb94df854a3e893c6244..1eec8be509044dac7a7c2a1952229c86d54f161f 100644 --- a/GaudiExamples/GaudiExamples/Counter.h +++ b/GaudiExamples/GaudiExamples/Counter.h @@ -31,7 +31,7 @@ namespace Gaudi ~Counter() override = default; /// Retrieve reference to class definition structure - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_Counter; } /// Retrieve counter value diff --git a/GaudiExamples/GaudiExamples/Event.h b/GaudiExamples/GaudiExamples/Event.h index be18da66e0332a9b6a138a8f34a704c0e59a63dc..0a65268665c6343f9057f382ebc19da038e68ac6 100644 --- a/GaudiExamples/GaudiExamples/Event.h +++ b/GaudiExamples/GaudiExamples/Event.h @@ -38,7 +38,7 @@ namespace Gaudi ~Event() override = default; /// Retrieve reference to class definition structure - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_Event; } /// Retrieve event number diff --git a/GaudiExamples/GaudiExamples/MyTrack.h b/GaudiExamples/GaudiExamples/MyTrack.h index 8dcd72626d9219a012da357b31a191f417e17d93..64e4903ce5f37188c646b7a9123a82266452b7d4 100644 --- a/GaudiExamples/GaudiExamples/MyTrack.h +++ b/GaudiExamples/GaudiExamples/MyTrack.h @@ -80,7 +80,7 @@ namespace Gaudi /// Standard Destructor ~MyTrack() override; /// Retrieve pointer to class definition structure - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_MyTrack; } /// Accessors: Retrieve x-component of the track momentum float px() const { return m_px; } diff --git a/GaudiExamples/GaudiExamples/MyVertex.h b/GaudiExamples/GaudiExamples/MyVertex.h index bb245b3962e78c5d6bdeff392b9279880648a55d..481e5d17be39d737915af76dd25ea0b921ed79a3 100644 --- a/GaudiExamples/GaudiExamples/MyVertex.h +++ b/GaudiExamples/GaudiExamples/MyVertex.h @@ -47,7 +47,7 @@ namespace Gaudi /// Standard Destructor ~MyVertex() override; /// Retrieve pointer to class definition structure - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID() { return CLID_MyVertex; } /// Accessors: Retrieve x-component of the track momentum float x() const { return m_x; } diff --git a/GaudiExamples/options/AlgSequencer.py b/GaudiExamples/options/AlgSequencer.py index 75bf919a3402ac116ed50150325c11ed4da5f521..f2059293bb91869df71844df4c1c27731505f215 100644 --- a/GaudiExamples/options/AlgSequencer.py +++ b/GaudiExamples/options/AlgSequencer.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import ParentAlg, StopperAlg, Prescaler, HelloWorld, TimingAuditor @@ -8,9 +8,9 @@ from Configurables import ParentAlg, StopperAlg, Prescaler, HelloWorld, TimingAu from Configurables import GaudiExamplesCommonConf GaudiExamplesCommonConf() -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Testing Sequencers -#-------------------------------------------------------------- +# -------------------------------------------------------------- p1 = Prescaler('Prescaler1', PercentPass=50., OutputLevel=WARNING) p2 = Prescaler('Prescaler2', PercentPass=10., OutputLevel=WARNING) h = HelloWorld(OutputLevel=DEBUG) @@ -20,9 +20,9 @@ s1 = Sequencer('Sequence1', Members=[p1, h, c1]) s2 = Sequencer('Sequence2', Members=[p2, h, c2]) top = Sequencer('TopSequence', Members=[s1, s2], StopOverride=True) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Testing the new GaudiSequencer -#----------------------------------------------------------------- +# ----------------------------------------------------------------- sand = GaudiSequencer('ANDSequence', Members=[HelloWorld('AND'), EventCounter('ANDCounter')], MeasureTime=1) @@ -31,7 +31,7 @@ sor = GaudiSequencer('ORSequence', MeasureTime=1, ModeOR=1) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- ApplicationMgr(TopAlg=[ParentAlg(), StopperAlg(StopCount=20), top, sand, sor], EvtMax=10, # events to be processed (default is 10) diff --git a/GaudiExamples/options/AlgTools.py b/GaudiExamples/options/AlgTools.py index 8d790cb5a3a8a7d574a98ef15de61f977447eecb..d54eab050fc65ad60813c6c7a2322aef2037df9e 100644 --- a/GaudiExamples/options/AlgTools.py +++ b/GaudiExamples/options/AlgTools.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import MyAlgorithm, MyTool, MyGaudiAlgorithm @@ -55,9 +55,9 @@ ApplicationMgr(EvtMax=10, EvtSel='NONE', HistogramPersistency='NONE', TopAlg=[myalg, mygalg]) -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Test circular tool dependencies (by Chris Jones) -#-------------------------------------------------------------- +# -------------------------------------------------------------- from Configurables import TestToolAlg, TestTool tA = TestTool('ToolA', Tools=['TestTool/ToolB'], OutputLevel=DEBUG) diff --git a/GaudiExamples/options/AlgToolsClone.py b/GaudiExamples/options/AlgToolsClone.py index dafedfc1623fc0cca0ca9a930adacb3d65c02b31..adcf6db230550db163ac7767f818fc1674af3ec3 100644 --- a/GaudiExamples/options/AlgToolsClone.py +++ b/GaudiExamples/options/AlgToolsClone.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import MyAlgorithm, MyGaudiAlgorithm, ToolSvc, AlgResourcePool, HiveSlimEventLoopMgr, HiveWhiteBoard diff --git a/GaudiExamples/options/ControlFlow/AlgSequencer.py b/GaudiExamples/options/ControlFlow/AlgSequencer.py index 3c8cb117153a731683101c7c26f421470717be3b..8a5a94e48ec4c3166eb2a83f9a39efa3bb59e1d9 100644 --- a/GaudiExamples/options/ControlFlow/AlgSequencer.py +++ b/GaudiExamples/options/ControlFlow/AlgSequencer.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import ParentAlg, StopperAlg, Prescaler, HelloWorld, TimingAuditor @@ -11,9 +11,9 @@ from GaudiConfig.ControlFlow import seq from Configurables import GaudiExamplesCommonConf GaudiExamplesCommonConf() -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Testing Sequencers -#-------------------------------------------------------------- +# -------------------------------------------------------------- p1 = Prescaler('Prescaler1', PercentPass=50., OutputLevel=WARNING) p2 = Prescaler('Prescaler2', PercentPass=10., OutputLevel=WARNING) h = HelloWorld(OutputLevel=DEBUG) @@ -27,9 +27,9 @@ top = s1 >> s2 #s2 = Sequencer('Sequence2', Members = [p2, h, c2] ) #top = Sequencer('TopSequence', Members = [s1, s2], StopOverride = True ) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Testing the new GaudiSequencer -#----------------------------------------------------------------- +# ----------------------------------------------------------------- sand = HelloWorld('AND') & EventCounter('ANDCounter') sor = HelloWorld('OR') | EventCounter('ORCounter') # sand = GaudiSequencer( 'ANDSequence', @@ -46,7 +46,7 @@ print '# --- Configured Control Flow Expression:' print '#', all print '# ---' EventLoopMgr(PrintControlFlowExpression=True) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- ApplicationMgr(TopAlg=[all], EvtMax=10, # events to be processed (default is 10) EvtSel='NONE', # do not use any event input diff --git a/GaudiExamples/options/DataOnDemand.py b/GaudiExamples/options/DataOnDemand.py index 87addbc7e8f1886eef68f188659573de1c7e52ad..a8614159152e98efd21ec82ed3f149791483666c 100644 --- a/GaudiExamples/options/DataOnDemand.py +++ b/GaudiExamples/options/DataOnDemand.py @@ -1,7 +1,7 @@ #!/usr/bin/env gaudirun.py ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import MyDataAlgorithm, DataCreator diff --git a/GaudiExamples/options/GPython.py b/GaudiExamples/options/GPython.py index 160ee8f3fba483e1cc983597b9d6b951b48c4ac1..f3fe02f1621230431f88cd6ca632bf31523a9a80 100644 --- a/GaudiExamples/options/GPython.py +++ b/GaudiExamples/options/GPython.py @@ -1,4 +1,4 @@ -#/////////////////////////////////////////////////////////// +# /////////////////////////////////////////////////////////// # Job Options File in Python theApp.TopAlg = ['RandomNumberAlg'] @@ -8,15 +8,15 @@ MessageSvc = Service('MessageSvc') MessageSvc.OutputLevel = 3 -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Event related parameters -#-------------------------------------------------------------- +# -------------------------------------------------------------- theApp.EvtMax = 100 theApp.EvtSel = "NONE" -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Other Service Options -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Histogram output file theApp.HistogramPersistency = 'ROOT' diff --git a/GaudiExamples/options/MyGaudiAlg.py b/GaudiExamples/options/MyGaudiAlg.py index 93f991a5e69fa5da29f567232da1eb171e894740..42989463dbc5dd72fc27c0efe474542de851d29f 100644 --- a/GaudiExamples/options/MyGaudiAlg.py +++ b/GaudiExamples/options/MyGaudiAlg.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import MyGaudiAlgorithm diff --git a/GaudiExamples/options/Properties.py b/GaudiExamples/options/Properties.py index 84cde8bd82a1761ece7399a750cc2e9a99e3d700..be9d8664bb03ccc772e75daea6c2d3beed234ecb 100644 --- a/GaudiExamples/options/Properties.py +++ b/GaudiExamples/options/Properties.py @@ -12,9 +12,9 @@ importOptions("optsub1/dummy1.opts") from Configurables import PropertyAlg, PropertyProxy -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Algorithms Private Options -#-------------------------------------------------------------- +# -------------------------------------------------------------- alg = PropertyAlg(OutputLevel=3, Int=101, @@ -58,9 +58,9 @@ alg = PropertyAlg(OutputLevel=3, #proxy = PropertyProxy(String = "This is set by the proxy") proxy = PropertyProxy() -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Private Application Configuration options -#-------------------------------------------------------------- +# -------------------------------------------------------------- app = ApplicationMgr() app.TopAlg = [alg] # test for the multiple inclusion of the same alg @@ -68,16 +68,16 @@ app.TopAlg += [alg, proxy] # test for the removal of an algorithm app.TopAlg.remove(alg) -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Event related parameters -#-------------------------------------------------------------- +# -------------------------------------------------------------- app.EvtMax = 1 # events to be processed (default is 10) app.EvtSel = "NONE" # do not use any event input app.HistogramPersistency = "NONE" -#-------------------------------------------------------------- +# -------------------------------------------------------------- # MessageSvc Properties testing -#-------------------------------------------------------------- +# -------------------------------------------------------------- msgSvc = MessageSvc() msgSvc.setDebug += ["EventLoopMgr"] msgSvc.setVerbose += ["MsgTest"] diff --git a/GaudiExamples/options/TemplatedAlg.py b/GaudiExamples/options/TemplatedAlg.py index ada0afee9b426eeb8edafb4166626d28884af077..3b9146754e1ffb0e37219516d1ddeeafdafebf92 100644 --- a/GaudiExamples/options/TemplatedAlg.py +++ b/GaudiExamples/options/TemplatedAlg.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import TAlgIS, TAlgDB, TemplatedAlg_int_std__vector_std__string_std__allocator_std__string_s_s_, TemplatedAlg_double_bool_ @@ -14,7 +14,7 @@ is2 = TAlgIS('TAlgIS2', TProperty=100, RProperty=['string1', 'string2']) db1 = TemplatedAlg_double_bool_('TAlgDB1', TProperty=10.10, RProperty=True) db2 = TAlgDB('TAlgDB2', TProperty=10.10, RProperty=True) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- ApplicationMgr(TopAlg=[is1, is2, db1, db2], EvtMax=10, # events to be processed (default is 10) EvtSel='NONE', # do not use any event input diff --git a/GaudiExamples/options/TimingHistograms.py b/GaudiExamples/options/TimingHistograms.py index 31b18746235f7261f1e5529b75fb86287d89620b..c45498db54c13e38e6b1867139b81c7a3de35d3f 100644 --- a/GaudiExamples/options/TimingHistograms.py +++ b/GaudiExamples/options/TimingHistograms.py @@ -1,20 +1,20 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * importOptions('AlgSequencer.py') -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Enable Timing Histograms -#-------------------------------------------------------------- +# -------------------------------------------------------------- from Configurables import TimingAuditor, SequencerTimerTool TIMER = TimingAuditor("TIMER") TIMER.addTool(SequencerTimerTool, name="TIMER") TIMER.TIMER.HistoProduce = True -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Enable histograms output -#-------------------------------------------------------------- +# -------------------------------------------------------------- RootHistSvc().OutputFile = 'timing_histos.root' ApplicationMgr(HistogramPersistency='ROOT') diff --git a/GaudiExamples/src/AIDATuples/AIDATupleAlgorithmWrite.cpp b/GaudiExamples/src/AIDATuples/AIDATupleAlgorithmWrite.cpp index 245849aa0606cb3f79261562598421c29349914c..9e76d51bd5f01f6a1417553cfe480ec27a4a077c 100644 --- a/GaudiExamples/src/AIDATuples/AIDATupleAlgorithmWrite.cpp +++ b/GaudiExamples/src/AIDATuples/AIDATupleAlgorithmWrite.cpp @@ -58,10 +58,10 @@ StatusCode AIDATupleAlgorithmWrite::execute() info() << "Executing..." << endmsg; DRand48Engine randomEngine; - RandGauss rBeamEnergy( randomEngine, 90, 5 ); - RandGauss rTracksSpread( randomEngine, 0, 2 ); - RandGauss rMomentum( randomEngine, 0, 3 ); - RandGauss rMass( randomEngine, 1, 0.1 ); + RandGauss rBeamEnergy( randomEngine, 90, 5 ); + RandGauss rTracksSpread( randomEngine, 0, 2 ); + RandGauss rMomentum( randomEngine, 0, 3 ); + RandGauss rMass( randomEngine, 1, 0.1 ); int i_px = tuple->findColumn( "px" ); int i_py = tuple->findColumn( "py" ); diff --git a/GaudiExamples/src/AlgErrAud/MyAudTool.h b/GaudiExamples/src/AlgErrAud/MyAudTool.h index 714bec238f8508fcb4216664b88ba6a70f3d89f2..b2669dc42ca844b5ca0d9ce055a1c66077f8bede 100644 --- a/GaudiExamples/src/AlgErrAud/MyAudTool.h +++ b/GaudiExamples/src/AlgErrAud/MyAudTool.h @@ -19,8 +19,8 @@ public: /// IMyAudTool interface const std::string& message() const override; - void doErr() override; - void doFatal() override; + void doErr() override; + void doFatal() override; /// Overriding initialize and finalize StatusCode initialize() override; StatusCode finalize() override; diff --git a/GaudiExamples/src/AlgSequencer/HelloWorld.cpp b/GaudiExamples/src/AlgSequencer/HelloWorld.cpp index 63d0f3cce155caacf12e38e1340167283ccd5366..58800a48fc4b3739af1c5fc36c2bf9ded9ea074f 100644 --- a/GaudiExamples/src/AlgSequencer/HelloWorld.cpp +++ b/GaudiExamples/src/AlgSequencer/HelloWorld.cpp @@ -24,8 +24,8 @@ StatusCode HelloWorld::initialize() info() << "initializing...." << endmsg; - Gaudi::Property<int> m_int; - Gaudi::Property<double> m_double; + Gaudi::Property<int> m_int; + Gaudi::Property<double> m_double; Gaudi::Property<std::string> m_string; declareInfo( "int_value", t_int, "description" ); diff --git a/GaudiExamples/src/AlgSequencer/HelloWorld.h b/GaudiExamples/src/AlgSequencer/HelloWorld.h index 72435a025c296d24e380311f49b00dfe7aad2eab..81037b7736cc6ca7e377eb5e9dc394d08e5bd131 100644 --- a/GaudiExamples/src/AlgSequencer/HelloWorld.h +++ b/GaudiExamples/src/AlgSequencer/HelloWorld.h @@ -28,12 +28,12 @@ private: bool m_initialized; /// These data members are used in the execution of this algorithm /// They are set in the initialisation phase by the job options service - Gaudi::Property<int> m_int; - Gaudi::Property<double> m_double; + Gaudi::Property<int> m_int; + Gaudi::Property<double> m_double; Gaudi::Property<std::string> m_string; - int t_int; - double t_double; - std::string t_string; + int t_int; + double t_double; + std::string t_string; }; #endif // GAUDIEXAMPLE_HELLOWORLD_H diff --git a/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp b/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp index 91469c24c32f27fe78f19561cff2429d2fa3d651..835785fb409ee854400596f084bbdfa8451e1d43 100644 --- a/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp +++ b/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp @@ -9,7 +9,7 @@ // Static Factory declaration typedef TemplatedAlg<int, std::vector<std::string>> t1; -typedef TemplatedAlg<double, bool> t2; +typedef TemplatedAlg<double, bool> t2; DECLARE_COMPONENT( t1 ) DECLARE_COMPONENT_WITH_ID( t1, "TAlgIS" ) diff --git a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp b/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp index 464b7d86d1b28f6df3ec647e2da28487abc01325..fde35b0e1ef8668c39b3dd98235da03b8729d072 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp +++ b/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp @@ -90,7 +90,7 @@ StatusCode MyGaudiAlgorithm::execute() // copy construct some handles ToolHandle<const IMyTool> h1( m_myPubToolHandle ); - ToolHandle<IMyTool> h2( m_myPrivToolHandle ); + ToolHandle<IMyTool> h2( m_myPrivToolHandle ); ToolHandle<const IMyTool> h3( m_myConstToolHandle ); h1->doIt(); h2->doIt(); diff --git a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h b/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h index 9a596801175d645c9ba3d32f99faac70d003da1c..61231253af0dc28c17ca8a0a1816494e050df70f 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h +++ b/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h @@ -43,7 +43,7 @@ private: ToolHandle<IMyTool> m_legacyToolHandle; - ToolHandle<IMyTool> m_myPrivToolHandle{this, "PrivToolHandle", "MyTool"}; + ToolHandle<IMyTool> m_myPrivToolHandle{this, "PrivToolHandle", "MyTool"}; PublicToolHandle<IMyTool> m_myPubToolHandle{this, "PubToolHandle", "MyTool"}; PublicToolHandle<IAlgTool> m_myGenericToolHandle{this, "GenericToolHandle", "MyTool"}; @@ -54,7 +54,7 @@ private: PublicToolHandle<const IMyTool> m_myCopiedConstToolHandle; PublicToolHandle<const IMyTool> m_myCopiedConstToolHandle2; - PublicToolHandle<IMyTool> m_myCopiedToolHandle; + PublicToolHandle<IMyTool> m_myCopiedToolHandle; ToolHandleArray<IMyTool> m_tha; diff --git a/GaudiExamples/src/AlgTools/MyGaudiTool.h b/GaudiExamples/src/AlgTools/MyGaudiTool.h index 97a9fc98ea623ac04685f71ae7e706c5ce9e4a8b..5cde55bf7ce90e9dcae27e1940d68965a2341fcd 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiTool.h +++ b/GaudiExamples/src/AlgTools/MyGaudiTool.h @@ -19,7 +19,7 @@ public: // IMyTool interface const std::string& message() const override; - void doIt() const override; + void doIt() const override; // IMyOtherTool interface void doItAgain() override; @@ -34,9 +34,9 @@ protected: private: /// Properties - Gaudi::Property<int> m_int{this, "Int", 100}; - Gaudi::Property<double> m_double{this, "Double", 100.}; + Gaudi::Property<int> m_int{this, "Int", 100}; + Gaudi::Property<double> m_double{this, "Double", 100.}; Gaudi::Property<std::string> m_string{this, "String", "hundred"}; - Gaudi::Property<bool> m_bool{this, "Bool", true}; + Gaudi::Property<bool> m_bool{this, "Bool", true}; }; #endif // GAUDIEXANMPLES_MYTOOL_H diff --git a/GaudiExamples/src/AlgTools/MyTool.h b/GaudiExamples/src/AlgTools/MyTool.h index 16c5f8f257f1fe0fa12b5b41b3fb625136b05ea6..7848975221213fce5867a5c92ff0dd62373caa73 100644 --- a/GaudiExamples/src/AlgTools/MyTool.h +++ b/GaudiExamples/src/AlgTools/MyTool.h @@ -19,7 +19,7 @@ public: /// IMyTool interface const std::string& message() const override; - void doIt() const override; + void doIt() const override; /// Overriding initialize and finalize StatusCode initialize() override; @@ -31,9 +31,9 @@ protected: private: /// Properties - Gaudi::Property<int> m_int{this, "Int", 100}; - Gaudi::Property<double> m_double{this, "Double", 100.}; + Gaudi::Property<int> m_int{this, "Int", 100}; + Gaudi::Property<double> m_double{this, "Double", 100.}; Gaudi::Property<std::string> m_string{this, "String", "hundred"}; - Gaudi::Property<bool> m_bool{this, "Bool", true}; + Gaudi::Property<bool> m_bool{this, "Bool", true}; }; #endif // GAUDIEXANMPLES_MYTOOL_H diff --git a/GaudiExamples/src/AlgTools/TestTool.cpp b/GaudiExamples/src/AlgTools/TestTool.cpp index 7b9bd746d49fb4807ad1b7ef5465b6168700c4dc..2e1173059673f229dbe665176e2e79abdef34b2c 100644 --- a/GaudiExamples/src/AlgTools/TestTool.cpp +++ b/GaudiExamples/src/AlgTools/TestTool.cpp @@ -26,9 +26,9 @@ StatusCode TestTool::initialize() // setup tool registry // IAlgTool * mytool; for ( const auto& i : m_tools ) { - std::string name = i; - std::string type = i; - auto slash = i.find_first_of( "/" ); + std::string name = i; + std::string type = i; + auto slash = i.find_first_of( "/" ); if ( slash != std::string::npos ) { type = i.substr( 0, slash ); name = i.substr( slash + 1 ); diff --git a/GaudiExamples/src/AlgTools/TestToolAlg.cpp b/GaudiExamples/src/AlgTools/TestToolAlg.cpp index 06c3a488dc5ee76f7e99eccd09065b6d5bb46de0..fabf4057279412670538694305c3df4adf233533 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlg.cpp +++ b/GaudiExamples/src/AlgTools/TestToolAlg.cpp @@ -28,9 +28,9 @@ StatusCode TestToolAlg::initialize() // setup tool registry // IAlgTool * mytool; for ( const auto& i : m_tools ) { - std::string name = i; - std::string type = i; - const int slash = i.find_first_of( "/" ); + std::string name = i; + std::string type = i; + const int slash = i.find_first_of( "/" ); if ( slash > 0 ) { type = i.substr( 0, slash ); name = i.substr( slash + 1 ); diff --git a/GaudiExamples/src/AlgTools/TestToolAlgFailure.h b/GaudiExamples/src/AlgTools/TestToolAlgFailure.h index c76f3b231cbc5189a0e1a2050238cd03dae1d8d1..0cd1b7721f7c71bafb1e69831f8f1342eefd52e3 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlgFailure.h +++ b/GaudiExamples/src/AlgTools/TestToolAlgFailure.h @@ -30,7 +30,7 @@ public: private: Gaudi::Property<std::vector<std::string>> m_tools{this, "Tools", {}, "list of tools to test"}; - Gaudi::Property<bool> m_ignoreFailure{this, "IgnoreFailure", false}; + Gaudi::Property<bool> m_ignoreFailure{this, "IgnoreFailure", false}; }; #endif // TESTTOOLALG_H diff --git a/GaudiExamples/src/Allocator/Allocator.cpp b/GaudiExamples/src/Allocator/Allocator.cpp index c03f8e826a726d1b944207edc0f99feabff08138..5fde804f9f0f487ca1261104d342293e77852cb4 100644 --- a/GaudiExamples/src/Allocator/Allocator.cpp +++ b/GaudiExamples/src/Allocator/Allocator.cpp @@ -84,7 +84,7 @@ namespace // create an vector of pointers (FIXED length!) typedef std::vector<TYPE*> Vct; - Vct vct = Vct( number, (TYPE*)0 ); + Vct vct = Vct( number, (TYPE*)0 ); // sturt the loop over repetition for ( size_t irep = 0; irep < repeat; ++irep ) { diff --git a/GaudiExamples/src/CounterEx/CounterAlg.cpp b/GaudiExamples/src/CounterEx/CounterAlg.cpp index 52c178b1e1bf410ccc7093b783d3d3cba04af83d..2d8e454ed5d144bf5cc810df9f2a2a838d7a9dc8 100644 --- a/GaudiExamples/src/CounterEx/CounterAlg.cpp +++ b/GaudiExamples/src/CounterEx/CounterAlg.cpp @@ -107,7 +107,7 @@ StatusCode CounterAlg::execute() // print the statistics every 1000 events const StatEntity& executed = counter( "executed" ); - const int print = (int)executed.flag(); + const int print = (int)executed.flag(); if ( 0 == print % 1000 ) { info() << " Event number " << print << endmsg; printStat(); diff --git a/GaudiExamples/src/CounterEx/CounterSvcAlg.cpp b/GaudiExamples/src/CounterEx/CounterSvcAlg.cpp index 9fb8866a7a618d1b9c34d50b544e61bd2060bd13..a58ed414f39a6de45bcf7fff67e1976add8471e0 100644 --- a/GaudiExamples/src/CounterEx/CounterSvcAlg.cpp +++ b/GaudiExamples/src/CounterEx/CounterSvcAlg.cpp @@ -96,7 +96,7 @@ namespace GaudiExamples private: ICounterSvc::Counter* m_evtCount = nullptr; ICounterSvc::Counter* m_total = nullptr; - SmartIF<ICounterSvc> m_cntSvc = nullptr; + SmartIF<ICounterSvc> m_cntSvc = nullptr; Gaudi::Property<std::string> m_counterBaseName{this, "CounterBaseName", "CounterTest"}; }; diff --git a/GaudiExamples/src/ExtendedProperties/ArrayProperties.cpp b/GaudiExamples/src/ExtendedProperties/ArrayProperties.cpp index c546e3fe8cc096ea245b876b9db68333f73f8bf6..0c1123033175b29ae7ae7672f373cdc31c3f547d 100644 --- a/GaudiExamples/src/ExtendedProperties/ArrayProperties.cpp +++ b/GaudiExamples/src/ExtendedProperties/ArrayProperties.cpp @@ -34,8 +34,8 @@ namespace Gaudi /** Standard constructor * */ - ArrayProperties( const std::string& name, // algorithm instance name - ISvcLocator* pSvc ) // service locator + ArrayProperties( const std::string& name, // algorithm instance name + ISvcLocator* pSvc ) // service locator : GaudiAlgorithm( name, pSvc ) { // diff --git a/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp b/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp index 034a117a58b720722e3aeeba03a0c279ba24dc67..bec119b08a6ce1c587e0867b55a0064f125a30e7 100644 --- a/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp +++ b/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp @@ -65,22 +65,22 @@ private: Gaudi::Property<std::vector<std::pair<double, double>>> m_2{this, "VectorOfPairsDD"}; Gaudi::Property<std::vector<std::vector<std::string>>> m_3{this, "VectorOfVectorsString"}; - Gaudi::Property<std::vector<std::vector<double>>> m_4{this, "VectorOfVectorsDouble"}; + Gaudi::Property<std::vector<std::vector<double>>> m_4{this, "VectorOfVectorsDouble"}; - Gaudi::Property<std::map<int, double>> m_5{this, "MapIntDouble"}; - Gaudi::Property<std::map<std::string, std::string>> m_6{this, "MapStringString"}; - Gaudi::Property<std::map<std::string, int>> m_7{this, "MapStringInt"}; - Gaudi::Property<std::map<std::string, double>> m_8{this, "MapStringDouble"}; + Gaudi::Property<std::map<int, double>> m_5{this, "MapIntDouble"}; + Gaudi::Property<std::map<std::string, std::string>> m_6{this, "MapStringString"}; + Gaudi::Property<std::map<std::string, int>> m_7{this, "MapStringInt"}; + Gaudi::Property<std::map<std::string, double>> m_8{this, "MapStringDouble"}; Gaudi::Property<std::map<std::string, std::vector<std::string>>> m_9{this, "MapStringVectorOfStrings"}; - Gaudi::Property<std::pair<int, int>> m_10{this, "PairII"}; + Gaudi::Property<std::pair<int, int>> m_10{this, "PairII"}; Gaudi::Property<std::map<std::string, std::vector<double>>> m_11{this, "MapStringVectorOfDoubles"}; - Gaudi::Property<std::map<std::string, std::vector<int>>> m_12{this, "MapStringVectorOfInts"}; + Gaudi::Property<std::map<std::string, std::vector<int>>> m_12{this, "MapStringVectorOfInts"}; - Gaudi::Property<std::map<int, int>> m_13{this, "MapIntInt"}; + Gaudi::Property<std::map<int, int>> m_13{this, "MapIntInt"}; Gaudi::Property<std::vector<std::pair<int, int>>> m_14{this, "VectorOfPairsII"}; - Gaudi::Property<std::map<int, std::string>> m_15{this, "MapIntString"}; + Gaudi::Property<std::map<int, std::string>> m_15{this, "MapIntString"}; Gaudi::Property<std::map<unsigned int, std::string>> m_16{this, "MapUIntString"}; Gaudi::Property<std::map<std::string, std::string>> m_20{this, "EmptyMap"}; @@ -103,7 +103,7 @@ namespace inline SimplePropertyRef<TYPE> _prop( TYPE& value ) { // construct a readable name - std::string name = System::typeinfoName( typeid( value ) ); + std::string name = System::typeinfoName( typeid( value ) ); std::string::size_type ipos = name.find( "std::" ); while ( std::string::npos != ipos ) { name.erase( ipos, 5 ); @@ -127,7 +127,7 @@ namespace ipos = name.find( ",allocator<" ); while ( std::string::npos != ipos ) { std::string::size_type ip2 = ipos + 11; - int ip3 = 1; + int ip3 = 1; for ( ; ip2 < name.size(); ++ip2 ) { if ( '<' == name[ip2] ) { ip3 += 1; @@ -146,7 +146,7 @@ namespace ipos = name.find( ",less<" ); while ( std::string::npos != ipos ) { std::string::size_type ip2 = ipos + 6; - int ip3 = 1; + int ip3 = 1; for ( ; ip2 < name.size(); ++ip2 ) { if ( '<' == name[ip2] ) { ip3 += 1; @@ -202,14 +202,14 @@ StatusCode ExtendedProperties::execute() always() << " \t" << m_24 << endmsg; // some properties could be created from other (convertible) types: - Gaudi::Property<short> m1( "a", 0 ); + Gaudi::Property<short> m1( "a", 0 ); Gaudi::Property<double> m2( "b", m1 ); // some properties could be assigned from other (convertible) types Gaudi::Property<int> m3( "c", 0 ); m3 = m1; - float i = 10; + float i = 10; Gaudi::Property<float&> m4( "d", i ); m4 = 12; diff --git a/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp b/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp index 0ad9805a67acfdd87c003c1d122442f704a1c476..905ab9f6b1b94c55e6d177fa74ce12affa516ac9 100644 --- a/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp +++ b/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp @@ -63,12 +63,12 @@ namespace Gaudi // ====================================================================== private: // ====================================================================== - Gaudi::Property<Gaudi::XYZPoint> m_point3D{this, "Point3D", {0, 1, 2}, "3D-point"}; - Gaudi::Property<Gaudi::XYZVector> m_vector3D{this, "Vector3D", {1, 2, 3}, "3D-vector"}; - Gaudi::Property<Gaudi::LorentzVector> m_vector4D{this, "Vector4D", {1, 2, 3, 4}, "Lorentz-vector"}; - Gaudi::Property<Gaudi::Vector5> m_vector5{this, "SVector5", {}, "Generic-vector"}; - Gaudi::Property<std::vector<Gaudi::XYZPoint>> m_points{this, "Points3D", {}, "Vector of 3D-points"}; - Gaudi::Property<std::vector<Gaudi::XYZVector>> m_vectors{this, "Vectors3D", {}, "Vector of 3D-vectors"}; + Gaudi::Property<Gaudi::XYZPoint> m_point3D{this, "Point3D", {0, 1, 2}, "3D-point"}; + Gaudi::Property<Gaudi::XYZVector> m_vector3D{this, "Vector3D", {1, 2, 3}, "3D-vector"}; + Gaudi::Property<Gaudi::LorentzVector> m_vector4D{this, "Vector4D", {1, 2, 3, 4}, "Lorentz-vector"}; + Gaudi::Property<Gaudi::Vector5> m_vector5{this, "SVector5", {}, "Generic-vector"}; + Gaudi::Property<std::vector<Gaudi::XYZPoint>> m_points{this, "Points3D", {}, "Vector of 3D-points"}; + Gaudi::Property<std::vector<Gaudi::XYZVector>> m_vectors{this, "Vectors3D", {}, "Vector of 3D-vectors"}; Gaudi::Property<std::vector<Gaudi::LorentzVector>> m_lvs{this, "Vectors4D", {}, "Vector of 4D-vectors"}; // ====================================================================== }; diff --git a/GaudiExamples/src/FileMgr/FileMgrTest.cpp b/GaudiExamples/src/FileMgr/FileMgrTest.cpp index 0b947d211e46bfc2c967fba5965e5b7c1eb5562a..167cc27c220981477221c0c118614d992535955a 100644 --- a/GaudiExamples/src/FileMgr/FileMgrTest.cpp +++ b/GaudiExamples/src/FileMgr/FileMgrTest.cpp @@ -169,7 +169,7 @@ StatusCode FileMgrTest::execute() #ifndef __APPLE__ info() << "writing to " << p_fileMgr->fname( (void*)fp_2 ) << endmsg; - std::ofstream ofs; + std::ofstream ofs; __gnu_cxx::stdio_filebuf<char> fb( fp_2, std::ios::out ); ofs.std::ios::rdbuf( &fb ); @@ -177,7 +177,7 @@ StatusCode FileMgrTest::execute() info() << "appending to " << p_fileMgr->fname( (void*)fp_3 ) << endmsg; - std::ofstream ofs2; + std::ofstream ofs2; __gnu_cxx::stdio_filebuf<char> fb2( fp_3, std::ios::out ); ofs2.std::ios::rdbuf( &fb2 ); @@ -192,9 +192,9 @@ StatusCode FileMgrTest::execute() StatusCode FileMgrTest::finalize() { - std::vector<std::string> v; + std::vector<std::string> v; std::vector<std::string>::const_iterator itr; - int i = p_fileMgr->getFiles( v ); + int i = p_fileMgr->getFiles( v ); auto& log = info(); log << "listing all open files [" << i << "]" << std::endl; @@ -210,7 +210,7 @@ StatusCode FileMgrTest::finalize() } log << endmsg; - std::vector<const Io::FileAttr*> v2; + std::vector<const Io::FileAttr*> v2; std::vector<const Io::FileAttr*>::const_iterator it2; i = p_fileMgr->getFiles( Io::POSIX, v2, false ); log << "listing all POSIX files ever opened [" << i << "]" << std::endl; diff --git a/GaudiExamples/src/FileMgr/FileMgrTest.h b/GaudiExamples/src/FileMgr/FileMgrTest.h index 1b03e63ac2b813b6368c3e9c29a38f04497a67ef..b44d2ac0c57f04064eac9c058d8771fa648afcf0 100644 --- a/GaudiExamples/src/FileMgr/FileMgrTest.h +++ b/GaudiExamples/src/FileMgr/FileMgrTest.h @@ -25,10 +25,10 @@ public: StatusCode finalize() override; private: - IFileMgr* p_fileMgr; - Io::Fd fd_1, fd_2, fd_3, fd_4; - FILE *fp_1, *fp_2, *fp_3, *fp_4; - TFile *fp_r1, *fp_r2, *fp_r3; + IFileMgr* p_fileMgr; + Io::Fd fd_1, fd_2, fd_3, fd_4; + FILE * fp_1, *fp_2, *fp_3, *fp_4; + TFile * fp_r1, *fp_r2, *fp_r3; std::string m_f1, m_f2, m_f3, m_f4, m_fr1, m_fr2, m_fr3; StatusCode PosixOpenAction( FILEMGR_CALLBACK_ARGS ); diff --git a/GaudiExamples/src/GPython/ScriptingMain.cpp b/GaudiExamples/src/GPython/ScriptingMain.cpp index 5567b5496d10b1294a8f92ee930c053dd28a70ec..642a31534b0515ead115a1f55f61e546a7d7ea27 100644 --- a/GaudiExamples/src/GPython/ScriptingMain.cpp +++ b/GaudiExamples/src/GPython/ScriptingMain.cpp @@ -11,9 +11,9 @@ int main( int argc, char** argv ) { StatusCode status = StatusCode::SUCCESS; // Create an instance of an application manager - IInterface* iface = Gaudi::createApplicationMgr(); + IInterface* iface = Gaudi::createApplicationMgr(); SmartIF<IAppMgrUI> appMgr( iface ); - auto propMgr = appMgr.as<IProperty>(); + auto propMgr = appMgr.as<IProperty>(); if ( !appMgr || !propMgr ) { std::cout << "Fatal error while creating the ApplicationMgr " << std::endl; diff --git a/GaudiExamples/src/GSLTools/EqSolverGenAlg.cpp b/GaudiExamples/src/GSLTools/EqSolverGenAlg.cpp index 08f817694b243f052293f415843c86611d82e053..cb301dbf2946dd25f2e3d9d48a8da40e4a43ac68 100644 --- a/GaudiExamples/src/GSLTools/EqSolverGenAlg.cpp +++ b/GaudiExamples/src/GSLTools/EqSolverGenAlg.cpp @@ -50,7 +50,7 @@ public: double operator()( double /* argument */ ) const override { return 0; } double operator()( const Argument& x ) const override { return x[0] - 1; }; - unsigned int dimensionality() const override { return 3; } + unsigned int dimensionality() const override { return 3; } ~Func1() override {} }; FUNCTION_OBJECT_IMP( Func1 ) @@ -66,7 +66,7 @@ public: double operator()( double /* argument */ ) const override { return 0; } double operator()( const Argument& x ) const override { return x[1] - 1; }; - unsigned int dimensionality() const override { return 3; } + unsigned int dimensionality() const override { return 3; } ~Func2() override {} }; FUNCTION_OBJECT_IMP( Func2 ) @@ -82,7 +82,7 @@ public: double operator()( double /* argument */ ) const override { return 0; } double operator()( const Argument& x ) const override { return x[2] - 1; }; - unsigned int dimensionality() const override { return 3; } + unsigned int dimensionality() const override { return 3; } ~Func3() override {} }; FUNCTION_OBJECT_IMP( Func3 ) diff --git a/GaudiExamples/src/GSLTools/EqSolverIAlg.cpp b/GaudiExamples/src/GSLTools/EqSolverIAlg.cpp index 6d0884787d1b9804784a00b5e32a090d3d988795..29a8f39c2813061738636e2dff965c113f57d3d5 100644 --- a/GaudiExamples/src/GSLTools/EqSolverIAlg.cpp +++ b/GaudiExamples/src/GSLTools/EqSolverIAlg.cpp @@ -59,31 +59,31 @@ public: Function1() {} ~Function1() override {} double value( const argument& x ) const override { return x[0] - 1; } - int dimension() const override { return 3; } - bool setTitle( const std::string& ) override { return false; } - std::string title( void ) const override { return ""; } - bool isEqual( const AIDA::IFunction& ) const override { return false; } - const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } - bool providesGradient( void ) const override { return false; } - std::string variableName( int ) const override { return ""; } - std::vector<std::string> variableNames( void ) const override { return m_names; } - bool setParameters( const std::vector<double>& ) override { return true; } - const std::vector<double>& parameters( void ) const override { return m_values; } - int numberOfParameters( void ) const override { return 0; } - std::vector<std::string> parameterNames() const override { return m_names; } - bool setParameter( const std::string&, double ) override { return false; } - double parameter( const std::string& ) const override { return 0.0; } - int indexOfParameter( const std::string& ) const override { return 0; } - const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } - AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } - std::string codeletString( void ) const override { return ""; } - void* cast( const std::string& ) const override { return 0; } + int dimension() const override { return 3; } + bool setTitle( const std::string& ) override { return false; } + std::string title( void ) const override { return ""; } + bool isEqual( const AIDA::IFunction& ) const override { return false; } + const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } + bool providesGradient( void ) const override { return false; } + std::string variableName( int ) const override { return ""; } + std::vector<std::string> variableNames( void ) const override { return m_names; } + bool setParameters( const std::vector<double>& ) override { return true; } + const std::vector<double>& parameters( void ) const override { return m_values; } + int numberOfParameters( void ) const override { return 0; } + std::vector<std::string> parameterNames() const override { return m_names; } + bool setParameter( const std::string&, double ) override { return false; } + double parameter( const std::string& ) const override { return 0.0; } + int indexOfParameter( const std::string& ) const override { return 0; } + const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } + AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } + std::string codeletString( void ) const override { return ""; } + void* cast( const std::string& ) const override { return 0; } private: - std::string m_version; - std::string m_label; + std::string m_version; + std::string m_label; std::vector<std::string> m_names; - std::vector<double> m_values; + std::vector<double> m_values; }; // Class for the function "IFunction" @@ -96,31 +96,31 @@ public: Function2() {} ~Function2() override {} double value( const argument& x ) const override { return x[1] - 1; } - int dimension() const override { return 3; } - bool setTitle( const std::string& ) override { return false; } - std::string title( void ) const override { return ""; } - bool isEqual( const AIDA::IFunction& ) const override { return false; } - const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } - bool providesGradient( void ) const override { return false; } - std::string variableName( int ) const override { return ""; } - std::vector<std::string> variableNames( void ) const override { return m_names; } - bool setParameters( const std::vector<double>& ) override { return true; } - const std::vector<double>& parameters( void ) const override { return m_values; } - int numberOfParameters( void ) const override { return 0; } - std::vector<std::string> parameterNames() const override { return m_names; } - bool setParameter( const std::string&, double ) override { return false; } - double parameter( const std::string& ) const override { return 0.0; } - int indexOfParameter( const std::string& ) const override { return 0; } - const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } - AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } - std::string codeletString( void ) const override { return ""; } - void* cast( const std::string& ) const override { return 0; } + int dimension() const override { return 3; } + bool setTitle( const std::string& ) override { return false; } + std::string title( void ) const override { return ""; } + bool isEqual( const AIDA::IFunction& ) const override { return false; } + const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } + bool providesGradient( void ) const override { return false; } + std::string variableName( int ) const override { return ""; } + std::vector<std::string> variableNames( void ) const override { return m_names; } + bool setParameters( const std::vector<double>& ) override { return true; } + const std::vector<double>& parameters( void ) const override { return m_values; } + int numberOfParameters( void ) const override { return 0; } + std::vector<std::string> parameterNames() const override { return m_names; } + bool setParameter( const std::string&, double ) override { return false; } + double parameter( const std::string& ) const override { return 0.0; } + int indexOfParameter( const std::string& ) const override { return 0; } + const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } + AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } + std::string codeletString( void ) const override { return ""; } + void* cast( const std::string& ) const override { return 0; } private: - std::string m_version; - std::string m_label; + std::string m_version; + std::string m_label; std::vector<std::string> m_names; - std::vector<double> m_values; + std::vector<double> m_values; }; // Class for the function "IFunction" @@ -133,31 +133,31 @@ public: Function3() {} virtual ~Function3() override {} double value( const argument& x ) const override { return x[2] - 1; } - int dimension() const override { return 3; } - bool setTitle( const std::string& ) override { return false; } - std::string title( void ) const override { return ""; } - bool isEqual( const AIDA::IFunction& ) const override { return false; } - const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } - bool providesGradient( void ) const override { return false; } - std::string variableName( int ) const override { return ""; } - std::vector<std::string> variableNames( void ) const override { return m_names; } - bool setParameters( const std::vector<double>& ) override { return true; } - const std::vector<double>& parameters( void ) const override { return m_values; } - int numberOfParameters( void ) const override { return 0; } - std::vector<std::string> parameterNames() const override { return m_names; } - bool setParameter( const std::string&, double ) override { return false; } - double parameter( const std::string& ) const override { return 0.0; } - int indexOfParameter( const std::string& ) const override { return 0; } - const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } - AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } - std::string codeletString( void ) const override { return ""; } - void* cast( const std::string& ) const override { return 0; } + int dimension() const override { return 3; } + bool setTitle( const std::string& ) override { return false; } + std::string title( void ) const override { return ""; } + bool isEqual( const AIDA::IFunction& ) const override { return false; } + const std::vector<double>& gradient( const std::vector<double>& ) const override { return m_values; } + bool providesGradient( void ) const override { return false; } + std::string variableName( int ) const override { return ""; } + std::vector<std::string> variableNames( void ) const override { return m_names; } + bool setParameters( const std::vector<double>& ) override { return true; } + const std::vector<double>& parameters( void ) const override { return m_values; } + int numberOfParameters( void ) const override { return 0; } + std::vector<std::string> parameterNames() const override { return m_names; } + bool setParameter( const std::string&, double ) override { return false; } + double parameter( const std::string& ) const override { return 0.0; } + int indexOfParameter( const std::string& ) const override { return 0; } + const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } + AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } + std::string codeletString( void ) const override { return ""; } + void* cast( const std::string& ) const override { return 0; } private: - std::string m_version; - std::string m_label; + std::string m_version; + std::string m_label; std::vector<std::string> m_names; - std::vector<double> m_values; + std::vector<double> m_values; }; //============================================================================= diff --git a/GaudiExamples/src/GSLTools/FuncMinimumGenAlg.cpp b/GaudiExamples/src/GSLTools/FuncMinimumGenAlg.cpp index 7815a8494855b2857f1360f8d0059fc443cd08fb..9a2167eb7e0cf668a325b5f75a792697a59170b6 100644 --- a/GaudiExamples/src/GSLTools/FuncMinimumGenAlg.cpp +++ b/GaudiExamples/src/GSLTools/FuncMinimumGenAlg.cpp @@ -59,7 +59,7 @@ public: ~Func() override {} double operator()( double /* argument */ ) const override { return 0; } double operator()( const Argument& x ) const override { return 10 + 4 * x[0] * x[0] + 27 * x[1] * x[1] + 25 * x[1]; } - unsigned int dimensionality() const override { return 2; } + unsigned int dimensionality() const override { return 2; } }; FUNCTION_OBJECT_IMP( Func ) diff --git a/GaudiExamples/src/GSLTools/FuncMinimumIAlg.cpp b/GaudiExamples/src/GSLTools/FuncMinimumIAlg.cpp index a6cc444ab066ebed213d016a0cd2d2846c632bb5..8b08a9b387aa8f5b3363b8da335ed53fcef5b626 100644 --- a/GaudiExamples/src/GSLTools/FuncMinimumIAlg.cpp +++ b/GaudiExamples/src/GSLTools/FuncMinimumIAlg.cpp @@ -59,36 +59,36 @@ public: Function() { m_gradient.resize( 2 ); } ~Function() override {} double value( const std::vector<double>& x ) const override { return 10 * x[0] * x[0] + 20 * x[1] * x[1]; } - int dimension() const override { return 2; } - bool setTitle( const std::string& ) override { return false; } - std::string title( void ) const override { return ""; } - bool isEqual( const AIDA::IFunction& ) const override { return false; } + int dimension() const override { return 2; } + bool setTitle( const std::string& ) override { return false; } + std::string title( void ) const override { return ""; } + bool isEqual( const AIDA::IFunction& ) const override { return false; } const std::vector<double>& gradient( const std::vector<double>& x ) const override { m_gradient[0] = 20 * x[0]; m_gradient[1] = 40 * x[1]; return m_gradient; } - bool providesGradient( void ) const override { return true; } - std::string variableName( int ) const override { return ""; } - std::vector<std::string> variableNames( void ) const override { return m_names; } - bool setParameters( const std::vector<double>& ) override { return false; } + bool providesGradient( void ) const override { return true; } + std::string variableName( int ) const override { return ""; } + std::vector<std::string> variableNames( void ) const override { return m_names; } + bool setParameters( const std::vector<double>& ) override { return false; } const std::vector<double>& parameters( void ) const override { return m_values; } - int numberOfParameters( void ) const override { return 0; } - std::vector<std::string> parameterNames() const override { return m_names; } - bool setParameter( const std::string&, double ) override { return false; } - double parameter( const std::string& ) const override { return 0.0; } - int indexOfParameter( const std::string& ) const override { return 0; } - const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } - AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } - std::string codeletString( void ) const override { return ""; } - void* cast( const std::string& ) const override { return 0; } + int numberOfParameters( void ) const override { return 0; } + std::vector<std::string> parameterNames() const override { return m_names; } + bool setParameter( const std::string&, double ) override { return false; } + double parameter( const std::string& ) const override { return 0.0; } + int indexOfParameter( const std::string& ) const override { return 0; } + const AIDA::IAnnotation& annotation( void ) const override { return *(AIDA::IAnnotation*)0; } + AIDA::IAnnotation& annotation( void ) override { return *(AIDA::IAnnotation*)0; } + std::string codeletString( void ) const override { return ""; } + void* cast( const std::string& ) const override { return 0; } private: - std::string m_version; - std::string m_label; - std::vector<std::string> m_names; - std::vector<double> m_values; + std::string m_version; + std::string m_label; + std::vector<std::string> m_names; + std::vector<double> m_values; mutable std::vector<double> m_gradient; }; diff --git a/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp b/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp index c67f1faef2ad912ce391caca6defb3336a2069ef..029808b165918e54314c50c9bae9a7b559aca29d 100644 --- a/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp +++ b/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp @@ -83,10 +83,10 @@ StatusCode GaudiCommonTests::execute() MyTrackVector* Tracks2 = get<MyTrackVector>( loc2, IgnoreRootInTES ); MyTrackVector* Tracks3 = get<MyTrackVector>( loc3, UseRootInTES ); MyTrackVector* Tracks4 = get<MyTrackVector>( loc4, IgnoreRootInTES ); - DataObject* Root1 = get<DataObject>( loc5, UseRootInTES ); - DataObject* Root2 = get<DataObject>( loc5, IgnoreRootInTES ); - DataObject* Root3 = get<DataObject>( loc6, UseRootInTES ); - DataObject* Root4 = get<DataObject>( loc6, IgnoreRootInTES ); + DataObject* Root1 = get<DataObject>( loc5, UseRootInTES ); + DataObject* Root2 = get<DataObject>( loc5, IgnoreRootInTES ); + DataObject* Root3 = get<DataObject>( loc6, UseRootInTES ); + DataObject* Root4 = get<DataObject>( loc6, IgnoreRootInTES ); // should never happen ... Errors should be caught above if ( !Tracks1 || !Tracks2 || !Tracks3 || !Tracks4 || !Root1 || !Root2 || !Root3 || !Root4 ) return Error( "Problem getting data" ); diff --git a/GaudiExamples/src/GaudiMT/GaudiMTMain.cpp b/GaudiExamples/src/GaudiMT/GaudiMTMain.cpp index 7f35a08818f08f5f863fc817982f1c5d60a7a0cd..a65d10b0542d613bfd448ecc68272e4dad35c277 100644 --- a/GaudiExamples/src/GaudiMT/GaudiMTMain.cpp +++ b/GaudiExamples/src/GaudiMT/GaudiMTMain.cpp @@ -23,9 +23,9 @@ const int MAX_THREADS( 1023 ); // to check command line parameter * Defines a global locking mechanism so we can see when all worker threads * are finished. */ -int worker_done; +int worker_done; pthread_mutex_t mutex; -pthread_cond_t condition; +pthread_cond_t condition; pthread_mutex_t coutmutex; @@ -60,7 +60,7 @@ void* work( void* counter ) // Get the EventLoopMgr name from the Application Manager std::string nameEventLoopMgr = "EventLoopMgr"; - std::string value; + std::string value; SmartIF<IProperty> propMgr( m_pesaAppMgr ); if ( !propMgr ) { COUTTHREAD( " Fatal error while retrieving Gaudi PropertyHolder " ) @@ -84,8 +84,8 @@ void* work( void* counter ) nameEventLoopMgr = nameEventLoopMgr + threadStrID; COUTTHREAD( "---> Thread : " << id_thread << " - Name for EventLoopManager : " + nameEventLoopMgr ) - StatusCode sc; - IEventProcessor* m_processingMgr = 0; + StatusCode sc; + IEventProcessor* m_processingMgr = 0; SmartIF<ISvcLocator> svcLoc( m_pesaAppMgr ); if ( svcLoc ) { sc = svcLoc->service( nameEventLoopMgr, m_processingMgr ); @@ -166,9 +166,9 @@ int main( int argc, char** argv ) } dllMgr.reset(); - StatusCode sc; + StatusCode sc; std::string v_nt; - int nt; + int nt; sc = propMgr->getProperty( "NoOfThreads", v_nt ); if ( sc.isFailure() ) { std::cout << "Cannot get get number of worker threads" << std::endl; @@ -204,7 +204,7 @@ int main( int argc, char** argv ) worker_done = nt; // Initialized counter pthread_t thread[nt]; - int tID[nt]; + int tID[nt]; for ( int i = 0; i < nt; ++i ) { /** diff --git a/GaudiExamples/src/GaudiMT/MTEventLoopMgr.cpp b/GaudiExamples/src/GaudiMT/MTEventLoopMgr.cpp index fb8b87c9efe45a92c2c02fbaca1dd5525d7fb143..8878b4980736217cc2cf51189e8f39d63d9b6e80 100644 --- a/GaudiExamples/src/GaudiMT/MTEventLoopMgr.cpp +++ b/GaudiExamples/src/GaudiMT/MTEventLoopMgr.cpp @@ -128,7 +128,7 @@ StatusCode MTEventLoopMgr::reinitialize() setProperty( m_appMgrProperty->getProperty( "EvtSel" ) ); if ( m_evtsel != "NONE" || m_evtsel.empty() ) { IEvtSelector* theEvtSel; - IService* theSvc; + IService* theSvc; sc = service( "EventSelector", theEvtSel ); sc = service( "EventSelector", theSvc ); if ( sc.isSuccess() && ( theEvtSel != m_evtSelector ) ) { @@ -183,7 +183,7 @@ StatusCode MTEventLoopMgr::finalize() IDataSelector::iterator i; for ( i = objects->begin(); i != objects->end(); i++ ) { IOpaqueAddress* pAddr = nullptr; - StatusCode iret = m_histoPersSvc->createRep( *i, pAddr ); + StatusCode iret = m_histoPersSvc->createRep( *i, pAddr ); if ( iret.isSuccess() ) { ( *i )->registry()->setAddress( pAddr ); } else { @@ -228,7 +228,7 @@ StatusCode MTEventLoopMgr::finalize() StatusCode MTEventLoopMgr::nextEvent( int maxevt ) { DataObject* pObject = nullptr; - StatusCode sc; + StatusCode sc; // loop over events if the maxevt (received as input) if different from -1. // if evtmax is -1 it means infinite loop diff --git a/GaudiExamples/src/GaudiMT/MTHelloWorld.h b/GaudiExamples/src/GaudiMT/MTHelloWorld.h index 0917bc804dbff6f4d27236cefd8629f3d54049b3..3f33381b63dadd7e603abca864feccaa83613c72 100644 --- a/GaudiExamples/src/GaudiMT/MTHelloWorld.h +++ b/GaudiExamples/src/GaudiMT/MTHelloWorld.h @@ -11,7 +11,7 @@ public: StatusCode finalize() override; private: - Gaudi::Property<int> m_myInt{this, "MyInt", 0}; + Gaudi::Property<int> m_myInt{this, "MyInt", 0}; Gaudi::Property<bool> m_myBool { this, "MyBool", 0; diff --git a/GaudiExamples/src/GaudiMT/MTMessageSvc.cpp b/GaudiExamples/src/GaudiMT/MTMessageSvc.cpp index 246d61f983fc6e969a5b30406b0dbc1d9dbcd806..d61359ca04d23bef65ed55fccabfeaf5e870239e 100644 --- a/GaudiExamples/src/GaudiMT/MTMessageSvc.cpp +++ b/GaudiExamples/src/GaudiMT/MTMessageSvc.cpp @@ -54,7 +54,7 @@ StatusCode MTMessageSvc::finalize() { return StatusCode::SUCCESS; } void MTMessageSvc::reportMessage( const Message& msg ) { - int key = msg.getType(); + int key = msg.getType(); StreamMap::const_iterator first = m_streamMap.lower_bound( key ); if ( first != m_streamMap.end() ) { StreamMap::const_iterator last = m_streamMap.upper_bound( key ); diff --git a/GaudiExamples/src/GaudiMT/MTMessageSvc.h b/GaudiExamples/src/GaudiMT/MTMessageSvc.h index 2eab0a304a2e3f8807bf69f30bc98ac2bda1176e..460dbf77984b353a0c3ad170533507b6bbd7471a 100644 --- a/GaudiExamples/src/GaudiMT/MTMessageSvc.h +++ b/GaudiExamples/src/GaudiMT/MTMessageSvc.h @@ -25,9 +25,9 @@ class MTMessageSvc : public extends<Service, IMessageSvc> { public: typedef std::pair<std::string, std::ostream*> NamedStream; - typedef std::multimap<int, NamedStream> StreamMap; - typedef std::multimap<StatusCode, Message> MessageMap; - typedef std::map<std::string, int> ThresholdMap; + typedef std::multimap<int, NamedStream> StreamMap; + typedef std::multimap<StatusCode, Message> MessageMap; + typedef std::map<std::string, int> ThresholdMap; // Default constructor. MTMessageSvc( const std::string& name, ISvcLocator* svcloc ); @@ -119,10 +119,10 @@ private: {this, "setAlways"}}}; std::ostream* m_defaultStream = &std::cout; ///< Pointer to the output stream. - Message m_defaultMessage; ///< Default Message - StreamMap m_streamMap; ///< Stream map - MessageMap m_messageMap; ///< Message map - ThresholdMap m_thresholdMap; ///< Output level threshold map + Message m_defaultMessage; ///< Default Message + StreamMap m_streamMap; ///< Stream map + MessageMap m_messageMap; ///< Message map + ThresholdMap m_thresholdMap; ///< Output level threshold map }; #endif diff --git a/GaudiExamples/src/Histograms/Aida2Root.cpp b/GaudiExamples/src/Histograms/Aida2Root.cpp index cdca992d343c74d249d5c77dd7594dc0ee678c3b..eba2e51a3036affee65e01c8f37cf63edc44ade2 100644 --- a/GaudiExamples/src/Histograms/Aida2Root.cpp +++ b/GaudiExamples/src/Histograms/Aida2Root.cpp @@ -106,7 +106,7 @@ StatusCode Aida2Root::finalize() for ( auto& path : m_1Ds ) { /// retrieve the historam by full path: AIDA::IHistogram1D* aida = 0; - StatusCode sc = histoSvc()->retrieveObject( path, aida ); + StatusCode sc = histoSvc()->retrieveObject( path, aida ); if ( sc.isFailure() || 0 == aida ) { return Error( "Unable to retrieve 1D-histogram '" + ( path ) + "'" ); } @@ -140,7 +140,7 @@ StatusCode Aida2Root::finalize() for ( auto& path : m_2Ds ) { /// retrieve the historam by full path: AIDA::IHistogram2D* aida = 0; - StatusCode sc = histoSvc()->retrieveObject( path, aida ); + StatusCode sc = histoSvc()->retrieveObject( path, aida ); if ( sc.isFailure() || 0 == aida ) { return Error( "Unable to retrieve 2D-histogram '" + ( path ) + "'" ); } @@ -159,7 +159,7 @@ StatusCode Aida2Root::finalize() for ( auto& path : m_3Ds ) { /// retrieve the historam by full path: AIDA::IHistogram3D* aida = 0; - StatusCode sc = histoSvc()->retrieveObject( path, aida ); + StatusCode sc = histoSvc()->retrieveObject( path, aida ); if ( sc.isFailure() || 0 == aida ) { return Error( "Unable to retrieve 3D-histogram '" + ( path ) + "'" ); } @@ -178,7 +178,7 @@ StatusCode Aida2Root::finalize() for ( auto& path : m_1Ps ) { /// retrieve the historam by full path: AIDA::IProfile1D* aida = 0; - StatusCode sc = histoSvc()->retrieveObject( path, aida ); + StatusCode sc = histoSvc()->retrieveObject( path, aida ); if ( sc.isFailure() || 0 == aida ) { return Error( "Unable to retrieve 1D-profile '" + ( path ) + "'" ); } @@ -197,7 +197,7 @@ StatusCode Aida2Root::finalize() for ( auto& path : m_2Ps ) { /// retrieve the historam by full path: AIDA::IProfile2D* aida = 0; - StatusCode sc = histoSvc()->retrieveObject( path, aida ); + StatusCode sc = histoSvc()->retrieveObject( path, aida ); if ( sc.isFailure() || 0 == aida ) { Error( "Unable to retrieve 2D-profile '" + ( path ) + "'" ); } diff --git a/GaudiExamples/src/Histograms/HistoAlgorithm.cpp b/GaudiExamples/src/Histograms/HistoAlgorithm.cpp index 39361ea4a10a2200ab1fc5135bea8b09b04e2de5..76e7299c5f711a3039ab5387f88c7184459defd6 100644 --- a/GaudiExamples/src/Histograms/HistoAlgorithm.cpp +++ b/GaudiExamples/src/Histograms/HistoAlgorithm.cpp @@ -25,7 +25,7 @@ HistoAlgorithm::HistoAlgorithm( const std::string& name, ISvcLocator* pSvcLocato StatusCode HistoAlgorithm::initialize() //------------------------------------------------------------------------------ { - int i; + int i; std::vector<double> edges; for ( i = 0; i <= 10; i++ ) edges.push_back( double( i ) * double( i ) ); // Getting existing histograms diff --git a/GaudiExamples/src/Histograms/HistoAlgorithm.h b/GaudiExamples/src/Histograms/HistoAlgorithm.h index 769e3c7cc005f9b2081a49d80cc0d642a8086360..6e5055cbeb4b69233c0a409ba45dd3de174c88d5 100644 --- a/GaudiExamples/src/Histograms/HistoAlgorithm.h +++ b/GaudiExamples/src/Histograms/HistoAlgorithm.h @@ -35,8 +35,8 @@ private: IHistogram2D* m_h2DVar; IHistogram3D* m_h3D; IHistogram3D* m_h3DVar; - IProfile1D* m_p1D; - IProfile2D* m_p2D; + IProfile1D* m_p1D; + IProfile2D* m_p2D; }; #endif // HISTOGRAMS_HISTOALGORITHM_H diff --git a/GaudiExamples/src/Histograms/HistoTimingAlg.h b/GaudiExamples/src/Histograms/HistoTimingAlg.h index f6d5d2379b5202a20c78fd080fb082f61c28e5d1..71822492aaca5f4f32984c033274d1371541fb24 100644 --- a/GaudiExamples/src/Histograms/HistoTimingAlg.h +++ b/GaudiExamples/src/Histograms/HistoTimingAlg.h @@ -38,7 +38,7 @@ private: HistoMap m_histos; - Gaudi::Property<bool> m_useGaudiAlg{this, "UseLookup", false, ""}; + Gaudi::Property<bool> m_useGaudiAlg{this, "UseLookup", false, ""}; Gaudi::Property<unsigned int> m_nHistos{this, "NumHistos", 20, ""}; Gaudi::Property<unsigned int> m_nTracks{this, "NumTracks", 30, ""}; }; diff --git a/GaudiExamples/src/IO/EvtCollectionSelector.cpp b/GaudiExamples/src/IO/EvtCollectionSelector.cpp index 838202cb382ef1c4b05a1132c358cc6f8cc58773..bb104cf7352431480bdf59a036956b5ba71a26ca 100644 --- a/GaudiExamples/src/IO/EvtCollectionSelector.cpp +++ b/GaudiExamples/src/IO/EvtCollectionSelector.cpp @@ -40,13 +40,13 @@ namespace Gaudi class EvtCollectionSelector : public NTuple::Selector { protected: - NTuple::Item<int> m_ntrack; + NTuple::Item<int> m_ntrack; NTuple::Array<float> m_trkMom; #ifndef NO_TRKMOMFIX NTuple::Array<float> m_trkMomFixed; #endif NTuple::Item<Gaudi::Examples::MyTrack*> m_track; - int m_cut; + int m_cut; public: EvtCollectionSelector( IInterface* svc ) : NTuple::Selector( svc ), m_cut( 10 ) {} diff --git a/GaudiExamples/src/IO/EvtCollectionWrite.cpp b/GaudiExamples/src/IO/EvtCollectionWrite.cpp index 2e11ae27d864a38b67353d7680d8524f5dca84f3..552204698c5b6c4ed2166fb51ac3802888192c36 100644 --- a/GaudiExamples/src/IO/EvtCollectionWrite.cpp +++ b/GaudiExamples/src/IO/EvtCollectionWrite.cpp @@ -59,11 +59,11 @@ StatusCode EvtCollectionWrite::initialize() // Event callback StatusCode EvtCollectionWrite::execute() { - auto& log = msgStream(); + auto& log = msgStream(); SmartDataPtr<DataObject> evtRoot( eventSvc(), "/Event" ); - SmartDataPtr<Event> evt( eventSvc(), "/Event/Header" ); + SmartDataPtr<Event> evt( eventSvc(), "/Event/Header" ); if ( evt ) { - int evt_num = evt->event(); + int evt_num = evt->event(); SmartDataPtr<MyTrackVector> trkCont( eventSvc(), "/Event/MyTracks" ); if ( trkCont != 0 ) { // Force an object update since now the original tracks should be diff --git a/GaudiExamples/src/IO/EvtCollectionWrite.h b/GaudiExamples/src/IO/EvtCollectionWrite.h index 11193b76d45e82f48f15858e650d4244cb9192da..e0160918429c171298b26ed0bf3d09c7f4d49bf6 100644 --- a/GaudiExamples/src/IO/EvtCollectionWrite.h +++ b/GaudiExamples/src/IO/EvtCollectionWrite.h @@ -37,14 +37,14 @@ class EvtCollectionWrite : public Algorithm Gaudi::Property<int> m_nMCcut{this, "NumMcTracks", 50, ""}; - NTuple::Item<int> m_ntrkColl; - NTuple::Item<float> m_eneColl; + NTuple::Item<int> m_ntrkColl; + NTuple::Item<float> m_eneColl; NTuple::Item<Gaudi::Examples::MyTrack*> m_trackItem; - NTuple::Array<float> m_trkMom; - NTuple::Array<float> m_trkMomFixed; - NTuple::Item<IOpaqueAddress*> m_evtAddrColl; - NTuple::Item<IOpaqueAddress*> m_evtAddrCollEx; - INTupleSvc* m_evtTupleSvc = nullptr; + NTuple::Array<float> m_trkMom; + NTuple::Array<float> m_trkMomFixed; + NTuple::Item<IOpaqueAddress*> m_evtAddrColl; + NTuple::Item<IOpaqueAddress*> m_evtAddrCollEx; + INTupleSvc* m_evtTupleSvc = nullptr; public: /// Constructor: A constructor of this form must be provided. diff --git a/GaudiExamples/src/IO/ReadAlg.cpp b/GaudiExamples/src/IO/ReadAlg.cpp index 5770dddf41f2e8f13efa4ded8185e1febcad5b91..44fbfd162f59191cc8ad42c4453bc540712ce3d2 100644 --- a/GaudiExamples/src/IO/ReadAlg.cpp +++ b/GaudiExamples/src/IO/ReadAlg.cpp @@ -112,12 +112,12 @@ StatusCode ReadAlg::execute() } log << endmsg; } - SmartDataPtr<MyTrackVector> myTracks( eventSvc(), "/Event/MyTracks" ); + SmartDataPtr<MyTrackVector> myTracks( eventSvc(), "/Event/MyTracks" ); SmartDataPtr<MyVertexVector> myVtx( eventSvc(), "/Event/Collision_0/MyVertices" ); if ( myTracks != 0 ) { - IOpaqueAddress* pAddr = myTracks->registry()->address(); + IOpaqueAddress* pAddr = myTracks->registry()->address(); static std::string fname = ""; - int count = 0; + int count = 0; if ( pAddr ) { std::string new_fname = pAddr->par()[0]; if ( fname != new_fname ) { diff --git a/GaudiExamples/src/IO/ReadAlg.h b/GaudiExamples/src/IO/ReadAlg.h index 44c2795ec35e4ced55811c85c910f46dc178ae89..3ac726f4bc700565d63db4e8c387cd165b4356b1 100644 --- a/GaudiExamples/src/IO/ReadAlg.h +++ b/GaudiExamples/src/IO/ReadAlg.h @@ -20,7 +20,7 @@ class ReadAlg : public Algorithm, virtual public IIncidentListener /// Reference to run records data service SmartIF<IDataProviderSvc> m_recordSvc; /// Reference to incident service - SmartIF<IIncidentSvc> m_incidentSvc; + SmartIF<IIncidentSvc> m_incidentSvc; Gaudi::Property<std::string> m_incidentName{this, "IncidentName", "", "incident name of records service"}; public: diff --git a/GaudiExamples/src/IO/WriteAlg.cpp b/GaudiExamples/src/IO/WriteAlg.cpp index ffe4ad958722051a1f90d9ff9c9541adacfcde54..2ee51a3730accad65e92c3f738e92951f5e74f4d 100644 --- a/GaudiExamples/src/IO/WriteAlg.cpp +++ b/GaudiExamples/src/IO/WriteAlg.cpp @@ -110,13 +110,13 @@ StatusCode WriteAlg::execute() evt->addCollision( coll2 ); // Create the collection of tracks and register them in the event store - int n = (int)( rndmflat() * 100. ); + int n = (int)( rndmflat() * 100. ); MyTrackVector* myTracks = new MyTrackVector(); for ( int i = 0; i < n; i++ ) { // Create new track - double c = rndmgauss(); - double b = rndmgauss(); - double a = rndmgauss(); + double c = rndmgauss(); + double b = rndmgauss(); + double a = rndmgauss(); MyTrack* track = new MyTrack( float( a ), float( b ), float( c ) ); // the following line has been replace by the previous one since // the order of evaluation of the rndgauss() call is unspecified @@ -130,13 +130,13 @@ StatusCode WriteAlg::execute() } // Create vertex container - int m = (int)( rndmflat() * 100. ) + 1; + int m = (int)( rndmflat() * 100. ) + 1; MyVertexVector* myVertices = new MyVertexVector(); for ( int j = 0; j < m; j++ ) { // Create new track - double c = rndmgauss(); - double b = rndmgauss(); - double a = rndmgauss(); + double c = rndmgauss(); + double b = rndmgauss(); + double a = rndmgauss(); MyVertex* vtx = new MyVertex( float( a ) / 100.0F, float( b ) / 100.0F, float( c ) / 100.0F ); // the following line has been replace by the previous one since // the order of evaluation of the rndgauss() call is unspecified @@ -155,7 +155,7 @@ StatusCode WriteAlg::execute() } // Now connect vertices and tracks for ( MyTrackVector::iterator k = myTracks->begin(); k != myTracks->end(); ++k ) { - int org = (int)( rndmflat() * float( m ) ); + int org = (int)( rndmflat() * float( m ) ); MyVertex* orgVtx = *( myVertices->begin() + org ); ( *k )->setOriginVertex( orgVtx ); int dec1 = (int)( rndmflat() * float( m ) ); diff --git a/GaudiExamples/src/IO/dict.h b/GaudiExamples/src/IO/dict.h index e7a09fe8b10efed9ce1e164a6bad4f379e7ec9ca..03e9984eb48833b80c1d6228a9fd523633b8d52f 100644 --- a/GaudiExamples/src/IO/dict.h +++ b/GaudiExamples/src/IO/dict.h @@ -20,16 +20,16 @@ // template KeyedObject<long>; // template std::vector<KeyedObject<long int>* >; struct POOLIOTestDict__Instantiations { - ObjectVector<Gaudi::Examples::MyTrack> i1; - ObjectVector<Gaudi::Examples::MyVertex> i2; - std::vector<Gaudi::Examples::MyTrack*> i3; - std::vector<Gaudi::Examples::MyVertex*> i4; - std::vector<SmartRef<Gaudi::Examples::MyTrack>> i5; + ObjectVector<Gaudi::Examples::MyTrack> i1; + ObjectVector<Gaudi::Examples::MyVertex> i2; + std::vector<Gaudi::Examples::MyTrack*> i3; + std::vector<Gaudi::Examples::MyVertex*> i4; + std::vector<SmartRef<Gaudi::Examples::MyTrack>> i5; std::vector<SmartRef<Gaudi::Examples::MyVertex>> i6; - KeyedContainer<Gaudi::Examples::MyTrack> i7; - KeyedContainer<Gaudi::Examples::MyVertex> i8; - KeyedObject<int> i9; - std::vector<KeyedObject<int>*> i10; + KeyedContainer<Gaudi::Examples::MyTrack> i7; + KeyedContainer<Gaudi::Examples::MyVertex> i8; + KeyedObject<int> i9; + std::vector<KeyedObject<int>*> i10; // KeyedObject<long> i11; // std::vector<KeyedObject<long int>* > i12; }; diff --git a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.cpp b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.cpp index 880767de571dc96b598e541c6bd92ccaf8679e3f..33ad927230d294eff5f8742ae85ccbfdb24e9f31 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.cpp +++ b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.cpp @@ -36,7 +36,7 @@ StatusCode IncidentAsyncTestAlg::initialize() //============================================================================= StatusCode IncidentAsyncTestAlg::execute() { - uint64_t data = 0; + uint64_t data = 0; MsgStream logstream( msgSvc(), name() ); for ( auto& inputHandle : m_inputObjHandles ) { if ( !inputHandle->isValid() ) continue; diff --git a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.h b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.h index 497e07dd384e2f9ef97ca6cb099a7c999da411eb..1fc24c6ee88273386f3333620315807d1fb61a29 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.h +++ b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestAlg.h @@ -23,10 +23,10 @@ public: static std::string& incident(); private: - Gaudi::Property<std::string> m_serviceName{this, "ServiceName", "IncTestSvc"}; - Gaudi::Property<std::vector<std::string>> m_inpKeys{this, "inpKeys"}; - Gaudi::Property<std::vector<std::string>> m_outKeys{this, "outKeys"}; - SmartIF<IIncidentAsyncTestSvc> m_service; + Gaudi::Property<std::string> m_serviceName{this, "ServiceName", "IncTestSvc"}; + Gaudi::Property<std::vector<std::string>> m_inpKeys{this, "inpKeys"}; + Gaudi::Property<std::vector<std::string>> m_outKeys{this, "outKeys"}; + SmartIF<IIncidentAsyncTestSvc> m_service; std::vector<std::unique_ptr<DataObjectHandle<DataObject>>> m_inputObjHandles; std::vector<std::unique_ptr<DataObjectHandle<DataObject>>> m_outputObjHandles; }; diff --git a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.cpp b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.cpp index a972a0602298222c410d2cc50d9f7f2b3dae53ec..81f55b6fea1d1f0d6a03178884b8094a183e70a6 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.cpp +++ b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.cpp @@ -17,7 +17,7 @@ DECLARE_COMPONENT( IncidentAsyncTestSvc ) #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() StatusCode IncidentAsyncTestSvc::initialize() @@ -55,7 +55,7 @@ void IncidentAsyncTestSvc::handle( const Incident& incident ) } else if ( incident.type() == IncidentType::EndEvent ) { { std::unique_lock<decltype( m_eraseMutex )> g( m_eraseMutex ); - auto res = m_ctxData.unsafe_erase( incident.context() ); + auto res = m_ctxData.unsafe_erase( incident.context() ); if ( res == 0 ) { warning() << " Context is missing for '" << incident.type() << "' event=" << incident.context().evt() << endmsg; } @@ -77,8 +77,8 @@ void IncidentAsyncTestSvc::getData( uint64_t* data, EventContext* ctx ) const } *data = cit->second; } else { - const auto& ct = Gaudi::Hive::currentContext(); - auto cit = m_ctxData.find( ct ); + const auto& ct = Gaudi::Hive::currentContext(); + auto cit = m_ctxData.find( ct ); if ( cit == m_ctxData.end() ) { fatal() << " data for event " << ct.evt() << " is not initialized yet!. This shouldn't happen!" << endmsg; return; diff --git a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.h b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.h index d047493c677cfda86938171e935b1c017fe9dd08..75e22236cf602dc3d9ccd6ab6bd27f05c3c501c1 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.h +++ b/GaudiExamples/src/IncidentSvc/IncidentAsyncTestSvc.h @@ -33,12 +33,12 @@ public: virtual void getData( uint64_t* data, EventContext* ctx = 0 ) const final override; private: - Gaudi::Property<uint64_t> m_fileOffset{this, "FileOffset", 100000000}; - Gaudi::Property<uint64_t> m_eventMultiplier{this, "EventMultiplier", 1000}; + Gaudi::Property<uint64_t> m_fileOffset{this, "FileOffset", 100000000}; + Gaudi::Property<uint64_t> m_eventMultiplier{this, "EventMultiplier", 1000}; Gaudi::Property<std::vector<std::string>> m_incidentNames{this, "IncidentNames"}; - Gaudi::Property<long> m_prio{this, "Priority", 0}; - SmartIF<IMessageSvc> m_msgSvc; - SmartIF<IIncidentSvc> m_incSvc; + Gaudi::Property<long> m_prio{this, "Priority", 0}; + SmartIF<IMessageSvc> m_msgSvc; + SmartIF<IIncidentSvc> m_incSvc; tbb::concurrent_unordered_map<EventContext, uint64_t, EventContextHash, EventContextHash> m_ctxData; std::mutex m_eraseMutex; }; diff --git a/GaudiExamples/src/IncidentSvc/IncidentListenerTest.h b/GaudiExamples/src/IncidentSvc/IncidentListenerTest.h index bf3ccd5f26482c2d82ca18d821d351abcfa65e7c..de06ed1a38572f55e6f0f26880e449075cb68766 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentListenerTest.h +++ b/GaudiExamples/src/IncidentSvc/IncidentListenerTest.h @@ -25,9 +25,9 @@ public: void handle( const Incident& incident ) override; private: - std::string m_name; - long m_shots; - SmartIF<IMessageSvc> m_msgSvc; + std::string m_name; + long m_shots; + SmartIF<IMessageSvc> m_msgSvc; SmartIF<IIncidentSvc> m_incSvc; }; diff --git a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h index 63794de5d62e899f6828ca7420e2f14b35a72273..a33f15eb0a44ea1695edb1d265cdefad705618a0 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h +++ b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h @@ -21,7 +21,7 @@ public: static std::string& incident(); private: - static std::string s_incidentType; + static std::string s_incidentType; SmartIF<IIncidentSvc> m_incSvc; std::array<std::unique_ptr<IncidentListenerTest>, 6> m_listener; }; diff --git a/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp b/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp index 08c1f9f078b7e534842e942399d55caf61f2b959..859310c838acc0b901b084c0b5bdaa0c12acea36 100644 --- a/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp +++ b/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp @@ -28,7 +28,7 @@ private: private: Gaudi::Property<long> m_loops{this, "Loops", 1000000, ""}; - int m_nevent = 0; + int m_nevent = 0; }; // Register algorithm diff --git a/GaudiExamples/src/Maps/MapAlg.cpp b/GaudiExamples/src/Maps/MapAlg.cpp index 77f0aedeec352d80cdef913fdd5a0a5f667355a6..50301c236797a4337e4eebbba33a7ecacf282944 100644 --- a/GaudiExamples/src/Maps/MapAlg.cpp +++ b/GaudiExamples/src/Maps/MapAlg.cpp @@ -41,7 +41,7 @@ class MapAlg : public GaudiAlgorithm { public: - typedef int Key; + typedef int Key; typedef double Value; public: @@ -83,10 +83,10 @@ private: void print2( Key key ); private: - typedef std::map<Key, Value> Map1; + typedef std::map<Key, Value> Map1; typedef GaudiUtils::VectorMap<Key, Value> Map2; - typedef GaudiUtils::Map<Key, Value> Map3; - typedef GaudiUtils::HashMap<Key, Value> Map4; + typedef GaudiUtils::Map<Key, Value> Map3; + typedef GaudiUtils::HashMap<Key, Value> Map4; Map1 m_map1; Map2 m_map2; @@ -108,7 +108,7 @@ StatusCode MapAlg::execute() Rndm::Numbers gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) ); Rndm::Numbers gauss2( randSvc(), Rndm::Gauss( 0.0, 10.0 ) ); - const Key key = Key( gauss2() ); + const Key key = Key( gauss2() ); const Value value1 = Value( int( 100 * gauss() ) ) / 100.0; always() << " Inserting key " << toString( key ) << " 1st: " diff --git a/GaudiExamples/src/MultiInput/DumpAddress.cpp b/GaudiExamples/src/MultiInput/DumpAddress.cpp index b8d3ced4962a7bd10392467fc75a1c2c8d0525e2..f2d5f8f0725c3388656c8037df890d4653f0fd6b 100644 --- a/GaudiExamples/src/MultiInput/DumpAddress.cpp +++ b/GaudiExamples/src/MultiInput/DumpAddress.cpp @@ -35,7 +35,7 @@ namespace Gaudi StatusCode execute() override { - MsgStream log( msgSvc() ); + MsgStream log( msgSvc() ); SmartDataPtr<DataObject> obj( eventSvc(), m_path ); if ( obj ) { Gaudi::RootAddress* addr = dynamic_cast<Gaudi::RootAddress*>( obj->registry()->address() ); @@ -62,8 +62,8 @@ namespace Gaudi private: Gaudi::Property<std::string> m_output{this, "OutputFile", {}, "Name of the output file"}; Gaudi::Property<std::string> m_path{this, "ObjectPath", {}, "Path to the object in the transient store"}; - std::ofstream m_outputFile; - long m_count = 0; + std::ofstream m_outputFile; + long m_count = 0; }; DECLARE_COMPONENT( DumpAddress ) } diff --git a/GaudiExamples/src/MultiInput/MIHelpers.h b/GaudiExamples/src/MultiInput/MIHelpers.h index cfd20b41028d803152539aefb833a1bfb81f0f74..ced501b8377c104e7950566a431c7ea9d3c06565 100644 --- a/GaudiExamples/src/MultiInput/MIHelpers.h +++ b/GaudiExamples/src/MultiInput/MIHelpers.h @@ -21,9 +21,9 @@ namespace Gaudi typedef std::tuple<long, CLID, std::string, std::string, unsigned long, unsigned long> RootAddressArgs; inline std::istream& operator>>( std::istream& i, RootAddressArgs& addr ) { - long s{0}; - CLID c{0}; - std::string p1, p2; + long s{0}; + CLID c{0}; + std::string p1, p2; unsigned long ip1{0}, ip2{0}; i >> s >> c >> p1 >> p2 >> ip1 >> ip2; addr = RootAddressArgs{s, c, p1, p2, ip1, ip2}; @@ -31,9 +31,9 @@ namespace Gaudi } inline Gaudi::RootAddress* make_address( RootAddressArgs args ) { - long s{0}; - CLID c{0}; - std::string p1, p2; + long s{0}; + CLID c{0}; + std::string p1, p2; unsigned long ip1{0}, ip2{0}; std::tie( s, c, p1, p2, ip1, ip2 ) = args; return new Gaudi::RootAddress( s, c, p1, p2, ip1, ip2 ); diff --git a/GaudiExamples/src/MultiInput/MIReadAlg.h b/GaudiExamples/src/MultiInput/MIReadAlg.h index 00a0f6d464bd82de46f9c8d6d0fdd40a16bc1d5f..2a3373624633904382d56d57eb6c06c431177687 100644 --- a/GaudiExamples/src/MultiInput/MIReadAlg.h +++ b/GaudiExamples/src/MultiInput/MIReadAlg.h @@ -30,7 +30,7 @@ namespace Gaudi this, "AddressesFile", {}, "File containing the address details of the extra data."}; /// Address details for the data to be added to the main event. std::vector<RootAddressArgs> m_addresses; - size_t m_count = 0; + size_t m_count = 0; }; } } diff --git a/GaudiExamples/src/MultiInput/MIWriteAlg.cpp b/GaudiExamples/src/MultiInput/MIWriteAlg.cpp index 0f77d12946842e2e8e099c570e0f5cd5d37dfae3..8b0f08a239dc137c8df79a45031d81727c47740a 100644 --- a/GaudiExamples/src/MultiInput/MIWriteAlg.cpp +++ b/GaudiExamples/src/MultiInput/MIWriteAlg.cpp @@ -59,14 +59,14 @@ StatusCode WriteAlg::execute() } // Create the collection of tracks and register them in the event store - int n = (int)( rndmflat() * 100. ); + int n = (int)( rndmflat() * 100. ); MyTrackVector* myTracks = new MyTrackVector(); for ( int i = 0; i < n; ++i ) { // Create new track // (ensure that the order of the generated random numbers is stable) - double c = rndmgauss(); - double b = rndmgauss(); - double a = rndmgauss(); + double c = rndmgauss(); + double b = rndmgauss(); + double a = rndmgauss(); MyTrack* track = new MyTrack( float( a ), float( b ), float( c ) ); // set Link to header object diff --git a/GaudiExamples/src/MultiInput/MIWriteAlg.h b/GaudiExamples/src/MultiInput/MIWriteAlg.h index 1b769d4270b48456064fcd49b986fff9eaa58132..e836739eeb81e6a224fae62e29973310f3da83e6 100644 --- a/GaudiExamples/src/MultiInput/MIWriteAlg.h +++ b/GaudiExamples/src/MultiInput/MIWriteAlg.h @@ -27,7 +27,7 @@ namespace Gaudi StatusCode execute() override; private: - int m_runnum = 0, m_evtnum = 0; + int m_runnum = 0, m_evtnum = 0; Gaudi::Property<std::vector<long>> m_randomSeeds{ this, "RandomSeeds", {}, "Seeds to be used in the random number generation"}; }; diff --git a/GaudiExamples/src/NTuples/NTupleAlgorithm.h b/GaudiExamples/src/NTuples/NTupleAlgorithm.h index e3430080ceef550b1e3513ac62c042f8b84a9192..db89132e683353975d662f0a4932ae9e966c8827 100644 --- a/GaudiExamples/src/NTuples/NTupleAlgorithm.h +++ b/GaudiExamples/src/NTuples/NTupleAlgorithm.h @@ -23,12 +23,12 @@ private: NTuple::Tuple* m_tuple1; NTuple::Tuple* m_tuple2; - NTuple::Item<int> m_ntrk; + NTuple::Item<int> m_ntrk; NTuple::Item<float> m_energy; // Items for the column wise n-tuple - NTuple::Array<int> m_iNumbers; + NTuple::Array<int> m_iNumbers; NTuple::Array<float> m_fNumbers; - NTuple::Item<int> m_n; + NTuple::Item<int> m_n; }; #endif // HISTOGRAMS_NTupleAlgorithm_H diff --git a/GaudiExamples/src/OpenCL/OpenCLAlg.cpp b/GaudiExamples/src/OpenCL/OpenCLAlg.cpp index 9853ecdc63312e377cb07c208d7f850a90852bfa..d2e3d41101b5cd008dee7b1b80c567ad3a29f8bb 100644 --- a/GaudiExamples/src/OpenCL/OpenCLAlg.cpp +++ b/GaudiExamples/src/OpenCL/OpenCLAlg.cpp @@ -36,7 +36,7 @@ namespace Gaudi StatusCode sc = GaudiAlgorithm::initialize(); // Choose platform according to the macro DEVICE_PREFERENCE - cl_device_id* devices; + cl_device_id* devices; cl_platform_id platform = NULL; clChoosePlatform( devices, platform ); diff --git a/GaudiExamples/src/Properties/PropertyAlg.h b/GaudiExamples/src/Properties/PropertyAlg.h index 1dd79a11afd4ed017ecc89391799f1e782bba959..6fa27442ee8997aca58659762f28563760c73624 100644 --- a/GaudiExamples/src/Properties/PropertyAlg.h +++ b/GaudiExamples/src/Properties/PropertyAlg.h @@ -29,36 +29,36 @@ private: /// These data members are used in the execution of this algorithm /// They are set in the initialization phase by the job options service - Gaudi::Property<int> m_int{this, "Int", 100}; - Gaudi::Property<long long> m_int64{this, "Int64", 100}; + Gaudi::Property<int> m_int{this, "Int", 100}; + Gaudi::Property<long long> m_int64{this, "Int64", 100}; Gaudi::Property<unsigned long long> m_uint64{this, "UInt64", 100}; - Gaudi::Property<double> m_double{this, "Double", 100.}; - Gaudi::Property<std::string> m_string{this, "String", "hundred"}; - Gaudi::Property<bool> m_bool{this, "Bool", true}; + Gaudi::Property<double> m_double{this, "Double", 100.}; + Gaudi::Property<std::string> m_string{this, "String", "hundred"}; + Gaudi::Property<bool> m_bool{this, "Bool", true}; - Gaudi::Property<std::vector<int>> m_intarray{this, "IntArray"}; - Gaudi::Property<std::vector<long long>> m_int64array{this, "Int64Array"}; + Gaudi::Property<std::vector<int>> m_intarray{this, "IntArray"}; + Gaudi::Property<std::vector<long long>> m_int64array{this, "Int64Array"}; Gaudi::Property<std::vector<unsigned long long>> m_uint64array{this, "UInt64Array"}; - Gaudi::Property<std::vector<double>> m_doublearray{this, "DoubleArray"}; - Gaudi::Property<std::vector<std::string>> m_stringarray{this, "StringArray"}; - Gaudi::Property<std::vector<bool>> m_boolarray{this, "BoolArray"}; - Gaudi::Property<std::vector<double>> m_emptyarray{this, "EmptyArray"}; - Gaudi::Property<std::vector<double>> u_doublearrayunits{this, "DoubleArrayWithUnits"}; - Gaudi::Property<std::vector<double>> u_doublearray{this, "DoubleArrayWithoutUnits"}; + Gaudi::Property<std::vector<double>> m_doublearray{this, "DoubleArray"}; + Gaudi::Property<std::vector<std::string>> m_stringarray{this, "StringArray"}; + Gaudi::Property<std::vector<bool>> m_boolarray{this, "BoolArray"}; + Gaudi::Property<std::vector<double>> m_emptyarray{this, "EmptyArray"}; + Gaudi::Property<std::vector<double>> u_doublearrayunits{this, "DoubleArrayWithUnits"}; + Gaudi::Property<std::vector<double>> u_doublearray{this, "DoubleArrayWithoutUnits"}; - Gaudi::Property<std::vector<std::pair<int, int>>> u_intpairarray{this, "IntPairArray"}; + Gaudi::Property<std::vector<std::pair<int, int>>> u_intpairarray{this, "IntPairArray"}; Gaudi::Property<std::vector<std::pair<double, double>>> u_doublepairarray{this, "DoublePairArray"}; - Gaudi::CheckedProperty<int> p_int{this, "PInt", 100, "An integer property"}; + Gaudi::CheckedProperty<int> p_int{this, "PInt", 100, "An integer property"}; Gaudi::PropertyWithReadHandler<double> p_double{this, "PDouble", 100.}; Gaudi::Property<std::string> p_string{this, "PString", "hundred"}; - Gaudi::Property<bool> p_bool{this, "PBool", false}; + Gaudi::Property<bool> p_bool{this, "PBool", false}; - Gaudi::Property<std::vector<int>> p_intarray{this, "PIntArray"}; - Gaudi::Property<std::vector<double>> p_doublearray{this, "PDoubleArray"}; + Gaudi::Property<std::vector<int>> p_intarray{this, "PIntArray"}; + Gaudi::Property<std::vector<double>> p_doublearray{this, "PDoubleArray"}; Gaudi::Property<std::vector<std::string>> p_stringarray{this, "PStringArray"}; - Gaudi::Property<std::vector<bool>> p_boolarray{this, "PBoolArray"}; + Gaudi::Property<std::vector<bool>> p_boolarray{this, "PBoolArray"}; }; #endif // GAUDIEXAMPLE_PROPERTYALG_H diff --git a/GaudiExamples/src/Properties/PropertyProxy.cpp b/GaudiExamples/src/Properties/PropertyProxy.cpp index 4cd7f66e02fc4415dfdb38d8d453b67ef5ce86be..286cf59baceafd0b5fa583636813335e9a251d01 100644 --- a/GaudiExamples/src/Properties/PropertyProxy.cpp +++ b/GaudiExamples/src/Properties/PropertyProxy.cpp @@ -17,7 +17,7 @@ PropertyProxy::PropertyProxy( const std::string& name, ISvcLocator* ploc ) : Alg { //------------------------------------------------------------------------------ // Declare remote properties at this moment - auto algMgr = serviceLocator()->as<IAlgManager>(); + auto algMgr = serviceLocator()->as<IAlgManager>(); SmartIF<IProperty> rAlgP( algMgr->algorithm( "PropertyAlg" ) ); if ( rAlgP ) { m_remAlg = rAlgP; // remember it for later diff --git a/GaudiExamples/src/RandomNumber/RandomNumberAlg.h b/GaudiExamples/src/RandomNumber/RandomNumberAlg.h index 11282f708b476fc675effd2338988ca310ad0230..a43fa2cdaa97449c8f98c0c223b7633a3f331e15 100644 --- a/GaudiExamples/src/RandomNumber/RandomNumberAlg.h +++ b/GaudiExamples/src/RandomNumber/RandomNumberAlg.h @@ -22,11 +22,11 @@ protected: /// Pointer to N-tuple NTuple::Tuple* m_ntuple; /// N-tuple items - NTuple::Item<int> m_int; + NTuple::Item<int> m_int; NTuple::Item<uint32_t> m_deter; - NTuple::Item<float> m_gauss; - NTuple::Item<float> m_exponential; - NTuple::Item<float> m_poisson; + NTuple::Item<float> m_gauss; + NTuple::Item<float> m_exponential; + NTuple::Item<float> m_poisson; public: /// Constructor: A constructor of this form must be provided. diff --git a/GaudiExamples/src/Selections/SelCreate.cpp b/GaudiExamples/src/Selections/SelCreate.cpp index cc65fb635fed412c901dd520d9a0d61e3c48b14f..2549a2b19ad80df90d22a249c5de2b8d9c144376 100644 --- a/GaudiExamples/src/Selections/SelCreate.cpp +++ b/GaudiExamples/src/Selections/SelCreate.cpp @@ -86,8 +86,8 @@ namespace Gaudi * @param name the algorithm instance name * @param pSvc pointer to Service Locator */ - SelCreate( const std::string& name, // the algorithm instance name - ISvcLocator* pSvc ) // pointer to the Service Locator + SelCreate( const std::string& name, // the algorithm instance name + ISvcLocator* pSvc ) // pointer to the Service Locator : GaudiAlgorithm( name, pSvc ) { } diff --git a/GaudiExamples/src/StringKeys/StringKeyEx.cpp b/GaudiExamples/src/StringKeys/StringKeyEx.cpp index 5dd7012785081ba465bb6213ad4da49a0d2706d5..0bca8178d9d8eb5a89a6c56e45e8d0d51a6f0390 100644 --- a/GaudiExamples/src/StringKeys/StringKeyEx.cpp +++ b/GaudiExamples/src/StringKeys/StringKeyEx.cpp @@ -47,7 +47,7 @@ namespace Gaudi typedef Gaudi::StringKey Key; typedef std::vector<Key> Keys; // ====================================================================== - Gaudi::Property<Key> m_key{this, "Key", {}, "The string key"}; + Gaudi::Property<Key> m_key{this, "Key", {}, "The string key"}; Gaudi::Property<Keys> m_keys{this, "Keys", {}, "The vector of keys"}; // ====================================================================== }; @@ -66,14 +66,14 @@ StatusCode Gaudi::Examples::StringKeyEx::execute() // // prepare some maps - typedef std::map<std::string, int> MAP1; - typedef GaudiUtils::Map<std::string, int> MAP2; - typedef GaudiUtils::HashMap<std::string, int> MAP3; + typedef std::map<std::string, int> MAP1; + typedef GaudiUtils::Map<std::string, int> MAP2; + typedef GaudiUtils::HashMap<std::string, int> MAP3; typedef GaudiUtils::VectorMap<std::string, int> MAP4; - typedef std::map<Key, int> MAP01; - typedef GaudiUtils::Map<Key, int> MAP02; - typedef GaudiUtils::HashMap<Key, int> MAP03; + typedef std::map<Key, int> MAP01; + typedef GaudiUtils::Map<Key, int> MAP02; + typedef GaudiUtils::HashMap<Key, int> MAP03; typedef GaudiUtils::VectorMap<Key, int> MAP04; MAP1 map1; diff --git a/GaudiExamples/src/SvcInitLoop/LoopAlg.cpp b/GaudiExamples/src/SvcInitLoop/LoopAlg.cpp index f24fae85256d3c275715cea1d0e0e8e97062f4fd..881f4a7ff06de50f0d7bbb4ff9033150bd5e9de9 100644 --- a/GaudiExamples/src/SvcInitLoop/LoopAlg.cpp +++ b/GaudiExamples/src/SvcInitLoop/LoopAlg.cpp @@ -15,7 +15,7 @@ LoopAlg::LoopAlg( const std::string& name, ISvcLocator* pSvcLocator ) : Algorith StatusCode LoopAlg::initialize() //------------------------------------------------------------------------------ { - IService* pService = nullptr; + IService* pService = nullptr; const bool CREATENOW( true ); return service( "ServiceB", pService, CREATENOW ); } diff --git a/GaudiExamples/src/SvcInitLoop/ServiceA.cpp b/GaudiExamples/src/SvcInitLoop/ServiceA.cpp index 855feaf1d7f1e13a0fe252a765bbe03ced4139f5..46a2d1699c2c1812048bbcc354fccbdab488bae3 100644 --- a/GaudiExamples/src/SvcInitLoop/ServiceA.cpp +++ b/GaudiExamples/src/SvcInitLoop/ServiceA.cpp @@ -8,7 +8,7 @@ ServiceA::ServiceA( const std::string& nam, ISvcLocator* svcLoc ) : Service( nam StatusCode ServiceA::initialize() { Service::initialize().ignore(); - IService* pService( 0 ); + IService* pService( 0 ); const bool CREATENOW( true ); return service( "ServiceB", pService, CREATENOW ); } diff --git a/GaudiExamples/src/SvcInitLoop/ServiceB.cpp b/GaudiExamples/src/SvcInitLoop/ServiceB.cpp index 9a22e541d0b4e4b7b8cf840b155aa6d88b2a4240..e79d2ff22693e3dd4e9fc0c46846d2b087d56649 100644 --- a/GaudiExamples/src/SvcInitLoop/ServiceB.cpp +++ b/GaudiExamples/src/SvcInitLoop/ServiceB.cpp @@ -8,7 +8,7 @@ ServiceB::ServiceB( const std::string& nam, ISvcLocator* svcLoc ) : Service( nam StatusCode ServiceB::initialize() { Service::initialize().ignore(); - IService* pService( 0 ); + IService* pService( 0 ); const bool CREATENOW( true ); return service( "ServiceA", pService, CREATENOW ); } diff --git a/GaudiExamples/src/Timing/TimingAlg.cpp b/GaudiExamples/src/Timing/TimingAlg.cpp index 94c7e38e9a3892521aa232fb086d5e0d55454bb1..56dbd36c65b524a2203b9fb6d1842fd5f7a25229 100644 --- a/GaudiExamples/src/Timing/TimingAlg.cpp +++ b/GaudiExamples/src/Timing/TimingAlg.cpp @@ -72,7 +72,7 @@ namespace GaudiExamples // ============================================================================ double GaudiExamples::TimingAlg::doSomething() { - double result = 0; + double result = 0; Rndm::Numbers gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) ); for ( unsigned long i = 0; i < m_cycles; ++i ) { result += sin( gauss() ); diff --git a/GaudiExamples/src/TupleEx/TupleAlg.cpp b/GaudiExamples/src/TupleEx/TupleAlg.cpp index b49405e730c101ca9cb75d9a4fc8eb1ada9f3c97..07f809ffb62fdf28f3b994006bb7c4f67ac59f4c 100644 --- a/GaudiExamples/src/TupleEx/TupleAlg.cpp +++ b/GaudiExamples/src/TupleEx/TupleAlg.cpp @@ -170,7 +170,7 @@ StatusCode TupleAlg::execute() { // fill using iterator/sequence protocol const size_t nCol = 50; - float array[nCol]; + float array[nCol]; for ( size_t i = 0; i < nCol; ++i ) { array[i] = (float)flat(); } @@ -181,8 +181,8 @@ StatusCode TupleAlg::execute() { typedef std::vector<double> Array; - const size_t nCol = 62; - Array array( nCol ); + const size_t nCol = 62; + Array array( nCol ); for ( size_t i = 0; i < array.size(); ++i ) { array[i] = expo(); } @@ -193,7 +193,7 @@ StatusCode TupleAlg::execute() { // fill with the explicit usage of sequence length const size_t nCol = 42; - double array[nCol]; + double array[nCol]; for ( size_t i = 0; i < nCol; ++i ) { array[i] = gauss(); } @@ -203,7 +203,7 @@ StatusCode TupleAlg::execute() } { // fill with the explicit usage of sequence length - const size_t nCol = 42; + const size_t nCol = 42; CLHEP::HepVector array( nCol ); for ( size_t i = 0; i < nCol; ++i ) { array[i] = gauss(); @@ -240,7 +240,7 @@ StatusCode TupleAlg::execute() { // fill with simple "pseudo-matrix" typedef std::vector<double> Row; - typedef std::vector<Row> Mtrx; + typedef std::vector<Row> Mtrx; const size_t nRow = 26; const size_t nCol = 4; @@ -258,8 +258,8 @@ StatusCode TupleAlg::execute() { // fill with simple CLHEP matrix - const size_t nRow = 13; - const size_t nCol = 3; + const size_t nRow = 13; + const size_t nCol = 3; CLHEP::HepMatrix mtrx( nRow, nCol ); for ( int iCol = 0; iCol < mtrx.num_col(); ++iCol ) { for ( int iRow = 0; iRow < mtrx.num_row(); ++iRow ) { @@ -278,14 +278,14 @@ StatusCode TupleAlg::execute() Tuple tuple5 = nTuple( 5, "Variable-size arrays/vectors" ); { - const size_t num = (size_t)poisson(); + const size_t num = (size_t)poisson(); std::vector<double> array; std::generate_n( std::back_inserter( array ), num, gauss ); // fill with the content of vector tuple5->farray( "arr", array.begin(), array.end(), "Len1", 100 ); } { - const size_t num = (size_t)poisson(); + const size_t num = (size_t)poisson(); std::vector<double> array; std::generate_n( std::back_inserter( array ), num, gauss ); // fill with functions of vector @@ -300,10 +300,10 @@ StatusCode TupleAlg::execute() Tuple tuple6 = nTuple( "six", "Variable-size matrices" ); { // fill with the matrix - const size_t num = (size_t)poisson(); + const size_t num = (size_t)poisson(); typedef std::vector<double> Row; - typedef std::vector<Row> Mtrx; - const size_t nCol = 15; + typedef std::vector<Row> Mtrx; + const size_t nCol = 15; Mtrx mtrx( num, Row( nCol ) ); @@ -317,10 +317,10 @@ StatusCode TupleAlg::execute() }; { // fill with the matrix - const size_t num = (size_t)poisson(); + const size_t num = (size_t)poisson(); typedef std::vector<double> Row; - typedef std::vector<Row> Mtrx; - const size_t nCol = 15; + typedef std::vector<Row> Mtrx; + const size_t nCol = 15; Mtrx mtrx( num, Row( nCol ) ); @@ -341,7 +341,7 @@ StatusCode TupleAlg::execute() const size_t num = (size_t)poisson(); typedef std::vector<double> Array; - Array array( num ); + Array array( num ); std::generate( array.begin(), array.end(), flat ); typedef double ( *fun )( double ); diff --git a/GaudiExamples/src/TupleEx/TupleAlg3.cpp b/GaudiExamples/src/TupleEx/TupleAlg3.cpp index 97289e8c0e4857f10cbacebf5e075928ebfb10fb..4a4944413022348085806cab2b003af7c25e8686 100644 --- a/GaudiExamples/src/TupleEx/TupleAlg3.cpp +++ b/GaudiExamples/src/TupleEx/TupleAlg3.cpp @@ -113,7 +113,7 @@ StatusCode TupleAlg3::execute() Tuple tuple = nTuple( "Vectors-3D", "Tuple with Vectors in 3D " ); - typedef ROOT::Math::XYZPoint P3; + typedef ROOT::Math::XYZPoint P3; typedef ROOT::Math::XYZVector V3; P3 p1; @@ -139,8 +139,8 @@ StatusCode TupleAlg3::execute() Tuple tuple = nTuple( "Math-vectors", "Tuple with Math Vectors" ); - ROOT::Math::SVector<float, 4> v1; - ROOT::Math::SVector<double, 25> v2; + ROOT::Math::SVector<float, 4> v1; + ROOT::Math::SVector<double, 25> v2; ROOT::Math::SVector<long double, 50> v3; std::generate( v1.begin(), v1.end(), gauss ); @@ -182,10 +182,10 @@ StatusCode TupleAlg3::execute() Tuple tuple = nTuple( "VectorMaps", "Tuple with VectorMaps/'ExtraInfo'" ); - typedef GaudiUtils::VectorMap<int, double> VM1; + typedef GaudiUtils::VectorMap<int, double> VM1; typedef GaudiUtils::VectorMap<char, long double> VM2; - typedef GaudiUtils::VectorMap<int, float> VM3; - typedef GaudiUtils::VectorMap<long, double> VM4; + typedef GaudiUtils::VectorMap<int, float> VM3; + typedef GaudiUtils::VectorMap<long, double> VM4; VM1 vm1; VM2 vm2; diff --git a/GaudiExamples/src/bug_34121/bug34121_MyAlgorithm.cpp b/GaudiExamples/src/bug_34121/bug34121_MyAlgorithm.cpp index ef056ca6fb0174ad6d87aa213931ec1ea313a2ee..018872a50c1c5d0a573d4a34609a741b6b532eea 100644 --- a/GaudiExamples/src/bug_34121/bug34121_MyAlgorithm.cpp +++ b/GaudiExamples/src/bug_34121/bug34121_MyAlgorithm.cpp @@ -23,7 +23,7 @@ namespace bug_34121 private: Gaudi::Property<std::string> m_toolName{this, "Tool", "bug_34121::Tool", "Type of the tool to use"}; - IMyTool* m_tool = nullptr; + IMyTool* m_tool = nullptr; }; //------------------------------------------------------------------------------ diff --git a/GaudiExamples/src/bug_34121/bug34121_Tool.cpp b/GaudiExamples/src/bug_34121/bug34121_Tool.cpp index 6ee1e8aa92fe6014333493cfbe82303c133a913a..ce8a9fba35e280a4083bc1be89eaaa48b8727b1f 100644 --- a/GaudiExamples/src/bug_34121/bug34121_Tool.cpp +++ b/GaudiExamples/src/bug_34121/bug34121_Tool.cpp @@ -20,7 +20,7 @@ namespace bug_34121 /// IMyTool interface const std::string& message() const override; - void doIt() const override; + void doIt() const override; /// Overriding initialize and finalize StatusCode initialize() override; StatusCode finalize() override; diff --git a/GaudiExamples/src/testing/TestingAlgs.cpp b/GaudiExamples/src/testing/TestingAlgs.cpp index b9865761d3f03013dfa62152e789c40854ebd8f6..be3b9524949480403e52e439fec4508c50bec202 100644 --- a/GaudiExamples/src/testing/TestingAlgs.cpp +++ b/GaudiExamples/src/testing/TestingAlgs.cpp @@ -53,7 +53,7 @@ namespace GaudiTesting private: Gaudi::Property<int> m_sleep{this, "SleepTime", 10, "Seconds to sleep during the execute"}; - int m_counter = 0; + int m_counter = 0; }; /** @@ -206,7 +206,7 @@ namespace GaudiTesting Gaudi::Property<std::vector<std::string>> m_paths{ this, "Paths", {}, "List of paths in the transient store to load"}; Gaudi::Property<std::string> m_dataSvc{this, "DataSvc", "EventDataSvc", "Name of the data service to use"}; - SmartIF<IDataProviderSvc> m_dataProvider; + SmartIF<IDataProviderSvc> m_dataProvider; }; /** @@ -235,7 +235,7 @@ namespace GaudiTesting for ( auto& p : m_paths ) { info() << "Getting '" << p << "'" << endmsg; DataObject* obj; - StatusCode sc = m_dataProvider->retrieveObject( p, obj ); + StatusCode sc = m_dataProvider->retrieveObject( p, obj ); if ( sc.isFailure() ) { warning() << "Cannot retrieve object '" << p << "'" << endmsg; missing = true; @@ -255,7 +255,7 @@ namespace GaudiTesting Gaudi::Property<std::vector<std::string>> m_paths{ this, "Paths", {}, "List of paths in the transient store to load"}; Gaudi::Property<std::string> m_dataSvc{this, "DataSvc", "EventDataSvc", "Name of the data service to use"}; - Gaudi::Property<bool> m_ignoreMissing{this, "IgnoreMissing", false, + Gaudi::Property<bool> m_ignoreMissing{this, "IgnoreMissing", false, "if True, missing objects will not beconsidered an error"}; SmartIF<IDataProviderSvc> m_dataProvider; }; @@ -334,8 +334,8 @@ namespace GaudiTesting protected: Gaudi::Property<int> m_frequency{this, "Frequency", 1, "How often to print the memory usage (number of events)"}; - int m_counter = 0; - void print() + int m_counter = 0; + void print() { info() << "vmem: " << System::virtualMemory() << " kB" << endmsg; info() << "rss: " << System::mappedMemory() << " kB" << endmsg; diff --git a/GaudiExamples/tests/qmtest/refs/RandomNumber.py b/GaudiExamples/tests/qmtest/refs/RandomNumber.py index 359ba8d76eaacf7379d95a55ff222d87a653c6ba..4b28cb5050aa9792707a06758099a0ef86b87e1b 100644 --- a/GaudiExamples/tests/qmtest/refs/RandomNumber.py +++ b/GaudiExamples/tests/qmtest/refs/RandomNumber.py @@ -1,4 +1,4 @@ -#/////////////////////////////////////////////////////////// +# /////////////////////////////////////////////////////////// # Job Options File in Python theApp.DLLs = ['RootHistCnv', 'HbookCnv', 'GaudiAlg', 'GaudiAud'] @@ -9,15 +9,15 @@ MessageSvc = Service('MessageSvc') MessageSvc.OutputLevel = 3 -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Event related parameters -#-------------------------------------------------------------- +# -------------------------------------------------------------- theApp.EvtMax = 100 theApp.EvtSel = "NONE" -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Other Service Options -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Histogram output file theApp.HistogramPersistency = 'ROOT' diff --git a/GaudiGSL/GaudiMath/Adapters.h b/GaudiGSL/GaudiMath/Adapters.h index 95acca29de8adc355d936204bebd7cd16c31ece7..4be6001a2b20cbd5c16baa35c5a6e51da319439b 100644 --- a/GaudiGSL/GaudiMath/Adapters.h +++ b/GaudiGSL/GaudiMath/Adapters.h @@ -12,13 +12,13 @@ namespace GaudiMath { - typedef Genfun::GaudiMathImplementation::AdapterIFunction AIDAFunction; + typedef Genfun::GaudiMathImplementation::AdapterIFunction AIDAFunction; typedef Genfun::GaudiMathImplementation::Adapter2DoubleFunction Function2D; typedef Genfun::GaudiMathImplementation::Adapter3DoubleFunction Function3D; - typedef Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction; + typedef Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction; - typedef Genfun::GaudiMathImplementation::GSLFunctionWithMode GSLFunctionWithMode; - typedef Genfun::GaudiMathImplementation::GSLFunctionWithError GSLFunctionWithError; + typedef Genfun::GaudiMathImplementation::GSLFunctionWithMode GSLFunctionWithMode; + typedef Genfun::GaudiMathImplementation::GSLFunctionWithError GSLFunctionWithError; typedef Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError GSLFunctionWithModeAndError; GAUDI_API AIDAFunction adapter( const AIDA::IFunction& function ); @@ -30,7 +30,7 @@ namespace GaudiMath GAUDI_API GSLFunctionWithMode adapter( GSLFunctionWithMode::Function function, const gsl_mode_t& mode ); GAUDI_API GSLFunctionWithError adapter( GSLFunctionWithError::Function function ); GAUDI_API GSLFunctionWithModeAndError adapter( GSLFunctionWithModeAndError::Function function, - const gsl_mode_t& mode ); + const gsl_mode_t& mode ); } // end of namespace GaudiMath diff --git a/GaudiGSL/GaudiMath/FunAdapters.h b/GaudiGSL/GaudiMath/FunAdapters.h index 9cc3ace43292445c372938c276b995a9a9f3ec55..286e69a5d0b772f0afd84b4095048576ed49b528 100644 --- a/GaudiGSL/GaudiMath/FunAdapters.h +++ b/GaudiGSL/GaudiMath/FunAdapters.h @@ -125,7 +125,7 @@ namespace Genfun AdapterIFunction& operator=( const AdapterIFunction& ) = delete; private: - const AIDA::IFunction* m_fun; + const AIDA::IFunction* m_fun; mutable std::vector<double> m_arg; }; /// mandatory macro from CLHEP/GenericFunctions diff --git a/GaudiGSL/GaudiMath/GSLFunAdapters.h b/GaudiGSL/GaudiMath/GSLFunAdapters.h index 459e8e6f606c3dd83a7e4b589f2dc59d9723e16d..7173016e12cc3d6c51c37164172e4c7719467131 100644 --- a/GaudiGSL/GaudiMath/GSLFunAdapters.h +++ b/GaudiGSL/GaudiMath/GSLFunAdapters.h @@ -56,8 +56,8 @@ namespace Genfun /// the main method double operator()( double x ) const override; double operator()( const Argument& x ) const override; - bool hasAnalyticDerivative() const override { return true; } - unsigned int dimensionality() const override { return 1; } + bool hasAnalyticDerivative() const override { return true; } + unsigned int dimensionality() const override { return 1; } Genfun::Derivative partial( unsigned int i ) const override; /// get the function itself @@ -74,7 +74,7 @@ namespace Genfun GSLFunctionWithError& operator=( const GSLFunctionWithError& ); private: - Function m_function; + Function m_function; std::unique_ptr<gsl_sf_result> m_result; }; /// mandatory macro from CLHEP/GenericFunctions @@ -99,8 +99,8 @@ namespace Genfun /// the main method double operator()( double x ) const override; double operator()( const Argument& x ) const override; - bool hasAnalyticDerivative() const override { return true; } - unsigned int dimensionality() const override { return 1; } + bool hasAnalyticDerivative() const override { return true; } + unsigned int dimensionality() const override { return 1; } Genfun::Derivative partial( unsigned int i ) const override; /// get the function itself Function function() const; @@ -114,7 +114,7 @@ namespace Genfun GSLFunctionWithMode& operator=( const GSLFunctionWithError& ); private: - Function m_function; + Function m_function; std::unique_ptr<gsl_mode_t> m_mode; }; /// mandatory macro from CLHEP/GenericFunctions @@ -139,8 +139,8 @@ namespace Genfun /// the main method double operator()( double x ) const override; double operator()( const Argument& x ) const override; - bool hasAnalyticDerivative() const override { return true; } - unsigned int dimensionality() const override { return 1; } + bool hasAnalyticDerivative() const override { return true; } + unsigned int dimensionality() const override { return 1; } Genfun::Derivative partial( unsigned int i ) const override; /// get the function itself Function function() const; @@ -158,8 +158,8 @@ namespace Genfun GSLFunctionWithModeAndError& operator=( const GSLFunctionWithModeAndError& ); private: - Function m_function; - std::unique_ptr<gsl_mode_t> m_mode; + Function m_function; + std::unique_ptr<gsl_mode_t> m_mode; std::unique_ptr<gsl_sf_result> m_result; }; /// mandatory macro from CLHEP/GenericFunctions diff --git a/GaudiGSL/GaudiMath/GaudiMath.h b/GaudiGSL/GaudiMath/GaudiMath.h index ed0b37594209eb3db71b6c32717c358998880f66..615f481ed39a06002a2e5ec4b68faa629aab095b 100644 --- a/GaudiGSL/GaudiMath/GaudiMath.h +++ b/GaudiGSL/GaudiMath/GaudiMath.h @@ -23,17 +23,17 @@ namespace GaudiMath { typedef Genfun::AbsFunction Function; - typedef Genfun::GaudiMathImplementation::Constant Constant; - typedef Genfun::GaudiMathImplementation::NumericalDerivative Derivative; - typedef Genfun::GaudiMathImplementation::SimpleFunction SimpleFun; + typedef Genfun::GaudiMathImplementation::Constant Constant; + typedef Genfun::GaudiMathImplementation::NumericalDerivative Derivative; + typedef Genfun::GaudiMathImplementation::SimpleFunction SimpleFun; typedef Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral IndIntegral; - typedef Genfun::GaudiMathImplementation::NumericalDefiniteIntegral DefIntegral; + typedef Genfun::GaudiMathImplementation::NumericalDefiniteIntegral DefIntegral; - typedef Genfun::GaudiMathImplementation::SplineBase SimpleSpline; - typedef Genfun::GaudiMathImplementation::GSLSpline Spline; - typedef Genfun::GaudiMathImplementation::GSLSplineDeriv SplineDeriv; + typedef Genfun::GaudiMathImplementation::SplineBase SimpleSpline; + typedef Genfun::GaudiMathImplementation::GSLSpline Spline; + typedef Genfun::GaudiMathImplementation::GSLSplineDeriv SplineDeriv; typedef Genfun::GaudiMathImplementation::GSLSplineDeriv2 SplineDeriv2; - typedef Genfun::GaudiMathImplementation::GSLSplineInteg SplineInteg; + typedef Genfun::GaudiMathImplementation::GSLSplineInteg SplineInteg; } // end of namespace diff --git a/GaudiGSL/GaudiMath/Integral.h b/GaudiGSL/GaudiMath/Integral.h index f2107579be0071dfe99b0b496a4d703d12a57e1b..8b50c8f000b157c60e122956385cad641c8b7156 100644 --- a/GaudiGSL/GaudiMath/Integral.h +++ b/GaudiGSL/GaudiMath/Integral.h @@ -20,7 +20,7 @@ namespace GaudiMath { GAUDI_API double Integral( const Genfun::AbsFunction& function, const double a, const double b, - const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, + const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, const GaudiMath::Integration::KronrodRule rule = GaudiMath::Integration::Default, const double epsabs = 1.e-10, const double epsrel = 1.e-7, const size_t size = 1000 ); @@ -35,7 +35,7 @@ namespace GaudiMath GAUDI_API double Integral( const Genfun::AbsFunction& function, const GaudiMath::Integration::Inf a, const double b, const double epsabs = 1e-9, const double epsrel = 1.e-6, const size_t size = 1000 ); - GAUDI_API double Integral( const Genfun::AbsFunction& function, + GAUDI_API double Integral( const Genfun::AbsFunction& function, const GaudiMath::Integration::Inf a = GaudiMath::Integration::Infinity, const GaudiMath::Integration::Inf b = GaudiMath::Integration::Infinity, const double epsabs = 1e-9, const double epsrel = 1.e-6, const size_t size = 1000 ); diff --git a/GaudiGSL/GaudiMath/Interpolation.h b/GaudiGSL/GaudiMath/Interpolation.h index e0391ee0660e64ed6d80384bcd8976f212fff790..e5d60c736caa6aba85feb516afee94997d711424 100644 --- a/GaudiGSL/GaudiMath/Interpolation.h +++ b/GaudiGSL/GaudiMath/Interpolation.h @@ -21,9 +21,9 @@ namespace GaudiMath Akima_Periodic // Akima spline with periodic boundary conditions }; - StatusCode parse( Type&, const std::string& ); - std::string toString( const Type& ); - std::ostream& toStream( const Type&, std::ostream& ); + StatusCode parse( Type&, const std::string& ); + std::string toString( const Type& ); + std::ostream& toStream( const Type&, std::ostream& ); inline std::ostream& operator<<( std::ostream& os, const Type& t ) { return toStream( t, os ); } } // end of namespace Interpolation diff --git a/GaudiGSL/GaudiMath/NumericalDefiniteIntegral.h b/GaudiGSL/GaudiMath/NumericalDefiniteIntegral.h index 7efe28fc1bb48a35c5f5fad3f3d5a7444c634740..8e190831db345043d1397acd31c27e4d0dea7d33 100644 --- a/GaudiGSL/GaudiMath/NumericalDefiniteIntegral.h +++ b/GaudiGSL/GaudiMath/NumericalDefiniteIntegral.h @@ -145,7 +145,7 @@ namespace Genfun * @param size maximal number of bisections for adaptive integration */ NumericalDefiniteIntegral( const AbsFunction& function, const size_t index, const double a, const double b, - const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, + const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, const GaudiMath::Integration::KronrodRule rule = GaudiMath::Integration::Default, const double epsabs = 1.e-10, const double epsrel = 1.e-7, const size_t size = 1000 ); @@ -354,14 +354,14 @@ namespace Genfun private: std::unique_ptr<const AbsFunction> m_function; - size_t m_DIM = 0; - size_t m_index; + size_t m_DIM = 0; + size_t m_index; double m_a = -std::numeric_limits<double>::infinity(); double m_b = std::numeric_limits<double>::infinity(); - GaudiMath::Integration::Type m_type; - GaudiMath::Integration::Category m_category; + GaudiMath::Integration::Type m_type; + GaudiMath::Integration::Category m_category; GaudiMath::Integration::KronrodRule m_rule; Points m_points; diff --git a/GaudiGSL/GaudiMath/NumericalDerivative.h b/GaudiGSL/GaudiMath/NumericalDerivative.h index 53ea05cc216a6df31c347be6de9a712f588d1264..e513f01575f718074aa090f321085ed71f2825b1 100644 --- a/GaudiGSL/GaudiMath/NumericalDerivative.h +++ b/GaudiGSL/GaudiMath/NumericalDerivative.h @@ -136,13 +136,13 @@ namespace Genfun private: std::unique_ptr<const AbsFunction> m_function; - size_t m_index; - size_t m_DIM; - Type m_type; + size_t m_index; + size_t m_DIM; + Type m_type; // mutable Argument m_argument; - mutable double m_result; - mutable double m_error; + mutable double m_result; + mutable double m_error; }; /// From CLHEP/GenericFunctions FUNCTION_OBJECT_IMP( NumericalDerivative ) diff --git a/GaudiGSL/GaudiMath/NumericalIndefiniteIntegral.h b/GaudiGSL/GaudiMath/NumericalIndefiniteIntegral.h index 31729e68cf6c0c7435d046888b0dff31fb0d791e..5d0f4527909f2413299272a6b5809464fba885fd 100644 --- a/GaudiGSL/GaudiMath/NumericalIndefiniteIntegral.h +++ b/GaudiGSL/GaudiMath/NumericalIndefiniteIntegral.h @@ -161,8 +161,8 @@ namespace Genfun */ NumericalIndefiniteIntegral( const AbsFunction& function, const size_t index, const double a, - const GaudiMath::Integration::Limit limit = GaudiMath::Integration::VariableHighLimit, - const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, + const GaudiMath::Integration::Limit limit = GaudiMath::Integration::VariableHighLimit, + const GaudiMath::Integration::Type type = GaudiMath::Integration::Adaptive, const GaudiMath::Integration::KronrodRule rule = GaudiMath::Integration::Default, const double epsabs = 1e-10, const double epsrel = 1.e-7, const size_t size = 1000 ); @@ -341,14 +341,14 @@ namespace Genfun private: std::unique_ptr<const AbsFunction> m_function; - size_t m_DIM; - size_t m_index; + size_t m_DIM; + size_t m_index; double m_a; - GaudiMath::Integration::Limit m_limit; - GaudiMath::Integration::Type m_type; - GaudiMath::Integration::Category m_category; + GaudiMath::Integration::Limit m_limit; + GaudiMath::Integration::Type m_type; + GaudiMath::Integration::Category m_category; GaudiMath::Integration::KronrodRule m_rule; Points m_points; diff --git a/GaudiGSL/GaudiMath/Splines.h b/GaudiGSL/GaudiMath/Splines.h index 90882e72eb8f21769b5a63d996a1100e9221d609..22fabc21fdf077ea134987c4ace2ffbdf58cffde 100644 --- a/GaudiGSL/GaudiMath/Splines.h +++ b/GaudiGSL/GaudiMath/Splines.h @@ -135,8 +135,8 @@ namespace Genfun private: std::vector<double> m_x; std::vector<double> m_y; - mutable std::unique_ptr<gsl_spline, details::gsl_deleter> m_spline; //! transient - mutable std::unique_ptr<gsl_interp_accel, details::gsl_deleter> m_accel; //! transient + mutable std::unique_ptr<gsl_spline, details::gsl_deleter> m_spline; //! transient + mutable std::unique_ptr<gsl_interp_accel, details::gsl_deleter> m_accel; //! transient GaudiMath::Interpolation::Type m_type; }; @@ -658,7 +658,7 @@ namespace Genfun private: // the actual spline function SplineBase m_spline; - double m_low; + double m_low; }; // mandatory macro from CLHEP/GenericFunctions FUNCTION_OBJECT_IMP( GSLSplineInteg ) diff --git a/GaudiGSL/src/Components/EqSolver.cpp b/GaudiGSL/src/Components/EqSolver.cpp index b7224e69fd9bb01bcd25e0188f1cc3828adf2684..28aa2174a6c70e7bb4f0905671b6a5259bbb7ca9 100644 --- a/GaudiGSL/src/Components/EqSolver.cpp +++ b/GaudiGSL/src/Components/EqSolver.cpp @@ -65,9 +65,9 @@ namespace */ int fun_gsl( const gsl_vector* v, void* params, gsl_vector* f ) { - EqSolver::EqSolverMisc* local = static_cast<EqSolver::EqSolverMisc*>( params ); - const EqSolver::Equations& eqs = *( local->equations() ); - Argument& arg = local->argument(); + EqSolver::EqSolverMisc* local = static_cast<EqSolver::EqSolverMisc*>( params ); + const EqSolver::Equations& eqs = *( local->equations() ); + Argument& arg = local->argument(); for ( unsigned int i = 0; i < v->size; ++i ) { arg[i] = gsl_vector_get( v, i ); @@ -85,7 +85,7 @@ namespace { EqSolver::EqSolverMisc* local = static_cast<EqSolver::EqSolverMisc*>( params ); const EqSolver::Jacobi& jac = local->jacobi(); - Argument& arg = local->argument(); + Argument& arg = local->argument(); for ( unsigned int i = 0; i < v->size; ++i ) { arg[i] = gsl_vector_get( v, i ); @@ -105,10 +105,10 @@ namespace */ int fdfun_gsl( const gsl_vector* v, void* params, gsl_vector* f, gsl_matrix* df ) { - EqSolver::EqSolverMisc* local = static_cast<EqSolver::EqSolverMisc*>( params ); - const EqSolver::Equations& eqs = *( local->equations() ); - const EqSolver::Jacobi& jac = local->jacobi(); - Argument& arg = local->argument(); + EqSolver::EqSolverMisc* local = static_cast<EqSolver::EqSolverMisc*>( params ); + const EqSolver::Equations& eqs = *( local->equations() ); + const EqSolver::Jacobi& jac = local->jacobi(); + Argument& arg = local->argument(); for ( unsigned int i = 0; i < v->size; ++i ) { arg[i] = gsl_vector_get( v, i ); @@ -136,12 +136,12 @@ StatusCode EqSolver::solver( const Equations& funcs, Arg& arg ) const using namespace Genfun; gsl_vector_view vect = gsl_vector_view_array( &arg[0], arg.dimension() ); - EqSolverMisc local( funcs, arg ); + EqSolverMisc local( funcs, arg ); - const gsl_multiroot_fdfsolver_type* T = m_type; - gsl_multiroot_fdfsolver* s = nullptr; - int status = 0; - size_t iter = 0; + const gsl_multiroot_fdfsolver_type* T = m_type; + gsl_multiroot_fdfsolver* s = nullptr; + int status = 0; + size_t iter = 0; gsl_multiroot_function_fdf function; diff --git a/GaudiGSL/src/Components/EqSolver.h b/GaudiGSL/src/Components/EqSolver.h index cfa323db214a90c496891a0e908dafdfad069179..af0594c9dd7fd8caffe1de437764bfe37934a262 100644 --- a/GaudiGSL/src/Components/EqSolver.h +++ b/GaudiGSL/src/Components/EqSolver.h @@ -47,10 +47,10 @@ public: ~EqSolverMisc(); public: - inline const Arg& argument() const { return m_argum; } - inline Arg& argument() { return m_argum; } + inline const Arg& argument() const { return m_argum; } + inline Arg& argument() { return m_argum; } inline const Equations* equations() const { return m_eqs; } - inline const Jacobi& jacobi() const { return m_jac; } + inline const Jacobi& jacobi() const { return m_jac; } private: // default constructor is disabled @@ -61,9 +61,9 @@ public: EqSolverMisc& operator=( const EqSolverMisc& ) = delete; private: - Arg m_argum; + Arg m_argum; const Equations* m_eqs; - Jacobi m_jac; + Jacobi m_jac; }; /// Inherited constructor diff --git a/GaudiGSL/src/Components/FuncMinimum.cpp b/GaudiGSL/src/Components/FuncMinimum.cpp index dc88a57f2d3656ebf32fc464c53bca5fb7af66f8..15ed797efefb023545fa7a1130b7d854f5d0a14c 100644 --- a/GaudiGSL/src/Components/FuncMinimum.cpp +++ b/GaudiGSL/src/Components/FuncMinimum.cpp @@ -49,8 +49,8 @@ namespace double fun_gsl( const gsl_vector* v, void* params ) { FuncMinimum::FuncMinimumMisc* local = static_cast<FuncMinimum::FuncMinimumMisc*>( params ); - const FuncMinimum::GenFunc& eq = *( local->equation() ); - Argument& arg = local->argument(); + const FuncMinimum::GenFunc& eq = *( local->equation() ); + Argument& arg = local->argument(); for ( unsigned int i = 0; i < v->size; ++i ) { arg[i] = gsl_vector_get( v, i ); @@ -63,8 +63,8 @@ namespace void dfun_gsl( const gsl_vector* v, void* params, gsl_vector* df ) { FuncMinimum::FuncMinimumMisc* local = static_cast<FuncMinimum::FuncMinimumMisc*>( params ); - const FuncMinimum::Gradient& grad = local->gradient(); - Argument& arg = local->argument(); + const FuncMinimum::Gradient& grad = local->gradient(); + Argument& arg = local->argument(); for ( unsigned int i = 0; i < v->size; ++i ) { arg[i] = gsl_vector_get( v, i ); @@ -106,9 +106,9 @@ StatusCode FuncMinimum::minimum( const IFuncMinimum::GenFunc& func, IFuncMinimum function.n = vect.vector.size; function.params = (void*)&local; - size_t iter = 0; - int status = 0; - const gsl_multimin_fdfminimizer_type* T = m_type; + size_t iter = 0; + int status = 0; + const gsl_multimin_fdfminimizer_type* T = m_type; gsl_multimin_fdfminimizer* s; diff --git a/GaudiGSL/src/Components/FuncMinimum.h b/GaudiGSL/src/Components/FuncMinimum.h index 6d97cf082ea1915e5ec6ab57b2215cf27efe3ebe..f3907900975090647b78d1e84dcb0730660348d3 100644 --- a/GaudiGSL/src/Components/FuncMinimum.h +++ b/GaudiGSL/src/Components/FuncMinimum.h @@ -51,9 +51,9 @@ public: FuncMinimumMisc( const GenFunc& func, Arg& arg ); public: - inline const Arg& argument() const { return m_argum; } - inline Arg& argument() { return m_argum; } - inline const GenFunc* equation() const { return m_eq; } + inline const Arg& argument() const { return m_argum; } + inline Arg& argument() { return m_argum; } + inline const GenFunc* equation() const { return m_eq; } inline const Gradient& gradient() const { return m_grad; } private: @@ -65,9 +65,9 @@ public: FuncMinimumMisc& operator=( const FuncMinimumMisc& ) = delete; private: - Arg m_argum; + Arg m_argum; const GenFunc* m_eq; - Gradient m_grad; + Gradient m_grad; }; /// Inherited constructor diff --git a/GaudiGSL/src/Components/GslSvc.cpp b/GaudiGSL/src/Components/GslSvc.cpp index 33fbaff72fbda2cec0cbf13f1d4e50521d701e1a..2d4d75ebb77e2dc19b1bc90db011c46e6fa657e2 100644 --- a/GaudiGSL/src/Components/GslSvc.cpp +++ b/GaudiGSL/src/Components/GslSvc.cpp @@ -80,8 +80,8 @@ StatusCode GslSvc::initialize() return StatusCode::FAILURE; } for ( const auto& it : m_handlersTypeNames ) { - auto pos = it.find( '/' ); - IGslErrorHandler* eh = nullptr; + auto pos = it.find( '/' ); + IGslErrorHandler* eh = nullptr; if ( pos != std::string::npos ) { sc = toolsvc->retrieveTool( it.substr( 0, pos ), it.substr( pos + 1 ), eh, this ); } else { diff --git a/GaudiGSL/src/Components/GslSvc.h b/GaudiGSL/src/Components/GslSvc.h index 9563413a4fac6f97bbf981badf3bf8cda137801e..81080fe7b53044bd946ca72f980b8ab7a65bd6b3 100644 --- a/GaudiGSL/src/Components/GslSvc.h +++ b/GaudiGSL/src/Components/GslSvc.h @@ -133,9 +133,9 @@ public: StatusCode finalize() override; private: - Gaudi::Property<std::string> m_errorPolicy{this, "ErrorPolicy", "GSL", ""}; + Gaudi::Property<std::string> m_errorPolicy{this, "ErrorPolicy", "GSL", ""}; Gaudi::Property<std::vector<std::string>> m_handlersTypeNames{this, "Handlers", {}, ""}; - Gaudi::Property<std::vector<int>> m_ignore{this, "IgnoreCodes", {}, "codes to be ignored"}; + Gaudi::Property<std::vector<int>> m_ignore{this, "IgnoreCodes", {}, "codes to be ignored"}; std::vector<IGslErrorHandler*> m_handlers; }; diff --git a/GaudiGSL/src/Lib/GSLFunAdapters.cpp b/GaudiGSL/src/Lib/GSLFunAdapters.cpp index 6b8dbda73bc3eef446ed74cf1909d374d33d1904..821a939d736069abb5d72732c584a33825b3760b 100644 --- a/GaudiGSL/src/Lib/GSLFunAdapters.cpp +++ b/GaudiGSL/src/Lib/GSLFunAdapters.cpp @@ -98,7 +98,7 @@ namespace Genfun const gsl_mode_t& GSLFunctionWithMode::mode() const { return *m_mode; } GSLFunctionWithModeAndError::GSLFunctionWithModeAndError( GSLFunctionWithModeAndError::Function function, - const gsl_mode_t& mod ) + const gsl_mode_t& mod ) : AbsFunction() , m_function( function ) , m_mode( std::make_unique<gsl_mode_t>( mod ) ) diff --git a/GaudiGSL/src/Lib/Helpers.cpp b/GaudiGSL/src/Lib/Helpers.cpp index c61f69f7ede98aa5a38227650b9ef05c8d92820c..2739e0187974c734705b46b55e4d3b1fd43961c1 100644 --- a/GaudiGSL/src/Lib/Helpers.cpp +++ b/GaudiGSL/src/Lib/Helpers.cpp @@ -34,8 +34,8 @@ namespace Genfun GSL_Helper* aux = (GSL_Helper*)params; // decode parameters const Genfun::AbsFunction& function = aux->m_function; - const size_t index = aux->m_index; - Genfun::Argument& argument = aux->m_argument; + const size_t index = aux->m_index; + Genfun::Argument& argument = aux->m_argument; // save the current value of argument const double x_prev = argument[index]; // modify the argument diff --git a/GaudiGSL/src/Lib/Helpers.h b/GaudiGSL/src/Lib/Helpers.h index 1d77b543900a3980a874f244ab2a1dbe6ba98371..703056c0aa159989b3d71f35d252da75c0d5b6d0 100644 --- a/GaudiGSL/src/Lib/Helpers.h +++ b/GaudiGSL/src/Lib/Helpers.h @@ -31,8 +31,8 @@ namespace Genfun public: const Genfun::AbsFunction& m_function; - Genfun::Argument& m_argument; - size_t m_index; + Genfun::Argument& m_argument; + size_t m_index; }; double GSL_Adaptor( double x, void* params ); diff --git a/GaudiGSL/src/Lib/NumericalDefiniteIntegral.cpp b/GaudiGSL/src/Lib/NumericalDefiniteIntegral.cpp index d8c6a367b45f5f02b7b9bfabccea9b81fcc2be42..2468e3939e270e9dc393300723260f64b8746830 100644 --- a/GaudiGSL/src/Lib/NumericalDefiniteIntegral.cpp +++ b/GaudiGSL/src/Lib/NumericalDefiniteIntegral.cpp @@ -101,7 +101,7 @@ namespace Genfun */ NumericalDefiniteIntegral::NumericalDefiniteIntegral( const AbsFunction& function, const size_t index, const double a, const double b, - const GaudiMath::Integration::Type type, + const GaudiMath::Integration::Type type, const GaudiMath::Integration::KronrodRule rule, const double epsabs, const double epsrel, const size_t size ) : m_function( function.clone() ) diff --git a/GaudiGSL/src/Lib/NumericalDerivative.cpp b/GaudiGSL/src/Lib/NumericalDerivative.cpp index ba09d7c5515ca69c22d9a5e804147a621cac862a..eb8a9a695d15edea15193c3621c34c4989151a3a 100644 --- a/GaudiGSL/src/Lib/NumericalDerivative.cpp +++ b/GaudiGSL/src/Lib/NumericalDerivative.cpp @@ -129,8 +129,8 @@ namespace Genfun F.function = &GSL_Adaptor; F.params = &helper; - double x = argument[m_index]; - int ierrno = 0; + double x = argument[m_index]; + int ierrno = 0; switch ( type() ) { case Central: ierrno = gsl_diff_central( &F, x, &m_result, &m_error ); diff --git a/GaudiGSL/src/Lib/NumericalIndefiniteIntegral.cpp b/GaudiGSL/src/Lib/NumericalIndefiniteIntegral.cpp index dbc0850b9e7530c8c2391e0e6854d2e5b152cd06..47e4705126653172cc65227ff532c9b8dbe11245 100644 --- a/GaudiGSL/src/Lib/NumericalIndefiniteIntegral.cpp +++ b/GaudiGSL/src/Lib/NumericalIndefiniteIntegral.cpp @@ -73,7 +73,7 @@ namespace Genfun // ======================================================================== NumericalIndefiniteIntegral::NumericalIndefiniteIntegral( const AbsFunction& function, const size_t index, const double a, const GaudiMath::Integration::Limit limit, - const GaudiMath::Integration::Type type, + const GaudiMath::Integration::Type type, const GaudiMath::Integration::KronrodRule rule, const double epsabs, const double epsrel, const size_t size ) @@ -425,8 +425,8 @@ namespace Genfun const double a = std::min( m_a, x ); const double b = std::max( m_a, x ); - size_t neval = 0; - int ierror = gsl_integration_qng( F->fn, a, b, m_epsabs, m_epsrel, &m_result, &m_error, &neval ); + size_t neval = 0; + int ierror = gsl_integration_qng( F->fn, a, b, m_epsabs, m_epsrel, &m_result, &m_error, &neval ); if ( ierror ) { gsl_error( "NumericalIndefiniteIntegral::QNG ", __FILE__, __LINE__, ierror ); diff --git a/GaudiGSL/src/Tests/2DoubleFuncTest.cpp b/GaudiGSL/src/Tests/2DoubleFuncTest.cpp index e1e699088e88c44ded9db4caeb30512f6654c9e5..13eee43a1fcdd4c4153d8e48daac916bb8af3d4f 100644 --- a/GaudiGSL/src/Tests/2DoubleFuncTest.cpp +++ b/GaudiGSL/src/Tests/2DoubleFuncTest.cpp @@ -25,7 +25,7 @@ int main() { const GaudiMath::Function& mypow = GaudiMath::adapter( pow ); - Genfun::Argument arg( 2 ); + Genfun::Argument arg( 2 ); for ( double x = 0; x < 10; ++x ) { for ( double y = 0; y < 10; ++y ) { arg[0] = x; diff --git a/GaudiGSL/src/Tests/3DoubleFuncTest.cpp b/GaudiGSL/src/Tests/3DoubleFuncTest.cpp index 425b2016f9981371491308bd3cb2fb6260d4b33d..6441185304ebbd9e7177c407a83c7f90d999adb5 100644 --- a/GaudiGSL/src/Tests/3DoubleFuncTest.cpp +++ b/GaudiGSL/src/Tests/3DoubleFuncTest.cpp @@ -27,7 +27,7 @@ double sum( double x, double y, double z ) { return 3 * x * x - 5 * y * y + 3 * int main() { const GaudiMath::Function& mysum = GaudiMath::adapter( sum ); - Genfun::Argument arg( 3 ); + Genfun::Argument arg( 3 ); std::string format( "x=%6.5f y=%6.5f z=%6.5f mysum=%+.10f" ); format += " sum=%+.10f sum-mysum=%+.10f \n"; diff --git a/GaudiGSL/src/Tests/DerivativeTest.cpp b/GaudiGSL/src/Tests/DerivativeTest.cpp index d51ef8b08e3dcde95bc153dbe5f93f542dd8e8cc..8e101b5696739c4ad04a3b15c4e568175fa53797 100644 --- a/GaudiGSL/src/Tests/DerivativeTest.cpp +++ b/GaudiGSL/src/Tests/DerivativeTest.cpp @@ -37,9 +37,9 @@ int main() std::cout << " Test for numerical differentiation of Genfun::Sin(x) " << std::endl; - const GaudiMath::Function& mysin = Genfun::Sin(); + const GaudiMath::Function& mysin = Genfun::Sin(); const GaudiMath::Derivative& prim1 = GaudiMath::Derivative( mysin, 0 ); - const GaudiMath::Function& prim = prim1; + const GaudiMath::Function& prim = prim1; for ( double x = -90 * Gaudi::Units::degree; x <= 180 * Gaudi::Units::degree; x += 10 * Gaudi::Units::degree ) { double value = prim( x ); diff --git a/GaudiGSL/src/Tests/PFuncTest.cpp b/GaudiGSL/src/Tests/PFuncTest.cpp index 5d94b9d275cecaf6cf9bfed0035aabeaa6ef6925..3f3d8d5f36b0ea7b9c94f3ee32b6423819109754 100644 --- a/GaudiGSL/src/Tests/PFuncTest.cpp +++ b/GaudiGSL/src/Tests/PFuncTest.cpp @@ -28,7 +28,7 @@ double fun( const std::vector<double>& x ) { return 3 * x[0] * x[0] + 5 * x[1] * int main() { const GaudiMath::Function& myfun = GaudiMath::adapter( 2, &fun ); - Genfun::Argument arg( myfun.dimensionality() ); + Genfun::Argument arg( myfun.dimensionality() ); std::string format( "x[0]=%6.5f x[1]=%6.5f myfun=%+.10f" ); format += " fun=%+.10f fun-myfun=%+.10f \n"; diff --git a/GaudiHive/GaudiHive/EventSchedulingState.h b/GaudiHive/GaudiHive/EventSchedulingState.h index ef92b52d1bc86baa0094a47155193c1010f6cd30..6795b26034a71b16270f250b32e4e01652471899 100644 --- a/GaudiHive/GaudiHive/EventSchedulingState.h +++ b/GaudiHive/GaudiHive/EventSchedulingState.h @@ -18,7 +18,7 @@ public: void algoFinished(); void algoStarts( unsigned int& index ); bool hasStarted( unsigned int& index ) const; - bool hasFinished() const { return ( m_algosFinished == m_numberOfAlgos ); } + bool hasFinished() const { return ( m_algosFinished == m_numberOfAlgos ); } const state_type& state() const { return m_eventState; } void update_state( unsigned int& product_index ); diff --git a/GaudiHive/options/AvalancheSchedulerSimpleTest.py b/GaudiHive/options/AvalancheSchedulerSimpleTest.py index 4935deb0e34aeb366d544f862e949d78e0f60ffa..a6e6c6ed9ae0d7e5ff8669e68628a45f569ca4a4 100644 --- a/GaudiHive/options/AvalancheSchedulerSimpleTest.py +++ b/GaudiHive/options/AvalancheSchedulerSimpleTest.py @@ -39,7 +39,7 @@ evtslots = 23 evtMax = 50 cardinality = 10 threads = 10 -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # The configuration of the whiteboard ------------------------------------------ # It is useful to call it EventDataSvc to replace the usual data service with @@ -48,7 +48,7 @@ threads = 10 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Event Loop Manager ----------------------------------------------------------- # It's called slim since it has less functionalities overall than the good-old @@ -57,7 +57,7 @@ whiteboard = HiveWhiteBoard("EventDataSvc", slimeventloopmgr = HiveSlimEventLoopMgr( SchedulerName="AvalancheSchedulerSvc", OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # ForwardScheduler ------------------------------------------------------------- # We just decide how many algorithms in flight we want to have and how many @@ -67,13 +67,13 @@ slimeventloopmgr = HiveSlimEventLoopMgr( scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads, OutputLevel=WARNING) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Algo Resource Pool ----------------------------------------------------------- # Nothing special here, we just set the debug level. AlgResourcePool(OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Set up of the crunchers, daily business -------------------------------------- @@ -112,4 +112,4 @@ ApplicationMgr(EvtMax=evtMax, TopAlg=[a1, a2, a3, a4, ctrp, ctrd], MessageSvcType="InertMessageSvc") -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- diff --git a/GaudiHive/options/BrunelScenarioForwardScheduler.py b/GaudiHive/options/BrunelScenarioForwardScheduler.py index ef0ce9f0c5b285506b24ccfbb5f6bd9d6fe15fe4..f8724f6f51172566f1d5aa78319491d450d952d5 100644 --- a/GaudiHive/options/BrunelScenarioForwardScheduler.py +++ b/GaudiHive/options/BrunelScenarioForwardScheduler.py @@ -1,7 +1,7 @@ from Gaudi.Configuration import * from Configurables import GaudiExamplesCommonConf, CPUCruncher, HiveSlimEventLoopMgr, HiveWhiteBoard, ForwardSchedulerSvc -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Metaconfig NUMBEROFEVENTS = 23 @@ -21,7 +21,7 @@ Scale = SCALE Verbosity = VERBOSITY -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- def load_brunel_scenario(filename): diff --git a/GaudiHive/options/ForwardSchedulerSimpleTest.py b/GaudiHive/options/ForwardSchedulerSimpleTest.py index 533a8ba06faf7b8bb04d34ec28aa62fb3d60d9e7..ee08bff590a438b5aeb5f7634f486f30fcfe8a11 100644 --- a/GaudiHive/options/ForwardSchedulerSimpleTest.py +++ b/GaudiHive/options/ForwardSchedulerSimpleTest.py @@ -39,7 +39,7 @@ evtslots = 23 evtMax = 50 cardinality = 10 algosInFlight = 10 -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # The configuration of the whiteboard ------------------------------------------ # It is useful to call it EventDataSvc to replace the usual data service with @@ -48,7 +48,7 @@ algosInFlight = 10 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Event Loop Manager ----------------------------------------------------------- # It's called slim since it has less functionalities overall than the good-old @@ -56,7 +56,7 @@ whiteboard = HiveWhiteBoard("EventDataSvc", slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # ForwardScheduler ------------------------------------------------------------- # We just decide how many algorithms in flight we want to have and how many @@ -67,13 +67,13 @@ scheduler = ForwardSchedulerSvc(MaxAlgosInFlight=algosInFlight, ThreadPoolSize=algosInFlight, OutputLevel=WARNING) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Algo Resource Pool ----------------------------------------------------------- # Nothing special here, we just set the debug level. AlgResourcePool(OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Set up of the crunchers, daily business -------------------------------------- @@ -121,4 +121,4 @@ ApplicationMgr(EvtMax=evtMax, TopAlg=[a1, a2, a3, a4, ctrp, ctrd], MessageSvcType="InertMessageSvc") -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- diff --git a/GaudiHive/options/HiveAlgSequencer.py b/GaudiHive/options/HiveAlgSequencer.py index 3dbe744ae3ccbe346c03f4c6c552420296ad5056..2193a9cd4b30b0538d0e09a6e43db6011e23a8d6 100644 --- a/GaudiHive/options/HiveAlgSequencer.py +++ b/GaudiHive/options/HiveAlgSequencer.py @@ -1,6 +1,6 @@ ############################################################### # Job options file -#============================================================== +# ============================================================== from Gaudi.Configuration import * from Configurables import ParentAlg,\ @@ -16,9 +16,9 @@ from Configurables import ParentAlg,\ from Configurables import GaudiExamplesCommonConf GaudiExamplesCommonConf() -#-------------------------------------------------------------- +# -------------------------------------------------------------- # Testing Sequencers -#-------------------------------------------------------------- +# -------------------------------------------------------------- p1 = Prescaler('Prescaler1', PercentPass=50., OutputLevel=INFO) p2 = Prescaler('Prescaler2', PercentPass=10., OutputLevel=INFO) h = HelloWorld(OutputLevel=INFO) @@ -28,9 +28,9 @@ s1 = Sequencer('Sequence1', Members=[p1, h, c1]) s2 = Sequencer('Sequence2', Members=[p2, h, c2]) top = Sequencer('TopSequence', Members=[s1, s2], StopOverride=True) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Testing the new GaudiSequencer -#----------------------------------------------------------------- +# ----------------------------------------------------------------- sand = GaudiSequencer('ANDSequence', Members=[HelloWorld('ANDHelloWorld'), EventCounter('ANDCounter')], @@ -41,19 +41,19 @@ sor = GaudiSequencer('ORSequence', MeasureTime=1, ModeOR=1) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- topAlgList = [ParentAlg(), StopperAlg(StopCount=20), top, sand, sor] -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Resource Pool AlgResourcePool(OutputLevel=INFO) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Event Loop Manager slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # Scheduler # configured to be sequential: 1 evt in flight, no deps, 1 algo in flight scheduler = ForwardSchedulerSvc(MaxEventsInFlight=1, @@ -61,12 +61,12 @@ scheduler = ForwardSchedulerSvc(MaxEventsInFlight=1, OutputLevel=WARNING, AlgosDependencies=[]) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- # WhiteBoard whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=1) -#----------------------------------------------------------------- +# ----------------------------------------------------------------- ApplicationMgr(TopAlg=topAlgList, EvtMax=1, diff --git a/GaudiHive/options/MiniBrunelScenario.py b/GaudiHive/options/MiniBrunelScenario.py index 5d3644459632f720e0fab89f11cec8495aa89766..25b9260723f6ab5c190073f9ee63ad2a4276f009 100644 --- a/GaudiHive/options/MiniBrunelScenario.py +++ b/GaudiHive/options/MiniBrunelScenario.py @@ -17,7 +17,7 @@ Json file format: "runtimes_wall" : [0.05] }, ''' -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Metaconfig NUMBEROFEVENTS = 828 diff --git a/GaudiHive/options/SequentialAlgSequencerTest.py b/GaudiHive/options/SequentialAlgSequencerTest.py index b7c7673e3d014417a58c4fe082df4d55bba8affa..9326a395ffb7887f51fd1f172ddd7dfd629a3132 100644 --- a/GaudiHive/options/SequentialAlgSequencerTest.py +++ b/GaudiHive/options/SequentialAlgSequencerTest.py @@ -12,7 +12,7 @@ evtslots = 5 evtMax = 20 cardinality = 5 algosInFlight = 10 -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # The configuration of the whiteboard ------------------------------------------ # It is useful to call it EventDataSvc to replace the usual data service with @@ -21,7 +21,7 @@ algosInFlight = 10 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Event Loop Manager ----------------------------------------------------------- # It's called slim since it has less functionalities overall than the good-old @@ -29,7 +29,7 @@ whiteboard = HiveWhiteBoard("EventDataSvc", slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # ForwardScheduler ------------------------------------------------------------- # We just decide how many algorithms in flight we want to have and how many @@ -39,13 +39,13 @@ slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=DEBUG) scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight, OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Algo Resource Pool ----------------------------------------------------------- # Nothing special here, we just set the debug level. AlgResourcePool(OutputLevel=DEBUG) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Set up of the crunchers, daily business -------------------------------------- diff --git a/GaudiHive/profiling/plotSpeedup.py b/GaudiHive/profiling/plotSpeedup.py index 6e04e81ebba6905a670d131478289ffa434e5a81..c4d13c820b9087708d893cdf79dc70b08781d81b 100644 --- a/GaudiHive/profiling/plotSpeedup.py +++ b/GaudiHive/profiling/plotSpeedup.py @@ -127,7 +127,7 @@ def make_plot(runtimes, cloneFlag): canvas.Print(plotname) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- runtimes = getRuntimes() make_plot(runtimes, True) diff --git a/GaudiHive/profiling/plotSpeedupsPyRoot.py b/GaudiHive/profiling/plotSpeedupsPyRoot.py index 2cce464f03ef79de3457e91aed92cb3aae97c1ec..fdda121c033361d55f36c3b84301473534e1be5c 100644 --- a/GaudiHive/profiling/plotSpeedupsPyRoot.py +++ b/GaudiHive/profiling/plotSpeedupsPyRoot.py @@ -48,7 +48,7 @@ HtCoreWeight = 0.4 LabelsFont = 12 LabelsSize = .6 -#-------------------- +# -------------------- def scaleCores(n_threads): @@ -58,7 +58,7 @@ def scaleCores(n_threads): effective_n_threads = PhCores + ht_cores * HtCoreWeight return effective_n_threads -#-------------------- +# -------------------- def getText(x, y, text, scale, angle, colour, font): @@ -68,7 +68,7 @@ def getText(x, y, text, scale, angle, colour, font): lat.SetTextAngle(angle) return lat -#-------------------- +# -------------------- def formatGraphs(graph, graphc): @@ -83,13 +83,13 @@ def formatGraphs(graph, graphc): g.SetMarkerColor(LineColours[graph_counter]) graph_counter += 1 -#-------------------- +# -------------------- def createFname(neif, nt, cFlag): return fname_template % (neif, nt, cFlag) -#-------------------- +# -------------------- def xtractTiming(neif, nt, cFlag): @@ -106,7 +106,7 @@ def xtractTiming(neif, nt, cFlag): seconds = xtractTiming(neif, nts[nts.index(nt) - 1], cFlag) return seconds -#-------------------- +# -------------------- import sys diff --git a/GaudiHive/src/AlgResourcePool.cpp b/GaudiHive/src/AlgResourcePool.cpp index 53521a90c89fd6f31318d6480b181441df2574c7..6e897fa8135caceb92208002e91d6aa2fb37d15a 100644 --- a/GaudiHive/src/AlgResourcePool.cpp +++ b/GaudiHive/src/AlgResourcePool.cpp @@ -46,7 +46,7 @@ StatusCode AlgResourcePool::initialize() if ( m_topAlgNames.value().empty() ) { info() << "TopAlg list empty. Recovering the one of Application Manager" << endmsg; const Gaudi::Utils::TypeNameString appMgrName( "ApplicationMgr/ApplicationMgr" ); - SmartIF<IProperty> appMgrProps( serviceLocator()->service( appMgrName ) ); + SmartIF<IProperty> appMgrProps( serviceLocator()->service( appMgrName ) ); m_topAlgNames.assign( appMgrProps->getProperty( "TopAlg" ) ); } @@ -54,9 +54,9 @@ StatusCode AlgResourcePool::initialize() // (Only ForwardScheduler requires assembling the graph in AlgResourcePool. // The AvalancheScheduler relies on the graph that is assembled by the PrecedenceSvc) if ( serviceLocator()->existsService( "ForwardSchedulerSvc" ) ) { - const std::string& name = "ControlFlowGraph"; - SmartIF<ISvcLocator> svc = serviceLocator(); - m_CFGraph = new concurrency::recursive_CF::ControlFlowGraph( name, svc ); + const std::string& name = "ControlFlowGraph"; + SmartIF<ISvcLocator> svc = serviceLocator(); + m_CFGraph = new concurrency::recursive_CF::ControlFlowGraph( name, svc ); } sc = decodeTopAlgs(); @@ -92,8 +92,8 @@ StatusCode AlgResourcePool::acquireAlgorithm( const std::string& name, IAlgorith { std::hash<std::string> hash_function; - size_t algo_id = hash_function( name ); - auto itQueueIAlgPtr = m_algqueue_map.find( algo_id ); + size_t algo_id = hash_function( name ); + auto itQueueIAlgPtr = m_algqueue_map.find( algo_id ); if ( itQueueIAlgPtr == m_algqueue_map.end() ) { error() << "Algorithm " << name << " requested, but not recognised" << endmsg; @@ -150,7 +150,7 @@ StatusCode AlgResourcePool::releaseAlgorithm( const std::string& name, IAlgorith { std::hash<std::string> hash_function; - size_t algo_id = hash_function( name ); + size_t algo_id = hash_function( name ); // release resources used by the algorithm m_resource_mutex.lock(); @@ -288,9 +288,9 @@ StatusCode AlgResourcePool::decodeTopAlgs() IAlgorithm* algo( nullptr ); Gaudi::Utils::TypeNameString item( name ); - const std::string& item_name = item.name(); - const std::string& item_type = item.type(); - SmartIF<IAlgorithm> algoSmartIF( algMan->algorithm( item_name, false ) ); + const std::string& item_name = item.name(); + const std::string& item_type = item.type(); + SmartIF<IAlgorithm> algoSmartIF( algMan->algorithm( item_name, false ) ); if ( !algoSmartIF.isValid() ) { createAlg( item_type, item_name, algo ); @@ -333,7 +333,7 @@ StatusCode AlgResourcePool::decodeTopAlgs() // Unrolled --- // Now let's manage the clones - unsigned int resource_counter( 0 ); + unsigned int resource_counter( 0 ); std::hash<std::string> hash_function; for ( auto& ialgoSmartIF : m_flatUniqueAlgList ) { @@ -345,9 +345,9 @@ StatusCode AlgResourcePool::decodeTopAlgs() if ( !algo ) fatal() << "Conversion from IAlgorithm to Algorithm failed" << endmsg; const std::string& item_type = algo->type(); - size_t algo_id = hash_function( item_name ); - concurrentQueueIAlgPtr* queue = new concurrentQueueIAlgPtr(); - m_algqueue_map[algo_id] = queue; + size_t algo_id = hash_function( item_name ); + concurrentQueueIAlgPtr* queue = new concurrentQueueIAlgPtr(); + m_algqueue_map[algo_id] = queue; // DP TODO Do it properly with SmartIFs, also in the queues IAlgorithm* ialgo( ialgoSmartIF.get() ); diff --git a/GaudiHive/src/AlgResourcePool.h b/GaudiHive/src/AlgResourcePool.h index a735b84485c2be1eb523f1888c2072df8b894bb6..078d5a4374f6d0ccb830bf09bcbb958a3b720822 100644 --- a/GaudiHive/src/AlgResourcePool.h +++ b/GaudiHive/src/AlgResourcePool.h @@ -59,17 +59,17 @@ public: private: typedef tbb::concurrent_bounded_queue<IAlgorithm*> concurrentQueueIAlgPtr; - typedef std::list<SmartIF<IAlgorithm>> ListAlg; - typedef boost::dynamic_bitset<> state_type; + typedef std::list<SmartIF<IAlgorithm>> ListAlg; + typedef boost::dynamic_bitset<> state_type; std::mutex m_resource_mutex; state_type m_available_resources{0}; std::map<size_t, concurrentQueueIAlgPtr*> m_algqueue_map; - std::map<size_t, state_type> m_resource_requirements; - std::map<size_t, size_t> m_n_of_allowed_instances; - std::map<size_t, unsigned int> m_n_of_created_instances; - std::map<std::string, unsigned int> m_resource_indices; + std::map<size_t, state_type> m_resource_requirements; + std::map<size_t, size_t> m_n_of_allowed_instances; + std::map<size_t, unsigned int> m_n_of_created_instances; + std::map<std::string, unsigned int> m_resource_indices; /// Decode the top alg list StatusCode decodeTopAlgs(); @@ -78,7 +78,7 @@ private: StatusCode flattenSequencer( Algorithm* sequencer, ListAlg& alglist, const std::string& parentName, unsigned int recursionDepth = 0 ); - Gaudi::Property<bool> m_lazyCreation{this, "CreateLazily", false, ""}; + Gaudi::Property<bool> m_lazyCreation{this, "CreateLazily", false, ""}; Gaudi::Property<std::vector<std::string>> m_topAlgNames{ this, "TopAlg", {}, "names of the algorithms to be passed to the algorithm manager"}; Gaudi::Property<bool> m_overrideUnClonable{this, "OverrideUnClonable", false, diff --git a/GaudiHive/src/AlgoExecutionTask.cpp b/GaudiHive/src/AlgoExecutionTask.cpp index 4cc9be339a1105e7aabc14e53c6a0127ec55382e..77f3760177def98d154f7d744e1746f34d251acf 100644 --- a/GaudiHive/src/AlgoExecutionTask.cpp +++ b/GaudiHive/src/AlgoExecutionTask.cpp @@ -14,8 +14,8 @@ tbb::task* AlgoExecutionTask::execute() { - IAlgorithm* ialg = m_algorithm.get(); - Algorithm* this_algo = dynamic_cast<Algorithm*>( ialg ); + IAlgorithm* ialg = m_algorithm.get(); + Algorithm* this_algo = dynamic_cast<Algorithm*>( ialg ); if ( !this_algo ) { throw GaudiException( "Cast to Algorithm failed!", "AlgoExecutionTask", StatusCode::FAILURE ); } @@ -30,7 +30,7 @@ tbb::task* AlgoExecutionTask::execute() const SmartIF<IProperty> appmgr( m_serviceLocator ); SmartIF<IMessageSvc> messageSvc( m_serviceLocator ); - MsgStream log( messageSvc, "AlgoExecutionTask" ); + MsgStream log( messageSvc, "AlgoExecutionTask" ); // select the appropriate store this_algo->whiteboard()->selectStore( m_evtCtx->valid() ? m_evtCtx->slot() : 0 ).ignore(); diff --git a/GaudiHive/src/AlgoExecutionTask.h b/GaudiHive/src/AlgoExecutionTask.h index e98f264996e073b61007b1244cbacc115f186ec9..100cb7a5a44730c4d4260f5af856252be61d85a5 100644 --- a/GaudiHive/src/AlgoExecutionTask.h +++ b/GaudiHive/src/AlgoExecutionTask.h @@ -19,9 +19,9 @@ public: tbb::task* execute() override; private: - SmartIF<IAlgorithm> m_algorithm; - EventContext* m_evtCtx; - IAlgExecStateSvc* m_aess; + SmartIF<IAlgorithm> m_algorithm; + EventContext* m_evtCtx; + IAlgExecStateSvc* m_aess; SmartIF<ISvcLocator> m_serviceLocator; }; diff --git a/GaudiHive/src/AlgsExecutionStates.cpp b/GaudiHive/src/AlgsExecutionStates.cpp index bc57d494facf654acf710e414e9dc16c0de1c047..b70625109398670f429f0d422b9bcaae082ed924 100644 --- a/GaudiHive/src/AlgsExecutionStates.cpp +++ b/GaudiHive/src/AlgsExecutionStates.cpp @@ -8,7 +8,7 @@ std::map<AlgsExecutionStates::State, std::string> AlgsExecutionStates::stateName StatusCode AlgsExecutionStates::updateState( unsigned int iAlgo, State newState ) { - MsgStream log( m_MS, "AlgExecutionStates" ); + MsgStream log( m_MS, "AlgExecutionStates" ); const unsigned int states_size = m_states.size(); if ( iAlgo >= states_size ) { diff --git a/GaudiHive/src/AlgsExecutionStates.h b/GaudiHive/src/AlgsExecutionStates.h index 69363c90dc4254215f968a102a4ee3db5dc14f7f..2ee2a72ef7f499dc5d8413be7aadcb59369c3cc9 100644 --- a/GaudiHive/src/AlgsExecutionStates.h +++ b/GaudiHive/src/AlgsExecutionStates.h @@ -72,7 +72,7 @@ public: } private: - std::vector<State> m_states; + std::vector<State> m_states; SmartIF<IMessageSvc> m_MS; public: @@ -118,8 +118,8 @@ public: private: std::vector<State>::const_iterator pos_; - State s_; - const std::vector<State>* v_; + State s_; + const std::vector<State>* v_; }; Iterator begin( State kind ) { return ( Iterator( Iterator::POS::BEGIN, kind, m_states ) ); } diff --git a/GaudiHive/src/AvalancheSchedulerSvc.cpp b/GaudiHive/src/AvalancheSchedulerSvc.cpp index 6d6d413169536220150d82af6b410a5b238d7a2a..357310d45407d764747cf1ae51b2e05812b353f8 100644 --- a/GaudiHive/src/AvalancheSchedulerSvc.cpp +++ b/GaudiHive/src/AvalancheSchedulerSvc.cpp @@ -26,7 +26,7 @@ // DP waiting for the TBB service #include "tbb/task_scheduler_init.h" -std::mutex AvalancheSchedulerSvc::m_ssMut; +std::mutex AvalancheSchedulerSvc::m_ssMut; std::list<AvalancheSchedulerSvc::SchedulerState> AvalancheSchedulerSvc::m_sState; // Instantiation of a static factory class used by clients to create instances of this service @@ -145,8 +145,8 @@ StatusCode AvalancheSchedulerSvc::initialize() Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents( m_maxEventsInFlight ); // Get the list of algorithms - const std::list<IAlgorithm*>& algos = m_algResourcePool->getFlatAlgList(); - const unsigned int algsNumber = algos.size(); + const std::list<IAlgorithm*>& algos = m_algResourcePool->getFlatAlgList(); + const unsigned int algsNumber = algos.size(); info() << "Found " << algsNumber << " algorithms" << endmsg; /* Dependencies @@ -232,7 +232,7 @@ StatusCode AvalancheSchedulerSvc::initialize() IAlgorithm* dataLoaderAlg( nullptr ); for ( IAlgorithm* algo : algos ) { const std::string& name = algo->name(); - auto index = precSvc->getRules()->getAlgorithmNode( name )->getAlgoIndex(); + auto index = precSvc->getRules()->getAlgorithmNode( name )->getAlgoIndex(); m_algname_index_map[name] = index; m_algname_vect.at( index ) = name; if ( algo->name() == m_useDataLoader ) { @@ -372,7 +372,7 @@ void AvalancheSchedulerSvc::activate() } // Wait for actions pushed into the queue by finishing tasks. - action thisAction; + action thisAction; StatusCode sc( StatusCode::SUCCESS ); m_isActive = ACTIVE; @@ -465,7 +465,7 @@ StatusCode AvalancheSchedulerSvc::pushNewEvent( EventContext* eventContext ) auto action = [this, eventContext]() -> StatusCode { // Event processing slot forced to be the same as the wb slot const unsigned int thisSlotNum = eventContext->slot(); - EventSlot& thisSlot = m_eventSlots[thisSlotNum]; + EventSlot& thisSlot = m_eventSlots[thisSlotNum]; if ( !thisSlot.complete ) { fatal() << "The slot " << thisSlotNum << " is supposed to be a finished event but it's not" << endmsg; return StatusCode::FAILURE; @@ -650,7 +650,7 @@ StatusCode AvalancheSchedulerSvc::updateStates( int si, const std::string& algo_ int iSlot = thisSlotPtr->eventContext->slot(); // Cache the states of the algos to improve readability and performance - auto& thisSlot = m_eventSlots[iSlot]; + auto& thisSlot = m_eventSlots[iSlot]; AlgsExecutionStates& thisAlgsStates = thisSlot.algsStates; // Perform the I->CR->DR transitions @@ -853,7 +853,7 @@ void AvalancheSchedulerSvc::dumpSchedulerState( int iSlot ) outputMessageStream << " o " << index2algname( algoIdx ) << " [" << AlgsExecutionStates::stateNames[thisSlot.algsStates[algoIdx]] << "] Data deps: "; DataObjIDColl deps( thisSlot.dataFlowMgr.dataDependencies( algoIdx ) ); - const int depsSize = deps.size(); + const int depsSize = deps.size(); if ( depsSize == 0 ) outputMessageStream << " none"; DataObjIDColl missing; @@ -891,8 +891,8 @@ StatusCode AvalancheSchedulerSvc::promoteToScheduled( unsigned int iAlgo, int si if ( m_algosInFlight == m_maxAlgosInFlight ) return StatusCode::FAILURE; const std::string& algName( index2algname( iAlgo ) ); - IAlgorithm* ialgoPtr = nullptr; - StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); + IAlgorithm* ialgoPtr = nullptr; + StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); if ( sc.isSuccess() ) { // if we managed to get an algorithm instance try to schedule it EventContext* eventContext( m_eventSlots[si].eventContext ); @@ -955,8 +955,8 @@ StatusCode AvalancheSchedulerSvc::promoteToAsyncScheduled( unsigned int iAlgo, i // bool IOBound = m_precSvc->isBlocking(algName); const std::string& algName( index2algname( iAlgo ) ); - IAlgorithm* ialgoPtr = nullptr; - StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); + IAlgorithm* ialgoPtr = nullptr; + StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); if ( sc.isSuccess() ) { // if we managed to get an algorithm instance try to schedule it EventContext* eventContext( m_eventSlots[si].eventContext ); diff --git a/GaudiHive/src/AvalancheSchedulerSvc.h b/GaudiHive/src/AvalancheSchedulerSvc.h index f44203aae1cddbd186c9a4592fc814164fcb9fbe..ea5f2498cab6776920f10cf29fc39a024b1986ad 100644 --- a/GaudiHive/src/AvalancheSchedulerSvc.h +++ b/GaudiHive/src/AvalancheSchedulerSvc.h @@ -29,7 +29,7 @@ #include "tbb/concurrent_queue.h" #include "tbb/task.h" -typedef AlgsExecutionStates::State State; +typedef AlgsExecutionStates::State State; typedef std::function<StatusCode()> action; //--------------------------------------------------------------------------- @@ -135,8 +135,8 @@ private: Gaudi::Property<int> m_threadPoolSize{ this, "ThreadPoolSize", -1, "Size of the threadpool initialised by TBB; a value of -1 gives TBB the freedom to choose"}; - Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"}; - Gaudi::Property<std::string> m_IOBoundAlgSchedulerSvcName{this, "IOBoundAlgSchedulerSvc", "IOBoundAlgSchedulerSvc"}; + Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"}; + Gaudi::Property<std::string> m_IOBoundAlgSchedulerSvcName{this, "IOBoundAlgSchedulerSvc", "IOBoundAlgSchedulerSvc"}; Gaudi::Property<unsigned int> m_maxIOBoundAlgosInFlight{this, "MaxIOBoundAlgosInFlight", 0, "Maximum number of simultaneous I/O-bound algorithms"}; Gaudi::Property<bool> m_simulateExecution{ @@ -262,7 +262,7 @@ private: // helper task to enqueue the scheduler's actions (closures) struct enqueueSchedulerActionTask : public tbb::task { - std::function<StatusCode()> m_closure; + std::function<StatusCode()> m_closure; SmartIF<AvalancheSchedulerSvc> m_scheduler; enqueueSchedulerActionTask( AvalancheSchedulerSvc* scheduler, std::function<StatusCode()> _closure ) @@ -281,9 +281,9 @@ private: // Service for thread pool initialization SmartIF<IThreadPoolSvc> m_threadPoolSvc; - size_t m_maxEventsInFlight{0}; - size_t m_maxAlgosInFlight{1}; - bool m_first = true; + size_t m_maxEventsInFlight{0}; + size_t m_maxAlgosInFlight{1}; + bool m_first = true; class SchedulerState { @@ -291,9 +291,9 @@ private: public: SchedulerState( Algorithm* a, EventContext* e, pthread_t t ) : m_a( a ), m_e( *e ), m_t( t ) {} - Algorithm* alg() const { return m_a; } + Algorithm* alg() const { return m_a; } EventContext ctx() const { return m_e; } - pthread_t thread() const { return m_t; } + pthread_t thread() const { return m_t; } friend std::ostream& operator<<( std::ostream& os, const SchedulerState& ss ) { @@ -309,13 +309,13 @@ private: bool operator<( const SchedulerState& rhs ) const { return ( m_a < rhs.alg() ); } private: - Algorithm* m_a; + Algorithm* m_a; EventContext m_e; - pthread_t m_t; + pthread_t m_t; }; static std::list<SchedulerState> m_sState; - static std::mutex m_ssMut; + static std::mutex m_ssMut; public: void addAlg( Algorithm*, EventContext*, pthread_t ); diff --git a/GaudiHive/src/CPUCruncher.cpp b/GaudiHive/src/CPUCruncher.cpp index 7ca19917fa820ce5651591f875e1b87bb741c935..fcfad4428d7dc5a68fd83feac44d60a5bb31456c 100644 --- a/GaudiHive/src/CPUCruncher.cpp +++ b/GaudiHive/src/CPUCruncher.cpp @@ -9,8 +9,8 @@ #include <thread> std::vector<unsigned int> CPUCruncher::m_niters_vect; -std::vector<double> CPUCruncher::m_times_vect; -CPUCruncher::CHM CPUCruncher::m_name_ncopies_map; +std::vector<double> CPUCruncher::m_times_vect; +CPUCruncher::CHM CPUCruncher::m_name_ncopies_map; DECLARE_COMPONENT( CPUCruncher ) @@ -23,7 +23,7 @@ DECLARE_COMPONENT( CPUCruncher ) //------------------------------------------------------------------------------ CPUCruncher::CPUCruncher( const std::string& name, // the algorithm instance name - ISvcLocator* pSvc ) + ISvcLocator* pSvc ) : GaudiAlgorithm( name, pSvc ) { @@ -98,13 +98,13 @@ void CPUCruncher::calibrate() info() << "Starting calibration..." << endmsg; for ( unsigned int i = 1; i < m_niters_vect.size(); ++i ) { unsigned long niters = m_niters_vect[i]; - unsigned int trials = 30; + unsigned int trials = 30; do { auto start_cali = tbb::tick_count::now(); findPrimes( niters ); - auto stop_cali = tbb::tick_count::now(); - double deltat = ( stop_cali - start_cali ).seconds(); - m_times_vect[i] = deltat; + auto stop_cali = tbb::tick_count::now(); + double deltat = ( stop_cali - start_cali ).seconds(); + m_times_vect[i] = deltat; DEBUG_MSG << "Calibration: # iters = " << niters << " => " << deltat << endmsg; trials--; } while ( trials > 0 and m_times_vect[i] < m_times_vect[i - 1] ); // make sure that they are monotonic @@ -116,8 +116,8 @@ unsigned long CPUCruncher::getNCaliIters( double runtime ) { unsigned int smaller_i = 0; - double time = 0.; - bool found = false; + double time = 0.; + bool found = false; // We know that the first entry is 0, so we start to iterate from 1 for ( unsigned int i = 1; i < m_times_vect.size(); i++ ) { time = m_times_vect[i]; @@ -152,9 +152,9 @@ void CPUCruncher::findPrimes( const unsigned long int n_iterations ) bool is_prime; // Let's prepare the material for the allocations - unsigned int primes_size = 1; - unsigned long* primes = new unsigned long[primes_size]; - primes[0] = 2; + unsigned int primes_size = 1; + unsigned long* primes = new unsigned long[primes_size]; + primes[0] = 2; unsigned long i = 2; @@ -171,8 +171,8 @@ void CPUCruncher::findPrimes( const unsigned long int n_iterations ) if ( is_prime ) { // copy the array of primes (INEFFICIENT ON PURPOSE!) - unsigned int new_primes_size = 1 + primes_size; - unsigned long* new_primes = new unsigned long[new_primes_size]; + unsigned int new_primes_size = 1 + primes_size; + unsigned long* new_primes = new unsigned long[new_primes_size]; for ( unsigned int prime_index = 0; prime_index < primes_size; prime_index++ ) { new_primes[prime_index] = primes[prime_index]; @@ -251,10 +251,10 @@ StatusCode CPUCruncher::execute() // the execution of the algorithm // Prepare to sleep (even if we won't enter the following if clause for sleeping). // This is needed to distribute evenly among all algorithms the overhead (around sleeping) which is harmful when // trying to achieve uniform distribution of algorithm timings. - const double dreamtime = m_avg_runtime * m_sleepFraction; + const double dreamtime = m_avg_runtime * m_sleepFraction; const std::chrono::duration<double> dreamtime_duration( dreamtime ); - tbb::tick_count startSleeptbb; - tbb::tick_count endSleeptbb; + tbb::tick_count startSleeptbb; + tbb::tick_count endSleeptbb; // Start to measure the total time here, together with the dreaming process straight ahead tbb::tick_count starttbb = tbb::tick_count::now(); diff --git a/GaudiHive/src/CPUCruncher.h b/GaudiHive/src/CPUCruncher.h index 55f2f1a4faa677b66bae064c7414b771055fcf04..0018f82e72944c560973da746bda452a990fc555 100644 --- a/GaudiHive/src/CPUCruncher.h +++ b/GaudiHive/src/CPUCruncher.h @@ -33,8 +33,8 @@ public: double get_runtime() const { return m_avg_runtime; } - CPUCruncher( const std::string& name, // the algorithm instance name - ISvcLocator* pSvc ); // the Service Locator + CPUCruncher( const std::string& name, // the algorithm instance name + ISvcLocator* pSvc ); // the Service Locator /// virtual & protected desctrustor virtual ~CPUCruncher(); // virtual & protected desctrustor @@ -50,7 +50,7 @@ private: void findPrimes( const unsigned long int ); /// Calibrate - void calibrate(); + void calibrate(); long unsigned int getNCaliIters( double ); Gaudi::Property<std::vector<std::string>> m_inpKeys{this, "inpKeys", {}, ""}; @@ -61,14 +61,14 @@ private: Gaudi::Property<bool> m_local_rndm_gen{this, "localRndm", true, "Decide if the local random generator is to be used"}; Gaudi::Property<bool> m_shortCalib{this, "shortCalib", false, "Enable coarse grained calibration"}; Gaudi::Property<unsigned int> m_rwRepetitions{this, "RwRepetitions", 1, "Increase access to the WB"}; - Gaudi::Property<float> m_sleepFraction{ + Gaudi::Property<float> m_sleepFraction{ this, "SleepFraction", 0.0f, "Fraction of time, between 0 and 1, when an algorithm is actually sleeping instead of crunching"}; Gaudi::Property<bool> m_invertCFD{this, "InvertDecision", false, "Invert control flow decision."}; // To calib only once static std::vector<unsigned int> m_niters_vect; - static std::vector<double> m_times_vect; + static std::vector<double> m_times_vect; // For the concurrency const uint MAX_INPUTS = 40; diff --git a/GaudiHive/src/ControlFlowGraph.cpp b/GaudiHive/src/ControlFlowGraph.cpp index 478ccbf55359eeaf15034c65ed7df58b82e0d4ae..e826d3d892eec5abd672b1677c8e679745ff9527 100644 --- a/GaudiHive/src/ControlFlowGraph.cpp +++ b/GaudiHive/src/ControlFlowGraph.cpp @@ -58,7 +58,7 @@ namespace concurrency { // check whether we already had a result earlier // if (-1 != node_decisions[m_nodeIndex] ) { return node_decisions[m_nodeIndex]; } - int decision = ( ( m_allPass && m_modePromptDecision ) ? 1 : -1 ); + int decision = ( ( m_allPass && m_modePromptDecision ) ? 1 : -1 ); bool hasUndecidedChild = false; for ( auto daughter : m_children ) { if ( m_modePromptDecision && ( -1 != decision || hasUndecidedChild ) ) { @@ -151,11 +151,11 @@ namespace concurrency auto& algoName = algo->name(); - auto itP = m_decisionNameToDecisionHubMap.find( parentName ); + auto itP = m_decisionNameToDecisionHubMap.find( parentName ); concurrency::recursive_CF::DecisionNode* parentNode; if ( itP != m_decisionNameToDecisionHubMap.end() ) { - parentNode = itP->second; - auto itA = m_algoNameToAlgoNodeMap.find( algoName ); + parentNode = itP->second; + auto itA = m_algoNameToAlgoNodeMap.find( algoName ); concurrency::recursive_CF::AlgorithmNode* algoNode; if ( itA != m_algoNameToAlgoNodeMap.end() ) { algoNode = itA->second; @@ -187,11 +187,11 @@ namespace concurrency auto& decisionHubName = decisionHubAlgo->name(); - auto itP = m_decisionNameToDecisionHubMap.find( parentName ); + auto itP = m_decisionNameToDecisionHubMap.find( parentName ); concurrency::recursive_CF::DecisionNode* parentNode; if ( itP != m_decisionNameToDecisionHubMap.end() ) { - parentNode = itP->second; - auto itA = m_decisionNameToDecisionHubMap.find( decisionHubName ); + parentNode = itP->second; + auto itA = m_decisionNameToDecisionHubMap.find( decisionHubName ); concurrency::recursive_CF::DecisionNode* decisionHubNode; if ( itA != m_decisionNameToDecisionHubMap.end() ) { decisionHubNode = itA->second; @@ -247,7 +247,7 @@ namespace concurrency void ControlFlowGraph::dumpControlFlow( std::ostringstream& ost, ControlFlowNode* node, const int& indent ) const { ost << std::string( indent * 2, ' ' ); - DecisionNode* dn = dynamic_cast<DecisionNode*>( node ); + DecisionNode* dn = dynamic_cast<DecisionNode*>( node ); AlgorithmNode* an = dynamic_cast<AlgorithmNode*>( node ); if ( dn != 0 ) { if ( node != m_headNode ) { diff --git a/GaudiHive/src/ControlFlowGraph.h b/GaudiHive/src/ControlFlowGraph.h index eb924cb226f1d4e2d8b1e09c929e3b1641d376bb..639992e3bc821ef2a6bbf30c5a6e65bdc89500db 100644 --- a/GaudiHive/src/ControlFlowGraph.h +++ b/GaudiHive/src/ControlFlowGraph.h @@ -51,7 +51,7 @@ namespace concurrency /// Translation between state id and name std::string stateToString( const int& stateId ) const; unsigned int m_nodeIndex; - std::string m_nodeName; + std::string m_nodeName; }; class DecisionNode : public ControlFlowNode @@ -135,7 +135,7 @@ namespace concurrency }; typedef std::unordered_map<std::string, AlgorithmNode*> AlgoNodesMap; - typedef std::unordered_map<std::string, DecisionNode*> DecisionHubsMap; + typedef std::unordered_map<std::string, DecisionNode*> DecisionHubsMap; struct IControlFlowGraph { virtual ~IControlFlowGraph() = default; @@ -200,7 +200,7 @@ namespace concurrency unsigned int m_algoCounter{0}; /// Service locator (needed to access the MessageSvc) mutable SmartIF<ISvcLocator> m_svcLocator; - const std::string m_name; + const std::string m_name; }; } // namespace recursive_CF diff --git a/GaudiHive/src/DataFlowManager.cpp b/GaudiHive/src/DataFlowManager.cpp index bfb0f10d873cb31f7decde3d014f09175e382ad0..5dd3b235635dd8efe2fd877d6a6b70d8a79370e6 100644 --- a/GaudiHive/src/DataFlowManager.cpp +++ b/GaudiHive/src/DataFlowManager.cpp @@ -26,8 +26,8 @@ DataFlowManager::DataFlowManager( algosDependenciesCollection algosDependencies m_algosRequirements.resize( algosDependencies.size(), dependency_bitset( nProducts ) ); // Fill the requirements - unsigned int algoIndex = 0; - long int productIndex = 0; + unsigned int algoIndex = 0; + long int productIndex = 0; for ( auto& thisAlgoDependencies : algosDependencies ) { // Make a local alias for better readability auto& dependency_bits = m_algosRequirements[algoIndex]; diff --git a/GaudiHive/src/ExecutionFlowManager.cpp b/GaudiHive/src/ExecutionFlowManager.cpp index da5c0afe9c9644c3663ffca5c0c8d6d99961bbcf..d5498f8d44d836e8ff5331b47232e7dd0f5f2d66 100644 --- a/GaudiHive/src/ExecutionFlowManager.cpp +++ b/GaudiHive/src/ExecutionFlowManager.cpp @@ -15,7 +15,7 @@ namespace concurrency } void ExecutionFlowManager::updateEventState( AlgsExecutionStates& algo_states, - std::vector<int>& node_decisions ) const + std::vector<int>& node_decisions ) const { m_CFGraph->updateEventState( algo_states, node_decisions ); } diff --git a/GaudiHive/src/ForwardSchedulerSvc.cpp b/GaudiHive/src/ForwardSchedulerSvc.cpp index 20bd9dc83b96e587913e5215ed4b98e57c093654..d163e2e87c87c808fef6380211e8b8b86b121efc 100644 --- a/GaudiHive/src/ForwardSchedulerSvc.cpp +++ b/GaudiHive/src/ForwardSchedulerSvc.cpp @@ -27,7 +27,7 @@ // DP waiting for the TBB service #include "tbb/task_scheduler_init.h" -std::mutex ForwardSchedulerSvc::m_ssMut; +std::mutex ForwardSchedulerSvc::m_ssMut; std::list<ForwardSchedulerSvc::SchedulerState> ForwardSchedulerSvc::m_sState; // Instantiation of a static factory class used by clients to create instances of this service @@ -118,8 +118,8 @@ StatusCode ForwardSchedulerSvc::initialize() } // Get the list of algorithms - const std::list<IAlgorithm*>& algos = m_algResourcePool->getFlatAlgList(); - const unsigned int algsNumber = algos.size(); + const std::list<IAlgorithm*>& algos = m_algResourcePool->getFlatAlgList(); + const unsigned int algsNumber = algos.size(); info() << "Found " << algsNumber << " algorithms" << endmsg; /* Dependencies @@ -201,7 +201,7 @@ StatusCode ForwardSchedulerSvc::initialize() // Fill the containers to convert algo names to index m_algname_vect.reserve( algsNumber ); unsigned int index = 0; - IAlgorithm* dataLoaderAlg( nullptr ); + IAlgorithm* dataLoaderAlg( nullptr ); for ( IAlgorithm* algo : algos ) { const std::string& name = algo->name(); m_algname_index_map[name] = index; @@ -351,7 +351,7 @@ void ForwardSchedulerSvc::activate() } // Wait for actions pushed into the queue by finishing tasks. - action thisAction; + action thisAction; StatusCode sc( StatusCode::SUCCESS ); m_isActive = ACTIVE; @@ -444,7 +444,7 @@ StatusCode ForwardSchedulerSvc::pushNewEvent( EventContext* eventContext ) auto action = [this, eventContext]() -> StatusCode { // Event processing slot forced to be the same as the wb slot const unsigned int thisSlotNum = eventContext->slot(); - EventSlot& thisSlot = m_eventSlots[thisSlotNum]; + EventSlot& thisSlot = m_eventSlots[thisSlotNum]; if ( !thisSlot.complete ) { fatal() << "The slot " << thisSlotNum << " is supposed to be a finished event but it's not" << endmsg; return StatusCode::FAILURE; @@ -628,7 +628,7 @@ StatusCode ForwardSchedulerSvc::updateStates( int si ) int iSlot = thisSlotPtr->eventContext->slot(); // Cache the states of the algos to improve readability and performance - auto& thisSlot = m_eventSlots[iSlot]; + auto& thisSlot = m_eventSlots[iSlot]; AlgsExecutionStates& thisAlgsStates = thisSlot.algsStates; // Take care of the control ready update @@ -783,7 +783,7 @@ void ForwardSchedulerSvc::dumpSchedulerState( int iSlot ) outputMessageStream << " o " << index2algname( algoIdx ) << " [" << AlgsExecutionStates::stateNames[thisSlot.algsStates[algoIdx]] << "] Data deps: "; DataObjIDColl deps( thisSlot.dataFlowMgr.dataDependencies( algoIdx ) ); - const int depsSize = deps.size(); + const int depsSize = deps.size(); if ( depsSize == 0 ) outputMessageStream << " none"; DataObjIDColl missing; @@ -863,8 +863,8 @@ StatusCode ForwardSchedulerSvc::promoteToScheduled( unsigned int iAlgo, int si ) if ( m_algosInFlight == m_maxAlgosInFlight ) return StatusCode::FAILURE; const std::string& algName( index2algname( iAlgo ) ); - IAlgorithm* ialgoPtr = nullptr; - StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); + IAlgorithm* ialgoPtr = nullptr; + StatusCode sc( m_algResourcePool->acquireAlgorithm( algName, ialgoPtr ) ); if ( sc.isSuccess() ) { // if we managed to get an algorithm instance try to schedule it EventContext* eventContext( m_eventSlots[si].eventContext ); diff --git a/GaudiHive/src/ForwardSchedulerSvc.h b/GaudiHive/src/ForwardSchedulerSvc.h index 99d0a141cacc6335cc4c560ea9e5af856316a943..0220adb57667c6c2e1b96a3de60347c2cc938581 100644 --- a/GaudiHive/src/ForwardSchedulerSvc.h +++ b/GaudiHive/src/ForwardSchedulerSvc.h @@ -27,7 +27,7 @@ #include "tbb/concurrent_queue.h" #include "tbb/task.h" -typedef AlgsExecutionStates::State State; +typedef AlgsExecutionStates::State State; typedef std::function<StatusCode()> action; //--------------------------------------------------------------------------- @@ -118,7 +118,7 @@ private: Gaudi::Property<int> m_threadPoolSize{ this, "ThreadPoolSize", -1, "Size of the threadpool initialised by TBB; a value of -1 gives TBB the freedom to choose"}; - Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"}; + Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"}; Gaudi::Property<unsigned int> m_maxAlgosInFlight{this, "MaxAlgosInFlight", 1, "[[deprecated]] Taken from the whiteboard"}; Gaudi::Property<std::vector<std::vector<std::string>>> m_algosDependencies{ @@ -218,7 +218,7 @@ private: // helper task to enqueue the scheduler's actions (closures) struct enqueueSchedulerActionTask : public tbb::task { - std::function<StatusCode()> m_closure; + std::function<StatusCode()> m_closure; SmartIF<ForwardSchedulerSvc> m_scheduler; enqueueSchedulerActionTask( ForwardSchedulerSvc* scheduler, std::function<StatusCode()> _closure ) @@ -249,9 +249,9 @@ private: public: SchedulerState( Algorithm* a, EventContext* e, pthread_t t ) : m_a( a ), m_e( *e ), m_t( t ) {} - Algorithm* alg() const { return m_a; } + Algorithm* alg() const { return m_a; } EventContext ctx() const { return m_e; } - pthread_t thread() const { return m_t; } + pthread_t thread() const { return m_t; } friend std::ostream& operator<<( std::ostream& os, const SchedulerState& ss ) { @@ -267,13 +267,13 @@ private: bool operator<( const SchedulerState& rhs ) const { return ( m_a < rhs.alg() ); } private: - Algorithm* m_a; + Algorithm* m_a; EventContext m_e; - pthread_t m_t; + pthread_t m_t; }; static std::list<SchedulerState> m_sState; - static std::mutex m_ssMut; + static std::mutex m_ssMut; public: void addAlg( Algorithm*, EventContext*, pthread_t ); @@ -281,7 +281,7 @@ public: void dumpState() override; private: - void dumpState( std::ostringstream& ); + void dumpState( std::ostringstream& ); concurrency::recursive_CF::ControlFlowGraph* m_efg; }; diff --git a/GaudiHive/src/HiveNumbers.h b/GaudiHive/src/HiveNumbers.h index 0b53abf885c79ad7549a166f52074d37b9ce71fd..aeda39249975928044c198a9f33f36fddb3c1b84 100644 --- a/GaudiHive/src/HiveNumbers.h +++ b/GaudiHive/src/HiveNumbers.h @@ -29,9 +29,9 @@ namespace HiveRndm class GAUDI_API HiveNumbers { private: - unsigned int m_buffer_index; - const unsigned int m_buffer_size; - std::vector<double> m_buffer; + unsigned int m_buffer_index; + const unsigned int m_buffer_size; + std::vector<double> m_buffer; static HiveNumbersMutex m_genMutex; protected: diff --git a/GaudiHive/src/HiveSlimEventLoopMgr.cpp b/GaudiHive/src/HiveSlimEventLoopMgr.cpp index 0d5fc43d8ed5c6a5b7c5fcd4593a3671990e8195..452dca4868ffb4468cb3840a9c14345b27f25e5b 100644 --- a/GaudiHive/src/HiveSlimEventLoopMgr.cpp +++ b/GaudiHive/src/HiveSlimEventLoopMgr.cpp @@ -35,7 +35,7 @@ DECLARE_SERVICE_FACTORY( HiveSlimEventLoopMgr ) #define ON_DEBUG if ( UNLIKELY( outputLevel() <= MSG::DEBUG ) ) #define ON_VERBOSE if ( UNLIKELY( outputLevel() <= MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() //-------------------------------------------------------------------------------------------- @@ -170,9 +170,9 @@ StatusCode HiveSlimEventLoopMgr::reinitialize() // Check to see whether a new Event Selector has been specified setProperty( m_appMgrProperty->getProperty( "EvtSel" ) ); if ( m_evtsel != "NONE" || m_evtsel.length() == 0 ) { - SmartIF<IService> theSvc( serviceLocator()->service( "EventSelector" ) ); + SmartIF<IService> theSvc( serviceLocator()->service( "EventSelector" ) ); SmartIF<IEvtSelector> theEvtSel( theSvc ); - StatusCode sc; + StatusCode sc; if ( theEvtSel.isValid() && ( theEvtSel.get() != m_evtSelector.get() ) ) { // Setup Event Selector if ( m_evtSelector.get() && m_evtContext ) { @@ -259,7 +259,7 @@ StatusCode HiveSlimEventLoopMgr::finalize() IDataSelector::iterator i; for ( i = objects->begin(); i != objects->end(); i++ ) { IOpaqueAddress* pAddr = 0; - StatusCode iret = m_histoPersSvc->createRep( *i, pAddr ); + StatusCode iret = m_histoPersSvc->createRep( *i, pAddr ); if ( iret.isSuccess() ) { ( *i )->registry()->setAddress( pAddr ); } else { @@ -377,7 +377,7 @@ StatusCode HiveSlimEventLoopMgr::executeEvent( void* createdEvts_IntPtr ) StatusCode HiveSlimEventLoopMgr::executeRun( int maxevt ) { StatusCode sc; - bool eventfailed = false; + bool eventfailed = false; if ( maxevt > 0 ) { // finite number of events to process const unsigned int umaxevt = static_cast<unsigned int>( maxevt ); @@ -432,7 +432,7 @@ StatusCode HiveSlimEventLoopMgr::nextEvent( int maxevt ) // Calculate runtime typedef std::chrono::high_resolution_clock Clock; - typedef Clock::time_point time_point; + typedef Clock::time_point time_point; // Reset the application return code. Gaudi::setAppReturnCode( m_appMgrProperty, Gaudi::ReturnCode::Success, true ).ignore(); @@ -448,7 +448,7 @@ StatusCode HiveSlimEventLoopMgr::nextEvent( int maxevt ) constexpr double oneOver1204 = 1. / 1024.; - uint iteration = 0; + uint iteration = 0; time_point start_time = Clock::now(); while ( !loop_ended and ( maxevt < 0 or ( finishedEvts + skippedEvts ) < maxevt ) ) { debug() << "work loop iteration " << iteration++ << endmsg; diff --git a/GaudiHive/src/HiveTestAlgorithm.cpp b/GaudiHive/src/HiveTestAlgorithm.cpp index 998e8163f5589f2fe21ab8b6f4c0f4931862dfb1..3525ef5c520dbf293c6e3a1bf74870ddb9eaf6eb 100644 --- a/GaudiHive/src/HiveTestAlgorithm.cpp +++ b/GaudiHive/src/HiveTestAlgorithm.cpp @@ -11,7 +11,7 @@ using namespace std; class MyObject : public DataObject { - int m_data; + int m_data; static atomic<int> c_instances; static atomic<int> d_instances; @@ -19,7 +19,7 @@ public: MyObject( int d ) : m_data( d ) { c_instances++; } MyObject( const MyObject& o ) : DataObject(), m_data( o.m_data ) { c_instances++; } ~MyObject() { d_instances++; } - int getData() { return m_data; } + int getData() { return m_data; } static void dump() { cout << "MyObject (C/D): " << c_instances << "/" << d_instances << endl; } }; diff --git a/GaudiHive/src/HiveWhiteBoard.cpp b/GaudiHive/src/HiveWhiteBoard.cpp index 5d779e5c51de5bfa8bfc8771e1488b5f18edfa8c..84772ee93214f374ed24ab444ceaf0dda0b79953 100644 --- a/GaudiHive/src/HiveWhiteBoard.cpp +++ b/GaudiHive/src/HiveWhiteBoard.cpp @@ -41,10 +41,10 @@ namespace struct Partition { SmartIF<IDataProviderSvc> dataProvider; - SmartIF<IDataManagerSvc> dataManager; - wbMutex storeMutex; - DataObjIDColl newDataObjects; - int eventNumber; + SmartIF<IDataManagerSvc> dataManager; + wbMutex storeMutex; + DataObjIDColl newDataObjects; + int eventNumber; Partition() : dataProvider( 0 ), dataManager( 0 ), eventNumber( -1 ) {} Partition( IDataProviderSvc* dp, IDataManagerSvc* dm ) : dataProvider( dp ), dataManager( dm ), eventNumber( -1 ) {} Partition( const Partition& entry ) @@ -97,10 +97,10 @@ class HiveWhiteBoard : public extends<Service, IDataProviderSvc, IDataManagerSvc protected: typedef std::vector<Partition> Partitions; - Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; + Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; Gaudi::Property<std::string> m_rootName{this, "RootName", "/Event", "name of root entry"}; Gaudi::Property<std::string> m_loader{this, "DataLoader", "EventPersistencySvc", ""}; - Gaudi::Property<int> m_slots{this, "EventSlots", 1, "number of event slots"}; + Gaudi::Property<int> m_slots{this, "EventSlots", 1, "number of event slots"}; Gaudi::Property<bool> m_forceLeaves{this, "ForceLeaves", false, "force creation of default leaves on registerObject"}; Gaudi::Property<bool> m_enableFaultHdlr{this, "EnableFaultHandler", false, "enable incidents on data creation requests"}; @@ -215,7 +215,7 @@ public: * The optional data provider is not considered. On the other hand, the data * provider is specified to be the whiteboard. */ - StatusCode setDataLoader( IConversionSvc* pDataLoader, + StatusCode setDataLoader( IConversionSvc* pDataLoader, IDataProviderSvc* dpsvc __attribute__( ( unused ) ) = nullptr ) override { if ( 0 != pDataLoader ) pDataLoader->addRef(); @@ -265,7 +265,7 @@ public: wbMutex::scoped_lock lock; lock.acquire( s_current->storeMutex ); StatusCode sc = s_current->dataProvider->preLoad(); - DataAgent da( s_current->newDataObjects ); + DataAgent da( s_current->newDataObjects ); s_current->dataManager->traverseTree( &da ); return sc; } diff --git a/GaudiHive/src/IOBoundAlgSchedulerSvc.cpp b/GaudiHive/src/IOBoundAlgSchedulerSvc.cpp index 5409b60d9ea6a48f28399a7bc5b67991a3533e17..0146f9d4da07a7388099cc5b171260bf711d6cdd 100644 --- a/GaudiHive/src/IOBoundAlgSchedulerSvc.cpp +++ b/GaudiHive/src/IOBoundAlgSchedulerSvc.cpp @@ -80,7 +80,7 @@ void IOBoundAlgSchedulerSvc::activate() m_isActive = true; // Wait for actions pushed into the queue by finishing tasks. - action thisAction; + action thisAction; StatusCode sc( StatusCode::SUCCESS ); // Continue to wait if the scheduler is running or there is something to do diff --git a/GaudiHive/src/IOBoundAlgTask.cpp b/GaudiHive/src/IOBoundAlgTask.cpp index 88b41f95c2aa12ab2ecbdf9110ac7571123ab99e..64dc50c6290a6e4719079b5a843e7617d9650c4a 100644 --- a/GaudiHive/src/IOBoundAlgTask.cpp +++ b/GaudiHive/src/IOBoundAlgTask.cpp @@ -13,8 +13,8 @@ StatusCode IOBoundAlgTask::execute() { - IAlgorithm* ialg = m_algorithm.get(); - Algorithm* this_algo = dynamic_cast<Algorithm*>( ialg ); + IAlgorithm* ialg = m_algorithm.get(); + Algorithm* this_algo = dynamic_cast<Algorithm*>( ialg ); if ( !this_algo ) { throw GaudiException( "Cast to Algorithm failed!", "AlgoExecutionTask", StatusCode::FAILURE ); } @@ -29,7 +29,7 @@ StatusCode IOBoundAlgTask::execute() const SmartIF<IProperty> appmgr( m_serviceLocator ); SmartIF<IMessageSvc> messageSvc( m_serviceLocator ); - MsgStream log( messageSvc, "AccelAlgoExecutionTask" ); + MsgStream log( messageSvc, "AccelAlgoExecutionTask" ); // select the appropriate store this_algo->whiteboard()->selectStore( m_evtCtx->valid() ? m_evtCtx->slot() : 0 ).ignore(); diff --git a/GaudiHive/src/IOBoundAlgTask.h b/GaudiHive/src/IOBoundAlgTask.h index f53eba4c684476f67ae05e83571d1e6b88954a3e..5f9021825e472389035af38f6d1376b6a90a966f 100644 --- a/GaudiHive/src/IOBoundAlgTask.h +++ b/GaudiHive/src/IOBoundAlgTask.h @@ -31,9 +31,9 @@ public: virtual StatusCode execute() override; private: - SmartIF<IAlgorithm> m_algorithm; - EventContext* m_evtCtx; - IAlgExecStateSvc* m_aess; + SmartIF<IAlgorithm> m_algorithm; + EventContext* m_evtCtx; + IAlgExecStateSvc* m_aess; SmartIF<ISvcLocator> m_serviceLocator; }; diff --git a/GaudiHive/src/IPrecedenceSvc.h b/GaudiHive/src/IPrecedenceSvc.h index 99b913b75aa4a63882371eb21a04f83114e9c960..830cfe78940d8e0bfb08a735fa27353eeff97e56 100644 --- a/GaudiHive/src/IPrecedenceSvc.h +++ b/GaudiHive/src/IPrecedenceSvc.h @@ -43,8 +43,8 @@ public: virtual bool isBlocking( const std::string& ) const = 0; /// Dump precedence rules - virtual void dumpControlFlow() const = 0; - virtual void dumpDataFlow() const = 0; + virtual void dumpControlFlow() const = 0; + virtual void dumpDataFlow() const = 0; virtual const std::string printState( EventSlot& ) const = 0; /// Dump precedence rules diff --git a/GaudiHive/src/PRGraphVisitors.cpp b/GaudiHive/src/PRGraphVisitors.cpp index 0acd36a270d570d70236007ed2dad7b7c62179d5..6bdc824b70b57188d7260c1c1100b64c7bcab5b0 100644 --- a/GaudiHive/src/PRGraphVisitors.cpp +++ b/GaudiHive/src/PRGraphVisitors.cpp @@ -100,9 +100,9 @@ namespace concurrency bool DecisionUpdater::visit( AlgorithmNode& node ) { - auto& states = m_slot->algsStates; - const State& state = states[node.getAlgoIndex()]; - int decision = -1; + auto& states = m_slot->algsStates; + const State& state = states[node.getAlgoIndex()]; + int decision = -1; if ( true == node.isOptimist() ) decision = 1; @@ -143,7 +143,7 @@ namespace concurrency bool foundNonResolvedChild = false; bool foundNegativeChild = false; bool foundPositiveChild = false; - int decision = -1; + int decision = -1; for ( auto child : node.getDaughters() ) { int& childDecision = m_slot->controlFlowState[child->getNodeIndex()]; @@ -268,8 +268,8 @@ namespace concurrency std::pair<itV, itV> vp; for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) { - precedence::AlgoTraceVertex v = *vp.first; - auto index = get( &AlgoTraceProps::m_name, execPlan ); + precedence::AlgoTraceVertex v = *vp.first; + auto index = get( &AlgoTraceProps::m_name, execPlan ); if ( index[v] == node.getNodeName() ) { runThroughAdjacents( v, execPlan ); float rank = m_nodesSucceeded; @@ -318,11 +318,11 @@ namespace concurrency std::pair<itV, itV> vp; for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) { - precedence::AlgoTraceVertex v = *vp.first; - auto index = get( &AlgoTraceProps::m_name, execPlan ); + precedence::AlgoTraceVertex v = *vp.first; + auto index = get( &AlgoTraceProps::m_name, execPlan ); if ( index[v] == node.getNodeName() ) { - auto index_runtime = get( &AlgoTraceProps::m_runtime, execPlan ); - float rank = index_runtime[v]; + auto index_runtime = get( &AlgoTraceProps::m_runtime, execPlan ); + float rank = index_runtime[v]; node.setRank( rank ); // std::cout << "Rank of " << index[v] << " is " << rank << std::endl; } @@ -351,11 +351,11 @@ namespace concurrency std::pair<itV, itV> vp; for ( vp = boost::vertices( execPlan ); vp.first != vp.second; ++vp.first ) { - precedence::AlgoTraceVertex v = *vp.first; - auto index = get( &precedence::AlgoTraceProps::m_name, execPlan ); + precedence::AlgoTraceVertex v = *vp.first; + auto index = get( &precedence::AlgoTraceProps::m_name, execPlan ); if ( index[v] == node.getNodeName() ) { - auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ); - float rank = index_eccentricity[v]; + auto index_eccentricity = get( &precedence::AlgoTraceProps::m_eccentricity, execPlan ); + float rank = index_eccentricity[v]; node.setRank( rank ); // std::cout << "Rank of " << index[v] << " is " << rank << std::endl; } @@ -440,8 +440,8 @@ namespace concurrency bool RunSimulator::visit( AlgorithmNode& node ) { - auto& states = m_slot->algsStates; - int& decision = m_slot->controlFlowState[node.getNodeIndex()]; + auto& states = m_slot->algsStates; + int& decision = m_slot->controlFlowState[node.getNodeIndex()]; auto dataPromoter = DataReadyPromoter( *m_slot, m_cause ); diff --git a/GaudiHive/src/PRGraphVisitors.h b/GaudiHive/src/PRGraphVisitors.h index 82ee519c179b6921712f326d1c1540025b6dd543..e566474128ea211b94420d4040aa1268c9eb7823 100644 --- a/GaudiHive/src/PRGraphVisitors.h +++ b/GaudiHive/src/PRGraphVisitors.h @@ -31,8 +31,8 @@ namespace concurrency bool visit( ConditionNode& ) override; EventSlot* m_slot; - Cause m_cause; - bool m_trace; + Cause m_cause; + bool m_trace; }; class DecisionUpdater : public IGraphVisitor @@ -47,8 +47,8 @@ namespace concurrency bool visit( AlgorithmNode& ) override; EventSlot* m_slot; - Cause m_cause; - bool m_trace; + Cause m_cause; + bool m_trace; }; class Supervisor : public IGraphVisitor @@ -70,8 +70,8 @@ namespace concurrency bool visit( AlgorithmNode& ) override; EventSlot* m_slot; - Cause m_cause; - bool m_trace; + Cause m_cause; + bool m_trace; }; class RankerByProductConsumption : public IGraphVisitor @@ -152,8 +152,8 @@ namespace concurrency void reset() override { m_nodesSucceeded = 0; }; EventSlot* m_slot; - Cause m_cause; - int m_nodesSucceeded{0}; + Cause m_cause; + int m_nodesSucceeded{0}; }; } diff --git a/GaudiHive/src/PrecedenceRulesGraph.cpp b/GaudiHive/src/PrecedenceRulesGraph.cpp index ba6ab614144ec0157021d355842370cf9b5404da..165728c8532aa7899cdaf4ff14075ec24f3163b5 100644 --- a/GaudiHive/src/PrecedenceRulesGraph.cpp +++ b/GaudiHive/src/PrecedenceRulesGraph.cpp @@ -152,9 +152,9 @@ namespace concurrency // Detach condition algorithms from the CF realm if ( m_conditionsRealmEnabled ) { SmartIF<ICondSvc> condSvc{serviceLocator()->service( "CondSvc", false )}; - auto& condAlgs = condSvc->condAlgs(); + auto& condAlgs = condSvc->condAlgs(); for ( const auto algo : condAlgs ) { - auto itA = m_algoNameToAlgoNodeMap.find( algo->name() ); + auto itA = m_algoNameToAlgoNodeMap.find( algo->name() ); concurrency::AlgorithmNode* algoNode; if ( itA != m_algoNameToAlgoNodeMap.end() ) { algoNode = itA->second; @@ -261,8 +261,8 @@ namespace concurrency StatusCode sc = StatusCode::SUCCESS; // Create new, or fetch existent, AlgorithmNode - auto& algoName = algo->name(); - auto itA = m_algoNameToAlgoNodeMap.find( algoName ); + auto& algoName = algo->name(); + auto itA = m_algoNameToAlgoNodeMap.find( algoName ); concurrency::AlgorithmNode* algoNode; if ( itA != m_algoNameToAlgoNodeMap.end() ) { algoNode = itA->second; @@ -284,7 +284,7 @@ namespace concurrency // Attach AlgorithmNode to its CF decision hub auto itP = m_decisionNameToDecisionHubMap.find( parentName ); if ( itP != m_decisionNameToDecisionHubMap.end() ) { - auto parentNode = itP->second; + auto parentNode = itP->second; ON_VERBOSE verbose() << "Attaching AlgorithmNode '" << algo->name() << "' to DecisionNode '" << parentName << "'" << endmsg; @@ -311,7 +311,7 @@ namespace concurrency StatusCode sc; - auto itD = m_dataPathToDataNodeMap.find( dataPath ); + auto itD = m_dataPathToDataNodeMap.find( dataPath ); concurrency::DataNode* dataNode; if ( itD != m_dataPathToDataNodeMap.end() ) { dataNode = itD->second; @@ -360,11 +360,11 @@ namespace concurrency auto& decisionHubName = decisionHubAlgo->name(); - auto itP = m_decisionNameToDecisionHubMap.find( parentName ); + auto itP = m_decisionNameToDecisionHubMap.find( parentName ); concurrency::DecisionNode* parentNode; if ( itP != m_decisionNameToDecisionHubMap.end() ) { - parentNode = itP->second; - auto itA = m_decisionNameToDecisionHubMap.find( decisionHubName ); + parentNode = itP->second; + auto itA = m_decisionNameToDecisionHubMap.find( decisionHubName ); concurrency::DecisionNode* decisionHubNode; if ( itA != m_decisionNameToDecisionHubMap.end() ) { decisionHubNode = itA->second; @@ -465,7 +465,7 @@ namespace concurrency void PrecedenceRulesGraph::dumpControlFlow( std::ostringstream& ost, ControlFlowNode* node, const int& indent ) const { ost << std::string( indent * 2, ' ' ); - DecisionNode* dn = dynamic_cast<DecisionNode*>( node ); + DecisionNode* dn = dynamic_cast<DecisionNode*>( node ); AlgorithmNode* an = dynamic_cast<AlgorithmNode*>( node ); if ( dn != 0 ) { if ( node != m_headNode ) { @@ -495,7 +495,7 @@ namespace concurrency std::string PrecedenceRulesGraph::dumpDataFlow() const { - const char idt[] = " "; + const char idt[] = " "; std::ostringstream ost; ost << "\n" << idt << "====================================\n"; diff --git a/GaudiHive/src/PrecedenceRulesGraph.h b/GaudiHive/src/PrecedenceRulesGraph.h index 3c2aa50ae3e0c2ae2d43eb57cb598f30d1479e75..cbb40dbc2a00789af61ff245479c5d7de1780463 100644 --- a/GaudiHive/src/PrecedenceRulesGraph.h +++ b/GaudiHive/src/PrecedenceRulesGraph.h @@ -34,10 +34,10 @@ namespace precedence { } std::string m_name; - int m_index{-1}; - int m_rank{-1}; - int m_runtime{-1}; // ns - int m_eccentricity{-1}; + int m_index{-1}; + int m_rank{-1}; + int m_runtime{-1}; // ns + int m_eccentricity{-1}; }; using PrecTrace = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, AlgoTraceProps>; @@ -58,9 +58,9 @@ namespace precedence } std::string m_name{""}; - int m_nodeIndex{-1}; - int m_algoIndex{-1}; - int m_rank{-1}; + int m_nodeIndex{-1}; + int m_algoIndex{-1}; + int m_rank{-1}; /// Algorithm representative behind the AlgorithmNode Algorithm* m_algorithm{nullptr}; @@ -85,7 +85,7 @@ namespace precedence } std::string m_name; - uint m_nodeIndex; + uint m_nodeIndex; /// Whether all daughters will be evaluated concurrently or sequentially bool m_modeConcurrent; @@ -313,7 +313,7 @@ namespace precedence struct Cause { enum class source { Root, Task }; - source m_source; + source m_source; std::string m_sourceName; }; @@ -358,7 +358,7 @@ namespace concurrency /// Translation between state id and name std::string stateToString( const int& stateId ) const; unsigned int m_nodeIndex; - std::string m_nodeName; + std::string m_nodeName; }; class DecisionNode : public ControlFlowNode @@ -533,7 +533,7 @@ namespace concurrency PrecedenceRulesGraph* m_graph; private: - DataObjID m_data_object_path; + DataObjID m_data_object_path; std::vector<AlgorithmNode*> m_producers; std::vector<AlgorithmNode*> m_consumers; }; @@ -667,7 +667,7 @@ namespace concurrency /// Index: map of data path to DataNode DataNodesMap m_dataPathToDataNodeMap; /// Indexes: maps of algorithm's name to algorithm's inputs/outputs - AlgoInputsMap m_algoNameToAlgoInputsMap; + AlgoInputsMap m_algoNameToAlgoInputsMap; AlgoOutputsMap m_algoNameToAlgoOutputsMap; /// Total number of nodes in the graph @@ -677,7 +677,7 @@ namespace concurrency /// Service locator (needed to access the MessageSvc) mutable SmartIF<ISvcLocator> m_svcLocator; - const std::string m_name; + const std::string m_name; const std::chrono::system_clock::time_point m_initTime; diff --git a/GaudiHive/src/PrecedenceSvc.cpp b/GaudiHive/src/PrecedenceSvc.cpp index b776169fd5553851da3c92d22a783c5723f93816..3dc1caefe9d526b338d7aadd722a8d2c9b353bcb 100644 --- a/GaudiHive/src/PrecedenceSvc.cpp +++ b/GaudiHive/src/PrecedenceSvc.cpp @@ -177,11 +177,11 @@ StatusCode PrecedenceSvc::iterate( EventSlot& slot, const Cause& cause ) if ( Cause::source::Task == cause.m_source ) { ON_VERBOSE verbose() << "Triggering bottom-up traversal at node '" << cause.m_sourceName << "'" << endmsg; - auto visitor = concurrency::DecisionUpdater( slot, cause, ifTrace ); + auto visitor = concurrency::DecisionUpdater( slot, cause, ifTrace ); m_PRGraph.getAlgorithmNode( cause.m_sourceName )->accept( visitor ); } else { ON_VERBOSE verbose() << "Triggering top-down traversal at the root node" << endmsg; - auto visitor = concurrency::Supervisor( slot, cause, ifTrace ); + auto visitor = concurrency::Supervisor( slot, cause, ifTrace ); m_PRGraph.getHeadNode()->accept( visitor ); } @@ -200,13 +200,13 @@ StatusCode PrecedenceSvc::iterate( EventSlot& slot, const Cause& cause ) StatusCode PrecedenceSvc::simulate( EventSlot& slot ) const { - Cause cs = {Cause::source::Root, "RootDecisionHub"}; - auto visitor = concurrency::RunSimulator( slot, cs ); + Cause cs = {Cause::source::Root, "RootDecisionHub"}; + auto visitor = concurrency::RunSimulator( slot, cs ); auto& nodeDecisions = slot.controlFlowState; std::vector<int> prevNodeDecisions; - int cntr = 0; + int cntr = 0; std::vector<int> counters; while ( !CFRulesResolved( slot ) ) { diff --git a/GaudiHive/src/PrecedenceSvc.h b/GaudiHive/src/PrecedenceSvc.h index a7f80c8ea7538e5ad4f331bb4d4e401f6a700b8b..e5ce714795ca4532d96b006d6cf82482b69568a5 100644 --- a/GaudiHive/src/PrecedenceSvc.h +++ b/GaudiHive/src/PrecedenceSvc.h @@ -53,8 +53,8 @@ public: bool isBlocking( const std::string& name ) const override { return m_PRGraph.getAlgorithmNode( name )->isIOBound(); } /// Dump precedence rules - void dumpControlFlow() const override; - void dumpDataFlow() const override; + void dumpControlFlow() const override; + void dumpDataFlow() const override; const std::string printState( EventSlot& ) const override; /// Dump precedence rules (available only in DEBUG mode, and must be enabled diff --git a/GaudiHive/src/RetCodeGuard.h b/GaudiHive/src/RetCodeGuard.h index adb20cbea341d0a4a705cb021e3d31c7704e32e6..d313844d1b9fb4b006e09b82ec4c6e9e5fbbc888 100644 --- a/GaudiHive/src/RetCodeGuard.h +++ b/GaudiHive/src/RetCodeGuard.h @@ -20,7 +20,7 @@ public: private: SmartIF<IProperty> m_appmgr; - int m_retcode; + int m_retcode; }; #endif diff --git a/GaudiHive/src/ThreadInitTask.cpp b/GaudiHive/src/ThreadInitTask.cpp index 154f8c867d8d737a48fb1a615c6f97e6db668f8e..2bcc4711d07926d21f97fc5f83d42e2567966356 100644 --- a/GaudiHive/src/ThreadInitTask.cpp +++ b/GaudiHive/src/ThreadInitTask.cpp @@ -13,7 +13,7 @@ tbb::task* ThreadInitTask::execute() { SmartIF<IMessageSvc> messageSvc( m_serviceLocator ); - MsgStream log( messageSvc, "ThreadInitTask" ); + MsgStream log( messageSvc, "ThreadInitTask" ); const auto debug = log.level() <= MSG::DEBUG; diff --git a/GaudiHive/src/ThreadInitTask.h b/GaudiHive/src/ThreadInitTask.h index e8c350b9de98bf56e67b4d4f7247dc5820be601c..e57775dc9fdac865c09c6b6502156b73c81055da 100644 --- a/GaudiHive/src/ThreadInitTask.h +++ b/GaudiHive/src/ThreadInitTask.h @@ -38,9 +38,9 @@ public: private: ToolHandleArray<IThreadInitTool>& m_tools; - boost::barrier* m_barrier; + boost::barrier* m_barrier; SmartIF<ISvcLocator> m_serviceLocator; - bool m_terminate; + bool m_terminate; static std::atomic<bool> m_execFailed; }; diff --git a/GaudiHive/src/ThreadPoolSvc.cpp b/GaudiHive/src/ThreadPoolSvc.cpp index d6e7da873de23385e280bdc2d86010ff94e9f926..67d3fb877e4390e6207bb10938c984693a58a3cf 100644 --- a/GaudiHive/src/ThreadPoolSvc.cpp +++ b/GaudiHive/src/ThreadPoolSvc.cpp @@ -193,7 +193,7 @@ StatusCode ThreadPoolSvc::launchTasks( bool terminate ) else { if ( msgLevel( MSG::DEBUG ) ) debug() << "launching ThreadInitTask " << taskType << "in this thread." << endmsg; boost::barrier* noBarrier = nullptr; - ThreadInitTask theTask( m_threadInitTools, noBarrier, serviceLocator(), terminate ); + ThreadInitTask theTask( m_threadInitTools, noBarrier, serviceLocator(), terminate ); theTask.execute(); } diff --git a/GaudiHive/src/TimelineSvc.h b/GaudiHive/src/TimelineSvc.h index 30c65cf16ebb0749071cac6da37052df70861249..a3b954a96cce97bada605f5bca010efec5ea7c44 100644 --- a/GaudiHive/src/TimelineSvc.h +++ b/GaudiHive/src/TimelineSvc.h @@ -31,9 +31,9 @@ private: void outputTimeline(); Gaudi::Property<std::string> m_timelineFile{this, "TimelineFile", "timeline.csv", ""}; - Gaudi::Property<bool> m_isEnabled{this, "RecordTimeline", false, "Enable recording of the timeline events"}; - Gaudi::Property<bool> m_dumpTimeline{this, "DumpTimeline", false, "Enable dumping of the timeline events"}; - Gaudi::Property<bool> m_partial{this, "Partial", false, ""}; + Gaudi::Property<bool> m_isEnabled{this, "RecordTimeline", false, "Enable recording of the timeline events"}; + Gaudi::Property<bool> m_dumpTimeline{this, "DumpTimeline", false, "Enable dumping of the timeline events"}; + Gaudi::Property<bool> m_partial{this, "Partial", false, ""}; tbb::concurrent_vector<TimelineEvent> m_events; }; diff --git a/GaudiHive/src/bin/concurrentRun.cpp b/GaudiHive/src/bin/concurrentRun.cpp index a25b18b45c94db0517344cbbe4bad351ba29b8a1..9dc38bccbfbb1e2d9aa3ec754a491fc6a5b08359 100644 --- a/GaudiHive/src/bin/concurrentRun.cpp +++ b/GaudiHive/src/bin/concurrentRun.cpp @@ -62,7 +62,7 @@ int main( int argc, char** argv ) } // end of options handling - IInterface* iface = Gaudi::createApplicationMgr(); + IInterface* iface = Gaudi::createApplicationMgr(); SmartIF<IProperty> propMgr( iface ); SmartIF<IAppMgrUI> appUI( iface ); propMgr->setProperty( "JobOptionsType", "PYTHON" ); diff --git a/GaudiKernel/GaudiKernel/AlgTool.h b/GaudiKernel/GaudiKernel/AlgTool.h index 92f769fd3e9f8ef79958919db0be95b324ab5817..25cbe0189db7ab0c9dc2c0e267f9b45e606c77dd 100644 --- a/GaudiKernel/GaudiKernel/AlgTool.h +++ b/GaudiKernel/GaudiKernel/AlgTool.h @@ -67,14 +67,14 @@ public: const IInterface* parent() const override; // State machine implementation - StatusCode configure() override { return StatusCode::SUCCESS; } - StatusCode initialize() override; - StatusCode start() override; - StatusCode stop() override; - StatusCode finalize() override; - StatusCode terminate() override { return StatusCode::SUCCESS; } - StatusCode reinitialize() override; - StatusCode restart() override; + StatusCode configure() override { return StatusCode::SUCCESS; } + StatusCode initialize() override; + StatusCode start() override; + StatusCode stop() override; + StatusCode finalize() override; + StatusCode terminate() override { return StatusCode::SUCCESS; } + StatusCode reinitialize() override; + StatusCode restart() override; Gaudi::StateMachine::State FSMState() const override { return m_state; } Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; } @@ -289,15 +289,15 @@ public: private: typedef std::list<std::pair<InterfaceID, void*>> InterfaceList; - std::string m_type; ///< AlgTool type (concrete class name) + std::string m_type; ///< AlgTool type (concrete class name) const std::string m_name; ///< AlgTool full name const IInterface* m_parent = nullptr; ///< AlgTool parent - mutable SmartIF<ISvcLocator> m_svcLocator; ///< Pointer to Service Locator service - mutable SmartIF<IDataProviderSvc> m_evtSvc; ///< Event data service - mutable SmartIF<IToolSvc> m_ptoolSvc; ///< Tool service - mutable SmartIF<IMonitorSvc> m_pMonitorSvc; ///< Online Monitoring Service - mutable SmartIF<IAuditorSvc> m_pAuditorSvc; ///< Auditor Service + mutable SmartIF<ISvcLocator> m_svcLocator; ///< Pointer to Service Locator service + mutable SmartIF<IDataProviderSvc> m_evtSvc; ///< Event data service + mutable SmartIF<IToolSvc> m_ptoolSvc; ///< Tool service + mutable SmartIF<IMonitorSvc> m_pMonitorSvc; ///< Online Monitoring Service + mutable SmartIF<IAuditorSvc> m_pAuditorSvc; ///< Auditor Service InterfaceList m_interfaceList; ///< Interface list @@ -318,8 +318,8 @@ private: std::string m_threadID; ///< Thread Id for Alg Tool // tools used by tool - mutable std::vector<IAlgTool*> m_tools; - mutable std::vector<BaseToolHandle*> m_toolHandles; + mutable std::vector<IAlgTool*> m_tools; + mutable std::vector<BaseToolHandle*> m_toolHandles; mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays; mutable bool m_toolHandlesInit = false; /// flag indicating whether ToolHandle tools have been added to m_tools diff --git a/GaudiKernel/GaudiKernel/AlgToolHistory.h b/GaudiKernel/GaudiKernel/AlgToolHistory.h index a36a627542f26be1e51395379ae5f20b3fd2f191..322c5d634b834fe2f1fd2c2d65acc9ed62129bd5 100644 --- a/GaudiKernel/GaudiKernel/AlgToolHistory.h +++ b/GaudiKernel/GaudiKernel/AlgToolHistory.h @@ -51,7 +51,7 @@ public: virtual ~AlgToolHistory() override {} // Class IDs - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID(); // Return the algtool type. diff --git a/GaudiKernel/GaudiKernel/Algorithm.h b/GaudiKernel/GaudiKernel/Algorithm.h index c5f67711794fc79294580fa913bf1bfb61067958..fbf90731ffea41c8a474dd3c7aec1826b6ed2bb0 100644 --- a/GaudiKernel/GaudiKernel/Algorithm.h +++ b/GaudiKernel/GaudiKernel/Algorithm.h @@ -160,7 +160,7 @@ public: * whereas "ApproxTrackFit" and "BestTrackFit" may be two instantiations * of the class configured to find tracks with different fit criteria. */ - const std::string& name() const override; + const std::string& name() const override; const Gaudi::StringKey& nameKey() const override; /** The type of the algorithm object. @@ -259,19 +259,19 @@ public: /** The standard Chrono & Stat service, * Return a pointer to the service if present */ - SmartIF<IChronoStatSvc>& chronoSvc() const; + SmartIF<IChronoStatSvc>& chronoSvc() const; [[deprecated( "use chronoSvc() instead" )]] SmartIF<IChronoStatSvc>& chronoStatService() const { return chronoSvc(); } /** The standard detector data service. * May not be invoked before sysInitialize() has been invoked. */ - SmartIF<IDataProviderSvc>& detSvc() const; + SmartIF<IDataProviderSvc>& detSvc() const; [[deprecated( "use detSvc() instead" )]] SmartIF<IDataProviderSvc>& detDataService() const { return detSvc(); } /** The standard detector data persistency conversion service. * May not be invoked before sysInitialize() has been invoked. */ - SmartIF<IConversionSvc>& detCnvSvc() const; + SmartIF<IConversionSvc>& detCnvSvc() const; [[deprecated( "use detCnvSvc() instead" )]] SmartIF<IConversionSvc>& detDataCnvService() const { return detCnvSvc(); } /** The standard event data service. @@ -279,13 +279,13 @@ public: */ SmartIF<IDataProviderSvc>& eventSvc() const; /// shortcut for method eventSvc - SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); } + SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); } [[deprecated( "use eventSvc() instead" )]] SmartIF<IDataProviderSvc>& eventDataService() const { return eventSvc(); } /** The standard event data persistency conversion service. * May not be invoked before sysInitialize() has been invoked. */ - SmartIF<IConversionSvc>& eventCnvSvc() const; + SmartIF<IConversionSvc>& eventCnvSvc() const; [[deprecated( "use eventCnvSvc() instead" )]] SmartIF<IConversionSvc>& eventDataCnvService() const { return eventCnvSvc(); @@ -294,13 +294,13 @@ public: /** The standard histogram service. * May not be invoked before sysInitialize() has been invoked. */ - SmartIF<IHistogramSvc>& histoSvc() const; + SmartIF<IHistogramSvc>& histoSvc() const; [[deprecated( "use histoSvc() instead" )]] SmartIF<IHistogramSvc>& histogramDataService() const { return histoSvc(); } /** The standard N tuple service. * Returns a pointer to the N tuple service if present. */ - SmartIF<INTupleSvc>& ntupleSvc() const; + SmartIF<INTupleSvc>& ntupleSvc() const; [[deprecated( "use ntupleSvc() instead" )]] SmartIF<INTupleSvc>& ntupleService() const { return ntupleSvc(); } /** The standard RandomGen service, @@ -512,40 +512,40 @@ private: unsigned int maxErrors() const { return m_errorMax; } private: - Gaudi::StringKey m_name; ///< Algorithm's name for identification - std::string m_type; ///< Algorithm's type - std::string m_version; ///< Algorithm's version - unsigned int m_index; ///< Algorithm's index - EventContext m_event_context; + Gaudi::StringKey m_name; ///< Algorithm's name for identification + std::string m_type; ///< Algorithm's type + std::string m_version; ///< Algorithm's version + unsigned int m_index; ///< Algorithm's index + EventContext m_event_context; std::vector<Algorithm*> m_subAlgms; ///< Sub algorithms // tools used by algorithm - mutable std::vector<IAlgTool*> m_tools; - mutable std::vector<BaseToolHandle*> m_toolHandles; + mutable std::vector<IAlgTool*> m_tools; + mutable std::vector<BaseToolHandle*> m_toolHandles; mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays; private: template <typename IFace> SmartIF<IFace>& get_svc_( SmartIF<IFace>& p, const char* service_name ) const; - mutable SmartIF<IMessageSvc> m_MS; ///< Message service - mutable SmartIF<IDataProviderSvc> m_EDS; ///< Event data service - mutable SmartIF<IHiveWhiteBoard> m_WB; ///< Event data service (whiteboard) - mutable SmartIF<IConversionSvc> m_ECS; ///< Event conversion service - mutable SmartIF<IDataProviderSvc> m_DDS; ///< Detector data service - mutable SmartIF<IConversionSvc> m_DCS; ///< Detector conversion service - mutable SmartIF<IHistogramSvc> m_HDS; ///< Histogram data service - mutable SmartIF<INTupleSvc> m_NTS; ///< N tuple service - mutable SmartIF<IChronoStatSvc> m_CSS; ///< Chrono & Stat Service - mutable SmartIF<IRndmGenSvc> m_RGS; ///< Random Number Generator Service - mutable SmartIF<IExceptionSvc> m_EXS; ///< Exception Handler Service - mutable SmartIF<IAuditorSvc> m_pAuditorSvc; ///< Auditor Service - mutable SmartIF<IToolSvc> m_ptoolSvc; ///< ToolSvc Service - mutable SmartIF<IMonitorSvc> m_pMonitorSvc; ///< Online Monitoring Service - mutable SmartIF<IAlgContextSvc> m_contextSvc; ///< Algorithm Context Service - - mutable SmartIF<ITimelineSvc> m_timelineSvc; ///< Timeline Service - mutable SmartIF<IAlgExecStateSvc> m_aess; ///< Alg execution state mgr + mutable SmartIF<IMessageSvc> m_MS; ///< Message service + mutable SmartIF<IDataProviderSvc> m_EDS; ///< Event data service + mutable SmartIF<IHiveWhiteBoard> m_WB; ///< Event data service (whiteboard) + mutable SmartIF<IConversionSvc> m_ECS; ///< Event conversion service + mutable SmartIF<IDataProviderSvc> m_DDS; ///< Detector data service + mutable SmartIF<IConversionSvc> m_DCS; ///< Detector conversion service + mutable SmartIF<IHistogramSvc> m_HDS; ///< Histogram data service + mutable SmartIF<INTupleSvc> m_NTS; ///< N tuple service + mutable SmartIF<IChronoStatSvc> m_CSS; ///< Chrono & Stat Service + mutable SmartIF<IRndmGenSvc> m_RGS; ///< Random Number Generator Service + mutable SmartIF<IExceptionSvc> m_EXS; ///< Exception Handler Service + mutable SmartIF<IAuditorSvc> m_pAuditorSvc; ///< Auditor Service + mutable SmartIF<IToolSvc> m_ptoolSvc; ///< ToolSvc Service + mutable SmartIF<IMonitorSvc> m_pMonitorSvc; ///< Online Monitoring Service + mutable SmartIF<IAlgContextSvc> m_contextSvc; ///< Algorithm Context Service + + mutable SmartIF<ITimelineSvc> m_timelineSvc; ///< Timeline Service + mutable SmartIF<IAlgExecStateSvc> m_aess; ///< Alg execution state mgr SmartIF<ISvcLocator> m_pSvcLocator; ///< Pointer to service locator service @@ -555,7 +555,7 @@ protected: private: // Properties - Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; + Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the algorithm be executed or not"}; Gaudi::Property<unsigned int> m_errorMax{this, "ErrorMax", 1, "[[deprecated]] max number of errors"}; @@ -599,7 +599,7 @@ private: Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED; ///< Algorithm has been initialized flag Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED; ///< Algorithm has been initialized flag - bool m_isFinalized; ///< Algorithm has been finalized flag + bool m_isFinalized; ///< Algorithm has been finalized flag /// implementation of service method StatusCode service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const; diff --git a/GaudiKernel/GaudiKernel/AlgorithmHistory.h b/GaudiKernel/GaudiKernel/AlgorithmHistory.h index f5a06e485022c96a5b7f806c9152456abcb2018b..846efeb6e455328d245c7703d6e664f5c283b0e9 100644 --- a/GaudiKernel/GaudiKernel/AlgorithmHistory.h +++ b/GaudiKernel/GaudiKernel/AlgorithmHistory.h @@ -63,7 +63,7 @@ public: // functions virtual ~AlgorithmHistory(); // Class IDs - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID(); // Return the algorithm type. diff --git a/GaudiKernel/GaudiKernel/Allocator.h b/GaudiKernel/GaudiKernel/Allocator.h index 342e1175b64e55b8ee40f5f456a62b950aebf19f..6c6ce9550f8a31742672fa6f57e0f4a3abe4e1e8 100644 --- a/GaudiKernel/GaudiKernel/Allocator.h +++ b/GaudiKernel/GaudiKernel/Allocator.h @@ -99,12 +99,12 @@ namespace GaudiUtils // It is anyhow NOT recommended to use this class as // alternative allocator for STL containers ! - typedef Type value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef Type* pointer; + typedef Type value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef Type* pointer; typedef const Type* const_pointer; - typedef Type& reference; + typedef Type& reference; typedef const Type& const_reference; /// Copy constructor diff --git a/GaudiKernel/GaudiKernel/AllocatorPool.h b/GaudiKernel/GaudiKernel/AllocatorPool.h index b688c93ba4c5c40ee2b5d8137fd147b513fc5c5a..ca33517bdcfed072613f32ecfeb2ef096e8398f5 100644 --- a/GaudiKernel/GaudiKernel/AllocatorPool.h +++ b/GaudiKernel/GaudiKernel/AllocatorPool.h @@ -90,9 +90,9 @@ namespace GaudiUtils { public: explicit PoolChunk( unsigned int sz ) : size( sz ), mem{new char[size]} {} - const unsigned int size; - std::unique_ptr<char[]> mem; - PoolChunk* next = nullptr; + const unsigned int size; + std::unique_ptr<char[]> mem; + PoolChunk* next = nullptr; }; /// Make pool larger @@ -101,9 +101,9 @@ namespace GaudiUtils private: const unsigned int esize; const unsigned int csize; - PoolChunk* chunks = nullptr; - PoolLink* head = nullptr; - int nchunks = 0; + PoolChunk* chunks = nullptr; + PoolLink* head = nullptr; + int nchunks = 0; }; } // end of namespace GaudiUtils diff --git a/GaudiKernel/GaudiKernel/AnyDataWrapper.h b/GaudiKernel/GaudiKernel/AnyDataWrapper.h index 6178f6d5809e6076772dd510f5f4f403c5ec0dc4..543dcfa6589a276fb158e2f69ab32ecf239a373c 100644 --- a/GaudiKernel/GaudiKernel/AnyDataWrapper.h +++ b/GaudiKernel/GaudiKernel/AnyDataWrapper.h @@ -20,7 +20,7 @@ public: : AnyDataWrapperBase( std::move( other ) ), m_data( std::move( other.m_data ) ){}; const T& getData() const { return m_data; } - T& getData() { return m_data; } + T& getData() { return m_data; } private: T m_data; diff --git a/GaudiKernel/GaudiKernel/AttribStringParser.h b/GaudiKernel/GaudiKernel/AttribStringParser.h index fcf54013bc40e5ae0ae32ab9c2797d69d50267e2..686b481766613945cb408e3d57377e238121f4f4 100644 --- a/GaudiKernel/GaudiKernel/AttribStringParser.h +++ b/GaudiKernel/GaudiKernel/AttribStringParser.h @@ -72,7 +72,7 @@ namespace Gaudi private: /// Wrapped boost::sregex_iterator instance. boost::sregex_iterator m_it; - bool m_expandVars = false; + bool m_expandVars = false; /// Cached Attrib instance. Attrib m_attrib; /// Helper method used to update the cached Attrib instance when @@ -85,13 +85,13 @@ namespace Gaudi m_attrib = Attrib{( *m_it )[1], ( *m_it )[2]}; if ( m_expandVars && m_attrib.value.find( "${" ) != std::string::npos ) { static const boost::regex varexp{"\\$\\{([^}]+)\\}"}; - auto i = 1; + auto i = 1; while ( i ) { i = 0; m_attrib.value = boost::regex_replace( m_attrib.value, varexp, [&i]( const boost::smatch& m ) -> std::string { - const std::string name = m[1]; - const char* cname = name.c_str(); + const std::string name = m[1]; + const char* cname = name.c_str(); if ( System::isEnvSet( cname ) ) { ++i; return System::getEnv( cname ); @@ -117,7 +117,7 @@ namespace Gaudi private: std::string m_data; - bool m_expandVars; + bool m_expandVars; boost::sregex_iterator parse() const { diff --git a/GaudiKernel/GaudiKernel/Auditor.h b/GaudiKernel/GaudiKernel/Auditor.h index 7b3a23c29b90d31b84dc35e2c1c82e91b77da231..1554a4a56401ae5f63591d085ad0f546da747eea 100644 --- a/GaudiKernel/GaudiKernel/Auditor.h +++ b/GaudiKernel/GaudiKernel/Auditor.h @@ -136,7 +136,7 @@ private: mutable SmartIF<ISvcLocator> m_pSvcLocator; ///< Pointer to service locator service - Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; + Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the auditor be used or not"}; bool m_isInitialized = false; ///< Auditor has been initialized flag diff --git a/GaudiKernel/GaudiKernel/BoostArrayAsProperty.h b/GaudiKernel/GaudiKernel/BoostArrayAsProperty.h index dca691a272b2799ad47d4a462c6be4cf409637d5..873d19446c8dbf88f3ea690c5358208c2c2a4606 100644 --- a/GaudiKernel/GaudiKernel/BoostArrayAsProperty.h +++ b/GaudiKernel/GaudiKernel/BoostArrayAsProperty.h @@ -30,9 +30,9 @@ namespace Gaudi { // ======================================================================== template <class ITERATOR> - inline std::ostream& toStream( ITERATOR first, // begin of the sequence - ITERATOR last, // end of the sequence - std::ostream& s, // the stream + inline std::ostream& toStream( ITERATOR first, // begin of the sequence + ITERATOR last, // end of the sequence + std::ostream& s, // the stream const std::string& open, // opening const std::string& close, // closing const std::string& delim ); // delimiter diff --git a/GaudiKernel/GaudiKernel/CArrayAsProperty.h b/GaudiKernel/GaudiKernel/CArrayAsProperty.h index 44f367f0085d6b6d9e4776119dd73edd5e21e521..48cb4827d34a6ed0dc48acbd46d3299825aca0ed 100644 --- a/GaudiKernel/GaudiKernel/CArrayAsProperty.h +++ b/GaudiKernel/GaudiKernel/CArrayAsProperty.h @@ -20,7 +20,7 @@ namespace Gaudi private: /// Storage. - StorageType m_value; + StorageType m_value; VerifierType m_verifier; HandlersType m_handlers; /// helper typedefs for SFINAE @@ -102,7 +102,7 @@ namespace Gaudi /// Backward compatibility \deprecated will be removed in v29r0 /// @{ const ValueType& value() const { return *this; } - ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); } + ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); } bool setValue( const ValueType& v ) { *this = v; @@ -120,7 +120,7 @@ namespace Gaudi /// @{ /// They are instantiated only if they are implemented in the wrapped class. inline size_t size() const { return N; } - inline bool empty() const { return false; } + inline bool empty() const { return false; } template <class T = const ValueType> inline decltype( std::declval<T>()[typename T::key_type{}] ) operator[]( const typename T::key_type& key ) const { diff --git a/GaudiKernel/GaudiKernel/Chrono.h b/GaudiKernel/GaudiKernel/Chrono.h index fe1a4026135a01ba299d7c5400d3719d87f30e7c..2bebaf47d247ca4d2d4406d3442513b4ec698215 100644 --- a/GaudiKernel/GaudiKernel/Chrono.h +++ b/GaudiKernel/GaudiKernel/Chrono.h @@ -47,7 +47,7 @@ public: * @param svc pointer to Chrono Service * @param tag the unique tag */ - Chrono( IChronoSvc* svc = nullptr, // the service + Chrono( IChronoSvc* svc = nullptr, // the service const std::string& tag = "CHRONO::UNNAMED" ) // the unique tag/name { if ( svc ) { @@ -87,8 +87,8 @@ public: * @param tag the unique tag * @param svc pointer to Chrono Service */ - Chrono( const std::string& tag, // the unique tag/name - IChronoSvc* svc ) // the service + Chrono( const std::string& tag, // the unique tag/name + IChronoSvc* svc ) // the service { if ( svc ) { m_chrono = svc->chronoStart( tag ); diff --git a/GaudiKernel/GaudiKernel/ContainedObject.h b/GaudiKernel/GaudiKernel/ContainedObject.h index 2c44bdcce80990f1549590e16ffc8def4ae18a46..bf7d9e56c20b71f113c3982fe0c8e395f752a817 100644 --- a/GaudiKernel/GaudiKernel/ContainedObject.h +++ b/GaudiKernel/GaudiKernel/ContainedObject.h @@ -15,7 +15,7 @@ class ObjectList; // Typedefs typedef ObjectVector<ContainedObject> ContainedObjectVector; -typedef ObjectList<ContainedObject> ContainedObjectList; +typedef ObjectList<ContainedObject> ContainedObjectList; // Definition of the CLID for this class static const CLID CLID_ContainedObject = 190; @@ -46,7 +46,7 @@ protected: public: /// Retrieve pointer to class identifier virtual const CLID& clID() const { return classID(); } - static const CLID& classID() { return CLID_ContainedObject; } + static const CLID& classID() { return CLID_ContainedObject; } /// Access to parent object const ObjectContainerBase* parent() const { return m_parent; } diff --git a/GaudiKernel/GaudiKernel/ContextSpecificPtr.h b/GaudiKernel/GaudiKernel/ContextSpecificPtr.h index 9a3d2037c4e5d467e97db26497a7b87acb394e26..1e0630536c74cfd077e15bea943bfc91c8fc3054 100644 --- a/GaudiKernel/GaudiKernel/ContextSpecificPtr.h +++ b/GaudiKernel/GaudiKernel/ContextSpecificPtr.h @@ -92,8 +92,8 @@ namespace Gaudi accumulate( Mapper f, typename std::result_of<Mapper( const T* )>::type init, BinaryOperation op ) const { typedef typename std::result_of<Mapper( const T* )>::type R; - typedef typename StorageType::value_type V; - std::lock_guard<std::mutex> lock( m_ptrs_lock ); + typedef typename StorageType::value_type V; + std::lock_guard<std::mutex> lock( m_ptrs_lock ); return std::accumulate( m_ptrs.begin(), m_ptrs.end(), init, [&f, &op]( const R& partial, const V& p ) -> R { return op( partial, f( p.second ) ); } ); diff --git a/GaudiKernel/GaudiKernel/ConversionSvc.h b/GaudiKernel/GaudiKernel/ConversionSvc.h index 95cda1fa7575f8666d3dbda60cb11af94c9eb0c7..1d359fcd9d6cb46af5709f6a9088e66e0731a140 100644 --- a/GaudiKernel/GaudiKernel/ConversionSvc.h +++ b/GaudiKernel/GaudiKernel/ConversionSvc.h @@ -46,7 +46,7 @@ class GAUDI_API ConversionSvc : public extends<Service, IConversionSvc, IAddress { class WorkerEntry final { - CLID m_class; + CLID m_class; IConverter* m_converter; public: diff --git a/GaudiKernel/GaudiKernel/Converter.h b/GaudiKernel/GaudiKernel/Converter.h index 714063f772879be8971a7d10f06f9349aba9d34e..246d4df09cc83afaadb718bd358721289cd057c4 100644 --- a/GaudiKernel/GaudiKernel/Converter.h +++ b/GaudiKernel/GaudiKernel/Converter.h @@ -147,8 +147,8 @@ public: private: friend std::ostream& operator<<( std::ostream&, const ConverterID& ); - long m_stype; - CLID m_clid; + long m_stype; + CLID m_clid; }; inline std::ostream& operator<<( std::ostream& s, const ConverterID& id ) diff --git a/GaudiKernel/GaudiKernel/Coord3DTypes.h b/GaudiKernel/GaudiKernel/Coord3DTypes.h index 547455816663fd677a3b9279ba35f1db67cd0d5d..47de909ba497ec1af23259137ccc77bb35c8b771 100644 --- a/GaudiKernel/GaudiKernel/Coord3DTypes.h +++ b/GaudiKernel/GaudiKernel/Coord3DTypes.h @@ -28,14 +28,14 @@ namespace Gaudi // NB : Please remember to give a simple doxygen comment for each typedef - typedef ROOT::Math::Cartesian3D<double> Cartesian3D; ///< Cartesian 3D point (double) - typedef ROOT::Math::Cartesian3D<float> Cartesian3DF; ///< Cartesian 3D point (float) - typedef ROOT::Math::Polar3D<double> Polar3D; ///< Polar 3D point (double) - typedef ROOT::Math::Polar3D<float> Polar3DF; ///< Polar 3D point (float) - typedef ROOT::Math::Cylindrical3D<double> RhoPhiZ3D; ///< Cylindrical 3D point (double) - typedef ROOT::Math::Cylindrical3D<float> RhoPhiZ3DF; ///< Cylindrical 3D point (float) - typedef ROOT::Math::CylindricalEta3D<double> RhoEtaPhi3D; ///< Cylindrical Eta 3D point (double) - typedef ROOT::Math::CylindricalEta3D<float> RhoEtaPhi3DF; ///< Cylindrical Eta 3D point (float) + typedef ROOT::Math::Cartesian3D<double> Cartesian3D; ///< Cartesian 3D point (double) + typedef ROOT::Math::Cartesian3D<float> Cartesian3DF; ///< Cartesian 3D point (float) + typedef ROOT::Math::Polar3D<double> Polar3D; ///< Polar 3D point (double) + typedef ROOT::Math::Polar3D<float> Polar3DF; ///< Polar 3D point (float) + typedef ROOT::Math::Cylindrical3D<double> RhoPhiZ3D; ///< Cylindrical 3D point (double) + typedef ROOT::Math::Cylindrical3D<float> RhoPhiZ3DF; ///< Cylindrical 3D point (float) + typedef ROOT::Math::CylindricalEta3D<double> RhoEtaPhi3D; ///< Cylindrical Eta 3D point (double) + typedef ROOT::Math::CylindricalEta3D<float> RhoEtaPhi3DF; ///< Cylindrical Eta 3D point (float) }; #endif // KERNEL_COORD3DTYPES_H diff --git a/GaudiKernel/GaudiKernel/DataHandle.h b/GaudiKernel/GaudiKernel/DataHandle.h index 725ee3ec5790ae1b56552bc8aa73f9b30f6a20e7..909b9efa8689cc54b7a6228b5d051db0973ed7c4 100644 --- a/GaudiKernel/GaudiKernel/DataHandle.h +++ b/GaudiKernel/GaudiKernel/DataHandle.h @@ -39,7 +39,7 @@ namespace Gaudi virtual ~DataHandle() = default; virtual void setOwner( IDataHandleHolder* o ) { m_owner = o; } - virtual IDataHandleHolder* owner() const { return m_owner; } + virtual IDataHandleHolder* owner() const { return m_owner; } virtual Mode mode() const { return m_mode; } @@ -47,13 +47,13 @@ namespace Gaudi virtual void updateKey( const std::string& key ) const { m_key.updateKey( key ); } virtual const std::string& objKey() const { return m_key.key(); } - virtual const DataObjID& fullKey() const { return m_key; } + virtual const DataObjID& fullKey() const { return m_key; } - virtual void reset( bool ){}; + virtual void reset( bool ){}; virtual StatusCode commit() { return StatusCode::SUCCESS; } virtual std::string pythonRepr() const; - virtual bool init() { return true; } + virtual bool init() { return true; } // is this a ConditionHandle? virtual bool isCondition() const { return m_isCond; } @@ -65,7 +65,7 @@ namespace Gaudi * change in case the object had alternative names, and it should not * be visible to the end user, for which the Handle is still the same */ - mutable DataObjID m_key = {"NONE"}; + mutable DataObjID m_key = {"NONE"}; IDataHandleHolder* m_owner = nullptr; private: diff --git a/GaudiKernel/GaudiKernel/DataHandleHolderVisitor.h b/GaudiKernel/GaudiKernel/DataHandleHolderVisitor.h index a73b869b496726789fbca0c874dfdb3e2715160e..e6e54cf80f68e1d07ece313190bbdab50832f2a9 100644 --- a/GaudiKernel/GaudiKernel/DataHandleHolderVisitor.h +++ b/GaudiKernel/GaudiKernel/DataHandleHolderVisitor.h @@ -17,7 +17,7 @@ public: private: DataObjIDColl &m_ido, &m_odo; - DataObjIDColl m_ign_i, m_ign_o; + DataObjIDColl m_ign_i, m_ign_o; }; #endif diff --git a/GaudiKernel/GaudiKernel/DataHistory.h b/GaudiKernel/GaudiKernel/DataHistory.h index eacc25ecfa2d4578ef9f336488a8361dd6cad19d..12c870ee951c3fda1001cb9b588d6dbe24327038 100644 --- a/GaudiKernel/GaudiKernel/DataHistory.h +++ b/GaudiKernel/GaudiKernel/DataHistory.h @@ -57,7 +57,7 @@ public: ~DataHistory() override = default; - const CLID& clID() const override { return DataHistory::classID(); } + const CLID& clID() const override { return DataHistory::classID(); } static const CLID& classID(); std::string dataKey() const { return m_dataKey; } @@ -68,10 +68,10 @@ public: void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override; private: - CLID m_dataClassID; - std::string m_dataKey; + CLID m_dataClassID; + std::string m_dataKey; AlgorithmHistory* m_algHist; - std::string m_dummy = "none"; + std::string m_dummy = "none"; }; GAUDI_API std::ostream& operator<<( std::ostream& lhs, const DataHistory& rhs ); diff --git a/GaudiKernel/GaudiKernel/DataObjID.h b/GaudiKernel/GaudiKernel/DataObjID.h index 9df14a299036ead8137fa3127864bd237310af79..323fb6ba06de7afc0ee907ec28cb1de191ca428f 100644 --- a/GaudiKernel/GaudiKernel/DataObjID.h +++ b/GaudiKernel/GaudiKernel/DataObjID.h @@ -69,14 +69,14 @@ private: void setClid(); void setClassName(); - CLID m_clid{0}; + CLID m_clid{0}; std::size_t m_hash{0}; std::string m_className{""}; std::string m_key{"INVALID"}; - static void getClidSvc(); - static IClassIDSvc* p_clidSvc; + static void getClidSvc(); + static IClassIDSvc* p_clidSvc; static std::once_flag m_ip; }; diff --git a/GaudiKernel/GaudiKernel/DataObjectHandleBase.h b/GaudiKernel/GaudiKernel/DataObjectHandleBase.h index a66c94997cf9030335f0f755fe9b091950381ebc..420e59fd4b7a942e9557ba5b3ea9b2c408d65e66 100644 --- a/GaudiKernel/GaudiKernel/DataObjectHandleBase.h +++ b/GaudiKernel/GaudiKernel/DataObjectHandleBase.h @@ -71,7 +71,7 @@ protected: protected: SmartIF<IDataProviderSvc> m_EDS; - SmartIF<IMessageSvc> m_MS; + SmartIF<IMessageSvc> m_MS; bool m_init = false; bool m_optional = false; diff --git a/GaudiKernel/GaudiKernel/DataStreamTool.h b/GaudiKernel/GaudiKernel/DataStreamTool.h index 3de138b36eda6d5a7cefa90f52cd4b68e18d7509..2e9e5a7d78779413635fc0db8ff4cc08fed8598b 100644 --- a/GaudiKernel/GaudiKernel/DataStreamTool.h +++ b/GaudiKernel/GaudiKernel/DataStreamTool.h @@ -28,7 +28,7 @@ class IIncidentSvc; class GAUDI_API DataStreamTool : public extends<AlgTool, IDataStreamTool> { public: - typedef std::vector<EventSelectorDataStream*> Streams; + typedef std::vector<EventSelectorDataStream*> Streams; typedef std::vector<Gaudi::Property<std::string>> Properties; /// Standard constructor diff --git a/GaudiKernel/GaudiKernel/DataSvc.h b/GaudiKernel/GaudiKernel/DataSvc.h index 7a2255119fbfa88ea639e7c0174330e4f6bde8a9..9739b4dfe2f82290485bc4dcb26dc123452aa97e 100644 --- a/GaudiKernel/GaudiKernel/DataSvc.h +++ b/GaudiKernel/GaudiKernel/DataSvc.h @@ -53,7 +53,7 @@ protected: /// Pointer to incident service SmartIF<IIncidentSvc> m_incidentSvc = nullptr; - Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; + Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; Gaudi::Property<std::string> m_rootName{this, "RootName", "/Event", "name of root entry"}; Gaudi::Property<bool> m_forceLeaves{this, "ForceLeaves", false, "force creation of default leaves on registerObject"}; Gaudi::Property<std::vector<std::string>> m_inhibitPathes{this, "InhibitPathes", {}, "inhibited leaves"}; diff --git a/GaudiKernel/GaudiKernel/DllMain.icpp b/GaudiKernel/GaudiKernel/DllMain.icpp index 87b30526959ef38e8e3de8ebd031e736897d6e33..a3c1226157d9dc8cc0368305ce6705050b46fe50 100644 --- a/GaudiKernel/GaudiKernel/DllMain.icpp +++ b/GaudiKernel/GaudiKernel/DllMain.icpp @@ -42,9 +42,9 @@ namespace win #include <windows.h> } -win::BOOL APIENTRY DllMain( win::HINSTANCE hinstDLL, // handle to DLL module - win::DWORD fdwReason, // reason for calling function - win::LPVOID lpvReserved // reserved +win::BOOL APIENTRY DllMain( win::HINSTANCE hinstDLL, // handle to DLL module + win::DWORD fdwReason, // reason for calling function + win::LPVOID lpvReserved // reserved ) { System::setModuleHandle( hinstDLL ); diff --git a/GaudiKernel/GaudiKernel/EventContext.h b/GaudiKernel/GaudiKernel/EventContext.h index e3324334765f8806e8af63ab3bd1d2c2c8a8148e..6cb027f2f69c0c2f824ee99be8443c242f09eb46 100644 --- a/GaudiKernel/GaudiKernel/EventContext.h +++ b/GaudiKernel/GaudiKernel/EventContext.h @@ -27,7 +27,7 @@ public: typedef size_t ContextID_t; typedef size_t ContextEvt_t; - static const ContextID_t INVALID_CONTEXT_ID = std::numeric_limits<ContextID_t>::max(); + static const ContextID_t INVALID_CONTEXT_ID = std::numeric_limits<ContextID_t>::max(); static const ContextEvt_t INVALID_CONTEXT_EVT = std::numeric_limits<ContextEvt_t>::max(); EventContext(){}; @@ -36,9 +36,9 @@ public: m_valid = ( e == INVALID_CONTEXT_EVT || s == INVALID_CONTEXT_ID ) ? false : true; } - ContextEvt_t evt() const { return m_evt_num; } - ContextID_t slot() const { return m_evt_slot; } - bool valid() const { return m_valid; } + ContextEvt_t evt() const { return m_evt_num; } + ContextID_t slot() const { return m_evt_slot; } + bool valid() const { return m_valid; } const EventIDBase& eventID() const { return m_eid; } void set( const ContextEvt_t& e = 0, const ContextID_t& s = INVALID_CONTEXT_ID ) @@ -93,8 +93,8 @@ public: private: ContextEvt_t m_evt_num{INVALID_CONTEXT_EVT}; - ContextID_t m_evt_slot{INVALID_CONTEXT_ID}; - bool m_valid{false}; + ContextID_t m_evt_slot{INVALID_CONTEXT_ID}; + bool m_valid{false}; boost::any m_extension; diff --git a/GaudiKernel/GaudiKernel/EventIDBase.h b/GaudiKernel/GaudiKernel/EventIDBase.h index 8551373eeed000ce5b522cf47043b412830a1375..be351f877a7d8bb41a4d804ba3dd42e81bbe04ff 100644 --- a/GaudiKernel/GaudiKernel/EventIDBase.h +++ b/GaudiKernel/GaudiKernel/EventIDBase.h @@ -30,9 +30,9 @@ class EventIDBase { public: typedef unsigned int number_type; - typedef uint64_t event_number_t; + typedef uint64_t event_number_t; - static const number_type UNDEFNUM; + static const number_type UNDEFNUM; static const event_number_t UNDEFEVT; public: diff --git a/GaudiKernel/GaudiKernel/GaudiException.h b/GaudiKernel/GaudiKernel/GaudiException.h index 19418d28350654fe7081c6d764db3fadaa176b3d..8897b96a53f73dc62ef15af7d1846ca40cbe6ea8 100644 --- a/GaudiKernel/GaudiKernel/GaudiException.h +++ b/GaudiKernel/GaudiKernel/GaudiException.h @@ -171,11 +171,11 @@ public: const char* what() const throw() override { return message().c_str(); } protected: - mutable std::string m_message; /// error message - mutable std::string m_tag; /// exception tag - mutable StatusCode m_code; /// status code for exception + mutable std::string m_message; /// error message + mutable std::string m_tag; /// exception tag + mutable StatusCode m_code; /// status code for exception mutable std::unique_ptr<GaudiException> m_previous; /// "previous" element in the linked list - static bool s_proc; + static bool s_proc; }; /// overloaded printout to std::ostream diff --git a/GaudiKernel/GaudiKernel/GaudiHandle.h b/GaudiKernel/GaudiKernel/GaudiHandle.h index d8dbd9963b715fa37d0c7f137213ff74327db41f..d27a39627cf4e2edce836e7e32b2a965db112db0 100644 --- a/GaudiKernel/GaudiKernel/GaudiHandle.h +++ b/GaudiKernel/GaudiKernel/GaudiHandle.h @@ -354,7 +354,7 @@ protected: } public: - typedef std::vector<GaudiHandleBase*> BaseHandleArray; + typedef std::vector<GaudiHandleBase*> BaseHandleArray; typedef std::vector<const GaudiHandleBase*> ConstBaseHandleArray; /** Set the array of handles from list of "type/name" strings in @@ -416,14 +416,14 @@ public: // // public nested types // - typedef std::vector<T> HandleVector; - typedef typename HandleVector::value_type value_type; - typedef typename HandleVector::size_type size_type; - typedef typename HandleVector::reference reference; - typedef typename HandleVector::const_reference const_reference; - typedef typename HandleVector::iterator iterator; - typedef typename HandleVector::const_iterator const_iterator; - typedef typename HandleVector::reverse_iterator reverse_iterator; + typedef std::vector<T> HandleVector; + typedef typename HandleVector::value_type value_type; + typedef typename HandleVector::size_type size_type; + typedef typename HandleVector::reference reference; + typedef typename HandleVector::const_reference const_reference; + typedef typename HandleVector::iterator iterator; + typedef typename HandleVector::const_iterator const_iterator; + typedef typename HandleVector::reverse_iterator reverse_iterator; typedef typename HandleVector::const_reverse_iterator const_reverse_iterator; protected: @@ -463,7 +463,7 @@ public: GaudiHandleArrayBase::BaseHandleArray getBaseArray() override { GaudiHandleArrayBase::BaseHandleArray baseArray; - iterator it = begin(), itEnd = end(); + iterator it = begin(), itEnd = end(); for ( ; it != itEnd; ++it ) baseArray.push_back( &*it ); return baseArray; } @@ -471,7 +471,7 @@ public: GaudiHandleArrayBase::ConstBaseHandleArray getBaseArray() const override { GaudiHandleArrayBase::ConstBaseHandleArray baseArray; - const_iterator it = begin(), itEnd = end(); + const_iterator it = begin(), itEnd = end(); for ( ; it != itEnd; ++it ) baseArray.push_back( &*it ); return baseArray; } @@ -560,7 +560,7 @@ private: // Private data members // HandleVector m_handleArray; - bool m_retrieved{false}; + bool m_retrieved{false}; }; // Easy printing out of Handles and HandleArrays diff --git a/GaudiKernel/GaudiKernel/GrammarsV2.h b/GaudiKernel/GaudiKernel/GrammarsV2.h index 6b1aae3e619dd454cc0e2d317e681ec7437cfccd..1d6fe6363ee5511affd73be92718706064b9ddb1 100644 --- a/GaudiKernel/GaudiKernel/GrammarsV2.h +++ b/GaudiKernel/GaudiKernel/GrammarsV2.h @@ -55,7 +55,7 @@ namespace Gaudi // Grammars //============================================================================== typedef std::string::const_iterator DefaultIterator; - typedef enc::space_type DefaultSkipper; + typedef enc::space_type DefaultSkipper; //============================================================================== template <typename Iterator, typename T, typename Skipper, class Enable = void> struct Grammar_ { @@ -100,7 +100,7 @@ namespace Gaudi } //------------------------------------------------------------------------------ qi::rule<Iterator, std::string(), qi::locals<char>, Skipper> str; - qi::rule<Iterator, char()> begin_quote; + qi::rule<Iterator, char()> begin_quote; qi::rule<Iterator, void( char )> quote; //------------------------------------------------------------------------------ }; @@ -187,9 +187,9 @@ namespace Gaudi struct TupleInnerGrammar : qi::grammar<Iterator, TupleT(), qi::locals<typename tuple_get_first_type<TupleT>::type>, Skipper> { //--------------------------------------------------------------------------- - typedef TupleT ResultT; + typedef TupleT ResultT; typedef typename tuple_remove_first_type<TupleT>::type TailT; - typedef typename tuple_get_first_type<TupleT>::type HeadT; + typedef typename tuple_get_first_type<TupleT>::type HeadT; //--------------------------------------------------------------------------- struct Operations { template <typename A, typename B = boost::fusion::unused_type, typename C = boost::fusion::unused_type, @@ -259,10 +259,10 @@ namespace Gaudi tup = begin[qi::_a = qi::_1] >> grTuple[qi::_val = qi::_1] >> end( qi::_a ); } - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> tup; - TupleInnerGrammar<Iterator, TupleT, N, Skipper> grTuple; + TupleInnerGrammar<Iterator, TupleT, N, Skipper> grTuple; }; // ----------------------------------------------------------------------------- @@ -288,7 +288,7 @@ namespace Gaudi } // ---------------------------------------------------------------------------- typename Grammar_<Iterator, typename VectorT::value_type, Skipper>::Grammar elementGrammar; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> vec; @@ -321,8 +321,8 @@ namespace Gaudi template <typename Iterator, typename PairT, typename Skipper> struct PairGrammar : qi::grammar<Iterator, PairT(), qi::locals<char>, Skipper> { //------------------------------------------------------------------------------ - typedef PairT ResultT; - typedef typename PairT::first_type first_type; + typedef PairT ResultT; + typedef typename PairT::first_type first_type; typedef typename PairT::second_type second_type; //------------------------------------------------------------------------------ PairGrammar() : PairGrammar::base_type( pair ) { init( "," ); } @@ -341,9 +341,9 @@ namespace Gaudi pair_in = key >> qi::lit( delimeter ) >> value; } // ---------------------------------------------------------------------------- - typename Grammar_<Iterator, typename PairT::first_type, Skipper>::Grammar key; + typename Grammar_<Iterator, typename PairT::first_type, Skipper>::Grammar key; typename Grammar_<Iterator, typename PairT::second_type, Skipper>::Grammar value; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> pair; qi::rule<Iterator, ResultT(), Skipper> pair_in; @@ -361,8 +361,8 @@ namespace Gaudi template <typename Iterator, typename MapT, typename Skipper> struct MapGrammar : qi::grammar<Iterator, MapT(), Skipper> { //------------------------------------------------------------------------------ - typedef MapT ResultT; - typedef typename MapT::key_type KeyT; + typedef MapT ResultT; + typedef typename MapT::key_type KeyT; typedef typename MapT::mapped_type MappedT; typedef std::pair<KeyT, MappedT> PairT; @@ -398,11 +398,11 @@ namespace Gaudi map = ( ( '[' >> list >> ']' ) | ( '{' >> list >> '}' ) )[op( qi::_val, qi::_1 )]; } // ---------------------------------------------------------------------------- - typename Grammar_<Iterator, typename MapT::key_type, Skipper>::Grammar key; + typename Grammar_<Iterator, typename MapT::key_type, Skipper>::Grammar key; typename Grammar_<Iterator, typename MapT::mapped_type, Skipper>::Grammar value; - qi::rule<Iterator, PairT(), Skipper> pair; - qi::rule<Iterator, VectorPairT(), Skipper> list; - qi::rule<Iterator, ResultT(), Skipper> map; + qi::rule<Iterator, PairT(), Skipper> pair; + qi::rule<Iterator, VectorPairT(), Skipper> list; + qi::rule<Iterator, ResultT(), Skipper> map; ph::function<Operations> op; // ---------------------------------------------------------------------------- }; @@ -425,7 +425,7 @@ namespace Gaudi // ============================================================================ template <typename Iterator, typename PointT, typename Skipper> struct Pnt3DGrammar : qi::grammar<Iterator, PointT(), Skipper> { - typedef PointT ResultT; + typedef PointT ResultT; typedef typename PointT::Scalar Scalar; // ---------------------------------------------------------------------------- struct Operations { @@ -461,7 +461,7 @@ namespace Gaudi -( enc::no_case[qi::lit( "z" ) | qi::lit( "pz" )] >> ':' ) >> scalar[op( qi::_val, qi::_1, 'z' )]; } // ---------------------------------------------------------------------------- - qi::rule<Iterator, ResultT(), Skipper> point, list; + qi::rule<Iterator, ResultT(), Skipper> point, list; typename Grammar_<Iterator, Scalar, Skipper>::Grammar scalar; ph::function<Operations> op; // ---------------------------------------------------------------------------- @@ -483,7 +483,7 @@ namespace Gaudi // ============================================================================ template <typename Iterator, typename PointT, typename Skipper> struct Pnt4DGrammar : qi::grammar<Iterator, PointT(), Skipper> { - typedef PointT ResultT; + typedef PointT ResultT; typedef typename PointT::Scalar ScalarT; //----------------------------------------------------------------------------- struct Operations { @@ -534,8 +534,8 @@ namespace Gaudi -( enc::no_case[qi::lit( "z" ) | qi::lit( "pz" )] >> ':' ) >> scalar[op( qi::_val, qi::_1, 'z' )]; } // ---------------------------------------------------------------------------- - qi::rule<Iterator, ResultT(), Skipper> point3d, point4d, list3d, list4d; - qi::rule<Iterator, ScalarT(), Skipper> e; + qi::rule<Iterator, ResultT(), Skipper> point3d, point4d, list3d, list4d; + qi::rule<Iterator, ScalarT(), Skipper> e; typename Grammar_<Iterator, ScalarT, Skipper>::Grammar scalar; ph::function<Operations> op; // ---------------------------------------------------------------------------- @@ -591,7 +591,7 @@ namespace Gaudi // ---------------------------------------------------------------------------- qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> hist; qi::rule<Iterator, ResultT(), Skipper> val1, val2, val3; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; StringGrammar<Iterator, Skipper> title; ph::function<Operations> op; diff --git a/GaudiKernel/GaudiKernel/HashMap.h b/GaudiKernel/GaudiKernel/HashMap.h index b0798d9b93df367363eda4eda5fd843bb814c4be..1ee1cf690cb78e82115643e988db4ded07352bbf 100644 --- a/GaudiKernel/GaudiKernel/HashMap.h +++ b/GaudiKernel/GaudiKernel/HashMap.h @@ -74,7 +74,7 @@ namespace GaudiUtils class HashMap : public Map<K, T, M> { public: - typedef H hasher; + typedef H hasher; inline hasher hash_funct() const { return this->m_map.hash_funct(); } }; } // namespace GaudiUtils diff --git a/GaudiKernel/GaudiKernel/HistoryObj.h b/GaudiKernel/GaudiKernel/HistoryObj.h index e7e7b57568f26403df8303b5363a22beb95f9237..665fd4bc6d5d8b4cbf375b2516093684fae78ccb 100644 --- a/GaudiKernel/GaudiKernel/HistoryObj.h +++ b/GaudiKernel/GaudiKernel/HistoryObj.h @@ -24,7 +24,7 @@ public: HistoryObj() = default; virtual ~HistoryObj() = default; - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID(); static std::string convert_string( const std::string& ); diff --git a/GaudiKernel/GaudiKernel/IAlgContextSvc.h b/GaudiKernel/GaudiKernel/IAlgContextSvc.h index 04f6f1ad8b1558a0a04b39378924d419c7b40872..e113c405a7a9f8658750fdf6e630e9fca4cb0775 100644 --- a/GaudiKernel/GaudiKernel/IAlgContextSvc.h +++ b/GaudiKernel/GaudiKernel/IAlgContextSvc.h @@ -110,7 +110,7 @@ namespace Gaudi private: SmartIF<IAlgContextSvc> m_svc; - SmartIF<IAlgorithm> m_alg; + SmartIF<IAlgorithm> m_alg; }; } // end of namespace Gaudi::Utils } // end of namespace Gaudi diff --git a/GaudiKernel/GaudiKernel/IAlgExecStateSvc.h b/GaudiKernel/GaudiKernel/IAlgExecStateSvc.h index 65cd7c0e4322d2e5ae990f770964a5eebd967c7e..4a5e16e93eb64eafecee91329f9bb47139596cee 100644 --- a/GaudiKernel/GaudiKernel/IAlgExecStateSvc.h +++ b/GaudiKernel/GaudiKernel/IAlgExecStateSvc.h @@ -29,8 +29,8 @@ class AlgExecState public: enum State { None = 0, Executing = 1, Done = 2 }; - bool filterPassed() const { return m_filterPassed; } - State state() const { return m_state; } + bool filterPassed() const { return m_filterPassed; } + State state() const { return m_state; } const StatusCode& execStatus() const { return m_execStatus; } void setFilterPassed( bool f = true ) { m_filterPassed = f; } @@ -41,11 +41,11 @@ public: m_execStatus = sc; } void setExecStatus( const StatusCode& sc = StatusCode::SUCCESS ) { m_execStatus = sc; } - void reset() { *this = AlgExecState{}; } + void reset() { *this = AlgExecState{}; } private: - bool m_filterPassed{true}; - State m_state{State::None}; + bool m_filterPassed{true}; + State m_state{State::None}; StatusCode m_execStatus{StatusCode( StatusCode::FAILURE, true )}; }; diff --git a/GaudiKernel/GaudiKernel/IAlgManager.h b/GaudiKernel/GaudiKernel/IAlgManager.h index c83894781e2a8b0a48f8235082bd52e880ffd9fb..91cab084401f4e6f6711948ced5b7b44f28c5d41 100644 --- a/GaudiKernel/GaudiKernel/IAlgManager.h +++ b/GaudiKernel/GaudiKernel/IAlgManager.h @@ -39,16 +39,16 @@ public: /// Create an instance of a algorithm type that has been declared beforehand and assigns to it a name. /// It returns a pointer to an IAlgorithm. virtual StatusCode - createAlgorithm( const std::string& algtype, // Algorithm type name - const std::string& algname, // Algorithm name to be assigned - IAlgorithm*& alg, // Returned algorithm - bool managed = false, // Flag to indicate if the algorithm is managed - bool checkIfExists = true // Flag to indicate if clones of existing algorithms can be created + createAlgorithm( const std::string& algtype, // Algorithm type name + const std::string& algname, // Algorithm name to be assigned + IAlgorithm*& alg, // Returned algorithm + bool managed = false, // Flag to indicate if the algorithm is managed + bool checkIfExists = true // Flag to indicate if clones of existing algorithms can be created ) = 0; #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) /// Find an algorithm with given name in the list of known algorithms virtual StatusCode getAlgorithm( const std::string& name, // Algorithm name to be searched - IAlgorithm*& alg // Returned algorithm + IAlgorithm*& alg // Returned algorithm ) const { SmartIF<IAlgorithm>& si = const_cast<IAlgManager*>( this )->algorithm( name, false ); @@ -64,7 +64,7 @@ public: /// Returns a smart pointer to a service. virtual SmartIF<IAlgorithm>& algorithm( const Gaudi::Utils::TypeNameString& typeName, - const bool createIf = true ) = 0; + const bool createIf = true ) = 0; /// Returns a smart pointer to the requested interface of a service. template <typename T> diff --git a/GaudiKernel/GaudiKernel/IAlgorithm.h b/GaudiKernel/GaudiKernel/IAlgorithm.h index c38fd518bc4221c90f88ec28b006b1bd3bbc42dc..64b5dc842fe116c1358b8ad82a4f0ea6e97a6fb7 100644 --- a/GaudiKernel/GaudiKernel/IAlgorithm.h +++ b/GaudiKernel/GaudiKernel/IAlgorithm.h @@ -39,8 +39,8 @@ public: /** The type of the algorithm */ - virtual const std::string& type() const = 0; - virtual void setType( const std::string& ) = 0; + virtual const std::string& type() const = 0; + virtual void setType( const std::string& ) = 0; /** StringKey rep of name */ diff --git a/GaudiKernel/GaudiKernel/IDataStreamTool.h b/GaudiKernel/GaudiKernel/IDataStreamTool.h index 42feed38300052a7e0ccf8abfb8bca8f7454c3c6..ca1125ee41d10458cbf0786200fc4c8b2e2f6b2b 100644 --- a/GaudiKernel/GaudiKernel/IDataStreamTool.h +++ b/GaudiKernel/GaudiKernel/IDataStreamTool.h @@ -26,7 +26,7 @@ public: DeclareInterfaceID( IDataStreamTool, 2, 0 ); typedef std::vector<std::string> StreamSpecs; - typedef long size_type; + typedef long size_type; virtual StatusCode initializeStream( EventSelectorDataStream* ) = 0; diff --git a/GaudiKernel/GaudiKernel/IExceptionSvc.h b/GaudiKernel/GaudiKernel/IExceptionSvc.h index e319ce57d29228a4502d7d948532cdd4a03957b1..8d55cf68ee6a3396472f2e470412b6477fdbadb0 100644 --- a/GaudiKernel/GaudiKernel/IExceptionSvc.h +++ b/GaudiKernel/GaudiKernel/IExceptionSvc.h @@ -28,10 +28,10 @@ public: DeclareInterfaceID( IExceptionSvc, 3, 0 ); /// Handle caught GaudiExceptions virtual StatusCode handle( const INamedInterface& o, - const GaudiException& e ) const = 0; ///< Handle caught exceptions + const GaudiException& e ) const = 0; ///< Handle caught exceptions /// Handle caught std::exceptions virtual StatusCode handle( const INamedInterface& o, - const std::exception& e ) const = 0; ///< Handle caught exceptions + const std::exception& e ) const = 0; ///< Handle caught exceptions /// Handle caught (unknown)exceptions virtual StatusCode handle( const INamedInterface& o ) const = 0; ///< Handle caught exceptions /// Handle errors diff --git a/GaudiKernel/GaudiKernel/IFileMgr.h b/GaudiKernel/GaudiKernel/IFileMgr.h index 27474e950979a7669b6e235bf3c726762921325f..04ef247003ddd6ff78c7de83acc19fff04e8c76f 100644 --- a/GaudiKernel/GaudiKernel/IFileMgr.h +++ b/GaudiKernel/GaudiKernel/IFileMgr.h @@ -69,10 +69,10 @@ namespace Io std::string bits() const { - std::string s; - int f( _f ); - const int SHIFT = 8 * sizeof( int ) - 1; - const unsigned MASK = 1 << SHIFT; + std::string s; + int f( _f ); + const int SHIFT = 8 * sizeof( int ) - 1; + const unsigned MASK = 1 << SHIFT; for ( int i = 1; i <= SHIFT + 1; ++i ) { s += ( f & MASK ? '1' : '0' ); @@ -118,8 +118,8 @@ namespace Io {"APPEND", Io::APPEND}, {"INVALID", Io::INVALID}}}; - IoFlags fl( Io::INVALID ); - size_t j( 0 ), k( 0 ); + IoFlags fl( Io::INVALID ); + size_t j( 0 ), k( 0 ); std::string fs; while ( ( k = f.find( "|", j ) ) != std::string::npos ) { fs = f.substr( j, k - j ); @@ -185,15 +185,15 @@ namespace Io , m_isOpen( o ) , m_shared( s ){}; - Fd fd() const { return m_fd; } + Fd fd() const { return m_fd; } const std::string& name() const { return m_name; } const std::string& desc() const { return m_desc; } - IoTech tech() const { return m_tech; } - IoFlags flags() const { return m_flags; } - IoFlags iflags() const { return m_iflags; } - void* fptr() const { return m_fptr; } - bool isOpen() const { return m_isOpen; } - bool isShared() const { return m_shared; } + IoTech tech() const { return m_tech; } + IoFlags flags() const { return m_flags; } + IoFlags iflags() const { return m_iflags; } + void* fptr() const { return m_fptr; } + bool isOpen() const { return m_isOpen; } + bool isShared() const { return m_shared; } void fd( Fd f ) { m_fd = f; } void name( const std::string& n ) { m_name = n; } @@ -229,15 +229,15 @@ namespace Io } private: - Fd m_fd = -1; + Fd m_fd = -1; std::string m_name; std::string m_desc; - IoTech m_tech = UNKNOWN; - IoFlags m_flags = INVALID; - IoFlags m_iflags = INVALID; - void* m_fptr = nullptr; - bool m_isOpen = false; - bool m_shared = false; + IoTech m_tech = UNKNOWN; + IoFlags m_flags = INVALID; + IoFlags m_iflags = INVALID; + void* m_fptr = nullptr; + bool m_isOpen = false; + bool m_shared = false; }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -252,18 +252,18 @@ namespace Io typedef std::function<Io::open_t( const std::string&, Io::IoFlags, const std::string&, Io::Fd&, void*& )> bfcn_open_t; typedef std::function<Io::close_t( Io::Fd )> bfcn_close_t; - typedef std::function<Io::close_t( void* )> bfcn_closeP_t; + typedef std::function<Io::close_t( void* )> bfcn_closeP_t; typedef std::function<Io::reopen_t( Io::Fd, Io::IoFlags )> bfcn_reopen_t; - typedef std::function<Io::reopen_t( void*, Io::IoFlags )> bfcn_reopenP_t; + typedef std::function<Io::reopen_t( void*, Io::IoFlags )> bfcn_reopenP_t; // file handler functions: open, close, reopen struct FileHdlr final { IoTech tech = UNKNOWN; - bfcn_open_t b_open_fcn; - bfcn_close_t b_close_fcn; - bfcn_closeP_t b_closeP_fcn; - bfcn_reopen_t b_reopen_fcn; + bfcn_open_t b_open_fcn; + bfcn_close_t b_close_fcn; + bfcn_closeP_t b_closeP_fcn; + bfcn_reopen_t b_reopen_fcn; bfcn_reopenP_t b_reopenP_fcn; FileHdlr() = default; diff --git a/GaudiKernel/GaudiKernel/IHistorySvc.h b/GaudiKernel/GaudiKernel/IHistorySvc.h index 7052a2b8faf3d44313c2f88289daa1dffb77a755..a7872ed01e082b3337085ebe6a7542f252c43574 100644 --- a/GaudiKernel/GaudiKernel/IHistorySvc.h +++ b/GaudiKernel/GaudiKernel/IHistorySvc.h @@ -35,27 +35,27 @@ public: DeclareInterfaceID( IHistorySvc, 2, 0 ); // Job level objects - virtual StatusCode registerJob() = 0; - virtual StatusCode listProperties() const = 0; - virtual JobHistory* getJobHistory() const = 0; + virtual StatusCode registerJob() = 0; + virtual StatusCode listProperties() const = 0; + virtual JobHistory* getJobHistory() const = 0; // Service level objects - virtual StatusCode registerSvc( const IService& ) = 0; - virtual StatusCode listProperties( const IService& ) const = 0; - virtual ServiceHistory* getServiceHistory( const IService& ) const = 0; - virtual void getServiceHistory( std::set<ServiceHistory*>& ) const = 0; + virtual StatusCode registerSvc( const IService& ) = 0; + virtual StatusCode listProperties( const IService& ) const = 0; + virtual ServiceHistory* getServiceHistory( const IService& ) const = 0; + virtual void getServiceHistory( std::set<ServiceHistory*>& ) const = 0; // Algorithm level objects - virtual StatusCode registerAlg( const Algorithm& ) = 0; - virtual StatusCode listProperties( const Algorithm& ) const = 0; - virtual AlgorithmHistory* getAlgHistory( const Algorithm& ) const = 0; - virtual void getAlgHistory( std::set<AlgorithmHistory*>& ) const = 0; + virtual StatusCode registerAlg( const Algorithm& ) = 0; + virtual StatusCode listProperties( const Algorithm& ) const = 0; + virtual AlgorithmHistory* getAlgHistory( const Algorithm& ) const = 0; + virtual void getAlgHistory( std::set<AlgorithmHistory*>& ) const = 0; // AlgTool level objects - virtual StatusCode registerAlgTool( const IAlgTool& ) = 0; - virtual StatusCode listProperties( const IAlgTool& ) const = 0; - virtual AlgToolHistory* getAlgToolHistory( const IAlgTool& ) const = 0; - virtual void getAlgToolHistory( std::set<AlgToolHistory*>& ) const = 0; + virtual StatusCode registerAlgTool( const IAlgTool& ) = 0; + virtual StatusCode listProperties( const IAlgTool& ) const = 0; + virtual AlgToolHistory* getAlgToolHistory( const IAlgTool& ) const = 0; + virtual void getAlgToolHistory( std::set<AlgToolHistory*>& ) const = 0; // DataObj level objects virtual DataHistory* createDataHistoryObj( const CLID& id, const std::string& key, const std::string& storeName ) = 0; diff --git a/GaudiKernel/GaudiKernel/IIncidentSvc.h b/GaudiKernel/GaudiKernel/IIncidentSvc.h index b2141617789be4f823e8789b88bfcf65aeef5e22..d33de61c59b85829725ac55b1d92188d4e9273d7 100644 --- a/GaudiKernel/GaudiKernel/IIncidentSvc.h +++ b/GaudiKernel/GaudiKernel/IIncidentSvc.h @@ -50,7 +50,7 @@ public: class IncidentPack { public: - std::vector<std::unique_ptr<Incident>> incidents; + std::vector<std::unique_ptr<Incident>> incidents; std::vector<std::vector<IIncidentListener*>> listeners; IncidentPack( IncidentPack&& o ) : incidents( std::move( o.incidents ) ), listeners( std::move( o.listeners ) ){}; IncidentPack& operator=( IncidentPack&& o ) diff --git a/GaudiKernel/GaudiKernel/IInspector.h b/GaudiKernel/GaudiKernel/IInspector.h index f1bbb0cff0cef327a0fe3d969ed35c58fadce186..a8072ccf466c688b322f71d20febe78d1fcbdf88 100644 --- a/GaudiKernel/GaudiKernel/IInspector.h +++ b/GaudiKernel/GaudiKernel/IInspector.h @@ -30,14 +30,14 @@ protected: public: virtual ~IValue() = default; virtual void release() { delete this; } - void* ptr() { return m_P; } - const void* ptr() const { return m_P; } + void* ptr() { return m_P; } + const void* ptr() const { return m_P; } virtual long size() const = 0; virtual void construct( void* buffer ) const = 0; }; struct Tag { - long first; + long first; const std::type_info& second; Tag( long f, const std::type_info& s ) : first( f ), second( s ) {} }; diff --git a/GaudiKernel/GaudiKernel/IInterface.h b/GaudiKernel/GaudiKernel/IInterface.h index 4553a85e57ef0781101e86a6ccdd4279a22acdd7..8c1137fdbfa8ad9db603baa43d847a48604aab9a 100644 --- a/GaudiKernel/GaudiKernel/IInterface.h +++ b/GaudiKernel/GaudiKernel/IInterface.h @@ -225,7 +225,7 @@ namespace Gaudi /// List of interfaces using iids = typename Gaudi::interface_list_append<typename interface_type::ext_iids, InterfaceId>::type; - static inline std::string name() { return System::typeinfoName( typeid( INTERFACE ) ); } + static inline std::string name() { return System::typeinfoName( typeid( INTERFACE ) ); } static constexpr unsigned long majorVersion() { return majVers; } static constexpr unsigned long minorVersion() { return minVers; } diff --git a/GaudiKernel/GaudiKernel/IJobOptionsSvc.h b/GaudiKernel/GaudiKernel/IJobOptionsSvc.h index bb2b7bc73bca7550e5cef1fc93d82fbd65806fe6..4d7b8544718fe40ee8440553d322ec27d51173b2 100644 --- a/GaudiKernel/GaudiKernel/IJobOptionsSvc.h +++ b/GaudiKernel/GaudiKernel/IJobOptionsSvc.h @@ -30,7 +30,7 @@ public: virtual StatusCode setMyProperties( const std::string& client, IProperty* me ) = 0; /// Add a property into the JobOptions catalog - virtual StatusCode addPropertyToCatalogue( const std::string& client, + virtual StatusCode addPropertyToCatalogue( const std::string& client, const Gaudi::Details::PropertyBase& property ) = 0; /// Remove a property from the JobOptions catalog virtual StatusCode removePropertyFromCatalogue( const std::string& client, const std::string& name ) = 0; diff --git a/GaudiKernel/GaudiKernel/IPartPropSvc.h b/GaudiKernel/GaudiKernel/IPartPropSvc.h index ad650ae2ebe3d4c0c991b5ebd50c029dfff82a5f..4862a498a039ad933742b4b9b604b226d6a252f9 100644 --- a/GaudiKernel/GaudiKernel/IPartPropSvc.h +++ b/GaudiKernel/GaudiKernel/IPartPropSvc.h @@ -26,7 +26,7 @@ public: DeclareInterfaceID( IPartPropSvc, 2, 0 ); virtual HepPDT::ParticleDataTable* PDT() = 0; - virtual void setUnknownParticleHandler( HepPDT::ProcessUnknownID*, const std::string& ) = 0; + virtual void setUnknownParticleHandler( HepPDT::ProcessUnknownID*, const std::string& ) = 0; }; #endif diff --git a/GaudiKernel/GaudiKernel/IParticlePropertySvc.h b/GaudiKernel/GaudiKernel/IParticlePropertySvc.h index a510b77ed7b77ed6d79e78bd223b05d5b99f527f..ac76b69528580312580b10fb272f6e0283d15a60 100644 --- a/GaudiKernel/GaudiKernel/IParticlePropertySvc.h +++ b/GaudiKernel/GaudiKernel/IParticlePropertySvc.h @@ -24,8 +24,8 @@ public: // Typedefs for container type typedef std::vector<ParticleProperty*> VectPP; - typedef VectPP::const_iterator const_iterator; - typedef VectPP::iterator iterator; + typedef VectPP::const_iterator const_iterator; + typedef VectPP::iterator iterator; /** Create a new particle property @param particle String name of the particle diff --git a/GaudiKernel/GaudiKernel/ISvcLocator.h b/GaudiKernel/GaudiKernel/ISvcLocator.h index e4305c1ec850234394137f3abedab5e7e766f785..f1754b7ada78ddd51a313562d89e426ebac7e0cf 100644 --- a/GaudiKernel/GaudiKernel/ISvcLocator.h +++ b/GaudiKernel/GaudiKernel/ISvcLocator.h @@ -79,7 +79,7 @@ public: StatusCode service( const Gaudi::Utils::TypeNameString& name, T*& svc, bool createIf = true ) { if ( createIf ) { - IService* s; + IService* s; StatusCode sc = getService( name, s, true ); if ( !sc.isSuccess() ) return sc; // Must check if initialization was OK! } diff --git a/GaudiKernel/GaudiKernel/ITimelineSvc.h b/GaudiKernel/GaudiKernel/ITimelineSvc.h index 15c7f5e30c63dcbc77cb7c991e7d974bc98bc64a..660d4b0fe47c292aa2fb32271698b761a620f580 100644 --- a/GaudiKernel/GaudiKernel/ITimelineSvc.h +++ b/GaudiKernel/GaudiKernel/ITimelineSvc.h @@ -8,12 +8,12 @@ #include <chrono> typedef std::chrono::high_resolution_clock Clock; -typedef Clock::time_point time_point; +typedef Clock::time_point time_point; struct TimelineEvent { pthread_t thread; - uint slot; - uint event; + uint slot; + uint event; std::string algorithm; diff --git a/GaudiKernel/GaudiKernel/IUpdateManagerSvc.h b/GaudiKernel/GaudiKernel/IUpdateManagerSvc.h index 01e05e156d6ade3ff32176b4c073ef3047dc794d..aa74ae213c199264e8e1c51f09ce7ae139267439 100644 --- a/GaudiKernel/GaudiKernel/IUpdateManagerSvc.h +++ b/GaudiKernel/GaudiKernel/IUpdateManagerSvc.h @@ -41,9 +41,9 @@ public: virtual bool match( BaseObjectMemberFunction* ) const = 0; - virtual DataObject* castToDataObject() const = 0; + virtual DataObject* castToDataObject() const = 0; virtual ValidDataObject* castToValidDataObject() const = 0; - virtual void* castToVoid() const = 0; + virtual void* castToVoid() const = 0; }; /** @class ObjectMemberFunction @@ -155,7 +155,7 @@ private: using dest_type = ActualType; PtrSetter( dest_type*& dest ) : m_storage( &dest ) { *m_storage = nullptr; } void set( DataObject* obj ) override { *m_storage = dynamic_cast<dest_type*>( obj ); } - bool isNull() override { return *m_storage == nullptr; } + bool isNull() override { return *m_storage == nullptr; } private: /// pointer to the pointer to fill provided by the user. @@ -188,7 +188,7 @@ public: template <class CallerClass, class CondType> inline void registerCondition( CallerClass* instance, const std::string& condition, typename ObjectMemberFunction<CallerClass>::MemberFunctionType mf, - CondType*& condPtrDest ) + CondType*& condPtrDest ) { i_registerCondition( condition, new ObjectMemberFunction<CallerClass>( instance, mf ), new PtrSetter<CondType>( condPtrDest ) ); diff --git a/GaudiKernel/GaudiKernel/Incident.h b/GaudiKernel/GaudiKernel/Incident.h index ba636e20a512872fa0e074277accdb80de45bf58..37e495aecade849992ec481fd6e4c0d63b282f28 100644 --- a/GaudiKernel/GaudiKernel/Incident.h +++ b/GaudiKernel/GaudiKernel/Incident.h @@ -23,9 +23,9 @@ public: const std::string& type ///< Incident type ); - Incident( const std::string& source, ///< Incident source (service or algorithm name) - const std::string& type, ///< Incident type - const EventContext& ctx ///< EventContext + Incident( const std::string& source, ///< Incident source (service or algorithm name) + const std::string& type, ///< Incident type + const EventContext& ctx ///< EventContext ) : m_source( source ), m_type( type ), m_ctx( ctx ) { @@ -53,9 +53,9 @@ public: EventContext context() const { return m_ctx; } private: - std::string m_source; ///< Incident source - std::string m_type; ///< incident type - EventContext m_ctx; ///< Event Context when Incident created + std::string m_source; ///< Incident source + std::string m_type; ///< incident type + EventContext m_ctx; ///< Event Context when Incident created }; #ifndef _inc_types_impl_ @@ -63,7 +63,7 @@ private: #else #define _inc_type_( x ) \ extern const std::string x; \ - const std::string x { #x } + const std::string x { #x } #endif /** @namespace IncidentType * diff --git a/GaudiKernel/GaudiKernel/JobHistory.h b/GaudiKernel/GaudiKernel/JobHistory.h index 51cdecf88e21f0032d7788aeef1f37c6f9c8f2a1..74aadd4a6c7ec5149a051c78a59e6a8da3e80ee7 100644 --- a/GaudiKernel/GaudiKernel/JobHistory.h +++ b/GaudiKernel/GaudiKernel/JobHistory.h @@ -37,11 +37,11 @@ private: // data std::vector<std::string> m_environ; - PropertyList m_props; + PropertyList m_props; PropertyPairList m_ppl; std::vector<std::string> m_CVSid; - time_t m_start_time; + time_t m_start_time; public: // functions // Constructor. @@ -53,24 +53,24 @@ public: // functions virtual ~JobHistory(); // Class IDs - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID(); // add a global property void addProperty( const std::string&, const Gaudi::Details::PropertyBase* ); // Return the job history data. - std::string release_version() const { return m_release_version; } - std::string os() const { return m_osname; } - std::string hostname() const { return m_hostname; } - std::string os_version() const { return m_os_version; } - std::string machine() const { return m_machine; } - std::string dir() const { return m_dir; } - std::string cmtconfig() const { return m_cmtconfig; } + std::string release_version() const { return m_release_version; } + std::string os() const { return m_osname; } + std::string hostname() const { return m_hostname; } + std::string os_version() const { return m_os_version; } + std::string machine() const { return m_machine; } + std::string dir() const { return m_dir; } + std::string cmtconfig() const { return m_cmtconfig; } std::vector<std::string> environment() const { return m_environ; } - const PropertyList& properties() const override { return m_props; } - const PropertyPairList& propertyPairs() const { return m_ppl; } - time_t start_time() const { return m_start_time; } + const PropertyList& properties() const override { return m_props; } + const PropertyPairList& propertyPairs() const { return m_ppl; } + time_t start_time() const { return m_start_time; } void dump( std::ostream&, const bool isXML = false, int indent = 0 ) const override; diff --git a/GaudiKernel/GaudiKernel/Kernel.h b/GaudiKernel/GaudiKernel/Kernel.h index 6024fa2b950b1e6b721779567241486c1d24dd2d..53607edc8ed247696fc54ca9c021f2ebab86394f 100644 --- a/GaudiKernel/GaudiKernel/Kernel.h +++ b/GaudiKernel/GaudiKernel/Kernel.h @@ -15,7 +15,7 @@ // Large integer definition depends of the platform #ifdef _WIN32 #ifndef NO_LONGLONG_TYPEDEF -typedef __int64 longlong; +typedef __int64 longlong; typedef unsigned __int64 ulonglong; #endif @@ -34,7 +34,7 @@ typedef unsigned __int64 ulonglong; #endif #elif defined( __linux ) || defined( __APPLE__ ) #ifndef NO_LONGLONG_TYPEDEF -typedef long long int longlong; +typedef long long int longlong; typedef unsigned long long int ulonglong; #endif @@ -57,10 +57,10 @@ struct __longlong { public: long __data[2]; }; -typedef __longlong longlong; -typedef __longlong ulonglong; -static const __longlong LONGLONG_MAX = {0x7FFFFFFF, 0xFFFFFFFF}; -static const __longlong LONGLONG_MIN = {0x80000000, 0x00000000}; +typedef __longlong longlong; +typedef __longlong ulonglong; +static const __longlong LONGLONG_MAX = {0x7FFFFFFF, 0xFFFFFFFF}; +static const __longlong LONGLONG_MIN = {0x80000000, 0x00000000}; static const __ulonglong ULONGLONG_MAX = {0xFFFFFFFF, 0xFFFFFFFF}; static const __ulonglong ULONGLONG_MIN = {0x00000000, 0x00000000}; #endif // linux diff --git a/GaudiKernel/GaudiKernel/KeyedContainer.h b/GaudiKernel/GaudiKernel/KeyedContainer.h index 3e4e6c99ef9993756b4e805375e8f844ccc66d16..9e46a8f188a9b6aadf1d0cdfe03d494f6251500b 100644 --- a/GaudiKernel/GaudiKernel/KeyedContainer.h +++ b/GaudiKernel/GaudiKernel/KeyedContainer.h @@ -185,7 +185,7 @@ public: { // avoid problems with strict-aliasing rules seq_type** rptr = &m_random; - seq_type* sptr = &m_sequential; + seq_type* sptr = &m_sequential; m_cont.setup( (void*)sptr, (void**)rptr ); } KeyedContainer( KeyedContainer&& other ) @@ -651,10 +651,10 @@ inline void KeyedContainer<DATATYPE, MAPPING>::erase( iterator start_pos, iterat return; } std::for_each( start_pos, stop_pos, _RemoveRelease( this ) ); - seq_type* sptr = &m_sequential; // avoid problems with strict-aliasing rules - std::vector<void*>* v = (std::vector<void*>*)sptr; - std::vector<void*>::iterator i1 = v->begin() + std::distance( m_sequential.begin(), start_pos ); - std::vector<void*>::iterator i2 = v->begin() + std::distance( m_sequential.begin(), stop_pos ); + seq_type* sptr = &m_sequential; // avoid problems with strict-aliasing rules + std::vector<void*>* v = (std::vector<void*>*)sptr; + std::vector<void*>::iterator i1 = v->begin() + std::distance( m_sequential.begin(), start_pos ); + std::vector<void*>::iterator i2 = v->begin() + std::distance( m_sequential.begin(), stop_pos ); m_cont.erase( i1, i2 ); } diff --git a/GaudiKernel/GaudiKernel/KeyedObjectManager.h b/GaudiKernel/GaudiKernel/KeyedObjectManager.h index 22b366bb7991a0cd477dd0563bc6ff399fc1e657..48ec1147cce99d5baf6e1d63e0cfc80edc409997 100644 --- a/GaudiKernel/GaudiKernel/KeyedObjectManager.h +++ b/GaudiKernel/GaudiKernel/KeyedObjectManager.h @@ -54,7 +54,7 @@ namespace Containers mutable long m_keyCtxt; union { /// Buffer space to hold keyed container - char buffer[128]; + char buffer[128]; SETUP* s; } m_setup; diff --git a/GaudiKernel/GaudiKernel/LinkManager.h b/GaudiKernel/GaudiKernel/LinkManager.h index 106506c5f3f8e6b3e421bd88fefd30f85837eae7..fc2a56d0b1daef9ffca201b857a8da13d5634709 100644 --- a/GaudiKernel/GaudiKernel/LinkManager.h +++ b/GaudiKernel/GaudiKernel/LinkManager.h @@ -61,7 +61,7 @@ public: void setObject( const DataObject* pObject ) { m_pObject = const_cast<DataObject*>( pObject ); } /// Const access to data object const DataObject* object() const { return m_pObject; } - DataObject* object() { return m_pObject; } + DataObject* object() { return m_pObject; } /// Access to path of object const std::string& path() const { return m_path; } /// Link identifier diff --git a/GaudiKernel/GaudiKernel/LockedHandle.h b/GaudiKernel/GaudiKernel/LockedHandle.h index 23ee87d20dfe05aaddd942029dfedfbd4536ebb2..eb5ffcf3dcd42bc891918230f9e4c87e08752f08 100644 --- a/GaudiKernel/GaudiKernel/LockedHandle.h +++ b/GaudiKernel/GaudiKernel/LockedHandle.h @@ -58,7 +58,7 @@ public: operator T&() { return *m_ptr; } private: - T* m_ptr{nullptr}; + T* m_ptr{nullptr}; MutexType* m_mutex{nullptr}; }; @@ -77,7 +77,7 @@ public: operator const T&() const { return *m_ptr; } private: - const T* m_ptr; + const T* m_ptr; MutexType* m_mutex; }; @@ -96,7 +96,7 @@ public: operator bool() const { return m_ptr; } private: - T* m_ptr; + T* m_ptr; mutable MutexType* m_mutex; }; diff --git a/GaudiKernel/GaudiKernel/Map.h b/GaudiKernel/GaudiKernel/Map.h index a30473d4d866f5092b329b99de0a6187ebb40234..17f46336c8bf1fa588ec4de17add91c3dce03d1c 100644 --- a/GaudiKernel/GaudiKernel/Map.h +++ b/GaudiKernel/GaudiKernel/Map.h @@ -96,14 +96,14 @@ namespace GaudiUtils typedef typename map_type::size_type size_type; - typedef typename map_type::iterator iterator; + typedef typename map_type::iterator iterator; typedef typename map_type::const_iterator const_iterator; // typedef typename map_type::reverse_iterator reverse_iterator; // typedef typename map_type::const_reverse_iterator const_reverse_iterator; // ======================================================================== protected: // ======================================================================== - map_type m_map; + map_type m_map; static const result_type s_null_value; // ======================================================================== public: @@ -198,7 +198,7 @@ namespace GaudiUtils inline size_type size() const { return m_map.size(); } inline size_type max_size() const { return m_map.max_size(); } - inline bool empty() const { return size() == 0; } + inline bool empty() const { return size() == 0; } inline void swap( map_type& other ) { m_map.swap( other ); } // ---- extra functionalities diff --git a/GaudiKernel/GaudiKernel/Message.h b/GaudiKernel/GaudiKernel/Message.h index 07f1189ec746ac0cd24e191947487489e5448cdd..eabeddb2f8f0f1507d90fe9eae614d386add5cee 100644 --- a/GaudiKernel/GaudiKernel/Message.h +++ b/GaudiKernel/GaudiKernel/Message.h @@ -168,8 +168,8 @@ private: static const char EVTNUM = 'e'; static const char THREAD = 'X'; - size_t m_ecSlot; - long int m_ecEvt; + size_t m_ecSlot; + long int m_ecEvt; pthread_t m_ecThrd; }; diff --git a/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h b/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h index 35ead036ab76a24ff50157af04f7e417caefaad6..bd8e38c435fff672acc451c4d8081b5e53b04083 100644 --- a/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h +++ b/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h @@ -34,7 +34,7 @@ protected: // Properties Gaudi::Property<std::vector<std::string>> m_topAlgNames{this, "TopAlg", {}, "list of top level algorithms names"}; Gaudi::Property<std::vector<std::string>> m_outStreamNames{this, "OutStream", {}, "list of output stream names"}; - Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream", + Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream", "[[deprecated]] default type for OutputStream instances"}; Gaudi::Property<bool> m_printCFExp{this, "PrintControlFlowExpression", false, "Print the control flow expression representing the content of TopAlg"}; @@ -47,7 +47,7 @@ protected: SmartIF<IIncidentSvc> m_incidentSvc; /// List of top level algorithms SmartIF<IAlgExecStateSvc> m_aess; - ListAlg m_topAlgList; + ListAlg m_topAlgList; /// List of output streams ListAlg m_outStreamList; /// State of the object diff --git a/GaudiKernel/GaudiKernel/MsgStream.h b/GaudiKernel/GaudiKernel/MsgStream.h index e1fe409993d37324d7359a48fb60d0fa158deaba..94a969763c1a1c8c48cb1cf893486e09fd01d471 100644 --- a/GaudiKernel/GaudiKernel/MsgStream.h +++ b/GaudiKernel/GaudiKernel/MsgStream.h @@ -28,7 +28,7 @@ private: * streams */ typedef std::ios_base::fmtflags FLAG_TYPE; - typedef std::ios_base::iostate STATE_TYPE; + typedef std::ios_base::iostate STATE_TYPE; protected: /// Pointer to message service if buffer has send @@ -169,16 +169,16 @@ public: long flags() const { return isActive() ? m_stream.flags() : 0; } long flags( FLAG_TYPE v ) { return isActive() ? m_stream.flags( v ) : 0; } long setf( FLAG_TYPE v ) { return isActive() ? m_stream.setf( v ) : 0; } - int width() const { return isActive() ? m_stream.width() : 0; } + int width() const { return isActive() ? m_stream.width() : 0; } int width( int v ) { return isActive() ? m_stream.width( v ) : 0; } - char fill() const { return isActive() ? m_stream.fill() : (char)-1; } + char fill() const { return isActive() ? m_stream.fill() : (char)-1; } char fill( char v ) { return isActive() ? m_stream.fill( v ) : (char)-1; } - int precision() const { return isActive() ? m_stream.precision() : 0; } + int precision() const { return isActive() ? m_stream.precision() : 0; } int precision( int v ) { return isActive() ? m_stream.precision( v ) : 0; } - int rdstate() const { return isActive() ? m_stream.rdstate() : std::ios_base::failbit; } - int good() const { return isActive() ? m_stream.good() : 0; } - int eof() const { return isActive() ? m_stream.eof() : 0; } - int bad() const { return isActive() ? m_stream.bad() : 0; } + int rdstate() const { return isActive() ? m_stream.rdstate() : std::ios_base::failbit; } + int good() const { return isActive() ? m_stream.good() : 0; } + int eof() const { return isActive() ? m_stream.eof() : 0; } + int bad() const { return isActive() ? m_stream.bad() : 0; } long setf( FLAG_TYPE _f, FLAG_TYPE _m ) { return isActive() ? m_stream.setf( _f, _m ) : 0; } void unsetf( FLAG_TYPE _l ) { diff --git a/GaudiKernel/GaudiKernel/NTuple.h b/GaudiKernel/GaudiKernel/NTuple.h index 3313bab8548fcea20af627b56c04091a4f44002a..4e2909e30c7ab0eb53214d738f4e1d37fda4c522 100644 --- a/GaudiKernel/GaudiKernel/NTuple.h +++ b/GaudiKernel/GaudiKernel/NTuple.h @@ -1066,41 +1066,41 @@ namespace NTuple // ========================================================================= #ifndef ALLOW_ALL_TYPES #else - typedef Item<bool> BoolItem; - typedef Item<char> CharItem; - typedef Item<unsigned char> UCharItem; - typedef Item<short> ShortItem; - typedef Item<unsigned short> UShortItem; - typedef Item<long> LongItem; - typedef Item<long long> LongLongItem; - typedef Item<unsigned long> ULongItem; + typedef Item<bool> BoolItem; + typedef Item<char> CharItem; + typedef Item<unsigned char> UCharItem; + typedef Item<short> ShortItem; + typedef Item<unsigned short> UShortItem; + typedef Item<long> LongItem; + typedef Item<long long> LongLongItem; + typedef Item<unsigned long> ULongItem; typedef Item<unsigned long long> ULongLongItem; - typedef Item<int> IntItem; - typedef Item<unsigned int> UIntItem; - typedef Item<float> FloatItem; - typedef Item<double> DoubleItem; - typedef Array<bool> BoolArray; - typedef Array<char> CharArray; - typedef Array<unsigned char> UCharArray; - typedef Array<short> ShortArray; - typedef Array<unsigned short> UShortArray; - typedef Array<long> LongArray; - typedef Array<unsigned long> ULongArray; - typedef Array<int> IntArray; - typedef Array<unsigned int> UIntArray; - typedef Array<float> FloatArray; - typedef Array<double> DoubleArray; - typedef Matrix<bool> BoolMatrix; - typedef Matrix<char> CharMatrix; - typedef Matrix<unsigned char> UCharMatrix; - typedef Matrix<short> ShortMatrix; - typedef Matrix<unsigned short> UShortMatrix; - typedef Matrix<long> LongMatrix; - typedef Matrix<unsigned long> ULongMatrix; - typedef Matrix<int> IntMatrix; - typedef Matrix<unsigned int> UIntMatrix; - typedef Matrix<float> FloatMatrix; - typedef Matrix<double> DoubleMatrix; + typedef Item<int> IntItem; + typedef Item<unsigned int> UIntItem; + typedef Item<float> FloatItem; + typedef Item<double> DoubleItem; + typedef Array<bool> BoolArray; + typedef Array<char> CharArray; + typedef Array<unsigned char> UCharArray; + typedef Array<short> ShortArray; + typedef Array<unsigned short> UShortArray; + typedef Array<long> LongArray; + typedef Array<unsigned long> ULongArray; + typedef Array<int> IntArray; + typedef Array<unsigned int> UIntArray; + typedef Array<float> FloatArray; + typedef Array<double> DoubleArray; + typedef Matrix<bool> BoolMatrix; + typedef Matrix<char> CharMatrix; + typedef Matrix<unsigned char> UCharMatrix; + typedef Matrix<short> ShortMatrix; + typedef Matrix<unsigned short> UShortMatrix; + typedef Matrix<long> LongMatrix; + typedef Matrix<unsigned long> ULongMatrix; + typedef Matrix<int> IntMatrix; + typedef Matrix<unsigned int> UIntMatrix; + typedef Matrix<float> FloatMatrix; + typedef Matrix<double> DoubleMatrix; #endif template <class T> @@ -1111,8 +1111,8 @@ namespace NTuple } // end of namespace NTuple // Useful: -typedef SmartDataPtr<NTuple::Tuple> NTuplePtr; +typedef SmartDataPtr<NTuple::Tuple> NTuplePtr; typedef SmartDataPtr<NTuple::Directory> NTupleDirPtr; -typedef SmartDataPtr<NTuple::File> NTupleFilePtr; +typedef SmartDataPtr<NTuple::File> NTupleFilePtr; #endif // GAUDIKERNEL_NTUPLE_H diff --git a/GaudiKernel/GaudiKernel/NTupleItems.h b/GaudiKernel/GaudiKernel/NTupleItems.h index 3601e213d3620e58129e1d4984143a21a8aad9ab..e2f4d42df77732bfb6dbc77c41e4158856a902fa 100644 --- a/GaudiKernel/GaudiKernel/NTupleItems.h +++ b/GaudiKernel/GaudiKernel/NTupleItems.h @@ -48,7 +48,7 @@ namespace NTuple _DataImp( const _DataImp& ) = delete; protected: - typedef const std::string& CSTR; + typedef const std::string& CSTR; typedef const std::type_info& CTYPE; /// Entire buffer length long m_length; diff --git a/GaudiKernel/GaudiKernel/ObjectFactory.h b/GaudiKernel/GaudiKernel/ObjectFactory.h index 0d91a824aecbdba49a6b11f1872f42c70d11ae59..e2a6b8cb8f69e38550e2fb42dfc3a0038e33c439 100644 --- a/GaudiKernel/GaudiKernel/ObjectFactory.h +++ b/GaudiKernel/GaudiKernel/ObjectFactory.h @@ -9,7 +9,7 @@ class ContainedObject; typedef Gaudi::PluginService::Factory<IInterface*, IInterface*> ObjFactory; -typedef Gaudi::PluginService::Factory<DataObject*> DataObjFactory; +typedef Gaudi::PluginService::Factory<DataObject*> DataObjFactory; typedef Gaudi::PluginService::Factory<ContainedObject*> ContainedObjFactory; // Macros to declare component factories diff --git a/GaudiKernel/GaudiKernel/ObjectList.h b/GaudiKernel/GaudiKernel/ObjectList.h index 2baecddeeac633183cf7d32dee084476db3903bb..ef191381a43fbf82548063a519d03d9d525d7ac7 100644 --- a/GaudiKernel/GaudiKernel/ObjectList.h +++ b/GaudiKernel/GaudiKernel/ObjectList.h @@ -36,23 +36,23 @@ class ObjectList : public ObjectContainerBase { public: - typedef TYPE contained_type; + typedef TYPE contained_type; typedef typename std::list<TYPE*>::value_type value_type; - typedef typename std::list<TYPE*>::reference reference; + typedef typename std::list<TYPE*>::reference reference; typedef typename std::list<TYPE*>::const_reference const_reference; - typedef typename std::list<TYPE*>::iterator iterator; + typedef typename std::list<TYPE*>::iterator iterator; typedef typename std::list<TYPE*>::const_iterator const_iterator; - typedef typename std::list<TYPE*>::reverse_iterator reverse_iterator; + typedef typename std::list<TYPE*>::reverse_iterator reverse_iterator; typedef typename std::list<TYPE*>::const_reverse_iterator const_reverse_iterator; #ifdef _WIN32 - typedef typename std::vector<TYPE*>::_Tptr pointer; + typedef typename std::vector<TYPE*>::_Tptr pointer; typedef typename std::vector<TYPE*>::_Ctptr const_pointer; #else - typedef typename std::vector<TYPE*>::pointer pointer; + typedef typename std::vector<TYPE*>::pointer pointer; typedef typename std::vector<TYPE*>::const_pointer const_pointer; #endif @@ -67,7 +67,7 @@ public: ~ObjectList() override { clear(); } /// Retrieve pointer to class definition structure - const CLID& clID() const override { return ObjectList<TYPE>::classID(); } + const CLID& clID() const override { return ObjectList<TYPE>::classID(); } static const CLID& classID() { static CLID clid = TYPE::classID() + CLID_ObjectList; @@ -186,7 +186,7 @@ public: } /// Insert "value" before "position" - typename ObjectList<TYPE>::iterator insert( typename ObjectList<TYPE>::iterator position, + typename ObjectList<TYPE>::iterator insert( typename ObjectList<TYPE>::iterator position, typename ObjectList<TYPE>::const_reference value ) { value->setParent( this ); diff --git a/GaudiKernel/GaudiKernel/ObjectVector.h b/GaudiKernel/GaudiKernel/ObjectVector.h index 19530a8c740a15c12567ebdc386e639302def80e..70adf786b688f1f91fce9be723141a0cad375037 100644 --- a/GaudiKernel/GaudiKernel/ObjectVector.h +++ b/GaudiKernel/GaudiKernel/ObjectVector.h @@ -37,22 +37,22 @@ class ObjectVector : public ObjectContainerBase { public: - typedef TYPE contained_type; + typedef TYPE contained_type; typedef typename std::vector<TYPE*>::value_type value_type; - typedef typename std::vector<TYPE*>::reference reference; + typedef typename std::vector<TYPE*>::reference reference; typedef typename std::vector<TYPE*>::const_reference const_reference; - typedef typename std::vector<TYPE*>::iterator iterator; + typedef typename std::vector<TYPE*>::iterator iterator; typedef typename std::vector<TYPE*>::const_iterator const_iterator; - typedef typename std::vector<TYPE*>::reverse_iterator reverse_iterator; + typedef typename std::vector<TYPE*>::reverse_iterator reverse_iterator; typedef typename std::vector<TYPE*>::const_reverse_iterator const_reverse_iterator; #ifdef _WIN32 - typedef typename std::vector<TYPE*>::_Tptr pointer; + typedef typename std::vector<TYPE*>::_Tptr pointer; typedef typename std::vector<TYPE*>::_Ctptr const_pointer; #else - typedef typename std::vector<TYPE*>::pointer pointer; + typedef typename std::vector<TYPE*>::pointer pointer; typedef typename std::vector<TYPE*>::const_pointer const_pointer; #endif @@ -207,7 +207,7 @@ public: } /// Insert "value" before "position" - typename ObjectVector<TYPE>::iterator insert( typename ObjectVector<TYPE>::iterator position, + typename ObjectVector<TYPE>::iterator insert( typename ObjectVector<TYPE>::iterator position, typename ObjectVector<TYPE>::const_reference value ) { value->setParent( this ); diff --git a/GaudiKernel/GaudiKernel/Parsers.h b/GaudiKernel/GaudiKernel/Parsers.h index 5409037a7767813e4a15affc2ac921e3b827f9fe..01e6694729e183372620a40550c3a8c4c88f77d1 100644 --- a/GaudiKernel/GaudiKernel/Parsers.h +++ b/GaudiKernel/GaudiKernel/Parsers.h @@ -495,7 +495,7 @@ namespace Gaudi { typedef std::vector<T> _Vct; // create the temporary vector - _Vct tmp; + _Vct tmp; StatusCode sc = parse( tmp, input ); if ( sc.isFailure() ) { return sc; @@ -523,7 +523,7 @@ namespace Gaudi std::fill_n( result, N, ' ' ); // create the temporary string std::string tmp; - StatusCode sc = parse( tmp, input ); + StatusCode sc = parse( tmp, input ); if ( sc.isFailure() ) { return sc; } // RETURN diff --git a/GaudiKernel/GaudiKernel/Point3DTypes.h b/GaudiKernel/GaudiKernel/Point3DTypes.h index 8e2d2b62ca727a4ca7c882e85f7196a09d5d640b..daf13c2912b08c2c0388597c39d3d1f2807013f7 100644 --- a/GaudiKernel/GaudiKernel/Point3DTypes.h +++ b/GaudiKernel/GaudiKernel/Point3DTypes.h @@ -27,14 +27,14 @@ namespace Gaudi // NB : Please remember to give a simple doxygen comment for each tyedef - typedef ROOT::Math::XYZPoint XYZPoint; ///< 3D cartesian point (double) - typedef ROOT::Math::Polar3DPoint Polar3DPoint; ///< 3D polar point (double) + typedef ROOT::Math::XYZPoint XYZPoint; ///< 3D cartesian point (double) + typedef ROOT::Math::Polar3DPoint Polar3DPoint; ///< 3D polar point (double) typedef ROOT::Math::RhoEtaPhiPoint RhoEtaPhiPoint; ///< 3D RhoEtaPhi point (double) - typedef ROOT::Math::RhoZPhiPoint RhoZPhiPoint; ///< 3D RhoZPhi point (double) + typedef ROOT::Math::RhoZPhiPoint RhoZPhiPoint; ///< 3D RhoZPhi point (double) - typedef ROOT::Math::XYZPointF XYZPointF; ///< 3D cartesian point (float) - typedef ROOT::Math::Polar3DPointF Polar3DPointF; ///< 3D polar point (float) + typedef ROOT::Math::XYZPointF XYZPointF; ///< 3D cartesian point (float) + typedef ROOT::Math::Polar3DPointF Polar3DPointF; ///< 3D polar point (float) typedef ROOT::Math::RhoEtaPhiPointF RhoEtaPhiPointF; ///< 3D RhoEtaPhi point (float) - typedef ROOT::Math::RhoZPhiPointF RhoZPhiPointF; ///< 3D RhoZPhi point (float) + typedef ROOT::Math::RhoZPhiPointF RhoZPhiPointF; ///< 3D RhoZPhi point (float) } #endif // KERNEL_POINT3DTYPES_H diff --git a/GaudiKernel/GaudiKernel/Property.h b/GaudiKernel/GaudiKernel/Property.h index 935a04dfca450648a73f1fa92a763ea363564705..8485892c0f224a579f4bb72924b9036971efe23b 100644 --- a/GaudiKernel/GaudiKernel/Property.h +++ b/GaudiKernel/GaudiKernel/Property.h @@ -260,8 +260,8 @@ namespace Gaudi throw std::logic_error( "setReadHandler not implemented for this class" ); } std::function<void( PropertyBase& )> getReadHandler() const { return nullptr; } - void useUpdateHandler( const PropertyBase& ) const {} - void setUpdateHandler( std::function<void( PropertyBase& )> ) + void useUpdateHandler( const PropertyBase& ) const {} + void setUpdateHandler( std::function<void( PropertyBase& )> ) { throw std::logic_error( "setUpdateHandler not implemented for this class" ); } @@ -276,7 +276,7 @@ namespace Gaudi } } void setReadHandler( std::function<void( PropertyBase& )> fun ) { m_readCallBack = std::move( fun ); } - std::function<void( PropertyBase& )> getReadHandler() const { return m_readCallBack; } + std::function<void( PropertyBase& )> getReadHandler() const { return m_readCallBack; } }; struct UpdateHandler : NoHandler { std::function<void( PropertyBase& )> m_updateCallBack; @@ -328,7 +328,7 @@ namespace Gaudi private: /// Storage. - StorageType m_value; + StorageType m_value; VerifierType m_verifier; HandlersType m_handlers; /// helper typedefs for SFINAE @@ -477,7 +477,7 @@ namespace Gaudi /// Backward compatibility (\deprecated will be removed) /// @{ const ValueType& value() const { return *this; } - ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); } + ValueType& value() { return const_cast<ValueType&>( (const ValueType&)*this ); } bool setValue( const ValueType& v ) { *this = v; @@ -705,78 +705,78 @@ template <class TYPE> using SimplePropertyRef = Gaudi::Property<TYPE&>; // Typedef Properties for built-in types -typedef Gaudi::Property<bool> BooleanProperty; -typedef Gaudi::Property<char> CharProperty; -typedef Gaudi::Property<signed char> SignedCharProperty; -typedef Gaudi::Property<unsigned char> UnsignedCharProperty; -typedef Gaudi::Property<short> ShortProperty; -typedef Gaudi::Property<unsigned short> UnsignedShortProperty; -typedef Gaudi::Property<int> IntegerProperty; -typedef Gaudi::Property<unsigned int> UnsignedIntegerProperty; -typedef Gaudi::Property<long> LongProperty; -typedef Gaudi::Property<unsigned long> UnsignedLongProperty; -typedef Gaudi::Property<long long> LongLongProperty; +typedef Gaudi::Property<bool> BooleanProperty; +typedef Gaudi::Property<char> CharProperty; +typedef Gaudi::Property<signed char> SignedCharProperty; +typedef Gaudi::Property<unsigned char> UnsignedCharProperty; +typedef Gaudi::Property<short> ShortProperty; +typedef Gaudi::Property<unsigned short> UnsignedShortProperty; +typedef Gaudi::Property<int> IntegerProperty; +typedef Gaudi::Property<unsigned int> UnsignedIntegerProperty; +typedef Gaudi::Property<long> LongProperty; +typedef Gaudi::Property<unsigned long> UnsignedLongProperty; +typedef Gaudi::Property<long long> LongLongProperty; typedef Gaudi::Property<unsigned long long> UnsignedLongLongProperty; -typedef Gaudi::Property<float> FloatProperty; -typedef Gaudi::Property<double> DoubleProperty; -typedef Gaudi::Property<long double> LongDoubleProperty; +typedef Gaudi::Property<float> FloatProperty; +typedef Gaudi::Property<double> DoubleProperty; +typedef Gaudi::Property<long double> LongDoubleProperty; typedef Gaudi::Property<std::string> StringProperty; // Typedef PropertyRefs for built-in types -typedef Gaudi::Property<bool&> BooleanPropertyRef; -typedef Gaudi::Property<char&> CharPropertyRef; -typedef Gaudi::Property<signed char&> SignedCharPropertyRef; -typedef Gaudi::Property<unsigned char&> UnsignedCharPropertyRef; -typedef Gaudi::Property<short&> ShortPropertyRef; -typedef Gaudi::Property<unsigned short&> UnsignedShortPropertyRef; -typedef Gaudi::Property<int&> IntegerPropertyRef; -typedef Gaudi::Property<unsigned int&> UnsignedIntegerPropertyRef; -typedef Gaudi::Property<long&> LongPropertyRef; -typedef Gaudi::Property<unsigned long&> UnsignedLongPropertyRef; -typedef Gaudi::Property<long long&> LongLongPropertyRef; +typedef Gaudi::Property<bool&> BooleanPropertyRef; +typedef Gaudi::Property<char&> CharPropertyRef; +typedef Gaudi::Property<signed char&> SignedCharPropertyRef; +typedef Gaudi::Property<unsigned char&> UnsignedCharPropertyRef; +typedef Gaudi::Property<short&> ShortPropertyRef; +typedef Gaudi::Property<unsigned short&> UnsignedShortPropertyRef; +typedef Gaudi::Property<int&> IntegerPropertyRef; +typedef Gaudi::Property<unsigned int&> UnsignedIntegerPropertyRef; +typedef Gaudi::Property<long&> LongPropertyRef; +typedef Gaudi::Property<unsigned long&> UnsignedLongPropertyRef; +typedef Gaudi::Property<long long&> LongLongPropertyRef; typedef Gaudi::Property<unsigned long long&> UnsignedLongLongPropertyRef; -typedef Gaudi::Property<float&> FloatPropertyRef; -typedef Gaudi::Property<double&> DoublePropertyRef; -typedef Gaudi::Property<long double&> LongDoublePropertyRef; +typedef Gaudi::Property<float&> FloatPropertyRef; +typedef Gaudi::Property<double&> DoublePropertyRef; +typedef Gaudi::Property<long double&> LongDoublePropertyRef; typedef Gaudi::Property<std::string&> StringPropertyRef; // Typedef "Arrays" of Properties for built-in types -typedef Gaudi::Property<std::vector<bool>> BooleanArrayProperty; -typedef Gaudi::Property<std::vector<char>> CharArrayProperty; -typedef Gaudi::Property<std::vector<signed char>> SignedCharArrayProperty; -typedef Gaudi::Property<std::vector<unsigned char>> UnsignedCharArrayProperty; -typedef Gaudi::Property<std::vector<short>> ShortArrayProperty; -typedef Gaudi::Property<std::vector<unsigned short>> UnsignedShortArrayProperty; -typedef Gaudi::Property<std::vector<int>> IntegerArrayProperty; -typedef Gaudi::Property<std::vector<unsigned int>> UnsignedIntegerArrayProperty; -typedef Gaudi::Property<std::vector<long>> LongArrayProperty; -typedef Gaudi::Property<std::vector<unsigned long>> UnsignedLongArrayProperty; -typedef Gaudi::Property<std::vector<long long>> LongLongArrayProperty; +typedef Gaudi::Property<std::vector<bool>> BooleanArrayProperty; +typedef Gaudi::Property<std::vector<char>> CharArrayProperty; +typedef Gaudi::Property<std::vector<signed char>> SignedCharArrayProperty; +typedef Gaudi::Property<std::vector<unsigned char>> UnsignedCharArrayProperty; +typedef Gaudi::Property<std::vector<short>> ShortArrayProperty; +typedef Gaudi::Property<std::vector<unsigned short>> UnsignedShortArrayProperty; +typedef Gaudi::Property<std::vector<int>> IntegerArrayProperty; +typedef Gaudi::Property<std::vector<unsigned int>> UnsignedIntegerArrayProperty; +typedef Gaudi::Property<std::vector<long>> LongArrayProperty; +typedef Gaudi::Property<std::vector<unsigned long>> UnsignedLongArrayProperty; +typedef Gaudi::Property<std::vector<long long>> LongLongArrayProperty; typedef Gaudi::Property<std::vector<unsigned long long>> UnsignedLongLongArrayProperty; -typedef Gaudi::Property<std::vector<float>> FloatArrayProperty; -typedef Gaudi::Property<std::vector<double>> DoubleArrayProperty; -typedef Gaudi::Property<std::vector<long double>> LongDoubleArrayProperty; +typedef Gaudi::Property<std::vector<float>> FloatArrayProperty; +typedef Gaudi::Property<std::vector<double>> DoubleArrayProperty; +typedef Gaudi::Property<std::vector<long double>> LongDoubleArrayProperty; typedef Gaudi::Property<std::vector<std::string>> StringArrayProperty; // Typedef "Arrays" of PropertyRefs for built-in types -typedef Gaudi::Property<std::vector<bool>&> BooleanArrayPropertyRef; -typedef Gaudi::Property<std::vector<char>&> CharArrayPropertyRef; -typedef Gaudi::Property<std::vector<signed char>&> SignedCharArrayPropertyRef; -typedef Gaudi::Property<std::vector<unsigned char>&> UnsignedCharArrayPropertyRef; -typedef Gaudi::Property<std::vector<short>&> ShortArrayPropertyRef; -typedef Gaudi::Property<std::vector<unsigned short>&> UnsignedShortArrayPropertyRef; -typedef Gaudi::Property<std::vector<int>&> IntegerArrayPropertyRef; -typedef Gaudi::Property<std::vector<unsigned int>&> UnsignedIntegerArrayPropertyRef; -typedef Gaudi::Property<std::vector<long>&> LongArrayPropertyRef; -typedef Gaudi::Property<std::vector<unsigned long>&> UnsignedLongArrayPropertyRef; -typedef Gaudi::Property<std::vector<long long>&> LongLongArrayPropertyRef; +typedef Gaudi::Property<std::vector<bool>&> BooleanArrayPropertyRef; +typedef Gaudi::Property<std::vector<char>&> CharArrayPropertyRef; +typedef Gaudi::Property<std::vector<signed char>&> SignedCharArrayPropertyRef; +typedef Gaudi::Property<std::vector<unsigned char>&> UnsignedCharArrayPropertyRef; +typedef Gaudi::Property<std::vector<short>&> ShortArrayPropertyRef; +typedef Gaudi::Property<std::vector<unsigned short>&> UnsignedShortArrayPropertyRef; +typedef Gaudi::Property<std::vector<int>&> IntegerArrayPropertyRef; +typedef Gaudi::Property<std::vector<unsigned int>&> UnsignedIntegerArrayPropertyRef; +typedef Gaudi::Property<std::vector<long>&> LongArrayPropertyRef; +typedef Gaudi::Property<std::vector<unsigned long>&> UnsignedLongArrayPropertyRef; +typedef Gaudi::Property<std::vector<long long>&> LongLongArrayPropertyRef; typedef Gaudi::Property<std::vector<unsigned long long>&> UnsignedLongLongArrayPropertyRef; -typedef Gaudi::Property<std::vector<float>&> FloatArrayPropertyRef; -typedef Gaudi::Property<std::vector<double>&> DoubleArrayPropertyRef; -typedef Gaudi::Property<std::vector<long double>&> LongDoubleArrayPropertyRef; +typedef Gaudi::Property<std::vector<float>&> FloatArrayPropertyRef; +typedef Gaudi::Property<std::vector<double>&> DoubleArrayPropertyRef; +typedef Gaudi::Property<std::vector<long double>&> LongDoubleArrayPropertyRef; typedef Gaudi::Property<std::vector<std::string>&> StringArrayPropertyRef; diff --git a/GaudiKernel/GaudiKernel/PropertyHolder.h b/GaudiKernel/GaudiKernel/PropertyHolder.h index 7c60fdae3ceba780dada72b75a031d4676008e9e..e400fa27861a948a47b8d47a6337d40c891a4a11 100644 --- a/GaudiKernel/GaudiKernel/PropertyHolder.h +++ b/GaudiKernel/GaudiKernel/PropertyHolder.h @@ -153,8 +153,8 @@ public: if ( !rsvc ) { return nullptr; } - const std::string& nam = rname.empty() ? name : rname; - Gaudi::Details::PropertyBase* p = property( nam, rsvc->getProperties() ); + const std::string& nam = rname.empty() ? name : rname; + Gaudi::Details::PropertyBase* p = property( nam, rsvc->getProperties() ); m_remoteProperties.emplace_back( name, std::make_pair( rsvc, nam ) ); return p; } @@ -224,7 +224,7 @@ public: { std::string name; std::string value; - StatusCode sc = Gaudi::Parsers::parse( name, value, s ); + StatusCode sc = Gaudi::Parsers::parse( name, value, s ); if ( sc.isFailure() ) { return sc; } @@ -363,7 +363,7 @@ protected: private: /// get the property by name form the proposed list - Gaudi::Details::PropertyBase* property( const std::string& name, + Gaudi::Details::PropertyBase* property( const std::string& name, const std::vector<Gaudi::Details::PropertyBase*>& props ) const { auto it = std::find_if( props.begin(), props.end(), [&name]( Gaudi::Details::PropertyBase* p ) { diff --git a/GaudiKernel/GaudiKernel/PropertyMgr.h b/GaudiKernel/GaudiKernel/PropertyMgr.h index c449f0f615672282dc40dfb83e32e44c64cd931f..5eabce56b44dcc6c92cfe3dcc7356ea2700dcb84 100644 --- a/GaudiKernel/GaudiKernel/PropertyMgr.h +++ b/GaudiKernel/GaudiKernel/PropertyMgr.h @@ -123,7 +123,7 @@ protected: private: /// get the property by name form the proposed list - Gaudi::Details::PropertyBase* property( const std::string& name, + Gaudi::Details::PropertyBase* property( const std::string& name, const std::vector<Gaudi::Details::PropertyBase*>& props ) const; /// Throw an exception if the name is already present in the diff --git a/GaudiKernel/GaudiKernel/Range.h b/GaudiKernel/GaudiKernel/Range.h index e880cd4cb63a136c6990e5f9187d109fb6b7543c..b59f29eabe09aa318b1c819fabdacd42af9512ea 100644 --- a/GaudiKernel/GaudiKernel/Range.h +++ b/GaudiKernel/GaudiKernel/Range.h @@ -68,7 +68,7 @@ namespace Gaudi template <class CONTAINER> struct container { typedef typename details::_container<CONTAINER, details::_has_typename_container_<CONTAINER>::value>::Container - Container; + Container; typedef typename CONTAINER::const_iterator Iterator; }; // ========================================================================= @@ -126,8 +126,8 @@ namespace Gaudi public: // typedef typename iter_traits::value_type value_type; - typedef typename iter_traits::reference reference; - typedef typename iter_traits::reference const_reference; + typedef typename iter_traits::reference reference; + typedef typename iter_traits::reference const_reference; // typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<iterator> const_reverse_iterator; diff --git a/GaudiKernel/GaudiKernel/RefTable.h b/GaudiKernel/GaudiKernel/RefTable.h index 9f277fb0088503818b51222f069de2771eb5ab81..a470234c58da325079295d7e1e888530359f1676 100644 --- a/GaudiKernel/GaudiKernel/RefTable.h +++ b/GaudiKernel/GaudiKernel/RefTable.h @@ -200,7 +200,7 @@ public: { EntryType* entry = i_reference( from ); if ( 0 == entry ) { - bool result = insertMapElement( from, EntryType() ); + bool result = insertMapElement( from, EntryType() ); EntryType* newEntry = i_reference( from ); if ( !( 0 == newEntry ) ) { newEntry->push_back( SmartRef<TO>( to ) ); @@ -216,7 +216,7 @@ public: { EntryType* entry = i_reference( from ); if ( 0 == entry ) { - bool result = insertMapElement( from, EntryType() ); + bool result = insertMapElement( from, EntryType() ); EntryType* newEntry = i_reference( from ); if ( !( 0 == newEntry ) ) { newEntry->push_back( to ); @@ -236,14 +236,14 @@ public: EntryType& reference( const FROM* from ) { static EntryType empty; - EntryType* e = i_reference( from ); + EntryType* e = i_reference( from ); return e ? *e : empty; } /// Find Reference from it's source entry (CONST) const EntryType& reference( const FROM* from ) const { static const EntryType empty; - EntryType* e = i_reference( from ); + EntryType* e = i_reference( from ); return e ? *e : empty; } /// Check if two entries are Referenced to each other diff --git a/GaudiKernel/GaudiKernel/SVectorAsProperty.h b/GaudiKernel/GaudiKernel/SVectorAsProperty.h index 19f70b0e812996aa7930e4170f14d206a2666717..57112d0da5c4352648d279ece62829076ad69f11 100644 --- a/GaudiKernel/GaudiKernel/SVectorAsProperty.h +++ b/GaudiKernel/GaudiKernel/SVectorAsProperty.h @@ -44,7 +44,7 @@ namespace Gaudi StatusCode parse( ROOT::Math::SVector<SCALAR, N>& result, const std::string& input ) { std::vector<double> tmp; - StatusCode sc = parse( tmp, input ); + StatusCode sc = parse( tmp, input ); if ( sc.isFailure() ) { return sc; } // RETURN diff --git a/GaudiKernel/GaudiKernel/Service.h b/GaudiKernel/GaudiKernel/Service.h index 67e6bf4d8f6247a7d6b6e4ee5784a0efd4d97c2c..0f70f69ca22eef26cd386bf750fc244438b50266 100644 --- a/GaudiKernel/GaudiKernel/Service.h +++ b/GaudiKernel/GaudiKernel/Service.h @@ -45,16 +45,16 @@ public: const std::string& name() const override; // State machine implementation - StatusCode configure() override { return StatusCode::SUCCESS; } - StatusCode initialize() override; - StatusCode start() override; - StatusCode stop() override; - StatusCode finalize() override; - StatusCode terminate() override { return StatusCode::SUCCESS; } + StatusCode configure() override { return StatusCode::SUCCESS; } + StatusCode initialize() override; + StatusCode start() override; + StatusCode stop() override; + StatusCode finalize() override; + StatusCode terminate() override { return StatusCode::SUCCESS; } Gaudi::StateMachine::State FSMState() const override { return m_state; } Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; } - StatusCode reinitialize() override; - StatusCode restart() override; + StatusCode reinitialize() override; + StatusCode restart() override; /** Initialize Service */ StatusCode sysInitialize() override; @@ -85,7 +85,7 @@ public: StatusCode service( const std::string& name, const T*& psvc, bool createIf = true ) const { ISvcLocator& svcLoc = *serviceLocator(); - auto ptr = ServiceLocatorHelper( svcLoc, *this ) + auto ptr = ServiceLocatorHelper( svcLoc, *this ) .service<T>( name, !createIf, // quiet createIf ); if ( ptr ) { @@ -165,22 +165,22 @@ protected: int outputLevel() const { return m_outputLevel.value(); } private: - void sysInitialize_imp(); - StatusCode m_initSC; + void sysInitialize_imp(); + StatusCode m_initSC; std::once_flag m_initFlag; /** Service Name */ std::string m_name; /** Service Locator reference */ mutable SmartIF<ISvcLocator> m_svcLocator; - SmartIF<ISvcManager> m_svcManager; + SmartIF<ISvcManager> m_svcManager; void setServiceManager( ISvcManager* ism ) override; protected: // Properties - Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; + Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"}; Gaudi::Property<bool> m_auditInit{this, "AuditServices", false, "[[deprecated]] unused"}; Gaudi::Property<bool> m_auditorInitialize{this, "AuditInitialize", false, "trigger auditor on initialize()"}; Gaudi::Property<bool> m_auditorStart{this, "AuditStart", false, "trigger auditor on start()"}; diff --git a/GaudiKernel/GaudiKernel/ServiceHistory.h b/GaudiKernel/GaudiKernel/ServiceHistory.h index 5ea2074754bc5d7476974700ed2098b2b0ec97c6..65b24d4dc21def6dfe2330e4e485505d0846a66f 100644 --- a/GaudiKernel/GaudiKernel/ServiceHistory.h +++ b/GaudiKernel/GaudiKernel/ServiceHistory.h @@ -29,7 +29,7 @@ public: virtual ~ServiceHistory() = default; // Class IDs - const CLID& clID() const override { return classID(); } + const CLID& clID() const override { return classID(); } static const CLID& classID(); // Return the service properties. @@ -46,10 +46,10 @@ public: const std::string& version() const override { return m_version; } private: - const IService* m_pService; + const IService* m_pService; const JobHistory* m_jobHistory; - std::string m_name, m_type, m_version; - PropertyList m_properties; + std::string m_name, m_type, m_version; + PropertyList m_properties; }; // Output stream. diff --git a/GaudiKernel/GaudiKernel/ServiceLocatorHelper.h b/GaudiKernel/GaudiKernel/ServiceLocatorHelper.h index 893b737588f80d11115656cb8459a30f7d59d9c9..bc46981b5784913af031c447d94c9f70a1b49d0b 100644 --- a/GaudiKernel/GaudiKernel/ServiceLocatorHelper.h +++ b/GaudiKernel/GaudiKernel/ServiceLocatorHelper.h @@ -39,8 +39,8 @@ public: { } #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) - ServiceLocatorHelper( ISvcLocator& svcLoc, - const MsgStream& log, // use requester msg level + ServiceLocatorHelper( ISvcLocator& svcLoc, + const MsgStream& log, // use requester msg level const std::string& requesterName ) : m_svcLoc( svcLoc ), m_msgLog( log ), m_requesterName( requesterName ) { @@ -70,12 +70,12 @@ public: private: std::string threadName() const; std::string threadedName( const std::string& name ) const; - bool isInThread() const; - ISvcLocator* serviceLocator() const { return &m_svcLoc; } - MsgStream& log() const { return m_msgLog; } + bool isInThread() const; + ISvcLocator* serviceLocator() const { return &m_svcLoc; } + MsgStream& log() const { return m_msgLog; } const std::string& requesterName() const { return m_requesterName; } - ISvcLocator& m_svcLoc; - mutable MsgStream m_msgLog; - std::string m_requesterName; + ISvcLocator& m_svcLoc; + mutable MsgStream m_msgLog; + std::string m_requesterName; }; #endif diff --git a/GaudiKernel/GaudiKernel/SharedObjectsContainer.h b/GaudiKernel/GaudiKernel/SharedObjectsContainer.h index 1fb7918ce8a791cb2bc2ccdea3cf1395ef517f56..2b33348f5d230f67c458b819fc0a3a6e5423fba2 100644 --- a/GaudiKernel/GaudiKernel/SharedObjectsContainer.h +++ b/GaudiKernel/GaudiKernel/SharedObjectsContainer.h @@ -33,13 +33,13 @@ public: /// the actual container type typedef std::vector<const TYPE*> ConstVector; /// various types (to make STL happy) - typedef typename ConstVector::value_type value_type; - typedef typename ConstVector::size_type size_type; - typedef typename ConstVector::reference reference; - typedef typename ConstVector::const_reference const_reference; - typedef typename ConstVector::iterator iterator; - typedef typename ConstVector::const_iterator const_iterator; - typedef typename ConstVector::reverse_iterator reverse_iterator; + typedef typename ConstVector::value_type value_type; + typedef typename ConstVector::size_type size_type; + typedef typename ConstVector::reference reference; + typedef typename ConstVector::const_reference const_reference; + typedef typename ConstVector::iterator iterator; + typedef typename ConstVector::const_iterator const_iterator; + typedef typename ConstVector::reverse_iterator reverse_iterator; typedef typename ConstVector::const_reverse_iterator const_reverse_iterator; // ========================================================================== public: @@ -267,12 +267,12 @@ public: // ========================================================================== public: // ========================================================================== - iterator begin() { return m_data.begin(); } - iterator end() { return m_data.end(); } - const_iterator begin() const { return m_data.begin(); } - const_iterator end() const { return m_data.end(); } - reverse_iterator rbegin() { return m_data.rbegin(); } - reverse_iterator rend() { return m_data.rend(); } + iterator begin() { return m_data.begin(); } + iterator end() { return m_data.end(); } + const_iterator begin() const { return m_data.begin(); } + const_iterator end() const { return m_data.end(); } + reverse_iterator rbegin() { return m_data.rbegin(); } + reverse_iterator rend() { return m_data.rend(); } const_reverse_iterator rbegin() const { return m_data.rbegin(); } const_reverse_iterator rend() const { return m_data.rend(); } // ========================================================================== diff --git a/GaudiKernel/GaudiKernel/SmartRef.h b/GaudiKernel/GaudiKernel/SmartRef.h index 132c956bc1a61484c944bc8ec77596a8a35ac25c..ee5826492050db03414c70bce474f0d8a91f966b 100644 --- a/GaudiKernel/GaudiKernel/SmartRef.h +++ b/GaudiKernel/GaudiKernel/SmartRef.h @@ -164,7 +164,7 @@ public: /// Access to embedded type const std::type_info* type() const { return &typeid( TYPE ); } /// Access to raw data pointer - TYPE* data() { return const_cast<TYPE*>( m_target ); } + TYPE* data() { return const_cast<TYPE*>( m_target ); } const TYPE* data() const { return m_target; } /// Access to the object const TYPE* target() const; diff --git a/GaudiKernel/GaudiKernel/SmartRefVector.h b/GaudiKernel/GaudiKernel/SmartRefVector.h index a993a1e65599c9b94d57167221bd3bffc23432b9..c6e93e4c1b7969afc7910f5bcdb1c6d92fb34867 100644 --- a/GaudiKernel/GaudiKernel/SmartRefVector.h +++ b/GaudiKernel/GaudiKernel/SmartRefVector.h @@ -58,9 +58,9 @@ protected: /// That's the type of crap I am hosting typedef SmartRef<TYPE> _Entry; /// Object types: typedef myself as Base - typedef std::vector<_Entry> _Base; + typedef std::vector<_Entry> _Base; typedef typename std::vector<_Entry>::const_iterator _BaseConstIter; - typedef typename std::vector<_Entry>::value_type _BaseValueType; + typedef typename std::vector<_Entry>::value_type _BaseValueType; /// Object data: Pointer to the identifiable object the link originates mutable const DataObject* m_data; diff --git a/GaudiKernel/GaudiKernel/StatusCode.h b/GaudiKernel/GaudiKernel/StatusCode.h index b908e717608684bd7f415b69963872daea11757f..44db69b36076a403c526780e2895d9f869edfc66 100644 --- a/GaudiKernel/GaudiKernel/StatusCode.h +++ b/GaudiKernel/GaudiKernel/StatusCode.h @@ -151,8 +151,8 @@ public: protected: /// The status code. - unsigned long d_code = SUCCESS; ///< The status code - mutable bool m_checked = false; ///< If the Status code has been checked + unsigned long d_code = SUCCESS; ///< The status code + mutable bool m_checked = false; ///< If the Status code has been checked static bool s_checking; ///< Global flag to control if StatusCode need to be checked diff --git a/GaudiKernel/GaudiKernel/StdArrayAsProperty.h b/GaudiKernel/GaudiKernel/StdArrayAsProperty.h index a8d5025fdea03fc34ec33705b2167cca83785f31..f5c443383afd02c7f6e2f6d129f0899fbc093f5a 100644 --- a/GaudiKernel/GaudiKernel/StdArrayAsProperty.h +++ b/GaudiKernel/GaudiKernel/StdArrayAsProperty.h @@ -30,9 +30,9 @@ namespace Gaudi { // ======================================================================== template <class ITERATOR> - inline std::ostream& toStream( ITERATOR first, // begin of the sequence - ITERATOR last, // end of the sequence - std::ostream& s, // the stream + inline std::ostream& toStream( ITERATOR first, // begin of the sequence + ITERATOR last, // end of the sequence + std::ostream& s, // the stream const std::string& open, // opening const std::string& close, // closing const std::string& delim ); // delimiter diff --git a/GaudiKernel/GaudiKernel/StreamBuffer.h b/GaudiKernel/GaudiKernel/StreamBuffer.h index 6347680e0ac2a0e266d87a14e18de7a0047a2f0b..cd121d08e21d890830313fcc2cae60a2d80040c3 100644 --- a/GaudiKernel/GaudiKernel/StreamBuffer.h +++ b/GaudiKernel/GaudiKernel/StreamBuffer.h @@ -122,8 +122,8 @@ public: { public: ContainedObject* first; - long second; - long third; + long second; + long third; ContainedLink() : first( 0 ), second( INVALID ), third( INVALID ) {} ContainedLink( const ContainedLink& copy ) : first( copy.first ), second( copy.second ), third( copy.third ) {} ContainedLink( ContainedObject* pObj, long hint, long link ) : first( pObj ), second( hint ), third( link ) {} @@ -133,7 +133,7 @@ public: { public: DataObject* first = nullptr; - long second = INVALID; + long second = INVALID; IdentifiedLink() = default; IdentifiedLink( const IdentifiedLink& copy ) = default; IdentifiedLink( DataObject* pObj, long hint ) : first( pObj ), second( hint ) {} @@ -182,7 +182,7 @@ protected: StreamBuffer& getObjectPointer( const DataObject* /*pObject*/, TYPE*& refpObject ) { IdentifiedLink& link = m_identifiedLinks.back(); - DataObject* pObj = link.first; + DataObject* pObj = link.first; m_identifiedLinks.pop_back(); refpObject = dynamic_cast<TYPE*>( pObj ); return *this; @@ -193,7 +193,7 @@ protected: template <class TYPE> StreamBuffer& getObjectPointer( const ContainedObject* /*pObject*/, TYPE*& refpObject ) { - ContainedLink& link = m_containedLinks.back(); + ContainedLink& link = m_containedLinks.back(); ContainedObject* pObj = link.first; m_containedLinks.pop_back(); refpObject = dynamic_cast<TYPE*>( pObj ); @@ -497,7 +497,7 @@ public: StreamBuffer& operator<<( const char* data ) { const char* ptr = 0 == data ? "" : data; - int len = strlen( ptr ) + 1; + int len = strlen( ptr ) + 1; if ( 0 == m_analyzer ) writeBytes( ptr, len ); else { @@ -520,7 +520,7 @@ public: { if ( 0 == m_analyzer ) { const char* ptr = data.c_str(); - long len = data.length(); + long len = data.length(); writeBytes( ptr, len ); } else { STREAM_ANALYSE( data, sizeof( data ) ); diff --git a/GaudiKernel/GaudiKernel/System.h b/GaudiKernel/GaudiKernel/System.h index 756c3c2d1bd97f059b6fa36cbe421f79a961e916..530559af4c0a37e3cdebfd8692b86257492ab725 100644 --- a/GaudiKernel/GaudiKernel/System.h +++ b/GaudiKernel/GaudiKernel/System.h @@ -131,7 +131,7 @@ namespace System inline DESTPTR FuncPtrCast( SRCPTR ptr ) { union { - SRCPTR src; + SRCPTR src; DESTPTR dst; } p2p; p2p.src = ptr; diff --git a/GaudiKernel/GaudiKernel/Time.h b/GaudiKernel/GaudiKernel/Time.h index ce246bb329f4ed2e320aa60aeff92617948e18ca..790973f4806bab4b8b02de0979a9aa5cfdab77da 100644 --- a/GaudiKernel/GaudiKernel/Time.h +++ b/GaudiKernel/GaudiKernel/Time.h @@ -67,9 +67,9 @@ namespace Gaudi TimeSpan( ValueType secs, int nsecs ); TimeSpan( int days, int hours, int mins, int secs, int nsecs ); - int days() const; - int hours() const; - int minutes() const; + int days() const; + int hours() const; + int minutes() const; ValueType seconds() const; int lastHours() const; diff --git a/GaudiKernel/GaudiKernel/Timing.h b/GaudiKernel/GaudiKernel/Timing.h index 9b4daa6cd0708afe80ee2fb5350a4b6a9471db66..09c1c65efeef95c1f6e3d5dc98e3f39cc2d7cad4 100644 --- a/GaudiKernel/GaudiKernel/Timing.h +++ b/GaudiKernel/GaudiKernel/Timing.h @@ -156,28 +156,28 @@ namespace System ProcessTime( TimeValueType k, TimeValueType u, TimeValueType e ) : i_kernel( k ), i_user( u ), i_elapsed( e ) {} /// Retrieve the kernel time in the requested unit. - template <TimeType T> + template <TimeType T> inline TimeValueType kernelTime() const { return adjustTime<T>( i_kernel ); } /// Retrieve the user time in the requested unit. - template <TimeType T> + template <TimeType T> inline TimeValueType userTime() const { return adjustTime<T>( i_user ); } /// Retrieve the elapsed time in the requested unit. - template <TimeType T> + template <TimeType T> inline TimeValueType elapsedTime() const { return adjustTime<T>( i_elapsed ); } /// Retrieve the CPU (user+kernel) time in the requested unit. - template <TimeType T> + template <TimeType T> inline TimeValueType cpuTime() const { return adjustTime<T>( i_user + i_kernel ); @@ -266,7 +266,7 @@ namespace System // This is frequently used and thus we inline it if possible template <TimeType T> - inline longlong currentTime() + inline longlong currentTime() { #ifdef _WIN32 longlong current = 0; diff --git a/GaudiKernel/GaudiKernel/ToStream.h b/GaudiKernel/GaudiKernel/ToStream.h index 64caadad350ed0a4dc21c7dfda5d9540fb3d7a2d..ccfa8e87b3b49771bace91630a0b6fd5f5cec1a7 100644 --- a/GaudiKernel/GaudiKernel/ToStream.h +++ b/GaudiKernel/GaudiKernel/ToStream.h @@ -60,9 +60,9 @@ namespace Gaudi * @date 2009-09-15 */ template <class ITERATOR> - inline std::ostream& toStream( ITERATOR first, // begin of the sequence - ITERATOR last, // end of the sequence - std::ostream& s, // the stream + inline std::ostream& toStream( ITERATOR first, // begin of the sequence + ITERATOR last, // end of the sequence + std::ostream& s, // the stream const std::string& open, // opening const std::string& close, // closing const std::string& delim ); // delimiter @@ -290,9 +290,9 @@ namespace Gaudi * @date 2009-09-15 */ template <class ITERATOR> - inline std::ostream& toStream( ITERATOR first, // begin of the sequence - ITERATOR last, // end of the sequence - std::ostream& s, // the stream + inline std::ostream& toStream( ITERATOR first, // begin of the sequence + ITERATOR last, // end of the sequence + std::ostream& s, // the stream const std::string& open, // opening const std::string& close, // closing const std::string& delim ) // delimiter diff --git a/GaudiKernel/GaudiKernel/ToolHandle.h b/GaudiKernel/GaudiKernel/ToolHandle.h index 56a22f613358b79d74b0cc68fb4cba23c4bb27d9..6edd33f039ae197fdea404294af755e27fda3b6a 100644 --- a/GaudiKernel/GaudiKernel/ToolHandle.h +++ b/GaudiKernel/GaudiKernel/ToolHandle.h @@ -54,7 +54,7 @@ public: protected: const IInterface* m_parent = nullptr; - bool m_createIf{true}; + bool m_createIf{true}; }; /** @class BaseToolHandle ToolHandle.h GaudiKernel/ToolHandle.h diff --git a/GaudiKernel/GaudiKernel/Transform3DTypes.h b/GaudiKernel/GaudiKernel/Transform3DTypes.h index c43cd3b31732aec988688c94b7b44fd41de15208..029ef0e205df84f46ab80f20dc527f88df722cc7 100644 --- a/GaudiKernel/GaudiKernel/Transform3DTypes.h +++ b/GaudiKernel/GaudiKernel/Transform3DTypes.h @@ -44,15 +44,15 @@ namespace Gaudi // NB : Please remember to give a simple doxygen comment for each tyedef - typedef ROOT::Math::Rotation3D Rotation3D; ///< 3D rotation - typedef ROOT::Math::EulerAngles EulerAngles; ///< 3D Euler Angles - typedef ROOT::Math::Quaternion Quaternion; ///< 3D Quaternion - typedef ROOT::Math::AxisAngle AxisAngle; ///< 3D Axis Angle - typedef ROOT::Math::RotationX RotationX; ///< Rotation about X axis - typedef ROOT::Math::RotationY RotationY; ///< Rotation about Y axis - typedef ROOT::Math::RotationZ RotationZ; ///< Rotation about Z axis - typedef ROOT::Math::Transform3D Transform3D; ///< General 3D transformation (rotation+translation) - typedef ROOT::Math::XYZVector TranslationXYZ; ///< 3D translation + typedef ROOT::Math::Rotation3D Rotation3D; ///< 3D rotation + typedef ROOT::Math::EulerAngles EulerAngles; ///< 3D Euler Angles + typedef ROOT::Math::Quaternion Quaternion; ///< 3D Quaternion + typedef ROOT::Math::AxisAngle AxisAngle; ///< 3D Axis Angle + typedef ROOT::Math::RotationX RotationX; ///< Rotation about X axis + typedef ROOT::Math::RotationY RotationY; ///< Rotation about Y axis + typedef ROOT::Math::RotationZ RotationZ; ///< Rotation about Z axis + typedef ROOT::Math::Transform3D Transform3D; ///< General 3D transformation (rotation+translation) + typedef ROOT::Math::XYZVector TranslationXYZ; ///< 3D translation } #endif // EVENT_TRANSFORM3DTYPES_H diff --git a/GaudiKernel/GaudiKernel/TsDataSvc.h b/GaudiKernel/GaudiKernel/TsDataSvc.h index 57f52d651f499c0f54b1fda39262130d4d99d3b9..cff6843edd042591abe98438ebbffd80b932d02f 100644 --- a/GaudiKernel/GaudiKernel/TsDataSvc.h +++ b/GaudiKernel/GaudiKernel/TsDataSvc.h @@ -67,7 +67,7 @@ protected: /// Pointer to incident service IIncidentSvc* m_incidentSvc = nullptr; - Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; + Gaudi::Property<CLID> m_rootCLID{this, "RootCLID", 110 /*CLID_Event*/, "CLID of root entry"}; Gaudi::Property<std::string> m_rootName{this, "RootName", "/Event", "name of root entry"}; Gaudi::Property<bool> m_forceLeaves{this, "ForceLeaves", false, "force creation of default leaves on registerObject"}; Gaudi::Property<std::vector<std::string>> m_inhibitPathes{this, "InhibitPathes", {}, "inhibited leaves"}; diff --git a/GaudiKernel/GaudiKernel/TypeNameString.h b/GaudiKernel/GaudiKernel/TypeNameString.h index e11e39197cc27dadf3783c5c9733142efcfe1b4b..cce3ca47fd4efcb1bab56ae34e108a8346088bcf 100644 --- a/GaudiKernel/GaudiKernel/TypeNameString.h +++ b/GaudiKernel/GaudiKernel/TypeNameString.h @@ -12,7 +12,7 @@ namespace Gaudi class TypeNameString { std::string m_type, m_name; - bool m_haveType; + bool m_haveType; public: TypeNameString( const char tn[] ) : TypeNameString( std::string{tn} ) {} @@ -38,7 +38,7 @@ namespace Gaudi } const std::string& type() const { return m_type; } const std::string& name() const { return m_name; } - bool haveType() const { return m_haveType; } + bool haveType() const { return m_haveType; } }; /// Output stream operator for TypeNameString instances. diff --git a/GaudiKernel/GaudiKernel/Vector3DTypes.h b/GaudiKernel/GaudiKernel/Vector3DTypes.h index 6aab9358abc5c1c885e96145e463851f53e2a90a..21a96fabaa0f71bc1fa2b6b1a4dfd0e675e73b26 100644 --- a/GaudiKernel/GaudiKernel/Vector3DTypes.h +++ b/GaudiKernel/GaudiKernel/Vector3DTypes.h @@ -27,13 +27,13 @@ namespace Gaudi // NB : Please remember to give a simple doxygen comment for each tyedef - typedef ROOT::Math::XYZVector XYZVector; ///< Cartesian 3D vector (double) - typedef ROOT::Math::Polar3DVector Polar3DVector; ///< Polar 3D vector (double) - typedef ROOT::Math::RhoEtaPhiVector RhoEtaPhiVector; ///< RhoEtaPhi 3D vector (double) - typedef ROOT::Math::RhoZPhiVector RhoZPhiVector; ///< RhoZPhi 3D vector (double) - typedef ROOT::Math::XYZVectorF XYZVectorF; ///< Cartesian 3D vector (float) - typedef ROOT::Math::Polar3DVectorF Polar3DVectorF; ///< Polar 3D vector (float) + typedef ROOT::Math::XYZVector XYZVector; ///< Cartesian 3D vector (double) + typedef ROOT::Math::Polar3DVector Polar3DVector; ///< Polar 3D vector (double) + typedef ROOT::Math::RhoEtaPhiVector RhoEtaPhiVector; ///< RhoEtaPhi 3D vector (double) + typedef ROOT::Math::RhoZPhiVector RhoZPhiVector; ///< RhoZPhi 3D vector (double) + typedef ROOT::Math::XYZVectorF XYZVectorF; ///< Cartesian 3D vector (float) + typedef ROOT::Math::Polar3DVectorF Polar3DVectorF; ///< Polar 3D vector (float) typedef ROOT::Math::RhoEtaPhiVectorF RhoEtaPhiVectorF; ///< RhoEtaPhi 3D vector (float) - typedef ROOT::Math::RhoZPhiVectorF RhoZPhiVectorF; ///< RhoZPhi 3D vector (float) + typedef ROOT::Math::RhoZPhiVectorF RhoZPhiVectorF; ///< RhoZPhi 3D vector (float) } #endif // EVENT_VECTOR3DTYPES_H diff --git a/GaudiKernel/GaudiKernel/Vector4DTypes.h b/GaudiKernel/GaudiKernel/Vector4DTypes.h index 5fc463cc007839bce2affec0c96795d7f92559d3..0e95e0e71d711a12e9200b51d33176168325131b 100644 --- a/GaudiKernel/GaudiKernel/Vector4DTypes.h +++ b/GaudiKernel/GaudiKernel/Vector4DTypes.h @@ -27,10 +27,10 @@ namespace Gaudi // NB : Please remember to give a simple doxygen comment for each typedef - typedef ROOT::Math::PxPyPzEVector XYZTVector; ///< Cartesian 4 Vector - typedef ROOT::Math::PxPyPzEVector LorentzVector; ///< Cartesian 4 Vector - typedef ROOT::Math::XYZTVectorF XYZTVectorF; ///< Cartesian 4 Vector (float) - typedef ROOT::Math::XYZTVectorF LorentzVectorF; ///< Cartesian 4 Vector (float) + typedef ROOT::Math::PxPyPzEVector XYZTVector; ///< Cartesian 4 Vector + typedef ROOT::Math::PxPyPzEVector LorentzVector; ///< Cartesian 4 Vector + typedef ROOT::Math::XYZTVectorF XYZTVectorF; ///< Cartesian 4 Vector (float) + typedef ROOT::Math::XYZTVectorF LorentzVectorF; ///< Cartesian 4 Vector (float) typedef ROOT::Math::PtEtaPhiEVector PtEtaPhiEVector; ///< Polar 4 Vector } #endif // EVENT_VECTOR4DTYPES_H diff --git a/GaudiKernel/GaudiKernel/VectorMap.h b/GaudiKernel/GaudiKernel/VectorMap.h index 828de86b4e4fa60dc81fdcbfc539c2ed584b7167..2f8fe7fb83984c9c19def5f13875342f5ea1bb18 100644 --- a/GaudiKernel/GaudiKernel/VectorMap.h +++ b/GaudiKernel/GaudiKernel/VectorMap.h @@ -353,7 +353,7 @@ namespace GaudiUtils */ result_type insert( const value_type& value ) { - bool found = true; + bool found = true; _iterator result = lower_bound( value.first ); if ( end() == result || compare( value.first, result->first ) ) { result = m_vct.insert( result, value ); @@ -612,7 +612,7 @@ namespace GaudiUtils const mapped_type& operator()( const key_type& key ) const { static const mapped_type s_default = mapped_type(); - iterator res = find( key ); + iterator res = find( key ); if ( end() == res ) { return s_default; } diff --git a/GaudiKernel/dict/dictionary.h b/GaudiKernel/dict/dictionary.h index fe1d54ec60b82ba2e72db53c2dc4a30335fd5483..935ab8b237a3b26215183e18bb33815c76f0f2b2 100644 --- a/GaudiKernel/dict/dictionary.h +++ b/GaudiKernel/dict/dictionary.h @@ -122,43 +122,43 @@ namespace GaudiKernelDict public std::vector<LinkManager::Link*>, public std::vector<const ContainedObject*>, public std::vector<ContainedObject*> { - NTuple::Item<bool> BoolItem; - NTuple::Item<char> CharItem; - NTuple::Item<unsigned char> UCharItem; - NTuple::Item<short> ShortItem; - NTuple::Item<unsigned short> UShortItem; - NTuple::Item<long> LongItem; - NTuple::Item<long long> LongLongItem; - NTuple::Item<unsigned long> ULongItem; + NTuple::Item<bool> BoolItem; + NTuple::Item<char> CharItem; + NTuple::Item<unsigned char> UCharItem; + NTuple::Item<short> ShortItem; + NTuple::Item<unsigned short> UShortItem; + NTuple::Item<long> LongItem; + NTuple::Item<long long> LongLongItem; + NTuple::Item<unsigned long> ULongItem; NTuple::Item<unsigned long long> ULongLongItem; - NTuple::Item<int> IntItem; - NTuple::Item<unsigned int> UIntItem; - NTuple::Item<float> FloatItem; - NTuple::Item<double> DoubleItem; - NTuple::Array<bool> BoolArray; - NTuple::Array<char> CharArray; - NTuple::Array<unsigned char> UCharArray; - NTuple::Array<short> ShortArray; - NTuple::Array<unsigned short> UShortArray; - NTuple::Array<long> LongArray; - NTuple::Array<unsigned long> ULongArray; - NTuple::Array<int> IntArray; - NTuple::Array<unsigned int> UIntArray; - NTuple::Array<float> FloatArray; - NTuple::Array<double> DoubleArray; - NTuple::Matrix<bool> BoolMatrix; - NTuple::Matrix<char> CharMatrix; - NTuple::Matrix<unsigned char> UCharMatrix; - NTuple::Matrix<short> ShortMatrix; - NTuple::Matrix<unsigned short> UShortMatrix; - NTuple::Matrix<long> LongMatrix; - NTuple::Matrix<unsigned long> ULongMatrix; - NTuple::Matrix<int> IntMatrix; - NTuple::Matrix<unsigned int> UIntMatrix; - NTuple::Matrix<float> FloatMatrix; - NTuple::Matrix<double> DoubleMatrix; + NTuple::Item<int> IntItem; + NTuple::Item<unsigned int> UIntItem; + NTuple::Item<float> FloatItem; + NTuple::Item<double> DoubleItem; + NTuple::Array<bool> BoolArray; + NTuple::Array<char> CharArray; + NTuple::Array<unsigned char> UCharArray; + NTuple::Array<short> ShortArray; + NTuple::Array<unsigned short> UShortArray; + NTuple::Array<long> LongArray; + NTuple::Array<unsigned long> ULongArray; + NTuple::Array<int> IntArray; + NTuple::Array<unsigned int> UIntArray; + NTuple::Array<float> FloatArray; + NTuple::Array<double> DoubleArray; + NTuple::Matrix<bool> BoolMatrix; + NTuple::Matrix<char> CharMatrix; + NTuple::Matrix<unsigned char> UCharMatrix; + NTuple::Matrix<short> ShortMatrix; + NTuple::Matrix<unsigned short> UShortMatrix; + NTuple::Matrix<long> LongMatrix; + NTuple::Matrix<unsigned long> ULongMatrix; + NTuple::Matrix<int> IntMatrix; + NTuple::Matrix<unsigned int> UIntMatrix; + NTuple::Matrix<float> FloatMatrix; + NTuple::Matrix<double> DoubleMatrix; - SmartDataPtr<DataObject> p1; + SmartDataPtr<DataObject> p1; SmartDataPtr<ObjectContainerBase> p2; __Instantiations() : p1( 0, "" ), p2( 0, "" ) {} }; diff --git a/GaudiKernel/python/GaudiKernel/Configurable.py b/GaudiKernel/python/GaudiKernel/Configurable.py index 8f15d2fe2580bf5f8aa1dfd600132dc6e909d320..2abaeb81b771b632d8ee567ff153813932c2c844 100644 --- a/GaudiKernel/python/GaudiKernel/Configurable.py +++ b/GaudiKernel/python/GaudiKernel/Configurable.py @@ -191,7 +191,7 @@ class Configurable(object): conf = cls.configurables[name] if name != argname: # special case: user derived <-> real ... make same cls.configurables[conf.getType()] = conf - #---PM: Initialize additional properties + # ---PM: Initialize additional properties for n, v in kwargs.items(): if n != "name": # it should not be confused with a normal property setattr(conf, n, v) @@ -252,7 +252,7 @@ class Configurable(object): # in the future: # return None # will bomb on use (or go unharmed on non-use) # for now, allow use through allConfigurables lookup - #---PM: Initialize additional properties + # ---PM: Initialize additional properties for n, v in kwargs.items(): setattr(conf, n, v) return conf @@ -270,8 +270,8 @@ class Configurable(object): # update generics super-cache, if needed cls.allConfigurables[name] = conf - #-->PM#if hasattr( cls, 'getType' ) and name.find('/') < 0: - #-->PM# cls.allConfigurables[ cls.getType() + '/' + name ] = conf + # -->PM#if hasattr( cls, 'getType' ) and name.find('/') < 0: + # -->PM# cls.allConfigurables[ cls.getType() + '/' + name ] = conf return conf diff --git a/GaudiKernel/python/GaudiKernel/PropertyProxy.py b/GaudiKernel/python/GaudiKernel/PropertyProxy.py index 38eb10f34c4233615fd4421945b8034bc7c5e107..aa2477e15e2f4f4c4f416949864ba41e6ef7c2ea 100644 --- a/GaudiKernel/python/GaudiKernel/PropertyProxy.py +++ b/GaudiKernel/python/GaudiKernel/PropertyProxy.py @@ -16,7 +16,7 @@ import logging log = logging.getLogger('PropertyProxy') # dictionary with configurable class : python module entries -#-->PM#from AthenaCommon import ConfigurableDb +# -->PM#from AthenaCommon import ConfigurableDb def derives_from(derived, base): diff --git a/GaudiKernel/src/Lib/Algorithm.cpp b/GaudiKernel/src/Lib/Algorithm.cpp index 8b58bb34b2a5ee2b00b904cb44d9d1065dc1b819..4921ca17e1254280284d25b06d86492b5b9bacd0 100644 --- a/GaudiKernel/src/Lib/Algorithm.cpp +++ b/GaudiKernel/src/Lib/Algorithm.cpp @@ -54,7 +54,7 @@ Algorithm::Algorithm( const std::string& name, ISvcLocator* pSvcLocator, const s // Auditor monitoring properties // Initialize the default value from ApplicationMgr AuditAlgorithms Gaudi::Property<bool> audit( false ); - auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" ); + auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" ); if ( appMgr && appMgr->hasProperty( "AuditAlgorithms" ) ) { audit.assign( appMgr->getProperty( "AuditAlgorithms" ) ); } @@ -791,20 +791,20 @@ SmartIF<IFace>& Algorithm::get_svc_( SmartIF<IFace>& p, const char* service_name } SmartIF<IAlgExecStateSvc>& Algorithm::algExecStateSvc() const { return get_svc_( m_aess, "AlgExecStateSvc" ); } -SmartIF<IAuditorSvc>& Algorithm::auditorSvc() const { return get_svc_( m_pAuditorSvc, "AuditorSvc" ); } -SmartIF<IChronoStatSvc>& Algorithm::chronoSvc() const { return get_svc_( m_CSS, "ChronoStatSvc" ); } +SmartIF<IAuditorSvc>& Algorithm::auditorSvc() const { return get_svc_( m_pAuditorSvc, "AuditorSvc" ); } +SmartIF<IChronoStatSvc>& Algorithm::chronoSvc() const { return get_svc_( m_CSS, "ChronoStatSvc" ); } SmartIF<IDataProviderSvc>& Algorithm::detSvc() const { return get_svc_( m_DDS, "DetectorDataSvc" ); } -SmartIF<IConversionSvc>& Algorithm::detCnvSvc() const { return get_svc_( m_DCS, "DetectorPersistencySvc" ); } +SmartIF<IConversionSvc>& Algorithm::detCnvSvc() const { return get_svc_( m_DCS, "DetectorPersistencySvc" ); } SmartIF<IDataProviderSvc>& Algorithm::eventSvc() const { return get_svc_( m_EDS, "EventDataSvc" ); } -SmartIF<IConversionSvc>& Algorithm::eventCnvSvc() const { return get_svc_( m_ECS, "EventPersistencySvc" ); } -SmartIF<IHistogramSvc>& Algorithm::histoSvc() const { return get_svc_( m_HDS, "HistogramDataSvc" ); } -SmartIF<INTupleSvc>& Algorithm::ntupleSvc() const { return get_svc_( m_NTS, "NTupleSvc" ); } -SmartIF<IRndmGenSvc>& Algorithm::randSvc() const { return get_svc_( m_RGS, "RndmGenSvc" ); } -SmartIF<IToolSvc>& Algorithm::toolSvc() const { return get_svc_( m_ptoolSvc, "ToolSvc" ); } -SmartIF<IExceptionSvc>& Algorithm::exceptionSvc() const { return get_svc_( m_EXS, "ExceptionSvc" ); } -SmartIF<IAlgContextSvc>& Algorithm::contextSvc() const { return get_svc_( m_contextSvc, "AlgContextSvc" ); } -SmartIF<ITimelineSvc>& Algorithm::timelineSvc() const { return get_svc_( m_timelineSvc, "TimelineSvc" ); } -SmartIF<IHiveWhiteBoard>& Algorithm::whiteboard() const { return get_svc_( m_WB, "EventDataSvc" ); } +SmartIF<IConversionSvc>& Algorithm::eventCnvSvc() const { return get_svc_( m_ECS, "EventPersistencySvc" ); } +SmartIF<IHistogramSvc>& Algorithm::histoSvc() const { return get_svc_( m_HDS, "HistogramDataSvc" ); } +SmartIF<INTupleSvc>& Algorithm::ntupleSvc() const { return get_svc_( m_NTS, "NTupleSvc" ); } +SmartIF<IRndmGenSvc>& Algorithm::randSvc() const { return get_svc_( m_RGS, "RndmGenSvc" ); } +SmartIF<IToolSvc>& Algorithm::toolSvc() const { return get_svc_( m_ptoolSvc, "ToolSvc" ); } +SmartIF<IExceptionSvc>& Algorithm::exceptionSvc() const { return get_svc_( m_EXS, "ExceptionSvc" ); } +SmartIF<IAlgContextSvc>& Algorithm::contextSvc() const { return get_svc_( m_contextSvc, "AlgContextSvc" ); } +SmartIF<ITimelineSvc>& Algorithm::timelineSvc() const { return get_svc_( m_timelineSvc, "TimelineSvc" ); } +SmartIF<IHiveWhiteBoard>& Algorithm::whiteboard() const { return get_svc_( m_WB, "EventDataSvc" ); } SmartIF<ISvcLocator>& Algorithm::serviceLocator() const { return *const_cast<SmartIF<ISvcLocator>*>( &m_pSvcLocator ); } @@ -842,7 +842,7 @@ StatusCode Algorithm::createSubAlgorithm( const std::string& type, const std::st // Maybe modify the AppMgr interface to return Algorithm* ?? IAlgorithm* tmp; - StatusCode sc = am->createAlgorithm( type, name + getGaudiThreadIDfromName( Algorithm::name() ), tmp ); + StatusCode sc = am->createAlgorithm( type, name + getGaudiThreadIDfromName( Algorithm::name() ), tmp ); if ( sc.isFailure() ) return StatusCode::FAILURE; try { diff --git a/GaudiKernel/src/Lib/AllocatorPool.cpp b/GaudiKernel/src/Lib/AllocatorPool.cpp index bf96e525cd8201775d8f9d8e858b8cf3954760fb..64d17d981b7bf1aa9f48a8bb07cc996a22945193 100644 --- a/GaudiKernel/src/Lib/AllocatorPool.cpp +++ b/GaudiKernel/src/Lib/AllocatorPool.cpp @@ -116,8 +116,8 @@ void GaudiUtils::AllocatorPool::Grow() ++nchunks; const int nelem = csize / esize; - char* start = n->mem.get(); - char* last = &start[( nelem - 1 ) * esize]; + char* start = n->mem.get(); + char* last = &start[( nelem - 1 ) * esize]; for ( char* p = start; p < last; p += esize ) { reinterpret_cast<PoolLink*>( p )->next = reinterpret_cast<PoolLink*>( p + esize ); } diff --git a/GaudiKernel/src/Lib/Bootstrap.cpp b/GaudiKernel/src/Lib/Bootstrap.cpp index bc5a8b23efcfde8e399e8aa329039c12520e73f0..03a8daf4cc210e7ab43d4e1e9b6ff20dc17f461e 100644 --- a/GaudiKernel/src/Lib/Bootstrap.cpp +++ b/GaudiKernel/src/Lib/Bootstrap.cpp @@ -57,7 +57,7 @@ namespace Gaudi } static SmartIF<ISvcLocator> s_svclocInstance; -static SmartIF<IAppMgrUI> s_appmgrInstance; +static SmartIF<IAppMgrUI> s_appmgrInstance; //------------------------------------------------------------------------------ IAppMgrUI* Gaudi::createApplicationMgr( const std::string& dllname, const std::string& factname ) @@ -151,8 +151,8 @@ IInterface* Gaudi::createInstance( const std::string& name, const std::string& f IAlgorithm* ia = Algorithm::Factory::create( factname, name, nullptr ); if ( ia ) return ia; - void* libHandle = nullptr; - StatusCode status = System::loadDynamicLib( dllname, &libHandle ); + void* libHandle = nullptr; + StatusCode status = System::loadDynamicLib( dllname, &libHandle ); if ( status.isSuccess() ) { ii = ObjFactory::create( factname, nullptr ); if ( ii ) return ii; @@ -187,8 +187,8 @@ IAppMgrUI* Gaudi::createApplicationMgr() //======================================================================= static std::list<IService*> s_bootServices; -static SmartIF<IService> s_bootService; -static SmartIF<IInterface> s_bootInterface; +static SmartIF<IService> s_bootService; +static SmartIF<IInterface> s_bootInterface; using Gaudi::BootSvcLocator; diff --git a/GaudiKernel/src/Lib/ChronoEntity.cpp b/GaudiKernel/src/Lib/ChronoEntity.cpp index 8ec117a530e5861629972b8dda7ad950fe564754..e4b522158618cb3ba09c7d6d00c06b92c5267b3f 100644 --- a/GaudiKernel/src/Lib/ChronoEntity.cpp +++ b/GaudiKernel/src/Lib/ChronoEntity.cpp @@ -131,7 +131,7 @@ std::string ChronoEntity::format( const double total, const double minimal, cons if ( number > 1 ) { /// @todo: cache the format boost::format fmt1( "Ave/Min/Max=%2$5.3g(+-%3$5.3g)/%4$5.3g/%5$5.3g%1$s" ); - auto i = std::find_if( + auto i = std::find_if( std::begin( tbl ), std::prev( std::end( tbl ) ), [&]( const std::tuple<int, double, const char*>& i ) { return total < std::get<0>( i ) * std::get<1>( i ); } ); unit = std::get<1>( *i ); diff --git a/GaudiKernel/src/Lib/ConversionSvc.cpp b/GaudiKernel/src/Lib/ConversionSvc.cpp index fbc55f2996532ff3f0b16a5adf81aeda70bec214..7be3981b59eee123ebc09e37775f7228055b1d96 100644 --- a/GaudiKernel/src/Lib/ConversionSvc.cpp +++ b/GaudiKernel/src/Lib/ConversionSvc.cpp @@ -143,7 +143,7 @@ StatusCode ConversionSvc::updateRepRefs( IOpaqueAddress* pAddress, DataObject* p IConverter* ConversionSvc::converter( const CLID& clid ) { IConverter* cnv = nullptr; - auto i = std::find_if( m_workers.begin(), m_workers.end(), CnvTest( clid ) ); + auto i = std::find_if( m_workers.begin(), m_workers.end(), CnvTest( clid ) ); if ( i != m_workers.end() ) cnv = i->converter(); if ( !cnv ) { StatusCode status = addConverter( clid ); @@ -200,7 +200,7 @@ SmartIF<IConversionSvc>& ConversionSvc::conversionSvc() const { return m_cnvSvc; StatusCode ConversionSvc::addConverter( const CLID& clid ) { // First look for the more specific converter - long typ = repSvcType(); + long typ = repSvcType(); IConverter* pConverter = createConverter( typ, clid, nullptr ); if ( pConverter ) { StatusCode status = configureConverter( typ, clid, pConverter ); @@ -209,7 +209,7 @@ StatusCode ConversionSvc::addConverter( const CLID& clid ) if ( status.isSuccess() ) { status = activateConverter( typ, clid, pConverter ); if ( status.isSuccess() ) { - long conv_typ = pConverter->repSvcType(); + long conv_typ = pConverter->repSvcType(); const CLID& conv_clid = pConverter->objType(); typ = ( typ < 0xFF ) ? typ : typ & 0xFFFFFF00; conv_typ = ( conv_typ < 0xFF ) ? conv_typ : conv_typ & 0xFFFFFF00; diff --git a/GaudiKernel/src/Lib/Converter.cpp b/GaudiKernel/src/Lib/Converter.cpp index 72d8b4c35fffa7fc58beaf781bad466db4f1286f..3f540d7e1bf31fa2716b0c022fbc04ce9e2c6fbc 100644 --- a/GaudiKernel/src/Lib/Converter.cpp +++ b/GaudiKernel/src/Lib/Converter.cpp @@ -143,7 +143,7 @@ StatusCode Converter::service_i( const std::string& svcType, const std::string& SmartIF<IService> Converter::service( const std::string& name, const bool createIf ) const { SmartIF<INamedInterface> cnvsvc( conversionSvc() ); - SmartIF<IService> svc; + SmartIF<IService> svc; if ( cnvsvc ) { const ServiceLocatorHelper helper( *serviceLocator(), "Converter", cnvsvc->name() ); svc = helper.service( name, false, createIf ); diff --git a/GaudiKernel/src/Lib/DataObjID.cpp b/GaudiKernel/src/Lib/DataObjID.cpp index 6d1a387b5c9a70eee4ddeda2b2b0d1d1ccbe81fc..8d4b6154455503e4db79fe246330c9782e3577ee 100644 --- a/GaudiKernel/src/Lib/DataObjID.cpp +++ b/GaudiKernel/src/Lib/DataObjID.cpp @@ -4,7 +4,7 @@ #include "GaudiKernel/ISvcLocator.h" #include <functional> -IClassIDSvc* DataObjID::p_clidSvc( nullptr ); +IClassIDSvc* DataObjID::p_clidSvc( nullptr ); std::once_flag DataObjID::m_ip; void DataObjID::hashGen() diff --git a/GaudiKernel/src/Lib/DataObjIDProperty.cpp b/GaudiKernel/src/Lib/DataObjIDProperty.cpp index 5656fbcdf9b1da8a0afc92023de26316a61939a1..e04937d58d3f4c7a4f023b48e21e4c7ffcbd7e3b 100644 --- a/GaudiKernel/src/Lib/DataObjIDProperty.cpp +++ b/GaudiKernel/src/Lib/DataObjIDProperty.cpp @@ -20,17 +20,17 @@ namespace Gaudi StatusCode parse( DataObjID& v, const std::string& s ) { // default values - StatusCode sc( StatusCode::FAILURE ); + StatusCode sc( StatusCode::FAILURE ); std::string prop; sc = Gaudi::Parsers::parse( prop, s ); if ( sc.isSuccess() ) { // split the string in 1 or 2 words: typedef boost::tokenizer<boost::char_separator<char>> tokenizer; - boost::char_separator<char> sep( "(), " ); - tokenizer tokens( prop, sep ); - int nToks( distance( tokens.begin(), tokens.end() ) ); - auto it = tokens.begin(); + boost::char_separator<char> sep( "(), " ); + tokenizer tokens( prop, sep ); + int nToks( distance( tokens.begin(), tokens.end() ) ); + auto it = tokens.begin(); if ( nToks == 1 ) { // Gaudi style /path/to/object @@ -40,9 +40,9 @@ namespace Gaudi } else if ( nToks == 2 ) { // ATLAS style (clid, 'key') or ('ClassName', 'key') - CLID c( 0 ); + CLID c( 0 ); std::string cn( *it ); - DataObjID id; + DataObjID id; try { c = std::stoi( *it ); @@ -76,7 +76,7 @@ namespace Gaudi StatusCode parse( DataObjIDColl& v, const std::string& s ) { // default values - StatusCode sc( StatusCode::FAILURE ); + StatusCode sc( StatusCode::FAILURE ); std::string prop; sc = Gaudi::Parsers::parse( prop, s ); @@ -95,11 +95,11 @@ namespace Gaudi // split the string in 1 or 2 words: typedef boost::tokenizer<boost::char_separator<char>> tokenizer; - boost::char_separator<char> sep( "[](), " ); - tokenizer tokens( prop, sep ); - auto it = tokens.begin(); + boost::char_separator<char> sep( "[](), " ); + tokenizer tokens( prop, sep ); + auto it = tokens.begin(); - CLID c( 0 ); + CLID c( 0 ); std::string cn; while ( it != tokens.end() ) { diff --git a/GaudiKernel/src/Lib/DataObject.cpp b/GaudiKernel/src/Lib/DataObject.cpp index 5411257860a1416e0dd0148d10339c7760ec77e5..a5c338c1af813054abdad86698b28c2ef3b962b9 100644 --- a/GaudiKernel/src/Lib/DataObject.cpp +++ b/GaudiKernel/src/Lib/DataObject.cpp @@ -70,7 +70,7 @@ const std::string& DataObject::name() const { return m_pRegistry ? m_pRegistry-> /// Provide empty placeholder for internal object reconfiguration callback StatusCode DataObject::update() { return StatusCode::SUCCESS; } -static DataObject* s_objPtr = nullptr; +static DataObject* s_objPtr = nullptr; static DataObject** s_currObj = &s_objPtr; static std::vector<DataObject**>& objectStack() diff --git a/GaudiKernel/src/Lib/DataObjectHandleProperty.cpp b/GaudiKernel/src/Lib/DataObjectHandleProperty.cpp index 9442eddfb464a717d5c042ed6ee4d654ea700075..bd9f6a346fd9cc7b403d70d6478c54ea73943e90 100644 --- a/GaudiKernel/src/Lib/DataObjectHandleProperty.cpp +++ b/GaudiKernel/src/Lib/DataObjectHandleProperty.cpp @@ -14,7 +14,7 @@ namespace Gaudi StatusCode parse( DataObjectHandleBase& v, const std::string& s ) { std::string prop; - auto sc = Gaudi::Parsers::parse( prop, s ); + auto sc = Gaudi::Parsers::parse( prop, s ); if ( sc ) v.setKey( DataObjID( s ) ); return sc; } diff --git a/GaudiKernel/src/Lib/DataStreamTool.cpp b/GaudiKernel/src/Lib/DataStreamTool.cpp index cfaddbde89b0063b2e0ca5f53529215eff37fdbd..f3ea8014fc9ae8ca7039c0ef9513102297718a41 100644 --- a/GaudiKernel/src/Lib/DataStreamTool.cpp +++ b/GaudiKernel/src/Lib/DataStreamTool.cpp @@ -55,8 +55,8 @@ StatusCode DataStreamTool::addStream( const std::string& input ) m_streamSpecs.push_back( input ); - auto strname = name() + '_' + std::to_string( ++m_streamCount ); - EventSelectorDataStream* s = nullptr; + auto strname = name() + '_' + std::to_string( ++m_streamCount ); + EventSelectorDataStream* s = nullptr; StatusCode status = createStream( strname, input, s ); @@ -95,13 +95,13 @@ StatusCode DataStreamTool::finalize() StatusCode DataStreamTool::initializeStream( EventSelectorDataStream* s ) { - IEvtSelector* sel = nullptr; - StatusCode status = s->initialize(); + IEvtSelector* sel = nullptr; + StatusCode status = s->initialize(); if ( status.isSuccess() ) { status = createSelector( s->name(), s->selectorType(), sel ); if ( status.isSuccess() ) { SmartIF<IProperty> prop( sel ); // Att: IProperty, IService used to point to EventSelector - SmartIF<IService> isvc( sel ); + SmartIF<IService> isvc( sel ); s->setSelector( sel ); sel->release(); // No need for this interface anymore, it is passed to the stream if ( prop && isvc ) { @@ -237,9 +237,9 @@ StatusCode DataStreamTool::connectStream( const std::string& info ) if ( getStream( info ) ) { warning() << "Input stream " << info << "already in use" << endmsg; } - auto nam = name() + '_' + std::to_string( ++m_streamCount ); - EventSelectorDataStream* s = nullptr; - StatusCode status = createStream( nam, info, s ); + auto nam = name() + '_' + std::to_string( ++m_streamCount ); + EventSelectorDataStream* s = nullptr; + StatusCode status = createStream( nam, info, s ); if ( status.isSuccess() ) return connectStream( s ); s->release(); return status; diff --git a/GaudiKernel/src/Lib/DataSvc.cpp b/GaudiKernel/src/Lib/DataSvc.cpp index 3486be45e9f98db7b7b2118b9259646480bd9a76..8eb5ae5e1552f37fbaf8e0318cc87b21b28cea42 100644 --- a/GaudiKernel/src/Lib/DataSvc.cpp +++ b/GaudiKernel/src/Lib/DataSvc.cpp @@ -66,7 +66,7 @@ typedef DataSvcHelpers::RegistryEntry RegEntry; #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() /** IDataManagerSvc: Remove all data objects below the sub tree @@ -75,7 +75,7 @@ typedef DataSvcHelpers::RegistryEntry RegEntry; StatusCode DataSvc::clearSubTree( const std::string& sub_tree_path ) { DataObject* pObject = nullptr; - StatusCode status = findObject( sub_tree_path, pObject ); + StatusCode status = findObject( sub_tree_path, pObject ); if ( status.isSuccess() ) { RegEntry* node_entry = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( node_entry ) { @@ -127,8 +127,8 @@ StatusCode DataSvc::clearStore() */ StatusCode DataSvc::traverseSubTree( const std::string& sub_tree_path, IDataStoreAgent* pAgent ) { - DataObject* pO = nullptr; - StatusCode status = findObject( sub_tree_path, pO ); + DataObject* pO = nullptr; + StatusCode status = findObject( sub_tree_path, pO ); if ( status.isFailure() ) return status; return traverseSubTree( pO, pAgent ); } @@ -284,14 +284,14 @@ StatusCode DataSvc::registerAddress( IRegistry* parentObj, const std::string& ob std::string::size_type sep = objPath.rfind( SEPARATOR ); if ( sep > 0 && sep != std::string::npos ) { - auto p_path = objPath.substr( 0, sep ); - auto o_path = objPath.substr( sep ); + auto p_path = objPath.substr( 0, sep ); + auto o_path = objPath.substr( sep ); RegEntry* p_entry = par_entry->findLeaf( p_path ); // Create default object leafs if the // intermediate nodes are not present if ( !p_entry && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( par_entry->identifier(), p_path, pLeaf ); + StatusCode sc = registerObject( par_entry->identifier(), p_path, pLeaf ); if ( sc.isFailure() ) delete pLeaf; p_entry = par_entry->findLeaf( p_path ); } @@ -358,8 +358,8 @@ StatusCode DataSvc::registerObject( const std::string& fullPath, DataObject* pOb /// Register object with the data store. StatusCode DataSvc::registerObject( const std::string& parentPath, const std::string& objPath, DataObject* pObject ) { - DataObject* pO = nullptr; - StatusCode status = retrieveObject( parentPath, pO ); + DataObject* pO = nullptr; + StatusCode status = retrieveObject( parentPath, pO ); if ( !status.isSuccess() && m_forceLeaves ) { pO = createDefaultObject(); status = registerObject( parentPath, pO ); @@ -402,23 +402,23 @@ StatusCode DataSvc::registerObject( DataObject* parentObj, const std::string& ob RegEntry* node_entry = CAST_REGENTRY( RegEntry*, parentObj->registry() ); if ( node_entry ) { StatusCode status = INVALID_PARENT; - auto sep = objPath.find( SEPARATOR, 1 ); + auto sep = objPath.find( SEPARATOR, 1 ); if ( sep != std::string::npos ) { - auto p_path = objPath.substr( 0, sep ); - auto o_path = objPath.substr( sep ); + auto p_path = objPath.substr( 0, sep ); + auto o_path = objPath.substr( sep ); RegEntry* par_entry = node_entry->findLeaf( p_path ); // Create default object leafs if the // intermediate nodes are not present if ( !par_entry && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( parentObj, p_path, pLeaf ); + StatusCode sc = registerObject( parentObj, p_path, pLeaf ); if ( !sc.isSuccess() ) delete pLeaf; par_entry = node_entry->findLeaf( p_path ); } else if ( par_entry && !par_entry->object() ) { status = i_retrieveEntry( node_entry, p_path, par_entry ); if ( !status.isSuccess() && !par_entry->address() && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( parentObj, p_path, pLeaf ); + StatusCode sc = registerObject( parentObj, p_path, pLeaf ); if ( !sc.isSuccess() ) delete pLeaf; par_entry = node_entry->findLeaf( p_path ); } @@ -459,7 +459,7 @@ StatusCode DataSvc::registerObject( DataObject* parentObj, const std::string& ob StatusCode DataSvc::unregisterObject( const std::string& fullPath ) { DataObject* pObject = nullptr; - StatusCode status = findObject( fullPath, pObject ); + StatusCode status = findObject( fullPath, pObject ); if ( status.isFailure() ) return status; RegEntry* pEntry = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( !pEntry ) return INVALID_ROOT; @@ -474,8 +474,8 @@ StatusCode DataSvc::unregisterObject( const std::string& fullPath ) /// Unregister object from the data store. StatusCode DataSvc::unregisterObject( const std::string& parentPath, const std::string& objPath ) { - DataObject* pO = nullptr; - StatusCode status = findObject( parentPath, pO ); + DataObject* pO = nullptr; + StatusCode status = findObject( parentPath, pO ); return status.isSuccess() ? unregisterObject( pO, objPath ) : status; } @@ -584,7 +584,7 @@ StatusCode DataSvc::loadObject( IRegistry* pRegistry ) */ StatusCode DataSvc::loadObject( IConversionSvc* pLoader, IRegistry* pRegistry ) { - StatusCode status = INVALID_OBJ_ADDR; + StatusCode status = INVALID_OBJ_ADDR; DataObject* pObject = nullptr; if ( !pLoader ) { // Precondition: Data loader must be present return handleDataFault( pRegistry ) ? StatusCode{SUCCESS} : NO_DATA_LOADER; @@ -665,7 +665,7 @@ StatusCode DataSvc::i_retrieveEntry( RegEntry* parentObj, boost::string_ref path if ( !checkRoot() ) return StatusCode( INVALID_ROOT, true ); static const auto empty = boost::string_ref{}; - auto sep = find( path, SEPARATOR, 1 ); + auto sep = find( path, SEPARATOR, 1 ); pEntry = nullptr; if ( !parentObj ) { @@ -676,8 +676,8 @@ StatusCode DataSvc::i_retrieveEntry( RegEntry* parentObj, boost::string_ref path parentObj = m_root; } else if ( sep != boost::string_ref::npos ) { if ( !m_root->object() ) { - RegEntry* r = nullptr; - auto status = i_retrieveEntry( m_root, empty, r ); + RegEntry* r = nullptr; + auto status = i_retrieveEntry( m_root, empty, r ); if ( !status.isSuccess() ) return status; } parentObj = m_root; @@ -694,7 +694,7 @@ StatusCode DataSvc::i_retrieveEntry( RegEntry* parentObj, boost::string_ref path status = loadObject( parentObj ); if ( !status.isSuccess() ) return status; } - auto p_path = path.substr( 0, sep ); + auto p_path = path.substr( 0, sep ); RegEntry* root_entry = parentObj->findLeaf( p_path ); if ( !root_entry && m_enableFaultHdlr ) { // If not even the parent is there, an incident @@ -750,8 +750,8 @@ StatusCode DataSvc::i_retrieveEntry( RegEntry* parentObj, boost::string_ref path /// Retrieve object identified by its directory from the data store. StatusCode DataSvc::retrieveObject( IRegistry* pRegistry, const std::string& path, DataObject*& pObject ) { - pObject = nullptr; - RegEntry *result = nullptr, *parent = CAST_REGENTRY( RegEntry *, pRegistry ); + pObject = nullptr; + RegEntry * result = nullptr, *parent = CAST_REGENTRY( RegEntry *, pRegistry ); StatusCode status = i_retrieveEntry( parent, path, result ); if ( status.isSuccess() ) pObject = result->object(); return status; @@ -768,7 +768,7 @@ StatusCode DataSvc::retrieveObject( const std::string& fullPath, DataObject*& pO StatusCode DataSvc::retrieveObject( const std::string& parentPath, const std::string& objectPath, DataObject*& pObject ) { DataObject* parent = nullptr; - StatusCode status = retrieveObject( parentPath, parent ); + StatusCode status = retrieveObject( parentPath, parent ); return status.isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status; } @@ -794,9 +794,9 @@ StatusCode DataSvc::retrieveObject( DataObject* parentObj, int item, DataObject* /// Retrieve object identified by its directory from the data store. StatusCode DataSvc::findObject( IRegistry* pRegistry, const std::string& path, DataObject*& pObject ) { - pObject = nullptr; - IRegistry* pReg = ( pRegistry ? pRegistry : m_root ); - RegEntry* root_entry = CAST_REGENTRY( RegEntry*, pReg ); + pObject = nullptr; + IRegistry* pReg = ( pRegistry ? pRegistry : m_root ); + RegEntry* root_entry = CAST_REGENTRY( RegEntry*, pReg ); if ( root_entry ) { if ( !path.empty() ) pReg = root_entry->find( path ); if ( !pReg ) return INVALID_OBJ_PATH; @@ -825,7 +825,7 @@ StatusCode DataSvc::findObject( const std::string& path, DataObject*& pObject ) StatusCode DataSvc::findObject( const std::string& parentPath, const std::string& objectPath, DataObject*& pObject ) { DataObject* parent = nullptr; - StatusCode status = findObject( parentPath, parent ); + StatusCode status = findObject( parentPath, parent ); return status.isSuccess() ? findObject( parent, objectPath, pObject ) : status; } @@ -851,8 +851,8 @@ StatusCode DataSvc::findObject( DataObject* parentObj, const std::string& path, /// Update object. StatusCode DataSvc::updateObject( const std::string& updatePath ) { - DataObject* pO = nullptr; - StatusCode status = findObject( updatePath, pO ); + DataObject* pO = nullptr; + StatusCode status = findObject( updatePath, pO ); return status.isSuccess() ? updateObject( pO ) : retrieveObject( updatePath, pO ); } @@ -915,7 +915,7 @@ StatusCode DataSvc::updateObject( DataObject* toUpdate ) StatusCode DataSvc::updateObject( const std::string& parentPath, const std::string& updatePath ) { DataObject* pParent = nullptr; - StatusCode status = findObject( parentPath, pParent ); + StatusCode status = findObject( parentPath, pParent ); return status.isSuccess() ? updateObject( pParent, updatePath ) : status; } @@ -923,7 +923,7 @@ StatusCode DataSvc::updateObject( const std::string& parentPath, const std::stri StatusCode DataSvc::updateObject( DataObject* parent, const std::string& updatePath ) { DataObject* pObject = nullptr; - StatusCode status = findObject( parent, updatePath, pObject ); + StatusCode status = findObject( parent, updatePath, pObject ); return status.isSuccess() ? updateObject( pObject ) : status; } @@ -942,7 +942,7 @@ StatusCode DataSvc::linkObject( IRegistry* from, const std::string& objPath, Dat std::string::size_type sep = objPath.rfind( SEPARATOR ); if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself DataObject* pO = nullptr; - StatusCode sc = retrieveObject( from, objPath.substr( 0, sep ), pO ); + StatusCode sc = retrieveObject( from, objPath.substr( 0, sep ), pO ); if ( sc.isSuccess() ) { sc = linkObject( pO->registry(), objPath.substr( sep ), to ); } @@ -975,8 +975,8 @@ StatusCode DataSvc::linkObject( const std::string& fullPath, DataObject* to ) /// Add a link to another object. StatusCode DataSvc::linkObject( const std::string& from, const std::string& objPath, DataObject* to ) { - DataObject* pO = nullptr; - StatusCode status = retrieveObject( from, pO ); + DataObject* pO = nullptr; + StatusCode status = retrieveObject( from, pO ); return status.isSuccess() ? linkObject( pO->registry(), objPath, to ) : status; } @@ -1002,7 +1002,7 @@ StatusCode DataSvc::unlinkObject( IRegistry* from, const std::string& objPath ) std::string::size_type sep = objPath.rfind( SEPARATOR ); if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself DataObject* pO = nullptr; - StatusCode sc = findObject( from, objPath.substr( 0, sep ), pO ); + StatusCode sc = findObject( from, objPath.substr( 0, sep ), pO ); if ( sc.isSuccess() ) { sc = unlinkObject( pO->registry(), objPath.substr( sep ) ); } @@ -1034,7 +1034,7 @@ StatusCode DataSvc::unlinkObject( const std::string& fullPath ) StatusCode DataSvc::unlinkObject( const std::string& from, const std::string& objPath ) { DataObject* pObject = nullptr; - StatusCode status = findObject( from, pObject ); + StatusCode status = findObject( from, pObject ); return status.isSuccess() ? unlinkObject( pObject->registry(), objPath ) : status; } @@ -1090,8 +1090,8 @@ StatusCode DataSvc::preLoad( int depth, int load_depth, DataObject* pObject ) RegEntry* dir = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( dir ) { for ( const auto& i : *dir ) { - DataObject* pObj = nullptr; - StatusCode status = retrieveObject( pObject, i->name(), pObj ); + DataObject* pObj = nullptr; + StatusCode status = retrieveObject( pObject, i->name(), pObj ); if ( status.isSuccess() && depth < load_depth ) { preLoad( depth, load_depth, pObj ).ignore(); } @@ -1106,8 +1106,8 @@ StatusCode DataSvc::preLoad() { DataObject* pObj = nullptr; for ( const auto& i : m_preLoads ) { - StatusCode sc = retrieveObject( i.path(), pObj ); - int load_depth = i.depth(); + StatusCode sc = retrieveObject( i.path(), pObj ); + int load_depth = i.depth(); if ( sc.isSuccess() && load_depth > 1 ) { preLoad( 1, load_depth, pObj ).ignore(); } diff --git a/GaudiKernel/src/Lib/Debugger.cpp b/GaudiKernel/src/Lib/Debugger.cpp index 2c75a3497d4aa229414db1b79cb43f16936036e9..fa2be10b7de9334ad98b077fccbbd9f20e1e95e9 100644 --- a/GaudiKernel/src/Lib/Debugger.cpp +++ b/GaudiKernel/src/Lib/Debugger.cpp @@ -64,9 +64,9 @@ long System::breakExecution( long pid ) _asm int 3 return 1; } else { Win::LPTHREAD_START_ROUTINE fun; - Win::HANDLE th, ph; - Win::HINSTANCE mh; - Win::DWORD id; + Win::HANDLE th, ph; + Win::HINSTANCE mh; + Win::DWORD id; mh = Win::LoadLibrary( "Kernel32" ); if ( 0 != mh ) { fun = (Win::LPTHREAD_START_ROUTINE)Win::GetProcAddress( mh, "DebugBreak" ); diff --git a/GaudiKernel/src/Lib/Environment.cpp b/GaudiKernel/src/Lib/Environment.cpp index 68c169a594e303a9fe4b3104075c6eb6282c80b1..82eeaa76ba3214e24daaecf1dc8c0f62f719587e 100644 --- a/GaudiKernel/src/Lib/Environment.cpp +++ b/GaudiKernel/src/Lib/Environment.cpp @@ -27,7 +27,7 @@ namespace if ( !System::getEnv( env.c_str(), rep ) ) rep = i_resolve( env, --recursions ); if ( rep.length() ) { std::string e( beg, c - beg + 1 ); - size_t idx = std::string::npos; + size_t idx = std::string::npos; while ( ( idx = source.find( e ) ) != std::string::npos ) { source.replace( idx, e.length(), rep ); } diff --git a/GaudiKernel/src/Lib/EventIDBase.cpp b/GaudiKernel/src/Lib/EventIDBase.cpp index 7ced0b3369b9716bcf454be12a0443f08bc4fa90..fa1b7b649c613d3d89bf069c1ed096e1ee05cca5 100644 --- a/GaudiKernel/src/Lib/EventIDBase.cpp +++ b/GaudiKernel/src/Lib/EventIDBase.cpp @@ -11,7 +11,7 @@ #include <limits> -const EventIDBase::number_type EventIDBase::UNDEFNUM = std::numeric_limits<EventIDBase::number_type>::max(); +const EventIDBase::number_type EventIDBase::UNDEFNUM = std::numeric_limits<EventIDBase::number_type>::max(); const EventIDBase::event_number_t EventIDBase::UNDEFEVT = std::numeric_limits<EventIDBase::event_number_t>::max(); EventIDBase::EventIDBase( number_type run_number, event_number_t event_number, number_type time_stamp, diff --git a/GaudiKernel/src/Lib/EventSelectorDataStream.cpp b/GaudiKernel/src/Lib/EventSelectorDataStream.cpp index cbf716065c40c9ec18ce911388595452b2f5ee68..5b31cfa064b11802eb40682006ad924a0a16c4d8 100644 --- a/GaudiKernel/src/Lib/EventSelectorDataStream.cpp +++ b/GaudiKernel/src/Lib/EventSelectorDataStream.cpp @@ -61,7 +61,7 @@ const Gaudi::Property<std::string>* EventSelectorDataStream::property( const std // Parse input criteria StatusCode EventSelectorDataStream::initialize() { - bool isData = true; + bool isData = true; std::string auth, dbtyp, collsvc, item, crit, sel, svc, stmt; std::string cnt = "/Event"; std::string db = "<Unknown>"; diff --git a/GaudiKernel/src/Lib/GaudiHandle.cpp b/GaudiKernel/src/Lib/GaudiHandle.cpp index b4a7ea1ce7ac3e8cdefc93fd6a7f00493277654b..391245e00dd5ec8540ab6a0a638502543c540c9b 100644 --- a/GaudiKernel/src/Lib/GaudiHandle.cpp +++ b/GaudiKernel/src/Lib/GaudiHandle.cpp @@ -85,10 +85,10 @@ std::string GaudiHandleArrayBase::pythonPropertyClassName() const { return compo std::string GaudiHandleArrayBase::pythonRepr() const { - std::string repr = pythonPropertyClassName() + "(["; - auto theList = typesAndNames(); - auto first = theList.begin(); - auto last = theList.end(); + std::string repr = pythonPropertyClassName() + "(["; + auto theList = typesAndNames(); + auto first = theList.begin(); + auto last = theList.end(); if ( first != last ) { repr += "'" + *first + "'"; ++first; diff --git a/GaudiKernel/src/Lib/GaudiMain.cpp b/GaudiKernel/src/Lib/GaudiMain.cpp index 561019bccc797a3e147227726ca73dc59f298c14..787504977a40fbdfc7efd6c6c27b132aeff93b45 100644 --- a/GaudiKernel/src/Lib/GaudiMain.cpp +++ b/GaudiKernel/src/Lib/GaudiMain.cpp @@ -13,9 +13,9 @@ extern "C" GAUDI_API int GaudiMain( int argc, char** argv ) { - IInterface* iface = Gaudi::createApplicationMgr(); + IInterface* iface = Gaudi::createApplicationMgr(); SmartIF<IAppMgrUI> appMgr( iface ); - auto propMgr = appMgr.as<IProperty>(); + auto propMgr = appMgr.as<IProperty>(); if ( !appMgr || !propMgr ) { std::cout << "Fatal error while creating the ApplicationMgr " << std::endl; @@ -35,7 +35,7 @@ extern "C" GAUDI_API int GaudiMain( int argc, char** argv ) } // Run the application manager and process events - StatusCode sc = appMgr->run(); + StatusCode sc = appMgr->run(); Gaudi::Property<int> returnCode( "ReturnCode", 0 ); propMgr->getProperty( &returnCode ).ignore(); // Release Application Manager diff --git a/GaudiKernel/src/Lib/JobHistory.cpp b/GaudiKernel/src/Lib/JobHistory.cpp index 00f26cc8047549e71d455920450ff669fbe3b7ff..3553a6afc75d92386a5840a1b487123ebe32bb39 100644 --- a/GaudiKernel/src/Lib/JobHistory.cpp +++ b/GaudiKernel/src/Lib/JobHistory.cpp @@ -103,8 +103,8 @@ void JobHistory::dump( std::ostream& ost, const bool isXML, int /*ind*/ ) const ost << "Properties: [" << endl; ; for ( const auto& ipprop : propertyPairs() ) { - const std::string& client = ipprop.first; - const PropertyBase* prop = ipprop.second; + const std::string& client = ipprop.first; + const PropertyBase* prop = ipprop.second; ost << client << ": "; prop->fillStream( ost ); ost << endl; diff --git a/GaudiKernel/src/Lib/KeyedObjectManager.cpp b/GaudiKernel/src/Lib/KeyedObjectManager.cpp index b930187844fb1ee208820ea9d8ff245337901acc..8d8541276a17acb952da02178f085880b42df5ec 100644 --- a/GaudiKernel/src/Lib/KeyedObjectManager.cpp +++ b/GaudiKernel/src/Lib/KeyedObjectManager.cpp @@ -11,7 +11,7 @@ namespace Containers { struct hashmap { typedef GaudiUtils::HashMap<long, void*> map_type; - map_type m; + map_type m; std::vector<void*> v; bool insert( void* obj, long key ) { @@ -23,7 +23,7 @@ namespace Containers }; struct map { typedef std::map<long, void*> map_type; - map_type m; + map_type m; std::vector<void*> v; bool insert( void* obj, long key ) { @@ -62,7 +62,7 @@ namespace Containers template <class CONT> class find { - const void* m_obj; + const void* m_obj; typedef typename CONT::value_type v_type; public: @@ -130,7 +130,7 @@ void Containers::KeyedObjectManager<T>::onDirty() const { m_direct = 1; auto& s = *m_setup.s; - long i = 0; + long i = 0; for ( auto p : s.v ) s.insert( p, i++ ); s.v.clear(); } @@ -212,13 +212,13 @@ template <class T> void* Containers::KeyedObjectManager<T>::erase( long key, const void* obj ) { typedef typename T::map_type MTYP; - typedef find<MTYP> FND; + typedef find<MTYP> FND; if ( 1 == m_direct ) { auto& m = m_setup.s->m; - auto i = ( obj ? std::find_if( m.begin(), m.end(), FND( obj ) ) : m_setup.s->m.find( key ) ); + auto i = ( obj ? std::find_if( m.begin(), m.end(), FND( obj ) ) : m_setup.s->m.find( key ) ); if ( i != m_setup.s->m.end() ) { void* o = i->second; - auto j = std::find( m_seq->begin(), m_seq->end(), o ); + auto j = std::find( m_seq->begin(), m_seq->end(), o ); if ( j != m_seq->end() ) { m_seq->erase( j ); m_setup.s->m.erase( i ); @@ -284,7 +284,7 @@ template <class T> long Containers::KeyedObjectManager<T>::erase( seq_type::iterator beg, seq_type::iterator end ) { typedef typename T::map_type MTYP; - typedef find<MTYP> FND; + typedef find<MTYP> FND; if ( 0 == m_direct ) { onDirty(); return erase( beg, end ); @@ -486,7 +486,7 @@ namespace Containers containerIsInconsistent(); } void* o = *i; - auto j = std::find( m_seq->begin(), m_seq->end(), o ); + auto j = std::find( m_seq->begin(), m_seq->end(), o ); if ( j == m_seq->end() ) { containerIsInconsistent(); } @@ -513,7 +513,7 @@ namespace Containers onDirty(); return erase( beg, end ); } else { - long cnt = 0, nobj = end - beg; + long cnt = 0, nobj = end - beg; id_type& idx = m_setup.s->m_idx; for ( auto& elem : idx ) { auto j = m_setup.s->v.begin() + ( elem ); diff --git a/GaudiKernel/src/Lib/Message.cpp b/GaudiKernel/src/Lib/Message.cpp index 12ae56c9d17edd4b9bf40027a5e4662bf00b9682..d52491b33a3d2078c3c999a8200ab05adb85a84d 100644 --- a/GaudiKernel/src/Lib/Message.cpp +++ b/GaudiKernel/src/Lib/Message.cpp @@ -252,7 +252,7 @@ void Message::makeFormattedMsg( const std::string& format ) const void Message::decodeFormat( const std::string& format ) const { if ( !format.empty() ) { - const char FORMAT_TYPE = format[format.length() - 1]; + const char FORMAT_TYPE = format[format.length() - 1]; const std::string FORMAT_PARAM = format.substr( 0, format.length() - 1 ); // Now test the format. diff --git a/GaudiKernel/src/Lib/MinimalEventLoopMgr.cpp b/GaudiKernel/src/Lib/MinimalEventLoopMgr.cpp index b9768ec96c79ceaf26d2794db11fa1e53a643f16..d31a37202521bc7886d4314096b2f4c70511b45b 100644 --- a/GaudiKernel/src/Lib/MinimalEventLoopMgr.cpp +++ b/GaudiKernel/src/Lib/MinimalEventLoopMgr.cpp @@ -47,7 +47,7 @@ namespace #define ON_DEBUG if ( UNLIKELY( outputLevel() <= MSG::DEBUG ) ) #define ON_VERBOSE if ( UNLIKELY( outputLevel() <= MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() //-------------------------------------------------------------------------------------------- @@ -155,7 +155,7 @@ StatusCode MinimalEventLoopMgr::initialize() if ( m_printCFExp && !m_topAlgList.empty() ) { info() << "Control Flow Expression:" << endmsg; std::stringstream expr; - auto& first = m_topAlgList.front(); + auto& first = m_topAlgList.front(); for ( auto& ialg : m_topAlgList ) { if ( ialg != first ) expr << " >> "; ialg->toControlFlowExpression( expr ); @@ -338,7 +338,7 @@ StatusCode MinimalEventLoopMgr::nextEvent( int /* maxevt */ ) StatusCode MinimalEventLoopMgr::executeRun( int maxevt ) { StatusCode sc; - bool eventfailed = false; + bool eventfailed = false; // Call the beginRun() method of all top algorithms for ( auto& ita : m_topAlgList ) { @@ -386,7 +386,7 @@ namespace private: SmartIF<IProperty> m_appmgr; - int m_retcode; + int m_retcode; }; } //-------------------------------------------------------------------------------------------- @@ -411,7 +411,7 @@ StatusCode MinimalEventLoopMgr::executeEvent( void* /* par */ ) const auto appmgr = serviceLocator()->as<IProperty>(); // Call the execute() method of all top algorithms for ( auto& ita : m_topAlgList ) { - StatusCode sc( StatusCode::FAILURE ); + StatusCode sc( StatusCode::FAILURE ); AlgExecState& algState = m_aess->algExecState( ita, context ); try { if ( UNLIKELY( m_abortEvent ) ) { @@ -517,15 +517,15 @@ StatusCode MinimalEventLoopMgr::decodeTopAlgs() for ( const auto& it : m_topAlgNames.value() ) { Gaudi::Utils::TypeNameString item{it}; // Got the type and name. Now creating the algorithm, avoiding duplicate creation. - std::string item_name = item.name() + getGaudiThreadIDfromName( name() ); - const bool CREATE = false; - SmartIF<IAlgorithm> alg = algMan->algorithm( item_name, CREATE ); + std::string item_name = item.name() + getGaudiThreadIDfromName( name() ); + const bool CREATE = false; + SmartIF<IAlgorithm> alg = algMan->algorithm( item_name, CREATE ); if ( alg ) { DEBMSG << "Top Algorithm " << item_name << " already exists" << endmsg; } else { DEBMSG << "Creating Top Algorithm " << item.type() << " with name " << item_name << endmsg; IAlgorithm* ialg = nullptr; - StatusCode sc1 = algMan->createAlgorithm( item.type(), item_name, ialg ); + StatusCode sc1 = algMan->createAlgorithm( item.type(), item_name, ialg ); if ( !sc1.isSuccess() ) { error() << "Unable to create Top Algorithm " << item.type() << " with name " << item_name << endmsg; return sc1; @@ -565,14 +565,14 @@ StatusCode MinimalEventLoopMgr::decodeOutStreams() m_outStreamList.clear(); for ( const auto& it : m_outStreamNames.value() ) { Gaudi::Utils::TypeNameString item( it, m_outStreamType ); - const bool CREATE = false; - SmartIF<IAlgorithm> os = algMan->algorithm( item, CREATE ); + const bool CREATE = false; + SmartIF<IAlgorithm> os = algMan->algorithm( item, CREATE ); if ( os ) { DEBMSG << "Output Stream " << item.name() << " already exists" << endmsg; } else { DEBMSG << "Creating Output Stream " << it << endmsg; IAlgorithm* ios = nullptr; - StatusCode sc1 = algMan->createAlgorithm( item.type(), item.name(), ios ); + StatusCode sc1 = algMan->createAlgorithm( item.type(), item.name(), ios ); if ( !sc1.isSuccess() ) { error() << "Unable to create Output Stream " << it << endmsg; return sc1; diff --git a/GaudiKernel/src/Lib/ModuleInfo.cpp b/GaudiKernel/src/Lib/ModuleInfo.cpp index 4a64f77b28de39ad4f2143998868de652cc2a4ab..16873e5b20ce7161f5a6b122222dafb2a628887e 100644 --- a/GaudiKernel/src/Lib/ModuleInfo.cpp +++ b/GaudiKernel/src/Lib/ModuleInfo.cpp @@ -47,7 +47,7 @@ static PsApiFunctions _psApi; #include <string.h> #endif -static System::ImageHandle ModuleHandle = nullptr; +static System::ImageHandle ModuleHandle = nullptr; static std::vector<std::string> s_linkedModules; /// Retrieve base name of module @@ -107,7 +107,7 @@ System::ModuleType System::moduleType() static ModuleType type = UNKNOWN; if ( type == UNKNOWN ) { const std::string& module = moduleNameFull(); - int loc = module.rfind( '.' ) + 1; + int loc = module.rfind( '.' ) + 1; if ( loc == 0 ) type = EXECUTABLE; else if ( module[loc] == 'e' || module[loc] == 'E' ) @@ -131,7 +131,7 @@ void* System::processHandle() #ifdef _WIN32 static HANDLE hP = ::OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid ); #else - static void* hP = (void*)pid; + static void* hP = (void*)pid; #endif return hP; } @@ -144,7 +144,7 @@ System::ImageHandle System::moduleHandle() if ( processHandle() ) { #ifdef _WIN32 static HINSTANCE handle = 0; - DWORD cbNeeded; + DWORD cbNeeded; if ( 0 == handle && _psApi ) { if ( _psApi.EnumProcessModules( processHandle(), &handle, sizeof( ModuleHandle ), &cbNeeded ) ) { } @@ -175,7 +175,7 @@ System::ImageHandle System::exeHandle() #ifdef _WIN32 if ( processHandle() ) { static HINSTANCE handle = 0; - DWORD cbNeeded; + DWORD cbNeeded; if ( 0 == handle && _psApi ) { if ( _psApi.EnumProcessModules( processHandle(), &handle, sizeof( ModuleHandle ), &cbNeeded ) ) { } @@ -234,8 +234,8 @@ const std::vector<std::string> System::linkedModules() { if ( s_linkedModules.size() == 0 ) { #ifdef _WIN32 - char name[255]; // Maximum file name length on NT 4.0 - DWORD cbNeeded; + char name[255]; // Maximum file name length on NT 4.0 + DWORD cbNeeded; HINSTANCE handle[1024]; if ( _psApi ) { if ( _psApi.EnumProcessModules( processHandle(), handle, sizeof( handle ), &cbNeeded ) ) { diff --git a/GaudiKernel/src/Lib/MsgStream.cpp b/GaudiKernel/src/Lib/MsgStream.cpp index 3d5d5cb724887e7f7f57c60194bf0e51ec09d205..ef25ca54fb2b26a4a84863f1f2ed6397386c00a1 100644 --- a/GaudiKernel/src/Lib/MsgStream.cpp +++ b/GaudiKernel/src/Lib/MsgStream.cpp @@ -119,9 +119,9 @@ void MsgStream::resetColor() std::string format( const char* fmt, ... ) { - const int buffsize = 2048; + const int buffsize = 2048; static char buffer[buffsize]; - va_list arguments; + va_list arguments; va_start( arguments, fmt ); if ( vsnprintf( buffer, buffsize, fmt, arguments ) >= buffsize ) throw GaudiException( "Insufficient buffer size (" + std::to_string( buffsize ) + ") when formatting message", diff --git a/GaudiKernel/src/Lib/NTupleItems.cpp b/GaudiKernel/src/Lib/NTupleItems.cpp index 276a39fad206a50c06b4a1c2b44dfb4960d7a023..c2595531f4b9e4ba1dc383a00ed82762118c4cc0 100644 --- a/GaudiKernel/src/Lib/NTupleItems.cpp +++ b/GaudiKernel/src/Lib/NTupleItems.cpp @@ -18,7 +18,7 @@ #include "GaudiKernel/ContainedObject.h" #include "GaudiKernel/DataObject.h" -typedef const std::string& CSTR; +typedef const std::string& CSTR; typedef const std::type_info& CTYPE; /// Create instance diff --git a/GaudiKernel/src/Lib/ParsersStandardMisc5.cpp b/GaudiKernel/src/Lib/ParsersStandardMisc5.cpp index 75cb04e9bc7dfe5186a0e3467ba75f2d8cc37511..e8733e05d5d233a9f22eddced1779ed123690c09 100644 --- a/GaudiKernel/src/Lib/ParsersStandardMisc5.cpp +++ b/GaudiKernel/src/Lib/ParsersStandardMisc5.cpp @@ -8,7 +8,7 @@ StatusCode Gaudi::Parsers::parse( std::map<unsigned int, std::string>& result, c StatusCode Gaudi::Parsers::parse( std::string& name, std::string& value, const std::string& input ) { Skipper skipper; - KeyValueGrammar<IteratorT, Skipper> g; + KeyValueGrammar<IteratorT, Skipper> g; KeyValueGrammar<IteratorT, Skipper>::ResultT result; auto iter = input.begin(); bool parse_result = qi::phrase_parse( iter, input.end(), g, skipper, result ) && ( iter == input.end() ); diff --git a/GaudiKernel/src/Lib/ParsersStandardSingle.cpp b/GaudiKernel/src/Lib/ParsersStandardSingle.cpp index a1da4403a52381bb35de6bc43c61dd33072f3f63..429afc637528f20e566afe02563be772edd68018 100644 --- a/GaudiKernel/src/Lib/ParsersStandardSingle.cpp +++ b/GaudiKernel/src/Lib/ParsersStandardSingle.cpp @@ -37,7 +37,7 @@ PARSERS_DEF_FOR_SINGLE( float ) // See GAUDI-1121. StatusCode Gaudi::Parsers::parse( float& result, const std::string& input ) { - double tmp{0}; + double tmp{0}; StatusCode sc = Gaudi::Parsers::parse_( tmp, input ); result = static_cast<float>( tmp ); return sc; diff --git a/GaudiKernel/src/Lib/ParsersVct.cpp b/GaudiKernel/src/Lib/ParsersVct.cpp index 6ad71aa774881a6590608b0797bcb9039e50cbeb..1a49ed7822f4e01332e2654a1dc20134e67f29c4 100644 --- a/GaudiKernel/src/Lib/ParsersVct.cpp +++ b/GaudiKernel/src/Lib/ParsersVct.cpp @@ -11,7 +11,7 @@ namespace // ========================================================================== typedef std::map<std::string, double> MAP; - template <unsigned int N> + template <unsigned int N> inline MAP::const_iterator find( const MAP& m, const std::string ( &keys )[N] ) { for ( unsigned int i = 0; i < N; ++i ) { @@ -62,7 +62,7 @@ namespace Gaudi { Gaudi::XYZPoint point; - StatusCode sc = parse( point, input ); + StatusCode sc = parse( point, input ); if ( sc.isFailure() ) { return sc; } // RETURN diff --git a/GaudiKernel/src/Lib/ProcessDescriptor.cpp b/GaudiKernel/src/Lib/ProcessDescriptor.cpp index 12b224243ee21e0baefb90ab16cee41e3ae5417a..d40975737338f0e33a42e628cf677227a7d5c224 100644 --- a/GaudiKernel/src/Lib/ProcessDescriptor.cpp +++ b/GaudiKernel/src/Lib/ProcessDescriptor.cpp @@ -258,41 +258,41 @@ namespace NtApi (divide by sysconf(_SC_CLK_TCK). */ struct linux_proc { - int pid; - char comm[400]; - char state; - int ppid; - int pgrp; - int session; - int tty; - int tpgid; - unsigned long flags; - unsigned long minflt; - unsigned long cminflt; - unsigned long majflt; - unsigned long cmajflt; - unsigned long utime; - unsigned long stime; - long cutime; - long cstime; - long priority; - long nice; - long num_threads; - long itrealvalue; + int pid; + char comm[400]; + char state; + int ppid; + int pgrp; + int session; + int tty; + int tpgid; + unsigned long flags; + unsigned long minflt; + unsigned long cminflt; + unsigned long majflt; + unsigned long cmajflt; + unsigned long utime; + unsigned long stime; + long cutime; + long cstime; + long priority; + long nice; + long num_threads; + long itrealvalue; unsigned long long starttime; - unsigned long vsize; - long rss; - unsigned long rlim; - unsigned long startcode; - unsigned long endcode; - unsigned long startstack; - unsigned long kstkesp; - unsigned long kstkeip; - unsigned long signal; - unsigned long blocked; - unsigned long sigignore; - unsigned long sigcatch; - unsigned long wchan; + unsigned long vsize; + long rss; + unsigned long rlim; + unsigned long startcode; + unsigned long endcode; + unsigned long startstack; + unsigned long kstkesp; + unsigned long kstkeip; + unsigned long signal; + unsigned long blocked; + unsigned long sigignore; + unsigned long sigcatch; + unsigned long wchan; }; #ifdef __APPLE__ @@ -303,7 +303,7 @@ static long pg_size = sysconf( _SC_PAGESIZE ); // getpagesize(); void readProcStat( long pid, linux_proc& pinfo ) { - int cnt, fd; + int cnt, fd; char buf[512]; std::ostringstream ost; @@ -510,11 +510,11 @@ long System::ProcessDescriptor::query( long pid, InfoType fetch, VM_COUNTERS* in #elif defined( _WIN32 ) // Windows 95,98... #elif defined( __linux ) // Linux const ssize_t bufsize = 1024; - char buf[bufsize]; + char buf[bufsize]; pid = processID( pid ); sprintf( buf, "/proc/%ld/statm", pid ); - long size, resident, share, trs, lrs, drs, dt; - int fd = open( buf, O_RDONLY ); + long size, resident, share, trs, lrs, drs, dt; + int fd = open( buf, O_RDONLY ); ssize_t nread = read( fd, buf, bufsize ); close( fd ); if ( nread < bufsize && nread >= 0 ) buf[nread] = '\0'; @@ -629,12 +629,12 @@ long System::ProcessDescriptor::query( long pid, InfoType fetch, KERNEL_USER_TIM #elif defined( _WIN32 ) // Windows 95,98... #elif defined( __linux ) // Linux static longlong prc_start = 0; - bool myself = pid <= 0 || pid == ::getpid(); // avoid unnecessary calls to getpid if pid<0 + bool myself = pid <= 0 || pid == ::getpid(); // avoid unnecessary calls to getpid if pid<0 if ( myself && prc_start == 0 ) { // called only once to set prc_start linux_proc prc; readProcStat( processID( pid ), prc ); // prc.startup is in ticks since system start, need to offset for absolute time - tms tmsb; + tms tmsb; static longlong offset = 100 * longlong( time( nullptr ) ) - longlong( times( &tmsb ) ); prc_start = ( prc.starttime + offset ) * TICK_TO_100NSEC; } @@ -648,7 +648,7 @@ long System::ProcessDescriptor::query( long pid, InfoType fetch, KERNEL_USER_TIM } else { // other process linux_proc prc; readProcStat( processID( pid ), prc ); - tms tmsb; + tms tmsb; static longlong offset = 100 * longlong( time( nullptr ) ) - longlong( times( &tmsb ) ); tms t; @@ -665,13 +665,13 @@ long System::ProcessDescriptor::query( long pid, InfoType fetch, KERNEL_USER_TIM // FIXME (MCl): Make an alternative function get timing on OSX // times() seems to cause a segmentation fault #else // no /proc file system: assume sys_start for the first call - tms tmsb; - static clock_t sys_start = times( 0 ); - static longlong offset = 100 * longlong( time( 0 ) ) - sys_start; - clock_t now = times( &tmsb ); - info->CreateTime = offset + now; - info->UserTime = tmsb.tms_utime; - info->KernelTime = tmsb.tms_stime; + tms tmsb; + static clock_t sys_start = times( 0 ); + static longlong offset = 100 * longlong( time( 0 ) ) - sys_start; + clock_t now = times( &tmsb ); + info->CreateTime = offset + now; + info->UserTime = tmsb.tms_utime; + info->KernelTime = tmsb.tms_stime; info->CreateTime *= TICK_TO_100NSEC; info->UserTime *= TICK_TO_100NSEC; info->KernelTime *= TICK_TO_100NSEC; diff --git a/GaudiKernel/src/Lib/ProcessDescriptor.h b/GaudiKernel/src/Lib/ProcessDescriptor.h index 141d027a7df9a1ea56d903bbce27de2132e7287e..3ea94848638d7784d981d728430978a0bb718d43 100644 --- a/GaudiKernel/src/Lib/ProcessDescriptor.h +++ b/GaudiKernel/src/Lib/ProcessDescriptor.h @@ -17,10 +17,10 @@ namespace System */ typedef struct _PEB* PPEB; struct PROCESS_BASIC_INFORMATION { - long ExitStatus; - PPEB PebBaseAddress; + long ExitStatus; + PPEB PebBaseAddress; unsigned long AffinityMask; - long BasePriority; + long BasePriority; unsigned long UniqueProcessId; unsigned long InheritedFromUniqueProcessId; }; @@ -36,7 +36,7 @@ namespace System unsigned long MinimumWorkingSetSize; unsigned long MaximumWorkingSetSize; unsigned long PagefileLimit; - longlong TimeLimit; + longlong TimeLimit; }; /** Process I/O Counters @@ -111,12 +111,12 @@ namespace System class ProcessHandle { void* m_handle; - bool m_needRelease; + bool m_needRelease; public: ProcessHandle( long pid ); virtual ~ProcessHandle(); - long item() { return m_needRelease ? 1 : 0; } + long item() { return m_needRelease ? 1 : 0; } void* handle() { return m_handle; } }; diff --git a/GaudiKernel/src/Lib/Property.cpp b/GaudiKernel/src/Lib/Property.cpp index c3f6de80e20b1038ce10d1f735c399cb31591b10..11a7c70d91123decd49986dc9a9aec1fadad44df 100644 --- a/GaudiKernel/src/Lib/Property.cpp +++ b/GaudiKernel/src/Lib/Property.cpp @@ -170,7 +170,7 @@ StatusCode GaudiHandleArrayProperty::fromString( const std::string& source ) { // treat as if a Gaudi::Property<std::vector<std::string>> std::vector<std::string> tmp; - StatusCode sc = Gaudi::Parsers::parse( tmp, source ); + StatusCode sc = Gaudi::Parsers::parse( tmp, source ); if ( sc.isFailure() ) return sc; if ( !m_pValue->setTypesAndNames( std::move( tmp ) ) ) return StatusCode::FAILURE; useUpdateHandler(); diff --git a/GaudiKernel/src/Lib/PropertyMgr.cpp b/GaudiKernel/src/Lib/PropertyMgr.cpp index fa5310652d6f81746e9192291cb716c465986480..179da7d78eba5400447fb61ac111c49602d82785 100644 --- a/GaudiKernel/src/Lib/PropertyMgr.cpp +++ b/GaudiKernel/src/Lib/PropertyMgr.cpp @@ -60,7 +60,7 @@ PropertyBase* PropertyMgr::declareRemoteProperty( const std::string& name, IProp return nullptr; } const std::string& nam = rname.empty() ? name : rname; - PropertyBase* p = property( nam, rsvc->getProperties() ); + PropertyBase* p = property( nam, rsvc->getProperties() ); m_remoteProperties.emplace_back( name, std::make_pair( rsvc, nam ) ); return p; } @@ -161,7 +161,7 @@ StatusCode PropertyMgr::setProperty( const std::string& i ) { std::string name; std::string value; - StatusCode sc = Gaudi::Parsers::parse( name, value, i ); + StatusCode sc = Gaudi::Parsers::parse( name, value, i ); if ( sc.isFailure() ) { return sc; } diff --git a/GaudiKernel/src/Lib/RegistryEntry.cpp b/GaudiKernel/src/Lib/RegistryEntry.cpp index 8a3dc1b69e07052809c44a0de002f9fe752b8665..dd590730c0969739150480030726c79dd46e5706 100644 --- a/GaudiKernel/src/Lib/RegistryEntry.cpp +++ b/GaudiKernel/src/Lib/RegistryEntry.cpp @@ -140,7 +140,7 @@ long DataSvcHelpers::RegistryEntry::remove( IRegistry* obj ) { try { RegistryEntry* pEntry = dynamic_cast<RegistryEntry*>( obj ); - auto i = std::remove( std::begin( m_store ), std::end( m_store ), pEntry ); + auto i = std::remove( std::begin( m_store ), std::end( m_store ), pEntry ); if ( i != std::end( m_store ) ) { pEntry->release(); m_store.erase( i, std::end( m_store ) ); diff --git a/GaudiKernel/src/Lib/Selector.cpp b/GaudiKernel/src/Lib/Selector.cpp index edf09d7b677e96717544708661ca19d9df174db7..90a76ad870adc9e1ba4e9f69f19ad1feba39fddc 100644 --- a/GaudiKernel/src/Lib/Selector.cpp +++ b/GaudiKernel/src/Lib/Selector.cpp @@ -22,8 +22,8 @@ StatusCode NTuple::Selector::initialize( NTuple::Tuple* /* nt */ ) { return Stat /// Overloaded callback from SelectStatement bool NTuple::Selector::operator()( void* nt ) { - DataObject* p = static_cast<DataObject*>( nt ); - bool result = false; + DataObject* p = static_cast<DataObject*>( nt ); + bool result = false; try { NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>( p ); if ( tuple ) { diff --git a/GaudiKernel/src/Lib/Service.cpp b/GaudiKernel/src/Lib/Service.cpp index 916e601cc8437212d121265980a895a77704fbd4..41dd581d805d560a17d6307ebf7929147988d9b9 100644 --- a/GaudiKernel/src/Lib/Service.cpp +++ b/GaudiKernel/src/Lib/Service.cpp @@ -295,7 +295,7 @@ SmartIF<ISvcLocator>& Service::serviceLocator() const { return m_svcLocator; } StatusCode Service::setProperties() { const bool CREATEIF( true ); - auto jos = serviceLocator()->service<IJobOptionsSvc>( "JobOptionsSvc", CREATEIF ); + auto jos = serviceLocator()->service<IJobOptionsSvc>( "JobOptionsSvc", CREATEIF ); if ( !jos ) { throw GaudiException( "Service [JobOptionsSvc] not found", name(), StatusCode::FAILURE ); } @@ -331,7 +331,7 @@ Service::Service( std::string name, ISvcLocator* svcloc ) : m_name( std::move( n // Initialize the default value from ApplicationMgr AuditAlgorithms Gaudi::Property<bool> audit( false ); - auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" ); + auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" ); if ( appMgr && appMgr->hasProperty( "AuditServices" ) ) { audit.assign( appMgr->getProperty( "AuditServices" ) ); } diff --git a/GaudiKernel/src/Lib/SmartRefBase.cpp b/GaudiKernel/src/Lib/SmartRefBase.cpp index f3c9c5cf3a3dcc5c787045c47a70d9e0bb0a7286..fba6bd59d448e2426286e1175f01ff1beda4fa3e 100644 --- a/GaudiKernel/src/Lib/SmartRefBase.cpp +++ b/GaudiKernel/src/Lib/SmartRefBase.cpp @@ -96,7 +96,7 @@ bool SmartRefBase::isEqualEx( const ContainedObject* pObj, const SmartRefBase& c const std::string& SmartRefBase::path() const { static std::string s_empty_string{}; - DataObject* source = nullptr; + DataObject* source = nullptr; if ( !m_data && m_contd ) m_data = m_contd->parent(); source = const_cast<DataObject*>( m_data ); if ( m_hintID != StreamBuffer::INVALID && source ) { diff --git a/GaudiKernel/src/Lib/StatEntity.cpp b/GaudiKernel/src/Lib/StatEntity.cpp index dfef155af115882908698b02f2b1ccc4d197e3c5..2a2a41fdb6da87e9d30c83c1211dbd94128bb060 100644 --- a/GaudiKernel/src/Lib/StatEntity.cpp +++ b/GaudiKernel/src/Lib/StatEntity.cpp @@ -176,7 +176,7 @@ double StatEntity::se::efficiencyErr() const n1 = 1; } ///< @attention treat properly the bins with eff=0 const long double n3 = nEntries; - long double n2 = n3 - accumulatedFlag; + long double n2 = n3 - accumulatedFlag; // treat properly the bins with eff=100% if ( 1 > fabsl( n2 ) ) { n2 = 1; diff --git a/GaudiKernel/src/Lib/StatusCode.cpp b/GaudiKernel/src/Lib/StatusCode.cpp index 6017bd4221c639c305766f0ad94ce9d478e9b151..6db09114f0c54c2c5f3b25d359c94b14c915588c 100644 --- a/GaudiKernel/src/Lib/StatusCode.cpp +++ b/GaudiKernel/src/Lib/StatusCode.cpp @@ -30,10 +30,10 @@ void StatusCode::check() auto scs = Gaudi::svcLocator()->service<IStatusCodeSvc>( "StatusCodeSvc" ); const size_t depth = 21; - void* addresses[depth]; + void* addresses[depth]; std::string lib, fnc; - void* addr = nullptr; + void* addr = nullptr; /// @FIXME : (MCl) use backTrace(std::string&, const int, const int) instead if ( System::backTrace( addresses, depth ) ) { diff --git a/GaudiKernel/src/Lib/StringKey.cpp b/GaudiKernel/src/Lib/StringKey.cpp index 7d5dce8b37b2af11a76fdafcdbe8ded62e1a7751..c9c8028e6598f74d77b88b6a19666d52ea373728 100644 --- a/GaudiKernel/src/Lib/StringKey.cpp +++ b/GaudiKernel/src/Lib/StringKey.cpp @@ -75,8 +75,8 @@ std::ostream& Gaudi::Utils::toStream( const Gaudi::StringKey& key, std::ostream& StatusCode Gaudi::Parsers::parse( Gaudi::StringKey& result, const std::string& input ) { std::string _result; - StatusCode sc = parse( _result, input ); - result = Gaudi::StringKey( _result ); + StatusCode sc = parse( _result, input ); + result = Gaudi::StringKey( _result ); return sc; } // ============================================================================ @@ -94,8 +94,8 @@ StatusCode Gaudi::Parsers::parse( std::vector<Gaudi::StringKey>& result, const s { result.clear(); typedef std::vector<std::string> Strings; - Strings _result; - StatusCode sc = parse( _result, input ); + Strings _result; + StatusCode sc = parse( _result, input ); if ( sc.isFailure() ) { return sc; } // RETURN diff --git a/GaudiKernel/src/Lib/System.cpp b/GaudiKernel/src/Lib/System.cpp index 0bb876d69cb8cdb98fe449b9b915192c6556387e..309c770176131fb9255db5bbb491e1d45c01e689 100644 --- a/GaudiKernel/src/Lib/System.cpp +++ b/GaudiKernel/src/Lib/System.cpp @@ -55,8 +55,8 @@ static const std::array<const char*, 1> SHLIB_SUFFIXES = {".dll"}; #include "dl.h" struct HMODULE { shl_descriptor dsc; - long numSym; - shl_symbol* sym; + long numSym; + shl_symbol* sym; }; #endif // HPUX or not... @@ -90,10 +90,10 @@ static unsigned long doLoad( const std::string& name, System::ImageHandle* handl #else const char* path = name.c_str(); #if defined( __linux ) || defined( __APPLE__ ) - void* mh = ::dlopen( name.length() == 0 ? nullptr : path, RTLD_LAZY | RTLD_GLOBAL ); + void* mh = ::dlopen( name.length() == 0 ? nullptr : path, RTLD_LAZY | RTLD_GLOBAL ); *handle = mh; #elif __hpux - shl_t mh = ::shl_load( name.length() == 0 ? 0 : path, BIND_IMMEDIATE | BIND_VERBOSE, 0 ); + shl_t mh = ::shl_load( name.length() == 0 ? 0 : path, BIND_IMMEDIATE | BIND_VERBOSE, 0 ); HMODULE* mod = new HMODULE; if ( 0 != mh ) { if ( 0 != ::shl_gethandle_r( mh, &mod->dsc ) ) { @@ -123,8 +123,8 @@ static unsigned long loadWithoutEnvironment( const std::string& name, System::Im // Check if the specified name has a shared library suffix already. If it // does, don't bother the name any more. - std::string dllName = name; - bool hasShlibSuffix = false; + std::string dllName = name; + bool hasShlibSuffix = false; for ( const char* suffix : SHLIB_SUFFIXES ) { const size_t len = strlen( suffix ); if ( dllName.compare( dllName.length() - len, len, suffix ) == 0 ) { @@ -170,8 +170,8 @@ unsigned long System::loadDynamicLib( const std::string& name, ImageHandle* hand // platform. for ( const char* suffix : SHLIB_SUFFIXES ) { // Add the suffix if necessary. - std::string libName = dllName; - const size_t len = strlen( suffix ); + std::string libName = dllName; + const size_t len = strlen( suffix ); if ( dllName.compare( dllName.length() - len, len, suffix ) != 0 ) { libName += suffix; } @@ -343,7 +343,7 @@ const std::string System::typeinfoName( const char* class_name ) } if ( off > 0 ) { std::string tmp = class_name + off; - long loc = 0; + long loc = 0; while ( ( loc = tmp.find( "class " ) ) > 0 ) { tmp.erase( loc, 6 ); } @@ -365,7 +365,7 @@ const std::string System::typeinfoName( const char* class_name ) } #elif defined( __linux ) || defined( __APPLE__ ) - int status; + int status; auto realname = std::unique_ptr<char, decltype( free )*>( abi::__cxa_demangle( class_name, nullptr, nullptr, &status ), std::free ); if ( !realname ) return class_name; @@ -478,7 +478,7 @@ const std::string& System::accountName() static std::string account = ""; if ( account == "" ) { #ifdef _WIN32 - char buffer[512]; + char buffer[512]; unsigned long buflen = sizeof( buffer ); ::GetUserName( buffer, &buflen ); account = buffer; @@ -540,7 +540,7 @@ const std::vector<std::string> System::cmdLineArgs() #elif defined( __linux ) || defined( __APPLE__ ) sprintf( exe, "/proc/%d/cmdline", ::getpid() ); FILE* cmdLine = ::fopen( exe, "r" ); - char cmd[1024]; + char cmd[1024]; if ( cmdLine ) { long len = fread( cmd, sizeof( char ), sizeof( cmd ), cmdLine ); if ( len > 0 ) { @@ -651,7 +651,7 @@ bool System::backTrace( std::string& btrace, const int depth, const int offset ) std::string fnc, lib; std::vector<void*> addresses( totalDepth, nullptr ); - int count = System::backTrace( addresses.data(), totalDepth ); + int count = System::backTrace( addresses.data(), totalDepth ); for ( int i = totalOffset; i < count; ++i ) { void* addr = nullptr; @@ -683,7 +683,7 @@ bool System::getStackLevel( void* addresses __attribute__( ( unused ) ), void*& addr = info.dli_saddr; if ( symbol ) { - int stat = -1; + int stat = -1; auto dmg = std::unique_ptr<char, decltype( free )*>( abi::__cxa_demangle( symbol, nullptr, nullptr, &stat ), std::free ); fnc = ( stat == 0 ) ? dmg.get() : symbol; diff --git a/GaudiKernel/src/Lib/ThreadGaudi.cpp b/GaudiKernel/src/Lib/ThreadGaudi.cpp index 33cabb6eff6e00c0d47910ed5a045b7d0dbb7f6e..0aca29f1f7a748caa186e90ac1f43b2d3f6daf59 100644 --- a/GaudiKernel/src/Lib/ThreadGaudi.cpp +++ b/GaudiKernel/src/Lib/ThreadGaudi.cpp @@ -31,7 +31,7 @@ std::string getGaudiThreadIDfromName( const std::string& name ) // find parent if name of an AlgTool std::string parent_name = name; std::string tool_name = ""; - size_t pp = name.find( "." ); + size_t pp = name.find( "." ); if ( ( pp > 0 ) && ( pp <= name.length() ) ) { parent_name = name.substr( 0, name.find( "." ) - 1 ); tool_name = name.substr( name.find( "." ) ); @@ -56,7 +56,7 @@ std::string getGaudiThreadGenericName( const std::string& name ) // find parent if name of an AlgTool std::string parent_name = name; std::string tool_name = ""; - size_t pp = name.find( "." ); + size_t pp = name.find( "." ); if ( ( pp > 0 ) && ( pp <= name.length() ) ) { parent_name = name.substr( 0, name.find( "." ) - 1 ); tool_name = name.substr( name.find( "." ) ); @@ -107,8 +107,8 @@ ThreadGaudi::ThreadMap* ThreadGaudi::getThreadMap() { return ThreadGaudi::instan const std::string& ThreadGaudi::getThreadID() { - ThreadMap* p_threadMap = getThreadMap(); - System::ThreadHandle s_pid = System::threadSelf(); + ThreadMap* p_threadMap = getThreadMap(); + System::ThreadHandle s_pid = System::threadSelf(); if ( p_threadMap->find( s_pid ) != p_threadMap->end() ) { return ( *p_threadMap->find( s_pid ) ).second; } else { diff --git a/GaudiKernel/src/Lib/ThreadLocalContext.cpp b/GaudiKernel/src/Lib/ThreadLocalContext.cpp index 70d56b9d6c88f2bf048c12c63ed42ad6619ea331..c73463f83098d51ff669a260e0c93ae6ac426e8d 100644 --- a/GaudiKernel/src/Lib/ThreadLocalContext.cpp +++ b/GaudiKernel/src/Lib/ThreadLocalContext.cpp @@ -19,8 +19,8 @@ namespace Gaudi { namespace Hive { - ContextIdType currentContextId() { return s_curCtx().slot(); } - ContextIdType currentContextEvt() { return s_curCtx().evt(); } + ContextIdType currentContextId() { return s_curCtx().slot(); } + ContextIdType currentContextEvt() { return s_curCtx().evt(); } const EventContext& currentContext() { return s_curCtx(); } void setCurrentContextEvt( long int evtN ) { s_curCtx().setEvt( evtN ); } diff --git a/GaudiKernel/src/Lib/Time.cpp b/GaudiKernel/src/Lib/Time.cpp index 5b8a6bcdf5bc87a4ff908340522b2165af6a6e21..33cd3d9d6d590d3154c825801a7d44cdfffb845a 100644 --- a/GaudiKernel/src/Lib/Time.cpp +++ b/GaudiKernel/src/Lib/Time.cpp @@ -67,7 +67,7 @@ using namespace Gaudi; static time_t timegm( struct tm* t ) { // This code is adapted from wine, samba - time_t t1 = mktime( t ); + time_t t1 = mktime( t ); struct tm gmt; gmtime_s( &gmt, &t1 ); time_t t2 = mktime( &gmt ); @@ -118,7 +118,7 @@ Time Time::current( void ) #else timeval tv; if ( gettimeofday( &tv, nullptr ) != 0 ) { - char buf[256]; + char buf[256]; std::ostringstream tag, msg; tag << "errno=" << errno; if ( strerror_r( errno, buf, 256 ) == 0 ) { @@ -218,10 +218,10 @@ Time::ValueType Time::utcoffset( int* daylight /* = 0 */ ) const #else // Adapted from WINE. time_t utctime = ( time_t )( m_nsecs / SEC_NSECS ); - tm localtm; + tm localtm; localtime_s( &localtm, &utctime ); int savedaylight = localtm.tm_isdst; - tm gmt; + tm gmt; gmtime_s( &gmt, &utctime ); gmt.tm_isdst = savedaylight; @@ -260,8 +260,8 @@ const char* Time::timezone( int* daylight /* = 0 */ ) const std::string Time::format( bool local, std::string spec ) const { /// @FIXME: This doesn't account for nsecs part! - std::string result; - tm time = split( local ); + std::string result; + tm time = split( local ); std::string::size_type length = 0; // handle the special case of "%f" diff --git a/GaudiKernel/src/Lib/Timing.cpp b/GaudiKernel/src/Lib/Timing.cpp index 02fada7f383979d5a0ada5502323e91a1417c73d..4b0c7e35f5e8a2daae99ca706ad95ab9bc9f8850 100644 --- a/GaudiKernel/src/Lib/Timing.cpp +++ b/GaudiKernel/src/Lib/Timing.cpp @@ -79,7 +79,7 @@ longlong System::tickCount() #ifdef _WIN32 count *= ::GetTickCount(); // Number of milliSec since system startup #else - struct tms buf; + struct tms buf; count *= 10 * times( &buf ); #endif return count; @@ -137,7 +137,7 @@ longlong System::upTime( TimeType typ ) /// Units of time between process creation and begin of epoche longlong System::creationTime( TimeType typ, InfoType fetch, long pid ) { - longlong created = 0; + longlong created = 0; KERNEL_USER_TIMES info; if ( fetch != NoFetch && getProcess()->query( pid, fetch, &info ) ) { created = adjustTime( typ, info.CreateTime - UNIX_BASE_TIME ); @@ -148,7 +148,7 @@ longlong System::creationTime( TimeType typ, InfoType fetch, long pid ) /// System Process Limits: Maximum processing time left for this process longlong System::remainingTime( TimeType typ, InfoType fetch, long pid ) { - longlong left = 0; + longlong left = 0; QUOTA_LIMITS quota; if ( fetch != NoFetch && getProcess()->query( pid, fetch, "a ) ) { if ( left == -1 ) { @@ -164,7 +164,7 @@ longlong System::remainingTime( TimeType typ, InfoType fetch, long pid ) longlong System::ellapsedTime( TimeType typ, InfoType fetch, long pid ) { KERNEL_USER_TIMES info; - longlong ellapsed = currentTime( microSec ) * 10; + longlong ellapsed = currentTime( microSec ) * 10; getProcess()->query( pid, fetch, &info ); ellapsed = adjustTime( typ, ellapsed + UNIX_BASE_TIME - info.CreateTime ); return ellapsed; @@ -174,7 +174,7 @@ longlong System::ellapsedTime( TimeType typ, InfoType fetch, long pid ) longlong System::kernelTime( TimeType typ, InfoType fetch, long pid ) { KERNEL_USER_TIMES info; - longlong kerneltime = 0; + longlong kerneltime = 0; if ( fetch != NoFetch && getProcess()->query( pid, fetch, &info ) ) { kerneltime = adjustTime( typ, info.KernelTime ); } @@ -184,7 +184,7 @@ longlong System::kernelTime( TimeType typ, InfoType fetch, long pid ) /// CPU kernel time of process in milliseconds longlong System::userTime( TimeType typ, InfoType fetch, long pid ) { - longlong usertime = 0; + longlong usertime = 0; KERNEL_USER_TIMES info; if ( fetch != NoFetch && getProcess()->query( pid, fetch, &info ) ) { usertime = adjustTime( typ, info.UserTime ); @@ -195,7 +195,7 @@ longlong System::userTime( TimeType typ, InfoType fetch, long pid ) /// CPU kernel time of process in milliseconds longlong System::cpuTime( TimeType typ, InfoType fetch, long pid ) { - longlong cputime = 0; + longlong cputime = 0; KERNEL_USER_TIMES info; if ( fetch != NoFetch && getProcess()->query( pid, fetch, &info ) ) { cputime = adjustTime( typ, info.KernelTime + info.UserTime ); diff --git a/GaudiKernel/src/Lib/TsDataSvc.cpp b/GaudiKernel/src/Lib/TsDataSvc.cpp index f3d3f7c29850a9eee735db8a145c81cdf00256e2..7a17a8c078e4447b3d4aff94a34d5de45eafa831 100644 --- a/GaudiKernel/src/Lib/TsDataSvc.cpp +++ b/GaudiKernel/src/Lib/TsDataSvc.cpp @@ -69,7 +69,7 @@ typedef DataSvcHelpers::RegistryEntry RegEntry; #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() /** IDataManagerSvc: Remove all data objects below the sub tree @@ -78,7 +78,7 @@ typedef DataSvcHelpers::RegistryEntry RegEntry; StatusCode TsDataSvc::clearSubTree( const std::string& sub_tree_path ) { DataObject* pObject = 0; - StatusCode status = findObject( sub_tree_path, pObject ); + StatusCode status = findObject( sub_tree_path, pObject ); if ( status.isSuccess() ) { RegEntry* node_entry = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( 0 != node_entry ) { @@ -131,8 +131,8 @@ StatusCode TsDataSvc::clearStore() StatusCode TsDataSvc::traverseSubTree( const std::string& sub_tree_path, IDataStoreAgent* pAgent ) { STD_LOCK_GUARD_MACRO - DataObject* pO = 0; - StatusCode status = findObject( sub_tree_path, pO ); + DataObject* pO = 0; + StatusCode status = findObject( sub_tree_path, pO ); if ( status.isSuccess() ) { status = traverseSubTree( pO, pAgent ); } @@ -330,12 +330,12 @@ StatusCode TsDataSvc::registerAddress( IRegistry* parentObj, const std::string& if ( sep > 0 && sep != std::string::npos ) { std::string p_path( objPath, 0, sep ); std::string o_path( objPath, sep, objPath.length() ); - RegEntry* p_entry = par_entry->findLeaf( p_path ); + RegEntry* p_entry = par_entry->findLeaf( p_path ); // Create default object leafs if the // intermediate nodes are not present if ( 0 == p_entry && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( par_entry->identifier(), p_path, pLeaf ); + StatusCode sc = registerObject( par_entry->identifier(), p_path, pLeaf ); if ( !sc.isSuccess() ) { delete pLeaf; } @@ -435,8 +435,8 @@ StatusCode TsDataSvc::registerObject( const std::string& fullPath, DataObject* p /// Register object with the data store. StatusCode TsDataSvc::registerObject( const std::string& parentPath, const std::string& objPath, DataObject* pObject ) { - DataObject* pO = 0; - StatusCode status = retrieveObject( parentPath, pO ); + DataObject* pO = 0; + StatusCode status = retrieveObject( parentPath, pO ); if ( !status.isSuccess() && m_forceLeaves ) { pO = createDefaultObject(); status = registerObject( parentPath, pO ); @@ -483,17 +483,17 @@ StatusCode TsDataSvc::registerObject( DataObject* parentObj, const std::string& } RegEntry* node_entry = CAST_REGENTRY( RegEntry*, parentObj->registry() ); if ( 0 != node_entry ) { - StatusCode status = INVALID_PARENT; - std::string::size_type sep = objPath.find( SEPARATOR, 1 ); + StatusCode status = INVALID_PARENT; + std::string::size_type sep = objPath.find( SEPARATOR, 1 ); if ( sep != std::string::npos ) { std::string p_path( objPath, 0, sep ); std::string o_path( objPath, sep, objPath.length() ); - RegEntry* par_entry = node_entry->findLeaf( p_path ); + RegEntry* par_entry = node_entry->findLeaf( p_path ); // Create default object leafs if the // intermediate nodes are not present if ( 0 == par_entry && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( parentObj, p_path, pLeaf ); + StatusCode sc = registerObject( parentObj, p_path, pLeaf ); if ( !sc.isSuccess() ) { delete pLeaf; } @@ -502,7 +502,7 @@ StatusCode TsDataSvc::registerObject( DataObject* parentObj, const std::string& status = retrieveEntry( node_entry, p_path, par_entry ); if ( !status.isSuccess() && !par_entry->address() && m_forceLeaves ) { DataObject* pLeaf = createDefaultObject(); - StatusCode sc = registerObject( parentObj, p_path, pLeaf ); + StatusCode sc = registerObject( parentObj, p_path, pLeaf ); if ( !sc.isSuccess() ) { delete pLeaf; } @@ -548,7 +548,7 @@ StatusCode TsDataSvc::registerObject( DataObject* parentObj, const std::string& StatusCode TsDataSvc::unregisterObject( const std::string& fullPath ) { DataObject* pObject = 0; - StatusCode status = findObject( fullPath, pObject ); + StatusCode status = findObject( fullPath, pObject ); if ( status.isSuccess() ) { RegEntry* pEntry = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( 0 != pEntry ) { @@ -573,8 +573,8 @@ StatusCode TsDataSvc::unregisterObject( const std::string& fullPath ) /// Unregister object from the data store. StatusCode TsDataSvc::unregisterObject( const std::string& parentPath, const std::string& objPath ) { - DataObject* pO = 0; - StatusCode status = findObject( parentPath, pO ); + DataObject* pO = 0; + StatusCode status = findObject( parentPath, pO ); if ( status.isSuccess() ) { status = unregisterObject( pO, objPath ); } @@ -693,7 +693,7 @@ StatusCode TsDataSvc::loadObject( IRegistry* pRegistry ) StatusCode TsDataSvc::loadObject( IConversionSvc* pLoader, IRegistry* pRegistry ) { STD_LOCK_GUARD_MACRO - StatusCode status = INVALID_OBJ_ADDR; + StatusCode status = INVALID_OBJ_ADDR; DataObject* pObject = 0; if ( 0 == pLoader ) { // Precondition: Data loader must be present if ( handleDataFault( pRegistry ) != 0 ) @@ -716,7 +716,7 @@ StatusCode TsDataSvc::loadObject( IConversionSvc* pLoader, IRegistry* pRegistry m_incidentSvc->fireIncident( incident ); } if ( m_inhibitPathes.size() > 0 ) { - const std::string& ident = pRegistry->identifier(); + const std::string& ident = pRegistry->identifier(); std::vector<std::string>::iterator inhibit = std::find( m_inhibitPathes.begin(), m_inhibitPathes.end(), ident ); if ( inhibit != m_inhibitPathes.end() ) { return NO_ACCESS; @@ -773,9 +773,9 @@ StatusCode TsDataSvc::loadObject( IConversionSvc* pLoader, IRegistry* pRegistry StatusCode TsDataSvc::retrieveEntry( RegEntry* parentObj, const std::string& path, RegEntry*& pEntry ) { STD_LOCK_GUARD_MACRO - std::string::size_type sep = path.find( SEPARATOR, 1 ); - StatusCode status = StatusCode( INVALID_ROOT, true ); - pEntry = 0; + std::string::size_type sep = path.find( SEPARATOR, 1 ); + StatusCode status = StatusCode( INVALID_ROOT, true ); + pEntry = 0; // A.Valassi 16.08.2001 avoid core dump if store is empty if ( checkRoot() ) { if ( 0 == parentObj ) { @@ -868,8 +868,8 @@ StatusCode TsDataSvc::retrieveEntry( RegEntry* parentObj, const std::string& pat StatusCode TsDataSvc::retrieveObject( IRegistry* pRegistry, const std::string& path, DataObject*& pObject ) { STD_LOCK_GUARD_MACRO - pObject = 0; - RegEntry *result = 0, *parent = CAST_REGENTRY( RegEntry *, pRegistry ); + pObject = 0; + RegEntry * result = 0, *parent = CAST_REGENTRY( RegEntry *, pRegistry ); StatusCode status = retrieveEntry( parent, path, result ); if ( status.isSuccess() ) { pObject = result->object(); @@ -889,7 +889,7 @@ StatusCode TsDataSvc::retrieveObject( const std::string& parentPath, const std:: DataObject*& pObject ) { DataObject* parent = 0; - StatusCode status = retrieveObject( parentPath, parent ); + StatusCode status = retrieveObject( parentPath, parent ); if ( status.isSuccess() ) { status = retrieveObject( parent, objectPath, pObject ); } @@ -919,9 +919,9 @@ StatusCode TsDataSvc::retrieveObject( DataObject* parentObj, int item, DataObjec StatusCode TsDataSvc::findObject( IRegistry* pRegistry, const std::string& path, DataObject*& pObject ) { STD_LOCK_GUARD_MACRO - pObject = 0; - IRegistry* pReg = ( 0 == pRegistry ) ? m_root : pRegistry; - RegEntry* root_entry = CAST_REGENTRY( RegEntry*, pReg ); + pObject = 0; + IRegistry* pReg = ( 0 == pRegistry ) ? m_root : pRegistry; + RegEntry* root_entry = CAST_REGENTRY( RegEntry*, pReg ); if ( 0 != root_entry ) { if ( path.length() > 0 ) { pReg = root_entry->find( path ); @@ -955,7 +955,7 @@ StatusCode TsDataSvc::findObject( const std::string& path, DataObject*& pObject StatusCode TsDataSvc::findObject( const std::string& parentPath, const std::string& objectPath, DataObject*& pObject ) { DataObject* parent = 0; - StatusCode status = findObject( parentPath, parent ); + StatusCode status = findObject( parentPath, parent ); if ( status.isSuccess() ) { status = findObject( parent, objectPath, pObject ); } @@ -984,8 +984,8 @@ StatusCode TsDataSvc::findObject( DataObject* parentObj, const std::string& path /// Update object. StatusCode TsDataSvc::updateObject( const std::string& updatePath ) { - DataObject* pO = 0; - StatusCode status = findObject( updatePath, pO ); + DataObject* pO = 0; + StatusCode status = findObject( updatePath, pO ); if ( status.isSuccess() ) { return updateObject( pO ); } @@ -1026,7 +1026,7 @@ StatusCode TsDataSvc::updateObject( DataObject* toUpdate ) return NO_DATA_LOADER; // Data loader must be present } if ( m_inhibitPathes.size() > 0 ) { - const std::string& ident = pRegistry->identifier(); + const std::string& ident = pRegistry->identifier(); std::vector<std::string>::iterator inhibit = std::find( m_inhibitPathes.begin(), m_inhibitPathes.end(), ident ); if ( inhibit != m_inhibitPathes.end() ) { return NO_ACCESS; @@ -1053,7 +1053,7 @@ StatusCode TsDataSvc::updateObject( DataObject* toUpdate ) StatusCode TsDataSvc::updateObject( const std::string& parentPath, const std::string& updatePath ) { DataObject* pParent = 0; - StatusCode status = findObject( parentPath, pParent ); + StatusCode status = findObject( parentPath, pParent ); if ( status.isSuccess() ) { status = updateObject( pParent, updatePath ); } @@ -1064,7 +1064,7 @@ StatusCode TsDataSvc::updateObject( const std::string& parentPath, const std::st StatusCode TsDataSvc::updateObject( DataObject* parent, const std::string& updatePath ) { DataObject* pObject = 0; - StatusCode status = findObject( parent, updatePath, pObject ); + StatusCode status = findObject( parent, updatePath, pObject ); if ( status.isSuccess() ) { status = updateObject( pObject ); } @@ -1088,7 +1088,7 @@ StatusCode TsDataSvc::linkObject( IRegistry* from, const std::string& objPath, D if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself DataObject* pO = 0; std::string fromPath( objPath, 0, sep ); - StatusCode sc = retrieveObject( from, fromPath, pO ); + StatusCode sc = retrieveObject( from, fromPath, pO ); if ( sc.isSuccess() ) { std::string toPath( objPath, sep, objPath.length() ); sc = linkObject( pO->registry(), toPath, to ); @@ -1116,8 +1116,8 @@ StatusCode TsDataSvc::linkObject( const std::string& fullPath, DataObject* to ) return linkObject( m_rootName, fullPath, to ); } std::string::size_type sep = fullPath.rfind( SEPARATOR ); - std::string objPath( fullPath, sep, fullPath.length() ); - std::string fromPath( fullPath, 0, sep ); + std::string objPath( fullPath, sep, fullPath.length() ); + std::string fromPath( fullPath, 0, sep ); return linkObject( fromPath, objPath, to ); } return INVALID_OBJ_PATH; @@ -1127,8 +1127,8 @@ StatusCode TsDataSvc::linkObject( const std::string& fullPath, DataObject* to ) StatusCode TsDataSvc::linkObject( const std::string& from, const std::string& objPath, DataObject* to ) { STD_LOCK_GUARD_MACRO - DataObject* pO = 0; - StatusCode status = retrieveObject( from, pO ); + DataObject* pO = 0; + StatusCode status = retrieveObject( from, pO ); if ( status.isSuccess() ) { return linkObject( pO->registry(), objPath, to ); } @@ -1160,7 +1160,7 @@ StatusCode TsDataSvc::unlinkObject( IRegistry* from, const std::string& objPath if ( sep > 0 && sep != std::string::npos ) { // in case the objPath is a sub-directory itself DataObject* pO = 0; std::string fromPath( objPath, 0, sep ); - StatusCode sc = findObject( from, fromPath, pO ); + StatusCode sc = findObject( from, fromPath, pO ); if ( sc.isSuccess() ) { std::string toPath( objPath, sep, objPath.length() ); sc = unlinkObject( pO->registry(), toPath ); @@ -1188,8 +1188,8 @@ StatusCode TsDataSvc::unlinkObject( const std::string& fullPath ) return unlinkObject( m_rootName, fullPath ); } std::string::size_type sep = fullPath.rfind( SEPARATOR ); - std::string objPath( fullPath, sep, fullPath.length() ); - std::string fromPath( fullPath, 0, sep ); + std::string objPath( fullPath, sep, fullPath.length() ); + std::string fromPath( fullPath, 0, sep ); return unlinkObject( fromPath, objPath ); } return INVALID_OBJ_PATH; @@ -1199,7 +1199,7 @@ StatusCode TsDataSvc::unlinkObject( const std::string& fullPath ) StatusCode TsDataSvc::unlinkObject( const std::string& from, const std::string& objPath ) { DataObject* pObject = 0; - StatusCode status = findObject( from, pObject ); + StatusCode status = findObject( from, pObject ); if ( status.isSuccess() ) { status = unlinkObject( pObject->registry(), objPath ); } @@ -1263,8 +1263,8 @@ StatusCode TsDataSvc::preLoad( int depth, int load_depth, DataObject* pObject ) RegEntry* dir = CAST_REGENTRY( RegEntry*, pObject->registry() ); if ( 0 != dir ) { for ( RegEntry::Iterator i = dir->begin(); i != dir->end(); i++ ) { - DataObject* pObj = 0; - StatusCode status = retrieveObject( pObject, ( *i )->name(), pObj ); + DataObject* pObj = 0; + StatusCode status = retrieveObject( pObject, ( *i )->name(), pObj ); if ( status.isSuccess() && depth < load_depth ) { preLoad( depth, load_depth, pObj ).ignore(); } @@ -1279,8 +1279,8 @@ StatusCode TsDataSvc::preLoad() { DataObject* pObj = 0; for ( LoadItems::iterator i = m_preLoads.begin(); i != m_preLoads.end(); i++ ) { - StatusCode sc = retrieveObject( ( *i ).path(), pObj ); - int load_depth = ( *i ).depth(); + StatusCode sc = retrieveObject( ( *i ).path(), pObj ); + int load_depth = ( *i ).depth(); if ( sc.isSuccess() && load_depth > 1 ) { preLoad( 1, load_depth, pObj ).ignore(); } diff --git a/GaudiKernel/src/Lib/Win32PsApi.h b/GaudiKernel/src/Lib/Win32PsApi.h index 67a9026e6021d00bcab2a0accc36837d89e99b79..2dc98d53ab25144f555f320dbe664f785810efe4 100644 --- a/GaudiKernel/src/Lib/Win32PsApi.h +++ b/GaudiKernel/src/Lib/Win32PsApi.h @@ -17,7 +17,7 @@ #ifdef _WIN32 typedef struct _MODULEINFO { LPVOID lpBaseOfDll; - DWORD SizeOfImage; + DWORD SizeOfImage; LPVOID EntryPoint; } MODULEINFO, *LPMODULEINFO; typedef struct _PSAPI_WS_WATCH_INFORMATION { diff --git a/GaudiKernel/src/Lib/xtoa.cpp b/GaudiKernel/src/Lib/xtoa.cpp index 2ab17c28130fdb5d3ea77300fc0532c90d2c59b2..4e2738632154fb4f45c95ff7bba5db9f4baf6d84 100644 --- a/GaudiKernel/src/Lib/xtoa.cpp +++ b/GaudiKernel/src/Lib/xtoa.cpp @@ -38,10 +38,10 @@ static void __cdecl xtoa( unsigned long val, char* buf, unsigned radix, int is_neg ) { - char* p; /* pointer to traverse string */ - char* firstdig; /* pointer to first digit */ - char temp; /* temp char */ - unsigned digval; /* value of digit */ + char* p; /* pointer to traverse string */ + char* firstdig; /* pointer to first digit */ + char temp; /* temp char */ + unsigned digval; /* value of digit */ p = buf; diff --git a/GaudiKernel/src/Util/DsoUtils.h b/GaudiKernel/src/Util/DsoUtils.h index 1882399ed55267d315b33fb6c7792b6cfcfbfa69..71b04910407dc3caa414881564c2669c522eea8a 100644 --- a/GaudiKernel/src/Util/DsoUtils.h +++ b/GaudiKernel/src/Util/DsoUtils.h @@ -51,7 +51,7 @@ namespace DsoUtils MEMORY_BASIC_INFORMATION mbi; if ( VirtualQuery( addr, &mbi, sizeof( mbi ) ) ) { HMODULE h_module = (HMODULE)mbi.AllocationBase; - char mod[1024]; + char mod[1024]; if ( GetModuleFileName( h_module, mod, sizeof( mod ) ) ) { const char* pos = strrchr( mod, '\\' ); if ( pos ) @@ -85,7 +85,7 @@ namespace DsoUtils } std::string::size_type pos = dsoname.find_last_of( sep ); - std::string curname; + std::string curname; if ( std::string::npos == pos ) { curname = dsoname; } else { diff --git a/GaudiKernel/src/Util/LibSymbolInfo.cpp b/GaudiKernel/src/Util/LibSymbolInfo.cpp index 5a1c62d14a91ab56d67c69a672d5b50c31fe1a54..b46e1995431ae4958d0f4657e16fc97badd52951 100644 --- a/GaudiKernel/src/Util/LibSymbolInfo.cpp +++ b/GaudiKernel/src/Util/LibSymbolInfo.cpp @@ -60,7 +60,7 @@ BOOL CLibSymbolInfo::DumpSymbols( LPTSTR lpszLibPathName, ostream& pFile ) //============================================================================= BOOL CLibSymbolInfo::Dump( LPTSTR lpszLibPathName, ostream& pFile ) { - string sBuff; + string sBuff; MEMORY_MAPPED_FILE libFile( lpszLibPathName ); // Ensure that the file mapping worked diff --git a/GaudiKernel/src/Util/LibSymbolInfo.h b/GaudiKernel/src/Util/LibSymbolInfo.h index 9254f33fad062785b14298b0b9da8e716cecee0c..39405f7d28d27a6cc8e9831597d8afa7abe753a8 100644 --- a/GaudiKernel/src/Util/LibSymbolInfo.h +++ b/GaudiKernel/src/Util/LibSymbolInfo.h @@ -38,16 +38,16 @@ public: MEMORY_MAPPED_FILE( PSTR pszFileName ); ~MEMORY_MAPPED_FILE( void ); - PVOID GetBase( void ) { return m_pMemoryMappedFileBase; } - DWORD GetFileSize( void ) { return m_cbFile; } - BOOL IsValid( void ) { return errMMF_NoError == m_errCode; } + PVOID GetBase( void ) { return m_pMemoryMappedFileBase; } + DWORD GetFileSize( void ) { return m_cbFile; } + BOOL IsValid( void ) { return errMMF_NoError == m_errCode; } errMMF GetErrorType() { return m_errCode; } private: HANDLE m_hFile; HANDLE m_hFileMapping; // Handle of memory mapped file - PVOID m_pMemoryMappedFileBase; - DWORD m_cbFile; + PVOID m_pMemoryMappedFileBase; + DWORD m_cbFile; errMMF m_errCode; }; diff --git a/GaudiKernel/src/Util/genconf.cpp b/GaudiKernel/src/Util/genconf.cpp index d338fd61239b3bb51bb7096530cbdcd9d1eb8489..af5e3819b9d703b0861d95ac947806b34fa3190e 100644 --- a/GaudiKernel/src/Util/genconf.cpp +++ b/GaudiKernel/src/Util/genconf.cpp @@ -83,7 +83,7 @@ class IConverter; // useful typedefs typedef std::vector<std::string> Strings_t; -typedef std::vector<fs::path> LibPathNames_t; +typedef std::vector<fs::path> LibPathNames_t; namespace { @@ -207,9 +207,9 @@ int main( int argc, char** argv ) ? boost::log::trivial::info : boost::log::trivial::warning ); - fs::path pwd = fs::initial_path(); - fs::path out; - Strings_t libs; + fs::path pwd = fs::initial_path(); + fs::path out; + Strings_t libs; std::string pkgName; std::string userModule; @@ -338,7 +338,7 @@ int main( int argc, char** argv ) for ( Strings_t::const_iterator lLib = lLib_list.begin(); lLib != lLib_list.end(); ++lLib ) { // load done through Gaudi helper class System::ImageHandle tmp; // we ignore the library handle - unsigned long err = System::loadDynamicLib( *lLib, &tmp ); + unsigned long err = System::loadDynamicLib( *lLib, &tmp ); if ( err != 1 ) { LOG_WARNING << "failed to load: " << *lLib; } @@ -404,8 +404,8 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule const Strings_t::const_iterator endLib = libs.end(); - const std::string gaudiSvc = "GaudiCoreSvc"; - const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib ); + const std::string gaudiSvc = "GaudiCoreSvc"; + const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib ); //--- Instantiate ApplicationMgr -------------------------------------------- if ( !isGaudiSvc && createAppMgr() ) { @@ -419,8 +419,8 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule std::set<std::string> bkgNames = registry.loadedFactories(); - ISvcLocator* svcLoc = Gaudi::svcLocator(); - IInterface* dummySvc = new Service( "DummySvc", svcLoc ); + ISvcLocator* svcLoc = Gaudi::svcLocator(); + IInterface* dummySvc = new Service( "DummySvc", svcLoc ); dummySvc->addRef(); bool allGood = true; @@ -438,7 +438,7 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule //--- Load component library ---------------------------------------------- System::ImageHandle handle; - unsigned long err = System::loadDynamicLib( *iLib, &handle ); + unsigned long err = System::loadDynamicLib( *iLib, &handle ); if ( err != 1 ) { LOG_ERROR << System::getLastErrorString(); allGood = false; @@ -456,8 +456,8 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule continue; } - const Registry::FactoryInfo info = registry.getInfo( *it ); - const string rtype = info.rtype; + const Registry::FactoryInfo info = registry.getInfo( *it ); + const string rtype = info.rtype; // do not generate configurables for the Reflex-compatible aliases if ( info.properties.find( "ReflexName" ) != info.properties.end() ) continue; @@ -473,7 +473,7 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule } string type; - bool known = true; + bool known = true; if ( ident == "ApplicationMgr" ) type = "ApplicationMgr"; else if ( rtype == typeid( IInterface* ).name() ) @@ -516,7 +516,7 @@ int configGenerator::genConfig( const Strings_t& libs, const string& userModule LOG_INFO << " - component: " << info.className << " (" << ( info.className != name ? ( name + ": " ) : std::string() ) << type << ")"; - string cname = "DefaultName"; + string cname = "DefaultName"; SmartIF<IProperty> prop; try { if ( type == "Algorithm" ) { @@ -583,7 +583,7 @@ void configGenerator::genImport( std::ostream& s, const boost::format& frmt, std { std::string::size_type pos = 0, nxtpos = 0; - std::string mod; + std::string mod; while ( std::string::npos != pos ) { // find end of module name @@ -722,7 +722,7 @@ void configGenerator::pythonizeValue( const PropertyBase* p, string& pvalue, str //----------------------------------------------------------------------------- { const std::string cvalue = p->toString(); - const type_info& ti = *p->type_info(); + const type_info& ti = *p->type_info(); if ( ti == typeid( bool ) ) { pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True"; ptype = "bool"; @@ -749,23 +749,23 @@ void configGenerator::pythonizeValue( const PropertyBase* p, string& pvalue, str pvalue = "'" + cvalue + "'"; ptype = "str"; } else if ( ti == typeid( GaudiHandleBase ) ) { - m_importGaudiHandles = true; - const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p ); - const GaudiHandleBase& base = hdl.value(); + m_importGaudiHandles = true; + const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p ); + const GaudiHandleBase& base = hdl.value(); pvalue = base.pythonRepr(); ptype = "GaudiHandle"; } else if ( ti == typeid( GaudiHandleArrayBase ) ) { - m_importGaudiHandles = true; - const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p ); - const GaudiHandleArrayBase& base = hdl.value(); + m_importGaudiHandles = true; + const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p ); + const GaudiHandleArrayBase& base = hdl.value(); pvalue = base.pythonRepr(); ptype = "GaudiHandleArray"; } else if ( ti == typeid( DataObjectHandleBase ) ) { - m_importDataObjectHandles = true; - const DataObjectHandleProperty& hdl = dynamic_cast<const DataObjectHandleProperty&>( *p ); - const DataObjectHandleBase& base = hdl.value(); + m_importDataObjectHandles = true; + const DataObjectHandleProperty& hdl = dynamic_cast<const DataObjectHandleProperty&>( *p ); + const DataObjectHandleBase& base = hdl.value(); pvalue = base.pythonRepr(); ptype = "DataObjectHandleBase"; @@ -782,9 +782,9 @@ void configGenerator::pythonizeValue( const PropertyBase* p, string& pvalue, str int createAppMgr() //----------------------------------------------------------------------------- { - IInterface* iface = Gaudi::createApplicationMgr(); + IInterface* iface = Gaudi::createApplicationMgr(); SmartIF<IAppMgrUI> appUI( iface ); - auto propMgr = appUI.as<IProperty>(); + auto propMgr = appUI.as<IProperty>(); if ( !propMgr || !appUI ) return EXIT_FAILURE; propMgr->setProperty( "JobOptionsType", "NONE" ); // No job options diff --git a/GaudiKernel/src/Util/genwindef.cpp b/GaudiKernel/src/Util/genwindef.cpp index 6a6aad3be32ddec32815ed3198d8da0180c08904..121afb2da51494fb79bf594cc06127b1834c9cd9 100644 --- a/GaudiKernel/src/Util/genwindef.cpp +++ b/GaudiKernel/src/Util/genwindef.cpp @@ -33,7 +33,7 @@ int main( int argc, char** argv ) string outfile( "exports.def" ); string library( "UnknownLib" ); string objfiles; - bool debug( false ); + bool debug( false ); int arg; if ( argc < 3 ) windef::usage(); @@ -59,7 +59,7 @@ int main( int argc, char** argv ) } CLibSymbolInfo libsymbols; - ofstream out( outfile ); + ofstream out( outfile ); if ( out.fail() ) { cerr << "windef: Error opening file " << outfile << endl; return 1; diff --git a/GaudiKernel/src/contrib/instrset.h b/GaudiKernel/src/contrib/instrset.h index 6623f62be5d15f9a133382ddbc93d5e6f76072cd..4484b5dd06e0b4dec161cf64f079a2fa32973cb7 100644 --- a/GaudiKernel/src/contrib/instrset.h +++ b/GaudiKernel/src/contrib/instrset.h @@ -115,34 +115,34 @@ #include <stdint.h> #elif defined( _MSC_VER ) // Older Microsoft compilers have their own definitions -typedef signed __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef signed __int16 int16_t; +typedef signed __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef signed __int16 int16_t; typedef unsigned __int16 uint16_t; -typedef signed __int32 int32_t; +typedef signed __int32 int32_t; typedef unsigned __int32 uint32_t; -typedef signed __int64 int64_t; +typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #ifndef _INTPTR_T_DEFINED #define _INTPTR_T_DEFINED #ifdef __x86_64__ -typedef int64_t intptr_t; +typedef int64_t intptr_t; #else typedef int32_t intptr_t; #endif #endif #else // This works with most compilers -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef signed short int int16_t; +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef signed short int int16_t; typedef unsigned short int uint16_t; -typedef signed int int32_t; -typedef unsigned int uint32_t; -typedef long long int64_t; +typedef signed int int32_t; +typedef unsigned int uint32_t; +typedef long long int64_t; typedef unsigned long long uint64_t; #ifdef __x86_64__ -typedef int64_t intptr_t; +typedef int64_t intptr_t; #else typedef int32_t intptr_t; #endif @@ -159,11 +159,11 @@ typedef int32_t intptr_t; namespace VCL_NAMESPACE { #endif - int instrset_detect( void ); // tells which instruction sets are supported - bool hasFMA3( void ); // true if FMA3 instructions supported - bool hasFMA4( void ); // true if FMA4 instructions supported - bool hasXOP( void ); // true if XOP instructions supported - bool hasAVX512ER( void ); // true if AVX512ER instructions supported + int instrset_detect( void ); // tells which instruction sets are supported + bool hasFMA3( void ); // true if FMA3 instructions supported + bool hasFMA4( void ); // true if FMA4 instructions supported + bool hasXOP( void ); // true if XOP instructions supported + bool hasAVX512ER( void ); // true if AVX512ER instructions supported #ifdef VCL_NAMESPACE } #endif diff --git a/GaudiKernel/tests/src/Memory_test.cpp b/GaudiKernel/tests/src/Memory_test.cpp index ec3a763f075e516619aa751c1b8bd2aad7d68716..c4e718332ff17b186f730914b77862a6671753f7 100644 --- a/GaudiKernel/tests/src/Memory_test.cpp +++ b/GaudiKernel/tests/src/Memory_test.cpp @@ -10,7 +10,7 @@ int main( int /* argc */, char** /* argv */ ) { size_t kB = size_t( 1024 ); size_t nBytes = kB * kB * kB * size_t( 1 ); - void* p = ::malloc( nBytes ); + void* p = ::malloc( nBytes ); if ( !p ) { cout << "Failed to allocate " << nBytes << " bytes of memory." << endl; return 1; diff --git a/GaudiKernel/tests/src/SerialTaskQueue_test.cpp b/GaudiKernel/tests/src/SerialTaskQueue_test.cpp index efeb7ad83d28a24cb433aa69723a02dc7ca7963f..f2fa49bf34d3f5312ff1f9b1805d3b9c4fd421c7 100644 --- a/GaudiKernel/tests/src/SerialTaskQueue_test.cpp +++ b/GaudiKernel/tests/src/SerialTaskQueue_test.cpp @@ -76,7 +76,7 @@ namespace GaudiKernelTest private: std::vector<int>& m_results; - int m_value; + int m_value; }; class Enqueuer @@ -87,8 +87,8 @@ namespace GaudiKernelTest private: Gaudi::SerialTaskQueue& queue; - std::vector<int>& results; - int n; + std::vector<int>& results; + int n; }; SerialTaskQueueTest() {} diff --git a/GaudiKernel/tests/src/profile_Property.cpp b/GaudiKernel/tests/src/profile_Property.cpp index c468e79486a1c904c53112a9eafcfe66d7bde075..1898d6396788b25aaab46c9b0e75d59abf8e63b9 100644 --- a/GaudiKernel/tests/src/profile_Property.cpp +++ b/GaudiKernel/tests/src/profile_Property.cpp @@ -9,7 +9,7 @@ int main() { const size_t N = 1000000; const size_t NPropNames = 50; - const auto page_sz = sysconf( _SC_PAGESIZE ); + const auto page_sz = sysconf( _SC_PAGESIZE ); std::chrono::time_point<std::chrono::high_resolution_clock> start, end; diff --git a/GaudiKernel/tests/src/test_AnyDataObject.cpp b/GaudiKernel/tests/src/test_AnyDataObject.cpp index d4087031f8fa1a9d5b06db9b749ad63985198eb1..1b2f1b8b3ab7000a7cb841ae038b1c44d15db219 100644 --- a/GaudiKernel/tests/src/test_AnyDataObject.cpp +++ b/GaudiKernel/tests/src/test_AnyDataObject.cpp @@ -64,7 +64,7 @@ namespace GaudiKernelTest // Test move of a vector { - auto adw = AnyDataWrapper<V>( {1, 2, 3, 4} ); + auto adw = AnyDataWrapper<V>( {1, 2, 3, 4} ); VSize s4( 4 ); CPPUNIT_ASSERT_EQUAL( s4, ( adw.getData() ).size() ); } diff --git a/GaudiKernel/tests/src/test_ContextSpecificPtr.cpp b/GaudiKernel/tests/src/test_ContextSpecificPtr.cpp index 681084654ee1451abb83d364aad1b151d6728119..1cf2dc96f086f06d07c85a91f34c7cd5698108b6 100644 --- a/GaudiKernel/tests/src/test_ContextSpecificPtr.cpp +++ b/GaudiKernel/tests/src/test_ContextSpecificPtr.cpp @@ -179,9 +179,9 @@ public: BOOST_AUTO_TEST_CASE( ctx_threaded ) { ThreadingTest test; - Runner runner( test ); - std::thread t1( runner, (ContextIdType)1 ); - std::thread t2( runner, (ContextIdType)2 ); + Runner runner( test ); + std::thread t1( runner, (ContextIdType)1 ); + std::thread t2( runner, (ContextIdType)2 ); t1.join(); t2.join(); diff --git a/GaudiKernel/tests/src/test_DataHandleVector.cpp b/GaudiKernel/tests/src/test_DataHandleVector.cpp index d4087031f8fa1a9d5b06db9b749ad63985198eb1..1b2f1b8b3ab7000a7cb841ae038b1c44d15db219 100644 --- a/GaudiKernel/tests/src/test_DataHandleVector.cpp +++ b/GaudiKernel/tests/src/test_DataHandleVector.cpp @@ -64,7 +64,7 @@ namespace GaudiKernelTest // Test move of a vector { - auto adw = AnyDataWrapper<V>( {1, 2, 3, 4} ); + auto adw = AnyDataWrapper<V>( {1, 2, 3, 4} ); VSize s4( 4 ); CPPUNIT_ASSERT_EQUAL( s4, ( adw.getData() ).size() ); } diff --git a/GaudiKernel/tests/src/test_GaudiTiming.cpp b/GaudiKernel/tests/src/test_GaudiTiming.cpp index 38dcb9baac8aa94b0e34ccd388edbe75a4612650..6a165fc56b2cf54e939616efe8311bab3ef5aba1 100644 --- a/GaudiKernel/tests/src/test_GaudiTiming.cpp +++ b/GaudiKernel/tests/src/test_GaudiTiming.cpp @@ -103,7 +103,7 @@ namespace GaudiKernelTest // This should result in non-zero user and kernel times t0 = System::getProcessTime(); float x = 1.5; - long m = 0; + long m = 0; for ( int i = 0; i < 10000; i++ ) { x *= sin( x ) / atan( x ) * tanh( x ) * sqrt( x ); m += System::virtualMemory(); @@ -147,9 +147,9 @@ namespace GaudiKernelTest CPPUNIT_ASSERT( c1 < c2 ); // Performance - ChronoEntity c3; + ChronoEntity c3; System::ProcessTime t0 = System::getProcessTime(); - int N = 1e6; + int N = 1e6; for ( int i = 0; i < N; i++ ) { c3.start(); c3.stop(); diff --git a/GaudiKernel/tests/src/test_LockedHandle.cpp b/GaudiKernel/tests/src/test_LockedHandle.cpp index 9f8cc22e2c3837fcc17eb3cb898a003d1262d04c..5609171631e2992d53ff773c49d102dc9c9c1bae 100644 --- a/GaudiKernel/tests/src/test_LockedHandle.cpp +++ b/GaudiKernel/tests/src/test_LockedHandle.cpp @@ -40,21 +40,21 @@ namespace GaudiKernelTest { public: Hist( const std::string& id ) : m_id( id ) {} - const std::string& id() const { return m_id; } - void acc() + const std::string& id() const { return m_id; } + void acc() { std::cout << "in Hist::access\n"; m_i++; } void incr() { m_i++; } - int val() const { return m_i; } + int val() const { return m_i; } M& mut() { return m_mut; } private: - int m_i{0}; + int m_i{0}; std::string m_id; - M m_mut; + M m_mut; }; template <class T> @@ -88,26 +88,26 @@ namespace GaudiKernelTest { // test default template args - Hist<>* h1 = new Hist<>( "first" ); + Hist<>* h1 = new Hist<>( "first" ); LockedHandle<Hist<>> lh1( h1, h1->mut() ); lh1->acc(); // test explicit mutex type typedef std::mutex mut_t; - Hist<mut_t>* h2 = new Hist<mut_t>( "first" ); + Hist<mut_t>* h2 = new Hist<mut_t>( "first" ); LockedHandle<Hist<mut_t>, mut_t> lh2( h2, h2->mut() ); lh2->acc(); // // test a different mutex type typedef boost::mutex mut_b_t; - Hist<mut_b_t>* h3 = new Hist<mut_b_t>( "first" ); + Hist<mut_b_t>* h3 = new Hist<mut_b_t>( "first" ); LockedHandle<Hist<mut_b_t>, mut_b_t> lh3( h3, h3->mut() ); lh3->acc(); // do a lot to see if we can get a race std::vector<std::thread> threads; - size_t nthreads{10}; - size_t nIter{10000}; + size_t nthreads{10}; + size_t nIter{10000}; for ( size_t i = 0; i < nthreads; ++i ) { threads.push_back( std::thread{Task<LockedHandle<Hist<>>>, &lh1, i, nIter} ); } diff --git a/GaudiKernel/tests/src/test_Property.cpp b/GaudiKernel/tests/src/test_Property.cpp index 4266010a3bf51601f9bca731ca685c3419a313bc..eb1655e584bfec5873e01e0717a44820ac7e12c9 100644 --- a/GaudiKernel/tests/src/test_Property.cpp +++ b/GaudiKernel/tests/src/test_Property.cpp @@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE( string_conversion ) BOOST_CHECK( p3.toString() == "True" ); } { - Gaudi::Property<int> dst{0}; + Gaudi::Property<int> dst{0}; Gaudi::Property<std::string> src{"321"}; BOOST_CHECK( dst.value() == 0 ); BOOST_CHECK( dst.assign( src ) ); @@ -124,8 +124,8 @@ BOOST_AUTO_TEST_CASE( string_conversion ) } { // string property as from options - Gaudi::Property<std::string> opt{"\"NONE\""}; - std::string dst; + Gaudi::Property<std::string> opt{"\"NONE\""}; + std::string dst; Gaudi::Property<std::string&> p{"test", dst}; BOOST_CHECK( opt.load( p ) ); BOOST_CHECK( p.value() == "NONE" ); @@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE( copy_constructor ) BOOST_CHECK( dest.ownerTypeName() == "unknown owner type" ); } { - std::string data{"value"}; + std::string data{"value"}; Gaudi::Property<std::string&> orig{"name", data, "doc"}; Gaudi::Property<std::string&> dest( orig ); BOOST_CHECK( dest.name() == "name" ); diff --git a/GaudiKernel/tests/src/test_PropertyHolder.cpp b/GaudiKernel/tests/src/test_PropertyHolder.cpp index 0060da6034fd59ed644ce874f36d840227d55c25..6a72ac92c7d8511bed6cad067893c97f9d42fae0 100644 --- a/GaudiKernel/tests/src/test_PropertyHolder.cpp +++ b/GaudiKernel/tests/src/test_PropertyHolder.cpp @@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE( declareProperty ) BOOST_AUTO_TEST_CASE( backward_compatibility ) { { - AnonymousPropertyHolder mgr; + AnonymousPropertyHolder mgr; Gaudi::Property<std::vector<std::string>> vp{&mgr, "name", {}}; Gaudi::Utils::setProperty( &mgr, "name", std::vector<std::string>{{"All"}} ); diff --git a/GaudiMP/GaudiMP/TESSerializer.h b/GaudiMP/GaudiMP/TESSerializer.h index dbbebd4563e392b53e87fd16eb12ff04acb46b25..2bedccf88725250c99741e40c84869fdee7aac4d 100644 --- a/GaudiMP/GaudiMP/TESSerializer.h +++ b/GaudiMP/GaudiMP/TESSerializer.h @@ -32,8 +32,8 @@ namespace GaudiMP class GAUDI_API TESSerializer : virtual public IDataStoreAgent { typedef std::vector<DataStoreItem*> Items; - typedef std::vector<std::string> ItemNames; - typedef std::vector<DataObject*> Objects; + typedef std::vector<std::string> ItemNames; + typedef std::vector<DataObject*> Objects; public: /// Constructor diff --git a/GaudiMP/python/GaudiMP/Parallel.py b/GaudiMP/python/GaudiMP/Parallel.py index f4ce297ea6896a55b99b93acee343b768c07a826..865501a37a01abfce4b99ea33ed49c586b026e60 100644 --- a/GaudiMP/python/GaudiMP/Parallel.py +++ b/GaudiMP/python/GaudiMP/Parallel.py @@ -24,21 +24,21 @@ def _prefunction(f, task, item): def _ppfunction(args): - #--- Unpack arguments + # --- Unpack arguments task, item = args stat = Statistics() - #--- Initialize the remote side (at least once) + # --- Initialize the remote side (at least once) if not task.__class__._initializeDone: for k, v in task.environ.items(): if k not in excluded_varnames: os.environ[k] = v task.initializeRemote() task.__class__._initializeDone = True - #--- Reset the task output + # --- Reset the task output task._resetOutput() - #--- Call processing + # --- Call processing task.process(item) - #--- Collect statistics + # --- Collect statistics stat.stop() return (copy.deepcopy(task.output), stat) @@ -84,7 +84,7 @@ class Task(object): def _mergeResults(self, result): if type(result) is not type(self.output): raise TypeError("output type is not same as obtained result") - #--No iteratable--- + # --No iteratable--- if not hasattr(result, '__iter__'): if hasattr(self.output, 'Add'): self.output.Add(result) @@ -94,7 +94,7 @@ class Task(object): self.output = self.output + result else: raise TypeError('result cannot be added') - #--Dictionary--- + # --Dictionary--- elif type(result) is dict: if self.output.keys() <= result.keys(): minkeys = self.output.keys() @@ -112,7 +112,7 @@ class Task(object): raise TypeError('result cannot be added') else: self.output[key] = result[key] - #--Anything else (list) + # --Anything else (list) else: for i in range(min(len(self.output), len(result))): if hasattr(self.output[i], 'Add'): diff --git a/GaudiMP/src/Lib/PyROOTPickle.cpp b/GaudiMP/src/Lib/PyROOTPickle.cpp index bcbdf175d9b83ebe004b2edfc2fe1de93b088887..d1e2570fbf52fb23c42bdf1a2450aff116c38ae4 100644 --- a/GaudiMP/src/Lib/PyROOTPickle.cpp +++ b/GaudiMP/src/Lib/PyROOTPickle.cpp @@ -49,7 +49,7 @@ namespace GaudiMP Py_DECREF( nattr ); static TClass* bufferclass = TClass::GetClass( "TBufferFile" ); - TClass* klass = TClass::GetClass( PyString_AS_STRING( pyname ) ); + TClass* klass = TClass::GetClass( PyString_AS_STRING( pyname ) ); // no cast is needed, but WriteObject taking a TClass argument is protected, // so use WriteObjectAny() @@ -93,8 +93,8 @@ namespace GaudiMP public: // public, as the python C-API works with C structs PyObject_HEAD void* fObject; - TClassRef fClass; - int fFlags; + TClassRef fClass; + int fFlags; private: // private, as the python C-API will handle creation ObjectProxy() {} @@ -107,7 +107,7 @@ namespace GaudiMP PyObject* ObjectProxyExpand( PyObject*, PyObject* args ) { // This method is a helper for (un)pickling of ObjectProxy instances. - PyObject* pybuf = 0; + PyObject* pybuf = 0; const char* clname = 0; if ( !PyArg_ParseTuple( args, const_cast<char*>( "O!s:__expand__" ), &PyString_Type, &pybuf, &clname ) ) return 0; diff --git a/GaudiMP/src/Lib/TESSerializer.cpp b/GaudiMP/src/Lib/TESSerializer.cpp index 722dbfe38a7136d6a9acda40d52ddf26da9b8773..6cee97859f5646bb89781b8ab0bce9fc911a37c1 100644 --- a/GaudiMP/src/Lib/TESSerializer.cpp +++ b/GaudiMP/src/Lib/TESSerializer.cpp @@ -73,7 +73,7 @@ void GaudiMP::TESSerializer::dumpBuffer( TBufferFile& buffer ) // Cannot be declared inside the method, as repeated calls // can cause confusion and buffer wiping. // - StatusCode status; + StatusCode status; DataObject* obj; // Clear current selection @@ -111,11 +111,11 @@ void GaudiMP::TESSerializer::dumpBuffer( TBufferFile& buffer ) buffer.WriteInt( m_objects.size() ); for ( Objects::iterator i = m_objects.begin(); i != m_objects.end(); ++i ) { - DataObject* pObj = ( *i ); /* define pointer !pObj! to a data object */ - DataObjectPush p( pObj ); /* add the data object to the list... */ + DataObject* pObj = ( *i ); /* define pointer !pObj! to a data object */ + DataObjectPush p( pObj ); /* add the data object to the list... */ // We build a map so gROOT has to access the whole class database as little as possible - TClass* cl; /* announce a TClass */ + TClass* cl; /* announce a TClass */ const type_info& objClass = typeid( *pObj ); /* get the type of the data object */ // cout << "TES Object : " << pObj->registry()->identifier() << endl; string objClassName = System::typeinfoName( objClass ); /* and then get the descriptive string from System */ @@ -151,8 +151,8 @@ void GaudiMP::TESSerializer::dumpBuffer( TBufferFile& buffer ) cl->Streamer( pObj, buffer ); /* take care of links */ - LinkManager* linkMgr = pObj->linkMgr(); - int numLinks = linkMgr->size(); + LinkManager* linkMgr = pObj->linkMgr(); + int numLinks = linkMgr->size(); buffer.WriteInt( numLinks ); // now write each link for ( int it = 0; it != numLinks; it++ ) { @@ -165,9 +165,9 @@ void GaudiMP::TESSerializer::dumpBuffer( TBufferFile& buffer ) IOpaqueAddress* iop = pObj->registry()->address(); if ( iop ) { buffer.WriteInt( 1 ); - const string* par = iop->par(); - long svcType = iop->svcType(); - long clid = iop->clID(); + const string* par = iop->par(); + long svcType = iop->svcType(); + long clid = iop->clID(); buffer.WriteLong( svcType ); buffer.WriteLong( clid ); buffer.WriteString( par->c_str() ); @@ -230,13 +230,13 @@ void GaudiMP::TESSerializer::loadBuffer( TBufferFile& buffer ) } /// The next is equivalent to ReadObjectAny(cl) except of the 'magic!!' - DataObject* obj = (DataObject*)cl->New(); + DataObject* obj = (DataObject*)cl->New(); DataObjectPush push( obj ); // This is magic! cl->Streamer( obj, buffer ); // now restore links if ( obj ) { - int nlink = 0; + int nlink = 0; LinkManager* lnkMgr = obj->linkMgr(); buffer.ReadInt( nlink ); @@ -283,7 +283,7 @@ void GaudiMP::TESSerializer::loadBuffer( TBufferFile& buffer ) // flag will be 0 or 1 to indicate OpaqueAddress Info if ( flag == 1 ) { // will need an IOpaqueAddress and its ref - IOpaqueAddress* iop; + IOpaqueAddress* iop; IOpaqueAddress*& iopref = iop; // Read svcType, clID and par from buffer long svcType; @@ -298,9 +298,9 @@ void GaudiMP::TESSerializer::loadBuffer( TBufferFile& buffer ) const string opaque( cp ); // create Generic address // already have svcType, clID, par1.. just make dummy variables for par2, and ipar1 and 2 - const string& p2 = ""; - unsigned long ip1( 0 ); - unsigned long ip2( 0 ); + const string& p2 = ""; + unsigned long ip1( 0 ); + unsigned long ip2( 0 ); GenericAddress gadd( svcType, classid, opaque, p2, ip1, ip2 ); // now create the address diff --git a/GaudiMP/src/component/IoComponentMgr.cpp b/GaudiMP/src/component/IoComponentMgr.cpp index 261b6c556c79124a0c8d700c1606ee18b32bdd6c..ebc32a3b6d8a7e758e9c4d5032bcf7a4f5882e44 100644 --- a/GaudiMP/src/component/IoComponentMgr.cpp +++ b/GaudiMP/src/component/IoComponentMgr.cpp @@ -21,7 +21,7 @@ #define ON_DEBUG if ( UNLIKELY( outputLevel() <= MSG::DEBUG ) ) #define ON_VERBOSE if ( UNLIKELY( outputLevel() <= MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() DECLARE_COMPONENT( IoComponentMgr ) @@ -91,8 +91,8 @@ bool IoComponentMgr::io_hasitem( IIoComponent* iocomponent ) const if ( 0 == iocomponent ) { return false; } - const std::string& ioname = iocomponent->name(); - IoRegistry_t::const_iterator io = m_ioregistry.find( ioname ); + const std::string& ioname = iocomponent->name(); + IoRegistry_t::const_iterator io = m_ioregistry.find( ioname ); return io != m_ioregistry.end(); } @@ -205,8 +205,8 @@ StatusCode IoComponentMgr::io_register( IIoComponent* iocomponent, IIoComponentM // We need to take into account that boost::filesystem::absolute() does not // work for files read from eos, i.e. starting with "root:" - std::string tmp_name = pfn.empty() ? fname : pfn; - bool from_eos = tmp_name.find( "root:" ) == 0; + std::string tmp_name = pfn.empty() ? fname : pfn; + bool from_eos = tmp_name.find( "root:" ) == 0; IoComponentEntry ioc( fname, ( from_eos ? tmp_name : boost::filesystem::absolute( tmp_name ).string() ), iomode ); m_cdict.insert( pair<IIoComponent*, IoComponentEntry>( iocomponent, ioc ) ); @@ -224,7 +224,7 @@ StatusCode IoComponentMgr::io_retrieve( IIoComponent* iocomponent, std::string& return StatusCode::FAILURE; } - std::string ofname = fname; + std::string ofname = fname; const std::string& ioname = iocomponent->name(); DEBMSG << "--> io_retrieve(" << ioname << "," << fname << ")" << endmsg; @@ -465,7 +465,7 @@ void IoComponentMgr::handle( const Incident& i ) if ( findComp( fi->source(), pit ) ) { DEBMSG << " found component: " << endmsg; while ( pit.first != pit.second ) { - IIoComponent* c = pit.first->first; + IIoComponent* c = pit.first->first; IoComponentEntry e = pit.first->second; DEBMSG << " c: " << c->name() << " " << e << endmsg; @@ -484,7 +484,7 @@ void IoComponentMgr::handle( const Incident& i ) if ( findComp( fi->source(), pit ) ) { DEBMSG << " found component: " << endmsg; while ( pit.first != pit.second ) { - IIoComponent* c = pit.first->first; + IIoComponent* c = pit.first->first; IoComponentEntry e = pit.first->second; DEBMSG << " c: " << c->name() << " " << e << endmsg; diff --git a/GaudiMP/src/component/IoComponentMgr.h b/GaudiMP/src/component/IoComponentMgr.h index 4d4b51c3cc355a42c19a7915aabbe9a9d8965213..ee37c45bf86333c128436694527fb5c322a04e0a 100644 --- a/GaudiMP/src/component/IoComponentMgr.h +++ b/GaudiMP/src/component/IoComponentMgr.h @@ -117,9 +117,9 @@ public: /////////////////////////////////////////////////////////////////// private: struct IoComponentEntry { - std::string m_oldfname; - std::string m_oldabspath; // VT. store absolute path - std::string m_newfname; + std::string m_oldfname; + std::string m_oldabspath; // VT. store absolute path + std::string m_newfname; IIoComponentMgr::IoMode::Type m_iomode; IoComponentEntry() diff --git a/GaudiMP/src/component/ReplayOutputStream.cpp b/GaudiMP/src/component/ReplayOutputStream.cpp index d504d1ace2c61deaf0523db1f6e3ee126c28e7df..e04fa3c381c957835399ef6881584d24d67cc7fa 100644 --- a/GaudiMP/src/component/ReplayOutputStream.cpp +++ b/GaudiMP/src/component/ReplayOutputStream.cpp @@ -78,7 +78,7 @@ namespace } template <Gaudi::StateMachine::Transition TR> -StatusCode ReplayOutputStream::i_outStreamTransition() +StatusCode ReplayOutputStream::i_outStreamTransition() { OutStreamTransition<TR> trans( msg() ); std::for_each( m_outputStreams.begin(), m_outputStreams.end(), trans ); diff --git a/GaudiMP/src/component/ReplayOutputStream.h b/GaudiMP/src/component/ReplayOutputStream.h index 36be5dbdaea5151f726c4ae46ea8c46e7dc093b8..e701cf0dc783ad3a827d3c057c6202a41950c0e0 100644 --- a/GaudiMP/src/component/ReplayOutputStream.h +++ b/GaudiMP/src/component/ReplayOutputStream.h @@ -73,7 +73,7 @@ private: /// Helper function to call the transition on the contained OutputStreams. /// Returns StatusCode::FAILURE if any of the OutputStreams returned a failure. template <Gaudi::StateMachine::Transition TR> - StatusCode i_outStreamTransition(); + StatusCode i_outStreamTransition(); Gaudi::Property<std::vector<std::string>> m_outputStreamNames{ this, "OutputStreams", {}, "OutputStream instances that can be called."}; @@ -81,7 +81,7 @@ private: /// Internal storage for the OutputStreams to call. OutStreamsMapType m_outputStreams; - SmartIF<IAlgManager> m_algMgr; + SmartIF<IAlgManager> m_algMgr; SmartIF<IDataManagerSvc> m_evtMgr; }; diff --git a/GaudiMTTools/src/GaudiParallelizer.cpp b/GaudiMTTools/src/GaudiParallelizer.cpp index 27225ec51da890a1dad389740df69f112a8d39c4..c415bbdcbe04f578715f6c6e8461a3d6b84e160d 100644 --- a/GaudiMTTools/src/GaudiParallelizer.cpp +++ b/GaudiMTTools/src/GaudiParallelizer.cpp @@ -134,23 +134,23 @@ StatusCode GaudiParallelizer::decodeNames() bool addedRootInTES = false; //= Have we added the rootInTES ? //= Get the Application manager, to see if algorithm exist - auto appMgr = service<IAlgManager>( "ApplicationMgr" ); - const std::vector<std::string>& nameVector = m_names.value(); + auto appMgr = service<IAlgManager>( "ApplicationMgr" ); + const std::vector<std::string>& nameVector = m_names.value(); std::vector<std::string>::const_iterator it; for ( it = nameVector.begin(); nameVector.end() != it; it++ ) { const Gaudi::Utils::TypeNameString typeName( *it ); - const std::string& theName = typeName.name(); - const std::string& theType = typeName.type(); + const std::string& theName = typeName.name(); + const std::string& theType = typeName.type(); //== Check whether the specified algorithm already exists. If not, create it - StatusCode result = StatusCode::SUCCESS; + StatusCode result = StatusCode::SUCCESS; SmartIF<IAlgorithm> myIAlg = appMgr->algorithm( typeName, false ); // do not create it now if ( !myIAlg.isValid() ) { //== Set the Context if not in the jobOptions list if ( !context().empty() || !rootInTES().empty() ) { - bool foundContext = false; - bool foundRootInTES = false; - const auto properties = jos->getProperties( theName ); + bool foundContext = false; + bool foundRootInTES = false; + const auto properties = jos->getProperties( theName ); if ( properties ) { // Iterate over the list to set the options for ( const auto& p : *properties ) { @@ -240,8 +240,8 @@ StatusCode GaudiParallelizer::decodeNames() msg << "Member list: "; using GaudiUtils::details::ostream_joiner; ostream_joiner( msg, m_entries, ", ", []( MsgStream& msg, const AlgorithmEntry& entry ) -> MsgStream& { - Algorithm* myAlg = entry.algorithm(); - auto myAlgType = System::typeinfoName( typeid( *myAlg ) ); + Algorithm* myAlg = entry.algorithm(); + auto myAlgType = System::typeinfoName( typeid( *myAlg ) ); if ( myAlg->name() != myAlgType ) { msg << myAlgType << "/"; } diff --git a/GaudiMTTools/src/GaudiParallelizer.h b/GaudiMTTools/src/GaudiParallelizer.h index 9118503f26d06c1a8dbb7c851d3e9563ccb55c82..28d68647fee7006d46f91f07d84fce280a49c226 100644 --- a/GaudiMTTools/src/GaudiParallelizer.h +++ b/GaudiMTTools/src/GaudiParallelizer.h @@ -48,9 +48,9 @@ protected: void setReverse( bool flag ) { m_reverse = flag; } Algorithm* algorithm() const { return m_algorithm; } - bool reverse() const { return m_reverse; } + bool reverse() const { return m_reverse; } void setTimer( int nb ) { m_timer = nb; } - int timer() const { return m_timer; } + int timer() const { return m_timer; } /// Thread task executor method to wrap an algorithm execution in void run( GaudiParallelizer& prlzr ) @@ -65,8 +65,8 @@ protected: private: Algorithm* m_algorithm; ///< Algorithm pointer - bool m_reverse; ///< Indicates that the flag has to be inverted - int m_timer; ///< Timer number for this algorithm + bool m_reverse; ///< Indicates that the flag has to be inverted + int m_timer; ///< Timer number for this algorithm }; /** Decode a vector of string. */ @@ -74,15 +74,15 @@ protected: private: Gaudi::Property<std::vector<std::string>> m_names{this, "Members", {}, "list of algorithms"}; - Gaudi::Property<bool> m_modeOR{this, "ModeOR", false, "use OR loginc instead of AND"}; - Gaudi::Property<bool> m_measureTime{this, "MeasureTime", false, "measure time"}; - Gaudi::Property<bool> m_returnOK{this, "ReturnOK", false, "forces the sequencer to return a good status"}; + Gaudi::Property<bool> m_modeOR{this, "ModeOR", false, "use OR loginc instead of AND"}; + Gaudi::Property<bool> m_measureTime{this, "MeasureTime", false, "measure time"}; + Gaudi::Property<bool> m_returnOK{this, "ReturnOK", false, "forces the sequencer to return a good status"}; Gaudi::Property<unsigned short> m_nthreads{this, "NumberOfThreads", 0, "number of threads in the thread pool"}; std::vector<AlgorithmEntry> m_entries; ///< List of algorithms to process. ISequencerTimerTool* m_timerTool = nullptr; ///< Pointer to the timer tool - int m_timer; ///< Timer number for the sequencer + int m_timer; ///< Timer number for the sequencer tbb::task_group m_task_group; ///< TBB task group }; diff --git a/GaudiMTTools/src/threadpool/libs/threadpool/example/mergesort/mergesort.cpp b/GaudiMTTools/src/threadpool/libs/threadpool/example/mergesort/mergesort.cpp index 9c69318d7a0af5454917d751628d17954a140d4f..b8f1208d22a1f6cb6157e95d630543265a694666 100644 --- a/GaudiMTTools/src/threadpool/libs/threadpool/example/mergesort/mergesort.cpp +++ b/GaudiMTTools/src/threadpool/libs/threadpool/example/mergesort/mergesort.cpp @@ -104,8 +104,8 @@ public: protected: boost::shared_array<T> m_data; - unsigned int m_position; - unsigned int m_length; + unsigned int m_position; + unsigned int m_length; }; // diff --git a/GaudiMTTools/src/threadpool/libs/threadpool/test/compile_all/compile_all.cpp b/GaudiMTTools/src/threadpool/libs/threadpool/test/compile_all/compile_all.cpp index 4eb41804149d837d372e3709ed5eea8f3b9a147e..734e509683821ed3d6174b961427afa123f13a45 100644 --- a/GaudiMTTools/src/threadpool/libs/threadpool/test/compile_all/compile_all.cpp +++ b/GaudiMTTools/src/threadpool/libs/threadpool/test/compile_all/compile_all.cpp @@ -58,7 +58,7 @@ int task_4() void task_with_parameter( int value ) { print( " task_with_parameter(" + to_string( value ) + ")\n" ); } -int loops = 0; +int loops = 0; bool looped_task() { print( " looped_task()\n" ); @@ -111,9 +111,9 @@ void prio_pool_test() void future_test() { - fifo_pool tp( 5 ); + fifo_pool tp( 5 ); future<int> fut = schedule( tp, &task_4 ); - int res = fut(); + int res = fut(); } int main( int, char* const[] ) diff --git a/GaudiMTTools/src/threadpool/libs/threadpool/tutorial/tutorial.cpp b/GaudiMTTools/src/threadpool/libs/threadpool/tutorial/tutorial.cpp index 8a143eab5e4a55e45d4a0e04c3bbca577ad2e3d1..c669be0765c9ca2a454db57622e9a066acad4f96 100644 --- a/GaudiMTTools/src/threadpool/libs/threadpool/tutorial/tutorial.cpp +++ b/GaudiMTTools/src/threadpool/libs/threadpool/tutorial/tutorial.cpp @@ -62,7 +62,7 @@ void task_3() { print( " task_3()\n" ); } void task_with_parameter( int value ) { print( " task_with_parameter(" + to_string( value ) + ")\n" ); } -int loops = 0; +int loops = 0; bool looped_task() { print( " looped_task()\n" ); diff --git a/GaudiMonitor/src/ExceptionSvc.cpp b/GaudiMonitor/src/ExceptionSvc.cpp index 932214282103c416364f38b7bdde3d8ae13cb6c9..09c731013df6b5fb932b8e235886887e74d56b8e 100644 --- a/GaudiMonitor/src/ExceptionSvc.cpp +++ b/GaudiMonitor/src/ExceptionSvc.cpp @@ -36,7 +36,7 @@ StatusCode ExceptionSvc::initialize() string key = m_mode_exc_s.value(); - auto loc = key.find( " " ); + auto loc = key.find( " " ); std::string mode = key.substr( 0, loc ); toupper( mode ); @@ -61,7 +61,7 @@ StatusCode ExceptionSvc::initialize() std::string VAL, TAG; static const boost::regex exp{"[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*([^[:space:]]+)"}; - static const auto tok_end = boost::sregex_iterator(); + static const auto tok_end = boost::sregex_iterator(); for ( auto tok_iter = boost::sregex_iterator( begin( key ), end( key ), exp ); tok_iter != tok_end; ++tok_iter ) { TAG = ( *tok_iter )[1]; VAL = ( *tok_iter )[2]; diff --git a/GaudiMonitor/src/HistorySvc.cpp b/GaudiMonitor/src/HistorySvc.cpp index 5a57db9e029428933ff72a119d3b589c98381289..eba7923c28a3ce2a2a84330259cde3ef4b80e353 100644 --- a/GaudiMonitor/src/HistorySvc.cpp +++ b/GaudiMonitor/src/HistorySvc.cpp @@ -60,7 +60,7 @@ namespace } struct DHH { - CLID id; + CLID id; std::string key; DHH( const CLID& i, std::string k ) : id( i ), key( std::move( k ) ) {} @@ -539,9 +539,9 @@ StatusCode HistorySvc::registerSvc( const IService& svc ) return StatusCode( StatusCode::SUCCESS, true ); } - JobHistory* job = getJobHistory(); + JobHistory* job = getJobHistory(); const IService* psvc = &svc; - auto itr = m_svcmap.find( psvc ); + auto itr = m_svcmap.find( psvc ); if ( itr == m_svcmap.end() ) { ON_DEBUG @@ -567,7 +567,7 @@ ServiceHistory* HistorySvc::getServiceHistory( const IService& svc ) const { const IService* psvc = &svc; - auto itr = m_svcmap.find( psvc ); + auto itr = m_svcmap.find( psvc ); if ( itr != m_svcmap.end() ) return itr->second; warning() << "Service " << svc.name() << " not registered" << endmsg; @@ -684,7 +684,7 @@ AlgToolHistory* HistorySvc::getAlgToolHistory( const IAlgTool& alg ) const { const AlgTool* palg = dynamic_cast<const AlgTool*>( &alg ); - auto itr = m_algtoolmap.find( palg ); + auto itr = m_algtoolmap.find( palg ); if ( itr == m_algtoolmap.end() ) { warning() << "AlgTool " << alg.name() << " not registered" << endmsg; return nullptr; @@ -744,8 +744,8 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const std::string client_currently_open = "start"; for ( auto& item : m_jobHistory->propertyPairs() ) { // client is the name of the component of the current property - const std::string& client = item.first; - const Gaudi::Details::PropertyBase* prp = item.second; + const std::string& client = item.first; + const Gaudi::Details::PropertyBase* prp = item.second; if ( m_outputFileTypeXML ) { @@ -805,12 +805,12 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const void HistorySvc::dumpState( const INamedInterface* in, std::ofstream& ofs ) const { - HistoryObj* hist = nullptr; + HistoryObj* hist = nullptr; IVersHistoryObj* vhist = nullptr; - const IService* is = nullptr; + const IService* is = nullptr; const Algorithm* ia = nullptr; - const IAlgTool* it = nullptr; + const IAlgTool* it = nullptr; if ( ( is = dynamic_cast<const IService*>( in ) ) != nullptr ) { ON_VERBOSE verbose() << in->name() << " is Service" << endmsg; diff --git a/GaudiMonitor/src/HistorySvc.h b/GaudiMonitor/src/HistorySvc.h index c97364cf4500c33b8db56db12c9089212e76a300..b7bcc6e5174cfee45fc728e5d858fc104cb30e6f 100644 --- a/GaudiMonitor/src/HistorySvc.h +++ b/GaudiMonitor/src/HistorySvc.h @@ -43,24 +43,24 @@ public: virtual StatusCode captureState(); - StatusCode registerJob() override; - StatusCode listProperties() const override; + StatusCode registerJob() override; + StatusCode listProperties() const override; JobHistory* getJobHistory() const override; - StatusCode registerSvc( const IService& ) override; - StatusCode listProperties( const IService& ) const override; + StatusCode registerSvc( const IService& ) override; + StatusCode listProperties( const IService& ) const override; ServiceHistory* getServiceHistory( const IService& ) const override; - void getServiceHistory( std::set<ServiceHistory*>& ) const override; + void getServiceHistory( std::set<ServiceHistory*>& ) const override; - StatusCode registerAlg( const Algorithm& ) override; - StatusCode listProperties( const Algorithm& ) const override; + StatusCode registerAlg( const Algorithm& ) override; + StatusCode listProperties( const Algorithm& ) const override; AlgorithmHistory* getAlgHistory( const Algorithm& ) const override; - void getAlgHistory( std::set<AlgorithmHistory*>& ) const override; + void getAlgHistory( std::set<AlgorithmHistory*>& ) const override; - StatusCode registerAlgTool( const IAlgTool& ) override; - StatusCode listProperties( const IAlgTool& ) const override; + StatusCode registerAlgTool( const IAlgTool& ) override; + StatusCode listProperties( const IAlgTool& ) const override; AlgToolHistory* getAlgToolHistory( const IAlgTool& ) const override; - void getAlgToolHistory( std::set<AlgToolHistory*>& ) const override; + void getAlgToolHistory( std::set<AlgToolHistory*>& ) const override; DataHistory* createDataHistoryObj( const CLID& id, const std::string& key, const std::string& store ) override; virtual StatusCode registerDataHistory( const CLID& id, const std::string& key, const std::string& store ); @@ -82,11 +82,11 @@ private: typedef IVersHistoryObj::PropertyList PropertyList; typedef std::multimap<DHH, DataHistory*> DataHistMap; - typedef DataHistMap::iterator DHMitr; + typedef DataHistMap::iterator DHMitr; typedef DataHistMap::const_iterator DHMCitr; - Gaudi::Property<bool> m_dump{this, "Dump", false}; - Gaudi::Property<bool> m_activate{this, "Activate", true}; + Gaudi::Property<bool> m_dump{this, "Dump", false}; + Gaudi::Property<bool> m_activate{this, "Activate", true}; Gaudi::Property<std::string> m_outputFile{this, "OutputFile"}; void clearState(); @@ -98,7 +98,7 @@ private: std::map<const Algorithm*, AlgorithmHistory*> m_algmap; std::set<const IAlgTool*> m_ialgtools; - std::map<const AlgTool*, AlgToolHistory*> m_algtoolmap; + std::map<const AlgTool*, AlgToolHistory*> m_algtoolmap; std::map<const IService*, ServiceHistory*> m_svcmap; std::multimap<DHH, DataHistory*> m_datMap; @@ -117,7 +117,7 @@ private: IAlgorithm* getCurrentIAlg() const; - IIncidentSvc* m_incidentSvc = nullptr; + IIncidentSvc* m_incidentSvc = nullptr; SmartIF<IToolSvc> m_toolSvc; bool m_outputFileTypeXML = false; diff --git a/GaudiPartProp/src/ParticlePropertySvc.cpp b/GaudiPartProp/src/ParticlePropertySvc.cpp index 88eed79f03fe5e2588ea5e31c5b15efda23b6056..62bac41e0d6e261cacf917b2feadb848c082ccad 100644 --- a/GaudiPartProp/src/ParticlePropertySvc.cpp +++ b/GaudiPartProp/src/ParticlePropertySvc.cpp @@ -391,14 +391,14 @@ namespace Gaudi std::istringstream input( item ); // get the name std::string p_name; - int p_geant; - int p_jetset; - double p_charge; - double p_mass; - double p_ltime; + int p_geant; + int p_jetset; + double p_charge; + double p_mass; + double p_ltime; std::string p_evtgen; - int p_pythia; - double p_maxwid; + int p_pythia; + double p_maxwid; if ( input >> p_name >> p_geant >> p_jetset >> p_charge >> p_mass >> p_ltime >> p_evtgen >> p_pythia >> p_maxwid ) { always() << " Add/Modify the particle: " diff --git a/GaudiPartProp/src/ParticlePropertySvc.h b/GaudiPartProp/src/ParticlePropertySvc.h index 5c6826f69ee56593beef489108c5236d88094c89..562ff9306913832a50154f6eacda076a790932be 100644 --- a/GaudiPartProp/src/ParticlePropertySvc.h +++ b/GaudiPartProp/src/ParticlePropertySvc.h @@ -74,10 +74,10 @@ namespace Gaudi public: // typedefs for container type typedef ParticleProperty* mapped_type; - typedef std::map<int, mapped_type> MapID; + typedef std::map<int, mapped_type> MapID; typedef std::map<std::string, mapped_type> MapName; - typedef std::map<int, mapped_type> MapStdHepID; - typedef std::map<int, mapped_type> MapPythiaID; + typedef std::map<int, mapped_type> MapStdHepID; + typedef std::map<int, mapped_type> MapPythiaID; using IParticlePropertySvc::VectPP; using IParticlePropertySvc::const_iterator; using IParticlePropertySvc::iterator; @@ -167,15 +167,15 @@ namespace Gaudi Gaudi::Property<std::vector<std::string>> m_particles{ this, "Particles", {}, "properties to be redefined explicitly"}; - VectPP m_vectpp; ///< Vector of all particle properties - MapID m_idmap; ///< Map for geant IDs - MapName m_namemap; ///< Map for particle names + VectPP m_vectpp; ///< Vector of all particle properties + MapID m_idmap; ///< Map for geant IDs + MapName m_namemap; ///< Map for particle names MapStdHepID m_stdhepidmap; ///< Map for StdHep Ids MapPythiaID m_pythiaidmap; ///< Map for Pythia Ids // local storage of ALL properties std::set<std::unique_ptr<ParticleProperty>> m_owned; - std::set<std::string> m_replaced; + std::set<std::string> m_replaced; SmartIF<IFileAccess> m_fileAccess; }; diff --git a/GaudiPluginService/Gaudi/Details/PluginServiceDetails.h b/GaudiPluginService/Gaudi/Details/PluginServiceDetails.h index 4550e76b7bbb050bed889b6d64b35b9bcf84b4db..9d53a14034580987a0953fce2fdf1490490132a6 100644 --- a/GaudiPluginService/Gaudi/Details/PluginServiceDetails.h +++ b/GaudiPluginService/Gaudi/Details/PluginServiceDetails.h @@ -90,7 +90,7 @@ namespace Gaudi { union { void* src; - F dst; + F dst; } p2p; p2p.src = getCreator( id, typeid( F ).name() ); return p2p.dst; @@ -130,11 +130,11 @@ namespace Gaudi } std::string library; - void* ptr; + void* ptr; std::string type; std::string rtype; std::string className; - Properties properties; + Properties properties; FactoryInfo& addProperty( const KeyType& k, std::string v ) { @@ -155,7 +155,7 @@ namespace Gaudi { union { typename F::FuncType src; - void* dst; + void* dst; } p2p; p2p.src = ptr; std::ostringstream o; @@ -261,8 +261,8 @@ namespace Gaudi class _INTERNAL_FACTORY_REGISTER_CNAME( type, serial ) \ { \ public: \ - typedef factory s_t; \ - typedef typecreator f_t; \ + typedef factory s_t; \ + typedef typecreator f_t; \ static s_t::FuncType creator() { return &f_t::create<s_t>; } \ _INTERNAL_FACTORY_REGISTER_CNAME( type, serial )() \ { \ diff --git a/GaudiPluginService/src/PluginService.cpp b/GaudiPluginService/src/PluginService.cpp index df27d150158a41ca550d8bb8114c28a31bf9f3c0..e2a15ed14ccc8c7e0b2d0a4d31da4f808b62e575 100644 --- a/GaudiPluginService/src/PluginService.cpp +++ b/GaudiPluginService/src/PluginService.cpp @@ -135,7 +135,7 @@ namespace Gaudi std::string demangle( const std::string& id ) { - int status; + int status; auto realname = std::unique_ptr<char, decltype( free )*>( abi::__cxa_demangle( id.c_str(), nullptr, nullptr, &status ), free ); if ( !realname ) return id; @@ -166,18 +166,18 @@ namespace Gaudi m_initialized = true; #if defined( _WIN32 ) const char* envVar = "PATH"; - const char sep = ';'; + const char sep = ';'; #elif defined( __APPLE__ ) const char* envVar = "DYLD_LIBRARY_PATH"; - const char sep = ':'; + const char sep = ':'; #else const char* envVar = "LD_LIBRARY_PATH"; - const char sep = ':'; + const char sep = ':'; #endif char* search_path = ::getenv( envVar ); if ( search_path ) { logger().debug( std::string( "searching factories in " ) + envVar ); - std::string path( search_path ); + std::string path( search_path ); std::string::size_type pos = 0; std::string::size_type newpos = 0; while ( pos != std::string::npos ) { @@ -210,9 +210,9 @@ namespace Gaudi // read the file logger().debug( std::string( " reading " ) + name ); std::ifstream factories{fullPath}; - std::string line; - int factoriesCount = 0; - int lineCount = 0; + std::string line; + int factoriesCount = 0; + int lineCount = 0; while ( !factories.eof() ) { ++lineCount; std::getline( factories, line ); @@ -256,7 +256,7 @@ namespace Gaudi { REG_SCOPE_LOCK FactoryMap& facts = factories(); - auto entry = facts.find( id ); + auto entry = facts.find( id ); if ( entry == facts.end() ) { // this factory was not known yet entry = facts.emplace( id, FactoryInfo( "unknown", factory, type, rtype, className, props ) ).first; @@ -279,7 +279,7 @@ namespace Gaudi { REG_SCOPE_LOCK const FactoryMap& facts = factories(); - auto f = facts.find( id ); + auto f = facts.find( id ); if ( f != facts.end() ) { #ifdef GAUDI_REFLEX_COMPONENT_ALIASES const Properties& props = f->second.properties; @@ -308,8 +308,8 @@ namespace Gaudi { REG_SCOPE_LOCK static const FactoryInfo unknown( "unknown" ); - const FactoryMap& facts = factories(); - auto f = facts.find( id ); + const FactoryMap& facts = factories(); + auto f = facts.find( id ); return ( f != facts.end() ) ? f->second : unknown; } @@ -317,7 +317,7 @@ namespace Gaudi { REG_SCOPE_LOCK FactoryMap& facts = factories(); - auto f = facts.find( id ); + auto f = facts.find( id ); if ( f != facts.end() ) f->second.properties[k] = v; return *this; } @@ -342,7 +342,7 @@ namespace Gaudi } static std::unique_ptr<Logger> s_logger( new Logger ); - Logger& logger() { return *s_logger; } + Logger& logger() { return *s_logger; } void setLogger( Logger* logger ) { s_logger.reset( logger ); } } // namespace Details diff --git a/GaudiPluginService/src/capi_pluginservice.cpp b/GaudiPluginService/src/capi_pluginservice.cpp index 097e496cea199e31c56ca9a9c6e4ef17e48af668..59594efb21922ee8321739946152ac1ff89ca9c9 100644 --- a/GaudiPluginService/src/capi_pluginservice.cpp +++ b/GaudiPluginService/src/capi_pluginservice.cpp @@ -20,8 +20,8 @@ int cgaudi_pluginsvc_get_factory_size( cgaudi_pluginsvc_t self ) cgaudi_factory_t cgaudi_pluginsvc_get_factory_at( cgaudi_pluginsvc_t self, int n ) { - const Registry* reg = ( (const Registry*)self.registry ); - const auto& factories = reg->factories(); + const Registry* reg = ( (const Registry*)self.registry ); + const auto& factories = reg->factories(); if ( n >= (int)factories.size() ) return {self, nullptr}; return {self, next( begin( factories ), n )->first.c_str()}; } @@ -52,15 +52,15 @@ const char* cgaudi_factory_get_classname( cgaudi_factory_t self ) int cgaudi_factory_get_property_size( cgaudi_factory_t self ) { - Registry& reg = Registry::instance(); - const Registry::FactoryInfo& fi = reg.getInfo( self.id ); + Registry& reg = Registry::instance(); + const Registry::FactoryInfo& fi = reg.getInfo( self.id ); return int( fi.properties.size() ); } cgaudi_property_t cgaudi_factory_get_property_at( cgaudi_factory_t self, int n ) { - cgaudi_property_t cprop{self.registry, self.id, nullptr}; - Registry& reg = Registry::instance(); + cgaudi_property_t cprop{self.registry, self.id, nullptr}; + Registry& reg = Registry::instance(); const Registry::FactoryInfo& fi = reg.getInfo( cprop.id ); if ( n < (int)fi.properties.size() ) cprop.key = next( begin( fi.properties ), n )->first.c_str(); return cprop; @@ -70,8 +70,8 @@ const char* cgaudi_property_get_key( cgaudi_property_t self ) { return self.key; const char* cgaudi_property_get_value( cgaudi_property_t self ) { - Registry& reg = Registry::instance(); - const Registry::FactoryInfo& fi = reg.getInfo( self.id ); - auto prop = fi.properties.find( self.key ); + Registry& reg = Registry::instance(); + const Registry::FactoryInfo& fi = reg.getInfo( self.id ); + auto prop = fi.properties.find( self.key ); return prop != fi.properties.end() ? prop->second.c_str() : nullptr; } diff --git a/GaudiPluginService/src/capi_pluginservice.h b/GaudiPluginService/src/capi_pluginservice.h index 1940746b5f72052754c727cce83bcd4b08070635..884cbfabf4cad600e528a4c41026f2f5207f727a 100644 --- a/GaudiPluginService/src/capi_pluginservice.h +++ b/GaudiPluginService/src/capi_pluginservice.h @@ -41,13 +41,13 @@ typedef struct { typedef struct { cgaudi_pluginsvc_t registry; - const char* id; + const char* id; } cgaudi_factory_t; typedef struct { cgaudi_pluginsvc_t registry; - const char* id; - const char* key; + const char* id; + const char* key; } cgaudi_property_t; CGAUDI_API diff --git a/GaudiPluginService/src/listcomponents.cpp b/GaudiPluginService/src/listcomponents.cpp index c542d9d93bcef7108c1105c77000a6a16e4b4c0f..2a8f6f5560986140a8ad7d1463f3c11ad3664e69 100644 --- a/GaudiPluginService/src/listcomponents.cpp +++ b/GaudiPluginService/src/listcomponents.cpp @@ -46,7 +46,7 @@ void usage( std::string argv0 ) int main( int argc, char* argv[] ) { - Gaudi::PluginService::Details::Registry& reg = Gaudi::PluginService::Details::Registry::instance(); + Gaudi::PluginService::Details::Registry& reg = Gaudi::PluginService::Details::Registry::instance(); typedef Gaudi::PluginService::Details::Registry::KeyType key_type; // cache to keep track of the loaded factories @@ -56,7 +56,7 @@ int main( int argc, char* argv[] ) // Parse command line std::list<char*> libs; - std::string output_opt( "-" ); + std::string output_opt( "-" ); { std::string argv0( argv[0] ); { diff --git a/GaudiPluginService/tests/src/UseCases.cpp b/GaudiPluginService/tests/src/UseCases.cpp index 988d23538535ccf47936f486fa83b8973bf3b4d6..cdfa5154e166a10859f4b9459ae35da2073a291a 100644 --- a/GaudiPluginService/tests/src/UseCases.cpp +++ b/GaudiPluginService/tests/src/UseCases.cpp @@ -45,8 +45,8 @@ class Component1 : public Base class _INTERNAL_FACTORY_REGISTER_CNAME( type, serial ) \ { \ public: \ - typedef factory s_t; \ - typedef typecreator f_t; \ + typedef factory s_t; \ + typedef typecreator f_t; \ static s_t::FuncType creator() { return &f_t::create<s_t>; } \ _INTERNAL_FACTORY_REGISTER_CNAME( type, serial )() \ { \ @@ -69,7 +69,7 @@ class Component2 : public Base2 { public: Component2( std::string _s, int _i ) : i( _i ), s( std::move( _s ) ) {} - int i; + int i; std::string s; }; DECLARE_COMPONENT( Component2 ) @@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE( ids ) BOOST_AUTO_TEST_CASE( properties ) { using Gaudi::PluginService::Details::Registry; - Registry& reg = Registry::instance(); + Registry& reg = Registry::instance(); Registry::Properties props = reg.getInfo( "Component1" ).properties; BOOST_CHECK( props["name"] == "Component1" ); diff --git a/GaudiPolicy/python/GaudiTesting/BaseTest.py b/GaudiPolicy/python/GaudiTesting/BaseTest.py index d3ae8f5e4b39373d34aca6322e778f90c3c2b807..19b2c42fb8d9142136466600191c29137b6e0dd5 100644 --- a/GaudiPolicy/python/GaudiTesting/BaseTest.py +++ b/GaudiPolicy/python/GaudiTesting/BaseTest.py @@ -241,7 +241,7 @@ class BaseTest(object): 'Output Reference File': 'reference', 'Error Reference File': 'error_reference', 'Causes': 'causes', - #'Validator Result': 'result.annotations', + # 'Validator Result': 'result.annotations', 'Unsupported Platforms': 'unsupported_platforms', 'Stack Trace': 'stack_trace'} resultDict = [(key, getattr(self, attr)) @@ -835,7 +835,7 @@ class SortGroupOfLines(FilePreprocessor): # Preprocessors for GaudiExamples normalizeExamples = maskPointers + normalizeDate for w, o, r in [ - #("TIMER.TIMER",r"[0-9]", "0"), # Normalize time output + # ("TIMER.TIMER",r"[0-9]", "0"), # Normalize time output ("TIMER.TIMER", r"\s+[+-]?[0-9]+[0-9.]*", " 0"), # Normalize time output ("release all pending", r"^.*/([^/]*:.*)", r"\1"), ("^#.*file", r"file '.*[/\\]([^/\\]*)$", r"file '\1"), diff --git a/GaudiPolicy/qmtest_classes/GaudiTest.py b/GaudiPolicy/qmtest_classes/GaudiTest.py index 6465b82ecde0df2baf13ab6d998ddb18bbca6c53..12027ad635bbeb2f337c5dd97ba1b2b4907db3ae 100644 --- a/GaudiPolicy/qmtest_classes/GaudiTest.py +++ b/GaudiPolicy/qmtest_classes/GaudiTest.py @@ -555,7 +555,7 @@ class LineSorter(FilePreprocessor): # Preprocessors for GaudiExamples normalizeExamples = maskPointers + normalizeDate for w, o, r in [ - #("TIMER.TIMER",r"[0-9]", "0"), # Normalize time output + # ("TIMER.TIMER",r"[0-9]", "0"), # Normalize time output ("TIMER.TIMER", r"\s+[+-]?[0-9]+[0-9.]*", " 0"), # Normalize time output ("release all pending", r"^.*/([^/]*:.*)", r"\1"), ("0x########", r"\[.*/([^/]*.*)\]", r"[\1]"), diff --git a/GaudiProfiling/GaudiProfiling/PfmCodeAnalyser.h b/GaudiProfiling/GaudiProfiling/PfmCodeAnalyser.h index a02abfc6a3a090e56fa9db9c3ba1e50994f93fa0..dc88591823d353e136f275bf28aa122c432cb4dc 100644 --- a/GaudiProfiling/GaudiProfiling/PfmCodeAnalyser.h +++ b/GaudiProfiling/GaudiProfiling/PfmCodeAnalyser.h @@ -23,25 +23,25 @@ class PfmCodeAnalyser { private: - int used_counters_number; - int nehalem; - pfmlib_input_param_t inp; - pfmlib_output_param_t outp; - pfarg_ctx_t ctx; - pfarg_pmd_t pd[NUM_PMDS]; - pfarg_pmc_t pc[NUM_PMCS]; - pfarg_load_t load_arg; - int fd; - char event_str[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS][MAX_EVT_NAME_LEN]; - bool inv[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; - unsigned int cmask[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + int used_counters_number; + int nehalem; + pfmlib_input_param_t inp; + pfmlib_output_param_t outp; + pfarg_ctx_t ctx; + pfarg_pmd_t pd[NUM_PMDS]; + pfarg_pmc_t pc[NUM_PMCS]; + pfarg_load_t load_arg; + int fd; + char event_str[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS][MAX_EVT_NAME_LEN]; + bool inv[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + unsigned int cmask[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; pfmlib_core_input_param_t params; - pfmlib_nhm_input_param_t nhm_params; - int ret; - unsigned i; - unsigned long sum[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; - unsigned count; - unsigned overhead_avg[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + pfmlib_nhm_input_param_t nhm_params; + int ret; + unsigned i; + unsigned long sum[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + unsigned count; + unsigned overhead_avg[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; private: PfmCodeAnalyser( const char* event0, unsigned int cmask_v0, bool inv_v0, const char* event1, unsigned int cmask_v1, diff --git a/GaudiProfiling/src/app/pfm_gen_analysis.cpp b/GaudiProfiling/src/app/pfm_gen_analysis.cpp index e0a46ae5bca8bd4ec13d8d9bdbd9219c6e3fb69e..d0d84aa4150e1081c15e7f7278aeea8e1ea774b2 100644 --- a/GaudiProfiling/src/app/pfm_gen_analysis.cpp +++ b/GaudiProfiling/src/app/pfm_gen_analysis.cpp @@ -117,7 +117,7 @@ public: std::istringstream& output( void ) { return *iss; } private: - FILE* pipe; + FILE* pipe; std::istringstream* iss; }; @@ -198,12 +198,12 @@ public: private: struct CacheItem { CacheItem( Offset offset, const std::string& name ) : OFFSET( offset ), NAME( name ){}; - Offset OFFSET; + Offset OFFSET; std::string NAME; }; typedef std::vector<CacheItem> SymbolCache; - SymbolCache m_symbolCache; + SymbolCache m_symbolCache; struct CacheItemComparator { bool operator()( const CacheItem& a, const int& b ) const { return a.OFFSET < b; } @@ -213,11 +213,11 @@ private: void createOffsetMap( void ) { std::string commandLine = "objdump -p " + NAME; - PipeReader objdump( commandLine.c_str() ); + PipeReader objdump( commandLine.c_str() ); std::string oldname; std::string suffix; - int vmbase = 0; - bool matched = false; + int vmbase = 0; + bool matched = false; while ( objdump.output() ) { // Checks the following regexp // @@ -235,8 +235,8 @@ private: if ( !skipString( "LOAD", lineptr, &lineptr ) ) continue; if ( !skipWhitespaces( lineptr, &lineptr ) ) continue; if ( !skipString( "off", lineptr, &lineptr ) ) continue; - char* endptr = 0; - int initialBase = strtol( lineptr, &endptr, 16 ); + char* endptr = 0; + int initialBase = strtol( lineptr, &endptr, 16 ); if ( lineptr == endptr ) continue; lineptr = endptr; if ( !skipWhitespaces( lineptr, &lineptr ) ) continue; @@ -254,16 +254,16 @@ private: exit( 1 ); } std::string commandLine2 = "nm -t d -n " + NAME; - PipeReader nm( commandLine2.c_str() ); + PipeReader nm( commandLine2.c_str() ); while ( nm.output() ) { std::string line; std::getline( nm.output(), line ); if ( !nm.output() ) break; if ( line.empty() ) continue; // If line does not match "^(\\d+)[ ]\\S[ ](\S+)$", exit. - const char* begin = line.c_str(); - char* endptr = 0; - int address = strtol( begin, &endptr, 10 ); + const char* begin = line.c_str(); + char* endptr = 0; + int address = strtol( begin, &endptr, 10 ); if ( endptr == begin ) continue; if ( *endptr++ != ' ' ) continue; if ( isspace( *endptr++ ) ) continue; @@ -287,7 +287,7 @@ private: }; static std::map<std::string, unsigned int> modules_tot_samples; -static std::map<std::string, FileInfo> libsInfo; +static std::map<std::string, FileInfo> libsInfo; static int nehalem; static std::map<std::string, std::map<std::string, double>> C_modules; @@ -805,9 +805,9 @@ class S_module private: std::map<std::string, unsigned int> samples; unsigned int total_num_samples; - std::string module_name; - std::string arch; - std::string event; + std::string module_name; + std::string arch; + std::string event; unsigned int cmask; unsigned int inv; unsigned int sp; @@ -842,8 +842,8 @@ public: unsigned int get_smpl_period() { return sp; } unsigned int get_inv_mask() { return inv; } unsigned int get_c_mask() { return cmask; } - std::string get_arch() { return arch; } - std::string get_event() { return event; } + std::string get_arch() { return arch; } + std::string get_event() { return event; } void add_sample( const char* index, unsigned int value ) { samples[index] += value; @@ -865,7 +865,7 @@ public: samples.erase( max_pos ); return true; } - std::string get_module_name() { return module_name; } + std::string get_module_name() { return module_name; } unsigned int get_total_num_samples() { return total_num_samples; } }; @@ -1042,7 +1042,7 @@ const char* func_name( const char* demangled_symbol ) } char* end_of_demangled_name = const_cast<char*>( strrchr( demangled_symbol, ')' ) ); if ( end_of_demangled_name != NULL ) { - int pars = 1; + int pars = 1; char c; while ( pars > 0 && end_of_demangled_name != demangled_symbol ) { c = *( --end_of_demangled_name ); @@ -1185,7 +1185,7 @@ void put_S_module( S_module* cur_module, const char* dir ) char index[MAX_SAMPLE_INDEX_LENGTH]; bzero( index, MAX_SAMPLE_INDEX_LENGTH ); unsigned int value; - bool res = cur_module->get_max( index, &value ); + bool res = cur_module->get_max( index, &value ); if ( !res ) break; char* sym_end = strchr( index, '%' ); if ( sym_end == NULL ) // error @@ -1239,19 +1239,19 @@ void put_S_module( S_module* cur_module, const char* dir ) // returns 0 on success int read_S_file( const char* dir, const char* filename ) { - char line[MAX_LINE_LENGTH]; - char event[MAX_EVENT_NAME_LENGTH]; - char arch[MAX_ARCH_NAME_LENGTH]; + char line[MAX_LINE_LENGTH]; + char event[MAX_EVENT_NAME_LENGTH]; + char arch[MAX_ARCH_NAME_LENGTH]; unsigned int cmask; unsigned int inv; unsigned int sp; - char cur_module_name[MAX_MODULE_NAME_LENGTH]; + char cur_module_name[MAX_MODULE_NAME_LENGTH]; bzero( line, MAX_LINE_LENGTH ); bzero( event, MAX_EVENT_NAME_LENGTH ); bzero( cur_module_name, MAX_MODULE_NAME_LENGTH ); bzero( arch, MAX_ARCH_NAME_LENGTH ); - S_module* cur_module = new S_module(); + S_module* cur_module = new S_module(); unsigned int module_num = 0; char path_name[MAX_FILENAME_LENGTH]; @@ -1295,10 +1295,10 @@ int read_S_file( const char* dir, const char* filename ) else // symbol, libName, libOffset, value { unsigned int value = 0, libOffset = 0; - char symbol[MAX_SYM_LENGTH]; - char libName[MAX_LIB_LENGTH]; - char final_sym[MAX_SYM_MOD_LENGTH]; - char final_lib[MAX_LIB_MOD_LENGTH]; + char symbol[MAX_SYM_LENGTH]; + char libName[MAX_LIB_LENGTH]; + char final_sym[MAX_SYM_MOD_LENGTH]; + char final_lib[MAX_LIB_MOD_LENGTH]; bzero( symbol, MAX_SYM_LENGTH ); bzero( libName, MAX_LIB_LENGTH ); bzero( final_sym, MAX_SYM_MOD_LENGTH ); @@ -1316,7 +1316,7 @@ int read_S_file( const char* dir, const char* filename ) } const char* temp_sym = libsInfo[realPathName].symbolByOffset( libOffset ); if ( temp_sym != NULL && strlen( temp_sym ) > 0 ) { - int status; + int status; char* demangled_symbol = abi::__cxa_demangle( temp_sym, NULL, NULL, &status ); if ( status == 0 ) { strcpy( final_sym, demangled_symbol ); @@ -1444,16 +1444,16 @@ int read_C_file( const char* dir, const char* filename ) bzero( cmask_str, MAX_CMASK_STR_LENGTH ); bzero( inv_str, MAX_INV_STR_LENGTH ); bzero( sp_str, MAX_SP_STR_LENGTH ); - int number_of_modules = 0; - long cur_sum = 0; - int no_of_values = 0; + int number_of_modules = 0; + long cur_sum = 0; + int no_of_values = 0; char path_name[MAX_FILENAME_LENGTH]; bzero( path_name, MAX_FILENAME_LENGTH ); strcpy( path_name, dir ); strcat( path_name, "/" ); strcat( path_name, filename ); - FILE* fp = fopen( path_name, "r" ); - int stat = fscanf( fp, "%s %s %s %s %s\n", arch, event, cmask_str, inv_str, sp_str ); + FILE* fp = fopen( path_name, "r" ); + int stat = fscanf( fp, "%s %s %s %s %s\n", arch, event, cmask_str, inv_str, sp_str ); if ( stat != 5 ) { std::cerr << "ERROR: failed to parse " << path_name << std::endl; exit( 1 ); @@ -1687,9 +1687,9 @@ int main( int argc, char* argv[] ) } } - DIR* dp; + DIR* dp; struct dirent* dirp; - int num_of_modules = 0; + int num_of_modules = 0; if ( ( dp = opendir( argv[1] ) ) == NULL ) { printf( "Error(%d) opening %s\n", errno, argv[1] ); return errno; diff --git a/GaudiProfiling/src/component/IgHook_IgHookTrace.h b/GaudiProfiling/src/component/IgHook_IgHookTrace.h index 2b27f6c1c49235b626a3cbb23a7ed3d4a9c8abf0..d13bad44cb3b8c23f023ea93f74a7b25f3f18c9c 100644 --- a/GaudiProfiling/src/component/IgHook_IgHookTrace.h +++ b/GaudiProfiling/src/component/IgHook_IgHookTrace.h @@ -21,7 +21,7 @@ public: void* allocate( size_t bytes ); private: - void* m_pool; + void* m_pool; size_t m_left; }; @@ -44,8 +44,8 @@ public: // implicit assignment operator // implicit destructor - Counter* counter( void ); - CounterValue* next( void ); + Counter* counter( void ); + CounterValue* next( void ); unsigned long long count( void ); unsigned long long value( void ); @@ -59,8 +59,8 @@ public: unsigned long long max( CounterValue& x ); private: - Counter* m_counter; - CounterValue* m_next; + Counter* m_counter; + CounterValue* m_next; unsigned long long m_value; unsigned long long m_count; }; @@ -91,11 +91,11 @@ public: private: IgHookTraceAlloc* m_alloc; - IgHookTrace* m_parent; - IgHookTrace* m_next; - IgHookTrace* m_children; - void* m_address; - CounterValue* m_counters; + IgHookTrace* m_parent; + IgHookTrace* m_next; + IgHookTrace* m_children; + void* m_address; + CounterValue* m_counters; }; //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>> diff --git a/GaudiProfiling/src/component/PerfMonAuditor.cpp b/GaudiProfiling/src/component/PerfMonAuditor.cpp index ce0974a3cbd8828a02f9bf7494da9e4360745041..3476f6db64a7b905d9d5af54ebec88a3e8eda76b 100644 --- a/GaudiProfiling/src/component/PerfMonAuditor.cpp +++ b/GaudiProfiling/src/component/PerfMonAuditor.cpp @@ -73,20 +73,20 @@ #define cpuid( func, ax, bx, cx, dx ) \ __asm__ __volatile__( "cpuid" : "=a"( ax ), "=b"( bx ), "=c"( cx ), "=d"( dx ) : "a"( func ) ); -static pfarg_pmd_t pd_smpl[NUM_PMDS]; -static uint64_t collected_samples, collected_partial; -static int ctx_fd; +static pfarg_pmd_t pd_smpl[NUM_PMDS]; +static uint64_t collected_samples, collected_partial; +static int ctx_fd; static pfm_dfl_smpl_hdr_t* hdr; -static uint64_t ovfl_count; -static size_t entry_size; -static unsigned int num_smpl_pmds; +static uint64_t ovfl_count; +static size_t entry_size; +static unsigned int num_smpl_pmds; static std::vector<std::map<std::string, std::map<unsigned long, unsigned int>>> samples( MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS ); // a map of modules each containing numbers of samples of their addresses static std::vector<std::map<std::string, std::vector<unsigned long int>>> - results( MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS ); // a map of modules and their result values across multiple events + results( MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS ); // a map of modules and their result values across multiple events static uint64_t last_overflow; static uint64_t last_count; -static int sp[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; +static int sp[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; static std::stack<std::pair<INamedInterface*, std::vector<unsigned long int>>> alg_stack; /*END: perfmon*/ @@ -99,7 +99,7 @@ namespace { union { void* object; - T function; + T function; } caster; caster.object = p; return caster.function; @@ -138,7 +138,7 @@ namespace pfm_set_options_t pfm_set_options; typedef pfm_err_t ( *pfm_get_num_counters_t )( unsigned int* ); pfm_get_num_counters_t pfm_get_num_counters; - static PFMon& instance() { return s_instance; } + static PFMon& instance() { return s_instance; } private: // static void failure() { throw 1; } @@ -216,7 +216,7 @@ private: public: StatusCode initialize() override; StatusCode finalize() override; - int is_nehalem() + int is_nehalem() { #ifdef __ICC // Disable ICC remark #593: variable "x" was set but never used @@ -355,41 +355,41 @@ private: private: typedef GaudiUtils::VectorMap<const INamedInterface*, int> Map; - Map m_map; - int m_indent; // indentation level + Map m_map; + int m_indent; // indentation level bool m_inEvent; // "In event" flag private: int is_nehalem_ret; - pfmlib_input_param_t inp; - pfmlib_output_param_t outp; - pfarg_ctx_t ctx; - pfarg_pmd_t pd[NUM_PMDS]; - pfarg_pmc_t pc[NUM_PMCS]; - pfarg_load_t load_arg; - int fd; - unsigned int i; - int ret; - void startpm(); - void pausepm(); - void stoppm(); - void finalizepm(); - std::string event_str[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; - std::string prefix; - std::string family; - char event_cstr[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS][MAX_EVENT_NAME_LENGTH]; - char prefix_cstr[MAX_PREFIX_NAME_LENGTH]; - unsigned int ph_ev_count; - bool inv[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; - unsigned int cmask[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; - unsigned int start_at_event; + pfmlib_input_param_t inp; + pfmlib_output_param_t outp; + pfarg_ctx_t ctx; + pfarg_pmd_t pd[NUM_PMDS]; + pfarg_pmc_t pc[NUM_PMCS]; + pfarg_load_t load_arg; + int fd; + unsigned int i; + int ret; + void startpm(); + void pausepm(); + void stoppm(); + void finalizepm(); + std::string event_str[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + std::string prefix; + std::string family; + char event_cstr[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS][MAX_EVENT_NAME_LENGTH]; + char prefix_cstr[MAX_PREFIX_NAME_LENGTH]; + unsigned int ph_ev_count; + bool inv[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + unsigned int cmask[MAX_NUMBER_OF_PROGRAMMABLE_COUNTERS]; + unsigned int start_at_event; pfmlib_core_input_param_t params; - pfmlib_nhm_input_param_t nhm_params; - int used_counters_number; - bool nehalem; - bool westmere; - bool core; + pfmlib_nhm_input_param_t nhm_params; + int used_counters_number; + bool nehalem; + bool westmere; + bool core; bool sampling; int detect_unavail_pmu_regs( int fd, pfmlib_regmask_t* r_pmcs, pfmlib_regmask_t* r_pmds ); @@ -410,21 +410,21 @@ private: static void process_smpl_buf( pfm_dfl_smpl_hdr_t* hdr, size_t entry_size ); static void sigio_handler( int, struct siginfo*, struct sigcontext* ); // dlopen ==> // void sigio_handler(int, struct siginfo *, struct sigcontext *); - void start_smpl(); - void stop_smpl(); - void finalize_smpl(); + void start_smpl(); + void stop_smpl(); + void finalize_smpl(); pfm_dfl_smpl_arg_t buf_arg; - pfarg_load_t load_args; - void* buf_addr; - unsigned num_counters; - unsigned int max_pmd; - pfmlib_options_t pfmlib_options; + pfarg_load_t load_args; + void* buf_addr; + unsigned num_counters; + unsigned int max_pmd; + pfmlib_options_t pfmlib_options; int level; - bool first_alg; + bool first_alg; std::string first_alg_name; - bool event_count_reached; + bool event_count_reached; }; void PerfMonAuditor::startpm() @@ -613,8 +613,8 @@ void PerfMonAuditor::process_smpl_buf( pfm_dfl_smpl_hdr_t* hdr, size_t entry_siz { //////// pfm_dfl_smpl_entry_t* ent; - size_t pos, count; - uint64_t entry; + size_t pos, count; + uint64_t entry; if ( hdr->hdr_overflows == last_overflow && hdr->hdr_count == last_count ) { printf( "skipping identical set of samples...\n" ); return; @@ -648,10 +648,10 @@ void PerfMonAuditor::process_smpl_buf( pfm_dfl_smpl_hdr_t* hdr, size_t entry_siz // signal handler used to catch sampling buffer overflows. When they occur it calls the process_smpl_buf() function void PerfMonAuditor::sigio_handler( int /*n*/, struct siginfo* /*info*/, struct sigcontext* /*sc*/ ) { - PFMon& pfm = PFMon::instance(); + PFMon& pfm = PFMon::instance(); pfarg_msg_t msg; - int fd = ctx_fd; - int r; + int fd = ctx_fd; + int r; if ( fd != ctx_fd ) { // error() << "ERROR: handler does not get valid file descriptor. Aborting..." << endmsg; } @@ -874,9 +874,9 @@ void PerfMonAuditor::finalize_smpl() bzero( sym_name, SYM_NAME_MAX_LENGTH ); const char* libName; const char* symbolName; - int libOffset = 0; - int offset = 0; - void* sym_addr = IgHookTrace::tosymbol( (void*)( jt->first ) ); + int libOffset = 0; + int offset = 0; + void* sym_addr = IgHookTrace::tosymbol( (void*)( jt->first ) ); if ( sym_addr != NULL ) { bool success = IgHookTrace::symbol( sym_addr, symbolName, libName, offset, libOffset ); if ( success ) { diff --git a/GaudiProfiling/src/component/google/GoogleAuditor.cpp b/GaudiProfiling/src/component/google/GoogleAuditor.cpp index ca6d6469d5ba60e3640748261075cf15f6db5903..4299e04971ca679529b57167b3b728945b9ab481 100644 --- a/GaudiProfiling/src/component/google/GoogleAuditor.cpp +++ b/GaudiProfiling/src/component/google/GoogleAuditor.cpp @@ -259,7 +259,7 @@ namespace Google this, "DisableFor", {}, "List of component names to disable the auditing for"}; Gaudi::Property<std::vector<std::string>> m_list{ this, "EnableFor", {}, "Any component in this list will be audited. If empty, all will be done."}; - Gaudi::Property<int> m_freq{this, "ProfileFreq", -1, "The frequence to audit events. -1 means all events"}; + Gaudi::Property<int> m_freq{this, "ProfileFreq", -1, "The frequence to audit events. -1 means all events"}; Gaudi::Property<bool> m_fullEventAudit{ this, "DoFullEventProfile", false, "If true, instead of individually auditing components, the full event (or events) will be audited in one go"}; @@ -270,12 +270,12 @@ namespace Google Gaudi::Property<bool> m_skipSequencers{this, "SkipSequencers", true, "If true, auditing will be skipped for Sequencer objects."}; - bool m_audit = true; ///< Internal flag to say if auditing is enabled or not for the current event + bool m_audit = true; ///< Internal flag to say if auditing is enabled or not for the current event unsigned long long m_nEvts = 0; ///< Number of events processed. unsigned long long m_sampleEventCount = - 0; ///< Internal count of the number of events currently processed during an audit - bool m_inFullAudit = false; ///< Internal flag to indicate if we are current in a full event audit - std::string m_startedBy; ///< Name of the component we are currently auditing + 0; ///< Internal count of the number of events currently processed during an audit + bool m_inFullAudit = false; ///< Internal flag to indicate if we are current in a full event audit + std::string m_startedBy; ///< Name of the component we are currently auditing }; /** @class HeapProfiler GoogleAuditor.cpp @@ -384,7 +384,7 @@ namespace Google bool alreadyRunning() override { return m_enabled && m_checker; } private: - bool m_enabled = true; + bool m_enabled = true; std::unique_ptr<HeapLeakChecker> m_checker; }; diff --git a/GaudiProfiling/src/component/intel/IntelProfilerAuditor.cpp b/GaudiProfiling/src/component/intel/IntelProfilerAuditor.cpp index 7afff42c71fe4458bd90a8e88999b2f2f439fd7a..f9cad95b469a763bb7b02b543d50bffe6aae3dd3 100644 --- a/GaudiProfiling/src/component/intel/IntelProfilerAuditor.cpp +++ b/GaudiProfiling/src/component/intel/IntelProfilerAuditor.cpp @@ -63,7 +63,7 @@ private: private: Gaudi::Property<std::vector<std::string>> m_included{this, "IncludeAlgorithms", {}, "Names of included algorithms."}; Gaudi::Property<std::vector<std::string>> m_excluded{this, "ExcludeAlgorithms", {}, "Names of excluded algorithms."}; - Gaudi::Property<int> m_nStartFromEvent{ + Gaudi::Property<int> m_nStartFromEvent{ this, "StartFromEventN", 1, "After what event we stop profiling. If 0 than we also profile finalization stage."}; Gaudi::Property<int> m_nStopAtEvent{ this, "StopAtEventN", 0, @@ -115,7 +115,7 @@ private: bool isExcluded( const std::string& name ) const; bool isRunning() const; - int stackLevel() const; + int stackLevel() const; std::string stackIndent( bool newLevel = false ) const; std::string taskTypeName( const std::string& component_name ) const; }; @@ -129,9 +129,9 @@ void IntelProfilerAuditor::start() void IntelProfilerAuditor::start_profiling_component( const std::string& name ) { if ( !m_isStarted ) return; - std::string typeName = taskTypeName( name ); - __itt_event taskId = 0; - TaskTypes::const_iterator iter = m_tasktypes.find( typeName ); + std::string typeName = taskTypeName( name ); + __itt_event taskId = 0; + TaskTypes::const_iterator iter = m_tasktypes.find( typeName ); if ( iter != m_tasktypes.end() ) { taskId = iter->second; } @@ -142,7 +142,7 @@ void IntelProfilerAuditor::start_profiling_component( const std::string& name ) m_tasktypes.insert( TaskTypes::value_type( typeName, taskId ) ); } - stack_entity state = stack_entity( name, true, taskId ); + stack_entity state = stack_entity( name, true, taskId ); stack_entity* parent = !m_stack.empty() ? &m_stack.back() : NULL; if ( parent != NULL ) { @@ -236,8 +236,8 @@ StatusCode IntelProfilerAuditor::initialize() { info() << "Initialised" << endmsg; - IIncidentSvc* inSvc = NULL; - const StatusCode sc = serviceLocator()->service( "IncidentSvc", inSvc ); + IIncidentSvc* inSvc = NULL; + const StatusCode sc = serviceLocator()->service( "IncidentSvc", inSvc ); if ( sc.isFailure() ) return sc; // Useful to start profiling only after some event, we don't need profile // initialization stage. For that we need to count events with BeginEvent @@ -351,8 +351,8 @@ void IntelProfilerAuditor::after( StandardEventType type, INamedInterface* i, co } // Name of the current component - const std::string& name = i->name(); - stack_entity state = m_stack.back(); + const std::string& name = i->name(); + stack_entity state = m_stack.back(); // Remove component from stack. m_stack.pop_back(); diff --git a/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp b/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp index be67cbf91927d44f2339762ef110b5feb1ccabea..09a9e6d2861ac91dd0fee64bf61b848273e0d36b 100644 --- a/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp +++ b/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp @@ -30,7 +30,7 @@ StatusCode JemallocProfile::initialize() if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; bool active = true; - int res = mallctl( "prof.active", NULL, NULL, &active, sizeof( active ) ); + int res = mallctl( "prof.active", NULL, NULL, &active, sizeof( active ) ); if ( res != 0 ) { return StatusCode::FAILURE; } diff --git a/GaudiProfiling/src/component/jemalloc/JemallocProfile.h b/GaudiProfiling/src/component/jemalloc/JemallocProfile.h index b1a7fcb23098e83dc199e04dd2c53879cefe6795..86d2d7b0dab0ae2d0d622c74169896d15f8d6496 100644 --- a/GaudiProfiling/src/component/jemalloc/JemallocProfile.h +++ b/GaudiProfiling/src/component/jemalloc/JemallocProfile.h @@ -36,7 +36,7 @@ private: "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."}; Gaudi::Property<int> m_dumpPeriod{this, "DumpPeriod", 100, "Period for dumping head to a file. Default=100"}; - bool m_profiling = false; // whether we are profiling... - int m_eventNumber = 0; // Current event number + bool m_profiling = false; // whether we are profiling... + int m_eventNumber = 0; // Current event number }; #endif // JEMALLOC_PROFILE_H diff --git a/GaudiProfiling/src/component/perfmon/perfmon.h b/GaudiProfiling/src/component/perfmon/perfmon.h index 74e9d43441050d1cf7258c32145c9a233a587698..f1486895c5006dfdc8a2140b2ea94cf42047de37 100644 --- a/GaudiProfiling/src/component/perfmon/perfmon.h +++ b/GaudiProfiling/src/component/perfmon/perfmon.h @@ -203,7 +203,7 @@ extern os_err_t pfm_attach( int fd, int flags, int target ); #include "perfmon_v2.h" typedef union { - uint32_t type; + uint32_t type; pfarg_ovfl_msg_t pfm_ovfl_msg; } pfarg_msg_t; diff --git a/GaudiProfiling/src/component/perfmon/perfmon_pebs_core_smpl.h b/GaudiProfiling/src/component/perfmon/perfmon_pebs_core_smpl.h index b8ecbd4cc96631db47a15442dd80c87c6abee25f..70d81ddf14cf38f7d76474de10cd8086bee92ffa 100644 --- a/GaudiProfiling/src/component/perfmon/perfmon_pebs_core_smpl.h +++ b/GaudiProfiling/src/component/perfmon/perfmon_pebs_core_smpl.h @@ -96,13 +96,13 @@ typedef struct { * actual_buffer = (unsigned long)(hdr+1)+hdr->hdr_start_offs */ typedef struct { - uint64_t overflows; /* #overflows for buffer */ - size_t buf_size; /* bytes in the buffer */ - size_t start_offs; /* actual buffer start offset */ - uint32_t version; /* smpl format version */ - uint32_t reserved1; /* for future use */ - uint64_t reserved2[5]; /* for future use */ - pfm_ds_area_core_t ds; /* DS management Area */ + uint64_t overflows; /* #overflows for buffer */ + size_t buf_size; /* bytes in the buffer */ + size_t start_offs; /* actual buffer start offset */ + uint32_t version; /* smpl format version */ + uint32_t reserved1; /* for future use */ + uint64_t reserved2[5]; /* for future use */ + pfm_ds_area_core_t ds; /* DS management Area */ } pfm_pebs_core_smpl_hdr_t; /* diff --git a/GaudiProfiling/src/component/perfmon/perfmon_pebs_p4_smpl.h b/GaudiProfiling/src/component/perfmon/perfmon_pebs_p4_smpl.h index 18a8aa84ac87da2af644fdc3227c95f4839ea16e..b73e449bb0b434c09bcf62ee2522f96955a9d4a2 100644 --- a/GaudiProfiling/src/component/perfmon/perfmon_pebs_p4_smpl.h +++ b/GaudiProfiling/src/component/perfmon/perfmon_pebs_p4_smpl.h @@ -90,8 +90,8 @@ extern "C" { */ typedef struct { uint64_t cnt_reset; /* counter reset value */ - size_t buf_size; /* size of the buffer in bytes */ - size_t intr_thres; /* index of interrupt threshold entry */ + size_t buf_size; /* size of the buffer in bytes */ + size_t intr_thres; /* index of interrupt threshold entry */ uint64_t reserved[6]; /* for future use */ } pfm_pebs_p4_smpl_arg_t; @@ -107,7 +107,7 @@ typedef struct { unsigned long pebs_index; unsigned long pebs_abs_max; unsigned long pebs_intr_thres; - uint64_t pebs_cnt_reset; + uint64_t pebs_cnt_reset; } pfm_ds_area_p4_t; /* @@ -121,13 +121,13 @@ typedef struct { * actual_buffer = (unsigned long)(hdr+1)+hdr->hdr_start_offs */ typedef struct { - uint64_t overflows; /* #overflows for buffer */ - size_t buf_size; /* bytes in the buffer */ - size_t start_offs; /* actual buffer start offset */ - uint32_t version; /* smpl format version */ - uint32_t reserved1; /* for future use */ - uint64_t reserved2[5]; /* for future use */ - pfm_ds_area_p4_t ds; /* DS management Area */ + uint64_t overflows; /* #overflows for buffer */ + size_t buf_size; /* bytes in the buffer */ + size_t start_offs; /* actual buffer start offset */ + uint32_t version; /* smpl format version */ + uint32_t reserved1; /* for future use */ + uint64_t reserved2[5]; /* for future use */ + pfm_ds_area_p4_t ds; /* DS management Area */ } pfm_pebs_p4_smpl_hdr_t; /* diff --git a/GaudiProfiling/src/component/perfmon/pfmlib.h b/GaudiProfiling/src/component/perfmon/pfmlib.h index c306777cfb61d32afaed685cf339e2d657f538a2..eda851269831aa9cff21049c09b813662b57277b 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib.h @@ -82,36 +82,36 @@ typedef struct { * event definition for pfmlib_input_param_t */ typedef struct { - unsigned int event; /* event descriptor */ - unsigned int plm; /* event privilege level mask */ - unsigned long flags; /* per-event flag */ - unsigned int unit_masks[PFMLIB_MAX_MASKS_PER_EVENT]; /* unit-mask identifiers */ - unsigned int num_masks; /* number of masks specified in 'unit_masks' */ - unsigned long reserved[2]; /* for future use */ + unsigned int event; /* event descriptor */ + unsigned int plm; /* event privilege level mask */ + unsigned long flags; /* per-event flag */ + unsigned int unit_masks[PFMLIB_MAX_MASKS_PER_EVENT]; /* unit-mask identifiers */ + unsigned int num_masks; /* number of masks specified in 'unit_masks' */ + unsigned long reserved[2]; /* for future use */ } pfmlib_event_t; /* * generic register definition */ typedef struct { - unsigned long long reg_value; /* register value */ - unsigned long long reg_addr; /* hardware register addr or index */ - unsigned int reg_num; /* logical register index (perfmon2) */ - unsigned int reg_reserved1; /* for future use */ - unsigned long reg_alt_addr; /* alternate hw register addr of index */ + unsigned long long reg_value; /* register value */ + unsigned long long reg_addr; /* hardware register addr or index */ + unsigned int reg_num; /* logical register index (perfmon2) */ + unsigned int reg_reserved1; /* for future use */ + unsigned long reg_alt_addr; /* alternate hw register addr of index */ } pfmlib_reg_t; /* * library generic input parameters for pfm_dispatch_event() */ typedef struct { - unsigned int pfp_event_count; /* how many events specified (input) */ - unsigned int pfp_dfl_plm; /* default priv level : used when event.plm==0 */ - unsigned int pfp_flags; /* set of flags for all events used when event.flags==0*/ - unsigned int reserved1; /* for future use */ - pfmlib_event_t pfp_events[PFMLIB_MAX_PMCS]; /* event descriptions */ - pfmlib_regmask_t pfp_unavail_pmcs; /* bitmask of unavailable PMC registers */ - unsigned long reserved[6]; /* for future use */ + unsigned int pfp_event_count; /* how many events specified (input) */ + unsigned int pfp_dfl_plm; /* default priv level : used when event.plm==0 */ + unsigned int pfp_flags; /* set of flags for all events used when event.flags==0*/ + unsigned int reserved1; /* for future use */ + pfmlib_event_t pfp_events[PFMLIB_MAX_PMCS]; /* event descriptions */ + pfmlib_regmask_t pfp_unavail_pmcs; /* bitmask of unavailable PMC registers */ + unsigned long reserved[6]; /* for future use */ } pfmlib_input_param_t; /* @@ -123,11 +123,11 @@ typedef struct { * library generic output parameters for pfm_dispatch_event() */ typedef struct { - unsigned int pfp_pmc_count; /* number of entries in pfp_pmcs */ - unsigned int pfp_pmd_count; /* number of entries in pfp_pmds */ - pfmlib_reg_t pfp_pmcs[PFMLIB_MAX_PMCS]; /* PMC registers number and values */ - pfmlib_reg_t pfp_pmds[PFMLIB_MAX_PMDS]; /* PMD registers numbers */ - unsigned long reserved[7]; /* for future use */ + unsigned int pfp_pmc_count; /* number of entries in pfp_pmcs */ + unsigned int pfp_pmd_count; /* number of entries in pfp_pmds */ + pfmlib_reg_t pfp_pmcs[PFMLIB_MAX_PMCS]; /* PMC registers number and values */ + pfmlib_reg_t pfp_pmds[PFMLIB_MAX_PMDS]; /* PMD registers numbers */ + unsigned long reserved[7]; /* for future use */ } pfmlib_output_param_t; /* diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_amd64.h b/GaudiProfiling/src/component/perfmon/pfmlib_amd64.h index 860b1075f4d4cf3438b62d2f6ea3ce66878dd0a2..7bb70a363adea7c3f74b619a36d63709ae94afff 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_amd64.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_amd64.h @@ -194,11 +194,11 @@ typedef struct { typedef struct { pfmlib_amd64_counter_t pfp_amd64_counters[PMU_AMD64_MAX_COUNTERS]; /* extended counter features */ - uint32_t flags; /* use flags */ - uint32_t reserved1; /* for future use */ - ibs_param_t ibsfetch; /* IBS fetch control */ - ibs_param_t ibsop; /* IBS execution control */ - uint64_t reserved2; /* for future use */ + uint32_t flags; /* use flags */ + uint32_t reserved1; /* for future use */ + ibs_param_t ibsfetch; /* IBS fetch control */ + ibs_param_t ibsop; /* IBS execution control */ + uint64_t reserved2; /* for future use */ } pfmlib_amd64_input_param_t; /* A bit mask, meaning multiple usage types may be defined */ diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_core.h b/GaudiProfiling/src/component/perfmon/pfmlib_core.h index cd50cc6c28293ef96d6f9a719ad7a693c8adfa1a..ea448750aeb7462f43f210aab370a58fc44ee6b2 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_core.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_core.h @@ -62,7 +62,7 @@ typedef union { typedef struct { unsigned long cnt_mask; /* threshold (cnt_mask) */ - unsigned int flags; /* counter specific flag */ + unsigned int flags; /* counter specific flag */ } pfmlib_core_counter_t; #define PFM_CORE_SEL_INV 0x1 /* inverse */ @@ -77,8 +77,8 @@ typedef struct { typedef struct { pfmlib_core_counter_t pfp_core_counters[PMU_CORE_NUM_COUNTERS]; - pfmlib_core_pebs_t pfp_core_pebs; - uint64_t reserved[4]; /* for future use */ + pfmlib_core_pebs_t pfp_core_pebs; + uint64_t reserved[4]; /* for future use */ } pfmlib_core_input_param_t; typedef struct { diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_coreduo.h b/GaudiProfiling/src/component/perfmon/pfmlib_coreduo.h index 811c66229c6068eceed078f8c3d9d6543ec67e36..73549b492856f1f5ca1d1a45e6a9323c52aa7787 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_coreduo.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_coreduo.h @@ -60,7 +60,7 @@ typedef union { typedef struct { unsigned long cnt_mask; /* threshold (cnt_mask) */ - unsigned int flags; /* counter specific flag */ + unsigned int flags; /* counter specific flag */ } pfm_coreduo_counter_t; #define PFM_COREDUO_SEL_INV 0x1 /* inverse */ @@ -71,7 +71,7 @@ typedef struct { */ typedef struct { pfm_coreduo_counter_t pfp_coreduo_counters[PMU_COREDUO_NUM_COUNTERS]; - uint64_t reserved[4]; /* for future use */ + uint64_t reserved[4]; /* for future use */ } pfmlib_coreduo_input_param_t; #ifdef __cplusplus /* extern C */ diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_gen_ia32.h b/GaudiProfiling/src/component/perfmon/pfmlib_gen_ia32.h index f83ac9b4a41adb7c76ed48adb721a1174365422f..73f14eb28a2996dfccfeb46228a1371f1c853748 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_gen_ia32.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_gen_ia32.h @@ -71,7 +71,7 @@ typedef union { typedef struct { unsigned long cnt_mask; /* threshold (cnt_mask) */ - unsigned int flags; /* counter specific flag */ + unsigned int flags; /* counter specific flag */ } pfmlib_gen_ia32_counter_t; #define PFM_GEN_IA32_SEL_INV 0x1 /* inverse */ @@ -83,7 +83,7 @@ typedef struct { */ typedef struct { pfmlib_gen_ia32_counter_t pfp_gen_ia32_counters[PMU_GEN_IA32_MAX_COUNTERS]; - uint64_t reserved[4]; /* for future use */ + uint64_t reserved[4]; /* for future use */ } pfmlib_gen_ia32_input_param_t; typedef struct { diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_i386_p6.h b/GaudiProfiling/src/component/perfmon/pfmlib_i386_p6.h index be7b1bd49c4d0c895c44c3096b893f3f3af925f3..3c1e53d27bde6589fe6aa969f9eb634a8ef08bb5 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_i386_p6.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_i386_p6.h @@ -84,7 +84,7 @@ typedef enum { typedef struct { pfm_i386_p6_cnt_mask_t cnt_mask; /* threshold (cnt_mask) */ - unsigned int flags; /* counter specific flag */ + unsigned int flags; /* counter specific flag */ } pfmlib_i386_p6_counter_t; #define PFM_I386_P6_SEL_INV 0x1 /* inverse */ @@ -95,7 +95,7 @@ typedef struct { */ typedef struct { pfmlib_i386_p6_counter_t pfp_i386_p6_counters[PMU_I386_P6_NUM_COUNTERS]; /* extended counter features */ - uint64_t reserved[4]; /* for future use */ + uint64_t reserved[4]; /* for future use */ } pfmlib_i386_p6_input_param_t; typedef struct { diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_intel_atom.h b/GaudiProfiling/src/component/perfmon/pfmlib_intel_atom.h index fa9d04bf8a33c1d5dae3b040b497b71e7642dfb1..abcda3e6c4c5f7752b642a5ee1be06775d798019 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_intel_atom.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_intel_atom.h @@ -64,7 +64,7 @@ typedef union { typedef struct { unsigned long cnt_mask; /* threshold (cnt_mask) */ - unsigned int flags; /* counter specific flags */ + unsigned int flags; /* counter specific flags */ } pfmlib_intel_atom_counter_t; #define PFM_INTEL_ATOM_SEL_INV 0x1 /* inverse */ @@ -76,8 +76,8 @@ typedef struct { */ typedef struct { pfmlib_intel_atom_counter_t pfp_intel_atom_counters[PMU_INTEL_ATOM_NUM_COUNTERS]; - unsigned int pfp_intel_atom_pebs_used; /* set to 1 to use PEBS */ - uint64_t reserved[4]; /* for future use */ + unsigned int pfp_intel_atom_pebs_used; /* set to 1 to use PEBS */ + uint64_t reserved[4]; /* for future use */ } pfmlib_intel_atom_input_param_t; #ifdef __cplusplus /* extern C */ diff --git a/GaudiProfiling/src/component/perfmon/pfmlib_intel_nhm.h b/GaudiProfiling/src/component/perfmon/pfmlib_intel_nhm.h index c97ce46a177ca90441fb1315921c2d4fd38c19aa..4bfd582929ad32814e15a12ec1d133b7c04a0a13 100644 --- a/GaudiProfiling/src/component/perfmon/pfmlib_intel_nhm.h +++ b/GaudiProfiling/src/component/perfmon/pfmlib_intel_nhm.h @@ -94,7 +94,7 @@ typedef union { typedef struct { unsigned long cnt_mask; /* counter mask (occurences) */ - unsigned int flags; /* counter specific flag */ + unsigned int flags; /* counter specific flag */ } pfmlib_nhm_counter_t; /* @@ -137,9 +137,9 @@ typedef struct { */ typedef struct { pfmlib_nhm_counter_t pfp_nhm_counters[PMU_NHM_NUM_COUNTERS]; - pfmlib_nhm_pebs_t pfp_nhm_pebs; /* PEBS settings */ - pfmlib_nhm_lbr_t pfp_nhm_lbr; /* LBR settings */ - uint64_t reserved[4]; /* for future use */ + pfmlib_nhm_pebs_t pfp_nhm_pebs; /* PEBS settings */ + pfmlib_nhm_lbr_t pfp_nhm_lbr; /* LBR settings */ + uint64_t reserved[4]; /* for future use */ } pfmlib_nhm_input_param_t; /* diff --git a/GaudiProfiling/src/component/valgrind/CallgrindProfile.h b/GaudiProfiling/src/component/valgrind/CallgrindProfile.h index 58e6fcf248ec6239e71a65a01025656336154aba..abf6f76fd689ee0a213bf328a260a3e3b4a44342 100644 --- a/GaudiProfiling/src/component/valgrind/CallgrindProfile.h +++ b/GaudiProfiling/src/component/valgrind/CallgrindProfile.h @@ -36,8 +36,8 @@ private: "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0."}; Gaudi::Property<std::string> m_dumpName{this, "DumpName", "", "Label for the callgrind dump"}; - int m_eventNumber = 0; // Current event number - bool m_profiling = false; // Whether valgrind is profiling or not - bool m_dumpDone = false; // Whether the counters were dumped + int m_eventNumber = 0; // Current event number + bool m_profiling = false; // Whether valgrind is profiling or not + bool m_dumpDone = false; // Whether the counters were dumped }; #endif // VALGRIND_CALLGRINDPROFILE_H diff --git a/GaudiProfiling/src/component/valgrind/local_valgrind.h b/GaudiProfiling/src/component/valgrind/local_valgrind.h index c63fc949685b0ea1adfaed206b42bf2d3598a970..990215ff8ead961a69e2dd2f1adb356b65e3d1b4 100644 --- a/GaudiProfiling/src/component/valgrind/local_valgrind.h +++ b/GaudiProfiling/src/component/valgrind/local_valgrind.h @@ -262,7 +262,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* %EAX = guest_NRADDR */ \ "xchgl %%ecx,%%ecx" \ @@ -307,7 +307,7 @@ static __inline uintptr_t valgrind_do_client_request_expr( uintptr_t _zzq_defaul uintptr_t _zzq_arg3, uintptr_t _zzq_arg4, uintptr_t _zzq_arg5 ) { - volatile uintptr_t _zzq_args[6]; + volatile uintptr_t _zzq_args[6]; volatile unsigned int _zzq_result; _zzq_args[0] = ( uintptr_t )( _zzq_request ); _zzq_args[1] = ( uintptr_t )( _zzq_arg1 ); @@ -326,7 +326,7 @@ static __inline uintptr_t valgrind_do_client_request_expr( uintptr_t _zzq_defaul #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned int __addr; \ __asm { __SPECIAL_INSTRUCTION_PREAMBLE /* %EAX = guest_NRADDR */ \ __asm xchg ecx,ecx \ @@ -382,7 +382,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned long long int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* %RAX = guest_NRADDR */ \ "xchgq %%rcx,%%rcx" \ @@ -420,8 +420,8 @@ typedef struct { _zzq_arg5 ) \ \ __extension__( { \ - unsigned int _zzq_args[6]; \ - unsigned int _zzq_result; \ + unsigned int _zzq_args[6]; \ + unsigned int _zzq_result; \ unsigned int* _zzq_ptr; \ _zzq_args[0] = (unsigned int)( _zzq_request ); \ _zzq_args[1] = (unsigned int)( _zzq_arg1 ); \ @@ -444,7 +444,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ - unsigned int __addr; \ + unsigned int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* %R3 = guest_NRADDR */ \ "or 2,2,2\n\t" \ "mr %0,3" \ @@ -483,8 +483,8 @@ typedef struct { _zzq_arg5 ) \ \ __extension__( { \ - unsigned long long int _zzq_args[6]; \ - unsigned long long int _zzq_result; \ + unsigned long long int _zzq_args[6]; \ + unsigned long long int _zzq_result; \ unsigned long long int* _zzq_ptr; \ _zzq_args[0] = (unsigned long long int)( _zzq_request ); \ _zzq_args[1] = (unsigned long long int)( _zzq_arg1 ); \ @@ -506,7 +506,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ unsigned long long int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* %R3 = guest_NRADDR */ \ "or 2,2,2\n\t" \ @@ -574,7 +574,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ - unsigned int __addr; \ + unsigned int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* R3 = guest_NRADDR */ \ "orr r11, r11, r11\n\t" \ "mov %0, r3" \ @@ -642,7 +642,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned long long int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE __GET_NR_CONTEXT_CODE "lgr %0, 3\n\t" \ : "=a"( __addr ) \ @@ -704,7 +704,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* %t9 = guest_NRADDR */ \ "or $14, $14, $14\n\t" \ @@ -767,7 +767,7 @@ typedef struct { #define VALGRIND_GET_NR_CONTEXT( _zzq_rlval ) \ { \ - volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ + volatile OrigFn* _zzq_orig = &( _zzq_rlval ); \ volatile unsigned long long int __addr; \ __asm__ volatile( __SPECIAL_INSTRUCTION_PREAMBLE /* $11 = guest_NRADDR */ \ "or $14, $14, $14\n\t" \ @@ -921,7 +921,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -935,7 +935,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -952,7 +952,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -971,7 +971,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -992,7 +992,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1014,7 +1014,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1039,7 +1039,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1066,7 +1066,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1095,7 +1095,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1125,7 +1125,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1158,7 +1158,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1193,7 +1193,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1230,7 +1230,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1383,7 +1383,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1398,7 +1398,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1415,7 +1415,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1434,7 +1434,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1455,7 +1455,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1478,7 +1478,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1503,7 +1503,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1530,7 +1530,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1559,7 +1559,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1590,7 +1590,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1623,7 +1623,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1658,7 +1658,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1695,7 +1695,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1781,7 +1781,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1796,7 +1796,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1813,7 +1813,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1832,7 +1832,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1853,7 +1853,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1876,7 +1876,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1901,7 +1901,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1928,7 +1928,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1957,7 +1957,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -1988,7 +1988,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2023,7 +2023,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2061,7 +2061,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2102,7 +2102,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2172,7 +2172,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 0]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2194,7 +2194,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 1]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2218,7 +2218,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 2]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2244,7 +2244,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 3]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2272,7 +2272,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 4]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2302,7 +2302,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 5]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2334,7 +2334,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 6]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2368,7 +2368,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 7]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2404,7 +2404,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 8]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2442,7 +2442,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 9]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2484,7 +2484,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 10]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2529,7 +2529,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 11]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2577,7 +2577,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3 + 12]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ @@ -2660,7 +2660,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2674,7 +2674,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2690,7 +2690,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2708,7 +2708,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2728,7 +2728,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2750,7 +2750,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2776,7 +2776,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2803,7 +2803,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2833,7 +2833,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2864,7 +2864,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2898,7 +2898,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2934,7 +2934,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -2973,7 +2973,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3060,7 +3060,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3077,7 +3077,7 @@ typedef struct { /* The call abi has the arguments in r2-r6 and stack */ #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3094,7 +3094,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3113,7 +3113,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3134,7 +3134,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3157,7 +3157,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3182,7 +3182,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3209,7 +3209,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3238,7 +3238,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3269,7 +3269,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3302,7 +3302,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3337,7 +3337,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3374,7 +3374,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3426,7 +3426,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3448,7 +3448,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3472,7 +3472,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3498,7 +3498,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3526,7 +3526,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3556,7 +3556,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3588,7 +3588,7 @@ typedef struct { } while ( 0 ) #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3625,7 +3625,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3664,7 +3664,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3706,7 +3706,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3751,7 +3751,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3799,7 +3799,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3850,7 +3850,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3917,7 +3917,7 @@ typedef struct { #define CALL_FN_W_v( lval, orig ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3931,7 +3931,7 @@ typedef struct { #define CALL_FN_W_W( lval, orig, arg1 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3947,7 +3947,7 @@ typedef struct { #define CALL_FN_W_WW( lval, orig, arg1, arg2 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3965,7 +3965,7 @@ typedef struct { #define CALL_FN_W_WWW( lval, orig, arg1, arg2, arg3 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -3985,7 +3985,7 @@ typedef struct { #define CALL_FN_W_WWWW( lval, orig, arg1, arg2, arg3, arg4 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4007,7 +4007,7 @@ typedef struct { #define CALL_FN_W_5W( lval, orig, arg1, arg2, arg3, arg4, arg5 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4031,7 +4031,7 @@ typedef struct { #define CALL_FN_W_6W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4057,7 +4057,7 @@ typedef struct { #define CALL_FN_W_7W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4085,7 +4085,7 @@ typedef struct { #define CALL_FN_W_8W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4115,7 +4115,7 @@ typedef struct { #define CALL_FN_W_9W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4150,7 +4150,7 @@ typedef struct { #define CALL_FN_W_10W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4188,7 +4188,7 @@ typedef struct { #define CALL_FN_W_11W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4229,7 +4229,7 @@ typedef struct { #define CALL_FN_W_12W( lval, orig, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12 ) \ do { \ - volatile OrigFn _orig = ( orig ); \ + volatile OrigFn _orig = ( orig ); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ @@ -4410,7 +4410,7 @@ static int #else unsigned long _qzz_res; #endif - va_list vargs; + va_list vargs; va_start( vargs, format ); #if defined( _MSC_VER ) || defined( __MINGW64__ ) _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR( 0, VG_USERREQ__PRINTF_VALIST_BY_REF, (uintptr_t)format, (uintptr_t)&vargs, @@ -4442,7 +4442,7 @@ static int #else unsigned long _qzz_res; #endif - va_list vargs; + va_list vargs; va_start( vargs, format ); #if defined( _MSC_VER ) || defined( __MINGW64__ ) _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR( 0, VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, (uintptr_t)format, diff --git a/GaudiPython/GaudiPython/AlgDecorators.h b/GaudiPython/GaudiPython/AlgDecorators.h index 1133e940851ad320f88550238fe09115de04cd4e..62e7c0e2262068dfb5e7fb9cd9fad47730961eed 100644 --- a/GaudiPython/GaudiPython/AlgDecorators.h +++ b/GaudiPython/GaudiPython/AlgDecorators.h @@ -49,8 +49,8 @@ namespace GaudiPython // ======================================================================== /// the actual type of vector of counters typedef std::vector<const StatEntity*> Counters; - typedef std::vector<IAlgTool*> Tools; - typedef std::vector<IService*> Services; + typedef std::vector<IAlgTool*> Tools; + typedef std::vector<IService*> Services; // ======================================================================== // the general functional methods // ======================================================================== diff --git a/GaudiPython/GaudiPython/Algorithm.h b/GaudiPython/GaudiPython/Algorithm.h index b2d2632f80247b7bcdac03ab65e482e04c7627f7..3f42b86d3a4775b6db886df8a063706f9ff1e5c6 100644 --- a/GaudiPython/GaudiPython/Algorithm.h +++ b/GaudiPython/GaudiPython/Algorithm.h @@ -39,13 +39,13 @@ namespace GaudiPython PyAlgorithm( PyObject* self, const std::string& name ); public: - StatusCode initialize() override; - StatusCode start() override; - StatusCode beginRun() override; - StatusCode endRun() override; - StatusCode execute() override; - StatusCode stop() override; - StatusCode finalize() override; + StatusCode initialize() override; + StatusCode start() override; + StatusCode beginRun() override; + StatusCode endRun() override; + StatusCode execute() override; + StatusCode stop() override; + StatusCode finalize() override; IAlgorithm* myself() { return this; } private: @@ -97,7 +97,7 @@ namespace GaudiPython StatusCode finalize() override { return GaudiPython::call_python_method( m_self, "finalize" ); } // ======================================================================== virtual IAlgorithm* ialgorithm() { return this; } - virtual IProperty* iproperty() { return this; } + virtual IProperty* iproperty() { return this; } // ======================================================================== // preserve the existing methods virtual StatusCode initialize_() { return ALGORITHM::initialize(); } diff --git a/GaudiPython/GaudiPython/Helpers.h b/GaudiPython/GaudiPython/Helpers.h index cdb78c1bdb75309690a965de074cab5a6790a6e8..8e36f442fd6084a62946afbd9be56fca8a2bd028 100644 --- a/GaudiPython/GaudiPython/Helpers.h +++ b/GaudiPython/GaudiPython/Helpers.h @@ -144,7 +144,7 @@ namespace GaudiPython #if PY_VERSION_HEX < 0x02050000 const #endif - char* buf = 0; + char* buf = 0; Py_ssize_t size = ( *( self->ob_type->tp_as_buffer->bf_getcharbuffer ) )( self, 0, &buf ); return size / sizeof( T ); } @@ -167,7 +167,7 @@ namespace GaudiPython #if PY_VERSION_HEX < 0x02050000 const #endif - char* buf = nullptr; + char* buf = nullptr; Py_ssize_t size = ( *( self->ob_type->tp_as_buffer->bf_getcharbuffer ) )( self, 0, &buf ); if ( idx < 0 || idx >= size / int( sizeof( T ) ) ) { PyErr_SetString( PyExc_IndexError, "buffer index out of range" ); @@ -180,7 +180,7 @@ namespace GaudiPython template <class T> static PyObject* toArray( T* ptr, Py_ssize_t size ) { - static PyTypeObject type = PyBuffer_Type; + static PyTypeObject type = PyBuffer_Type; static PySequenceMethods meth = *( PyBuffer_Type.tp_as_sequence ); #if PY_VERSION_HEX < 0x02050000 meth.sq_item = (intargfunc)&Array_item<T>; @@ -223,12 +223,12 @@ namespace GaudiPython template PyObject* Helper::toArray( short*, Py_ssize_t ); template PyObject* Helper::toArray( float*, Py_ssize_t ); template PyObject* Helper::toArray( double*, Py_ssize_t ); - template int* Helper::toAddress( std::vector<int>& ); - template float* Helper::toAddress( std::vector<float>& ); - template double* Helper::toAddress( std::vector<double>& ); - template int* Helper::toAddress<int>( void* ); - template float* Helper::toAddress<float>( void* ); - template double* Helper::toAddress<double>( void* ); + template int* Helper::toAddress( std::vector<int>& ); + template float* Helper::toAddress( std::vector<float>& ); + template double* Helper::toAddress( std::vector<double>& ); + template int* Helper::toAddress<int>( void* ); + template float* Helper::toAddress<float>( void* ); + template double* Helper::toAddress<double>( void* ); } // namespace GaudiPython diff --git a/GaudiPython/GaudiPython/HistoDecorator.h b/GaudiPython/GaudiPython/HistoDecorator.h index 16b0fddaf4051030bc0660a2a66930b35d9375a8..2778d2f150c87151225429100f6dc54911e8b675 100644 --- a/GaudiPython/GaudiPython/HistoDecorator.h +++ b/GaudiPython/GaudiPython/HistoDecorator.h @@ -27,12 +27,12 @@ namespace GaudiPython { public: // ======================================================================== - typedef std::vector<GaudiAlg::ID> IDs; + typedef std::vector<GaudiAlg::ID> IDs; typedef std::vector<AIDA::IHistogram1D*> Histos1D; typedef std::vector<AIDA::IHistogram2D*> Histos2D; typedef std::vector<AIDA::IHistogram3D*> Histos3D; - typedef std::vector<AIDA::IProfile1D*> Profiles1D; - typedef std::vector<AIDA::IProfile2D*> Profiles2D; + typedef std::vector<AIDA::IProfile1D*> Profiles1D; + typedef std::vector<AIDA::IProfile2D*> Profiles2D; // ======================================================================== public: // ======================================================================== diff --git a/GaudiPython/GaudiPython/Vector.h b/GaudiPython/GaudiPython/Vector.h index f218c0c08b0a3f9e4d5f913f799902c990130856..f5f49dcaf83be8d4714b14262db1bf77cc1168d6 100644 --- a/GaudiPython/GaudiPython/Vector.h +++ b/GaudiPython/GaudiPython/Vector.h @@ -17,8 +17,8 @@ namespace GaudiPython { /// useful type definition for implicit loos typedef std::vector<double> Vector; - typedef Vector Row; - typedef std::vector<Row> Matrix; + typedef Vector Row; + typedef std::vector<Row> Matrix; /** @struct _identity * It is here due to 'missing'(?) std::identity diff --git a/GaudiPython/dict/kernel.h b/GaudiPython/dict/kernel.h index 3c2a301b603ae7b670551cbdc8acf28eee7e666f..1b88dde6baf18f6d75b77f1b6278ee746c1f6cb5 100644 --- a/GaudiPython/dict/kernel.h +++ b/GaudiPython/dict/kernel.h @@ -115,8 +115,8 @@ namespace GaudiPython template <class TYPE> struct _Property { - TYPE m_type; - Gaudi::Property<TYPE> m_prop; + TYPE m_type; + Gaudi::Property<TYPE> m_prop; Gaudi::Property<TYPE&> m_ref; // constructor _Property() : m_type(), m_prop(), m_ref( "", m_type ) {} @@ -125,27 +125,27 @@ namespace GaudiPython //--- Template instantiations struct __Instantiations { - std::vector<Gaudi::Details::PropertyBase*> i0; + std::vector<Gaudi::Details::PropertyBase*> i0; std::vector<const Gaudi::Details::PropertyBase*> i00; - std::vector<IRegistry*> i00000; + std::vector<IRegistry*> i00000; - std::allocator<IRegistry*> a0; + std::allocator<IRegistry*> a0; std::allocator<IAlgorithm*> a1; - std::allocator<IService*> a2; + std::allocator<IService*> a2; std::list<IAlgorithm*> i01; - std::list<IService*> i02; + std::list<IService*> i02; - std::vector<IService*> i05_1; - std::vector<IAlgTool*> i05_2; + std::vector<IService*> i05_1; + std::vector<IAlgTool*> i05_2; std::vector<const StatEntity*> i05_3; - std::vector<GaudiAlg::ID> i05_4; + std::vector<GaudiAlg::ID> i05_4; #ifdef AIDA_FOUND std::vector<AIDA::IHistogram1D*> i05_5; std::vector<AIDA::IHistogram2D*> i05_6; std::vector<AIDA::IHistogram3D*> i05_7; - std::vector<AIDA::IProfile1D*> i05_8; - std::vector<AIDA::IProfile2D*> i05_9; + std::vector<AIDA::IProfile1D*> i05_8; + std::vector<AIDA::IProfile2D*> i05_9; #endif // AIDA_FOUND // Gaudi::IIODataManager *gu_i1000; @@ -158,59 +158,59 @@ namespace GaudiPython GaudiPython::PyAlg<GaudiTupleAlg> _alg2; #endif // AIDA_FOUND - GaudiPython::Matrix _mtrx; - GaudiPython::Vector _vctr; + GaudiPython::Matrix _mtrx; + GaudiPython::Vector _vctr; std::vector<std::vector<double>> _vct1; // primitives: - _Property<bool> pp_01; - _Property<char> pp_02; - _Property<signed char> pp_03; - _Property<unsigned char> pp_04; - _Property<short> pp_05; - _Property<unsigned short> pp_06; - _Property<int> pp_07; - _Property<unsigned int> pp_08; - _Property<long> pp_09; - _Property<unsigned long> pp_10; - _Property<long long> pp_11; + _Property<bool> pp_01; + _Property<char> pp_02; + _Property<signed char> pp_03; + _Property<unsigned char> pp_04; + _Property<short> pp_05; + _Property<unsigned short> pp_06; + _Property<int> pp_07; + _Property<unsigned int> pp_08; + _Property<long> pp_09; + _Property<unsigned long> pp_10; + _Property<long long> pp_11; _Property<unsigned long long> pp_12; - _Property<float> pp_13; - _Property<double> pp_14; - _Property<long double> pp_15; - _Property<std::string> pp_16; + _Property<float> pp_13; + _Property<double> pp_14; + _Property<long double> pp_15; + _Property<std::string> pp_16; // vectors of primitives - _Property<std::vector<bool>> vp_01; - _Property<std::vector<char>> vp_02; - _Property<std::vector<signed char>> vp_03; - _Property<std::vector<unsigned char>> vp_04; - _Property<std::vector<short>> vp_05; - _Property<std::vector<unsigned short>> vp_06; - _Property<std::vector<int>> vp_07; - _Property<std::vector<unsigned int>> vp_08; - _Property<std::vector<long>> vp_09; - _Property<std::vector<unsigned long>> vp_10; - _Property<std::vector<long long>> vp_11; + _Property<std::vector<bool>> vp_01; + _Property<std::vector<char>> vp_02; + _Property<std::vector<signed char>> vp_03; + _Property<std::vector<unsigned char>> vp_04; + _Property<std::vector<short>> vp_05; + _Property<std::vector<unsigned short>> vp_06; + _Property<std::vector<int>> vp_07; + _Property<std::vector<unsigned int>> vp_08; + _Property<std::vector<long>> vp_09; + _Property<std::vector<unsigned long>> vp_10; + _Property<std::vector<long long>> vp_11; _Property<std::vector<unsigned long long>> vp_12; - _Property<std::vector<float>> vp_13; - _Property<std::vector<double>> vp_14; - _Property<std::vector<long double>> vp_15; - _Property<std::vector<std::string>> vp_16; + _Property<std::vector<float>> vp_13; + _Property<std::vector<double>> vp_14; + _Property<std::vector<long double>> vp_15; + _Property<std::vector<std::string>> vp_16; // some extended types - _Property<std::pair<int, int>> ep_01; - _Property<std::pair<double, double>> ep_02; + _Property<std::pair<int, int>> ep_01; + _Property<std::pair<double, double>> ep_02; _Property<std::vector<std::pair<double, double>>> ep_04; _Property<std::vector<std::vector<std::string>>> ep_05; - _Property<std::vector<std::vector<double>>> ep_06; - _Property<std::map<int, double>> ep_07; - _Property<std::map<std::string, std::string>> ep_08; - _Property<std::map<std::string, int>> ep_09; - _Property<std::map<std::string, double>> ep_10; + _Property<std::vector<std::vector<double>>> ep_06; + _Property<std::map<int, double>> ep_07; + _Property<std::map<std::string, std::string>> ep_08; + _Property<std::map<std::string, int>> ep_09; + _Property<std::map<std::string, double>> ep_10; _Property<std::map<std::string, std::vector<std::string>>> ep_11; - _Property<std::map<std::string, std::vector<int>>> ep_12; - _Property<std::map<std::string, std::vector<double>>> ep_13; + _Property<std::map<std::string, std::vector<int>>> ep_12; + _Property<std::map<std::string, std::vector<double>>> ep_13; __Instantiations(); ~__Instantiations(); diff --git a/GaudiPython/python/GaudiPython/Bindings.py b/GaudiPython/python/GaudiPython/Bindings.py index c6b4dfffe63548e2139c091ea41c3f8017c3eb19..b21e4ba2b1f4698147be8080932977a4c4cbe45d 100644 --- a/GaudiPython/python/GaudiPython/Bindings.py +++ b/GaudiPython/python/GaudiPython/Bindings.py @@ -931,7 +931,7 @@ class AppMgr(iService): self.__dict__['_svcmgr'] = InterfaceCast(gbl.ISvcManager)(self._appmgr) self.__dict__['pyalgorithms'] = [] iService.__init__(self, 'ApplicationMgr', self._appmgr) - #------python specific initialization------------------------------------- + # ------python specific initialization------------------------------------- if self.FSMState() < Gaudi.StateMachine.CONFIGURED: # Not yet configured self.JobOptionsType = 'NONE' if joboptions: @@ -954,7 +954,7 @@ class AppMgr(iService): if outputlevel != -1: self.OutputLevel = outputlevel self.configure() - #---MessageSvc------------------------------------------------------------ + # ---MessageSvc------------------------------------------------------------ ms = self.service('MessageSvc') if 'MessageSvc' in Configurable.allConfigurables: msprops = Configurable.allConfigurables['MessageSvc'] @@ -965,10 +965,10 @@ class AppMgr(iService): setattr(ms, p, v) if outputlevel != -1: ms.OutputLevel = outputlevel - #---JobOptions------------------------------------------------------------ + # ---JobOptions------------------------------------------------------------ self.__dict__['_optsvc'] = InterfaceCast(gbl.IJobOptionsSvc)( Helper.service(self._svcloc, 'JobOptionsSvc')) - #------Configurables initialization (part2)------------------------------- + # ------Configurables initialization (part2)------------------------------- mkStringProperty = gbl.GaudiPython.Helpers.mkStringProperty for n in getNeededConfigurables(): c = Configurable.allConfigurables[n] @@ -994,7 +994,7 @@ class AppMgr(iService): import atexit atexit.register(self.exit) - #---Hack to avoid bad interactions with the ROOT exit handler + # ---Hack to avoid bad interactions with the ROOT exit handler # Look for an exit handler installed by ROOT root_handler_installed = False for h in atexit._exithandlers: @@ -1282,7 +1282,7 @@ class AppMgr(iService): sc = self.start() if sc.isFailure(): return sc - #--- Access a number of services ---- + # --- Access a number of services ---- if not hasattr(self, '_perssvc'): self.__dict__['_perssvc'] = self.service( 'EventPersistencySvc', 'IAddressCreator') @@ -1292,23 +1292,23 @@ class AppMgr(iService): if not hasattr(self, '_evtmgr'): self.__dict__['_evtmgr'] = self.service( 'EventDataSvc', 'IDataManagerSvc') - #--- Get FID from PFN and number of events in file + # --- Get FID from PFN and number of events in file if pfn.find('PFN:') == 0: pfn = pfn[4:] fid, maxevt = _getFIDandEvents(pfn) - #--- Add FID into catalog if needed --- + # --- Add FID into catalog if needed --- if not self._filecat.existsFID(fid): self._filecat.registerPFN(fid, pfn, '') - #--- Loop over events + # --- Loop over events if type(events) is not list: events = (events,) for evt in events: - #--- Create POOL Address from Generic Address + # --- Create POOL Address from Generic Address gadd = gbl.GenericAddress(0x02, 1, fid, '/Event', 0, evt) oadd = makeNullPointer('IOpaqueAddress') self._perssvc.createAddress( gadd.svcType(), gadd.clID(), gadd.par(), gadd.ipar(), oadd) - #--- Clear TES, set root and run all algorithms + # --- Clear TES, set root and run all algorithms self._evtmgr.clearStore() self._evtmgr.setRoot('/Event', oadd) self._evtpro.executeEvent() diff --git a/GaudiPython/python/GaudiPython/Pythonizations.py b/GaudiPython/python/GaudiPython/Pythonizations.py index e1c3264e442faf59c498a705f7b399d4292c53a8..648e7f1bc4bab3a791eec93c6d57cc97c09914ba 100644 --- a/GaudiPython/python/GaudiPython/Pythonizations.py +++ b/GaudiPython/python/GaudiPython/Pythonizations.py @@ -19,7 +19,7 @@ if not hasattr(gbl, 'ostream'): if not hasattr(gbl, 'stringstream'): gbl.gROOT.ProcessLine("#include <sstream>") -#--- Adding extra functionality to C++ raw classes------------------------------------ +# --- Adding extra functionality to C++ raw classes------------------------------------ def _printHisto1D(h): @@ -125,7 +125,7 @@ gbl.IUpdateManagerSvc.update = lambda self, obj: gbl.IUpdateManagerSvc.PythonHel gbl.IUpdateManagerSvc.invalidate = lambda self, obj: gbl.IUpdateManagerSvc.PythonHelper.invalidate( self, obj) -#---Globals-------------------------------------------------------------------- +# ---Globals-------------------------------------------------------------------- if not hasattr(gbl.StatusCode, 'SUCCESS'): # emulate enums gbl.StatusCode.SUCCESS = 1 @@ -142,7 +142,7 @@ if hasattr(gbl.Gaudi.StringKey, '__cpp_ne__'): setattr(gbl.Gaudi.StringKey, '__ne__', _ne) -#---Enabling Pickle support---------------------------------------------------- +# ---Enabling Pickle support---------------------------------------------------- if gbl.gROOT.GetVersionInt() <= 51800: import libPyROOT gbl.GaudiPython.PyROOTPickle.Initialize(libPyROOT, libPyROOT.ObjectProxy) diff --git a/GaudiPython/src/Lib/CallbackStreamBuf.cpp b/GaudiPython/src/Lib/CallbackStreamBuf.cpp index 2dd1faba54d772e2c80fdf20c6fad7a84ce6a9fb..017a4e314325aa7415bf936fff38f056d30a252d 100644 --- a/GaudiPython/src/Lib/CallbackStreamBuf.cpp +++ b/GaudiPython/src/Lib/CallbackStreamBuf.cpp @@ -37,7 +37,7 @@ GaudiPython::CallbackStreamBuf::CallbackStreamBuf( PyObject* self ) : m_self( se int GaudiPython::CallbackStreamBuf::sync() { size_t length; - char* x; + char* x; for ( length = 0, x = pbase(); x < epptr(); ++x, ++length ) ; // getting in a null terminated buffer the characters diff --git a/GaudiPython/src/Lib/Helpers.cpp b/GaudiPython/src/Lib/Helpers.cpp index 331f91dc8667404796209cf043e0a713dd35a268..4a033ea58cb886df7989ce60cd51b95eca060450 100644 --- a/GaudiPython/src/Lib/Helpers.cpp +++ b/GaudiPython/src/Lib/Helpers.cpp @@ -95,10 +95,10 @@ namespace private: // ======================================================================== /// the property interface - SmartIF<IProperty> m_svc; // the property interface + SmartIF<IProperty> m_svc; // the property interface Gaudi::Property<bool> m_old = {s_NAME, true}; - bool m_enable; - StatusCode m_code = StatusCode::SUCCESS; // status code + bool m_enable; + StatusCode m_code = StatusCode::SUCCESS; // status code // ======================================================================== }; // ========================================================================== diff --git a/GaudiPython/src/Lib/TupleDecorator.cpp b/GaudiPython/src/Lib/TupleDecorator.cpp index d2405febf551823bfb81d836bed9b3edd553b1e8..3fae09ff2a26d8de81e21ffb5a7ad61ea84e56a6 100644 --- a/GaudiPython/src/Lib/TupleDecorator.cpp +++ b/GaudiPython/src/Lib/TupleDecorator.cpp @@ -160,7 +160,7 @@ StatusCode GaudiPython::TupleDecorator::farray( const Tuples::Tuple& tuple, cons } // ============================================================================ StatusCode GaudiPython::TupleDecorator::fmatrix( const Tuples::Tuple& tuple, const std::string& name, - const GaudiPython::Matrix& data, + const GaudiPython::Matrix& data, const Tuples::TupleObj::MIndex cols, // fixed !!! const std::string& length, const size_t maxv ) { @@ -174,7 +174,7 @@ StatusCode GaudiPython::TupleDecorator::fmatrix( const Tuples::Tuple& tuple, con } // ============================================================================ StatusCode GaudiPython::TupleDecorator::fmatrix( const Tuples::Tuple& tuple, const std::string& name, - const GaudiUtils::VectorMap<int, double>& info, + const GaudiUtils::VectorMap<int, double>& info, const std::string& length, const size_t maxv ) { if ( !tuple.valid() ) { @@ -275,7 +275,7 @@ StatusCode GaudiPython::TupleDecorator::array( const Tuples::Tuple& tuple, const } // ============================================================================ StatusCode GaudiPython::TupleDecorator::matrix( const Tuples::Tuple& tuple, const std::string& name, - const GaudiPython::Matrix& data, + const GaudiPython::Matrix& data, const Tuples::TupleObj::MIndex cols ) // fixed !!! { if ( !tuple.valid() ) { @@ -621,7 +621,7 @@ StatusCode GaudiPython::TupleDecorator::matrix( const Tuples::Tuple& tuple, cons } // ============================================================================ StatusCode GaudiPython::TupleDecorator::fmatrix( const Tuples::Tuple& tuple, const std::string& name, - const CLHEP::HepGenMatrix& data, + const CLHEP::HepGenMatrix& data, const Tuples::TupleObj::MIndex cols, // fixed !!! const std::string& length, const size_t maxv ) { diff --git a/GaudiPython/src/Services/PythonScriptingSvc.cpp b/GaudiPython/src/Services/PythonScriptingSvc.cpp index 161f4e143caf4b72dec525cdeb8bb880558a7f86..261dcba51c4704f905adfde962e8b8e64342f15e 100644 --- a/GaudiPython/src/Services/PythonScriptingSvc.cpp +++ b/GaudiPython/src/Services/PythonScriptingSvc.cpp @@ -109,7 +109,7 @@ StatusCode PythonScriptingSvc::run() //---------------------------------------------------------------------------------- { if ( !m_startupScript.empty() ) { - std::ifstream file{m_startupScript}; + std::ifstream file{m_startupScript}; std::stringstream stream; if ( file ) { std::string buffer; diff --git a/GaudiSvc/src/DetectorDataSvc/DetDataSvc.cpp b/GaudiSvc/src/DetectorDataSvc/DetDataSvc.cpp index 52892b36ff410fbcee930a16e03a141519e2d85c..c7f3049bca8a1c2aabcc49dee2cd5c215143898f 100644 --- a/GaudiSvc/src/DetectorDataSvc/DetDataSvc.cpp +++ b/GaudiSvc/src/DetectorDataSvc/DetDataSvc.cpp @@ -16,7 +16,7 @@ using System::getEnv; #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) -#define DEBMSG ON_DEBUG debug() +#define DEBMSG ON_DEBUG debug() #define VERMSG ON_VERBOSE verbose() // Instantiation of a static factory class used by clients to create @@ -83,9 +83,9 @@ StatusCode DetDataSvc::setupDetectorDescription() return StatusCode::FAILURE; } else { // Create address - unsigned long iargs[] = {0, 0}; - const std::string args[] = {m_detDbLocation, m_detDbRootName}; - StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr ); + unsigned long iargs[] = {0, 0}; + const std::string args[] = {m_detDbLocation, m_detDbRootName}; + StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr ); if ( sc.isSuccess() ) { sc = i_setRoot( m_rootName, rootAddr ); if ( sc.isFailure() ) { @@ -152,10 +152,10 @@ StatusCode DetDataSvc::clearStore() if ( m_usePersistency ) { // Create root address - unsigned long iargs[] = {0, 0}; - const std::string args[] = {m_detDbLocation, m_detDbRootName}; - IOpaqueAddress* rootAddr; - StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr ); + unsigned long iargs[] = {0, 0}; + const std::string args[] = {m_detDbLocation, m_detDbRootName}; + IOpaqueAddress* rootAddr; + StatusCode sc = m_addrCreator->createAddress( m_detStorageType, CLID_Catalog, args, iargs, rootAddr ); // Set detector data store root if ( sc.isSuccess() ) { sc = i_setRoot( m_rootName, rootAddr ); diff --git a/GaudiSvc/src/FileMgr/FileMgr.cpp b/GaudiSvc/src/FileMgr/FileMgr.cpp index ac336dff6c38dd0f73ea46c404a400f35708cd45..cbbb03e4258186370e4a784cf23c315dd17f4805 100644 --- a/GaudiSvc/src/FileMgr/FileMgr.cpp +++ b/GaudiSvc/src/FileMgr/FileMgr.cpp @@ -104,7 +104,7 @@ StatusCode FileMgr::initialize() msgSvc()->setOutputLevel( "RootFileHandler", m_outputLevel.value() ); m_rfh.reset( new RootFileHandler( msgSvc(), m_ssl_proxy, m_ssl_cert ) ); - auto rfh = m_rfh.get(); // used in the lambdas to avoid capturing 'this' + auto rfh = m_rfh.get(); // used in the lambdas to avoid capturing 'this' Io::FileHdlr hdlr( Io::ROOT, [rfh]( const std::string& n, const Io::IoFlags& f, const std::string& desc, Io::Fd& fd, void*& ptr ) -> Io::open_t { return rfh->openRootFile( n, f, desc, fd, ptr ); }, @@ -123,7 +123,7 @@ StatusCode FileMgr::initialize() msgSvc()->setOutputLevel( "POSIXFileHandler", m_outputLevel.value() ); m_pfh.reset( new POSIXFileHandler( msgSvc() ) ); - auto pfh = m_pfh.get(); // used in the lambdas to avoid capturing 'this' + auto pfh = m_pfh.get(); // used in the lambdas to avoid capturing 'this' Io::FileHdlr hdlp( Io::POSIX, [pfh]( const std::string& n, const Io::IoFlags& f, const std::string& desc, Io::Fd& fd, void*& ptr ) -> Io::open_t { return pfh->openPOSIXFile( n, f, desc, fd, ptr ); }, @@ -311,7 +311,7 @@ open_t FileMgr::open( const IoTech& tech, const std::string& caller, const std:: verbose() << "open(" << tech << "," << caller << ",\"" << fname << "\",\"" << desc << "\"," << flags << ( shared ? ",shared" : ",unshared" ) << ")" << endmsg; - open_t r = -1; + open_t r = -1; FileHdlr fh; if ( getHandler( tech, fh ).isFailure() ) return r; @@ -645,8 +645,8 @@ reopen_t FileMgr::reopen( Fd fd, const IoFlags& flags, const std::string& caller return r; } - FileAttr* fa = itr->second; - IoTech tech = fa->tech(); + FileAttr* fa = itr->second; + IoTech tech = fa->tech(); FileHdlr fh; @@ -712,8 +712,8 @@ reopen_t FileMgr::reopen( void* vp, const IoFlags& flags, const std::string& cal } FileAttr* fa = itr->second; - FileHdlr fh; - IoTech tech = fa->tech(); + FileHdlr fh; + IoTech tech = fa->tech(); if ( getHandler( tech, fh ).isFailure() ) { return r; @@ -1085,7 +1085,7 @@ StatusCode FileMgr::getHandler( const std::string& fname, Io::FileHdlr& hdlr ) c return StatusCode::FAILURE; } - auto itr = fitr.first; + auto itr = fitr.first; IoTech tech = itr->second->tech(); ++itr; @@ -1140,7 +1140,7 @@ void FileMgr::listActions() const info() << "listing registered actions" << endl; for ( const auto& iit : m_actions ) { - Io::IoTech t = iit.first; + Io::IoTech t = iit.first; const actionMap& m = iit.second; if ( !m.empty() ) { diff --git a/GaudiSvc/src/FileMgr/FileMgr.h b/GaudiSvc/src/FileMgr/FileMgr.h index 033e8571e372e978b4fa5c213764445843b9ebba..7ba59cd333dd8082ff9a50b82f42b0ff33ed4cd4 100644 --- a/GaudiSvc/src/FileMgr/FileMgr.h +++ b/GaudiSvc/src/FileMgr/FileMgr.h @@ -47,12 +47,12 @@ public: StatusCode getHandler( const IoTech&, FileHdlr& ) const override; StatusCode getHandler( const std::string&, FileHdlr& ) const override; - int getFileAttr( const std::string&, std::vector<const FileAttr*>& ) const override; + int getFileAttr( const std::string&, std::vector<const FileAttr*>& ) const override; StatusCode getFileAttr( const Fd, const FileAttr*& ) const override; StatusCode getFileAttr( void*, const FileAttr*& ) const override; - void listHandlers() const override; - void listFiles() const override; + void listHandlers() const override; + void listFiles() const override; virtual void listActions() const; // does not override... virtual void listSuppression() const; // does not override... @@ -108,9 +108,9 @@ public: private: Gaudi::Property<std::string> m_logfile{this, "LogFile"}; - Gaudi::Property<bool> m_printSummary{this, "PrintSummary", false}; - Gaudi::Property<bool> m_loadRootHandler{this, "LoadROOTHandler", true}; - Gaudi::Property<bool> m_loadPosixHandler{this, "LoadPOSIXHandler", true}; + Gaudi::Property<bool> m_printSummary{this, "PrintSummary", false}; + Gaudi::Property<bool> m_loadRootHandler{this, "LoadROOTHandler", true}; + Gaudi::Property<bool> m_loadPosixHandler{this, "LoadPOSIXHandler", true}; Gaudi::Property<std::string> m_ssl_proxy{this, "TSSL_UserProxy", "X509"}; Gaudi::Property<std::string> m_ssl_cert{this, "TSSL_CertDir", "X509"}; @@ -119,7 +119,7 @@ private: const IoFlags&, Fd&, void*&, const bool shared ); // does not override... - typedef std::pair<Io::bfcn_action_t, std::string> bfcn_desc_t; + typedef std::pair<Io::bfcn_action_t, std::string> bfcn_desc_t; typedef std::map<Io::Action, std::list<bfcn_desc_t>> actionMap; StatusCode execAction( Io::FileAttr*, const std::string&, const Io::Action& ) const; StatusCode execActs( Io::FileAttr*, const std::string&, const Io::Action&, const actionMap& m ) const; @@ -131,7 +131,7 @@ private: fileMap m_files; std::map<IoTech, FileHdlr> m_handlers; - std::map<Fd, FileAttr*> m_descriptors; + std::map<Fd, FileAttr*> m_descriptors; std::vector<std::unique_ptr<FileAttr>> m_attr; std::vector<FileAttr*> m_oldFiles; @@ -142,9 +142,9 @@ private: supMap m_supMap; std::string m_lastErrS; - int m_lastErr; + int m_lastErr; - std::unique_ptr<RootFileHandler> m_rfh; + std::unique_ptr<RootFileHandler> m_rfh; std::unique_ptr<POSIXFileHandler> m_pfh; }; diff --git a/GaudiSvc/src/FileMgr/POSIXFileHandler.h b/GaudiSvc/src/FileMgr/POSIXFileHandler.h index 59f1b5695d2f35228e72b3a81e232bd6dd4ebff1..e291085c25084e773ffe6f47147c470c3220b4ea 100644 --- a/GaudiSvc/src/FileMgr/POSIXFileHandler.h +++ b/GaudiSvc/src/FileMgr/POSIXFileHandler.h @@ -28,7 +28,7 @@ public: private: MsgStream m_log; - int m_level; + int m_level; }; #endif diff --git a/GaudiSvc/src/FileMgr/RootFileHandler.h b/GaudiSvc/src/FileMgr/RootFileHandler.h index f3c9e73752bfb12470ea9375f90f7eea71d85598..6f57137acdb3c7ae618e05af86f609a62769afa4 100644 --- a/GaudiSvc/src/FileMgr/RootFileHandler.h +++ b/GaudiSvc/src/FileMgr/RootFileHandler.h @@ -30,10 +30,10 @@ public: private: MsgStream m_log; - int m_level; + int m_level; std::string m_userProxy, m_certDir; - bool m_ssl_setup = false; + bool m_ssl_setup = false; }; #endif diff --git a/GaudiSvc/src/MetaDataSvc/MetaDataSvc.cpp b/GaudiSvc/src/MetaDataSvc/MetaDataSvc.cpp index 695234d3635c904aee047d7070e615b869f43e9b..d9bb09ef8414115fdeb0a33fe6904681a0def3a5 100644 --- a/GaudiSvc/src/MetaDataSvc/MetaDataSvc.cpp +++ b/GaudiSvc/src/MetaDataSvc/MetaDataSvc.cpp @@ -60,7 +60,7 @@ std::map<std::string, std::string> MetaDataSvc::getMetaDataMap() { return m_meta StatusCode MetaDataSvc::collectData() { std::string temp; - bool first{false}; + bool first{false}; auto appMgr = service<IProperty>( "ApplicationMgr" ); if ( appMgr.isValid() ) { @@ -121,9 +121,9 @@ StatusCode MetaDataSvc::collectData() * ALGORITHMS * */ SmartIF<IAlgManager> algMan( serviceLocator() ); - auto allAlgs = algMan->getAlgorithms(); - temp = ""; - first = true; + auto allAlgs = algMan->getAlgorithms(); + temp = ""; + first = true; for ( auto alg : allAlgs ) { if ( !first ) temp += ", "; diff --git a/GaudiSvc/src/NTupleSvc/CollectionCloneAlg.cpp b/GaudiSvc/src/NTupleSvc/CollectionCloneAlg.cpp index 1198337cc8dccc3636781fa1fef7ce1c0ecdc813..b1e5ae375b0e5d83d0fd1e308dbcad74dc3caa1c 100644 --- a/GaudiSvc/src/NTupleSvc/CollectionCloneAlg.cpp +++ b/GaudiSvc/src/NTupleSvc/CollectionCloneAlg.cpp @@ -32,15 +32,15 @@ namespace static StatusCode createItem( MsgStream& log, INTuple* tuple, INTupleItem* src, const TYP& null ) { NTuple::_Data<TYP>* source = dynamic_cast<NTuple::_Data<TYP>*>( src ); - TYP low = source->range().lower(); - TYP high = source->range().upper(); - long hasIdx = source->hasIndex(); - long ndim = source->ndim(); - const std::string& name = source->name(); - std::string idxName; - long dim[4], idxLen = 0; - long dim1 = 1, dim2 = 1; - INTupleItem* it = 0; + TYP low = source->range().lower(); + TYP high = source->range().upper(); + long hasIdx = source->hasIndex(); + long ndim = source->ndim(); + const std::string& name = source->name(); + std::string idxName; + long dim[4], idxLen = 0; + long dim1 = 1, dim2 = 1; + INTupleItem* it = 0; for ( int i = 0; i < ndim; i++ ) dim[i] = source->dim( i ); /// Type information of the item if ( hasIdx ) { @@ -111,7 +111,7 @@ class CollectionCloneAlg : public Algorithm Gaudi::Property<std::string> m_tupleSvc{this, "EvtTupleSvc", "EvtTupleSvc", "name of the data provider service"}; Gaudi::Property<std::vector<std::string>> m_inputs{this, "Input", {}, "input specifications"}; - Gaudi::Property<std::string> m_output{this, "Output", {}, "output specification"}; + Gaudi::Property<std::string> m_output{this, "Output", {}, "output specification"}; /// Reference to data provider service SmartIF<INTupleSvc> m_dataSvc; @@ -192,11 +192,11 @@ public: /// Book the N-tuple according to the specification virtual StatusCode book( const NTuple::Tuple* nt ) { - MsgStream log( msgSvc(), name() ); - const INTuple::ItemContainer& items = nt->items(); - StatusCode status = StatusCode::SUCCESS; + MsgStream log( msgSvc(), name() ); + const INTuple::ItemContainer& items = nt->items(); + StatusCode status = StatusCode::SUCCESS; INTuple::ItemContainer::const_iterator i; - NTuple::Tuple* tuple = m_dataSvc->book( m_outName, nt->clID(), nt->title() ); + NTuple::Tuple* tuple = m_dataSvc->book( m_outName, nt->clID(), nt->title() ); for ( i = items.begin(); i != items.end(); ++i ) { long type = ( *i )->type(); switch ( type ) { @@ -260,8 +260,8 @@ public: MsgStream log( msgSvc(), name() ); if ( 0 != clone && 0 != src ) { const INTuple::ItemContainer& clone_items = clone->items(); - const std::string clone_id = clone->registry()->identifier(); - const std::string src_id = src->registry()->identifier(); + const std::string clone_id = clone->registry()->identifier(); + const std::string src_id = src->registry()->identifier(); INTuple::ItemContainer::const_iterator i; log << MSG::ERROR; @@ -315,10 +315,10 @@ public: NTuplePtr out( m_dataSvc.get(), m_outName ); if ( 0 != out ) { const INTuple::ItemContainer& clone_items = out->items(); - std::vector<GenericAddress> addrVector( clone_items.size() ); - StatusCode status = StatusCode::SUCCESS; - NTuplePtr nt( m_dataSvc.get(), input ); - size_t k = 0, nentry = 0; + std::vector<GenericAddress> addrVector( clone_items.size() ); + StatusCode status = StatusCode::SUCCESS; + NTuplePtr nt( m_dataSvc.get(), input ); + size_t k = 0, nentry = 0; if ( 0 != nt ) { const INTuple::ItemContainer& source_items = nt->items(); for ( k = 0; k < source_items.size(); ++k ) { @@ -334,7 +334,7 @@ public: for ( k = 0, i = source_items.begin(); i != source_items.end(); ++i, ++k ) { const INTupleItem* src_itm = *i; const INTupleItem* out_itm = out->find( src_itm->name() ); - size_t size = 0; + size_t size = 0; switch ( ( *i )->type() ) { case DataTypeInfo::UCHAR: size = sizeof( unsigned char ); @@ -381,7 +381,7 @@ public: size = 0; } break; case DataTypeInfo::OBJECT_ADDR: { - IOpaqueAddress* ppA1 = &addrVector[k]; + IOpaqueAddress* ppA1 = &addrVector[k]; IOpaqueAddress** ppA2 = (IOpaqueAddress**)out_itm->buffer(); *ppA2 = ppA1; size = 0; diff --git a/GaudiSvc/src/NTupleSvc/NTupleSvc.cpp b/GaudiSvc/src/NTupleSvc/NTupleSvc.cpp index 30ad6f30ae4511c930c5b6d182ed5942ca02c968..d0e3ef326ffbc3196a43e6db8189b32853ad27a7 100644 --- a/GaudiSvc/src/NTupleSvc/NTupleSvc.cpp +++ b/GaudiSvc/src/NTupleSvc/NTupleSvc.cpp @@ -72,7 +72,7 @@ StatusCode NTupleSvc::initialize() if ( status.isSuccess() ) { status = setProperties(); if ( status.isSuccess() ) { - StatusCode iret( StatusCode::SUCCESS, true ); + StatusCode iret( StatusCode::SUCCESS, true ); DataObject* root = new NTuple::Directory(); status = setRoot( m_rootName, root ); for ( auto& i : m_output ) { @@ -103,19 +103,19 @@ IConversionSvc* NTupleSvc::getDataLoader( IRegistry* pRegistry ) { if ( !pRegistry ) return nullptr; std::string full = pRegistry->identifier(); - auto len = m_rootName.length(); - auto idx = full.find( SEPARATOR, len + 1 ); + auto len = m_rootName.length(); + auto idx = full.find( SEPARATOR, len + 1 ); std::string path = ( idx == std::string::npos ) ? full : full.substr( 0, idx ); - auto i = m_connections.find( path ); + auto i = m_connections.find( path ); return ( i != m_connections.end() ) ? i->second.service : nullptr; } StatusCode NTupleSvc::updateDirectories() { typedef std::vector<IRegistry*> Leaves; - long need_update = 0; - DataObject* pO = nullptr; - StatusCode iret = findObject( m_rootName, pO ); + long need_update = 0; + DataObject* pO = nullptr; + StatusCode iret = findObject( m_rootName, pO ); // debug() << "in finalize()" << endmsg; if ( iret.isSuccess() ) { Leaves leaves; @@ -132,13 +132,13 @@ StatusCode NTupleSvc::updateDirectories() IConversionSvc* svc = getDataLoader( *d ); if ( !svc ) continue; - StatusCode status; + StatusCode status; DataSelectionAgent agent; - IDataSelector* sel = agent.selectedObjects(); + IDataSelector* sel = agent.selectedObjects(); traverseSubTree( ( *d )->object(), &agent ).ignore(); for ( int i = sel->size() - 1; i >= 0; i-- ) { DataObject* o = ( *sel )[i]; - IRegistry* r = o->registry(); + IRegistry* r = o->registry(); status = svc->updateRep( r->address(), o ); if ( !status.isSuccess() ) { iret = status; @@ -146,7 +146,7 @@ StatusCode NTupleSvc::updateDirectories() } for ( int j = sel->size() - 1; j >= 0; j-- ) { DataObject* o = ( *sel )[j]; - IRegistry* r = o->registry(); + IRegistry* r = o->registry(); status = svc->updateRepRefs( r->address(), o ); if ( !status.isSuccess() ) iret = status; } @@ -210,13 +210,13 @@ StatusCode NTupleSvc::connect( const std::string& ident ) StatusCode NTupleSvc::connect( const std::string& ident, std::string& logname ) { - DataObject* pO = nullptr; - StatusCode status = findObject( m_rootName, pO ); + DataObject* pO = nullptr; + StatusCode status = findObject( m_rootName, pO ); if ( status.isSuccess() ) { - char typ = 0; + char typ = 0; std::vector<Prop> props; - long loc = ident.find( " " ); - std::string filename, auth, svc = "", db_typ = ""; + long loc = ident.find( " " ); + std::string filename, auth, svc = "", db_typ = ""; logname = ident.substr( 0, loc ); using Parser = Gaudi::Utils::AttribStringParser; // we assume that there is always a " " @@ -272,7 +272,7 @@ StatusCode NTupleSvc::connect( const std::string& ident, std::string& logname ) return StatusCode::FAILURE; } -StatusCode NTupleSvc::createService( const std::string& /* nam */, const std::string& typ, +StatusCode NTupleSvc::createService( const std::string& /* nam */, const std::string& typ, const std::vector<Prop>& /* props */, IConversionSvc*& pSvc ) { /// CGL: set the storage type @@ -285,7 +285,7 @@ StatusCode NTupleSvc::createService( const std::string& /* nam */, const std::st } Gaudi::Property<std::string> sp( "HistogramPersistency", "" ); - StatusCode sts = appPropMgr->getProperty( &sp ); + StatusCode sts = appPropMgr->getProperty( &sp ); if ( !sts.isSuccess() ) { error() << "Could not get NTuple Persistency format" << " from ApplicationMgr properties" << endmsg; @@ -310,8 +310,8 @@ StatusCode NTupleSvc::createService( const std::string& /* nam */, const std::st // debug() << "storage type: " << m_storageType << endmsg; // FIXME: (MCl) why NTupleSvc has to directly create a ConversionSvc? - IInterface* iface = new ConversionSvc( name() + "Conversions", serviceLocator(), storage_typ ); - auto pService = SmartIF<IService>( iface ); + IInterface* iface = new ConversionSvc( name() + "Conversions", serviceLocator(), storage_typ ); + auto pService = SmartIF<IService>( iface ); if ( !pService ) return StatusCode::FAILURE; auto cnvSvc = pService.as<IConversionSvc>(); @@ -329,7 +329,7 @@ StatusCode NTupleSvc::createService( const std::string& /* nam */, const std::st StatusCode NTupleSvc::create( const CLID& typ, const std::string& title, NTuple::Tuple*& refpTuple ) { NTuple::TupleImp* pTuple = nullptr; - StatusCode status = StatusCode::FAILURE; + StatusCode status = StatusCode::FAILURE; if ( typ == CLID_ColumnWiseTuple ) { pTuple = new NTuple::ColumnWiseTuple( title ); } else if ( typ == CLID_RowWiseTuple ) { @@ -485,8 +485,8 @@ StatusCode NTupleSvc::attachTuple( const std::string& filename, const std::strin /// Create Ntuple directory and register it with the data store. NTuple::Directory* NTupleSvc::createDirectory( const std::string& fullPath ) { - NTuple::Directory* p = nullptr; - StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &p ) ); + NTuple::Directory* p = nullptr; + StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &p ) ); if ( !status.isSuccess() ) { auto sep2 = fullPath.rfind( SEPARATOR ); if ( sep2 != std::string::npos ) { @@ -524,8 +524,8 @@ NTuple::Tuple* NTupleSvc::access( const std::string&, const std::string& ) { ret /// Save N tuple to disk. Must be called in order to close the ntuple file properly StatusCode NTupleSvc::save( const std::string& fullPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? save( pObj ) : INVALID_OBJ_PATH; } @@ -536,10 +536,10 @@ StatusCode NTupleSvc::save( NTuple::Tuple* n_tuple ) if ( tuple ) { try { IConversionSvc* pSvc = tuple->conversionService(); - IRegistry* pReg = tuple->registry(); + IRegistry* pReg = tuple->registry(); if ( pSvc && pReg ) { - IOpaqueAddress* pAddr = pReg->address(); - StatusCode status = pSvc->updateRep( pAddr, n_tuple ); + IOpaqueAddress* pAddr = pReg->address(); + StatusCode status = pSvc->updateRep( pAddr, n_tuple ); if ( status.isSuccess() ) { status = pSvc->updateRepRefs( pAddr, n_tuple ); } @@ -555,8 +555,8 @@ StatusCode NTupleSvc::save( NTuple::Tuple* n_tuple ) /// Save N tuple to disk. Must be called in order to close the ntuple file properly StatusCode NTupleSvc::save( DataObject* pParent, const std::string& relPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? save( pObj ) : INVALID_OBJ_PATH; } @@ -572,9 +572,9 @@ StatusCode NTupleSvc::writeRecord( NTuple::Tuple* n_tuple ) tuple->setConversionService( pSvc ); } if ( pSvc ) { - IRegistry* pReg = n_tuple->registry(); - IOpaqueAddress* pAddr = pReg->address(); - StatusCode status = pSvc->createRep( n_tuple, pAddr ); + IRegistry* pReg = n_tuple->registry(); + IOpaqueAddress* pAddr = pReg->address(); + StatusCode status = pSvc->createRep( n_tuple, pAddr ); if ( status.isSuccess() ) { pReg->setAddress( pAddr ); status = pSvc->fillRepRefs( pAddr, n_tuple ); @@ -591,24 +591,24 @@ StatusCode NTupleSvc::writeRecord( NTuple::Tuple* n_tuple ) /// Write single record to N tuple. StatusCode NTupleSvc::writeRecord( const std::string& fullPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? writeRecord( pObj ) : INVALID_OBJ_PATH; } /// Write single record to N tuple. StatusCode NTupleSvc::writeRecord( DataObject* pParent, const std::string& relPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? writeRecord( pObj ) : INVALID_OBJ_PATH; } /// Read single record from N tuple. StatusCode NTupleSvc::readRecord( NTuple::Tuple* n_tuple ) { - StatusCode status = INVALID_OBJECT; - NTuple::TupleImp* tuple = (NTuple::TupleImp*)n_tuple; + StatusCode status = INVALID_OBJECT; + NTuple::TupleImp* tuple = (NTuple::TupleImp*)n_tuple; if ( tuple ) { try { IConversionSvc* pSvc = tuple->conversionService(); @@ -617,7 +617,7 @@ StatusCode NTupleSvc::readRecord( NTuple::Tuple* n_tuple ) tuple->setConversionService( pSvc ); } if ( pSvc ) { - IRegistry* pReg = n_tuple->registry(); + IRegistry* pReg = n_tuple->registry(); IOpaqueAddress* pAddr = pReg->address(); status = pSvc->updateObj( pAddr, n_tuple ); if ( status.isSuccess() ) { @@ -636,15 +636,15 @@ StatusCode NTupleSvc::readRecord( NTuple::Tuple* n_tuple ) /// Read single record from N tuple. StatusCode NTupleSvc::readRecord( const std::string& fullPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( fullPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? readRecord( pObj ) : INVALID_OBJ_PATH; } /// Read single record from N tuple. StatusCode NTupleSvc::readRecord( DataObject* pParent, const std::string& relPath ) { - NTuple::Tuple* pObj = nullptr; - StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present + NTuple::Tuple* pObj = nullptr; + StatusCode status = findObject( pParent, relPath, *pp_cast<DataObject>( &pObj ) ); // Check if object is present return status.isSuccess() ? readRecord( pObj ) : INVALID_OBJ_PATH; } diff --git a/GaudiSvc/src/NTupleSvc/NTupleSvc.h b/GaudiSvc/src/NTupleSvc/NTupleSvc.h index 05d73d26c0410ae15b508c8ad080187b6fdd24f4..0a5ac7f78645b7ed1a424a14c8bbd82f3fee0ddc 100644 --- a/GaudiSvc/src/NTupleSvc/NTupleSvc.h +++ b/GaudiSvc/src/NTupleSvc/NTupleSvc.h @@ -29,7 +29,7 @@ protected: Connection( const Connection& c ) : service( c.service ) {} }; typedef std::vector<std::string> DBaseEntries; - typedef std::map<std::string, Connection> Connections; + typedef std::map<std::string, Connection> Connections; typedef std::pair<std::string, std::string> Prop; public: diff --git a/GaudiSvc/src/NTupleSvc/TagCollectionSvc.cpp b/GaudiSvc/src/NTupleSvc/TagCollectionSvc.cpp index adaac5396ff2c6cc5315862d8522375f0d0714ff..56fb0f2392763b334a1620d5db783d9ab338f341 100644 --- a/GaudiSvc/src/NTupleSvc/TagCollectionSvc.cpp +++ b/GaudiSvc/src/NTupleSvc/TagCollectionSvc.cpp @@ -48,15 +48,15 @@ TagCollectionSvc::TagCollectionSvc( const std::string& name, ISvcLocator* svc ) /// Add file to list I/O list StatusCode TagCollectionSvc::connect( const std::string& ident, std::string& logname ) { - DataObject* pO = nullptr; - StatusCode status = findObject( m_rootName, pO ); + DataObject* pO = nullptr; + StatusCode status = findObject( m_rootName, pO ); if ( status.isSuccess() ) { status = INVALID_ROOT; if ( pO->registry() ) { - char typ = 0; + char typ = 0; std::vector<Prop> props; - long loc = ident.find( " " ); - std::string filename, svc = "DbCnvSvc"; + long loc = ident.find( " " ); + std::string filename, svc = "DbCnvSvc"; logname = ident.substr( 0, loc ); using Parser = Gaudi::Utils::AttribStringParser; // we assume that there is always a " " diff --git a/GaudiSvc/src/RndmGenSvc/HepRndmBaseEngine.h b/GaudiSvc/src/RndmGenSvc/HepRndmBaseEngine.h index 2ae23519a3f4d667ed643e0467bfc5fb5d3feef6..2fa85feb7772d890b79cedb350ec653ec21ce538 100644 --- a/GaudiSvc/src/RndmGenSvc/HepRndmBaseEngine.h +++ b/GaudiSvc/src/RndmGenSvc/HepRndmBaseEngine.h @@ -36,7 +36,7 @@ namespace HepRndm public: BaseEngine( const std::string& name, ISvcLocator* loc ) : RndmEngine( name, loc ) {} ~BaseEngine() override = default; - CLHEP::HepRandomEngine* hepEngine() { return m_hepEngine.get(); } + CLHEP::HepRandomEngine* hepEngine() { return m_hepEngine.get(); } const CLHEP::HepRandomEngine* hepEngine() const { return m_hepEngine.get(); } // Retrieve single random number double rndm() const override { return m_hepEngine->flat(); } @@ -49,8 +49,8 @@ namespace HepRndm } protected: - void initEngine() { m_hepEngine = createEngine(); } - virtual std::unique_ptr<CLHEP::HepRandomEngine> createEngine() = 0; + void initEngine() { m_hepEngine = createEngine(); } + virtual std::unique_ptr<CLHEP::HepRandomEngine> createEngine() = 0; }; } #endif // HEPRNDM_HEPRNDMBASEENGINE_H diff --git a/GaudiSvc/src/RndmGenSvc/HepRndmEngine.h b/GaudiSvc/src/RndmGenSvc/HepRndmEngine.h index 3400a402ddb986854c7c388d01825cf2e804c022..3216ba4a994eed85d97ea344a65877fd4f540fdb 100644 --- a/GaudiSvc/src/RndmGenSvc/HepRndmEngine.h +++ b/GaudiSvc/src/RndmGenSvc/HepRndmEngine.h @@ -28,9 +28,9 @@ namespace HepRndm protected: mutable Gaudi::Property<std::vector<long>> m_seeds{this, "Seeds", {}, "seed table"}; - Gaudi::Property<int> m_col{this, "Column", 0}; - Gaudi::Property<int> m_row{this, "Row", 1}; - Gaudi::Property<int> m_lux{this, "Luxury", 3}; + Gaudi::Property<int> m_col{this, "Column", 0}; + Gaudi::Property<int> m_row{this, "Row", 1}; + Gaudi::Property<int> m_lux{this, "Luxury", 3}; Gaudi::Property<bool> m_useTable{this, "UseTable", false}; Gaudi::Property<bool> m_setSingleton{this, "SetSingleton", false}; diff --git a/GaudiSvc/src/RndmGenSvc/HepRndmGenerator.h b/GaudiSvc/src/RndmGenSvc/HepRndmGenerator.h index 662985e7595de76def922058d1d9f28d3e107206..38045df7bf65daf8c18ed6ba98c6d504c8462197 100644 --- a/GaudiSvc/src/RndmGenSvc/HepRndmGenerator.h +++ b/GaudiSvc/src/RndmGenSvc/HepRndmGenerator.h @@ -32,7 +32,7 @@ namespace HepRndm protected: CLHEP::HepRandomEngine* m_hepEngine = nullptr; - TYPE* m_specs = nullptr; + TYPE* m_specs = nullptr; public: Generator( IInterface* engine ) : RndmGen( engine ) {} diff --git a/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp b/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp index eb88d8f46689e46003f97ee0748d471a269cbf4f..43525284e61db4636847f54f094e5942f4b6f85e 100644 --- a/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp +++ b/GaudiSvc/src/RndmGenSvc/HepRndmGenerators.cpp @@ -266,7 +266,7 @@ namespace HepRndm double sigma = m_specs->sigma(); double x = RandFlat::shoot( m_hepEngine, 0., 1. ); double u = 1000.0 * x; - long i = long( u ); + long i = long( u ); double ranlan, v; u -= i; if ( i >= 70 && i < 800 ) { @@ -300,7 +300,7 @@ namespace HepRndm { protected: std::unique_ptr<RandGeneral> m_generator; - HepRandomEngine* m_hepEngine = nullptr; + HepRandomEngine* m_hepEngine = nullptr; public: /// Standard Constructor diff --git a/GaudiSvc/src/RndmGenSvc/RndmGenSvc.cpp b/GaudiSvc/src/RndmGenSvc/RndmGenSvc.cpp index 5da20235aabeda10eb0bc9031da8d61f4802f93b..4227a0288827b9ebdb63906dfdeb76aaf2801a89 100644 --- a/GaudiSvc/src/RndmGenSvc/RndmGenSvc.cpp +++ b/GaudiSvc/src/RndmGenSvc/RndmGenSvc.cpp @@ -41,9 +41,9 @@ StatusCode RndmGenSvc::initialize() status = setProperties(); if ( status.isSuccess() ) { // Check if the Engine service exists: // FIXME: (MCl) why RndmGenSvc cannot create the engine service in a standard way? - const bool CREATE = false; + const bool CREATE = false; std::string machName = name() + ".Engine"; - auto engine = serviceLocator()->service<IRndmEngine>( machName, CREATE ); + auto engine = serviceLocator()->service<IRndmEngine>( machName, CREATE ); if ( !engine && mgr ) { using Gaudi::Utils::TypeNameString; engine = mgr->createService( TypeNameString( machName, m_engineName ) ); diff --git a/GaudiSvc/src/THistSvc/THistSvc.cpp b/GaudiSvc/src/THistSvc/THistSvc.cpp index 9fa9dd0cb27b48b723d0ffc7c77a02487d358f3b..b37bc464be8321d3d458bcc641d1b5a7a2d5bd6a 100644 --- a/GaudiSvc/src/THistSvc/THistSvc.cpp +++ b/GaudiSvc/src/THistSvc/THistSvc.cpp @@ -159,7 +159,7 @@ StatusCode THistSvc::initialize() bool all_good = true; // register input/output files... for ( const auto& reg : m_files ) { - const std::string& fname = reg.second.first->GetName(); + const std::string& fname = reg.second.first->GetName(); const IIoComponentMgr::IoMode::Type iomode = ( reg.second.second == THistSvc::READ ? IIoComponentMgr::IoMode::READ : IIoComponentMgr::IoMode::WRITE ); if ( !iomgr->io_register( this, iomode, fname ).isSuccess() ) { @@ -292,7 +292,7 @@ StatusCode THistSvc::finalize() // Merge File void* vf = nullptr; - int r = p_fileMgr->open( Io::ROOT, name(), m_sharedFiles[itr.first], Io::WRITE | Io::APPEND, vf, "HIST" ); + int r = p_fileMgr->open( Io::ROOT, name(), m_sharedFiles[itr.first], Io::WRITE | Io::APPEND, vf, "HIST" ); if ( r ) { error() << "unable to open Final Output File: \"" << m_sharedFiles[itr.first] << "\" for merging" << endmsg; @@ -898,7 +898,7 @@ StatusCode THistSvc::regGraph( const std::string& id, TGraph* hist ) { if ( strcmp( hist->GetName(), "Graph" ) == 0 ) { - std::string id2( id ); + std::string id2( id ); string::size_type i = id2.rfind( "/" ); if ( i != string::npos ) { id2.erase( 0, i + 1 ); @@ -1120,8 +1120,8 @@ void THistSvc::updateFiles() if ( msgLevel( MSG::VERBOSE ) ) verbose() << " update: " << uitr->first << " " << uitr->second.id << " " << uitr->second.mode << endmsg; #endif - TObject* to = uitr->second.obj; - TFile* oldFile = uitr->second.file; + TObject* to = uitr->second.obj; + TFile* oldFile = uitr->second.file; if ( !to ) { warning() << uitr->first << ": TObject == 0" << endmsg; } else if ( uitr->second.temp || uitr->second.mode == READ ) { @@ -1138,7 +1138,7 @@ void THistSvc::updateFiles() if ( oldFile != newFile ) { std::string newFileName = newFile->GetName(); std::string oldFileName, streamName, rem; - TFile* dummy = nullptr; + TFile* dummy = nullptr; findStream( uitr->second.id, streamName, rem, dummy ); for ( auto& itr : m_files ) { @@ -1217,13 +1217,13 @@ StatusCode THistSvc::write() StatusCode THistSvc::connect( const std::string& ident ) { - auto loc = ident.find( " " ); + auto loc = ident.find( " " ); string stream = ident.substr( 0, loc ); - char typ( 0 ); + char typ( 0 ); typedef std::pair<std::string, std::string> Prop; std::vector<Prop> props; - string filename, db_typ( "ROOT" ); - int cl( 1 ); + string filename, db_typ( "ROOT" ); + int cl( 1 ); if ( loc != string::npos ) { using Parser = Gaudi::Utils::AttribStringParser; @@ -1320,8 +1320,8 @@ StatusCode THistSvc::connect( const std::string& ident ) return StatusCode::FAILURE; } - void* vf = nullptr; - TFile* f = nullptr; + void* vf = nullptr; + TFile* f = nullptr; if ( newMode == THistSvc::READ ) { // old file @@ -1366,9 +1366,9 @@ StatusCode THistSvc::connect( const std::string& ident ) // For SHARE files, all data will be stored in a temp file and will be merged into the target file // in write() when finalize(), this help to solve some confliction. e.g. with storegate - static int ishared = 0; - string realfilename = filename; - filename = "tmp_THistSvc_" + std::to_string( ishared++ ) + ".root"; + static int ishared = 0; + string realfilename = filename; + filename = "tmp_THistSvc_" + std::to_string( ishared++ ) + ".root"; if ( msgLevel( MSG::DEBUG ) ) debug() << "Creating temp file \"" << filename << "\" and realfilename=" << realfilename << endmsg; @@ -1494,8 +1494,8 @@ void THistSvc::MergeRootFile( TDirectory* target, TDirectory* source ) // loop over all keys in this directory TList* lkeys = current_sourcedir->GetListOfKeys(); - int nkeys = lkeys->GetEntries(); - TKey* key; + int nkeys = lkeys->GetEntries(); + TKey* key; for ( int jj = 0; jj < nkeys; jj++ ) { key = (TKey*)lkeys->At( jj ); string pathnameinsource = current_sourcedir->GetPath() + string( "/" ) + key->GetName(); @@ -1518,8 +1518,8 @@ void THistSvc::MergeRootFile( TDirectory* target, TDirectory* source ) } else if ( obj->IsA()->InheritsFrom( "TTree" ) ) { if ( msgLevel( MSG::DEBUG ) ) debug() << "Found TTree " << obj->GetName() << endmsg; - TTree* mytree = dynamic_cast<TTree*>( obj ); - int nentries = (int)mytree->GetEntries(); + TTree* mytree = dynamic_cast<TTree*>( obj ); + int nentries = (int)mytree->GetEntries(); mytree->SetBranchStatus( "*", 1 ); if ( msgLevel( MSG::DEBUG ) ) debug() << "Dumping TTree " << nentries << " entries" << endmsg; @@ -1620,11 +1620,11 @@ void THistSvc::copyFileLayout( TDirectory* dst, TDirectory* src ) // loop over all keys in this directory TList* key_list = cur_src_dir->GetListOfKeys(); - int n = key_list->GetEntries(); + int n = key_list->GetEntries(); for ( int j = 0; j < n; ++j ) { - TKey* k = (TKey*)key_list->At( j ); + TKey* k = (TKey*)key_list->At( j ); const std::string src_pathname = cur_src_dir->GetPath() + std::string( "/" ) + k->GetName(); - TObject* o = src->Get( src_pathname.c_str() ); + TObject* o = src->Get( src_pathname.c_str() ); if ( o && o->IsA()->InheritsFrom( "TDirectory" ) ) { if ( msgLevel( MSG::VERBOSE ) ) verbose() << " subdir [" << o->GetName() << "]..." << endmsg; @@ -1660,7 +1660,7 @@ StatusCode THistSvc::io_reinit() gErrorIgnoreLevel = kFatal; for ( auto& ifile : m_files ) { - TFile* f = ifile.second.first; + TFile* f = ifile.second.first; std::string fname = f->GetName(); if ( msgLevel( MSG::DEBUG ) ) debug() << "file [" << fname << "] mode: [" << f->GetOption() << "] r:" << f->GetFileBytesRead() @@ -1681,9 +1681,9 @@ StatusCode THistSvc::io_reinit() // create a new TFile // TFile *newfile = TFile::Open (fname.c_str(), f->GetOption()); - void* vf; + void* vf; Option_t* opts = f->GetOption(); - int r = p_fileMgr->open( Io::ROOT, name(), fname, Io::WRITE, vf, "HIST" ); + int r = p_fileMgr->open( Io::ROOT, name(), fname, Io::WRITE, vf, "HIST" ); if ( r != 0 ) { error() << "unable to open file \"" << fname << "\" for writing" << endmsg; return StatusCode::FAILURE; @@ -1705,7 +1705,7 @@ StatusCode THistSvc::io_reinit() hid.file = newfile; // side-effect: create needed directories... TDirectory* newdir = this->changeDir( hid ); - TClass* cl = hid.obj->IsA(); + TClass* cl = hid.obj->IsA(); // migrate the objects to the new file. // thanks to the object model of ROOT, it is super easy. diff --git a/GaudiSvc/src/THistSvc/THistSvc.h b/GaudiSvc/src/THistSvc/THistSvc.h index fc6c779408ddde5b8a76ca37150f74bdef4e85f6..5d483019421dcb7cfc95d8d4f1dce035803fb19c 100644 --- a/GaudiSvc/src/THistSvc/THistSvc.h +++ b/GaudiSvc/src/THistSvc/THistSvc.h @@ -87,18 +87,18 @@ private: private: TDirectory* m_gd; - TFile* m_gf; - int m_ge; + TFile* m_gf; + int m_ge; }; enum Mode { READ, WRITE, UPDATE, APPEND, SHARE, INVALID }; struct THistID { std::string id; - bool temp; - TObject* obj; - TFile* file; - Mode mode; + bool temp; + TObject* obj; + TFile* file; + Mode mode; THistID() : id( "" ), temp( true ), obj( 0 ), file( 0 ), mode( INVALID ) {} THistID( const THistID& rhs ) : id( rhs.id ), temp( rhs.temp ), obj( rhs.obj ), file( rhs.file ), mode( rhs.mode ) @@ -127,9 +127,9 @@ private: StatusCode readHist( const std::string& name, TH3*& ) const; StatusCode readTree( const std::string& name, TTree*& ) const; - void updateFiles(); - StatusCode write(); - StatusCode connect( const std::string& ); + void updateFiles(); + StatusCode write(); + StatusCode connect( const std::string& ); TDirectory* changeDir( const THistSvc::THistID& hid ) const; std::string dirname( std::string& dir ) const; void removeDoubleSlash( std::string& ) const; @@ -151,12 +151,12 @@ private: void MergeRootFile( TDirectory* target, TDirectory* source ); - Gaudi::Property<int> m_autoSave{this, "AutoSave", 0}; - Gaudi::Property<int> m_autoFlush{this, "AutoFlush", 0}; + Gaudi::Property<int> m_autoSave{this, "AutoSave", 0}; + Gaudi::Property<int> m_autoFlush{this, "AutoFlush", 0}; Gaudi::Property<bool> m_print{this, "PrintAll", false}; - Gaudi::Property<int> m_maxFileSize{this, "MaxFileSize", 10240, + Gaudi::Property<int> m_maxFileSize{this, "MaxFileSize", 10240, "maximum file size in MB. if exceeded, will cause an abort. -1 to never check."}; - Gaudi::Property<int> m_compressionLevel{this, "CompressionLevel", 1}; + Gaudi::Property<int> m_compressionLevel{this, "CompressionLevel", 1}; Gaudi::Property<std::vector<std::string>> m_outputfile{this, "Output", {}}; Gaudi::Property<std::vector<std::string>> m_inputfile{this, "Input", {}}; @@ -170,13 +170,13 @@ private: /// registered by the setupOutputFile callback method std::set<std::string> m_alreadyConnectedOutFiles; - typedef std::map<std::string, THistID> uidMap; - typedef std::multimap<std::string, THistID> idMap; - typedef std::map<TObject*, THistID> objMap; + typedef std::map<std::string, THistID> uidMap; + typedef std::multimap<std::string, THistID> idMap; + typedef std::map<TObject*, THistID> objMap; typedef std::multimap<std::string, std::string> streamMap; uidMap m_uids; - idMap m_ids; + idMap m_ids; objMap m_tobjs; std::map<std::string, std::pair<TFile*, Mode>> m_files; // stream->file @@ -189,8 +189,8 @@ private: mutable std::string m_curstream; - IIncidentSvc* p_incSvc = nullptr; - IFileMgr* p_fileMgr = nullptr; + IIncidentSvc* p_incSvc = nullptr; + IFileMgr* p_fileMgr = nullptr; StatusCode rootOpenAction( FILEMGR_CALLBACK_ARGS ); StatusCode rootOpenErrAction( FILEMGR_CALLBACK_ARGS ); diff --git a/GaudiSvc/tests/src/component/CounterTestAlg.cpp b/GaudiSvc/tests/src/component/CounterTestAlg.cpp index 3d3780164fd6367740c7597bc88b98037c7593a4..b7280993c74733885aed3ac543a7400e5662ce91 100644 --- a/GaudiSvc/tests/src/component/CounterTestAlg.cpp +++ b/GaudiSvc/tests/src/component/CounterTestAlg.cpp @@ -25,7 +25,7 @@ namespace GaudiSvcTest { ICounterSvc::Counter* m_evtCount; ICounterSvc::Counter* m_total; - ICounterSvc* m_cntSvc; + ICounterSvc* m_cntSvc; public: /// Constructor: A constructor of this form must be provided. diff --git a/GaudiUtils/GaudiUtils/HistoStats.h b/GaudiUtils/GaudiUtils/HistoStats.h index f8eccfed0d93e8c15a7972a6b45b8dd916352968..78753d9d3010461169ec9767bd8d3b573f554f83 100644 --- a/GaudiUtils/GaudiUtils/HistoStats.h +++ b/GaudiUtils/GaudiUtils/HistoStats.h @@ -134,8 +134,8 @@ namespace Gaudi * @param number of entries */ static long nEntries( const AIDA::IHistogram1D* histo, - const int imin, // minimal bin number (included) - const int imax ); // maximal bin number (not included) + const int imin, // minimal bin number (included) + const int imax ); // maximal bin number (not included) // ====================================================================== /** get the fraction of entries in histogram up to * the certain bin (not-included) diff --git a/GaudiUtils/GaudiUtils/IFileCatalog.h b/GaudiUtils/GaudiUtils/IFileCatalog.h index bed3a715e3c9bc4e4872141a36278bc6f2641f06..f5606dde32b4118c72004a3471a9bbc4a61b6b65 100644 --- a/GaudiUtils/GaudiUtils/IFileCatalog.h +++ b/GaudiUtils/GaudiUtils/IFileCatalog.h @@ -35,8 +35,8 @@ namespace Gaudi /// Public type definitions typedef std::pair<std::string, std::string> NamedItem; - typedef std::vector<NamedItem> Attributes; - typedef std::vector<NamedItem> Files; + typedef std::vector<NamedItem> Attributes; + typedef std::vector<NamedItem> Files; typedef std::vector<std::string> Strings; /** Catalog interface */ diff --git a/GaudiUtils/GaudiUtils/IIODataManager.h b/GaudiUtils/GaudiUtils/IIODataManager.h index 53040d4cd84280300e342dd5bbc5b20d7b935f63..cad6e5b2ae1ca35601d2e8c1426d937573f29e81 100644 --- a/GaudiUtils/GaudiUtils/IIODataManager.h +++ b/GaudiUtils/GaudiUtils/IIODataManager.h @@ -94,9 +94,9 @@ namespace Gaudi DeclareInterfaceID( IIODataManager, 2, 0 ); /// Connection type definition - typedef IDataConnection Connection; + typedef IDataConnection Connection; typedef std::vector<Connection*> Connections; - typedef Connection::IoType IoType; + typedef Connection::IoType IoType; enum FileType { UNKNOWN = 1, PFN, LFN, FID }; /// Open data stream in read mode diff --git a/GaudiUtils/src/Lib/H1.h b/GaudiUtils/src/Lib/H1.h index bebb61962b3b723a848cb50a63ba3d07f125d64e..fedf2f31f2e3bf572f951cafd6b1d980e17f9a3e 100644 --- a/GaudiUtils/src/Lib/H1.h +++ b/GaudiUtils/src/Lib/H1.h @@ -44,12 +44,12 @@ namespace return *this; } // - bool ok() const { return edges.empty() ? low < high && 0 < nbins : 2 < edges.size(); } + bool ok() const { return edges.empty() ? low < high && 0 < nbins : 2 < edges.size(); } unsigned int nBins() const { return edges.empty() ? nbins : edges.size() - 1; } // - double low; - double high; - unsigned int nbins; + double low; + double high; + unsigned int nbins; std::vector<double> edges; }; // ========================================================================== @@ -123,8 +123,8 @@ namespace // std::string m_name; std::string m_title; - Edges m_edges; - Bins m_bins; + Edges m_edges; + Bins m_bins; }; // ========================================================================== /** @struct H2 @@ -186,9 +186,9 @@ namespace // std::string m_name; std::string m_title; - Edges m_xedges; - Edges m_yedges; - Bins m_bins; + Edges m_xedges; + Edges m_yedges; + Bins m_bins; }; // ========================================================================== } // end of anonymous namespace diff --git a/GaudiUtils/src/Lib/Histo2String.cpp b/GaudiUtils/src/Lib/Histo2String.cpp index ce2f183b340dd7c19d088faac574a104d06aff0d..cfe7a6b032aebef7aae4499893ede359dc44153e 100644 --- a/GaudiUtils/src/Lib/Histo2String.cpp +++ b/GaudiUtils/src/Lib/Histo2String.cpp @@ -46,13 +46,13 @@ namespace stream << "'title' : "; Gaudi::Utils::toStream( std::string( histo.GetTitle() ), stream ) << " , "; // - const TAxis* axis = histo.GetXaxis(); + const TAxis* axis = histo.GetXaxis(); const unsigned int nBins = axis->GetNbins(); // stream << std::endl << "'X' : { "; if ( axis->IsVariableBinSize() ) { - const TArrayD* xbins = axis->GetXbins(); - const unsigned int xsize = xbins->GetSize(); + const TArrayD* xbins = axis->GetXbins(); + const unsigned int xsize = xbins->GetSize(); std::vector<double> edges; for ( unsigned int iBin = 0; iBin < xsize; ++iBin ) { edges.push_back( xbins->At( iBin ) ); @@ -95,12 +95,12 @@ namespace Gaudi::Utils::toStream( std::string( histo.GetTitle() ), stream ) << " , "; // const TAxis* xaxis = histo.GetXaxis(); - const int xBins = xaxis->GetNbins(); + const int xBins = xaxis->GetNbins(); // stream << std::endl << "'X' : { "; if ( xaxis->IsVariableBinSize() ) { - const TArrayD* xbins = xaxis->GetXbins(); - const unsigned int xsize = xbins->GetSize(); + const TArrayD* xbins = xaxis->GetXbins(); + const unsigned int xsize = xbins->GetSize(); std::vector<double> edges; for ( unsigned int iBin = 0; iBin < xsize; ++iBin ) { edges.push_back( xbins->At( iBin ) ); @@ -118,12 +118,12 @@ namespace } // const TAxis* yaxis = histo.GetYaxis(); - const int yBins = yaxis->GetNbins(); + const int yBins = yaxis->GetNbins(); // stream << std::endl << "'Y' : { "; if ( yaxis->IsVariableBinSize() ) { - const TArrayD* ybins = yaxis->GetXbins(); - const unsigned int ysize = ybins->GetSize(); + const TArrayD* ybins = yaxis->GetXbins(); + const unsigned int ysize = ybins->GetSize(); std::vector<double> edges; for ( unsigned int iBin = 0; iBin < ysize; ++iBin ) { edges.push_back( ybins->At( iBin ) ); diff --git a/GaudiUtils/src/Lib/HistoDump.cpp b/GaudiUtils/src/Lib/HistoDump.cpp index ee68e3e55d11695fa39470719094938e997bf4f4..4ee58e54a4ed6591d4ca849cd18520735d651289 100644 --- a/GaudiUtils/src/Lib/HistoDump.cpp +++ b/GaudiUtils/src/Lib/HistoDump.cpp @@ -212,8 +212,8 @@ namespace return StatusCode::FAILURE; } // RETURN // - const AIDA::IAxis& axis = aida->axis(); - const int nbins = axis.bins(); + const AIDA::IAxis& axis = aida->axis(); + const int nbins = axis.bins(); // // underflow bin hist.under = Histo::Bin( aida->binHeight( AIDA::IAxis::UNDERFLOW_BIN ), @@ -245,8 +245,8 @@ namespace return StatusCode::FAILURE; } // RETURN // - const AIDA::IAxis& axis = aida->axis(); - const int nbins = axis.bins(); + const AIDA::IAxis& axis = aida->axis(); + const int nbins = axis.bins(); // // underflow bin hist.under = @@ -352,7 +352,7 @@ namespace std::pair<double, int> r = decompose( v ); // const double f = std::ceil( 20 * r.first ) / 2; // + 1 ; - const int l = r.second - 1; + const int l = r.second - 1; return 0 < l ? f * _pow( 10, l ) : f / _pow( 10, -l ); } // ========================================================================== @@ -371,7 +371,7 @@ namespace // decompose the double value into decimal significand and mantissa std::pair<double, int> r = decompose( v ); const double f = std::floor( 20 * r.first ) / 2; // - 1 ; - const int l = r.second - 1; + const int l = r.second - 1; return 0 < l ? f * _pow( 10, l ) : f / _pow( 10, -l ); } // ========================================================================== @@ -595,7 +595,7 @@ namespace } // for ( auto ibin = histo.bins.cbegin(); histo.bins.cend() != ibin; ++ibin ) { - int ib = ibin - histo.bins.cbegin(); + int ib = ibin - histo.bins.cbegin(); const bool xlab = ( iNull == ib % xSkip ); if ( xlab && yLine < xlabels[ib].size() ) { line += xlabels[ib][yLine]; @@ -643,7 +643,7 @@ std::ostream& Gaudi::Utils::Histos::histoDump_( const AIDA::IHistogram1D* histo, if ( !histo ) { return stream; } // RETURN - Histo hist; + Histo hist; StatusCode sc = _getHisto( histo, hist ); if ( sc.isFailure() ) { return stream; @@ -726,7 +726,7 @@ std::ostream& Gaudi::Utils::Histos::histoDump_( const AIDA::IProfile1D* histo, s if ( !histo ) { return stream; } // RETURN - Histo hist; + Histo hist; StatusCode sc = _getHisto( histo, hist, spread ); if ( sc.isFailure() ) { return stream; @@ -804,7 +804,7 @@ std::ostream& Gaudi::Utils::Histos::histoDump_( const TH1* histo, std::ostream& if ( !histo ) { return stream; } // RETURN - Histo hist; + Histo hist; StatusCode sc = _getHisto( histo, hist ); if ( sc.isFailure() ) { return stream; @@ -849,7 +849,7 @@ std::ostream& Gaudi::Utils::Histos::histoDump_( const TProfile* histo, std::ostr if ( !histo ) { return stream; } // RETURN - Histo hist; + Histo hist; StatusCode sc = _getHisto( histo, hist, true ); if ( sc.isFailure() ) { return stream; diff --git a/GaudiUtils/src/Lib/HistoParsers.cpp b/GaudiUtils/src/Lib/HistoParsers.cpp index 48f5d89d1158ae176f0e4ccd5d1a46ce0af40aa3..7a005341250ddeff99916eeda811f32160597847 100644 --- a/GaudiUtils/src/Lib/HistoParsers.cpp +++ b/GaudiUtils/src/Lib/HistoParsers.cpp @@ -71,11 +71,11 @@ namespace Gaudi result = begin[qi::_a = qi::_1] >> inner[qi::_val = qi::_1] >> end( qi::_a ); } VectorGrammar<Iterator, std::vector<double>, Skipper> edges; - RealGrammar<Iterator, double, Skipper> low, high; - IntGrammar<Iterator, unsigned int, Skipper> nbins; + RealGrammar<Iterator, double, Skipper> low, high; + IntGrammar<Iterator, unsigned int, Skipper> nbins; qi::rule<Iterator, Edges(), qi::locals<char>, Skipper> result; qi::rule<Iterator, Edges(), Skipper> inner, inner_pairs; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; // ====================================================================== }; @@ -110,14 +110,14 @@ namespace Gaudi } StringGrammar<Iterator, Skipper> name, title; - EdgeGrammar<Iterator, Skipper> edges; - RealGrammar<Iterator, double, Skipper> low, high; + EdgeGrammar<Iterator, Skipper> edges; + RealGrammar<Iterator, double, Skipper> low, high; IntGrammar<Iterator, unsigned int, Skipper> nbins; VectorGrammar<Iterator, std::vector<std::pair<double, double>>, Skipper> bins; - qi::rule<Iterator, H1(), qi::locals<char>, Skipper> result; + qi::rule<Iterator, H1(), qi::locals<char>, Skipper> result; qi::rule<Iterator, H1(), Skipper> inner; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; }; REGISTER_GRAMMAR( H1, H1Grammar ); @@ -148,11 +148,11 @@ namespace Gaudi } StringGrammar<Iterator, Skipper> name, title; - EdgeGrammar<Iterator, Skipper> edges; + EdgeGrammar<Iterator, Skipper> edges; VectorGrammar<Iterator, std::vector<std::pair<double, double>>, Skipper> bins; - qi::rule<Iterator, H2(), qi::locals<char>, Skipper> result; + qi::rule<Iterator, H2(), qi::locals<char>, Skipper> result; qi::rule<Iterator, H2(), Skipper> inner; - qi::rule<Iterator, char()> begin; + qi::rule<Iterator, char()> begin; qi::rule<Iterator, void( char )> end; // ====================================================================== @@ -196,7 +196,7 @@ namespace // ========================================================================== // 1) parse the custom format // - H1 h1; + H1 h1; StatusCode sc = _parse( h1, input ); if ( sc.isFailure() || !h1.ok() ) { return H1P(); @@ -234,7 +234,7 @@ namespace typedef std::unique_ptr<HISTO2> H2P; // 1) parse the custom format // - H2 h2; + H2 h2; StatusCode sc = _parse( h2, input ); if ( sc.isFailure() || !h2.ok() ) { return H2P(); @@ -277,7 +277,7 @@ namespace h2.m_yedges.nBins(), // #bins &h2.m_yedges.edges.front() ) ); // vector of edges - int ibin = 0; + int ibin = 0; const int xBins = h2.m_xedges.nBins(); const int yBins = h2.m_yedges.nBins(); @@ -354,7 +354,7 @@ StatusCode Gaudi::Parsers::parse( TH2D& result, const std::string& input ) { // 1) check the parsing std::string name; - auto h2 = _parse_2D<TH2D>( input, name ); + auto h2 = _parse_2D<TH2D>( input, name ); if ( h2 ) { result.Reset(); h2->Copy( result ); // ASSIGN @@ -377,7 +377,7 @@ StatusCode Gaudi::Parsers::parse( TH2F& result, const std::string& input ) { // 1) check the parsing std::string name; - auto h2 = _parse_2D<TH2F>( input, name ); + auto h2 = _parse_2D<TH2F>( input, name ); if ( h2 ) { result.Reset(); h2->Copy( result ); // ASSIGN @@ -407,7 +407,7 @@ StatusCode Gaudi::Parsers::parse( TH1D*& result, const std::string& input ) // 1) check the parsing std::string name; - auto h1 = _parse_1D<TH1D>( input, name ); + auto h1 = _parse_1D<TH1D>( input, name ); if ( h1 ) { result = h1.release(); result->SetName( name.c_str() ); @@ -433,7 +433,7 @@ StatusCode Gaudi::Parsers::parse( TH2D*& result, const std::string& input ) // 1) check the parsing std::string name; - auto h2 = _parse_2D<TH2D>( input, name ); + auto h2 = _parse_2D<TH2D>( input, name ); if ( h2 ) { result = h2.release(); result->SetName( name.c_str() ); diff --git a/GaudiUtils/src/Lib/HistoStats.cpp b/GaudiUtils/src/Lib/HistoStats.cpp index e8cde2f7026c4ffcc83ad3b1b790bc0ad7810142..12c1af77e57c098165726a069d5c441b1c7b4ee5 100644 --- a/GaudiUtils/src/Lib/HistoStats.cpp +++ b/GaudiUtils/src/Lib/HistoStats.cpp @@ -69,13 +69,13 @@ double Gaudi::Utils::HistoStats::moment( const AIDA::IHistogram1D* histo, const const auto& axis = histo->axis(); // number of bins const auto nBins = axis.bins(); - double result{0}, weight{0}; + double result{0}, weight{0}; // loop over all bins for ( int i = 0; i < nBins; ++i ) { const auto lE = axis.binLowerEdge( i ); const auto uE = axis.binUpperEdge( i ); // - const auto yBin = histo->binHeight( i ); // bin weight + const auto yBin = histo->binHeight( i ); // bin weight const double xBin = 0.5 * ( lE + uE ); // bin center // weight += yBin; @@ -531,8 +531,8 @@ long Gaudi::Utils::HistoStats::nEntries( const AIDA::IHistogram1D* histo, const */ // ============================================================================ long Gaudi::Utils::HistoStats::nEntries( const AIDA::IHistogram1D* histo, - const int imin, // minimal bin number (included) - const int imax ) // maximal bin number (not included) + const int imin, // minimal bin number (included) + const int imax ) // maximal bin number (not included) { if ( !histo ) { return s_long_bad; @@ -607,8 +607,8 @@ double Gaudi::Utils::HistoStats::nEntriesFrac( const AIDA::IHistogram1D* histo, */ // ============================================================================ double Gaudi::Utils::HistoStats::nEntriesFrac( const AIDA::IHistogram1D* histo, - const int imin, // minimal bin number (included) - const int imax ) // maximal bin number (not included) + const int imin, // minimal bin number (included) + const int imax ) // maximal bin number (not included) { if ( !histo ) { return s_bad; @@ -669,8 +669,8 @@ double Gaudi::Utils::HistoStats::nEntriesFracErr( const AIDA::IHistogram1D* hist */ // ============================================================================ double Gaudi::Utils::HistoStats::nEntriesFracErr( const AIDA::IHistogram1D* histo, - const int imin, // minimal bin number (included) - const int imax ) // maximal bin number (not included) + const int imin, // minimal bin number (included) + const int imax ) // maximal bin number (not included) { if ( !histo ) { return s_bad; diff --git a/GaudiUtils/src/Lib/HistoTableFormat.cpp b/GaudiUtils/src/Lib/HistoTableFormat.cpp index 7d4a0f5f10aba472a5341a7c670a1d668b40b6e3..218b1a2de273522dcf9c59d51a2b6657f9b73737 100644 --- a/GaudiUtils/src/Lib/HistoTableFormat.cpp +++ b/GaudiUtils/src/Lib/HistoTableFormat.cpp @@ -219,8 +219,8 @@ std::string Gaudi::Utils::Histos::path( const AIDA::IBaseHistogram* aida ) if ( 0 == registry ) { return ""; } // RETURN - std::string _path = registry->identifier(); - std::string::size_type n = _path.find( "/stat/" ); + std::string _path = registry->identifier(); + std::string::size_type n = _path.find( "/stat/" ); if ( 0 == n ) { return std::string( _path, 6 ); } // RETURN diff --git a/GaudiUtils/src/Lib/HistoXML.cpp b/GaudiUtils/src/Lib/HistoXML.cpp index b9df731693db2ce634c266270a1eed6a866ed681..7addaf83f36253862fbc5e9bff5fa4883afb3ef8 100644 --- a/GaudiUtils/src/Lib/HistoXML.cpp +++ b/GaudiUtils/src/Lib/HistoXML.cpp @@ -47,7 +47,7 @@ namespace { // 1) use XML-parser std::unique_ptr<TObject> obj{TBufferXML::ConvertFromXML( input.c_str() )}; - TYPE* histo = ( obj ? dynamic_cast<TYPE*>( obj.get() ) : nullptr ); + TYPE* histo = ( obj ? dynamic_cast<TYPE*>( obj.get() ) : nullptr ); // slightly tricky: in case the dynamic cast succeeds, transfer owership // by invoking 'release' on obj, and 'at the same time' pass 'histo' into // the constructor of unique_ptr -- but if the cast fails, do NOT transfer diff --git a/GaudiUtils/src/component/IODataManager.cpp b/GaudiUtils/src/component/IODataManager.cpp index 0797d7b770d389a54286feb78086046eafbe2c7a..0e82cf6036b65108f31c9e0a0a2b61a678b63705 100644 --- a/GaudiUtils/src/component/IODataManager.cpp +++ b/GaudiUtils/src/component/IODataManager.cpp @@ -48,7 +48,7 @@ StatusCode IODataManager::initialize() { // Initialize base class StatusCode status = Service::initialize(); - MsgStream log( msgSvc(), name() ); + MsgStream log( msgSvc(), name() ); if ( !status.isSuccess() ) { log << MSG::ERROR << "Error initializing base class Service!" << endmsg; return status; @@ -136,7 +136,7 @@ StatusCode IODataManager::disconnect( Connection* con ) if ( con ) { std::string dataset = con->name(); std::string dsn = dataset; - StatusCode sc = con->disconnect(); + StatusCode sc = con->disconnect(); if (::strncasecmp( dsn.c_str(), "FID:", 4 ) == 0 ) dsn = dataset.substr( 4 ); else if (::strncasecmp( dsn.c_str(), "LFN:", 4 ) == 0 ) @@ -148,7 +148,7 @@ StatusCode IODataManager::disconnect( Connection* con ) if ( j != m_fidMap.end() ) { std::string fid = j->second; std::string gfal_name = "gfal:guid:" + fid; - auto i = m_connectionMap.find( fid ); + auto i = m_connectionMap.find( fid ); m_fidMap.erase( j ); if ( ( j = m_fidMap.find( fid ) ) != m_fidMap.end() ) m_fidMap.erase( j ); if ( ( j = m_fidMap.find( gfal_name ) ) != m_fidMap.end() ) m_fidMap.erase( j ); @@ -238,7 +238,7 @@ StatusCode IODataManager::establishConnection( Connection* con ) StatusCode IODataManager::connectDataIO( int typ, IoType rw, CSTR dataset, CSTR technology, bool keep_open, Connection* connection ) { - MsgStream log( msgSvc(), name() ); + MsgStream log( msgSvc(), name() ); std::string dsn = dataset; try { StatusCode sc( StatusCode::SUCCESS, true ); @@ -280,8 +280,8 @@ StatusCode IODataManager::connectDataIO( int typ, IoType rw, CSTR dataset, CSTR } // keep track of the current return code before we start iterating over // replicas - auto appmgr = serviceLocator()->as<IProperty>(); - int origReturnCode = Gaudi::getAppReturnCode( appmgr ); + auto appmgr = serviceLocator()->as<IProperty>(); + int origReturnCode = Gaudi::getAppReturnCode( appmgr ); for ( auto i = files.cbegin(); i != files.cend(); ++i ) { std::string pfn = i->first; if ( i != files.cbegin() ) { @@ -306,7 +306,7 @@ StatusCode IODataManager::connectDataIO( int typ, IoType rw, CSTR dataset, CSTR return S_ERROR; } std::string fid; - auto j = m_fidMap.find( dsn ); + auto j = m_fidMap.find( dsn ); if ( j == m_fidMap.end() ) { IFileCatalog::Files files; switch ( typ ) { diff --git a/GaudiUtils/src/component/IODataManager.h b/GaudiUtils/src/component/IODataManager.h index eb64e8c28295088759cb1a9714284c09160895d5..5bf64cb4a3d431590412edb0121990fd11b20a25 100644 --- a/GaudiUtils/src/component/IODataManager.h +++ b/GaudiUtils/src/component/IODataManager.h @@ -31,17 +31,17 @@ namespace Gaudi { protected: typedef const std::string& CSTR; - struct Entry final { - std::string type; - IoType ioType; + struct Entry final { + std::string type; + IoType ioType; IDataConnection* connection; - bool keepOpen; + bool keepOpen; Entry( CSTR tech, bool k, IoType iot, IDataConnection* con ) : type( tech ), ioType( iot ), connection( con ), keepOpen( k ) { } }; - typedef std::map<std::string, Entry*> ConnectionMap; + typedef std::map<std::string, Entry*> ConnectionMap; typedef std::map<std::string, std::string> FidMap; Gaudi::Property<std::string> m_catalogSvcName{this, "CatalogType", "Gaudi::MultiFileCatalog/FileCatalog", @@ -49,7 +49,7 @@ namespace Gaudi Gaudi::Property<bool> m_useGFAL{this, "UseGFAL", true, "flag for auto gfal data access"}; Gaudi::Property<bool> m_quarantine{this, "QuarantineFiles", true, "if unaccessible files should be quarantines in job"}; - Gaudi::Property<int> m_ageLimit{this, "AgeLimit", 2, "age limit"}; + Gaudi::Property<int> m_ageLimit{this, "AgeLimit", 2, "age limit"}; Gaudi::Property<bool> m_disablePFNWarning{ this, "DisablePFNWarning", false, "if set to True, we will not report when a file is opened by its physical name"}; @@ -59,7 +59,7 @@ namespace Gaudi /// Reference to file catalog SmartIF<IFileCatalog> m_catalog; /// Map of FID to PFN - FidMap m_fidMap; + FidMap m_fidMap; StatusCode connectDataIO( int typ, IoType rw, CSTR fn, CSTR technology, bool keep, Connection* con ); StatusCode reconnect( Entry* e ); StatusCode error( CSTR msg, bool rethrow ); diff --git a/GaudiUtils/src/component/MultiFileCatalog.cpp b/GaudiUtils/src/component/MultiFileCatalog.cpp index eeb9b245ce514e1ac40f1058c9980cc1395a3e24..b761f3be892433c20aed057b11c52cc14d7d2306 100644 --- a/GaudiUtils/src/component/MultiFileCatalog.cpp +++ b/GaudiUtils/src/component/MultiFileCatalog.cpp @@ -110,10 +110,10 @@ void MultiFileCatalog::addCatalog( CSTR con ) if ( !con.empty() ) { if ( !findCatalog( con, false ) ) { static const string xml_typ = "Gaudi::XMLFileCatalog"; - auto id0 = con.find( "_" ); - string typ = con.substr( 0, id0 ); - string url = con.substr( id0 + 1 ); - IInterface* cat = nullptr; + auto id0 = con.find( "_" ); + string typ = con.substr( 0, id0 ); + string url = con.substr( id0 + 1 ); + IInterface* cat = nullptr; if ( strncasecmp( "xml", typ.c_str(), 3 ) == 0 ) { cat = IFileCatalog::Factory::create( xml_typ, url, msgSvc().get() ); } else { diff --git a/GaudiUtils/src/component/MultiFileCatalog.h b/GaudiUtils/src/component/MultiFileCatalog.h index c4ed0749b5e34bf055eabca5d3ab6b2b1d3a86e7..b439b9f083a9bebd1433fd97562364a7423189e5 100644 --- a/GaudiUtils/src/component/MultiFileCatalog.h +++ b/GaudiUtils/src/component/MultiFileCatalog.h @@ -25,9 +25,9 @@ namespace Gaudi typedef Service::Factory Factory; protected: - typedef const std::string& CSTR; + typedef const std::string& CSTR; typedef std::vector<IFileCatalog*> Catalogs; - typedef std::vector<std::string> CatalogNames; + typedef std::vector<std::string> CatalogNames; template <class A1, class F> std::string _find( A1& arg1, F pmf ) const diff --git a/GaudiUtils/src/component/SignalMonitorSvc.cpp b/GaudiUtils/src/component/SignalMonitorSvc.cpp index 74285d5fa33d5deec1272c15c72f1ee45d660584..445b3d0c16f27f653a8090d5ca1451dc6c154a26 100644 --- a/GaudiUtils/src/component/SignalMonitorSvc.cpp +++ b/GaudiUtils/src/component/SignalMonitorSvc.cpp @@ -468,8 +468,8 @@ namespace Gaudi return {-1, false}; // silently ignore empty strings } const SigMap& sigmap( SigMap::instance() ); - std::string signal = sig; - bool propagate = false; + std::string signal = sig; + bool propagate = false; // Check if the signal must be propagated if ( signal[signal.size() - 1] == '+' ) { debug() << "Must be propagated to previously registered signal handlers" << endmsg; diff --git a/GaudiUtils/src/component/VFSSvc.cpp b/GaudiUtils/src/component/VFSSvc.cpp index 83a01740e1a7008badb8c6793a559d29f2c41a2e..55e4cbf3a449ae043c9f564b14609c483eea067f 100644 --- a/GaudiUtils/src/component/VFSSvc.cpp +++ b/GaudiUtils/src/component/VFSSvc.cpp @@ -76,7 +76,7 @@ std::unique_ptr<std::istream> VFSSvc::open( const std::string& url ) } const std::string url_prefix( url, 0, pos ); - const auto handlers = m_urlHandlers.find( url_prefix ); + const auto handlers = m_urlHandlers.find( url_prefix ); if ( handlers == m_urlHandlers.end() ) { // if we do not have a handler for the URL prefix, // use the fall back one diff --git a/GaudiUtils/src/component/XMLCatalogTest.cpp b/GaudiUtils/src/component/XMLCatalogTest.cpp index f16605b9c36ddc5f6b2d8ced2557ee0ebe0a3138..0e0c6153e91c2f6feffe7633e92f3e27ca560bf5 100644 --- a/GaudiUtils/src/component/XMLCatalogTest.cpp +++ b/GaudiUtils/src/component/XMLCatalogTest.cpp @@ -8,7 +8,7 @@ using namespace Gaudi; extern "C" int testXMLFileCatalogWrite( int argc, char** argv ) { - int nwrite = 10; + int nwrite = 10; std::string fname = "file:test.xml"; if ( argc > 1 ) fname = argv[1]; if ( argc > 2 ) nwrite = ::atol( argv[2] ); @@ -63,10 +63,10 @@ extern "C" int testXMLFileCatalogWrite( int argc, char** argv ) extern "C" int testXMLFileCatalogRead( int argc, char** argv ) { std::vector<std::string> fids; - std::string fname = "file:test.xml"; - if ( argc > 1 ) fname = argv[1]; - bool prt = argc < 2; - time_t start = time( nullptr ); + std::string fname = "file:test.xml"; + if ( argc > 1 ) fname = argv[1]; + bool prt = argc < 2; + time_t start = time( nullptr ); XMLFileCatalog c( fname, nullptr ); c.init(); std::cout << "File loaded in " << time( nullptr ) - start << " seconds. " << std::endl; @@ -79,8 +79,8 @@ extern "C" int testXMLFileCatalogRead( int argc, char** argv ) for ( size_t i = 0, tot = ( mult * fids.size() ); i < tot; ++i ) { size_t ent = i % fids.size(); if ( ent == 0 ) std::cout << i << std::endl; - std::string fid = fids[ent]; - XMLFileCatalog::Files pfn, lfn; + std::string fid = fids[ent]; + XMLFileCatalog::Files pfn, lfn; XMLFileCatalog::Attributes attrs; c.getLFN( fid, lfn ); for ( auto& elem : lfn ) { diff --git a/GaudiUtils/src/component/XMLFileCatalog.cpp b/GaudiUtils/src/component/XMLFileCatalog.cpp index 20c285bd0e6ab5e5b936bbdeef32651c6f809ca4..93496522f2cc1b5d9602df8cdcdeb4865afa0357 100644 --- a/GaudiUtils/src/component/XMLFileCatalog.cpp +++ b/GaudiUtils/src/component/XMLFileCatalog.cpp @@ -41,7 +41,7 @@ namespace typedef const string& CSTR; inline string _toString( const XMLCh* toTranscode ) { - char* buff = XMLString::transcode( toTranscode ); + char* buff = XMLString::transcode( toTranscode ); string tmp( buff == 0 ? "" : buff ); XMLString::release( &buff ); return tmp; @@ -91,7 +91,7 @@ namespace DOMElement* operator->() const { return m_node; } string attr( const XMLTag& tag ) const { return _toString( m_node->getAttribute( tag ) ); } string attr( CSTR tag ) const { return attr( XMLTag( tag ) ); } - string tag() const { return _toString( m_node->getTagName() ); } + string tag() const { return _toString( m_node->getTagName() ); } void operator++() { while ( m_node ) { @@ -120,8 +120,8 @@ namespace struct DTDRedirect : public EntityResolver { InputSource* resolveEntity( const XMLCh* const /* pubId */, const XMLCh* const /* sysId */ ) override { - static const char* dtdID = "redirectinmem.dtd"; - static const char* dtd = "\ + static const char* dtdID = "redirectinmem.dtd"; + static const char* dtd = "\ <!ELEMENT POOLFILECATALOG (META*,File*)>\ <!ELEMENT META EMPTY>\ <!ELEMENT File (physical,logical,metadata*)>\ @@ -140,7 +140,7 @@ namespace <!ATTLIST metadata att_name CDATA #REQUIRED>\ <!ATTLIST metadata att_value CDATA #REQUIRED>\ "; - static const size_t len = strlen( dtd ); + static const size_t len = strlen( dtd ); return new MemBufInputSource( (const XMLByte*)dtd, len, dtdID, false ); } ~DTDRedirect() override = default; @@ -156,7 +156,7 @@ namespace m.find( "for attribute 'name' is invalid Name or NMTOKEN value" ) != string::npos || m.find( "for attribute 'ID' is invalid Name or NMTOKEN value" ) != string::npos ) return; - string sys( _toString( e.getSystemId() ) ); + string sys( _toString( e.getSystemId() ) ); MsgStream log( m_msg, "XMLCatalog" ); log << MSG::ERROR << "Error at file \"" << sys << "\", line " << e.getLineNumber() << ", column " << e.getColumnNumber() << endmsg << "Message: " << m << endmsg; @@ -164,8 +164,8 @@ namespace void ErrHandler::fatalError( const SAXParseException& e ) { MsgStream log( m_msg, "XMLCatalog" ); - string m( _toString( e.getMessage() ) ); - string sys( _toString( e.getSystemId() ) ); + string m( _toString( e.getMessage() ) ); + string sys( _toString( e.getSystemId() ) ); log << MSG::ERROR << "Fatal Error at file \"" << sys << "\", line " << e.getLineNumber() << ", column " << e.getColumnNumber() << endmsg << "Message: " << m << endmsg; throw runtime_error( "Standard pool exception : Fatal Error on the DOM Parser" ); @@ -227,7 +227,7 @@ void XMLFileCatalog::init() m_parser->parse( xmlFile.c_str() ); } else { const std::string& s = EmptyCatalog; - MemBufInputSource src( (const XMLByte*)s.c_str(), s.length(), "MemCatalog" ); + MemBufInputSource src( (const XMLByte*)s.c_str(), s.length(), "MemCatalog" ); m_parser->parse( src ); } m_doc = m_parser->getDocument(); @@ -243,9 +243,9 @@ void XMLFileCatalog::init() string XMLFileCatalog::lookupFID( const std::string& fid ) const { std::string result; - DOMNode* e = element( fid, false ); - e = e ? e->getParentNode() : 0; // Mode up to <logical> - e = e ? e->getParentNode() : 0; // Mode up to <File> + DOMNode* e = element( fid, false ); + e = e ? e->getParentNode() : 0; // Mode up to <logical> + e = e ? e->getParentNode() : 0; // Mode up to <File> if ( e ) { if ( e->getAttributes() ) { // Need to check this. The node may be no DOMElement char* nam = XMLString::transcode( ( (DOMElement*)e )->getAttribute( Attr_ID ) ); @@ -299,7 +299,7 @@ DOMNode* XMLFileCatalog::child( DOMNode* par, CSTR tag, CSTR attr, CSTR val ) co void XMLFileCatalog::setMetaData( CSTR fid, CSTR attr, CSTR val ) const { if ( !readOnly() ) { - DOMNode* node = element( fid ); + DOMNode* node = element( fid ); DOMElement* mnod = (DOMElement*)child( node, MetaNode, Attr_metaName, attr ); if ( !mnod ) { mnod = getDoc( true )->createElement( MetaNode ); @@ -322,7 +322,7 @@ string XMLFileCatalog::getMetaDataItem( CSTR fid, CSTR attr ) const void XMLFileCatalog::dropMetaData( CSTR fid, CSTR attr ) const { vector<DOMNode*> gbc; - DOMNode* fn = getDoc( true )->getElementById( XMLStr( fid ) ); + DOMNode* fn = getDoc( true )->getElementById( XMLStr( fid ) ); for ( XMLCollection c{child( fn, MetaNode )}; c; ++c ) if ( attr[0] == '*' || !c.attr( attr ).empty() ) gbc.push_back( c ); for ( const auto& i : gbc ) fn->removeChild( i ); @@ -362,7 +362,7 @@ std::pair<DOMElement*, DOMElement*> XMLFileCatalog::i_registerFID( CSTR fid ) co } /// It creates a new node File with name = fid in the XML file catalog - DOMElement *file = (DOMElement *)element( fid, false ), *phyelem = 0, *logelem = 0; + DOMElement * file = (DOMElement *)element( fid, false ), *phyelem = 0, *logelem = 0; DOMDocument* doc = getDoc( true ); if ( !file ) { DOMNode* fde = doc->getElementsByTagName( XMLStr( "*" ) )->item( 0 ); @@ -455,9 +455,9 @@ void XMLFileCatalog::commit() { try { if ( dirty() && !readOnly() ) { - string xmlfile = getfile( true ); - XMLStr ii( "LS" ); - DOMImplementation* imp = DOMImplementationRegistry::getDOMImplementation( ii ); + string xmlfile = getfile( true ); + XMLStr ii( "LS" ); + DOMImplementation* imp = DOMImplementationRegistry::getDOMImplementation( ii ); std::unique_ptr<XMLFormatTarget> tar{new LocalFileFormatTarget( xmlfile.c_str() )}; #if _XERCES_VERSION <= 30000 DOMWriter* wr = imp->createDOMWriter(); @@ -499,7 +499,7 @@ string XMLFileCatalog::getfile( bool create ) } else if ( protocol == "file" ) { m_rdOnly = false; struct stat buff; - int exist = ::stat( path.c_str(), &buff ) != -1; + int exist = ::stat( path.c_str(), &buff ) != -1; if ( create && !exist ) { MsgStream log( m_msgSvc, "XMLCatalog" ); log << MSG::INFO << "File '" << path << "' does not exist. New file created." << endmsg; diff --git a/GaudiUtils/src/component/XMLFileCatalog.h b/GaudiUtils/src/component/XMLFileCatalog.h index 5ac2cdbdf7c82694903931428f3e5635cded3357..2367e6c2f61c37c677185fd431bf7bb8f1ce1076 100644 --- a/GaudiUtils/src/component/XMLFileCatalog.h +++ b/GaudiUtils/src/component/XMLFileCatalog.h @@ -97,13 +97,13 @@ namespace Gaudi xercesc::DOMNode* element( CSTR fid, bool print_err = true ) const; xercesc::DOMNode* child( xercesc::DOMNode* par, CSTR tag, CSTR attr = "", CSTR val = "" ) const; std::pair<xercesc::DOMElement*, xercesc::DOMElement*> i_registerFID( CSTR fid ) const; - bool m_rdOnly; - mutable bool m_update; - xercesc::DOMDocument* m_doc; + bool m_rdOnly; + mutable bool m_update; + xercesc::DOMDocument* m_doc; std::unique_ptr<xercesc::XercesDOMParser> m_parser; - std::unique_ptr<xercesc::ErrorHandler> m_errHdlr; - std::string m_file; - IMessageSvc* m_msgSvc; + std::unique_ptr<xercesc::ErrorHandler> m_errHdlr; + std::string m_file; + IMessageSvc* m_msgSvc; }; /// Create file identifier using UUID mechanism std::string createGuidAsString(); diff --git a/GaudiUtils/src/component/createGuidAsString.cpp b/GaudiUtils/src/component/createGuidAsString.cpp index 0121a25ffadedae41ca291c9dd948b6561f4ca5e..0ab52f982b20d415a8467c0f0d8deefdf9642d14 100644 --- a/GaudiUtils/src/component/createGuidAsString.cpp +++ b/GaudiUtils/src/component/createGuidAsString.cpp @@ -11,10 +11,10 @@ std::string Gaudi::createGuidAsString() uuid_t uuid; ::uuid_generate_time( uuid ); struct Guid { - unsigned int Data1; + unsigned int Data1; unsigned short Data2; unsigned short Data3; - unsigned char Data4[8]; + unsigned char Data4[8]; }* g = (Guid*)&uuid; boost::format text( "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X" ); diff --git a/PartPropSvc/share/PartPropSvc.py b/PartPropSvc/share/PartPropSvc.py index b05546b60f4ef80f0b2f43a908b1daef187a94bc..180236757756d1c5f64e24fed2ecc96b86097aed 100644 --- a/PartPropSvc/share/PartPropSvc.py +++ b/PartPropSvc/share/PartPropSvc.py @@ -1,8 +1,8 @@ -#-------------------------------------------------------------- +# -------------------------------------------------------------- # PartPropSvc Service options -#-------------------------------------------------------------- +# -------------------------------------------------------------- from PartPropSvc.PartPropSvcConf import PartPropSvc ServiceMgr += PartPropSvc() PartPropSvc.InputFile = "PDGTABLE.MeV=PDG" -#-------------------------------------------------------------- +# -------------------------------------------------------------- diff --git a/PartPropSvc/src/PartPropSvc.cpp b/PartPropSvc/src/PartPropSvc.cpp index b507da733ba48c767f9a8489af4fe1bedbce1480..b8d8a74bcd59aad86b91c50796a65991de67a668 100644 --- a/PartPropSvc/src/PartPropSvc.cpp +++ b/PartPropSvc/src/PartPropSvc.cpp @@ -32,18 +32,18 @@ StatusCode PartPropSvc::initialize() std::string key = m_pdtFiles.value(); typedef boost::tokenizer<boost::char_separator<char>> tokenizer; - boost::char_separator<char> sep( ", " ); - boost::char_separator<char> sep_eq( "=" ); + boost::char_separator<char> sep( ", " ); + boost::char_separator<char> sep_eq( "=" ); tokenizer tokens( key, sep ); for ( auto it = tokens.begin(); it != tokens.end(); ++it ) { tokenizer tok2( *it, sep_eq ); - int nToks( distance( tok2.begin(), tok2.end() ) ); + int nToks( distance( tok2.begin(), tok2.end() ) ); - auto it2 = tok2.begin(); + auto it2 = tok2.begin(); const std::string fname = *it2; - std::string fmt; + std::string fmt; if ( nToks == 1 ) { info() << "No table format type specified for \"" << fname << "\". Assuming PDG" << endmsg; fmt = "PDG"; diff --git a/PartPropSvc/src/PartPropSvc.h b/PartPropSvc/src/PartPropSvc.h index c2748c775ceaec4c0ff4e9dd813f84765eb036fc..00c2c5e330bed12d13ea7c8c91f332d2a0a84f87 100644 --- a/PartPropSvc/src/PartPropSvc.h +++ b/PartPropSvc/src/PartPropSvc.h @@ -50,7 +50,7 @@ private: Gaudi::Property<std::string> m_pdtFiles{this, "InputFile", "PDGTABLE.MeV"}; HepPDT::ProcessUnknownID* m_upid = nullptr; - std::string m_upid_name; + std::string m_upid_name; std::unique_ptr<HepPDT::ParticleDataTable> m_pdt; diff --git a/RootCnv/RootCnv/PoolClasses.h b/RootCnv/RootCnv/PoolClasses.h index 5d9054e0893cd393e1f78c1de1dcbf9c3b38a883..f32ddaa0abc35bd6c95bd30c8aa7f58b166015ef 100644 --- a/RootCnv/RootCnv/PoolClasses.h +++ b/RootCnv/RootCnv/PoolClasses.h @@ -13,10 +13,10 @@ namespace pool class Guid { // size is 16 public: - unsigned int Data1; + unsigned int Data1; unsigned short Data2; unsigned short Data3; - unsigned char Data4[8]; + unsigned char Data4[8]; }; /** @class Token * @@ -26,11 +26,11 @@ namespace pool class Token { public: - int m_refCount; //! transient (a streamer is used to read it) - int m_technology; //! transient (a streamer is used to read it) + int m_refCount; //! transient (a streamer is used to read it) + int m_technology; //! transient (a streamer is used to read it) std::string m_dbID; //! transient (a streamer is used to read it) std::string m_cntID; //! transient (a streamer is used to read it) - Guid m_classID; //! Object global identifier + Guid m_classID; //! Object global identifier std::pair<int, int> m_oid; //! POOL OID data member: transient (a streamer is used to read it) int m_type; //! transient (a streamer is used to read it) public: diff --git a/RootCnv/RootCnv/RootDataConnection.h b/RootCnv/RootCnv/RootDataConnection.h index e3ed89a59a80b52da7625f11712ae9c0609d5524..835fcdec2b9bb4222b75d3be61720340ec41892f 100644 --- a/RootCnv/RootCnv/RootDataConnection.h +++ b/RootCnv/RootCnv/RootDataConnection.h @@ -195,28 +195,28 @@ namespace Gaudi class Tool { protected: - typedef RootDataConnection::StringVec StringVec; - typedef RootDataConnection::ParamMap ParamMap; - typedef RootDataConnection::Sections Sections; - typedef RootDataConnection::MergeSections MergeSections; - typedef RootDataConnection::LinkSections LinkSections; - typedef RootDataConnection::ContainerSection ContainerSection; + typedef RootDataConnection::StringVec StringVec; + typedef RootDataConnection::ParamMap ParamMap; + typedef RootDataConnection::Sections Sections; + typedef RootDataConnection::MergeSections MergeSections; + typedef RootDataConnection::LinkSections LinkSections; + typedef RootDataConnection::ContainerSection ContainerSection; typedef RootDataConnection::ContainerSections ContainerSections; /// Pointer to containing data connection object RootDataConnection* c; public: - TTree* refs() const { return c->m_refs; } - StringVec& dbs() const { return c->m_dbs; } - StringVec& conts() const { return c->m_conts; } - StringVec& links() const { return c->m_links; } - ParamMap& params() const { return c->m_params; } - MsgStream& msgSvc() const { return c->msgSvc(); } + TTree* refs() const { return c->m_refs; } + StringVec& dbs() const { return c->m_dbs; } + StringVec& conts() const { return c->m_conts; } + StringVec& links() const { return c->m_links; } + ParamMap& params() const { return c->m_params; } + MsgStream& msgSvc() const { return c->msgSvc(); } const std::string& name() const { return c->m_name; } - Sections& sections() const { return c->m_sections; } - LinkSections& linkSections() const { return c->m_linkSects; } - MergeSections& mergeSections() const { return c->m_mergeSects; } + Sections& sections() const { return c->m_sections; } + LinkSections& linkSections() const { return c->m_linkSects; } + MergeSections& mergeSections() const { return c->m_mergeSects; } /// Default destructor virtual ~Tool() = default; diff --git a/RootCnv/RootCnv/RootPerfMonSvc.h b/RootCnv/RootCnv/RootPerfMonSvc.h index 1c9ff82488b7b0e342ffed43ef0e5dffc8607a12..e921851f5c83f52d8fedc226b99fb332a69a06df 100644 --- a/RootCnv/RootCnv/RootPerfMonSvc.h +++ b/RootCnv/RootCnv/RootPerfMonSvc.h @@ -59,9 +59,9 @@ namespace Gaudi // Reference to all connected output files std::set<std::string> m_outputs; // The newest observed values - Int_t m_eventType; + Int_t m_eventType; ULong_t m_utime, m_stime, m_vsize; - Long_t m_eventNumber, m_rss, m_time; + Long_t m_eventNumber, m_rss, m_time; // Types of records enum EventType { EVENT = 1, FSR = 2 }; diff --git a/RootCnv/RootCnv/SysProcStat.h b/RootCnv/RootCnv/SysProcStat.h index 52297eedd6e46ceec55f770cf65857e18e544acc..896b71a5523c73f75938b6eef7046ccb01efa8cd 100644 --- a/RootCnv/RootCnv/SysProcStat.h +++ b/RootCnv/RootCnv/SysProcStat.h @@ -14,11 +14,11 @@ namespace Gaudi { public: - int pid, ppid, pgrp, session, tty_nr, tpgid, exit_signal, processor; + int pid, ppid, pgrp, session, tty_nr, tpgid, exit_signal, processor; long unsigned flags, minflt, cminflt, majflt, cmajflt, utime, stime, startime, vsize, rlim, startcode, endcode, startstack, kstkesp, kstkeip, signal, blocked, sigingore, sigcatch, wchan, nswap, cnswap; long int cutime, cstime, priority, nice, num_threads, itrealvalue, rss; - char comm[128], state; + char comm[128], state; long time; diff --git a/RootCnv/merge/extractEvt.cpp b/RootCnv/merge/extractEvt.cpp index a5372fdb9b234a1650f4a80e14824b3e359b8b9b..9acea55c13a6094837c3779a88d0e4bae97620fe 100644 --- a/RootCnv/merge/extractEvt.cpp +++ b/RootCnv/merge/extractEvt.cpp @@ -18,7 +18,7 @@ int main( int argc, char** argv ) { string input; string output; - int evt_num = -1; + int evt_num = -1; for ( int i = 1; i < argc; ++i ) { if ( *argv[i] == '-' ) { switch (::toupper( *( argv[i] + 1 ) ) ) { diff --git a/RootCnv/merge/merge.cpp b/RootCnv/merge/merge.cpp index 82c14efc6900e1ce58e230df676ed6c30b081c42..fe08b817f037a8304188ce07dca59e6c20b6aae2 100644 --- a/RootCnv/merge/merge.cpp +++ b/RootCnv/merge/merge.cpp @@ -23,9 +23,9 @@ static void err_handler( Int_t level, Bool_t abort_bool, const char* location, c int main( int argc, char** argv ) { - bool dbg = false, fixup = true; + bool dbg = false, fixup = true; vector<string> input; - string output; + string output; for ( int i = 1; i < argc; ++i ) { if ( *argv[i] == '-' ) { switch (::toupper( *( argv[i] + 1 ) ) ) { @@ -58,8 +58,8 @@ int main( int argc, char** argv ) gROOT->SetBatch( kTRUE ); s_err = SetErrorHandler( err_handler ); for ( size_t i = 0; i < input.size(); ++i ) { - const string& in = input[i]; - bool do_fixup = fixup && ( ( i + 1 ) == input.size() ); + const string& in = input[i]; + bool do_fixup = fixup && ( ( i + 1 ) == input.size() ); //::printf("+++ Target:%s\n+++ Source file:%s Fixup:%s Dbg:%s %d %d\n", // output.c_str(),in.c_str(),do_fixup ? "YES" : "NO",dbg ? "YES" : "NO",i,input.size()); int result = merge( output.c_str(), in.c_str(), do_fixup, dbg ); diff --git a/RootCnv/src/PoolTool.h b/RootCnv/src/PoolTool.h index a0a2c93adad7473df019f42559b01f0d86b4807d..8fc9d78eec0f6b6ce9198c1c43ed695759ab05ef 100644 --- a/RootCnv/src/PoolTool.h +++ b/RootCnv/src/PoolTool.h @@ -41,11 +41,11 @@ namespace Gaudi t = (TTree*)c->file()->Get( _treeName( cnt ).c_str() ); } if ( t ) { - TBranch* b1 = t->GetBranch( "Links" ); - TBranch* b2 = t->GetBranch( "Refs" ); + TBranch* b1 = t->GetBranch( "Links" ); + TBranch* b2 = t->GetBranch( "Refs" ); MsgStream& msg = msgSvc(); if ( b1 && b2 ) { - LinkManager lm, *plm = &lm; + LinkManager lm, *plm = &lm; PoolDbLinkManager mgr, *pmgr = &mgr; b1->SetAutoDelete( kFALSE ); b2->SetAutoDelete( kFALSE ); @@ -59,8 +59,8 @@ namespace Gaudi msg << MSG::VERBOSE; for ( size_t j = 0; j < ref_size; ++j ) { const pair<int, int>& oid = mgr.references()[j]->m_oid; - string loc = mgr.links()[j].substr( 1 ); - RootRef& r = refs.refs[j]; + string loc = mgr.links()[j].substr( 1 ); + RootRef& r = refs.refs[j]; if ( oid.first >= 0 ) { r = m_poolLinks[oid.first]; r.entry = oid.second; @@ -71,8 +71,8 @@ namespace Gaudi } } for ( int i = 0, n = lm.size(); i < n; ++i ) { - LinkManager::Link* lnk = lm.link( i ); - int link_id = c->makeLink( lnk->path() ); + LinkManager::Link* lnk = lm.link( i ); + int link_id = c->makeLink( lnk->path() ); msg << "Add Link:" << lnk->path() << endl; refs.links.push_back( link_id ); } @@ -113,7 +113,7 @@ namespace Gaudi /// Internal helper to read reference tables ##Params and ##Links StatusCode readRefs() override { - int i; + int i; char text[2048]; msgSvc() << MSG::VERBOSE; @@ -149,7 +149,7 @@ namespace Gaudi for ( i = 0, b->SetAddress( text ); i < b->GetEntries(); ++i ) { b->GetEvent( i ); std::string db, container; - int clid = 1, technology = 0, ipar[2] = {-1, -1}; + int clid = 1, technology = 0, ipar[2] = {-1, -1}; for ( char* p1 = (char*)text; p1; p1 = ::strchr( ++p1, '[' ) ) { char* p2 = ::strchr( p1, '=' ); char* p3 = ::strchr( p1, ']' ); diff --git a/RootCnv/src/RootCnvSvc.cpp b/RootCnv/src/RootCnvSvc.cpp index b4317465c88946cdfec20cee18ac058c3bd4d703..938d499b7fe11724c94de12a49554ba5efe1fe4f 100644 --- a/RootCnv/src/RootCnvSvc.cpp +++ b/RootCnv/src/RootCnvSvc.cpp @@ -45,7 +45,7 @@ namespace GaudiRoot namespace { static map<string, TClass*> s_classesNames; - static map<CLID, TClass*> s_classesClids; + static map<CLID, TClass*> s_classesClids; } #define MBYTE ( 1024 * 1024 ) #define kBYTE 1024 @@ -78,7 +78,7 @@ StatusCode RootCnvSvc::error( CSTR msg ) // Initialize the Db data persistency service StatusCode RootCnvSvc::initialize() { - string cname; + string cname; StatusCode status = ConversionSvc::initialize(); if ( !status.isSuccess() ) { return error( "Failed to initialize ConversionSvc base class." ); @@ -211,12 +211,12 @@ StatusCode RootCnvSvc::connectOutput( CSTR dsn, CSTR openMode ) StatusCode RootCnvSvc::connectDatabase( CSTR dataset, int mode, RootDataConnection** con ) { try { - IDataConnection* c = m_ioMgr->connection( dataset ); - bool fire_incident = false; - *con = nullptr; + IDataConnection* c = m_ioMgr->connection( dataset ); + bool fire_incident = false; + *con = nullptr; if ( !c ) { std::unique_ptr<RootDataConnection> connection( new RootDataConnection( this, dataset, m_setup ) ); - StatusCode sc = ( mode != IDataConnection::READ ) + StatusCode sc = ( mode != IDataConnection::READ ) ? m_ioMgr->connectWrite( connection.get(), IDataConnection::IoType( mode ), "ROOT" ) : m_ioMgr->connectRead( false, connection.get() ); c = sc.isSuccess() ? m_ioMgr->connection( dataset ) : nullptr; @@ -249,12 +249,12 @@ StatusCode RootCnvSvc::connectDatabase( CSTR dataset, int mode, RootDataConnecti } if ( *con ) { if ( fire_incident ) { - IOpaqueAddress* pAddr = nullptr; - string fid = pc->fid(); - string section = m_recordName[0] == '/' ? m_recordName.value().substr( 1 ) : m_recordName.value(); - TBranch* b = pc->getBranch( section, m_recordName ); + IOpaqueAddress* pAddr = nullptr; + string fid = pc->fid(); + string section = m_recordName[0] == '/' ? m_recordName.value().substr( 1 ) : m_recordName.value(); + TBranch* b = pc->getBranch( section, m_recordName ); if ( b ) { - const string par[2] = {fid, m_recordName}; + const string par[2] = {fid, m_recordName}; unsigned long ipar[2] = {(unsigned long)( *con ), (unsigned long)b->GetEntries() - 1}; for ( int i = 0; i < b->GetEntries(); ++i ) { ipar[1] = i; @@ -312,14 +312,14 @@ StatusCode RootCnvSvc::connectOutput( CSTR db_name ) { return connectOutput( db_ StatusCode RootCnvSvc::commitOutput( CSTR dsn, bool /* doCommit */ ) { if ( m_current ) { - size_t len = m_currSection.find( '/', 1 ); - string section = m_currSection.substr( 1, len == string::npos ? string::npos : len - 1 ); - TBranch* b = m_current->getBranch( section, m_currSection ); + size_t len = m_currSection.find( '/', 1 ); + string section = m_currSection.substr( 1, len == string::npos ? string::npos : len - 1 ); + TBranch* b = m_current->getBranch( section, m_currSection ); if ( b ) { - Long64_t evt = b->GetEntries(); - TTree* t = b->GetTree(); - TObjArray* a = t->GetListOfBranches(); - Int_t nb = a->GetEntriesFast(); + Long64_t evt = b->GetEntries(); + TTree* t = b->GetTree(); + TObjArray* a = t->GetListOfBranches(); + Int_t nb = a->GetEntriesFast(); /// fill NULL pointers to all branches, which have less entries than the section branch for ( Int_t i = 0; i < nb; ++i ) { TBranch* br_ptr = (TBranch*)a->UncheckedAt( i ); @@ -387,9 +387,9 @@ StatusCode RootCnvSvc::createNullRep( const std::string& path ) // Insert null marker for not existent transient object StatusCode RootCnvSvc::createNullRef( const std::string& path ) { - RootObjectRefs* refs = nullptr; - size_t len = path.find( '/', 1 ); - string section = path.substr( 1, len == string::npos ? string::npos : len - 1 ); + RootObjectRefs* refs = nullptr; + size_t len = path.find( '/', 1 ); + string section = path.substr( 1, len == string::npos ? string::npos : len - 1 ); pair<int, unsigned long> ret = m_current->save( section, path + "#R", nullptr, refs, m_bufferSize, m_splitLevel ); if ( log().level() <= MSG::VERBOSE ) log() << MSG::VERBOSE << "Writing object:" << path << " " << ret.first << " " << hex << ret.second << dec @@ -402,12 +402,12 @@ StatusCode RootCnvSvc::i__createRep( DataObject* pObj, IOpaqueAddress*& refpAddr { refpAddr = nullptr; if ( !pObj ) return error( "createRep> Current Database is invalid!" ); - CLID clid = pObj->clID(); - IRegistry* pR = pObj->registry(); - string p[2] = {m_current->fid(), pR->identifier()}; - TClass* cl = ( clid == CLID_DataObject ) ? m_classDO : getClass( pObj ); - size_t len = p[1].find( '/', 1 ); - string sect = p[1].substr( 1, len == string::npos ? string::npos : len - 1 ); + CLID clid = pObj->clID(); + IRegistry* pR = pObj->registry(); + string p[2] = {m_current->fid(), pR->identifier()}; + TClass* cl = ( clid == CLID_DataObject ) ? m_classDO : getClass( pObj ); + size_t len = p[1].find( '/', 1 ); + string sect = p[1].substr( 1, len == string::npos ? string::npos : len - 1 ); pair<int, unsigned long> ret = m_current->saveObj( sect, p[1], cl, pObj, m_bufferSize, m_splitLevel, true ); if ( ret.first > 1 || ( clid == CLID_DataObject && ret.first == 1 ) ) { unsigned long ip[2] = {0, ret.second}; @@ -422,18 +422,18 @@ StatusCode RootCnvSvc::i__fillRepRefs( IOpaqueAddress* /* pA */, DataObject* pOb { if ( pObj ) { typedef vector<IRegistry*> Leaves; - Leaves leaves; - RootObjectRefs refs; - IRegistry* pR = pObj->registry(); - auto dataMgr = SmartIF<IDataManagerSvc>{pR->dataSvc()}; + Leaves leaves; + RootObjectRefs refs; + IRegistry* pR = pObj->registry(); + auto dataMgr = SmartIF<IDataManagerSvc>{pR->dataSvc()}; if ( dataMgr ) { StatusCode status = dataMgr->objectLeaves( pObj, leaves ); if ( status.isSuccess() ) { - RootRef ref; - const string& id = pR->identifier(); - size_t len = id.find( '/', 1 ); - string sect = id.substr( 1, len == string::npos ? string::npos : len - 1 ); - LinkManager* pLinks = pObj->linkMgr(); + RootRef ref; + const string& id = pR->identifier(); + size_t len = id.find( '/', 1 ); + string sect = id.substr( 1, len == string::npos ? string::npos : len - 1 ); + LinkManager* pLinks = pObj->linkMgr(); for ( auto& i : leaves ) { if ( i->address() ) { m_current->makeRef( i, ref ); @@ -442,8 +442,8 @@ StatusCode RootCnvSvc::i__fillRepRefs( IOpaqueAddress* /* pA */, DataObject* pOb } } for ( int i = 0, n = pLinks->size(); i < n; ++i ) { - LinkManager::Link* lnk = pLinks->link( i ); - int link_id = m_current->makeLink( lnk->path() ); + LinkManager::Link* lnk = pLinks->link( i ); + int link_id = m_current->makeLink( lnk->path() ); refs.links.push_back( link_id ); } pair<int, unsigned long> ret = @@ -465,15 +465,15 @@ StatusCode RootCnvSvc::i__createObj( IOpaqueAddress* pA, DataObject*& refpObj ) { refpObj = nullptr; if ( !pA ) return S_FAIL; - RootDataConnection* con = nullptr; - const string* par = pA->par(); - unsigned long* ipar = const_cast<unsigned long*>( pA->ipar() ); - StatusCode sc = connectDatabase( par[0], IDataConnection::READ, &con ); + RootDataConnection* con = nullptr; + const string* par = pA->par(); + unsigned long* ipar = const_cast<unsigned long*>( pA->ipar() ); + StatusCode sc = connectDatabase( par[0], IDataConnection::READ, &con ); if ( sc.isSuccess() ) { - ipar[0] = (unsigned long)con; - DataObject* pObj = nullptr; - size_t len = par[1].find( '/', 1 ); - string section = par[1].substr( 1, len == string::npos ? string::npos : len - 1 ); + ipar[0] = (unsigned long)con; + DataObject* pObj = nullptr; + size_t len = par[1].find( '/', 1 ); + string section = par[1].substr( 1, len == string::npos ? string::npos : len - 1 ); int nb = con->loadObj( section, par[1], ipar[1], pObj ); if ( nb > 1 || ( nb == 1 && pObj->clID() == CLID_DataObject ) ) { @@ -496,19 +496,19 @@ StatusCode RootCnvSvc::i__fillObjRefs( IOpaqueAddress* pA, DataObject* pObj ) if ( !pA || !pObj ) return error( "read> Cannot read object -- no valid object address present " ); const unsigned long* ipar = pA->ipar(); - RootDataConnection* con = (RootDataConnection*)ipar[0]; + RootDataConnection* con = (RootDataConnection*)ipar[0]; if ( con ) { RootObjectRefs refs; - const string* par = pA->par(); - size_t len = par[1].find( '/', 1 ); - string section = par[1].substr( 1, len == string::npos ? string::npos : len - 1 ); - int nb = con->loadRefs( section, par[1], ipar[1], refs ); + const string* par = pA->par(); + size_t len = par[1].find( '/', 1 ); + string section = par[1].substr( 1, len == string::npos ? string::npos : len - 1 ); + int nb = con->loadRefs( section, par[1], ipar[1], refs ); if ( nb >= 1 ) { - string npar[3]; + string npar[3]; unsigned long nipar[2]; - IRegistry* pR = pObj->registry(); - auto dataMgr = SmartIF<IDataManagerSvc>{pR->dataSvc()}; - LinkManager* mgr = pObj->linkMgr(); + IRegistry* pR = pObj->registry(); + auto dataMgr = SmartIF<IDataManagerSvc>{pR->dataSvc()}; + LinkManager* mgr = pObj->linkMgr(); for ( const auto& i : refs.links ) mgr->addLink( con->getLink( i ), nullptr ); for ( auto& r : refs.refs ) { npar[0] = con->getDb( r.dbase ); @@ -517,7 +517,7 @@ StatusCode RootCnvSvc::i__fillObjRefs( IOpaqueAddress* pA, DataObject* pObj ) nipar[0] = 0; nipar[1] = r.entry; IOpaqueAddress* nPA = nullptr; - StatusCode sc = addressCreator()->createAddress( r.svc, r.clid, npar, nipar, nPA ); + StatusCode sc = addressCreator()->createAddress( r.svc, r.clid, npar, nipar, nPA ); if ( sc.isSuccess() ) { if ( log().level() <= MSG::VERBOSE ) log() << MSG::VERBOSE << dataMgr.as<IService>()->name() << " -> Register:" << pA->registry()->identifier() diff --git a/RootCnv/src/RootDataConnection.cpp b/RootCnv/src/RootDataConnection.cpp index fc4941d11f3507c81edd9f8485297da8f181a67a..1a78e9ec86cc7d9494fbc1fec0cf34196acc0935 100644 --- a/RootCnv/src/RootDataConnection.cpp +++ b/RootCnv/src/RootDataConnection.cpp @@ -63,7 +63,7 @@ static bool match_wild( const char* str, const char* pat ) // static const std::array<char, 256> table = init_table(); const char *s, *p; - bool star = false; + bool star = false; loopStart: for ( s = str, p = pat; *s; ++s, ++p ) { switch ( *p ) { @@ -96,10 +96,10 @@ starCheck: long RootConnectionSetup::setCompression( const std::string& compression ) { #if ROOT_VERSION_CODE >= ROOT_VERSION( 5, 33, 0 ) - int res = 0, level = ROOT::CompressionSettings( ROOT::kLZMA, 6 ); + int res = 0, level = ROOT::CompressionSettings( ROOT::kLZMA, 6 ); auto idx = compression.find( ':' ); if ( idx != string::npos ) { - string alg = compression.substr( 0, idx ); + string alg = compression.substr( 0, idx ); ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting; if ( strcasecmp( alg.c_str(), "ZLIB" ) == 0 ) alg_code = ROOT::kZLIB; @@ -237,8 +237,8 @@ StatusCode RootDataConnection::connectRead() #endif } if ( !sc.isSuccess() ) return sc; - bool need_fid = m_fid == m_pfn; - string fid = m_fid; + bool need_fid = m_fid == m_pfn; + string fid = m_fid; m_mergeFIDs.clear(); for ( auto& elem : m_params ) { if ( elem.first == "FID" ) { @@ -370,8 +370,8 @@ TTree* RootDataConnection::getSection( CSTR section, bool create ) // t->SetAutoFlush(100); } if ( section == m_setup->loadSection && cacheSize > -2 ) { - MsgStream& msg = msgSvc(); - int learnEntries = m_setup->learnEntries; + MsgStream& msg = msgSvc(); + int learnEntries = m_setup->learnEntries; t->SetCacheSize( cacheSize ); t->SetCacheLearnEntries( learnEntries ); msg << MSG::DEBUG; @@ -392,8 +392,8 @@ TTree* RootDataConnection::getSection( CSTR section, bool create ) t->AddBranchToCache( "*", kTRUE ); } else { for ( TIter it( t->GetListOfBranches() ); it.Next(); ) { - const char* n = ( (TNamed*)( *it ) )->GetName(); - bool add = false, veto = false; + const char* n = ( (TNamed*)( *it ) )->GetName(); + bool add = false, veto = false; for ( const auto& i : cB ) { if ( !match_wild( n, ( i ).c_str() ) ) continue; add = true; @@ -427,7 +427,7 @@ TBranch* RootDataConnection::getBranch( CSTR section, CSTR branch_name, TClass* string n = branch_name; std::replace_if( std::begin( n ), std::end( n ), []( const char c ) { return !isalnum( c ); }, '_' ); n += "."; - TTree* t = getSection( section, true ); + TTree* t = getSection( section, true ); TBranch* b = t->GetBranch( n.c_str() ); if ( !b && cl && m_file->IsWritable() ) { b = t->Branch( n.c_str(), cl->GetName(), (void*)( ptr ? &ptr : nullptr ), buff_siz, split_lvl ); @@ -531,8 +531,8 @@ int RootDataConnection::loadObj( CSTR section, CSTR cnt, unsigned long entry, Da } #endif } else if ( nb == 0 && pObj->clID() == CLID_DataObject ) { - TFile* f = b->GetFile(); - int vsn = f->GetVersion(); + TFile* f = b->GetFile(); + int vsn = f->GetVersion(); if ( vsn < 52400 ) { // For Gaudi v21r5 (ROOT 5.24.00b) DataObject::m_version was not written! // Still this call be well be successful. @@ -581,8 +581,8 @@ RootDataConnection::getMergeSection( const string& container, int entry ) const // string container = cont[0]=='/' ? cont.substr(1,idx==string::npos?idx:idx-1) : cont; auto i = m_mergeSects.find( container ); if ( i != m_mergeSects.end() ) { - size_t cnt = 0; - const ContainerSections& s = ( *i ).second; + size_t cnt = 0; + const ContainerSections& s = ( *i ).second; for ( auto j = s.cbegin(); j != s.cend(); ++j, ++cnt ) { const ContainerSection& c = *j; if ( entry >= c.start && entry < ( c.start + c.length ) ) { diff --git a/RootCnv/src/RootDatabaseCnv.cpp b/RootCnv/src/RootDatabaseCnv.cpp index ce706fbc98c287aa924abc3552e63e4e09fcdcf6..62e6b47f4274b7efdbaedfb2ea8edea276cd32c7 100644 --- a/RootCnv/src/RootDatabaseCnv.cpp +++ b/RootCnv/src/RootDatabaseCnv.cpp @@ -32,20 +32,20 @@ StatusCode RootDatabaseCnv::createObj( IOpaqueAddress* pAddr, DataObject*& refpO { StatusCode status = StatusCode::FAILURE; if ( pAddr ) { - RootDataConnection* con = nullptr; - IRegistry* pReg = pAddr->registry(); - const unsigned long* ipars = pAddr->ipar(); - const string* spars = pAddr->par(); - char mode = char( ipars[1] ); - string fname = spars[0]; - string oname = pReg->name(); - bool recrea = mode == 'R'; - bool create = mode == 'N'; - bool update = mode == 'U'; - bool read = mode == 'O'; - const CLID& clid = objType(); - status = StatusCode::SUCCESS; - string cntName = containerName( pReg ); + RootDataConnection* con = nullptr; + IRegistry* pReg = pAddr->registry(); + const unsigned long* ipars = pAddr->ipar(); + const string* spars = pAddr->par(); + char mode = char( ipars[1] ); + string fname = spars[0]; + string oname = pReg->name(); + bool recrea = mode == 'R'; + bool create = mode == 'N'; + bool update = mode == 'U'; + bool read = mode == 'O'; + const CLID& clid = objType(); + status = StatusCode::SUCCESS; + string cntName = containerName( pReg ); if ( create ) { m_dbMgr->connectDatabase( fname, IDataConnection::CREATE, &con ).ignore(); status = saveDescription( fname, cntName, "File containing statistics results.", "", clid ); diff --git a/RootCnv/src/RootDirectoryCnv.cpp b/RootCnv/src/RootDirectoryCnv.cpp index 5951422a94cc9363d27b07ed5e506aa12c53393d..59017bf2d6389166f99085af922fe3deec7e742b 100644 --- a/RootCnv/src/RootDirectoryCnv.cpp +++ b/RootCnv/src/RootDirectoryCnv.cpp @@ -65,17 +65,17 @@ StatusCode RootDirectoryCnv::fillObjRefs( IOpaqueAddress* pAddr, DataObject* pOb StatusCode RootDirectoryCnv::updateObjRefs( IOpaqueAddress* pAddr, DataObject* pObject ) { typedef vector<RootNTupleDescriptor*> REFS; - REFS refs; - StatusCode status = StatusCode( StatusCode::FAILURE, true ); + REFS refs; + StatusCode status = StatusCode( StatusCode::FAILURE, true ); if ( pAddr ) { IRegistry* pReg = pAddr->registry(); if ( pReg ) { typedef vector<IRegistry*> Leaves; - string ident = pReg->identifier(); - string fname = fileName( pReg ); - string cntName = containerName( pReg ); - RootDataConnection* con = nullptr; - Leaves leaves; + string ident = pReg->identifier(); + string fname = fileName( pReg ); + string cntName = containerName( pReg ); + RootDataConnection* con = nullptr; + Leaves leaves; status = m_dbMgr->connectDatabase( fname, IDataConnection::READ, &con ); if ( status.isSuccess() ) { TBranch* b = con->getBranch( "##Descriptors", "GaudiStatisticsDescription" ); @@ -112,7 +112,7 @@ StatusCode RootDirectoryCnv::updateObjRefs( IOpaqueAddress* pAddr, DataObject* p IOpaqueAddress* pA = nullptr; if ( ref->clid == CLID_StatisticsDirectory || ref->clid == CLID_StatisticsFile || ref->clid == CLID_RowWiseTuple || ref->clid == CLID_ColumnWiseTuple ) { - string spar[] = {fname, ref->container}; + string spar[] = {fname, ref->container}; unsigned long ipar[] = {~0x0UL, ~0x0UL}; status = m_dbMgr->createAddress( repSvcType(), ref->clid, spar, ipar, pA ); } diff --git a/RootCnv/src/RootEvtSelector.cpp b/RootCnv/src/RootEvtSelector.cpp index c7a166645770dd59dcf38126ad5f5771e6747b9c..fe6e9b07a464ed50a234bfd4262f86f4c1aafe28 100644 --- a/RootCnv/src/RootEvtSelector.cpp +++ b/RootCnv/src/RootEvtSelector.cpp @@ -121,7 +121,7 @@ StatusCode RootEvtSelector::initialize() if ( !ipers ) { return error( "Unable to locate IPersistencySvc interface of " + m_persName ); } - IConversionSvc* cnvSvc = nullptr; + IConversionSvc* cnvSvc = nullptr; Gaudi::Utils::TypeNameString itm( m_cnvSvcName ); status = ipers->getService( itm.name(), cnvSvc ); if ( !status.isSuccess() ) { @@ -180,8 +180,8 @@ StatusCode RootEvtSelector::next( Context& ctxt ) const pCtxt->setEntry( -1 ); if ( fileit != pCtxt->files().end() ) { RootDataConnection* con = nullptr; - string in = *fileit; - StatusCode sc = m_dbMgr->connectDatabase( in, IDataConnection::READ, &con ); + string in = *fileit; + StatusCode sc = m_dbMgr->connectDatabase( in, IDataConnection::READ, &con ); if ( sc.isSuccess() ) { string section = m_rootName[0] == '/' ? m_rootName.substr( 1 ) : m_rootName; b = con->getBranch( section, m_rootName ); @@ -197,7 +197,7 @@ StatusCode RootEvtSelector::next( Context& ctxt ) const } return StatusCode::FAILURE; } - long ent = pCtxt->entry(); + long ent = pCtxt->entry(); Long64_t nent = b->GetEntries(); if ( nent > ( ent + 1 ) ) { pCtxt->setEntry( ++ent ); @@ -277,7 +277,7 @@ StatusCode RootEvtSelector::createAddress( const Context& ctxt, IOpaqueAddress*& if ( ent >= 0 ) { auto fileit = pctxt->fileIterator(); if ( fileit != pctxt->files().end() ) { - const string par[2] = {pctxt->fid(), m_rootName}; + const string par[2] = {pctxt->fid(), m_rootName}; const unsigned long ipar[2] = {0, (unsigned long)ent}; return m_dbMgr->createAddress( m_dbMgr->repSvcType(), m_rootCLID, &par[0], &ipar[0], pAddr ); } @@ -302,9 +302,9 @@ StatusCode RootEvtSelector::releaseContext( Context*& ctxt ) const // the state of the context in a way to point to the new list. StatusCode RootEvtSelector::resetCriteria( const string& criteria, Context& context ) const { - MsgStream log( msgSvc(), name() ); + MsgStream log( msgSvc(), name() ); RootEvtSelectorContext* ctxt = dynamic_cast<RootEvtSelectorContext*>( &context ); - string db, typ, item, sel, stmt, aut, addr; + string db, typ, item, sel, stmt, aut, addr; if ( ctxt ) { if ( criteria.compare( 0, 5, "FILE " ) == 0 ) { // The format for the criteria is: @@ -341,7 +341,7 @@ StatusCode RootEvtSelector::resetCriteria( const string& criteria, Context& cont // FILE filename1, filename2 ... // JOBID number1-number2, number3, ... RootEvtSelectorContext::Files files; - string rest = db; + string rest = db; files.clear(); while ( true ) { int ipos = rest.find_first_not_of( " ," ); diff --git a/RootCnv/src/RootIOHandler.cpp b/RootCnv/src/RootIOHandler.cpp index 164955f0794fdb5e38c4cc6c4e2d9e23acee4042..aa11bffa91ee92f76561505623dc7ffc17d99a79 100644 --- a/RootCnv/src/RootIOHandler.cpp +++ b/RootCnv/src/RootIOHandler.cpp @@ -27,8 +27,8 @@ using namespace std; namespace GaudiRoot { static const DataObject* last_link_object = nullptr; - static int last_link_hint = -1; - void resetLastLink() + static int last_link_hint = -1; + void resetLastLink() { last_link_object = nullptr; last_link_hint = -1; @@ -45,9 +45,9 @@ namespace GaudiRoot } union RefAccessor { - void* Ptr; - SmartRefBase* Base; - SmartRef<DataObject>* ObjectRef; + void* Ptr; + SmartRefBase* Base; + SmartRef<DataObject>* ObjectRef; SmartRef<ContainedObject>* ContainedRef; RefAccessor( void* obj ) { Ptr = obj; } }; @@ -93,8 +93,8 @@ namespace GaudiRoot void IOHandler<SmartRefBase>::get( TBuffer& b, void* obj ) { RefAccessor r( obj ); - UInt_t start, count; - Version_t version = b.ReadVersion( &start, &count, m_root ); + UInt_t start, count; + Version_t version = b.ReadVersion( &start, &count, m_root ); m_root->ReadBuffer( b, obj, version, start, count ); switch ( r.Base->objectType() ) { case SmartRefBase::DATAOBJECT: @@ -112,10 +112,10 @@ namespace GaudiRoot template <> void IOHandler<SmartRefBase>::put( TBuffer& b, void* obj ) { - RefAccessor r( obj ); + RefAccessor r( obj ); ContainedObject* p; - DataObject *curr, *pDO; - int hint, link; + DataObject * curr, *pDO; + int hint, link; curr = Gaudi::getCurrentDataObject(); pDO = r.ObjectRef->data(); @@ -153,7 +153,7 @@ namespace GaudiRoot return; } else if ( pDO ) { LinkManager* mgr = curr->linkMgr(); - IRegistry* reg = pDO->registry(); + IRegistry* reg = pDO->registry(); if ( reg && mgr ) { hint = mgr->addLink( reg->identifier(), pDO ); last_link_hint = hint; @@ -170,7 +170,7 @@ namespace GaudiRoot template <> void IOHandler<ContainedObject>::get( TBuffer& b, void* obj ) { - UInt_t start, count; + UInt_t start, count; Version_t version = b.ReadVersion( &start, &count, m_root ); m_root->ReadBuffer( b, obj, version, start, count ); ContainedObject* p = (ContainedObject*)obj; @@ -186,7 +186,7 @@ namespace GaudiRoot template <> void IOHandler<pool::Token>::get( TBuffer& b, void* obj ) { - UInt_t start, count; + UInt_t start, count; pool::Token* t = (pool::Token*)obj; b.ReadVersion( &start, &count, m_root ); b.ReadFastArray( &t->m_oid.first, 2 ); @@ -202,8 +202,8 @@ namespace GaudiRoot template <class T> static bool makeStreamer( MsgStream& log ) { - string cl_name = System::typeinfoName( typeid( T ) ); - TClass* c = gROOT->GetClass( cl_name.c_str() ); + string cl_name = System::typeinfoName( typeid( T ) ); + TClass* c = gROOT->GetClass( cl_name.c_str() ); if ( c ) { c->AdoptStreamer( new IOHandler<T>( c ) ); log << MSG::DEBUG << "Installed IOHandler for class " << cl_name << endmsg; diff --git a/RootCnv/src/RootNTupleCnv.cpp b/RootCnv/src/RootNTupleCnv.cpp index 8746c73a8a5c8502d5fa50265f0de480b6a5c042..d801b2aaa8349affaec87b225610415fa35ca85d 100644 --- a/RootCnv/src/RootNTupleCnv.cpp +++ b/RootCnv/src/RootNTupleCnv.cpp @@ -56,11 +56,11 @@ static inline istream& operator>>(istream& is, string& /*pObj*/) template <class TYP> static StatusCode createItem( TTree* tree, INTuple* tuple, istream& is, const string& name, bool add, const TYP& null ) { - string idxName; - long len, ndim, dim[4], hasIdx, idxLow, idxLen; - long dim1 = 1, dim2 = 1; + string idxName; + long len, ndim, dim[4], hasIdx, idxLow, idxLen; + long dim1 = 1, dim2 = 1; INTupleItem* it = nullptr; - char c; + char c; is >> len >> c >> ndim >> c >> hasIdx >> c; if ( hasIdx ) { getline( is, idxName, ';' ) >> idxLow >> c >> idxLen >> c; @@ -108,7 +108,7 @@ static inline void putRange( ostream& os, NTuple::_Data<T>* it ) static inline string _tr( string s ) { string local = std::move( s ); - auto p = std::begin( local ); + auto p = std::begin( local ); if ( local.compare( 0, 7, "<local>" ) == 0 ) p += 7; std::replace_if( p, std::end( local ), []( const char& c ) { return !isalnum( c ); }, '_' ); return local; @@ -117,19 +117,19 @@ static inline string _tr( string s ) // Converter overrides: Update the references of an updated transient object. StatusCode RootNTupleCnv::createObj( IOpaqueAddress* pAddr, DataObject*& refpObject ) { - StatusCode status = S_FAIL; - RootDataConnection* con = nullptr; - IRegistry* pRegistry = pAddr->registry(); - RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); - string path = fileName( pRegistry ); - string cntName = containerName( pRegistry ); - string* par = const_cast<string*>( pAddr->par() ); - status = m_dbMgr->connectDatabase( path, IDataConnection::READ, &con ); + StatusCode status = S_FAIL; + RootDataConnection* con = nullptr; + IRegistry* pRegistry = pAddr->registry(); + RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); + string path = fileName( pRegistry ); + string cntName = containerName( pRegistry ); + string* par = const_cast<string*>( pAddr->par() ); + status = m_dbMgr->connectDatabase( path, IDataConnection::READ, &con ); if ( status.isSuccess() ) { - string par_val, par_guid; + string par_val, par_guid; TBranch* b = con->getBranch( "##Descriptors", "GaudiStatisticsDescription" ); if ( b ) { - RootNTupleDescriptor* ptr; + RootNTupleDescriptor* ptr; std::unique_ptr<RootNTupleDescriptor> dsc( ptr = new RootNTupleDescriptor() ); b->SetAddress( &ptr ); for ( Long64_t i = 0, nent = b->GetEntries(); i < nent; ++i ) { @@ -150,12 +150,12 @@ StatusCode RootNTupleCnv::createObj( IOpaqueAddress* pAddr, DataObject*& refpObj if ( !par_val.empty() ) { auto ntupleSvc = dataProvider().as<INTupleSvc>(); if ( ntupleSvc ) { - char c; - CLID clid; - int siz, typ; - string title; + char c; + CLID clid; + int siz, typ; + string title; NTuple::Tuple* nt = nullptr; - istringstream is( par_val ); + istringstream is( par_val ); getline( is, title, ';' ) >> clid >> c >> siz >> c; status = ntupleSvc->create( clid, title, nt ); for ( int j = 0; j < siz && status.isSuccess(); j++ ) { @@ -243,8 +243,8 @@ StatusCode RootNTupleCnv::createObj( IOpaqueAddress* pAddr, DataObject*& refpObj // Update the transient object: NTuples end here when reading records StatusCode RootNTupleCnv::updateObj( IOpaqueAddress* pAddr, DataObject* pObj ) { - INTuple* tupl = dynamic_cast<INTuple*>( pObj ); - RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); + INTuple* tupl = dynamic_cast<INTuple*>( pObj ); + RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); if ( nullptr != tupl && nullptr != rpA ) { RootDataConnection* con = (RootDataConnection*)rpA->ipar()[0]; if ( con ) { @@ -270,15 +270,15 @@ StatusCode RootNTupleCnv::updateObj( IOpaqueAddress* pAddr, DataObject* pObj ) StatusCode RootNTupleCnv::i__updateObjRoot( RootAddress* rpA, INTuple* tupl, TTree* tree, RootDataConnection* con ) { typedef INTuple::ItemContainer Cont; - const string* par = rpA->par(); - unsigned long* ipar = const_cast<unsigned long*>( rpA->ipar() ); + const string* par = rpA->par(); + unsigned long* ipar = const_cast<unsigned long*>( rpA->ipar() ); ++ipar[1]; if ( Long64_t( ipar[1] ) <= tree->GetEntries() ) { - GenericAddress* pA = nullptr; - Cont& it = tupl->items(); - size_t k, n = it.size(); + GenericAddress* pA = nullptr; + Cont& it = tupl->items(); + size_t k, n = it.size(); vector<RootRef*> paddr( n ); - vector<RootRef> addr( n ); + vector<RootRef> addr( n ); for ( k = 0; k < n; ++k ) { Cont::value_type j = it[k]; switch ( j->type() ) { @@ -291,8 +291,8 @@ StatusCode RootNTupleCnv::i__updateObjRoot( RootAddress* rpA, INTuple* tupl, TTr } } - ULong64_t last = (ULong64_t)tree->GetEntries(); - ISelectStatement* sel = tupl->selector(); + ULong64_t last = (ULong64_t)tree->GetEntries(); + ISelectStatement* sel = tupl->selector(); if ( sel ) { string criteria = ( sel && ( sel->type() & ISelectStatement::STRING ) ) ? sel->criteria() : string( "" ); if ( !( criteria.length() == 0 || criteria == "*" ) ) { @@ -314,8 +314,8 @@ StatusCode RootNTupleCnv::i__updateObjRoot( RootAddress* rpA, INTuple* tupl, TTr if ( ipar[1] < last ) { unsigned long entry = ipar[1]; if ( tree->GetEntry( entry ) > 1 ) { - RootRef* r = nullptr; - string* spar = nullptr; + RootRef* r = nullptr; + string* spar = nullptr; for ( k = 0; k < n; ++k ) { Cont::value_type j = it[k]; switch ( j->type() ) { @@ -378,29 +378,29 @@ StatusCode RootNTupleCnv::createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) return S_OK; } - RootDataConnection* con = nullptr; - string path = fileName( pRegistry ); - string cntName = containerName( pRegistry ); - string secName = cntName.c_str(); - const INTuple* nt = dynamic_cast<const INTuple*>( pObj ); - StatusCode status = m_dbMgr->connectDatabase( path, IDataConnection::UPDATE, &con ); + RootDataConnection* con = nullptr; + string path = fileName( pRegistry ); + string cntName = containerName( pRegistry ); + string secName = cntName.c_str(); + const INTuple* nt = dynamic_cast<const INTuple*>( pObj ); + StatusCode status = m_dbMgr->connectDatabase( path, IDataConnection::UPDATE, &con ); if ( !status.isSuccess() ) { return makeError( "Failed to access Tuple file:" + path ); } TTree* tree = con->getSection( _tr( secName ), true ); if ( nullptr != nt ) { const INTuple::ItemContainer& items = nt->items(); - ostringstream os; - size_t item_no; - string desc; + ostringstream os; + size_t item_no; + string desc; os << nt->title() << ';' << pObj->clID() << ';' << items.size() << ';'; map<string, TBranch*> branches; TBranch* b = nullptr; for ( item_no = 0; item_no < items.size(); ++item_no ) { INTupleItem* it = items[item_no]; if ( it->hasIndex() ) { - INTupleItem* itm = it->indexItem(); - const string& n = itm->name(); + INTupleItem* itm = it->indexItem(); + const string& n = itm->name(); switch ( itm->type() ) { case DataTypeInfo::UCHAR: desc = n + "/b"; @@ -441,8 +441,8 @@ StatusCode RootNTupleCnv::createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) } } for ( item_no = 0; item_no < items.size(); ++item_no ) { - INTupleItem* it = items[item_no]; - const string& n = it->name(); + INTupleItem* it = items[item_no]; + const string& n = it->name(); os << '{' << n << ';' << it->type() << ';' << it->length() << ';' << it->ndim() << ';' << it->hasIndex() << ';'; if ( it->hasIndex() ) { os << it->index() << ';'; @@ -555,7 +555,7 @@ StatusCode RootNTupleCnv::createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) os << '}'; if ( branches.find( n ) == branches.end() ) { string tmp; - char text[32]; + char text[32]; switch ( it->ndim() ) { case 0: desc = n + desc; @@ -593,7 +593,7 @@ StatusCode RootNTupleCnv::createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) if ( status.isSuccess() ) { status = m_dbMgr->commitOutput( path, true ); if ( status.isSuccess() ) { - string spar[] = {path, cntName}; + string spar[] = {path, cntName}; unsigned long ipar[] = {(unsigned long)con, ~0x0u}; status = m_dbMgr->createAddress( repSvcType(), pObj->clID(), spar, ipar, pAddr ); if ( status.isSuccess() ) { @@ -616,23 +616,23 @@ StatusCode RootNTupleCnv::createRep( DataObject* pObj, IOpaqueAddress*& pAddr ) StatusCode RootNTupleCnv::fillRepRefs( IOpaqueAddress* pAddr, DataObject* pObj ) { typedef INTuple::ItemContainer Cont; - INTuple* tupl = dynamic_cast<INTuple*>( pObj ); - IRegistry* pReg = pObj->registry(); - RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); + INTuple* tupl = dynamic_cast<INTuple*>( pObj ); + IRegistry* pReg = pObj->registry(); + RootAddress* rpA = dynamic_cast<RootAddress*>( pAddr ); if ( tupl && pReg && rpA ) { - string cntName = containerName( pReg ); - unsigned long* ipar = const_cast<unsigned long*>( pAddr->ipar() ); - RootDataConnection* con = (RootDataConnection*)rpA->ipar()[0]; + string cntName = containerName( pReg ); + unsigned long* ipar = const_cast<unsigned long*>( pAddr->ipar() ); + RootDataConnection* con = (RootDataConnection*)rpA->ipar()[0]; if ( con ) { TTree* tree = rpA->section; if ( tree ) { - Cont& it = tupl->items(); - size_t k, n = it.size(); + Cont& it = tupl->items(); + size_t k, n = it.size(); vector<RootRef*> paddr( n ); - vector<RootRef> addr( n ); + vector<RootRef> addr( n ); for ( k = 0; k < n; ++k ) { - IOpaqueAddress* pA = nullptr; - Cont::value_type j = it[k]; + IOpaqueAddress* pA = nullptr; + Cont::value_type j = it[k]; switch ( j->type() ) { case DataTypeInfo::OBJECT_ADDR: pA = ( *(IOpaqueAddress**)j->buffer() ); @@ -715,15 +715,15 @@ inline int load<string>( int blob, IOBuffer& s, void* ptr ) StatusCode RootNTupleCnv::i__updateObjPool( RootAddress* rpA, INTuple* tupl, TTree* tree, RootDataConnection* con ) { typedef INTuple::ItemContainer Cont; - const string* par = rpA->par(); - unsigned long* ipar = const_cast<unsigned long*>( rpA->ipar() ); + const string* par = rpA->par(); + unsigned long* ipar = const_cast<unsigned long*>( rpA->ipar() ); ++ipar[1]; if ( Long64_t( ipar[1] ) <= tree->GetEntries() ) { - Cont& it = tupl->items(); - size_t k, n = it.size(); + Cont& it = tupl->items(); + size_t k, n = it.size(); vector<PoolDbTokenWrap*> paddr( n ); - vector<PoolDbTokenWrap> addr( n ); - vector<int> blob_items( n, 0 ); + vector<PoolDbTokenWrap> addr( n ); + vector<int> blob_items( n, 0 ); for ( k = 0; k < n; ++k ) { Cont::value_type j = it[k]; switch ( j->type() ) { @@ -736,8 +736,8 @@ StatusCode RootNTupleCnv::i__updateObjPool( RootAddress* rpA, INTuple* tupl, TTr break; } } - ULong64_t last = (ULong64_t)tree->GetEntries(); - ISelectStatement* sel = tupl->selector(); + ULong64_t last = (ULong64_t)tree->GetEntries(); + ISelectStatement* sel = tupl->selector(); if ( sel ) { string criteria = ( sel && ( sel->type() & ISelectStatement::STRING ) ) ? sel->criteria() : string( "" ); if ( !( criteria.length() == 0 || criteria == "*" ) ) { @@ -758,18 +758,18 @@ StatusCode RootNTupleCnv::i__updateObjPool( RootAddress* rpA, INTuple* tupl, TTr } } if ( ipar[1] < last ) { - IOBuffer blob; + IOBuffer blob; UCharDbArray* pblob = &blob.d; tree->GetBranch( "BlobData" )->SetAddress( &pblob ); if ( tree->GetEntry( ipar[1] ) > 1 ) { int sc = 0; blob.start(); for ( k = 0; k < n; ++k ) { - Cont::value_type j = it[k]; - char* buf = (char*)j->buffer(); + Cont::value_type j = it[k]; + char* buf = (char*)j->buffer(); switch ( j->type() ) { case DataTypeInfo::OBJECT_ADDR: { - RootRef r = con->tool()->poolRef( addr[k].token.m_oid.first ); + RootRef r = con->tool()->poolRef( addr[k].token.m_oid.first ); GenericAddress* pA = ( *(GenericAddress**)buf ); if ( pA ) { // Fill only if item is connected! string* spar = (string*)pA->par(); diff --git a/RootCnv/src/RootPerfMonSvc.cpp b/RootCnv/src/RootPerfMonSvc.cpp index f46ccb369435ca927f211e1b785be90f5d61dce3..2d38bb3ccb16738e404a88c871570309781e28f4 100644 --- a/RootCnv/src/RootPerfMonSvc.cpp +++ b/RootCnv/src/RootPerfMonSvc.cpp @@ -44,7 +44,7 @@ StatusCode RootPerfMonSvc::error( CSTR msg ) // Initialize the Db data persistency service StatusCode RootPerfMonSvc::initialize() { - string cname; + string cname; StatusCode status = Service::initialize(); if ( !status.isSuccess() ) return error( "Failed to initialize Service base class." ); m_log.reset( new MsgStream( msgSvc(), name() ) ); @@ -119,7 +119,7 @@ StatusCode RootPerfMonSvc::stop() auto map = new TMap(); for ( const auto& i : m_outputs ) { const char* fn = i.c_str(); - Long_t id, siz, flags, tim; + Long_t id, siz, flags, tim; if ( 0 == gSystem->GetPathInfo( fn, &id, &siz, &flags, &tim ) ) { ::sprintf( text, "%ld", siz ); map->Add( new TObjString( fn ), new TObjString( text ) ); diff --git a/RootCnv/src/RootStatCnv.cpp b/RootCnv/src/RootStatCnv.cpp index 2331498cd111feede051050305538a01741025b7..9bb66a01497639fd08ce6398c061d0cf48c2f6eb 100644 --- a/RootCnv/src/RootStatCnv.cpp +++ b/RootCnv/src/RootStatCnv.cpp @@ -51,9 +51,9 @@ StatusCode RootStatCnv::finalize() // Retrieve the name of the container a given object is placed into const string RootStatCnv::containerName( IRegistry* pReg ) const { - const string& path = pReg->identifier(); - long loc = path.find( '/', 1 ); - string local = "<local>"; + const string& path = pReg->identifier(); + long loc = path.find( '/', 1 ); + string local = "<local>"; // local = ""; if ( loc > 0 ) { loc = path.find( '/', ++loc ); @@ -69,7 +69,7 @@ const string RootStatCnv::containerName( IRegistry* pReg ) const // Retrieve the name of the file a given object is placed into const string RootStatCnv::fileName( IRegistry* pReg ) const { - string path = topLevel( pReg ); + string path = topLevel( pReg ); DataObject* pObj = nullptr; dataProvider()->retrieveObject( path, pObj ); if ( pObj ) { @@ -116,12 +116,12 @@ StatusCode RootStatCnv::makeError( const std::string& msg, bool throw_exc ) cons StatusCode RootStatCnv::saveDescription( const string& path, const string& ident, const string& desc, const string& opt, const CLID& clid ) { - RootDataConnection* con = nullptr; - StatusCode status = m_dbMgr->connectDatabase( path, IDataConnection::UPDATE, &con ); + RootDataConnection* con = nullptr; + StatusCode status = m_dbMgr->connectDatabase( path, IDataConnection::UPDATE, &con ); if ( status.isSuccess() ) { TClass* cl = gROOT->GetClass( "Gaudi::RootNTupleDescriptor", kTRUE ); if ( cl ) { - RootNTupleDescriptor* ptr; + RootNTupleDescriptor* ptr; std::unique_ptr<RootNTupleDescriptor> dsc( ptr = new RootNTupleDescriptor() ); TBranch* b = con->getBranch( "##Descriptors", "GaudiStatisticsDescription", cl, ptr, 512, 0 ); if ( b ) { diff --git a/RootCnv/src/RootTool.h b/RootCnv/src/RootTool.h index 80f75f5d7aebfbcf5ddf183686ad8c17d2ea7bed..d9845406ce42b04bc78557f684f89775bbc4b8aa 100644 --- a/RootCnv/src/RootTool.h +++ b/RootCnv/src/RootTool.h @@ -25,7 +25,7 @@ namespace Gaudi std::string n = branch_name + "."; for ( int i = 0, m = n.length() - 1; i < m; ++i ) if ( !isalnum( n[i] ) ) n[i] = '_'; - TTree* t = c->getSection( section ); + TTree* t = c->getSection( section ); TBranch* b = t ? t->GetBranch( n.c_str() ) : 0; if ( !b ) b = t ? t->GetBranch( branch_name.c_str() ) : 0; if ( b ) b->SetAutoDelete( kFALSE ); @@ -34,7 +34,7 @@ namespace Gaudi /// Load references object from file int loadRefs( CSTR section, CSTR cnt, unsigned long entry, RootObjectRefs& refs ) override { - TBranch* b = getBranch( section, cnt + "#R" ); + TBranch* b = getBranch( section, cnt + "#R" ); RootObjectRefs* prefs = &refs; if ( b ) { b->SetAddress( &prefs ); @@ -62,7 +62,7 @@ namespace Gaudi if ( r.container ) r.container += ls.first->container; if ( r.link ) r.link += ls.first->link; const string& rc = c->getCont( r.container ); - auto k = ms.find( rc ); + auto k = ms.find( rc ); if ( k != ms.end() ) { const auto& cs = ( *k ).second; r.entry = ( ls.first->entry >= 0 && ls.first->entry < (int)cs.size() ) @@ -108,7 +108,7 @@ namespace Gaudi template <class C, class F> StatusCode readBranch( TTree* t, const char* nam, C& v, F pmf ) { - char text[2048]; + char text[2048]; TBranch* b = t->GetBranch( nam ); if ( b ) { TLeaf* l = b->GetLeaf( nam ); @@ -139,11 +139,11 @@ namespace Gaudi size_t id2 = dsc.find( "[START=" ); size_t id3 = dsc.find( "[LEN=" ); if ( id1 != string::npos && id2 != string::npos && id3 != string::npos ) { - string cnt = dsc.substr( id1 + 5, id2 - 1 - 5 ); - int section_start = std::stoi( dsc.substr( id2 + 7, id3 - id2 - 8 ) ); - int section_length = std::stoi( dsc.substr( id3 + 5, dsc.find( "]", id3 + 5 ) - id3 - 5 ) ); - e.first = cnt; - e.second = ContainerSection( section_start, section_length ); + string cnt = dsc.substr( id1 + 5, id2 - 1 - 5 ); + int section_start = std::stoi( dsc.substr( id2 + 7, id3 - id2 - 8 ) ); + int section_length = std::stoi( dsc.substr( id3 + 5, dsc.find( "]", id3 + 5 ) - id3 - 5 ) ); + e.first = cnt; + e.second = ContainerSection( section_start, section_length ); return true; } } @@ -154,12 +154,12 @@ namespace Gaudi /// Build merge sections from the Sections table entries void analyzeMergeMap( StringVec& tmp ) { - LinkSections& ls = linkSections(); + LinkSections& ls = linkSections(); MergeSections& ms = mergeSections(); pair<string, ContainerSection> e; MsgStream& msg = msgSvc(); - RootRef r; - int cnt = 0; + RootRef r; + int cnt = 0; ls.clear(); ms.clear(); msg << MSG::VERBOSE; @@ -190,9 +190,9 @@ namespace Gaudi /// Read reference tables StatusCode readRefs() override { - TTree* t = (TTree*)c->file()->Get( "Sections" ); + TTree* t = (TTree*)c->file()->Get( "Sections" ); StatusCode sc( StatusCode::SUCCESS, true ); - StringVec tmp; + StringVec tmp; if ( t && !( sc = readBranch( t, "Sections", tmp, &RootTool::addEntry ) ).isSuccess() ) return sc; else if ( refs() ) { @@ -213,12 +213,12 @@ namespace Gaudi template <class C, class F> StatusCode saveBranch( const char* nam, C& v, F pmf ) { - Long64_t i, n; - string val, typ = nam; - StatusCode sc = StatusCode::SUCCESS; + Long64_t i, n; + string val, typ = nam; + StatusCode sc = StatusCode::SUCCESS; TDirectory::TContext ctxt( c->file() ); - TBranch* b = refs()->GetBranch( nam ); - if ( !b ) b = refs()->Branch( nam, 0, ( typ + "/C" ).c_str() ); + TBranch* b = refs()->GetBranch( nam ); + if ( !b ) b = refs()->Branch( nam, 0, ( typ + "/C" ).c_str() ); if ( b ) { for ( i = b->GetEntries(), n = Long64_t( v.size() ); i < n; ++i ) { val = ( this->*pmf )( v[size_t( i )] ); diff --git a/RootCnv/src/SysProcStat.cpp b/RootCnv/src/SysProcStat.cpp index b64635749c4fb5a07407a600273b87f72ecff791..a7c3faf50d65b1d2330848d4ee85eb5197202ac0 100644 --- a/RootCnv/src/SysProcStat.cpp +++ b/RootCnv/src/SysProcStat.cpp @@ -19,7 +19,7 @@ SysProcStat::SysProcStat() { update(); } int SysProcStat::update() { FILE* file = fopen( "/proc/self/stat", "r" ); - int par = fscanf( file, "%d %s %c %d %d" + int par = fscanf( file, "%d %s %c %d %d" "%d %d %d %lu %lu" "%lu %lu %lu %lu %lu" "%ld %ld %ld %ld %ld" diff --git a/RootHistCnv/src/NTupleInfo.h b/RootHistCnv/src/NTupleInfo.h index 0bfb90a2da16886af2f85068c8a9e5d3afc9457d..8d547face07bd8b0f73d5de0b1e7bc346c3c8bd0 100644 --- a/RootHistCnv/src/NTupleInfo.h +++ b/RootHistCnv/src/NTupleInfo.h @@ -17,15 +17,15 @@ public: char block[32]; // struct _var { - char name[512][64]; - long dim[512]; - long theDim[512][5]; - long hasIndex[512]; - char index[512][64]; - char type[512]; - long size[512]; - long hasRange[512]; - long irange[512][2]; + char name[512][64]; + long dim[512]; + long theDim[512][5]; + long hasIndex[512]; + char index[512][64]; + char type[512]; + long size[512]; + long hasRange[512]; + long irange[512][2]; double frange[512][2]; template <class TYPE> void getBounds( long i, TYPE& min, TYPE& max, TYPE& null ) const diff --git a/RootHistCnv/src/PersSvc.h b/RootHistCnv/src/PersSvc.h index 1c9d65ab0978650d15d83dcc5b9852c49806c8da..9cd4cb84ec8477ac16fda56b37e1575eadc76eb4 100644 --- a/RootHistCnv/src/PersSvc.h +++ b/RootHistCnv/src/PersSvc.h @@ -37,11 +37,11 @@ namespace RootHistCnv private: // undefFileName is defined in PersSvc.cpp Gaudi::Property<std::string> m_defFileName{this, "OutputFile", undefFileName, "default file name"}; - Gaudi::Property<bool> m_alphaIds{this, "ForceAlphaIds", false, "force alphabetic histograms/ntuple IDs"}; + Gaudi::Property<bool> m_alphaIds{this, "ForceAlphaIds", false, "force alphabetic histograms/ntuple IDs"}; Gaudi::Property<bool> m_outputEnabled{this, "OutputEnabled", true, "Flag to enable/disable the output to file."}; - std::unique_ptr<TFile> m_hfile; ///< Pointer to the ROOT file - bool m_prtWar = false; ///< Already printed a Warning + std::unique_ptr<TFile> m_hfile; ///< Pointer to the ROOT file + bool m_prtWar = false; ///< Already printed a Warning }; } // namespace RootHistCnv diff --git a/RootHistCnv/src/RCWNTupleCnv.cpp b/RootHistCnv/src/RCWNTupleCnv.cpp index 32f101d1d28334042f2fb572285226134024f8fd..76752c85fb157f172035567c28bf3000e32e4560 100644 --- a/RootHistCnv/src/RCWNTupleCnv.cpp +++ b/RootHistCnv/src/RCWNTupleCnv.cpp @@ -84,10 +84,10 @@ StatusCode RootHistCnv::RCWNTupleCnv::book( const std::string& desc, INTuple* nt // Loop over the items - std::string block_name, var_name; - long lowerRange, upperRange; - long size = 0; - long cursize, oldsize = 0; + std::string block_name, var_name; + long lowerRange, upperRange; + long size = 0; + long cursize, oldsize = 0; std::vector<std::string> item_fullname; // std::vector<long> item_size,item_size2; std::vector<long> item_buf_pos, item_buf_len, item_buf_end; @@ -216,8 +216,8 @@ StatusCode RootHistCnv::RCWNTupleCnv::book( const std::string& desc, INTuple* nt // log << MSG::VERBOSE << "\"" << item_fullname[i_item] // << "\" is range limited " << item_range_lower[i_item] << " " // << item_range_upper[i_item] << endmsg; - TLeafI* index = nullptr; - TObject* tobj = br->GetListOfLeaves()->FindObject( item_fullname[i_item].c_str() ); + TLeafI* index = nullptr; + TObject* tobj = br->GetListOfLeaves()->FindObject( item_fullname[i_item].c_str() ); if ( tobj->IsA()->InheritsFrom( "TLeafI" ) ) { index = dynamic_cast<TLeafI*>( tobj ); @@ -396,7 +396,7 @@ StatusCode RootHistCnv::RCWNTupleCnv::load( TTree* tree, INTuple*& refpObject ) // loop over all branches (==leaves) TObjArray* lbr = tree->GetListOfBranches(); - TIter bitr( lbr ); + TIter bitr( lbr ); while ( TObject* tobjb = bitr() ) { TBranch* br = (TBranch*)tobjb; @@ -414,9 +414,9 @@ StatusCode RootHistCnv::RCWNTupleCnv::load( TTree* tree, INTuple*& refpObject ) TIter litr( lf ); while ( TObject* tobj = litr() ) { - bool hasRange = false; - int indexRange = 0; - int itemSize; + bool hasRange = false; + int indexRange = 0; + int itemSize; item = nullptr; // TLeaf* tl = (TLeaf*)tobj; @@ -433,7 +433,7 @@ StatusCode RootHistCnv::RCWNTupleCnv::load( TTree* tree, INTuple*& refpObject ) log << MSG::DEBUG << "loading NTuple item " << itemName; } - int arraySize; + int arraySize; TLeaf* indexLeaf = tl->GetLeafCounter( arraySize ); if ( arraySize == 0 ) { @@ -547,8 +547,8 @@ StatusCode RootHistCnv::RCWNTupleCnv::load( TTree* tree, INTuple*& refpObject ) int ts = 0; for ( const auto& iitr : itemList ) { - TLeaf* leaf = iitr.first; - int isize = iitr.second; + TLeaf* leaf = iitr.first; + int isize = iitr.second; log << MSG::VERBOSE << "setting TBranch " << leaf->GetBranch()->GetName() << " buffer at " << (void*)bufpos << endmsg; diff --git a/RootHistCnv/src/RConverter.cpp b/RootHistCnv/src/RConverter.cpp index 7b5ed6cf60047f408234ec6f3500ba4b13af6171..1c40b8f8aeefb4cf26bf9f004065bb98f5cddb1c 100644 --- a/RootHistCnv/src/RConverter.cpp +++ b/RootHistCnv/src/RConverter.cpp @@ -39,7 +39,7 @@ StatusCode RootHistCnv::RConverter::createDirectory( const std::string& loc ) } std::vector<std::string> lpath; - int i = 1; + int i = 1; auto p = full.find( ":", 0 ); if ( p != std::string::npos ) { @@ -76,9 +76,9 @@ std::string RootHistCnv::RConverter::diskDirectory( const std::string& loc ) { // Get rid of leading /NTUPLES/{INPUT_STREAM} or /stat/{INPUT_STREAM} std::string dir; - long lf1 = loc.find( "/NTUPLES/" ); - long lf2 = loc.find( "/stat/" ); - long ll; + long lf1 = loc.find( "/NTUPLES/" ); + long lf2 = loc.find( "/stat/" ); + long ll; if ( lf1 != -1 ) { ll = loc.find( "/", lf1 + 9 ); @@ -114,7 +114,7 @@ void RootHistCnv::RConverter::setDirectory( const std::string& loc ) //----------------------------------------------------------------------------- { MsgStream log( msgSvc(), "RConverter" ); - TFile* tf = nullptr; + TFile* tf = nullptr; std::string full = diskDirectory( loc ); @@ -125,7 +125,7 @@ void RootHistCnv::RConverter::setDirectory( const std::string& loc ) log << MSG::ERROR << "error getting TFile name " << loc << endmsg; } - int p, i = 1; + int p, i = 1; std::string cur, sdir; gDirectory->cd( "/" ); @@ -191,7 +191,7 @@ StatusCode RootHistCnv::RConverter::createAddress( const std::string& rzdir, con IOpaqueAddress*& refpAddress ) //-------------------------------------------------------------------------- { - auto obj = std::to_string( id ); + auto obj = std::to_string( id ); StatusCode status = createAddress( rzdir, clid, obj, pTobj, refpAddress ); if ( status.isSuccess() ) { unsigned long* ipar = (unsigned long*)refpAddress->ipar(); diff --git a/RootHistCnv/src/RConverter.h b/RootHistCnv/src/RConverter.h index d3800587d54c5adce21b04b92a78ef3dc6e14b4c..df01d05975bc941a6e14bc9f0a4e215088fd6c5d 100644 --- a/RootHistCnv/src/RConverter.h +++ b/RootHistCnv/src/RConverter.h @@ -37,7 +37,7 @@ namespace RootHistCnv StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAddr ) override; /// Inquire storage type static long storageType() { return ROOT_StorageType; } - long repSvcType() const override { return i_repSvcType(); } + long repSvcType() const override { return i_repSvcType(); } StatusCode error( const std::string& msg ); StatusCode regTFile( const std::string, const TFile* ); diff --git a/RootHistCnv/src/RDirectoryCnv.cpp b/RootHistCnv/src/RDirectoryCnv.cpp index 0722cbf8feaa2b51af1ac538b130695acf05208f..6141ee289e2504625918a0f0d500a04e1bb3a6f8 100644 --- a/RootHistCnv/src/RDirectoryCnv.cpp +++ b/RootHistCnv/src/RDirectoryCnv.cpp @@ -74,9 +74,9 @@ StatusCode RootHistCnv::RDirectoryCnv::updateRep( IOpaqueAddress* /* pAddress */ //----------------------------------------------------------------------------- StatusCode RootHistCnv::RDirectoryCnv::fillObjRefs( IOpaqueAddress* pAddr, DataObject* pObj ) { - MsgStream log( msgSvc(), "RDirectoryCnv" ); - IRegistry* pReg = pObj->registry(); - std::string full = pReg->identifier(); + MsgStream log( msgSvc(), "RDirectoryCnv" ); + IRegistry* pReg = pObj->registry(); + std::string full = pReg->identifier(); const std::string& fname = pAddr->par()[0]; TFile* tf = nullptr; @@ -86,16 +86,16 @@ StatusCode RootHistCnv::RDirectoryCnv::fillObjRefs( IOpaqueAddress* pAddr, DataO setDirectory( full ); TIter nextkey( gDirectory->GetListOfKeys() ); while ( TKey* key = (TKey*)nextkey() ) { - IOpaqueAddress* pA = nullptr; - TObject* obj = key->ReadObj(); - std::string title = obj->GetTitle(); - std::string sid = obj->GetName(); - std::string f2 = full + "/" + sid; - int idh = maybe_stol( sid ).get_value_or( 0 ); + IOpaqueAddress* pA = nullptr; + TObject* obj = key->ReadObj(); + std::string title = obj->GetTitle(); + std::string sid = obj->GetName(); + std::string f2 = full + "/" + sid; + int idh = maybe_stol( sid ).get_value_or( 0 ); // introduced by Grigori Rybkine std::string clname = key->GetClassName(); std::string clnm = clname.substr( 0, 3 ); - TClass* isa = obj->IsA(); + TClass* isa = obj->IsA(); if ( isa->InheritsFrom( "TTree" ) ) { createAddress( full, CLID_ColumnWiseTuple, idh, obj, pA ).ignore(); TTree* tree = (TTree*)obj; diff --git a/RootHistCnv/src/RFileCnv.cpp b/RootHistCnv/src/RFileCnv.cpp index eaa9e3bd7eeabcf8867a212dcb68e5c9af86e665..52e4c127767106f78fe9fa43c1267bfa8722c45a 100644 --- a/RootHistCnv/src/RFileCnv.cpp +++ b/RootHistCnv/src/RFileCnv.cpp @@ -29,8 +29,8 @@ StatusCode RootHistCnv::RFileCnv::initialize() { // Set compression level property ... ISvcLocator* svcLoc = Gaudi::svcLocator(); - auto jobSvc = svcLoc->service<IJobOptionsSvc>( "JobOptionsSvc" ); - auto prop = jobSvc->getClientProperty( "RFileCnv", "GlobalCompression" ); + auto jobSvc = svcLoc->service<IJobOptionsSvc>( "JobOptionsSvc" ); + auto prop = jobSvc->getClientProperty( "RFileCnv", "GlobalCompression" ); if ( prop ) m_compLevel = prop->toString(); // initialise base class @@ -42,9 +42,9 @@ StatusCode RootHistCnv::RFileCnv::initialize() StatusCode RootHistCnv::RFileCnv::createObj( IOpaqueAddress* pAddress, DataObject*& refpObject ) //------------------------------------------------------------------------------ { - MsgStream log( msgSvc(), "RFileCnv" ); - unsigned long* ipar = (unsigned long*)pAddress->ipar(); - char mode[2] = {char( ipar[1] ), 0}; + MsgStream log( msgSvc(), "RFileCnv" ); + unsigned long* ipar = (unsigned long*)pAddress->ipar(); + char mode[2] = {char( ipar[1] ), 0}; std::string fname = pAddress->par()[0]; // Container name std::string ooname = pAddress->par()[1]; // Object name @@ -146,7 +146,7 @@ StatusCode RootHistCnv::RFileCnv::createRep( DataObject* pObject, IOpaqueAddress StatusCode RootHistCnv::RFileCnv::updateRep( IOpaqueAddress* pAddress, DataObject* pObject ) //----------------------------------------------------------------------------- { - MsgStream log( msgSvc(), "RFileCnv" ); + MsgStream log( msgSvc(), "RFileCnv" ); std::string ooname = pAddress->par()[1]; NTuple::File* pFile = dynamic_cast<NTuple::File*>( pObject ); diff --git a/RootHistCnv/src/RFileCnv.h b/RootHistCnv/src/RFileCnv.h index 20df2b86b93f4e81d679e69b37f6d3bbf2d60dcc..a7e93b02a1cc3972989161473afeaaa93d704af0 100644 --- a/RootHistCnv/src/RFileCnv.h +++ b/RootHistCnv/src/RFileCnv.h @@ -46,7 +46,7 @@ namespace RootHistCnv ~RFileCnv() override = default; protected: - TFile* rfile; ///< Pointer to ROOT file + TFile* rfile; ///< Pointer to ROOT file std::string m_compLevel; ///< Compression setting, property RFileCnv.GlobalCompression }; } // namespace RootHistCnv diff --git a/RootHistCnv/src/RHistogramCnv.h b/RootHistCnv/src/RHistogramCnv.h index f327ff218cbdf564bc81d1dcdf1b6cc2540e6a5e..c238b961e30320bbb3fb659dec3e2b1b5424bcba 100644 --- a/RootHistCnv/src/RHistogramCnv.h +++ b/RootHistCnv/src/RHistogramCnv.h @@ -42,12 +42,12 @@ namespace RootHistCnv { refpObj = DataObjFactory::create( objType() ); RootObjAddress* r = dynamic_cast<RootObjAddress*>( pAddr ); - Q* h = dynamic_cast<Q*>( refpObj ); + Q* h = dynamic_cast<Q*>( refpObj ); if ( r && h ) { // Need to flip representation .... clumsy for the time being, because // THXY constructor has no "generic" copy constructor std::unique_ptr<T> p( new T() ); - S* s = dynamic_cast<S*>( r->tObj() ); + S* s = dynamic_cast<S*>( r->tObj() ); if ( s && p.get() ) { TTH<S>* casted = (TTH<S>*)s; TArray* a = dynamic_cast<TArray*>( s ); @@ -72,7 +72,7 @@ namespace RootHistCnv if ( 0 != h ) { T* r = dynamic_cast<T*>( h->representation() ); if ( r ) { - T* c = new T(); + T* c = new T(); TArray* a = dynamic_cast<TArray*>( r ); ( (TTH<S>*)r )->CopyH( *c ); if ( 0 != a ) { diff --git a/RootHistCnv/src/RNTupleCnv.cpp b/RootHistCnv/src/RNTupleCnv.cpp index bf67246ba51a4dd548ba0a7e4a5e2e81c0464356..16d37724a5708740834e2f499a16e465f6ad1319 100644 --- a/RootHistCnv/src/RNTupleCnv.cpp +++ b/RootHistCnv/src/RNTupleCnv.cpp @@ -107,9 +107,9 @@ StatusCode RootHistCnv::RNTupleCnv::createObj( IOpaqueAddress* pAddress, DataObj log << MSG::ERROR << "Could not cast to RootObjAddress" << endmsg; return StatusCode::FAILURE; } - INTuple* nt = nullptr; - TTree* tobj = (TTree*)rAddr->tObj(); - status = load( tobj, nt ); + INTuple* nt = nullptr; + TTree* tobj = (TTree*)rAddr->tObj(); + status = load( tobj, nt ); if ( status.isSuccess() ) { refpObject = dynamic_cast<DataObject*>( nt ); } else { @@ -140,10 +140,10 @@ StatusCode RootHistCnv::RNTupleCnv::createRep( DataObject* pObject, IOpaqueAddre if ( pParAddr ) { TDirectory* pParentDir = (TDirectory*)pParAddr->ipar()[0]; if ( pParentDir ) { - TTree* pTree = nullptr; - std::string dsc = pReg->name().substr( 1 ); - gDirectory = pParentDir; - status = book( dsc, dynamic_cast<INTuple*>( pObject ), pTree ); + TTree* pTree = nullptr; + std::string dsc = pReg->name().substr( 1 ); + gDirectory = pParentDir; + status = book( dsc, dynamic_cast<INTuple*>( pObject ), pTree ); if ( !status.isSuccess() ) { return status; } @@ -157,7 +157,7 @@ StatusCode RootHistCnv::RNTupleCnv::createRep( DataObject* pObject, IOpaqueAddre } } } else { - TDirectory* pDir = (TDirectory*)pAddr->ipar()[0]; + TDirectory* pDir = (TDirectory*)pAddr->ipar()[0]; RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddr ); if ( !rAddr ) { MsgStream log( msgSvc(), "RNTupleCnv" ); @@ -184,8 +184,8 @@ StatusCode RootHistCnv::RNTupleCnv::updateRep( IOpaqueAddress* pAddr, DataObject MsgStream log( msgSvc(), "RNTupleCnv" ); if ( pAddr ) { GlobalDirectoryRestore restore; - TDirectory* pDir = (TDirectory*)pAddr->ipar()[0]; - RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddr ); + TDirectory* pDir = (TDirectory*)pAddr->ipar()[0]; + RootObjAddress* rAddr = dynamic_cast<RootObjAddress*>( pAddr ); if ( !rAddr ) { log << MSG::ERROR << "Could not cast to RootObjAddress" << endmsg; return StatusCode::FAILURE; @@ -281,8 +281,8 @@ namespace RootHistCnv varName = itemName; } - TYP null = 0; - INTupleItem* col = nullptr; + TYP null = 0; + INTupleItem* col = nullptr; if ( min == 0 && max == 0 ) { min = NTuple::Range<TYP>::min(); diff --git a/RootHistCnv/src/RootCompressionSettings.cpp b/RootHistCnv/src/RootCompressionSettings.cpp index 9bfc80db9a50175293a56f908c0176ee0136ef64..3ee533b6c7bb9c4f2d722af908a1f5c0790d27d3 100644 --- a/RootHistCnv/src/RootCompressionSettings.cpp +++ b/RootHistCnv/src/RootCompressionSettings.cpp @@ -22,7 +22,7 @@ RootHistCnv::RootCompressionSettings::RootCompressionSettings( const std::string const std::string::size_type idx = settings.find( ':' ); if ( idx != std::string::npos ) { // Get compression algorithm type - const std::string alg = settings.substr( 0, idx ); + const std::string alg = settings.substr( 0, idx ); ROOT::ECompressionAlgorithm alg_code = ROOT::kUseGlobalSetting; if ( alg == "ZLIB" ) { alg_code = ROOT::kZLIB; @@ -34,7 +34,7 @@ RootHistCnv::RootCompressionSettings::RootCompressionSettings( const std::string // get compression level const std::string slev = settings.substr( idx + 1 ); - const int ilev = std::stoi( slev ); + const int ilev = std::stoi( slev ); // set the level m_level = ROOT::CompressionSettings( alg_code, ilev ); diff --git a/RootHistCnv/src/RootDirFcn.cpp b/RootHistCnv/src/RootDirFcn.cpp index a369568d392bc7fe117dbea0b7bf2acdb6a102e3..abf29366042aef46c400cd42a1a621b582ec3620 100644 --- a/RootHistCnv/src/RootDirFcn.cpp +++ b/RootHistCnv/src/RootDirFcn.cpp @@ -37,7 +37,7 @@ namespace RootHistCnv TDirectory* gDir = gDirectory; - int i = 1; + int i = 1; auto p = full.find( ":", 0 ); if ( p != std::string::npos ) { auto fil = full.substr( 0, p );