diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da17088a7eaa0bb873f5ef908600ca5c40b8b243..76bd7fcafdd78d5248d7ccdadd45204cf3e4c2f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -141,6 +141,7 @@ lcg-view:102b:x86_64-centos7-gcc11-opt: <<: *template_build script: - . /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/setup.sh + - export CONFIGURABLE_DB_IGNORE=/cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/${platform}/lib/Gaudi.confdb - cmake --version - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - ccache -z diff --git a/CMakeLists.txt b/CMakeLists.txt index f8ff64535132f8d280c46881bbe5080e2614c97b..83534cf0bf75af51774e89fdd26582cc3e1cf7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,7 @@ after the configuration or use ccmake or cmake-gui. * For sanitized build * GAUDI_GENCONF_NO_FAIL * Compile options + * GAUDI_ENABLE_GAUDIALG * GAUDI_REFLEX_COMPONENT_ALIASES * Doxygen * DOXYGEN_WITH_LOCAL_MATHJAX @@ -103,12 +104,14 @@ include(cmake/GaudiToolbox.cmake) set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile_commands.json" FORCE) set(GAUDI_USE_PYTHON_MAJOR 3 CACHE STRING "Major version of Python to use") -set(GAUDI_OPTIONAL_DEPENDENCIES "${GAUDI_OPTIONAL_DEPENDENCIES}set(GAUDI_USE_PYTHON_MAJOR ${GAUDI_USE_PYTHON_MAJOR})\n") +string(APPEND GAUDI_OPTIONAL_DEPENDENCIES "set(GAUDI_USE_PYTHON_MAJOR ${GAUDI_USE_PYTHON_MAJOR})\n") # Find all the dependencies of the project list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") # (Find*.cmake) include(cmake/GaudiDependencies.cmake) +string(APPEND GAUDI_OPTIONAL_DEPENDENCIES "set(GAUDI_ENABLE_GAUDIALG ${GAUDI_ENABLE_GAUDIALG})\n") + # The C++ standard used must be the same as ROOT's if(NOT GAUDI_CXX_STANDARD) # FIXME: the day ROOT_CXX_STANDARD is provided by ROOTConfig.cmake, remove this lookup @@ -145,6 +148,7 @@ add_subdirectory(GaudiCoreSvc) add_subdirectory(GaudiUtils) add_subdirectory(Gaudi) add_subdirectory(GaudiAlg) +add_subdirectory(GaudiFunctional) add_subdirectory(GaudiAud) add_subdirectory(GaudiCommonSvc) add_subdirectory(GaudiHive) diff --git a/Gaudi/tests/nose/test_tool_handle_property.py b/Gaudi/tests/nose/test_tool_handle_property.py index 2e0f31611855e85db9904acff92ccd8e3a984a56..b51a0f71cf79f6352b15a171b40f7092013bad07 100644 --- a/Gaudi/tests/nose/test_tool_handle_property.py +++ b/Gaudi/tests/nose/test_tool_handle_property.py @@ -14,16 +14,16 @@ def test(): allConfigurables = GaudiKernel.Configurable.Configurable.allConfigurables allConfigurables.clear() - from Configurables import MyGaudiAlgorithm + from Configurables import MyAlgorithm assert not allConfigurables - alg = MyGaudiAlgorithm() + alg = MyAlgorithm() assert len(allConfigurables) == 1 - assert "MyGaudiAlgorithm.PrivToolHandle" not in allConfigurables + assert "MyAlgorithm.PrivToolHandle" not in allConfigurables _ = alg.PrivToolHandle - assert "MyGaudiAlgorithm.PrivToolHandle" in allConfigurables + assert "MyAlgorithm.PrivToolHandle" in allConfigurables assert "ToolSvc.PrivToolHandle" not in allConfigurables print(list(allConfigurables)) diff --git a/Gaudi/tests/pyjobopts/test_purge1.py b/Gaudi/tests/pyjobopts/test_purge1.py index 95ad4b740ab114fe0ce46b81f313867396b9ac17..fa516fd8b05678432b3efc5526079076fd4c6121 100644 --- a/Gaudi/tests/pyjobopts/test_purge1.py +++ b/Gaudi/tests/pyjobopts/test_purge1.py @@ -12,4 +12,4 @@ from Gaudi.Configuration import AuditorSvc, importOptions importOptions("test_purge2.opts") -AuditorSvc().Auditors += ["TimingAuditor/TIMER"] +AuditorSvc().Auditors += ["AlgTimingAuditor/TIMER"] diff --git a/Gaudi/tests/qmtest/gaudi.qms/purge.qmt b/Gaudi/tests/qmtest/gaudi.qms/purge.qmt index 1a8d2640137dabdb5deb774ca9dd5c7d62b6335b..b0e8acebf6ab8640ab5e7cfd43587ffdb44fd7db 100644 --- a/Gaudi/tests/qmtest/gaudi.qms/purge.qmt +++ b/Gaudi/tests/qmtest/gaudi.qms/purge.qmt @@ -19,7 +19,7 @@ from pprint import PrettyPrinter pp = PrettyPrinter() -expected = {'AuditorSvc': {'Auditors': ['ChronoAuditor', 'TimingAuditor/TIMER']}} +expected = {'AuditorSvc': {'Auditors': ['ChronoAuditor', 'AlgTimingAuditor/TIMER']}} exec("\n".join(stdout.splitlines())) # stdout needs to be sanitized for windows result["GaudiTest.expected_config"] = result.Quote(pp.pformat(expected)) diff --git a/GaudiAlg/CMakeLists.txt b/GaudiAlg/CMakeLists.txt index 8b6dd2a9a0ee2e79ffeda9c411da070b422eafc6..d26ece247306d548e3213ee03bb8a819a1ea360a 100644 --- a/GaudiAlg/CMakeLists.txt +++ b/GaudiAlg/CMakeLists.txt @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -10,6 +10,10 @@ ##################################################################################### # Gaudi subdirectory +if(NOT GAUDI_ENABLE_GAUDIALG) + return() +endif() + # Build the library gaudi_add_library(GaudiAlgLib SOURCES src/lib/EventCounter.cpp @@ -21,12 +25,14 @@ gaudi_add_library(GaudiAlgLib src/lib/GaudiTool.cpp src/lib/GetAlg.cpp src/lib/Prescaler.cpp - src/lib/Sequencer.cpp src/lib/Tuple.cpp src/lib/TupleObj.cpp + src/lib/AlgDecorators.cpp LINK PUBLIC - GaudiUtilsLib + Gaudi::GaudiUtilsLib + Gaudi::GaudiPythonLib + Gaudi::Functional Boost::headers Boost::regex Rangev3::rangev3) @@ -37,8 +43,13 @@ if(GAUDI_USE_AIDA) src/lib/GaudiHistoTool.cpp src/lib/GetAlgs.cpp src/lib/GaudiTupleAlg.cpp - src/lib/GaudiTupleTool.cpp) + src/lib/GaudiTupleTool.cpp + src/lib/HistoDecorator.cpp) target_link_libraries(GaudiAlgLib PUBLIC AIDA::aida) + if(GAUDI_USE_CLHEP) + target_sources(GaudiAlgLib PRIVATE src/lib/TupleDecorator.cpp) + target_link_libraries(GaudiAlgLib PUBLIC CLHEP::CLHEP) + endif() endif() # Build the plugin @@ -60,3 +71,55 @@ if(GAUDI_USE_AIDA) src/components/SequencerTimerTool.cpp) target_link_libraries(GaudiAlg PRIVATE AIDA::aida) endif() + +gaudi_add_dictionary(GaudiAlgDict + HEADERFILES dict/dictionary.h + SELECTION dict/selection.xml + LINK GaudiAlgLib) + +if(GAUDI_USE_AIDA) + target_compile_definitions(GaudiAlgDict PRIVATE AIDA_FOUND) +endif() +if(GAUDI_USE_CLHEP) + target_compile_definitions(GaudiAlgDict PRIVATE CLHEP_FOUND) +endif() + +gaudi_install(PYTHON) + +if(BUILD_TESTING) + # Ignore examples if not building tests + # see https://gitlab.cern.ch/atlas/atlasexternals/-/merge_requests/664#note_3395313 + gaudi_add_module(GaudiAlgExamples + SOURCES + src/examples/GaudiCommonTests.cpp + src/examples/MyGaudiAlgorithm.cpp + src/examples/MyGaudiTool.cpp + src/examples/SelCreate.cpp + src/examples/SelFilter.cpp + LINK + GaudiAlgLib + Gaudi::GaudiExamplesLib + ) + + if(GAUDI_USE_AIDA) + target_sources(GaudiAlgExamples PRIVATE + src/examples/Aida2Root.cpp + src/examples/GaudiHistoAlgorithm.cpp + src/examples/HistoTimingAlg.cpp + src/examples/EvtColAlg.cpp + src/examples/ExtendedEvtCol.cpp + ) + target_link_libraries(GaudiAlgExamples PRIVATE AIDA::aida) + if(GAUDI_USE_CLHEP) + target_sources(GaudiAlgExamples PRIVATE + src/examples/TupleAlg2.cpp + src/examples/TupleAlg3.cpp + src/examples/TupleAlg.cpp + src/examples/TupleDef.cpp + ) + target_link_libraries(GaudiAlgExamples PRIVATE CLHEP::CLHEP) + endif() + endif() +endif() + +gaudi_add_tests(QMTest) diff --git a/GaudiAlg/dict/dictionary.h b/GaudiAlg/dict/dictionary.h new file mode 100644 index 0000000000000000000000000000000000000000..7bbb8ec555dba0e9b66d394652c062bda91706b6 --- /dev/null +++ b/GaudiAlg/dict/dictionary.h @@ -0,0 +1,45 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +// redefined anyway in features.h by _GNU_SOURCE +#undef _XOPEN_SOURCE +#undef _POSIX_C_SOURCE + +// ============================================================================ +// Python must always be the first. +#ifndef __APPLE__ +# include <Python.h> +#endif // not __APPLE__ + +#include <GaudiPython/AlgDecorators.h> +#include <GaudiPython/PyAlg.h> +#ifdef AIDA_FOUND +# include <GaudiPython/HistoDecorator.h> +# ifdef CLHEP_FOUND +# include <GaudiPython/TupleDecorator.h> +# endif // CLHEP_FOUND +#endif // AIDA_FOUND + +#ifdef AIDA_FOUND +# include <GaudiAlg/GaudiHistoAlg.h> +# include <GaudiAlg/GaudiTupleAlg.h> +# include <GaudiAlg/Print.h> +// Added to avoid warnings about inlined functions never implemented. +# include <GaudiAlg/GaudiHistos.icpp> +#endif // AIDA_FOUND +#include <GaudiAlg/GaudiAlgorithm.h> +#include <GaudiAlg/GaudiCommon.h> +#include <GaudiAlg/GaudiHistoID.h> +#include <GaudiAlg/IErrorTool.h> +#include <GaudiAlg/IGenericTool.h> +#include <GaudiAlg/IHistoTool.h> +#include <GaudiAlg/ISequencerTimerTool.h> +#include <GaudiAlg/ITupleTool.h> +#include <GaudiAlg/Tuple.h> diff --git a/GaudiAlg/dict/selection.xml b/GaudiAlg/dict/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..81ced72deec02157bd454a579af0e887f5fc0caa --- /dev/null +++ b/GaudiAlg/dict/selection.xml @@ -0,0 +1,29 @@ +<!-- + (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations + + This software is distributed under the terms of the Apache version 2 licence, + copied verbatim in the file "LICENSE". + + In applying this licence, CERN does not waive the privileges and immunities + granted to it by virtue of its status as an Intergovernmental Organization + or submit itself to any jurisdiction. +--> +<lcgdict> + <class name = "GaudiAlgorithm"/> + <class name = "GaudiPython::PyAlg<GaudiAlgorithm>"/> + <class name = "GaudiPython::PyAlg<GaudiHistoAlg>"/> + <class name = "GaudiPython::PyAlg<GaudiTupleAlg>"/> + <class name = "IErrorTool"/> + <class name = "IGenericTool"/> + <class name = "IHistoTool"/> + <class name = "ISequencerTimerTool"/> + <class name = "ITupleTool"/> + <class name = "std::vector<GaudiAlg::ID>"/> + <class name = "Tuples::Tuple"/> + <class pattern = "GaudiAlg::*"/> + <class pattern = "GaudiAlg::Print*"/> + <class pattern = "GaudiCommon<*>"/> + <class pattern = "GaudiHistos<*>"/> + <class pattern = "GaudiPython::*Decorator*"/> + <class pattern = "GaudiTuples<*>"/> +</lcgdict> diff --git a/GaudiAlg/include/GaudiAlg/Consumer.h b/GaudiAlg/include/GaudiAlg/Consumer.h index 173dc4da03dbf3c787078832a884d21c54d8ea20..cda7ca27668022e7f5fb5b0c6550eb5807204d2d 100644 --- a/GaudiAlg/include/GaudiAlg/Consumer.h +++ b/GaudiAlg/include/GaudiAlg/Consumer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,64 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - #pragma once -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" -#include <utility> - -namespace Gaudi::Functional { - - namespace details { - - template <typename Signature, typename Traits_, bool isLegacy> - struct Consumer; - - template <typename... In, typename Traits_> - struct Consumer<void( const In&... ), Traits_, true> - : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes are NOT allowed to implement execute ... - StatusCode execute() override final { - try { - filter_evtcontext_t<In...>::apply( *this, this->m_inputs ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // ... instead, they must implement the following operator - virtual void operator()( const In&... ) const = 0; - }; - - template <typename... In, typename Traits_> - struct Consumer<void( const In&... ), Traits_, false> - : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes are NOT allowed to implement execute ... - StatusCode execute( const EventContext& ctx ) const override final { - try { - filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // ... instead, they must implement the following operator - virtual void operator()( const In&... ) const = 0; - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using Consumer = details::Consumer<Signature, Traits_, details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/Consumer.h> diff --git a/GaudiAlg/include/GaudiAlg/FilterPredicate.h b/GaudiAlg/include/GaudiAlg/FilterPredicate.h index 14be1615153bdfde3a2fe00a1a54837fbee88e03..9381d0519d72a0dc8f92e37d44193ff3f988f88c 100644 --- a/GaudiAlg/include/GaudiAlg/FilterPredicate.h +++ b/GaudiAlg/include/GaudiAlg/FilterPredicate.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,65 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - #pragma once -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" -#include <type_traits> -#include <utility> - -namespace Gaudi::Functional { - - namespace details { - - template <typename T, typename Traits_, bool isLegacy> - struct FilterPredicate; - - template <typename... In, typename Traits_> - struct FilterPredicate<bool( const In&... ), Traits_, true> - : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes are NOT allowed to implement execute ... - StatusCode execute() override final { - try { - return filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ? FilterDecision::PASSED - : FilterDecision::FAILED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // ... instead, they must implement the following operator - virtual bool operator()( const In&... ) const = 0; - }; - - template <typename... In, typename Traits_> - struct FilterPredicate<bool( const In&... ), Traits_, false> - : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes are NOT allowed to implement execute ... - StatusCode execute( const EventContext& ctx ) const override final { - try { - return filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ? FilterDecision::PASSED - : FilterDecision::FAILED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // ... instead, they must implement the following operator - virtual bool operator()( const In&... ) const = 0; - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using FilterPredicate = details::FilterPredicate<Signature, Traits_, details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/FilterPredicate.h> diff --git a/GaudiAlg/include/GaudiAlg/FunctionalDetails.h b/GaudiAlg/include/GaudiAlg/FunctionalDetails.h index e105325c6d10c052d0694df46724d48a7b1e1102..f563027b151604535d3ae4054fb6ae92789eb149 100644 --- a/GaudiAlg/include/GaudiAlg/FunctionalDetails.h +++ b/GaudiAlg/include/GaudiAlg/FunctionalDetails.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,703 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef FUNCTIONAL_DETAILS_H -#define FUNCTIONAL_DETAILS_H +#pragma once -#include <cassert> -#include <sstream> -#include <stdexcept> -#include <type_traits> - -// TODO: fwd declare instead? -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/DataObjectHandle.h" -#include "GaudiKernel/GaudiException.h" -#include "GaudiKernel/IBinder.h" -#include "GaudiKernel/ThreadLocalContext.h" -#include "GaudiKernel/detected.h" - -// Range V3 -#include <range/v3/version.hpp> -#include <range/v3/view/const.hpp> -#include <range/v3/view/zip.hpp> -// upstream has renamed namespace ranges::view ranges::views -#if RANGE_V3_VERSION < 900 -namespace ranges::views { - using namespace ranges::view; -} -#endif - -#if defined( __clang__ ) && ( __clang_major__ < 11 ) || defined( __APPLE__ ) && ( __clang_major__ < 12 ) -# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN \ - _Pragma( "clang diagnostic push" ) _Pragma( "clang diagnostic ignored \"-Wunused-lambda-capture\"" ) -# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END _Pragma( "clang diagnostic pop" ) -#else -# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN -# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END -#endif - -// temporary hack to help in transition to updated constructor -// allows to write code which is forward and backwards compatible -#define GAUDI_FUNCTIONAL_CONSTRUCTOR_USES_TUPLE - -namespace Gaudi::Functional::details { - - // CRJ : Stuff for zipping - namespace zip { - - /// Print the parameter - template <typename OS, typename Arg> - void printSizes( OS& out, Arg&& arg ) { - out << "SizeOf'" << System::typeinfoName( typeid( Arg ) ) << "'=" << std::forward<Arg>( arg ).size(); - } - - /// Print the parameters - template <typename OS, typename Arg, typename... Args> - void printSizes( OS& out, Arg&& arg, Args&&... args ) { - printSizes( out, arg ); - out << ", "; - printSizes( out, args... ); - } - - /// Resolve case there is only one container in the range - template <typename A> - inline bool check_sizes( const A& ) noexcept { - return true; - } - - /// Compare sizes of two containers - template <typename A, typename B> - inline bool check_sizes( const A& a, const B& b ) noexcept { - return a.size() == b.size(); - } - - /// Compare sizes of 3 or more containers - template <typename A, typename B, typename... C> - inline bool check_sizes( const A& a, const B& b, const C&... c ) noexcept { - return ( check_sizes( a, b ) && check_sizes( b, c... ) ); - } - - /// Verify the data container sizes have the same sizes - template <typename... Args> - inline decltype( auto ) verifySizes( Args&... args ) { - if ( !check_sizes( args... ) ) { - std::ostringstream mess; - mess << "Zipped containers have different sizes : "; - printSizes( mess, args... ); - throw GaudiException( mess.str(), "Gaudi::Functional::details::zip::verifySizes", StatusCode::FAILURE ); - } - } - - /// Zips multiple containers together to form a single range - template <typename... Args> - inline decltype( auto ) range( Args&&... args ) { -#ifndef NDEBUG - verifySizes( args... ); -#endif - return ranges::views::zip( std::forward<Args>( args )... ); - } - - /// Zips multiple containers together to form a single const range - template <typename... Args> - inline decltype( auto ) const_range( Args&&... args ) { -#ifndef NDEBUG - verifySizes( args... ); -#endif - return ranges::views::const_( ranges::views::zip( std::forward<Args>( args )... ) ); - } - } // namespace zip - - inline std::vector<DataObjID> to_DataObjID( const std::vector<std::string>& in ) { - std::vector<DataObjID> out; - out.reserve( in.size() ); - std::transform( in.begin(), in.end(), std::back_inserter( out ), - []( const std::string& i ) { return DataObjID{ i }; } ); - return out; - } - - ///////////////////////////////////////// - namespace details2 { - template <typename T> - using is_optional_ = decltype( std::declval<T>().has_value(), std::declval<T>().value() ); - - template <typename T> - using value_type_of_t = typename T::value_type; - - } // namespace details2 - template <typename Arg> - constexpr bool is_optional_v = Gaudi::cpp17::is_detected_v<details2::is_optional_, Arg>; - - template <typename Arg> - using require_is_optional = std::enable_if_t<is_optional_v<Arg>>; - - template <typename Arg> - using require_is_not_optional = std::enable_if_t<!is_optional_v<Arg>>; - - template <typename T> - using remove_optional_t = - std::conditional_t<is_optional_v<T>, Gaudi::cpp17::detected_t<details2::value_type_of_t, T>, T>; - - constexpr struct invoke_optionally_t { - template <typename F, typename Arg, typename = require_is_not_optional<Arg>> - decltype( auto ) operator()( F&& f, Arg&& arg ) const { - return std::invoke( std::forward<F>( f ), std::forward<Arg>( arg ) ); - } - template <typename F, typename Arg, typename = require_is_optional<Arg>> - void operator()( F&& f, Arg&& arg ) const { - if ( arg ) std::invoke( std::forward<F>( f ), *std::forward<Arg>( arg ) ); - } - } invoke_optionally{}; - ///////////////////////////////////////// - - template <typename Value, std::size_t... I> - auto get_values_helper( std::index_sequence<I...> ) { - return std::make_tuple( ( (void)I, Value{} )... ); - } - - template <typename Value, auto N> - using RepeatValues_ = decltype( get_values_helper<Value>( std::make_index_sequence<N>() ) ); - - ///////////////////////////////////////// - - template <typename Out1, typename Out2, - typename = std::enable_if_t<std::is_constructible_v<Out1, Out2> && std::is_base_of_v<DataObject, Out1>>> - auto put( const DataObjectHandle<Out1>& out_handle, Out2&& out ) { - return out_handle.put( std::make_unique<Out1>( std::forward<Out2>( out ) ) ); - } - - template <typename Out1, typename Out2, typename = std::enable_if_t<std::is_constructible_v<Out1, Out2>>> - auto put( const DataObjectHandle<AnyDataWrapper<Out1>>& out_handle, Out2&& out ) { - return out_handle.put( std::forward<Out2>( out ) ); - } - - // optional put - template <typename OutHandle, typename OptOut, typename = require_is_optional<OptOut>> - void put( const OutHandle& out_handle, OptOut&& out ) { - if ( out ) put( out_handle, *std::forward<OptOut>( out ) ); - } - - ///////////////////////////////////////// - // adapt to differences between eg. std::vector (which has push_back) and KeyedContainer (which has insert) - // adapt to getting a T, and a container wanting T* by doing new T{ std::move(out) } - // adapt to getting a optional<T> - - constexpr struct insert_t { - // for Container<T*>, return T - template <typename Container> - using c_remove_ptr_t = std::remove_pointer_t<typename Container::value_type>; - - template <typename Container, typename Value> - auto operator()( Container& c, Value&& v ) const -> decltype( c.push_back( v ) ) { - return c.push_back( std::forward<Value>( v ) ); - } - - template <typename Container, typename Value> - auto operator()( Container& c, Value&& v ) const -> decltype( c.insert( v ) ) { - return c.insert( std::forward<Value>( v ) ); - } - - // Container<T*> with T&& as argument - template <typename Container, typename Value, - typename = std::enable_if_t<std::is_pointer_v<typename Container::value_type>>, - typename = std::enable_if_t<std::is_convertible_v<Value, c_remove_ptr_t<Container>>>> - auto operator()( Container& c, Value&& v ) const { - return operator()( c, new c_remove_ptr_t<Container>{ std::forward<Value>( v ) } ); - } - - } insert{}; - - ///////////////////////////////////////// - - constexpr struct deref_t { - template <typename In, typename = std::enable_if_t<!std::is_pointer_v<In>>> - const In& operator()( const In& in ) const { - return in; - } - - template <typename In, typename = std::enable_if_t<!std::is_pointer_v<std::decay_t<In>>>> - In operator()( In&& in ) const { - return std::forward<In>( in ); - } - - template <typename In> - const In& operator()( const In* in ) const { - assert( in != nullptr ); - return *in; - } - } deref{}; - - ///////////////////////////////////////// - // if Container is a pointer, then we're optional items - namespace details2 { - template <typename T> - struct is_gaudi_range : std::false_type {}; - - template <typename T, typename IT> - struct is_gaudi_range<Gaudi::Range_<T, IT>> : std::true_type {}; - - template <typename T, typename IT> - struct is_gaudi_range<Gaudi::NamedRange_<T, IT>> : std::true_type {}; - - template <typename T> - constexpr static bool is_gaudi_range_v = is_gaudi_range<T>::value; - - template <typename Container, typename Value> - void push_back( Container& c, const Value& v, std::true_type ) { - c.push_back( v ); - } - template <typename Container, typename Value> - void push_back( Container& c, const Value& v, std::false_type ) { - c.push_back( &v ); - } - - template <typename In> - struct get_from_handle { - template <template <typename> class Handle, typename I, typename = std::enable_if_t<std::is_convertible_v<I, In>>> - auto operator()( const Handle<I>& h ) -> const In& { - return *h.get(); - } - template <template <typename> class Handle, typename I, typename IT> - auto operator()( const Handle<Gaudi::Range_<I, IT>>& h ) -> const In { - return h.get(); - } - template <template <typename> class Handle, typename I, typename IT> - auto operator()( const Handle<Gaudi::NamedRange_<I, IT>>& h ) -> const In { - return h.get(); - } - template <template <typename> class Handle, typename I, - typename = std::enable_if_t<std::is_convertible_v<I*, In>>> - auto operator()( const Handle<I>& h ) -> const In { - return h.getIfExists(); - } // In is-a pointer - }; - - template <typename T> - T* deref_if( T* const t, std::false_type ) { - return t; - } - template <typename T> - T& deref_if( T* const t, std::true_type ) { - return *t; - } - } // namespace details2 - - template <typename Container> - class vector_of_const_ { - static constexpr bool is_pointer = std::is_pointer_v<Container>; - static constexpr bool is_range = details2::is_gaudi_range_v<Container>; - using val_t = std::add_const_t<std::remove_pointer_t<Container>>; - using ptr_t = std::add_pointer_t<val_t>; - using ref_t = std::add_lvalue_reference_t<val_t>; - using ContainerVector = std::vector<std::conditional_t<is_range, std::remove_const_t<val_t>, ptr_t>>; - ContainerVector m_containers; - - public: - using value_type = std::conditional_t<is_pointer, ptr_t, val_t>; - using size_type = typename ContainerVector::size_type; - class iterator { - using it_t = typename ContainerVector::const_iterator; - it_t m_i; - friend class vector_of_const_; - iterator( it_t iter ) : m_i( iter ) {} - using ret_t = std::conditional_t<is_pointer, ptr_t, ref_t>; - - public: - using iterator_category = typename it_t::iterator_category; - using value_type = typename it_t::iterator_category; - using reference = typename it_t::reference; - using pointer = typename it_t::pointer; - using difference_type = typename it_t::difference_type; - - friend bool operator!=( const iterator& lhs, const iterator& rhs ) { return lhs.m_i != rhs.m_i; } - friend bool operator==( const iterator& lhs, const iterator& rhs ) { return lhs.m_i == rhs.m_i; } - friend auto operator-( const iterator& lhs, const iterator& rhs ) { return lhs.m_i - rhs.m_i; } - ret_t operator*() const { - if constexpr ( is_range ) { - return *m_i; - } else { - return details2::deref_if( *m_i, std::bool_constant<!is_pointer>{} ); - } - } - iterator& operator++() { - ++m_i; - return *this; - } - iterator& operator--() { - --m_i; - return *this; - } - bool is_null() const { return !*m_i; } - explicit operator bool() const { return !is_null(); } - }; - vector_of_const_() = default; - void reserve( size_type size ) { m_containers.reserve( size ); } - template <typename T> // , typename = std::is_convertible<T,std::conditional_t<is_pointer,ptr_t,val_t>> - void push_back( T&& container ) { - details2::push_back( m_containers, std::forward<T>( container ), - std::bool_constant < is_pointer || is_range > {} ); - } // 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(); } - size_type size() const { return m_containers.size(); } - - template <typename X = Container> - std::enable_if_t<!std::is_pointer_v<X>, ref_t> front() const { - return *m_containers.front(); - } - template <typename X = Container> - std::enable_if_t<std::is_pointer_v<X>, ptr_t> front() const { - return m_containers.front(); - } - - template <typename X = Container> - std::enable_if_t<!std::is_pointer_v<X>, ref_t> back() const { - return *m_containers.back(); - } - template <typename X = Container> - std::enable_if_t<std::is_pointer_v<X>, ptr_t> back() const { - return m_containers.back(); - } - - template <typename X = Container> - std::enable_if_t<!std::is_pointer_v<X>, ref_t> operator[]( size_type i ) const { - return *m_containers[i]; - } - template <typename X = Container> - std::enable_if_t<std::is_pointer_v<X>, ptr_t> operator[]( size_type i ) const { - return m_containers[i]; - } - - template <typename X = Container> - std::enable_if_t<!std::is_pointer_v<X>, ref_t> at( size_type i ) const { - return *m_containers[i]; - } - template <typename X = Container> - std::enable_if_t<std::is_pointer_v<X>, ptr_t> at( size_type i ) const { - return m_containers[i]; - } - - bool is_null( size_type i ) const { return !m_containers[i]; } - }; - - ///////////////////////////////////////// - namespace detail2 { // utilities for detected_or_t{,_} usage - template <typename Tr> - using BaseClass_t = typename Tr::BaseClass; - template <typename Tr, typename T> - using OutputHandle_t = typename Tr::template OutputHandle<T>; - template <typename Tr, typename T> - using InputHandle_t = typename Tr::template InputHandle<T>; - - template <typename T> - constexpr auto is_tool_v = std::is_base_of_v<IAlgTool, std::decay_t<T>>; - - template <typename T> - using ToolHandle_t = ToolHandle<Gaudi::Interface::Bind::IBinder<std::decay_t<T>>>; - - template <typename T> - using DefaultInputHandle = std::conditional_t<is_tool_v<T>, ToolHandle_t<T>, DataObjectReadHandle<T>>; - } // namespace detail2 - - // check whether Traits::BaseClass is a valid type, - // if so, define BaseClass_t<Traits> as being Traits::BaseClass - // else define as being GaudiAlgorithm - template <typename Tr, typename Base = GaudiAlgorithm> - using BaseClass_t = Gaudi::cpp17::detected_or_t<Base, detail2::BaseClass_t, Tr>; - - // check whether Traits::{Input,Output}Handle<T> is a valid type, - // if so, define {Input,Output}Handle_t<Traits,T> as being Traits::{Input,Output}Handle<T> - // else define as being DataObject{Read,,Write}Handle<T> - - template <typename Tr, typename T> - using OutputHandle_t = Gaudi::cpp17::detected_or_t<DataObjectWriteHandle<T>, detail2::OutputHandle_t, Tr, T>; - template <typename Tr, typename T> - using InputHandle_t = Gaudi::cpp17::detected_or_t<detail2::DefaultInputHandle<T>, detail2::InputHandle_t, Tr, T>; - - template <typename Traits> - inline constexpr bool isLegacy = - std::is_base_of_v<Gaudi::details::LegacyAlgorithmAdapter, details::BaseClass_t<Traits>>; - - ///////// -#define GAUDI_FUNCTIONAL_MAKE_VECTOR_OF_HANDLES_USES_DATAOBJID - - template <typename Handles> - Handles make_vector_of_handles( IDataHandleHolder* owner, const std::vector<DataObjID>& init ) { - Handles handles; - handles.reserve( init.size() ); - std::transform( init.begin(), init.end(), std::back_inserter( handles ), - [&]( const auto& loc ) -> typename Handles::value_type { - return { loc, owner }; - } ); - return handles; - } - - template <typename Handle, typename Algo> - auto get( const Handle& handle, const Algo&, const EventContext& ) - -> decltype( details::deref( handle.get() ) ) // make it SFINAE friendly... - { - return details::deref( handle.get() ); - } - - template <typename IFace, typename Algo> - auto get( const ToolHandle<Gaudi::Interface::Bind::IBinder<IFace>>& handle, const Algo&, const EventContext& ctx ) { - return handle.bind( ctx ); - } - - template <typename Handle> - auto getKey( const Handle& h ) -> decltype( h.objKey() ) { - return h.objKey(); - } - - /////////////////////// - // given a pack, return a corresponding tuple - template <typename... In> - struct filter_evtcontext_t { - using type = std::tuple<In...>; - - static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>, - "EventContext can only appear as first argument" ); - - template <typename Algorithm, typename Handles> - static auto apply( const Algorithm& algo, Handles& handles ) { - return std::apply( - [&]( const auto&... handle ) { return algo( get( handle, algo, Gaudi::Hive::currentContext() )... ); }, - handles ); - } - template <typename Algorithm, typename Handles> - static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) { - return std::apply( [&]( const auto&... handle ) { return algo( get( handle, algo, ctx )... ); }, handles ); - } - }; - - // except when it starts with EventContext, then drop it - template <typename... In> - struct filter_evtcontext_t<EventContext, In...> { - using type = std::tuple<In...>; - - static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>, - "EventContext can only appear as first argument" ); - - template <typename Algorithm, typename Handles> - static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) { - return std::apply( [&]( const auto&... handle ) { return algo( ctx, get( handle, algo, ctx )... ); }, handles ); - } - - template <typename Algorithm, typename Handles> - static auto apply( const Algorithm& algo, Handles& handles ) { - return apply( algo, Gaudi::Hive::currentContext(), handles ); - } - }; - - template <typename... In> - using filter_evtcontext = typename filter_evtcontext_t<In...>::type; - - template <typename OutputSpec, typename InputSpec, typename Traits_> - class DataHandleMixin; - - template <typename Out, typename In, typename Tr> - void updateHandleLocation( DataHandleMixin<Out, In, Tr>& parent, const std::string& prop, - const std::string& newLoc ) { - auto sc = parent.setProperty( prop, newLoc ); - if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc ); - } - - template <typename Out, typename In, typename Tr> - void updateHandleLocations( DataHandleMixin<Out, In, Tr>& parent, const std::string& prop, - const std::vector<std::string>& newLocs ) { - std::ostringstream ss; - GaudiUtils::details::ostream_joiner( - ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& { return os << "'" << i << "'"; } ) - << ']'; - auto sc = parent.setProperty( prop, ss.str() ); - if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc ); - } - - template <typename... Out, typename... In, typename Traits_> - class DataHandleMixin<std::tuple<Out...>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> { - static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); - - template <typename IArgs, typename OArgs, std::size_t... I, std::size_t... J> - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...>, - const OArgs& outputs, std::index_sequence<J...> ) - : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) - , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... ) - , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) { - // make sure this algorithm is seen as reentrant by Gaudi - this->setProperty( "Cardinality", 0 ).ignore(); - } - - public: - constexpr static std::size_t N_in = sizeof...( In ); - constexpr static std::size_t N_out = sizeof...( Out ); - - using KeyValue = std::pair<std::string, std::string>; - using KeyValues = std::pair<std::string, std::vector<std::string>>; - - // generic constructor: N -> M - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_in> const& inputs, - RepeatValues_<KeyValue, N_out> const& outputs ) - : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{}, outputs, - std::index_sequence_for<Out...>{} ) {} - - // special cases: forward to the generic case... - // 1 -> 1 - DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValue& output ) - : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ), - std::forward_as_tuple( output ) ) {} - // 1 -> N - DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input, - RepeatValues_<KeyValue, N_out> const& outputs ) - : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ), outputs ) {} - // N -> 1 - DataHandleMixin( std::string name, ISvcLocator* locator, RepeatValues_<KeyValue, N_in> const& inputs, - const KeyValue& output ) - : DataHandleMixin( std::move( name ), locator, inputs, std::forward_as_tuple( output ) ) {} - - template <std::size_t N = 0> - decltype( auto ) inputLocation() const { - return getKey( std::get<N>( m_inputs ) ); - } - template <typename T> - decltype( auto ) inputLocation() const { - return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) ); - } - constexpr unsigned int inputLocationSize() const { return N_in; } - - template <std::size_t N = 0> - decltype( auto ) outputLocation() const { - return getKey( std::get<N>( m_outputs ) ); - } - template <typename T> - decltype( auto ) outputLocation() const { - return getKey( std::get<details::OutputHandle_t<Traits_, std::decay_t<T>>>( m_outputs ) ); - } - constexpr unsigned int outputLocationSize() const { return N_out; } - - protected: - bool isReEntrant() const override { return true; } - - std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; - std::tuple<details::OutputHandle_t<Traits_, Out>...> m_outputs; - }; - - template <typename Traits_> - class DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> { - static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); - - public: - using KeyValue = std::pair<std::string, std::string>; - using KeyValues = std::pair<std::string, std::vector<std::string>>; - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, std::tuple<> = {}, std::tuple<> = {} ) - : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) { - // make sure this algorithm is seen as reentrant by Gaudi - this->setProperty( "Cardinality", 0 ).ignore(); - } - - protected: - bool isReEntrant() const override { return true; } - - std::tuple<> m_inputs; - }; - - template <typename... In, typename Traits_> - class DataHandleMixin<std::tuple<>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> { - static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); - - template <typename IArgs, std::size_t... I> - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...> ) - : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) - , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... ) { - // make sure this algorithm is seen as reentrant by Gaudi - this->setProperty( "Cardinality", 0 ).ignore(); - } - - public: - using KeyValue = std::pair<std::string, std::string>; - using KeyValues = std::pair<std::string, std::vector<std::string>>; - constexpr static std::size_t N_in = sizeof...( In ); - - // generic constructor: N -> 0 - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_in> const& inputs ) - : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{} ) {} - - // special cases: forward to the generic case... - // 1 -> 0 - DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input ) - : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ) ) {} - - template <std::size_t N = 0> - decltype( auto ) inputLocation() const { - return getKey( std::get<N>( m_inputs ) ); - } - template <typename T> - decltype( auto ) inputLocation() const { - return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) ); - } - constexpr unsigned int inputLocationSize() const { return N_in; } - - protected: - bool isReEntrant() const override { return true; } - - std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; - }; - - template <typename Traits_> - class DataHandleMixin<std::tuple<void>, std::tuple<>, Traits_> - : public DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> { - public: - using DataHandleMixin<std::tuple<>, std::tuple<>, Traits_>::DataHandleMixin; - }; - - template <typename... Out, typename Traits_> - class DataHandleMixin<std::tuple<Out...>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> { - static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); - - template <typename OArgs, std::size_t... J> - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const OArgs& outputs, std::index_sequence<J...> ) - : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) - , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) { - // make sure this algorithm is seen as reentrant by Gaudi - this->setProperty( "Cardinality", 0 ).ignore(); - } - - public: - constexpr static std::size_t N_out = sizeof...( Out ); - using KeyValue = std::pair<std::string, std::string>; - using KeyValues = std::pair<std::string, std::vector<std::string>>; - - // generic constructor: 0 -> N - DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_out> const& outputs ) - : DataHandleMixin( std::move( name ), pSvcLocator, outputs, std::index_sequence_for<Out...>{} ) {} - - // 0 -> 1 - DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& output ) - : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( output ) ) {} - - template <std::size_t N = 0> - decltype( auto ) outputLocation() const { - return getKey( std::get<N>( m_outputs ) ); - } - constexpr unsigned int outputLocationSize() const { return N_out; } - - protected: - bool isReEntrant() const override { return true; } - - std::tuple<details::OutputHandle_t<Traits_, Out>...> m_outputs; - }; - - ///////////////// - template <typename Fun, typename Container, typename... Args> - constexpr void applyPostProcessing( const Fun&, Container&, Args... ) { - static_assert( sizeof...( Args ) == 0, "Args should not be used!" ); - } - - template <typename Fun, typename Container> - auto applyPostProcessing( const Fun& fun, Container& c ) -> decltype( fun.postprocess( c ), void() ) { - fun.postprocess( c ); - } - -} // namespace Gaudi::Functional::details - -#endif +#include <Gaudi/Functional/details.h> +#include <GaudiAlg/GaudiAlgorithm.h> diff --git a/GaudiAlg/include/GaudiAlg/FunctionalTool.h b/GaudiAlg/include/GaudiAlg/FunctionalTool.h index 1cc28ec430a82ce44924084290449ff58dfd477d..fa7c2a55cee21d81fc7b22a40dea6f7334770725 100644 --- a/GaudiAlg/include/GaudiAlg/FunctionalTool.h +++ b/GaudiAlg/include/GaudiAlg/FunctionalTool.h @@ -1,5 +1,5 @@ /*****************************************************************************\ -* (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration * +* (c) Copyright 2021-2023 CERN for the benefit of the LHCb Collaboration * * * * This software is distributed under the terms of the GNU General Public * * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * @@ -8,81 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \*****************************************************************************/ -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/IBinder.h" +#pragma once -#define GAUDI_FUNCTIONAL_TOOL_BINDER_USES_CREATE - -namespace Gaudi::Functional { - namespace details { - // add a baseclass in case it isn't defined yet... - template <typename Tr, typename Base = FixTESPath<AlgTool>> - using add_base_t = std::conditional_t<Gaudi::cpp17::is_detected_v<detail2::BaseClass_t, Tr>, Tr, - Traits::use_<Tr, BaseClass_t<Base>>>; - - template <typename Signature, typename Traits> - class ToolBinder; - - template <typename IFace, typename... Args, typename Traits> - class ToolBinder<Gaudi::Interface::Bind::Box<IFace>( Args const&... ), Traits> - : public extends<details::BaseClass_t<Traits, AlgTool>, Gaudi::Interface::Bind::IBinder<IFace>> { - - constexpr static std::size_t N = sizeof...( Args ); - - template <typename IArgs, std::size_t... I> - ToolBinder( std::string type, std::string name, const IInterface* parent, IArgs&& args, - Gaudi::Interface::Bind::Box<IFace> ( *creator )( void const*, Args const&... ), - std::index_sequence<I...> ) - : extends<details::BaseClass_t<Traits>, Gaudi::Interface::Bind::IBinder<IFace>>{ std::move( type ), - std::move( name ), parent } - , m_handles{ std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( args ) )... } - , m_creator{ creator } {} - - std::tuple<details::InputHandle_t<Traits, Args>...> m_handles; - Gaudi::Interface::Bind::Box<IFace> ( *m_creator )( void const*, Args const&... ); - - public: - using KeyValue = std::pair<std::string, std::string>; - ToolBinder( std::string type, std::string name, const IInterface* parent, - Gaudi::Functional::details::RepeatValues_<KeyValue, N> const& inputs, - Gaudi::Interface::Bind::Box<IFace> ( *creator )( void const*, Args const&... ) ) - : ToolBinder{ std::move( type ), std::move( name ), parent, inputs, creator, std::make_index_sequence<N>{} } { - } - - Gaudi::Interface::Bind::Box<IFace> bind( EventContext const& ctx ) const final { - return std::apply( - [&]( auto const&... arg ) { - using namespace details; - return std::invoke( m_creator, this, get( arg, *this, ctx )... ); - }, - m_handles ); - } - - template <std::size_t N = 0> - decltype( auto ) inputLocation() const { - using namespace details; - return getKey( std::get<N>( m_handles ) ); - } - template <typename T> - decltype( auto ) inputLocation() const { - using namespace details; - return getKey( std::get<InputHandle_t<Traits, std::decay_t<T>>>( m_handles ) ); - } - - // TODO: make this a callable instance? - template <typename BoundInstance, typename Self> - static auto construct( Self* ) { - static_assert( std::is_base_of_v<ToolBinder, Self> ); - return +[]( void const* ptr, const Args&... args ) { - return Gaudi::Interface::Bind::Box<IFace>{ std::in_place_type<BoundInstance>, - static_cast<std::add_const_t<Self>*>( ptr ), args... }; - }; - } - }; - } // namespace details - - template <typename Signature, typename Traits_ = Traits::use_<Traits::BaseClass_t<AlgTool>>> - using ToolBinder = details::ToolBinder<Signature, Traits_>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/ToolBinder.h> diff --git a/GaudiAlg/include/GaudiAlg/FunctionalUtilities.h b/GaudiAlg/include/GaudiAlg/FunctionalUtilities.h index 8063fad78e7a5672c02712f7fd81a45b2ef93cc8..56c0892370bc717578d4b6efe9da8c49da7117f3 100644 --- a/GaudiAlg/include/GaudiAlg/FunctionalUtilities.h +++ b/GaudiAlg/include/GaudiAlg/FunctionalUtilities.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,117 +8,21 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef FUNCTIONAL_UTILITIES_H -#define FUNCTIONAL_UTILITIES_H +#pragma once -#include "boost/algorithm/string/join.hpp" -#include <initializer_list> -#include <string> +#include <Gaudi/Accumulators.h> +#include <Gaudi/Functional/utilities.h> +#include <GaudiAlg/GaudiAlgorithm.h> +#include <GaudiAlg/GaudiHistoAlg.h> -// TODO: fwd declare instead? -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiAlg/GaudiHistoAlg.h" -#include "GaudiKernel/DataObjectHandle.h" -#include "GaudiKernel/SerializeSTL.h" +namespace Gaudi::Functional::Traits { + // this example uses GaudiHistoAlg as base class, and the default handle types for + // input and output + using useGaudiHistoAlg = use_<BaseClass_t<GaudiHistoAlg>>; -namespace Gaudi::Functional { + // this is the default, but is kept for backward compatibility + using useAlgorithm = use_<BaseClass_t<Gaudi::Algorithm>>; - // This utility is needed when the inputs of a functional algorithm may be stored in several locations - inline std::string concat_alternatives( std::initializer_list<std::string> c ) { - return boost::algorithm::join( c, ":" ); - } - - template <typename... Strings> - std::string concat_alternatives( const Strings&... s ) { - return concat_alternatives( std::initializer_list<std::string>{ s... } ); - } - - [[deprecated( "please use `updateHandleLocation` instead of `Gaudi::Functional::updateHandleLocation`" )]] inline void - updateHandleLocation( IProperty& parent, const std::string& prop, const std::string& newLoc ) { - auto sc = parent.setProperty( prop, newLoc ); - if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc ); - } - - [[deprecated( - "please use `updateHandleLocations` instead of `Gaudi::Functional::updateHandleLocations`" )]] inline void - updateHandleLocations( IProperty& parent, const std::string& prop, const std::vector<std::string>& newLocs ) { - std::ostringstream ss; - GaudiUtils::details::ostream_joiner( - ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& { return os << "'" << i << "'"; } ) - << ']'; - auto sc = parent.setProperty( prop, ss.str() ); - if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc ); - } - - namespace Traits { - - // traits classes used to customize Transformer and FilterPredicate - // Define the types to to be used as baseclass, and as in- resp. output hanldes. - // In case a type is not specified in the traits struct, a default is used. - // - // The defaults are: - // - // using BaseClass = GaudiAlgorithm - // template <typename T> using InputHandle = DataObjectHandle<T>; - // template <typename T> using OutputHandle = DataObjectHandle<T>; - // - - // the best way to 'compose' traits is by inheriting them one-by-one... - template <typename... Base> - struct use_ : Base... {}; - - // helper classes one can inherit from to specify a specific trait - template <typename Base> - struct BaseClass_t { - using BaseClass = Base; - }; - - template <template <typename> class Handle> - struct InputHandle_t { - template <typename T> - using InputHandle = Handle<T>; - }; - - template <template <typename> class Handle> - struct OutputHandle_t { - template <typename T> - using OutputHandle = Handle<T>; - }; - - template <typename Data, typename View> - struct writeViewFor { - template <typename T> - using OutputHandle = std::enable_if_t<std::is_same_v<T, Data>, DataObjectWriteHandle<View, Data>>; - }; - - // add support for objects that should reside in the TES for lifetime management, but should not - // be used explicitly and/or directly by downstream code. - template <typename Data> - struct WriteOpaqueFor { - struct OpaqueView { - OpaqueView() = default; - template <typename T> - OpaqueView( T const& ) {} - }; - - template <typename T> - using OutputHandle = std::enable_if_t<std::is_same_v<T, Data>, DataObjectWriteHandle<OpaqueView, Data>>; - }; - - // this uses the defaults -- and it itself is the default ;-) - using useDefaults = use_<>; - - // this example uses GaudiHistoAlg as baseclass, and the default handle types for - // input and output - using useGaudiHistoAlg = use_<BaseClass_t<GaudiHistoAlg>>; - - // use Gaudi::Algorithm as base class -- this should be the base class! - using useAlgorithm = use_<BaseClass_t<Gaudi::Algorithm>>; - - // use the legacy GaudiAlgorithm as base class -- this is (annoyingly) the current default - using useLegacyGaudiAlgorithm = use_<BaseClass_t<GaudiAlgorithm>>; - - } // namespace Traits -} // namespace Gaudi::Functional - -#endif + // use legacy GaudiAlgorithm as base class + using useLegacyGaudiAlgorithm = use_<BaseClass_t<GaudiAlgorithm>>; +} // namespace Gaudi::Functional::Traits diff --git a/GaudiAlg/include/GaudiAlg/GetAlgs.h b/GaudiAlg/include/GaudiAlg/GetAlgs.h index a7bd14bf7ec012bdb839f4af7f85d2f36e378cb9..e4ab13d1977c5b88fce9113803c83a45326ce27b 100644 --- a/GaudiAlg/include/GaudiAlg/GetAlgs.h +++ b/GaudiAlg/include/GaudiAlg/GetAlgs.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,24 +8,20 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDIALG_GETALGS_H -#define GAUDIALG_GETALGS_H 1 -// ============================================================================ -// Include files -// ============================================================================ -#include "GaudiKernel/IAlgorithm.h" -#include "GaudiKernel/Kernel.h" -// ============================================================================ -// forward declarations -// ============================================================================ +#pragma once + +#include <GaudiKernel/IAlgorithm.h> +#include <GaudiKernel/Kernel.h> + class IAlgContextSvc; class GaudiAlgorithm; struct GaudiHistoAlg; struct GaudiTupleAlg; class GaudiSequencer; -class Sequencer; -// ============================================================================ + namespace Gaudi { + class Sequencer; + namespace Utils { // ======================================================================== /** simple function to extract the last active @@ -133,7 +129,3 @@ namespace Gaudi { // ======================================================================== } // namespace Utils } // end of namespace Gaudi -// ============================================================================ -// The END -// ============================================================================ -#endif // GAUDIALG_GETALGS_H diff --git a/GaudiAlg/include/GaudiAlg/MergingTransformer.h b/GaudiAlg/include/GaudiAlg/MergingTransformer.h index 5ea92f873be60041047af94df0f89f7f2d3554f5..5e6426e21574916cf345f555b016ffe34b46b0ee 100644 --- a/GaudiAlg/include/GaudiAlg/MergingTransformer.h +++ b/GaudiAlg/include/GaudiAlg/MergingTransformer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,415 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - #pragma once -#include <functional> -#include <string> -#include <vector> - -#include "Gaudi/Algorithm.h" -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" - -namespace Gaudi::Functional { - - using details::vector_of_const_; - - namespace details { - template <typename F, size_t... Is> - auto for_impl( F&& f, std::index_sequence<Is...> ) { - if constexpr ( std::disjunction_v<std::is_void<std::invoke_result_t<F, std::integral_constant<int, Is>>>...> ) { - ( std::invoke( f, std::integral_constant<int, Is>{} ), ... ); - } else { - return std::array{ std::invoke( f, std::integral_constant<int, Is>{} )... }; - } - } - - template <auto N, typename F> - decltype( auto ) for_( F&& f ) { - return for_impl( std::forward<F>( f ), std::make_index_sequence<N>{} ); - } - - template <typename Sig> - struct is_void_fun : std::false_type {}; - template <typename... Args> - struct is_void_fun<void( Args... )> : std::true_type {}; - template <typename Sig> - inline constexpr bool is_void_fun_v = is_void_fun<Sig>::value; - - template <typename Signature, typename Traits_, bool isLegacy> - struct MergingTransformer; - - ////// Many of the same -> 1 or 0 - template <typename Out, typename In, typename Traits_> - struct MergingTransformer<Out( const vector_of_const_<In>& ), Traits_, true> - : DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_> { - private: - using base_class = DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_>; - - public: - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - - MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs ) - : base_class( std::move( name ), locator ) - , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), - [this]( Gaudi::Details::PropertyBase& ) { - this->m_inputs = - make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); - if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set - // optional flag... so do it - // explicitly here... - std::for_each( this->m_inputs.begin(), this->m_inputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } { - static_assert( std::is_void_v<Out> ); - } - - MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, const KeyValue& output ) - : base_class( std::move( name ), locator, output ) - , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), - [this]( Gaudi::Details::PropertyBase& ) { - this->m_inputs = - make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); - if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set - // optional flag... so do it - // explicitly here... - std::for_each( this->m_inputs.begin(), this->m_inputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } { - static_assert( !std::is_void_v<Out> ); - } - - // accessor to input Locations - const std::string& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } - unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } - - // derived classes can NOT implement execute - StatusCode execute() override final { - vector_of_const_<In> ins; - ins.reserve( m_inputs.size() ); - std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), details2::get_from_handle<In>{} ); - try { - if constexpr ( std::is_void_v<Out> ) { - std::as_const ( *this )( std::as_const( ins ) ); - } else { - put( std::get<0>( this->m_outputs ), std::as_const( *this )( std::as_const( ins ) ) ); - } - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - virtual Out operator()( const vector_of_const_<In>& inputs ) const = 0; - - private: - // if In is a pointer, it signals optional (as opposed to mandatory) input - template <typename T> - using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; - std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... - Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... - // TODO/FIXME: replace vector of DataObjID property + call-back with a - // vector<handle> property ... as soon as declareProperty can deal with that. - }; - - template <typename Out, typename... Ins, typename Traits_> - struct MergingTransformer<Out( const vector_of_const_<Ins>&... ), Traits_, false> - : DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_> { - - using base_class = DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_>; - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - using InKeys = details::RepeatValues_<KeyValues, sizeof...( Ins )>; - - private: - auto construct_properties( InKeys inputs ) { - return details::for_<sizeof...( Ins )>( [&]( auto I ) { - constexpr auto i = decltype( I )::value; - auto& ins = std::get<i>( inputs ); - return Gaudi::Property<std::vector<DataObjID>>{ - this, ins.first, details::to_DataObjID( ins.second ), - [this]( auto&& ) { - auto& handles = std::get<i>( this->m_inputs ); - auto& ins = std::get<i>( this->m_inputLocations ); - using Handles = typename std::decay_t<decltype( handles )>; - handles = make_vector_of_handles<Handles>( this, ins ); - if ( std::is_pointer_v<typename Handles::value_type> ) { // handle constructor does not (yet) allow to - // set - // optional flag... so do it - // explicitly here... - std::for_each( handles.begin(), handles.end(), []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } }; - } ); - } - - public: - MergingTransformer( std::string name, ISvcLocator* locator, InKeys inputs ) - : base_class( std::move( name ), locator ), m_inputLocations{ construct_properties( inputs ) } { - static_assert( std::is_void_v<Out> ); - } - - MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs ) - : MergingTransformer{ name, locator, InKeys{ inputs } } { - static_assert( sizeof...( Ins ) == 1 ); - } - - MergingTransformer( std::string name, ISvcLocator* locator, InKeys inputs, const KeyValue& output ) - : base_class( std::move( name ), locator, output ), m_inputLocations{ construct_properties( inputs ) } { - static_assert( !std::is_void_v<Out> ); - } - - MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, const KeyValue& output ) - : MergingTransformer{ name, locator, InKeys{ inputs }, output } { - static_assert( sizeof...( Ins ) == 1 ); - } - - // accessor to input Locations - const std::string& inputLocation( unsigned int i, unsigned int j ) const { - return m_inputLocations.at( i ).value().at( j ).key(); - } - const std::string& inputLocation( unsigned int i ) const { - static_assert( sizeof...( Ins ) == 1 ); - return inputLocation( 0, i ); - } - unsigned int inputLocationSize( int i = 0 ) const { return m_inputLocations.at( i ).value().size(); } - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ) const override final { - std::tuple<vector_of_const_<Ins>...> inss; - details::for_<sizeof...( Ins )>( [&]( auto I ) { - constexpr size_t i = decltype( I )::value; - auto& ins = std::get<i>( inss ); - auto& handles = std::get<i>( m_inputs ); - ins.reserve( handles.size() ); - std::transform( handles.begin(), handles.end(), std::back_inserter( ins ), - details::details2::get_from_handle<typename std::decay_t<decltype( ins )>::value_type>{} ); - } ); - try { - if constexpr ( std::is_void_v<Out> ) { - std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, inss ); - } else { - put( std::get<0>( this->m_outputs ), - std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, - inss ) ); - } - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - virtual Out operator()( const vector_of_const_<Ins>&... inputs ) const = 0; - - private: - // if In is a pointer, it signals optional (as opposed to mandatory) input - template <typename T> - using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; - std::tuple<std::vector<InputHandle_t<Ins>>...> m_inputs; // and make the handles properties instead... - std::array<Gaudi::Property<std::vector<DataObjID>>, sizeof...( Ins )> m_inputLocations; // TODO/FIXME: remove - // this duplication... - // TODO/FIXME: replace vector of string property + call-back with a - // vector<handle> property ... as soon as declareProperty can deal with that. - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using MergingTransformer = details::MergingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; - - // more meaningful alias for cases where the return type in Signature is void - template <typename Signature, typename Traits_ = Traits::useDefaults, - typename = std::enable_if_t<details::is_void_fun_v<Signature>>> - using MergingConsumer = details::MergingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; - - // M vectors of the same -> N - template <typename Signature, typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>> - struct MergingMultiTransformer; - - template <typename... Outs, typename... Ins, typename Traits_> - struct MergingMultiTransformer<std::tuple<Outs...>( vector_of_const_<Ins> const&... ), Traits_> - : details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_> { - - private: - using base_class = details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_>; - - public: - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - using InKeys = details::RepeatValues_<KeyValues, sizeof...( Ins )>; - using OutKeys = details::RepeatValues_<KeyValue, sizeof...( Outs )>; - static constexpr size_t n_args = sizeof...( Ins ); - - MergingMultiTransformer( std::string const& name, ISvcLocator* pSvcLocator, InKeys inputs, OutKeys outputs ) - : base_class{ name, pSvcLocator, std::move( outputs ) } - , m_inputLocations{ details::for_<n_args>( [&]( auto I ) { - constexpr auto i = decltype( I )::value; - auto& ins = std::get<i>( inputs ); - return Gaudi::Property<std::vector<DataObjID>>{ - this, ins.first, details::to_DataObjID( ins.second ), - [this]( auto&& ) { - auto& handles = std::get<i>( this->m_inputs ); - auto& ins = std::get<i>( this->m_inputLocations ); - using In = typename std::decay_t<decltype( handles )>::value_type; - handles = details::make_vector_of_handles<std::decay_t<decltype( handles )>>( this, ins ); - if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set - // optional flag... so do it - // explicitly here... - std::for_each( handles.begin(), handles.end(), []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } }; - } ) } {} - - MergingMultiTransformer( std::string const& name, ISvcLocator* pSvcLocator, KeyValues inputs, OutKeys outputs ) - : MergingMultiTransformer{ name, pSvcLocator, InKeys{ std::move( inputs ) }, std::move( outputs ) } { - static_assert( sizeof...( Ins ) == 1 ); - } - - // accessor to input Locations - std::string const& inputLocation( unsigned int i, unsigned int j ) const { - return m_inputLocations.at( i ).value().at( j ).key(); - } - std::string const& inputLocation( unsigned int j ) const { - static_assert( n_args == 1 ); - return inputLocation( 0, j ); - } - unsigned int inputLocationSize( int i = 0 ) const { return m_inputLocations.at( i ).value().size(); } - - // derived classes can NOT implement execute - StatusCode execute( EventContext const& ) const override final { - std::tuple<vector_of_const_<Ins>...> inss; - details::for_<sizeof...( Ins )>( [&]( auto I ) { - constexpr size_t i = decltype( I )::value; - auto& ins = std::get<i>( inss ); - auto& handles = std::get<i>( m_inputs ); - ins.reserve( handles.size() ); - std::transform( handles.begin(), handles.end(), std::back_inserter( ins ), - details::details2::get_from_handle<typename std::decay_t<decltype( ins )>::value_type>{} ); - } ); - try { - std::apply( - [&]( auto&... outhandle ) { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - std::apply( - [&outhandle...]( auto&&... data ) { - ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... ); - }, - std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, - inss ) ); - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - }, - this->m_outputs ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - virtual std::tuple<Outs...> operator()( const vector_of_const_<Ins>&... inputs ) const = 0; - - private: - // 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::tuple<std::vector<InputHandle_t<Ins>>...> m_inputs; // and make the handles properties instead... - std::array<Gaudi::Property<std::vector<DataObjID>>, sizeof...( Ins )> m_inputLocations; // TODO/FIXME: remove this - // duplication... - // TODO/FIXME: replace vector of string property + call-back with a - // vector<handle> property ... as soon as declareProperty can deal with that. - }; - - // Many of the same -> N with filter functionality - template <typename Signature, typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>> - struct MergingMultiTransformerFilter; - - template <typename... Outs, typename In, typename Traits_> - struct MergingMultiTransformerFilter<std::tuple<Outs...>( vector_of_const_<In> const& ), Traits_> - : details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_> { - - private: - using base_class = details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_>; - - public: - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - using OutKeys = details::RepeatValues_<KeyValue, sizeof...( Outs )>; - - MergingMultiTransformerFilter( std::string const& name, ISvcLocator* locator, KeyValues const& inputs, - OutKeys const& outputs ); - - // accessor to input Locations - std::string const& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } - unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } - - // derived classes can NOT implement execute - StatusCode execute( EventContext const& ) const override final { - vector_of_const_<In> ins; - ins.reserve( m_inputs.size() ); - std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), - details::details2::get_from_handle<In>{} ); - try { - return std::apply( - [&]( auto&... outhandle ) { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - return std::apply( - [&outhandle...]( bool passed, auto&&... data ) { - ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... ); - return passed; - }, - ( *this )( std::as_const( ins ) ) ); - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - }, - this->m_outputs ) - ? FilterDecision::PASSED - : FilterDecision::FAILED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - virtual std::tuple<bool, Outs...> operator()( const vector_of_const_<In>& inputs ) const = 0; - - private: - // 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<InputHandle_t<In>> m_inputs; // and make the handles properties instead... - Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... - // TODO/FIXME: replace vector of string property + call-back with a - // vector<handle> property ... as soon as declareProperty can deal with that. - }; - - template <typename... Outs, typename In, typename Traits_> - MergingMultiTransformerFilter<std::tuple<Outs...>( const vector_of_const_<In>& ), - Traits_>::MergingMultiTransformerFilter( std::string const& name, - ISvcLocator* pSvcLocator, - KeyValues const& inputs, - OutKeys const& outputs ) - : base_class( name, pSvcLocator, outputs ) - , m_inputLocations{ - this, inputs.first, details::to_DataObjID( inputs.second ), - [this]( Gaudi::Details::PropertyBase& ) { - this->m_inputs = details::make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); - if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set - // optional flag... so do it - // explicitly here... - std::for_each( this->m_inputs.begin(), this->m_inputs.end(), []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } {} - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/MergingTransformer.h> diff --git a/GaudiAlg/include/GaudiAlg/Producer.h b/GaudiAlg/include/GaudiAlg/Producer.h index 3b2653501106878681183625b7eaea0f0ec27fb0..ebfc86895ebfe24fafdac1afd1cb4795ea2314ae 100644 --- a/GaudiAlg/include/GaudiAlg/Producer.h +++ b/GaudiAlg/include/GaudiAlg/Producer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,34 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDI_FUNCTIONAL_PRODUCER_H -#define GAUDI_FUNCTIONAL_PRODUCER_H +#pragma once -#include "GaudiAlg/Transformer.h" -#include <utility> - -namespace Gaudi::Functional { - - namespace details { - - template <typename Signature, typename Traits_, bool isLegacy> - struct Producer; - - template <typename... Out, typename Traits_, bool legacy> - struct Producer<std::tuple<Out...>(), Traits_, legacy> : MultiTransformer<std::tuple<Out...>(), Traits_, legacy> { - using MultiTransformer<std::tuple<Out...>(), Traits_, legacy>::MultiTransformer; - }; - - template <typename Out, typename Traits_, bool legacy> - struct Producer<Out(), Traits_, legacy> : Transformer<Out(), Traits_, legacy> { - using Transformer<Out(), Traits_, legacy>::Transformer; - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using Producer = details::Producer<Signature, Traits_, details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional - -#endif +#include <Gaudi/Functional/Producer.h> diff --git a/GaudiAlg/include/GaudiAlg/ScalarTransformer.h b/GaudiAlg/include/GaudiAlg/ScalarTransformer.h index b226fd54b79e1e4a016000f9351b66b04c6fbd6b..e3f686220557421fa4fbc011f991d5a27e608d23 100644 --- a/GaudiAlg/include/GaudiAlg/ScalarTransformer.h +++ b/GaudiAlg/include/GaudiAlg/ScalarTransformer.h @@ -8,86 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef SCALAR_TRANSFORMER_H -#define SCALAR_TRANSFORMER_H +#pragma once -#include "GaudiAlg/Transformer.h" - -namespace Gaudi::Functional { - - // Scalar->Vector adapted N->1 algorithm - template <typename ScalarOp, typename TransformerSignature, typename Traits_ = Traits::useDefaults> - class ScalarTransformer; - template <typename ScalarOp, typename Out, typename... In, typename Traits_> - class ScalarTransformer<ScalarOp, Out( const In&... ), Traits_> : public Transformer<Out( const In&... ), Traits_> { - - /// Access the scalar operator - const ScalarOp& scalarOp() const { return static_cast<const ScalarOp&>( *this ); } - - public: - using Transformer<Out( const In&... ), Traits_>::Transformer; - - /// The main operator - Out operator()( const In&... in ) const override final { - const auto inrange = details::zip::range( in... ); - Out out; - out.reserve( inrange.size() ); - auto& scalar = scalarOp(); - for ( const auto&& tuple : inrange ) { - /// Call the scalar operator with the objects obtained from the given tuple as arguments - details::invoke_optionally( - [&out]( auto&& arg ) { details::insert( out, std::forward<decltype( arg )>( arg ) ); }, - std::apply( [&]( const auto&... i ) { return scalar( details::deref( i )... ); }, tuple ) ); - } - details::applyPostProcessing( scalar, out ); - return out; - } - }; - - // Scalar->Vector adapted N->M algorithm - template <typename ScalarOp, typename TransformerSignature, typename Traits_ = Traits::useDefaults> - class MultiScalarTransformer; - template <typename ScalarOp, typename... Out, typename... In, typename Traits_> - class MultiScalarTransformer<ScalarOp, std::tuple<Out...>( const In&... ), Traits_> - : public MultiTransformer<std::tuple<Out...>( const In&... ), Traits_> { - - /// Access the scalar operator - const ScalarOp& scalarOp() const { return static_cast<const ScalarOp&>( *this ); } - - public: - using MultiTransformer<std::tuple<Out...>( const In&... ), Traits_>::MultiTransformer; - - /// The main operator - std::tuple<Out...> operator()( const In&... in ) const override final { - const auto inrange = details::zip::range( in... ); - std::tuple<Out...> out; - std::apply( [sz = inrange.size()]( auto&&... o ) { ( o.reserve( sz ), ... ); }, out ); - auto& scalar = scalarOp(); - for ( const auto&& indata : inrange ) { - std::apply( - [&scalar, &indata]( auto&... out ) { - /// Call the scalar operator with the objects obtained from the given indata, - /// and invoke insert with it (unless the resulting type is an optional, - /// and the optional is not engaged) - details::invoke_optionally( - [&out...]( auto&& outdata ) { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - std::apply( - [&out...]( auto&&... outdata1 ) { - ( details::insert( out, std::forward<decltype( outdata1 )>( outdata1 ) ), ... ); - }, - std::forward<decltype( outdata )>( outdata ) ); - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - }, - std::apply( [&scalar]( const auto&... args ) { return scalar( details::deref( args )... ); }, - indata ) ); - }, - out ); - } - details::applyPostProcessing( scalar, out ); - return out; - } - }; -} // namespace Gaudi::Functional - -#endif +#include <Gaudi/Functional/ScalarTransformer.h> diff --git a/GaudiAlg/include/GaudiAlg/Sequencer.h b/GaudiAlg/include/GaudiAlg/Sequencer.h index b8da12de6c20d337675c3ec2b2228cc25b42dab2..c0fae9f06192a869f0ac606b92969530a6163a13 100644 --- a/GaudiAlg/include/GaudiAlg/Sequencer.h +++ b/GaudiAlg/include/GaudiAlg/Sequencer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,235 +8,8 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef ALGORITHM_SEQUENCER_H -#define ALGORITHM_SEQUENCER_H +#pragma once -// Include files -#include <Gaudi/Property.h> -#include <Gaudi/Sequence.h> +#include <Gaudi/Sequencer.h> -#include <mutex> - -class MsgStream; - -/** - ** ClassName: Sequencer - ** - ** Description: A Sequencer is essentially a list of Algorithms and is responsible - ** for their management. Note that Sequences may themselves contain other - ** Sequences. The default execute() implementation loops over the - ** members of the sequence, calling their execute() methods. However, this - ** can be modified if a member is disabled, has already been executed, or a - ** member indicates that it's filter fails. The the former two cases the - ** execution of the member is bypassed. In the latter case, the loop is - ** terminated and the Sequencer assumes the same filtered state as the - ** last member. - **/ -class GAUDI_API Sequencer : public Gaudi::Sequence { -public: - /** - ** Constructor(s) - **/ - using Gaudi::Sequence::Sequence; - /***************************** - ** Public Function Members ** - *****************************/ - - /** - ** Initialization of a sequencer. Typically things like histogram creation, - ** setting up of data structures etc, should be done here. If a sequence - ** has properties specified in the job options file, they will be set to - ** the requested values BEFORE the initialize() method is invoked. - **/ - StatusCode initialize() override; - - /** - ** Sequencer Reinitialization. - **/ - StatusCode reinitialize() override; - - /** - ** Sequencer finalization. - **/ - StatusCode start() override; - - /** - ** The actions to be performed by the sequencer on an event. This method - ** is invoked once per event. - **/ - StatusCode execute( const EventContext& ctx ) const override; - - /** - ** Sequencer finalization. - **/ - StatusCode stop() override; - - /** - ** Sequencer finalization. - **/ - StatusCode finalize() override; - - /** - ** additional interface methods - **/ - - /** - ** Was the branch filter passed for the last event? - **/ - bool branchFilterPassed( const EventContext& ctx ) const; - - /** - ** Set the branch filter passed flag for the last event - **/ - void setBranchFilterPassed( const EventContext& ctx, bool state ) const; - - /** - ** Has the StopOverride mode been set? - **/ - virtual bool isStopOverride() const; - - /** - ** Append an algorithm to the sequencer. - **/ - StatusCode append( Gaudi::Algorithm* pAlgorithm ); - - /** - ** Append an algorithm to the sequencer branch - **/ - StatusCode appendToBranch( Gaudi::Algorithm* pAlgorithm ); - - /** - ** Create a algorithm and append it to the sequencer. A call to this method - ** creates a child algorithm object. Note that the returned pointer is - ** to Algorithm (as opposed to IAlgorithm), and thus the methods of - ** IProperty are also available for the direct setting of the algorithm's - ** properties. Using this mechanism instead of creating algorithms - ** 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 - Gaudi::Algorithm*& pAlgorithm // Set to point to the newly created algorithm object - ); - - /** - ** Create a algorithm and append it to the sequencer branch. A call to this method - ** creates a child algorithm object. Note that the returned pointer is - ** to Algorithm (as opposed to IAlgorithm), and thus the methods of - ** IProperty are also available for the direct setting of the algorithm's - ** properties. Using this mechanism instead of creating algorithms - ** directly via the new operator is preferred since then the framework - ** may take care of all of the necessary book-keeping. - **/ - StatusCode createAndAppendToBranch( const std::string& type, // The concrete algorithm class of the algorithm - const std::string& name, // The name to be given to the algorithm - Gaudi::Algorithm*& pAlgorithm // Set to point to the newly created algorithm - // object - ); - - /** - ** Remove the specified algorithm from the sequencer - **/ - StatusCode remove( Gaudi::Algorithm* pAlgorithm ); - StatusCode remove( const std::string& name ); - StatusCode removeFromBranch( Gaudi::Algorithm* pAlgorithm ); - StatusCode removeFromBranch( const std::string& name ); - - /** - ** List of branch algorithms. These are the algorithms - ** that would get executed if a filter algorithm indicated - ** a failure. The branch is located within the main sequence - ** by the first element, which is the filter algorithm. - **/ - const std::vector<Gaudi::Algorithm*>& branchAlgorithms() const; - std::vector<Gaudi::Algorithm*>& branchAlgorithms(); - - /// Decode Member Name list - StatusCode decodeMemberNames(); - - /// Decode branch member name list - StatusCode decodeBranchMemberNames(); - -protected: - /** - ** Append an algorithm to the sequencer. - **/ - StatusCode append( Gaudi::Algorithm* pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ); - - /** - ** Create a algorithm and append it to the sequencer. A call to this method - ** creates a child algorithm object. Note that the returned pointer is - ** to Algorithm (as opposed to IAlgorithm), and thus the methods of - ** IProperty are also available for the direct setting of the algorithm's - ** properties. Using this mechanism instead of creating algorithms - ** 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 - Gaudi::Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object - std::vector<Gaudi::Algorithm*>& theAlgs ); - - /** - ** Decode algorithm names, creating or appending algorithms as appropriate - **/ - StatusCode decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, std::vector<Gaudi::Algorithm*>& theAlgs, - std::vector<bool>& theLogic ); - - /** - ** Execute the members in the specified list - **/ - StatusCode execute( const EventContext& ctx, const std::vector<Gaudi::Algorithm*>& theAlgs, - const std::vector<bool>& theLogic, Gaudi::Algorithm*& lastAlgorithm, - std::size_t first = 0 ) const; - - /** - ** Execute member algorithm - **/ - StatusCode executeMember( Gaudi::Algorithm* theAlgorithm, const EventContext& context ) const; - - /** - ** Remove the specified algorithm from the sequencer - **/ - - StatusCode remove( const std::string& algname, std::vector<Gaudi::Algorithm*>& theAlgs ); - - // NO COPY / ASSIGNMENT ALLOWED - Sequencer( const Sequencer& a ) = delete; - Sequencer& operator=( const Sequencer& rhs ) = delete; - -public: - /// Produce string represention of the control flow expression. - std::ostream& toControlFlowExpression( std::ostream& os ) const override; - -private: - /************************** - ** Private Data Members ** - **************************/ - - Gaudi::Property<std::vector<std::string>> m_names{ this, - "Members", - {}, - [this]( auto& ) { - if ( this->isInitialized() ) this->decodeMemberNames().ignore(); - }, - "member names" }; - Gaudi::Property<std::vector<std::string>> m_branchNames{ this, - "BranchMembers", - {}, - [this]( auto& ) { - if ( this->isInitialized() ) - this->decodeBranchMemberNames().ignore(); - }, - "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<Gaudi::Algorithm*> m_branchAlgs; // Branch algorithms - std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list - - mutable std::mutex m_branchFilterMutex; - mutable std::map<EventContext::ContextID_t, bool> m_branchFilterPassed; // Branch filter passed flag -}; - -#endif // ALGORITHM_SEQUENCER_H +using Sequencer = Gaudi::Sequencer; diff --git a/GaudiAlg/include/GaudiAlg/SplittingMergingTransformer.h b/GaudiAlg/include/GaudiAlg/SplittingMergingTransformer.h index acd4a3a776e6d721699634a804f19136c2a1efc9..4f1f16f46074ed3b014456fa4ca26b55a66c93e8 100644 --- a/GaudiAlg/include/GaudiAlg/SplittingMergingTransformer.h +++ b/GaudiAlg/include/GaudiAlg/SplittingMergingTransformer.h @@ -1,5 +1,5 @@ /*****************************************************************************\ -* (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration * +* (c) Copyright 2022-2023 CERN for the benefit of the LHCb Collaboration * * * * This software is distributed under the terms of the GNU General Public * * Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * @@ -8,121 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \*****************************************************************************/ - #pragma once -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" -#include <functional> -#include <optional> -#include <string> -#include <vector> - -namespace Gaudi::Functional { - template <typename Container> - using vector_of_ = std::vector<Container>; - template <typename Container> - using vector_of_optional_ = std::vector<std::optional<Container>>; - using details::vector_of_const_; - - namespace details { - - template <typename Signature, typename Traits_, bool isLegacy> - class SplittingMergingTransformer; - - template <typename Out, typename In, typename Traits_> - class SplittingMergingTransformer<vector_of_<Out>( const vector_of_const_<In>& ), Traits_, false> - : public BaseClass_t<Traits_> { - using base_class = BaseClass_t<Traits_>; - static_assert( std::is_base_of_v<Algorithm, base_class>, "BaseClass must inherit from Algorithm" ); - - public: - using KeyValues = std::pair<std::string, std::vector<std::string>>; - - SplittingMergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, - const KeyValues& outputs ) - : base_class( std::move( name ), locator ) - , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), - [this]( Gaudi::Details::PropertyBase& ) { - this->m_inputs = - make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); - if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set - // optional flag... so do it - // explicitly here... - std::for_each( this->m_inputs.begin(), this->m_inputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } - , m_outputLocations( - this, outputs.first, details::to_DataObjID( outputs.second ), - [this]( Gaudi::Details::PropertyBase& ) { - this->m_outputs = - details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); - if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to - // set optional flag... so - // do it explicitly here... - std::for_each( this->m_outputs.begin(), this->m_outputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} - - // accessor to output Locations - const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } - unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } - - // accessor to input Locations - const std::string& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } - unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ) const override final { - try { - vector_of_const_<In> ins; - ins.reserve( m_inputs.size() ); - std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), - details2::get_from_handle<In>{} ); - // TODO:FIXME: how does operator() know the number and order of expected outputs? - auto out = ( *this )( std::as_const( ins ) ); - if ( out.size() != m_outputs.size() ) { - throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + - " containers, got " + std::to_string( out.size() ) + " instead", - this->name(), StatusCode::FAILURE ); - } - for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // TODO/FIXME: how does the callee know in which order to produce the outputs? - // (note: 'missing' items can be specified by making Out an std::optional<Out>, - // and only those entries which contain an Out are stored) - virtual vector_of_<Out> operator()( const vector_of_const_<In>& ) const = 0; - - private: - // if In is a pointer, it signals optional (as opposed to mandatory) input - template <typename T> - using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; - std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... - Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... - // TODO/FIXME: replace vector of DataObjID property + call-back with a - // vector<handle> property ... as soon as declareProperty can deal with that. - template <typename T> - using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; - std::vector<OutputHandle<Out>> m_outputs; - Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the - // actual handles! - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using SplittingMergingTransformer = - details::SplittingMergingTransformer<Signature, Traits_, false>; // details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/SplittingMergingTransformer.h> diff --git a/GaudiAlg/include/GaudiAlg/SplittingTransformer.h b/GaudiAlg/include/GaudiAlg/SplittingTransformer.h index f3a988b90022a9552635a54dc5cfebba97fb318c..66aab2ab91ba50b3f9ae126fa5f0cd3c71dcaa56 100644 --- a/GaudiAlg/include/GaudiAlg/SplittingTransformer.h +++ b/GaudiAlg/include/GaudiAlg/SplittingTransformer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,168 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - #pragma once -#include <functional> -#include <optional> -#include <string> -#include <vector> - -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" - -namespace Gaudi::Functional { - - template <typename Container> - using vector_of_ = std::vector<Container>; - template <typename Container> - using vector_of_optional_ = std::vector<std::optional<Container>>; - - namespace details { - - template <typename Signature, typename Traits_, bool isLegacy> - class SplittingTransformer; - - ////// N -> Many of the same one (value of Many not known at compile time, but known at configuration time) - template <typename Out, typename... In, typename Traits_> - class SplittingTransformer<vector_of_<Out>( const In&... ), Traits_, true> - : public details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using base_class = details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>; - - public: - constexpr static std::size_t N = base_class::N_in; - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - - SplittingTransformer( std::string name, ISvcLocator* locator, const RepeatValues_<KeyValue, N>& inputs, - const KeyValues& outputs ) - : base_class( std::move( name ), locator, inputs ) - , m_outputLocations( - this, outputs.first, details::to_DataObjID( outputs.second ), - [=]( Gaudi::Details::PropertyBase& ) { - this->m_outputs = - details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); - if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to - // set optional flag... so - // do it explicitly here... - std::for_each( this->m_outputs.begin(), this->m_outputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} - - SplittingTransformer( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValues& output ) - : SplittingTransformer( std::move( name ), locator, std::forward_as_tuple( input ), output ) { - static_assert( N == 1, "single input argument requires single input signature" ); - } - - // accessor to output Locations - const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } - unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } - - // derived classes can NOT implement execute - StatusCode execute() override final { - try { - // TODO:FIXME: how does operator() know the number and order of expected outputs? - auto out = details::filter_evtcontext_t<In...>::apply( *this, this->m_inputs ); - if ( out.size() != m_outputs.size() ) { - throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + - " containers, got " + std::to_string( out.size() ) + " instead", - this->name(), StatusCode::FAILURE ); - } - for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // TODO/FIXME: how does the callee know in which order to produce the outputs? - // (note: 'missing' items can be specified by making Out an std::optional<Out>, - // and only those entries which contain an Out are stored) - virtual vector_of_<Out> operator()( const In&... ) const = 0; - - private: - template <typename T> - using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; - std::vector<OutputHandle<Out>> m_outputs; - Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the - // actual handles! - }; - - template <typename Out, typename... In, typename Traits_> - class SplittingTransformer<vector_of_<Out>( const In&... ), Traits_, false> - : public details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { - using base_class = details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>; - - public: - constexpr static std::size_t N = base_class::N_in; - using KeyValue = typename base_class::KeyValue; - using KeyValues = typename base_class::KeyValues; - - SplittingTransformer( std::string name, ISvcLocator* locator, const RepeatValues_<KeyValue, N>& inputs, - const KeyValues& outputs ) - : base_class( std::move( name ), locator, inputs ) - , m_outputLocations( - this, outputs.first, details::to_DataObjID( outputs.second ), - [=]( Gaudi::Details::PropertyBase& ) { - this->m_outputs = - details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); - if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to - // set optional flag... so - // do it explicitly here... - std::for_each( this->m_outputs.begin(), this->m_outputs.end(), - []( auto& h ) { h.setOptional( true ); } ); - } - }, - Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} - - SplittingTransformer( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValues& output ) - : SplittingTransformer( std::move( name ), locator, std::forward_as_tuple( input ), output ) { - static_assert( N == 1, "single input argument requires single input signature" ); - } - - // accessor to output Locations - const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } - unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ctx ) const override final { - try { - // TODO:FIXME: how does operator() know the number and order of expected outputs? - auto out = details::filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ); - if ( out.size() != m_outputs.size() ) { - throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + - " containers, got " + std::to_string( out.size() ) + " instead", - this->name(), StatusCode::FAILURE ); - } - for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // TODO/FIXME: how does the callee know in which order to produce the outputs? - // (note: 'missing' items can be specified by making Out an std::optional<Out>, - // and only those entries which contain an Out are stored) - virtual vector_of_<Out> operator()( const In&... ) const = 0; - - private: - template <typename T> - using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; - std::vector<OutputHandle<Out>> m_outputs; - Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the - // actual handles! - }; - - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using SplittingTransformer = details::SplittingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/SplittingTransformer.h> diff --git a/GaudiAlg/include/GaudiAlg/Transformer.h b/GaudiAlg/include/GaudiAlg/Transformer.h index 3d4a1b8657042b72967fae51e6a36a72a748dc50..c1bd8ea9deb66f6d62527297ed47ae8d0947e38f 100644 --- a/GaudiAlg/include/GaudiAlg/Transformer.h +++ b/GaudiAlg/include/GaudiAlg/Transformer.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,239 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - #pragma once -#include "GaudiAlg/FunctionalDetails.h" -#include "GaudiAlg/FunctionalUtilities.h" -#include "GaudiKernel/FunctionalFilterDecision.h" -#include "GaudiKernel/GaudiException.h" -#include <type_traits> -#include <utility> - -// Adapt an Algorithm (by default, GaudiAlgorithm) so that derived classes -// a) do not need to access the event store, and have to explicitly -// state their data dependencies -// b) are encouraged not to have state which depends on the events -// (eg. histograms, counters will have to be mutable) - -namespace Gaudi ::Functional { - - namespace details { - - template <typename Signature, typename Traits_, bool isLegacy> - struct Transformer; - - // general N -> 1 algorithms - template <typename Out, typename... In, typename Traits_> - struct Transformer<Out( const In&... ), Traits_, true> - : DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute() override final { - try { - if constexpr ( sizeof...( In ) == 0 ) { - put( std::get<0>( this->m_outputs ), ( *this )() ); - } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { - put( std::get<0>( this->m_outputs ), ( *this )( Gaudi::Hive::currentContext() ) ); - } else { - put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ); - } - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual Out operator()( const In&... ) const = 0; - }; - - template <typename Out, typename... In, typename Traits_> - struct Transformer<Out( const In&... ), Traits_, false> - : DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ctx ) const override final { - try { - if constexpr ( sizeof...( In ) == 0 ) { - put( std::get<0>( this->m_outputs ), ( *this )() ); - } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { - put( std::get<0>( this->m_outputs ), ( *this )( ctx ) ); - } else { - put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); - } - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual Out operator()( const In&... ) const = 0; - }; - - // - // general N -> M algorithms - // - template <typename Signature, typename Traits_, bool isLegacy> - struct MultiTransformer; - - template <typename... Out, typename... In, typename Traits_> - struct MultiTransformer<std::tuple<Out...>( const In&... ), Traits_, true> - : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute() override final { - try { - std::apply( - [this]( auto&... ohandle ) { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - - if constexpr ( sizeof...( In ) == 0 ) { - std::apply( [&ohandle...]( - auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, - std::as_const( *this )() ); - } else { - std::apply( [&ohandle...]( - auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, - filter_evtcontext_t<In...>::apply( std::as_const( *this ), this->m_inputs ) ); - } - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - }, - this->m_outputs ); - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual std::tuple<Out...> operator()( const In&... ) const = 0; - }; - - template <typename... Out, typename... In, typename Traits_> - struct MultiTransformer<std::tuple<Out...>( const In&... ), Traits_, false> - : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ctx ) const override final { - try { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - std::apply( - [this, &ctx]( auto&... ohandle ) { - if constexpr ( sizeof...( In ) == 0 ) { - std::apply( [&ohandle...]( - auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, - ( *this )() ); - } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { - std::apply( [&ohandle...]( - auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, - ( *this )( ctx ) ); - } else { - std::apply( [&ohandle...]( - auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, - filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); - } - }, - this->m_outputs ); - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - return FilterDecision::PASSED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual std::tuple<Out...> operator()( const In&... ) const = 0; - }; - - // - // general N -> M algorithms with filter functionality - // - template <typename Signature, typename Traits_, bool isLegacy> - struct MultiTransformerFilter; - - template <typename... Out, typename... In, typename Traits_> - struct MultiTransformerFilter<std::tuple<Out...>( const In&... ), Traits_, true> - : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute() override final { - try { - return std::apply( - [&]( auto&... ohandle ) { - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN - return std::apply( - [&ohandle...]( bool passed, auto&&... data ) { - ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); - return passed; - }, - filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ); - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - }, - this->m_outputs ) - ? FilterDecision::PASSED - : FilterDecision::FAILED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual std::tuple<bool, Out...> operator()( const In&... ) const = 0; - }; - - template <typename... Out, typename... In, typename Traits_> - struct MultiTransformerFilter<std::tuple<Out...>( const In&... ), Traits_, false> - : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { - using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; - - // derived classes can NOT implement execute - StatusCode execute( const EventContext& ctx ) const override final { - try { - return std::apply( - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN[&]( auto&... ohandle ) { - return std::apply( - [&ohandle...]( bool passed, auto&&... data ) { - ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); - return passed; - }, - filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); - }, - GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END - - this->m_outputs ) - ? FilterDecision::PASSED - : FilterDecision::FAILED; - } catch ( GaudiException& e ) { - ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; - return e.code(); - } - } - - // instead they MUST implement this operator - virtual std::tuple<bool, Out...> operator()( const In&... ) const = 0; - }; - } // namespace details - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using Transformer = details::Transformer<Signature, Traits_, details::isLegacy<Traits_>>; - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using MultiTransformer = details::MultiTransformer<Signature, Traits_, details::isLegacy<Traits_>>; - - template <typename Signature, typename Traits_ = Traits::useDefaults> - using MultiTransformerFilter = details::MultiTransformerFilter<Signature, Traits_, details::isLegacy<Traits_>>; - -} // namespace Gaudi::Functional +#include <Gaudi/Functional/Transformer.h> diff --git a/GaudiPython/include/GaudiPython/AlgDecorators.h b/GaudiAlg/include/GaudiPython/AlgDecorators.h similarity index 79% rename from GaudiPython/include/GaudiPython/AlgDecorators.h rename to GaudiAlg/include/GaudiPython/AlgDecorators.h index b64eea1e7919ce359df36d3ac622b0698a228429..7a796bfab0406432f822ee8c44c517b2fff6e88b 100644 --- a/GaudiPython/include/GaudiPython/AlgDecorators.h +++ b/GaudiAlg/include/GaudiPython/AlgDecorators.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,26 +8,11 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// ============================================================================ -#ifndef GAUDIPYTHON_ALGDECORATORS_H -#define GAUDIPYTHON_ALGDECORATORS_H 1 -// ============================================================================ -// Include files -// ============================================================================ -// STD & STL -// ============================================================================ +#pragma once + +#include <GaudiAlg/GaudiAlgorithm.h> #include <string> -// ============================================================================ -// GaudiAlg -// ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" -// ============================================================================ -// GaudiPython -// ============================================================================ -#include "GaudiPython/GaudiPython.h" -// ============================================================================ -// forward declarations -// ============================================================================ + class IInterface; class IProperty; class IAlgTool; @@ -35,6 +20,7 @@ class IAlgorithm; class GaudiAlgorithm; class GaudiTool; class DataObject; + // ============================================================================ /** @file * @@ -46,9 +32,8 @@ class DataObject; // ============================================================================ namespace GaudiPython { // ========================================================================== - /** @class Decorator - * simple class with allows to "decorate" the python - * algorithm with 'basic' funtionality from class GaudiAlgorithm + /** simple class that allows to "decorate" the python + * algorithm with 'basic' functionality from class GaudiAlgorithm * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr * @date 2007-08-03 */ @@ -134,8 +119,4 @@ namespace GaudiPython { // ======================================================================== }; // ========================================================================== -} // end of namespace GaudiPython -// ============================================================================ -// The END -// ============================================================================ -#endif // GAUDIPYTHON_ALGDECORATORS_H +} // namespace GaudiPython diff --git a/GaudiPython/include/GaudiPython/HistoDecorator.h b/GaudiAlg/include/GaudiPython/HistoDecorator.h similarity index 95% rename from GaudiPython/include/GaudiPython/HistoDecorator.h rename to GaudiAlg/include/GaudiPython/HistoDecorator.h index 3f3c8025492fd4f147a01c5774fd5a5d050d44f5..f4658d2f3a9f14d862a18921b1351e6235b2859a 100644 --- a/GaudiPython/include/GaudiPython/HistoDecorator.h +++ b/GaudiAlg/include/GaudiPython/HistoDecorator.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,23 +8,13 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// ============================================================================ -#ifndef GAUDIPYTHON_HISTODECORATOR_H -#define GAUDIPYTHON_HISTODECORATOR_H 1 -// ============================================================================ -// Include files -// ============================================================================ -// GaudiAlg -// ============================================================================ -#include "GaudiAlg/GaudiHistoAlg.h" -// ============================================================================ -// GaudiPython -// ============================================================================ -#include "GaudiPython/GaudiPython.h" -#include "GaudiPython/Vector.h" -// ============================================================================ +#pragma once + +#include <GaudiAlg/GaudiHistoAlg.h> +#include <GaudiPython/Vector.h> + struct GaudiHistoTool; -// ============================================================================ + namespace GaudiPython { /** @class HistoDecorator GaudiPython/HistoDecorator.h * Simple decorator class to allow to reuse the functionality of @@ -424,8 +414,4 @@ namespace GaudiPython { // ======================================================================== }; // ========================================================================== -} // end of namespace GaudiPython -// ============================================================================ -// The END -// ============================================================================ -#endif // GAUDIPYTHON_HISTODECORATOR_H +} // namespace GaudiPython diff --git a/GaudiAlg/include/GaudiPython/PyAlg.h b/GaudiAlg/include/GaudiPython/PyAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..86f41c52cb5e6547ec2c2cc86ce3a79baf9644b8 --- /dev/null +++ b/GaudiAlg/include/GaudiPython/PyAlg.h @@ -0,0 +1,76 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include <GaudiPython/Algorithm.h> +#include <Python.h> + +namespace GaudiPython { + // ========================================================================== + /** @class PyAlg + * general class to embed the existing algorithm/base class + * into the python + * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr + * @date 2005-08-03 + */ + template <class ALGORITHM> + class GAUDI_API PyAlg : public ALGORITHM { + // ======================================================================== + public: + // ======================================================================== + /** constructor from Python object and the name + * @param self python object + * @param name name of algorithm instance + */ + PyAlg( PyObject* self, const std::string& name ) : ALGORITHM( name, Gaudi::svcLocator() ), m_self( self ) { + // the printout of actual type for embedded algorithm has no sense + this->setProperty( "TypePrint", false ); + // The owner of the Algorithm is Python (as creator) therefore + // it should not be deleted by Gaudi (added an extra addRef()). + this->addRef(); + this->addRef(); + this->setType( System::typeinfoName( typeid( PyAlg ) ) ); + } + /// get the object + PyObject* _obj() const { return m_self; } // get the object + // ======================================================================== + public: + // ======================================================================== + StatusCode initialize() override { return GaudiPython::call_python_method( m_self, "initialize" ); } + StatusCode start() override { return GaudiPython::call_python_method( m_self, "start" ); } + StatusCode execute() override { return GaudiPython::call_python_method( m_self, "execute" ); } + StatusCode stop() override { return GaudiPython::call_python_method( m_self, "stop" ); } + StatusCode finalize() override { return GaudiPython::call_python_method( m_self, "finalize" ); } + // ======================================================================== + virtual IAlgorithm* ialgorithm() { return this; } + virtual IProperty* iproperty() { return this; } + // ======================================================================== + // preserve the existing methods + virtual StatusCode initialize_() { return ALGORITHM::initialize(); } + virtual StatusCode finalize_() { return ALGORITHM::finalize(); } + // ======================================================================== + private: + // ======================================================================== + /// the default constructor is disabled + PyAlg() = delete; + /// the copy constructor is disabled + PyAlg( const PyAlg& ) = delete; + /// the assignment operator is disabled + PyAlg& operator=( const PyAlg& ) = delete; + // ======================================================================== + private: + // ======================================================================== + /// "shadow" python class + PyObject* m_self; // "shadow" python class + // ======================================================================== + }; + // ========================================================================== +} // namespace GaudiPython diff --git a/GaudiPython/include/GaudiPython/TupleDecorator.h b/GaudiAlg/include/GaudiPython/TupleDecorator.h similarity index 93% rename from GaudiPython/include/GaudiPython/TupleDecorator.h rename to GaudiAlg/include/GaudiPython/TupleDecorator.h index 3ec111877cc02a8309aa882a506a31a0515f2e6d..aebe63911b18676976372d800719bca63fc45ecf 100644 --- a/GaudiPython/include/GaudiPython/TupleDecorator.h +++ b/GaudiAlg/include/GaudiPython/TupleDecorator.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,41 +8,29 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDIPYTHON_TUPLEDECORATOR_H -#define GAUDIPYTHON_TUPLEDECORATOR_H 1 -// ============================================================================ -// Include files -// ============================================================================ -#include "GaudiKernel/GenericMatrixTypes.h" -#include "GaudiKernel/GenericVectorTypes.h" -#include "GaudiKernel/Point3DTypes.h" -#include "GaudiKernel/Point4DTypes.h" -#include "GaudiKernel/SymmetricMatrixTypes.h" -#include "GaudiKernel/Time.h" -#include "GaudiKernel/Vector3DTypes.h" -#include "GaudiKernel/Vector4DTypes.h" -// ============================================================================ -// GaudiAlg -// ============================================================================ -#include "GaudiAlg/GaudiTupleAlg.h" -#include "GaudiAlg/ITupleTool.h" -#include "GaudiAlg/Tuple.h" -#include "GaudiAlg/TupleID.h" -#include "GaudiAlg/TupleObj.h" -#include "GaudiAlg/Tuples.h" -// ============================================================================ -// GaudiPython -// ============================================================================ -#include "GaudiPython/GaudiPython.h" -#include "GaudiPython/Vector.h" -// ============================================================================ -// Forward declarations -// ============================================================================ +#pragma once + +#include <GaudiAlg/GaudiTupleAlg.h> +#include <GaudiAlg/ITupleTool.h> +#include <GaudiAlg/Tuple.h> +#include <GaudiAlg/TupleID.h> +#include <GaudiAlg/TupleObj.h> +#include <GaudiAlg/Tuples.h> +#include <GaudiKernel/GenericMatrixTypes.h> +#include <GaudiKernel/GenericVectorTypes.h> +#include <GaudiKernel/Point3DTypes.h> +#include <GaudiKernel/Point4DTypes.h> +#include <GaudiKernel/SymmetricMatrixTypes.h> +#include <GaudiKernel/Time.h> +#include <GaudiKernel/Vector3DTypes.h> +#include <GaudiKernel/Vector4DTypes.h> +#include <GaudiPython/Vector.h> + namespace CLHEP { class HepGenMatrix; class HepVector; } // namespace CLHEP -// ============================================================================ + namespace GaudiPython { // ========================================================================== /** @class TupleDecorator TupleDecorator.h GaudiPython/TupleDecorator.h @@ -368,8 +356,4 @@ namespace GaudiPython { // ======================================================================== }; // ========================================================================== -} // end of namespace GaudiPython -// ============================================================================ -// The END -// ============================================================================ -#endif // GAUDIPYTHON_TUPLEDECORATOR_H +} // namespace GaudiPython diff --git a/GaudiAlg/python/GaudiAlg/Algs.py b/GaudiAlg/python/GaudiAlg/Algs.py new file mode 100644 index 0000000000000000000000000000000000000000..037024f59b05e91b3ea29730c0dc462cf12d285b --- /dev/null +++ b/GaudiAlg/python/GaudiAlg/Algs.py @@ -0,0 +1,1632 @@ +#!/usr/bin/env python3 +##################################################################################### +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# # +# This software is distributed under the terms of the Apache version 2 licence, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +##################################################################################### +# ============================================================================= +# @file +# +# Helper module, which effectively 'imports' few useful C++ algorithmic +# base classes into Python +# +# +# The major imported classes are : +# +# - GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package +# - HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package +# - TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 +# ============================================================================= +""" +******************************************************************************* +* * 'Physisics do not like it, * +* * physisics do not need it, * +* * physisics do not use it' * +* * **************************** +* * +* Helper module, which effectively 'imports' few useful C++ algorithmic * +* base classes into Python * +* * +******************************************************************************* +* The major imported classes are : * +* * +* (1) GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package * +* (2) HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package * +* (3) TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package * +******************************************************************************* +""" +from __future__ import print_function + +# ============================================================================= +__author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" +# ============================================================================= +# list of "public" symbols +# ============================================================================= +__all__ = ( + "GaudiAlgo", # base class for algorithms + "HistoAlgo", # base class for histo-related algorithms + "TupleAlgo", # base class for tuple-related algorithms + "Tuple", # N-Tuple + "HistoID", # ID for N-tuples + "TupleID", # ID for Histograms + "aida2root", # AIDA -> ROOT converter + "SUCCESS", # status code +) +# ============================================================================= +# import core of Gaudi +import GaudiPython.Bindings # The basic module + +iAlgorithm = GaudiPython.Bindings.iAlgorithm # Algorithm interface +iAlgTool = GaudiPython.Bindings.iAlgTool # Tool interface + +from GaudiAlg.HistoUtils import aida2root # AIDA -> ROOT converter +from GaudiPython.Bindings import SUCCESS # status code +from GaudiPython.Bindings import AppMgr # Application Manager +from GaudiPython.Bindings import InterfaceCast # "queryInterface" +from GaudiPython.Bindings import iDataSvc # Data Service +from GaudiPython.Bindings import iHistogramSvc # Histogram Service +from GaudiPython.Bindings import iNTupleSvc # N-Tuple service +from GaudiPython.Bindings import gbl as cpp # global C++ namespace + +from GaudiKernel import ROOT6WorkAroundEnabled + +# ============================================================================= +# std C++ namespace +std = cpp.std # std C++ namespace + +# "typedef" for GaudiPython::Vector +Vector = std.vector("double") +# "typedef" for GaudiPython::Matrix +Matrix = std.vector("std::vector<double>") + +# histogram and N-Tuple universal identifier +HID = cpp.GaudiAlg.ID +HistoID = HID +TID = HID +TupleID = TID + +# get the decorator: +AlgDecorator = cpp.GaudiPython.AlgDecorator +HistoDecorator = cpp.GaudiPython.HistoDecorator +TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator +TupleDecorator = cpp.GaudiPython.TupleDecorator + +# ============================================================================= +# Useful method to locate the tool a certain +# +# Usage: +# +# @code +# +# # locate public tool +# t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') +# # locate private tool +# t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) +# # locate public tool with defined name +# t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') +# # locate private tool with defined name +# t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) +# # locate public tool with defined name +# t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') +# # locate private tool with defined name +# t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) +# +# @endcode +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _tool_(self, interface, typename, name=None, parent=None, create=True): + """ + Useful method to locate the tool a certain + + Usage: + + # locate public tool + t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') + # locate private tool + t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) + # locate public tool with defined name + t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') + # locate private tool with defined name + t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) + # locate public tool with defined name + t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') + # locate private tool with defined name + t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) + + """ + if not interface: + interface = cpp.IAlgTool + if not parent: + parent = self + if name: + typename += "/" + name + _tool = AlgDecorator.tool_(self, typename, parent, create) + if not _tool: + return None + _tool = InterfaceCast(interface)(_tool) + if not _tool: + self.Warning("Invalid cast to interface %s" % interface) + return None + return _tool + + +# ============================================================================= +# Useful method to locate a service: +# +# Usage: +# +# @code +# +# ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) +# +# @endcode +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _service_(self, interface, name, create=True): + """ + Useful method to locate a service: + + Usage: + + ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) + + """ + if not interface: + interface = cpp.IInterface + _svc = AlgDecorator.svc_(self, name, create) + if not _svc: + return None + _svc = InterfaceCast(interface)(_svc) + if not _svc: + self.Warning("Invalid cast to interface %s" % interface) + return None + return _svc + + +# ============================================================================= +# The constructor from unique algorithm instance name, +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _init_(self, name, **args): + """ + The constructor from unique algorithm instance name & parameters + """ + self._Base.__init__(self, self, name) + appMgr = AppMgr() + algMgr = appMgr._algmgr + status = algMgr.addAlgorithm(self) + if status.isFailure(): + raise RuntimeError('Unable to add Algorithm "' + name + '"') + self._ialg = iAlgorithm(name, self) + for key in args: + setattr(self, key, args[key]) + # take some care about the ownership of the algorithms + if "GaudiPythonAlgos" not in appMgr.__dict__: + appMgr.__dict__["GaudiPythonAlgos"] = [] + appMgr.__dict__["GaudiPythonAlgos"].append(self) + + +# ============================================================================= +# The default initialization (initialization of base C++ class + data +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _initialize_(self): + """ + The default initialization (initialization of base C++ class + data) + """ + status = self._Base.initialize_(self) + if status.isFailure(): + return status + + # set the basic services + _e = self._Base.evtSvc(self) + _s = InterfaceCast(cpp.IService)(_e) + self._evtSvc_ = iDataSvc(_s.name(), _e) + + _d = self._Base.detSvc(self) + _s = InterfaceCast(cpp.IService)(_d) + self._detSvc_ = iDataSvc(_s.name(), _d) + + return status + + +# ============================================================================= +# The default initialization (initialization of base C++ class + data members) +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _initialize_histo_(self): + """ + The default initialization (initialization of base C++ class + data members) + """ + status = _initialize_(self) + if status.isFailure(): + return status + + # set the basic services + _h = self._Base.histoSvc(self) + _s = InterfaceCast(cpp.IService)(_h) + self._histoSvc_ = iHistogramSvc(_s.name(), _h) + + return status + + +# ============================================================================= +# The default initialization (initialization of base C++ class + data members) +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _initialize_tuple_(self): + """ + The default initialization (initialization of base C++ class + data members) + """ + status = _initialize_histo_(self) + if status.isFailure(): + return status + + # set the basic services + if self.produceNTuples(): + _n = self._Base.ntupleSvc(self) + _s = InterfaceCast(cpp.IService)(_n) + self._ntupleSvc_ = iNTupleSvc(_s.name(), _n) + + if self.produceEvtCols(): + _n = self._Base.evtColSvc(self) + _s = InterfaceCast(cpp.IService)(_n) + self._evtcolSvc_ = iNTupleSvc(_s.name(), _n) + + return status + + +# ============================================================================= +# Trivial helper function to access Event Data and Event Data Service +# +# Usage: +# +# @code +# +# # get event data service +# svc = self.evtSvc() +# +# # get the data +# hits = self.evtSvc('MC/Calo/Hits') +# +# @endcode +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _evtSvc(self, location=None): + """ + Trivial helper function to access Event Data and Event Data Service + + Usage: + + # get event data service + svc = self.evtSvc() + + # get the data + hits = self.evtSvc('MC/Calo/Hits') + """ + if not location: + return self._evtSvc_ + return self._evtSvc_[location] + + +# ============================================================================= +# Trivial helper function to access Detector Data and Detector Data Service +# +# Usage: +# +# @code +# +# # get detector data service +# svc = self.detSvc() +# +# # get the data +# lhcb = self.detSvc('/dd/Structure/LHCb') +# +# @endcode +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _detSvc(self, location=None): + """ + Trivial helper function to access Detector Data and Event Data Service + + Usage: + # get detector data service + svc = self.detSvc() + + # get the data + lhcb = self.detSvc('/dd/Structure/LHCb') + """ + if location is None: + return self._detSvc_ + return self._detSvc_[location] + + +# ============================================================================= +# Trivial helper function to access Histogram Data and Histogram Data Service +# +# Usage: +# +# @code +# +# # get histogram data service +# svc = self.histoSvc() +# +# # get the data +# histo = self.histoSvc('/stat/Calo/1') +# +# @endcode +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +def _histoSvc(self, address=None): + """ + Trivial helper function to access Histogram Data and Histogram Data Service + + Usage: + + # get histogram data service + svc = self.histoSvc() + + # get the data + histo = self.histoSvc('/stat/Calo/1') + """ + if not address: + return self._histoSvc_ + return self._histoSvc_[address] + + +# ============================================================================= +# Trivial function to access the data in TES + + +def _get(self, location): + """ + Trivial function to access the data in TES using the data service + """ + return self._evtSvc_[location] + + +# ============================================================================= +# Trivial function to access the data in TDS + + +def _getDet(self, location): + """ + Trivial function to access the data in TDS using data service + """ + return self._detSvc_[location] + + +# ============================================================================= +# get the data from TES using GaudiCommon methods, respecting RootInTES + + +def _get_(self, location, rootInTES=True): + """ + Get the object from Transient Event Store using GaudiCommon machinery, + respecting RootInTES behaviour + """ + return AlgDecorator.get_(self, location, rootInTES) + + +# ============================================================================= +# check the data from TES using GaudiCommon methods, respecting RootInTES + + +def _exist_(self, location, rootInTES=True): + """ + Check the object in Transient Event Store using GaudiCommon machinery, + respecting RootInTES behaviour + """ + return AlgDecorator.exist_(self, location, rootInTES) + + +# ============================================================================= +# Trivial helper function to access NTuple Service + + +def _ntupleSvc(self): + """ + Trivial function to access N-Tuple Service + """ + return self._ntupleSvc_ + + +# ============================================================================= +# Trivial helper function to access Event Collection Service + + +def _evtcolSvc(self): + """ + Trivial function to access Event Collection Service + """ + return self._evtcolSvc_ + + +# ============================================================================= +# The default finalization (finalization of base C++ class) +def _finalize_(self): + """ + The default finalization : finalize the base C++ class + """ + status = self._Base.finalize_(self) + return status + + +# ============================================================================= +# Dummy method returning success + + +def _success_(self): + return SUCCESS + + +# ============================================================================= +# check the existence of the property with the given name +def _hasProperty_(self, pname): + """ + The trivial function which checks the existence of the property with given name + """ + return cpp.Gaudi.Utils.hasProperty(self, pname) + + +# ============================================================================= +# get the value of the given property + + +def _getProperty_(self, pname): + """ + Get the property by name + """ + if not self.hasProperty(pname): + raise AttributeError("property %s does not exist" % pname) + return self._ialg.__getattr__(pname) + + +# ============================================================================= +# set the value for the given property + + +def _setProperty_(self, pname, pvalue): + """ + Set the property from the value + """ + if not self.hasProperty(pname): + raise AttributeError("property %s does not exist" % pname) + return self._ialg.__setattr__(pname, pvalue) + + +# ============================================================================= +# get the attribute or property + + +def _get_attr_(self, pname): + """ + Get the attribute (or property) + - if the attribute name corresponds to the property name, property value is returned + """ + if self.hasProperty(pname): + return self._ialg.__getattr__(pname) + else: + # Since self does not inherit from iAlgorithm (see !1116, 4f05f03678), + # delegate attribute lookup to self._ialg. + try: + return getattr(self._ialg, pname) + except AttributeError: + pass + raise AttributeError("attribute/property %s does not exist" % pname) + + +# ============================================================================= +# set the attribute or property + + +def _set_attr_(self, pname, pvalue): + """ + Set the attribute (or property) : + - if the attribute name corresponds to the property name, the property is updated + """ + if not self.hasProperty(pname): + self.__dict__[pname] = pvalue + else: + self._ialg.__setattr__(pname, pvalue) + + +_GaudiAlgorithm = cpp.GaudiPython.PyAlg("GaudiAlgorithm") +_GaudiHistoAlg = cpp.GaudiPython.PyAlg("GaudiHistoAlg") +_GaudiTupleAlg = cpp.GaudiPython.PyAlg("GaudiTupleAlg") + +# ============================================================================= +# @class GaudiAlgo +# the base class for all algorithm +# Python-image of C++ clkass GaudiAlgorithm +# +# Usage: +# +# @code +# +# from GauidAlg.Algs import GaudiAlgo, SUCCESS +# +# class MyClass(GaudiAlgo) : +# """ +# My specific Algorithm, derived from GaudiAlgo base class +# """ +# def __init__( self , name , **args ) : +# """ +# Constructor from algorithm instance name & parameters' +# """ +# #invoke the constructor of base class +# GaudiAlgo.__init__(self , name , **args ) +# +# def initialize ( self ) : +# 'Algorithm initialization' +# # initialize the base class +# status = GaudiAlgo.initialize( self ) +# if status.isFailure() : return status +# +# # locate the services and tools +# +# # locate some tool: +# extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') +# +# # locate the service +# rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') +# +# return SUCCESS +# +# +# def execute ( self ) : +# 'Major method (from IAlgorithm interface)' +# +# # get some data from Transient Event Store +# tracks = self.get('/Event/Rec/Tracks') +# +# # use counters +# c1 = self.counter('#Tracks') +# c2 = self.counter('No Tracks') +# if tracks.empty : +# c2+=1 +# c1 += tracks->size() +# +# if 1000 < tracks.size() : +# return self.Error('The event is *VERY* busy') +# +# return SUCCESS +# +# @endcode +# +# @see GaudiAlgorithm +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +class GaudiAlgo(_GaudiAlgorithm): + """ + ******************************************************************************* + * * 'Physisics do not like it, * + * * physisics do not need it, * + * * physisics do not use it' * + * * **************************** + * Usage: * + * * + * from GaudiAlg.Algs import GaudiAlgo, SUCCESS * + * * + * class MyClass(GaudiAlgo) : * + * ' My specific Algorithm, derived from GaudiAlgo base class ' * + * def __init__( self , name , **args ) : * + * 'Constructor from algorithm instance name & parameters' * + * #invoke the constructor of base class * + * GaudiAlgo.__init__(self , name , **args ) * + * * + * def initialize ( self ) : * + * 'Algorithm initialization' * + * # initialize the base class * + * status = GaudiAlgo.initialize( self ) * + * if status.isFailure() : return status * + * * + * # locate the services and tools * + * * + * # locate some tool: * + * extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') * + * * + * # locate the service * + * rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') * + * * + * return SUCCESS * + * * + * * + * def execute ( self ) : * + * 'Major method (from IAlgorithm interface)' * + * * + * # get some data from Transient Event Store * + * tracks = self.get('/Event/Rec/Tracks') * + * * + * # use counters * + * c1 = self.counter('#Tracks') * + * c2 = self.counter('No Tracks') * + * if tracks.empty : * + * c2+=1 * + * c1 += tracks->size() * + * * + * if 1000 < tracks.size() : * + * return self.Error('The event is *VERY* busy') * + * * + * return SUCCESS * + * * + ******************************************************************************* + """ + + pass + + +# ============================================================================= +# @class HistoAlgo +# The base class for easy histogramming +# +# Usage: +# +# +# @code +# +# from GaudiAlg.Algs import HistoAlgo, SUCCESS +# +# class MyClass(HistoAlgo) : +# ' My specific Algorithm, derived from GaudiAlgo base class ' +# def __init__( self , name , **args ) : +# 'Constructor from algorithm instance name & parameters' +# #invoke the constructor of base class +# HistoAlgo.__init__(self , name , **args ) +# +# def execute ( self ) : +# 'Major method (from IAlgorithm interface)' +# +# # get some data from Transient Event Store +# tracks = self.get('/Event/Rec/Tracks') +# +# self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) +# +# return SUCCESS +# +# @endcode +# +# Alternatively the histogram could be booked in advance: +# +# @code +# +# class MyClass(HistoAlgo) : +# ' My specific Algorithm, derived from GaudiAlgo base class ' +# def __init__( self , name ) : +# 'Constructor from algorithm instance name' +# #invoke the constructor of base class +# HistoAlgo.__init__(self , name ) +# +# def initialize ( self ) : +# 'Algorithm initialization' +# # initialize the base class +# status = HistoAlgo.initialize( self ) +# if status.isFailure() : return status +# +# # book the histogram +# self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) +# +# return SUCCESS +# +# +# def execute ( self ) : +# 'Major method (from IAlgorithm interface)' +# +# # get some data from Transient Event Store +# tracks = self.get('/Event/Rec/Tracks') +# +# # fill the histogram +# self.h1.fill ( tracks->size() ) +# +# return SUCCESS +# @endcode +# +# @see GaudiHistoAlg +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +class HistoAlgo(_GaudiHistoAlg): + """ + ******************************************************************************* + * * 'Physisics do not like it, * + * * physisics do not need it, * + * * physisics do not use it' * + * * **************************** + * Usage: * + * * + * from GaudiAlg.Algs import HistoAlgo, SUCCESS * + * * + * class MyClass(HistoAlgo) : * + * ' My specific Algorithm, derived from GaudiAlgo base class ' * + * def __init__( self , name , **args ) : * + * 'Constructor from algorithm instance name' * + * #invoke the constructor of base class * + * HistoAlgo.__init__(self , name , **args ) * + * * + * def execute ( self ) : * + * 'Major method (from IAlgorithm interface)' * + * * + * # get some data from Transient Event Store * + * tracks = self.get('/Event/Rec/Tracks') * + * * + * self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) * + * * + * return SUCCESS * + * * + * Alternatively the histogram could be booked in advance: * + * * + * class MyClass(HistoAlgo) : * + * ' My specific Algorithm, derived from GaudiAlgo base class ' * + * def __init__( self , name ) : * + * 'Constructor from algorithm instance name' * + * #invoke the constructor of base class * + * HistoAlgo.__init__(self , name ) * + * * + * def initialize ( self ) : * + * 'Algorithm initialization' * + * # initialize the base class * + * status = HistoAlgo.initialize( self ) * + * if status.isFailure() : return status * + * * + * # book the histogram * + * self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) * + * * + * return SUCCESS * + * * + * * + * def execute ( self ) : * + * 'Major method (from IAlgorithm interface)' * + * * + * # get some data from Transient Event Store * + * tracks = self.get('/Event/Rec/Tracks') * + * * + * # fill the histogram * + * self.h1.fill ( tracks->size() ) * + * * + * return SUCCESS * + * * + ******************************************************************************* + """ + + pass + + +# ============================================================================= +# @class TupleAlgo +# The base class for easy manupulations with N-Tuples +# +# Usage: +# +# @code +# +# from GaudiAlg.Algs import TupleAlgo, SUCCESS +# +# class MyClass(TupleAlgo) : +# ' My specific Algorithm, derived from TupleAlgo base class ' +# def __init__( self , name , **args ) : +# 'Constructor from algorithm instance name& parameters' +# #invoke the constructor of base class +# TupleAlgo.__init__(self , name , **args ) +# +# def execute ( self ) : +# 'Major method (from IAlgorithm interface)' +# +# # get some data from Transient Event Store +# tracks = self.get('/Event/Rec/Tracks') +# +# tup = self.nTuple('My N-Tuple') +# +# for track in tracks : +# +# pt = track.pt () +# p = track.p () +# chi2 = track.chi2 () +# +# #fill N-tuple: +# tup.column ( 'pt' , pt ) +# tup.column ( 'p' , p ) +# tup.column ( 'chi2' , chi2 ) +# #commit the row +# tup.write () +# +# return SUCCESS +# +# @endcode +# +# @see GaudiTupleAlg +# +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2006-11-26 + + +class TupleAlgo(_GaudiTupleAlg): + """ + ******************************************************************************* + * * 'Physisics do not like it, * + * * physisics do not need it, * + * * physisics do not use it' * + * * **************************** + * Usage: * + * * + * from GaudiAlg.Algs import TupleAlgo, SUCCESS * + * * + * class MyClass(TupleAlgo) : * + * ' My specific Algorithm, derived from TupleAlgo base class ' * + * def __init__( self , name , **args ) : * + * 'Constructor from algorithm instance name & parameters' * + * #invoke the constructor of base class * + * TupleAlgo.__init__(self , name , **args ) * + * * + * def execute ( self ) : * + * 'Major method (from IAlgorithm interface)' * + * * + * # get some data from Transient Event Store * + * tracks = self.get('/Event/Rec/Tracks') * + * * + * tup = self.nTuple('My N-Tuple') * + * * + * for track in tracks : * + * * + * pt = track.pt () * + * p = track.p () * + * chi2 = track.chi2 () * + * * + * #fill N-tuple: * + * tup.column ( 'pt' , pt ) * + * tup.column ( 'p' , p ) * + * tup.column ( 'chi2' , chi2 ) * + * #commit the row * + * tup.write () * + * * + * return SUCCESS * + * * + ******************************************************************************* + """ + + pass + + +class objectmethod(object): + def __init__(self, m): + self.method = m + + def __call__(self, *args): + print(args) + return self.method(*args) + + +GaudiAlgo._Base = _GaudiAlgorithm +HistoAlgo._Base = _GaudiHistoAlg +TupleAlgo._Base = _GaudiTupleAlg + +# initialize is 'unique' method : +GaudiAlgo.initialize = _initialize_ +HistoAlgo.initialize = _initialize_histo_ +TupleAlgo.initialize = _initialize_tuple_ + + +def _start_(self): + """ + The stub 'start' method needed by the internal implementation of PyAlg<>. + """ + # return self._Base.start_(self) + return SUCCESS + + +GaudiAlgo.start = _start_ +HistoAlgo.start = _start_ +TupleAlgo.start = _start_ + + +def _execute_(self): + """ + The fictive 'execute' method, which MUST be overwitten by user + """ + raise RuntimeError("Execute method is not implemented for %s" % self.name()) + + +GaudiAlgo.execute = _execute_ +HistoAlgo.execute = _execute_ +TupleAlgo.execute = _execute_ + + +def _stop_(self): + """ + The stub 'stop' method needed by the internal implementation of PyAlg<>. + """ + # return self._Base.stop_(self) + return SUCCESS + + +GaudiAlgo.stop = _stop_ +HistoAlgo.stop = _stop_ +TupleAlgo.stop = _stop_ + +# ============================================================================= + + +def _plot1D_(s, *a): + """ + The basic method to fill (book-on-demand) 1D-histogram + + The histogram will be created/booked dautomatically according to the + specifications: + + - literal or numerical ID (optional) + - title + - low edge + - high edge + - number of bins (default is 100) + + The reference to the histogram is returned and could be used for later manipulations + + """ + return HistoDecorator.plot1D(s, *a) + + +# ============================================================================= + + +def _plot2D_(s, *a): + """ + The basic method to fill (book-on-demand) 2D-histogram + + The histogram will be created/booked dautomatically according to the + specifications: + + - literal or numerical ID (optional) + - title + - low X-edge + - high X-edge + - low Y-edge + - high Y-edge + - number of X-bins (default is 50) + - number of Y-bins (default is 50) + + The reference to the histogram is returned and could be used for later manipulations + + """ + return HistoDecorator.plot2D(s, *a) + + +# ============================================================================= + + +def _plot3D_(s, *a): + """ + The basic method to fill (book-on-demand) 3D-histogram + + The histogram will be created/booked dautomatically according to the + specifications: + + - literal or numerical ID (optional) + - title + - low X-edge + - high X-edge + - low Y-edge + - high Y-edge + - low Z-edge + - high Z-edge + - number of X-bins (default is 10) + - number of Y-bins (default is 10) + - number of Y-bins (default is 10) + + The reference to the histogram is returned and could be used for later manipulations + + """ + return HistoDecorator.plot3D(s, *a) + + +# ============================================================================= + + +def _profile1D_(s, *a): + """ + The basic method to fill (book-on-demand) 1D profile histogram + + The profile histogram will be created/booked dautomatically + according to the specifications: + + - literal or numerical ID (optional) + - title + - low X-edge + - high X-edge + - number of X-bins (default is 100) + + The reference to the histogram is returned and could be used for later manipulations + + """ + return HistoDecorator.profile1D(s, *a) + + +# ============================================================================= + + +def _profile2D_(s, *a): + """ + The basic method to fill (book-on-demand) 2D profile histiogram + + The profile histogram will be created/booked automatically + according to the specifications: + + - literal or numerical ID (optional) + - title + - low X-edge + - high X-edge + - low Y-edge + - high Y-edge + - number of X-bins (default is 50) + - number of Y-bins (default is 50) + + The reference to the histogram is returned and could be used for later manipulations + + """ + return HistoDecorator.profile2D(s, *a) + + +# ============================================================================= + +_plot1D_.__doc__ += "\n" + HistoDecorator.plot1D.__doc__ +_plot2D_.__doc__ += "\n" + HistoDecorator.plot2D.__doc__ +_plot3D_.__doc__ += "\n" + HistoDecorator.plot3D.__doc__ +_profile1D_.__doc__ += "\n" + HistoDecorator.profile1D.__doc__ +_profile2D_.__doc__ += "\n" + HistoDecorator.profile2D.__doc__ + + +def _decorate_plots_(klasses): + t = type(klasses) + if not issubclass(t, list) and not issubclass(t, tuple): + klasses = [klasses] + for klass in klasses: + klass.plot = _plot1D_ + klass.plot1D = _plot1D_ + klass.plot2D = _plot2D_ + klass.plot3D = _plot3D_ + klass.profile1D = _profile1D_ + klass.profile2D = _profile2D_ + + +_decorate_plots_(HistoAlgo) +_decorate_plots_(TupleAlgo) + + +# ============================================================================= +def _nTuple_(s, *a): + """ + Retrieve (book-on-demand) N-Tuple object + """ + return TupleAlgDecorator.nTuple(s, *a) + + +# ============================================================================= + + +def _evtCol_(s, *a): + """ + Retrieve (book-on-demand) N-Tuple object for Event Tag Collections + """ + return TupleAlgDecorator.evtCol(s, *a) + + +_nTuple_.__doc__ += "\n" + TupleAlgDecorator.nTuple.__doc__ +_evtCol_.__doc__ += "\n" + TupleAlgDecorator.evtCol.__doc__ + + +def _decorate_tuples_(klasses): + t = type(klasses) + if not issubclass(t, list) and not issubclass(t, tuple): + klasses = [klasses] + for klass in klasses: + klass.nTuple = _nTuple_ + klass.evtCol = _evtCol_ + klass.ntupleSvc = _ntupleSvc + klass.tupleSvc = _ntupleSvc + klass.ntupSvc = _ntupleSvc + klass.tupSvc = _ntupleSvc + klass.evtColSvc = _evtcolSvc + klass.evtcolSvc = _evtcolSvc + + +# ========================================================== +_decorate_tuples_(TupleAlgo) + +# "decorate N-Tuple object +Tuple = cpp.Tuples.Tuple +_Dec = TupleDecorator + + +class TupleDecColumnDispatcher(object): + """Helper decorator class to workaround ROOT-6697""" + + def __init__(self, func): + self.func = func + self.__doc__ = func.__doc__ + dispatcher = func.disp if hasattr(func, "disp") else func.__overload__ + + mapping = {int: "int", bool: "bool", float: "double"} + for k in mapping: + signature = ( + "const Tuples::Tuple& tuple, const string& name, const %s value" + % (mapping[k]) + ) + mapping[k] = dispatcher(signature) + self.mapping = mapping + + def __call__(self, *a): + """ + Explicitly call the explicit signature for the case with 3 arguments and + the last one is 'int', 'bool' or 'float', for the other cases fall back + on the default dispatcher. + """ + if len(a) == 3: + t = type(a[-1]) + try: + return self.mapping[t](*a) + except KeyError: + pass + return self.func(*a) + + +if ROOT6WorkAroundEnabled("ROOT-6697") and ( + hasattr(_Dec.column, "disp") or hasattr(_Dec.column, "__overload__") +): + _Dec.column = TupleDecColumnDispatcher(_Dec.column) + + +def _t_nTuple_(s, *a): + """ + Access to underlying INTuple object + """ + return _Dec.nTuple(s, *a) + + +def _t_ntuple_(s, *a): + """ + Access to underlying NTuple::Tuple object + """ + return _Dec.ntuple(s, *a) + + +def _t_valid_(s, *a): + """ + Valid NTuple::Tuple object? + """ + return _Dec.valid(s, *a) + + +def _t_write_(s, *a): + """ + Commit the row/record to n-tuple + """ + return _Dec.write(s, *a) + + +def _t_column_(s, *a): + """ + Fill the certain column to n-tuple + """ + return _Dec.column(s, *a) + + +def _t_column_ll_(s, *a): + """ + Fill the 'long long' column + """ + return _Dec.column_ll(s, *a) + + +def _t_column_ull_(s, *a): + """ + Fill the 'unsigned long long' column + """ + return _Dec.column_ull(s, *a) + + +def _t_array_(s, *a): + """ + Fill the fixed-size array column + """ + return _Dec.array(s, *a) + + +def _t_matrix_(s, *a): + """ + Fill the fixed-size matrix column + """ + return _Dec.matrix(s, *a) + + +def _t_farray_(s, *a): + """ + Fill the floating-size array column + """ + return _Dec.farray(s, *a) + + +def _t_fmatrix_(s, *a): + """ + Fill the floating-size matrix column + """ + return _Dec.fmatrix(s, *a) + + +_t_nTuple_.__doc__ += "\n" + _Dec.nTuple.__doc__ +_t_ntuple_.__doc__ += "\n" + _Dec.ntuple.__doc__ +_t_valid_.__doc__ += "\n" + _Dec.valid.__doc__ +_t_write_.__doc__ += "\n" + _Dec.write.__doc__ +_t_column_.__doc__ += "\n" + _Dec.column.__doc__ +_t_column_ll_.__doc__ += "\n" + _Dec.column_ll.__doc__ +_t_column_ull_.__doc__ += "\n" + _Dec.column_ull.__doc__ +_t_array_.__doc__ += "\n" + _Dec.array.__doc__ +_t_matrix_.__doc__ += "\n" + _Dec.matrix.__doc__ +_t_farray_.__doc__ += "\n" + _Dec.farray.__doc__ +_t_fmatrix_.__doc__ += "\n" + _Dec.fmatrix.__doc__ + +Tuple.nTuple = _t_nTuple_ +Tuple.ntuple = _t_ntuple_ +Tuple.valid = _t_valid_ +Tuple.write = _t_write_ +Tuple.column = _t_column_ +Tuple.column_ll = _t_column_ll_ +Tuple.column_ull = _t_column_ull_ +Tuple.array = _t_array_ +Tuple.matrix = _t_matrix_ +Tuple.farray = _t_farray_ +Tuple.fmatrix = _t_fmatrix_ + +_alg_map_ = { + "__init__": _init_, # constructor + "tool": _tool_, # service locator + "svc": _service_, # tool locator + "evtSvc": _evtSvc, # event data service + "eventSvc": _evtSvc, # event data service + "detSvc": _detSvc, # detector data service + "histoSvc": _histoSvc, # histogram data service + "histSvc": _histoSvc, # histogram data service + "get": _get, # access to event data + "get_": _get_, # access to event data + "exist_": _exist_, # check the event data + "getDet": _getDet, # access to detector data + "finalize": _finalize_, # algorithm finalization + # + "hasProperty": _hasProperty_, # check the existence of property with given name + "getProperty": _getProperty_, # get the property value with given name + "setProperty": _setProperty_, # set the property with given name + "__setattr__": _set_attr_, # set the attribute/property with given name + "__getattr__": _get_attr_, # set the attribute/property with given name +} + + +# decorate the classes with the useful methods +def _decorate_algs_(klasses): + t = type(klasses) + if not issubclass(t, list) and not issubclass(t, tuple): + klasses = [klasses] + for _alg in klasses: + for key in _alg_map_: + setattr(_alg, key, _alg_map_[key]) + + +# = +_decorate_algs_(GaudiAlgo) +_decorate_algs_(HistoAlgo) +_decorate_algs_(TupleAlgo) + +# ============================================================================= +# Helper function to fill histogram/ntuple using 'map'-operation +# ============================================================================= + + +def mapvct(func, sequence, ovct=None): + """Helper function to fill histogram/ntuple using 'map'-operation""" + if not ovct: + vct = GaudiPython.Vector + else: + vct = ovct + if hasattr(sequence, "size"): + vct.reserve(vct.size() + sequence.size()) + elif hasattr(sequence, "__len__"): + vct.reserve(vct.size() + len(sequence)) + for object in sequence: + vct.push_back(func(object)) + if not ovct: + return vct + + +# ============================================================================= + + +# ============================================================================= +# get the list of tools +# ============================================================================= +def _get_all_tools_(self, method): + """ + Get all tools + """ + _tools = std.vector("IAlgTool*")() + _func = getattr(AlgDecorator, method) + _num = _func(self, _tools) + if _tools.size() != _num: + raise RuntimeError("Unable to extract Tools") + _res = [] + for _tool in _tools: + _res += [iAlgTool(_tool.name(), _tool)] + return _res + + +# ============================================================================= + + +def _Tools_a_(self): + """ + Retrieve the list of tools, + aquired by component through GaudiCommon<TYPE> base: + + >>> alg = ... ## get the algorithm + >>> tools = alg.Tools() ## get the tools + >>> for tool in tools : + ... print(tool) + + """ + _cmp = getattr(self, "_ialg") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_ialg") + return _get_all_tools_(_cmp, "_tools_a_") + + +# ============================================================================= + + +def _Tools_t_(self): + """ + Retrieve the list of tools, + aquired by component through GaudiCommon<TYPE> base: + + >>> tool = ... ## get the tool + >>> tools = tool.Tools() ## get the tools + >>> for t in tools : + ... print(t) + + """ + _cmp = getattr(self, "_itool") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_itool") + return _get_all_tools_(_cmp, "_tools_t_") + + +# ============================================================================= +# get the counter +# ============================================================================= + + +def _get_counter_(self, method, name): + """ + get the counter + """ + _func = getattr(AlgDecorator, method) + return _func(self, name) + + +# ============================================================================== + + +def _Counter_a_(self, name): + """ + Retrieve the counter managed GaudiCommon<TYPE> base by name: + + >>> alg = ... ## get the algorithm + >>> cnt = alg.Counter('#accept') ## get the counter + >>> print(cnt) + + """ + _cmp = getattr(self, "_ialg") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_ialg") + return _get_counter_(_cmp, "_counter_a_", name) + + +# ============================================================================== + + +def _Counter_t_(self, name): + """ + Retrieve the counter managed GaudiCommon<TYPE> base by name: + + >>> tool = ... ## get the tool + >>> cnt = tool.Counter('#accept') ## get the counter + >>> print(cnt) + + """ + _cmp = getattr(self, "_itool") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_itool") + return _get_counter_(_cmp, "_counter_t_", name) + + +# ============================================================================= +# get all histos +# ============================================================================= +cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString +cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString +cpp.StatEntity.__repr__ = cpp.StatEntity.toString +cpp.StatEntity.__str__ = cpp.StatEntity.toString + +# ============================================================================= + + +def _get_all_histos_(component, method, name): + """ + Get All histogram form the component + """ + _res = {} + for _his in ( + std.vector("AIDA::IProfile2D*"), + std.vector("AIDA::IProfile1D*"), + std.vector("AIDA::IHistogram3D*"), + std.vector("AIDA::IHistogram2D*"), + std.vector("AIDA::IHistogram1D*"), + ): + _his = _his() + _ids = std.vector("GaudiAlg::ID")() + _fun = getattr(HistoDecorator, method) + _num = _fun(component, _ids, _his) + if _ids.size() != _num or _his.size() != _num: + raise RuntimeError("Unable to extract Histos!") + for _i in range(0, _num): + _id = _ids[_i] + if _id.numeric(): + _id = _id.numericID() + elif _id.literal(): + _id = _id.literalID() + else: + _id = _id.idAsString() + _res[_id] = _his[_i] + + if not name: + return _res # return the dictionary + + id = cpp.GaudiAlg.ID(name) + for i in (name, id.literalID(), id.numericID(), id.idAsString(), id): + h = _res.get(i, None) + if not not h: + return h # return the histogram + + return None + + +# ============================================================================= + + +def _Histos_a_(self, name=None): + """ + Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: + + >>> alg = ... ## get the algorithm + >>> histos = alg.Histos() ## get all histograms & profiles + >>> for key in histos : + ... print(key, histos[key]) + + Retrive the histogram with the certain ID : + + >>> alg = ... ## get the algorithm + >>> histo = alg.Histos('some histo ID') ## get the histo by ID + >>> print(histo) + + """ + _cmp = getattr(self, "_ialg") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_ialg") + return _get_all_histos_(_cmp, "_histos_a_", name) + + +# ============================================================================= + + +def _Histos_t_(self, name=None): + """ + Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: + + >>> tool = ... ## get the tool + >>> histos = tool.Histos() ## get all histograms & profiles + >>> for key in histos : + ... print(key, histos[key]) + + Retrive the historgam with certain ID : + + >>> tool = ... ## get the tool + >>> histo = tool.Histos('some histo ID') ## get the histo by ID + >>> print(histo) + + """ + _cmp = getattr(self, "_itool") + if not _cmp: + self.retrieveInterface() + _cmp = getattr(self, "_itool") + return _get_all_histos_(_cmp, "_histos_t_", name) + + +# ============================================================================= + +_Tools_a_.__doc__ += "\n" + AlgDecorator._tools_a_.__doc__ +_Tools_t_.__doc__ += "\n" + AlgDecorator._tools_t_.__doc__ +_Counter_a_.__doc__ += "\n" + AlgDecorator._counter_a_.__doc__ +_Counter_t_.__doc__ += "\n" + AlgDecorator._counter_t_.__doc__ +_Histos_a_.__doc__ += "\n" + HistoDecorator._histos_a_.__doc__ +_Histos_t_.__doc__ += "\n" + HistoDecorator._histos_t_.__doc__ + +iAlgorithm.Tools = _Tools_a_ +iAlgTool.Tools = _Tools_t_ +iAlgorithm.Counter = _Counter_a_ +iAlgTool.Counter = _Counter_t_ +iAlgorithm.Histos = _Histos_a_ +iAlgTool.Histos = _Histos_t_ + +# finally add some decoration for histograms +import GaudiPython.HistoUtils + +# ============================================================================= +# pseudo help +# ============================================================================= + + +def _help_(): + print(__doc__, __author__) + print("\t\t\tDoc-string for class GaudiAlgo \n", GaudiAlgo.__doc__) + print("\t\t\tDoc-string for class HistoAlgo \n", HistoAlgo.__doc__) + print("\t\t\tDoc-string for class TupleAlgo \n", TupleAlgo.__doc__) + + +# ============================================================================= +# pseudo-test suite +# ============================================================================= +if __name__ == "__main__": + _help_() + +# ============================================================================= +# The END +# ============================================================================= diff --git a/GaudiAlg/python/GaudiAlg/HistoUtils.py b/GaudiAlg/python/GaudiAlg/HistoUtils.py new file mode 100644 index 0000000000000000000000000000000000000000..6b73e7ff0bebaaa3dbf12348bd1cfb7b88dc0b1c --- /dev/null +++ b/GaudiAlg/python/GaudiAlg/HistoUtils.py @@ -0,0 +1,1080 @@ +#!/usr/bin/env python3 +##################################################################################### +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# # +# This software is distributed under the terms of the Apache version 2 licence, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +##################################################################################### +# ============================================================================= +# This module contains set of simple and useful utilities for booking and +# manipulations with Gaudi-AIDA histograms, inspired by Thomas' request +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2007-08-03 +# ============================================================================= +""" +This module contains set of simple and useful utilities for booking and +manipulations with Gaudi-AIDA histograms, inspired by Thomas' request + +The module contains following public symbols: + + - book for booking of various 1D,2D&3D-histograms + - bookProf for booking of various 1D&2D-profiles + - getAsAIDA for retrieval of histograms/profiles from HTS in AIDA format + - getAsROOT for retrieval of histograms/profiles from HTS in ROOT format + - fill for smart filling of 1D-histogram (AIDA or ROOT) + - aida2root for conversion of AIDA histogram to ROOT + - HistoStats for many statistical information + - HistoFile class for storing histograms to a file + - histoDump for dumping of the histogram in text format (a'la HBOOK) + - dumpHisto for dumping of the histogram in text format (a'la HBOOK) + +""" +from __future__ import print_function + +# ============================================================================= +__author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" +# ============================================================================= +__all__ = ( + "book", # book AIDA histogram using Histogram Service + "bookProf", # book AIDA profile histogram using Histogram Service + "getAsAIDA", # get the histogram form Histogram Service as AIDA histogram + "getAsROOT", # get the histogram form Histogram Service as AIDA histogram + "fill", # "power-fill" method for filling of histograms + "aida2root", # AIDA -> ROOT converter + "HistoStats", # statistical information for 1D-histograms + "HistoFile", # class for storing histograms to a file + "histoDump", # dump histogramintext format a'la HBOOK + "dumpHisto", # dump histogramintext format a'la HBOOK +) +# ============================================================================= +# import core of Gaudi +import ROOT +from GaudiPython.Bindings import AppMgr +from GaudiPython.Bindings import gbl as cpp +from GaudiPython.Bindings import iHistogramSvc + +HID = cpp.GaudiAlg.ID + +## global flag +useROOT = False + +# ============================================================================= +# Helper private auxiliary function to get Application Manager + + +def _getAppMgr(**kwargs): + """ + Helper private auxiliary function to get Application Manager + """ + gaudi = kwargs.get("gaudi", None) + if not gaudi: + gaudi = AppMgr() + if not gaudi: + raise RuntimeError("Unable to get valid ApplicationMgr") + + state = gaudi._isvc.FSMState() + if state < cpp.Gaudi.StateMachine.CONFIGURED: + gaudi.config() + state = gaudi._isvc.FSMState() + if state < cpp.Gaudi.StateMachine.INITIALIZED: + gaudi.initialize() + + return gaudi # RETURN + + +# ============================================================================= +# Helper private auxiliary function to get iHistogramSvs + + +def _getHistoSvc(**kwargs): + """ + Helper private auxiliary function to get iHistogramSvs + """ + svc = kwargs.get("service", None) + if not svc: + svc = kwargs.get("svc", None) + else: + return svc # RETURN + gaudi = _getAppMgr(**kwargs) + return gaudi.histsvc() # RETURN + + +# ============================================================================= +# Helper private auxiliary function to get iDataSvs + + +def _getEvtSvc(**kwargs): + """ + Helper private auxiliary function to get iDataSvs + """ + svc = kwargs.get("service", None) + if not svc: + svc = kwargs.get("svc", None) + else: + return svc # RETURN + gaudi = _getAppMgr(**kwargs) + return gaudi.evtsvc() # RETURN + + +# ============================================================================= +# The trivial function to book the various 1D,2D&3D-histograms + + +def book(*args, **kwargs): + """ + The trivial function to book the various 1D,2D&3D-histograms + + (1) book the trivial 1D histogram with full path + + >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store + 'cosine of decay angle ' , ## histogram title + 100 , ## number of bins + -1 , ## low edge + 100 ) ## high edge + + (2) book the trivial 1D histogram with directory path and string ID : + + >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS + 'H1' , ## string histogram identifier + 'cosine of decay angle ' , ## histogram title + 100 , ## number of bins + -1 , ## low edge + 100 ) ## high edge + + (3) book the trivial 1D histogram with directory path and integer ID : + + >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS + 124 , ## integer histogram identifier + 'cosine of decay angle ' , ## histogram title + 100 , ## number of bins + -1 , ## low edge + 100 ) ## high edge + + (4) book the trivial 2D histogram with full path + + >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store + 'm12**2 versus m13**2' , ## histogram title + 50 , ## number of X-bins + 1.0 , ## low X-edge + 4.0 , ## high X-edge + 50 , ## number of Y-bins + 1 , ## low Y-edge + 2 ) ## high Y-edge + + (5) book the trivial 2D histogram with directory path and literal ID + + >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store + 'Dalitz1' , ## literal histogram identifier + 'm12**2 versus m13**2' , ## histogram title + 50 , ## number of X-bins + 1.0 , ## low X-edge + 4.0 , ## high X-edge + 50 , ## number of Y-bins + 1 , ## low Y-edge + 2 ) ## high Y-edge + + (6) book the trivial 2D histogram with directory path and integer ID + + >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store + 854 , ## integer histogram identifier + 'm12**2 versus m13**2' , ## histogram title + 50 , ## number of X-bins + 1.0 , ## low X-edge + 4.0 , ## high X-edge + 50 , ## number of Y-bins + 1.0 , ## low Y-edge + 4.0 ) ## high Y-edge + + (7) book the trivial 3D histogram with full path + + >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store + 'x vs y vs z ' , ## histogram title + 10 , ## number of X-bins + -1.0 , ## low X-edge + 1.0 , ## high X-edge + 10 , ## number of Y-bins + -1.0 , ## low Y-edge + 1.0 , ## high Y-edge + 10 , ## number of Z-bins + -1.0 , ## low Z-edge + 1.0 ) ## high Z-edge + + (8) book the trivial 3D histogram with directory path and literal ID + + >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store + 'xyz' , ## literal histogram identifier + 'x vs y vs z' , ## histogram title + 10 , ## number of X-bins + -1.0 , ## low X-edge + 1.0 , ## high X-edge + 10 , ## number of Y-bins + -1.0 , ## low Y-edge + 1.0 , ## high Y-edge + 10 , ## number of Z-bins + -1.0 , ## low Z-edge + 1.0 ) ## high Z-edge + + (9) book the trivial 3D histogram with directory path and integer ID + + >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store + 888 , ## integer histogram identifier + 'x vs y vs z' , ## histogram title + 10 , ## number of X-bins + -1.0 , ## low X-edge + 1.0 , ## high X-edge + 10 , ## number of Y-bins + -1.0 , ## low Y-edge + 1.0 , ## high Y-edge + 10 , ## number of Z-bins + -1.0 , ## low Z-edge + 1.0 ) ## high Z-edge + + Many other booking methods are available, + e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book + + """ + if useROOT or kwargs.get("useROOT", False) or not kwargs.get("useAIDA", True): + from ROOT import TH1D + + a0 = args[0] + a1 = args[1] + a2 = args[2] + if not isinstance(a1, str): + a1 = "h" + str(a1) + if isinstance(a2, str): + return TH1D(a0 + a1, a2, *args[3:]) + else: + return TH1D(a0, a1, *args[2:]) + + svc = _getHistoSvc(**kwargs) + if not svc: + raise RuntimeError("Unable to get valid HistogramService ") + # book the histogram using the service + return svc.book(*args) # RETURN + + +book.__doc__ += ( + "\n\n" + "\thelp(iHistogramSvc.book) : \n\n" + iHistogramSvc.book.__doc__ +) +book.__doc__ += ( + "\n\n" + "\thelp(IHistogramSvc::book) : \n\n" + cpp.IHistogramSvc.book.__doc__ +) + +# ============================================================================= +# The trivial function to book 1D&2D profile histograms: + + +def bookProf(*args, **kwargs): + """ + + The trivial function to book 1D&2D profile histograms: + + (1) book 1D-profile histogram with full path in Histogram Transient Store: + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 'Energy Correction' , ## the histogram title + 100 , ## number of X-bins + 0.0 , ## low X-edge + 100 ) ## high X-edge + + (2) book 1D-profile histogram with directory path and literal ID + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 'Calibration' , ## the histogram literal identifier + 'Energy Correction' , ## the histogram title + 100 , ## number of X-bins + 0.0 , ## low X-edge + 100 ) ## high X-edge + + (3) book 1D-profile histogram with directory path and integer ID + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 418 , ## the histogram integer identifier + 'Energy Correction' , ## the histogram title + 100 , ## number of X-bins + 0.0 , ## low X-edge + 100 ) ## high X-edge + + (4) book 2D-profile histogram with full path in Histogram Transient Store: + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 'Energy Correction' , ## the histogram title + 50 , ## number of X-bins + 0.0 , ## low X-edge + 100 , ## high X-edge + 50 , ## number of Y-bins + 0.0 , ## low Y-edge + 100 ) ## high Y-edge + + (5) book 2D-profile histogram with directory path and literal ID + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 'Calibration' , ## the histogram literal identifier + 'Energy Correction' , ## the histogram title + 50 , ## number of X-bins + 0.0 , ## low X-edge + 100 , ## high X-edge + 50 , ## number of Y-bins + 0.0 , ## low Y-edge + 100 ) ## high Y-edge + + (6) book 2D-profile histogram with directory path and integer ID + >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store + 418 , ## the histogram integer identifier + 'Energy Correction' , ## the histogram title + 50 , ## number of X-bins + 0.0 , ## low X-edge + 100 , ## high X-edge + 50 , ## number of Y-bins + 0.0 , ## low Y-edge + 100 ) ## high Y-edge + + Many other booking methods are available, + e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book + + """ + svc = _getHistoSvc(**kwargs) + if not svc: + raise RuntimeError("Unable to get valid HistogramService ") + # book the histogram using the service + return svc.bookProf(*args) # RETURN + + +bookProf.__doc__ += ( + "\n\n" + "\thelp(iHistogramSvc.bookProf) : \n\n" + iHistogramSvc.bookProf.__doc__ +) +bookProf.__doc__ += ( + "\n\n" + + "\thelp(IHistogramSvc::bookProf) : \n\n" + + cpp.IHistogramSvc.bookProf.__doc__ +) + +# ============================================================================= +# The most trivial function to retrieve the histogram from Histogram Transient Store + + +def getAsAIDA(path, **kwargs): + """ + + The most trivial function to retrieve the histogram from Histogram Transient Store + The histogram is returned by reference to its AIDA-representation (if possible) + + >>> h = getAsAIDA ( 'some/path/to/my/histogram' ) + + """ + svc = _getHistoSvc(**kwargs) + if not svc: + raise RuntimeError("Unable to get valid HistogramService ") + # return the histogram + return svc.getAsAIDA(path) # RETURN + + +getAsAIDA.__doc__ += ( + "\n\n" + "\thelp(iHistogramSvc.getAsAIDA) : \n\n" + iHistogramSvc.getAsAIDA.__doc__ +) +getAsAIDA.__doc__ += ( + "\n\n" + "\thelp(iHistogramSvc.retrieve) : \n\n" + iHistogramSvc.retrieve.__doc__ +) + +# ============================================================================= +# The most trivial function to retrieve the histogram from Histogram Transient Store + + +def getAsROOT(path, **kwargs): + """ + + The most trivial function to retrieve the histogram from Histogram Transient Store + The histogram is returned by reference to its underlying native ROOT-representation (if possible) + + >>> h = getAsROOT ( 'some/path/to/my/histogram' ) + + """ + svc = _getHistoSvc(**kwargs) + if not svc: + raise RuntimeError("Unable to get valid HistogramService ") + # return the histogram + return svc.getAsROOT(path) # RETURN + + +getAsROOT.__doc__ += ( + "\n\n" + "\thelp(iHistogramSvc.getAsROOT) : \n\n" + iHistogramSvc.getAsROOT.__doc__ +) + + +# ============================================================================= +# The function which allows 'the smart fill' of 1D-histogram +def fill( + histo, # histogram + data, # input data + fun=lambda x: x, # function to be used + cut=lambda x: True, # cut to be applied + **kwargs +): # optional extra arguments + """ + + The function which allows 'the smart fill' of 1D-histogram + + >>> histo = ... + + The most trivial case, fill with the value + >>> fill ( histo , 1.0 ) + + Fill from any iterable object (sequence) + >>> fill ( histo , [1,,2,3,4,5,10] ) + + Fill from iterable object and apply the function: + >>> fill ( histo , [1,2,3,4,5] , math.sin ) + + Use lambda form: + >>> fill ( histo , [1,2,3,4,5] , lambda x : x*x ) + + The same + >>> fill ( histo , [1,2,3,4,5] , fun = lambda x : x*x ) + + Use internal attributes: + >>> tracks = evtSvc['Rec/Track/Best'] ## iterable container of tracks + >>> fill ( histo , tracks , lambda t : t.pt() ) + + Apply the predicate: fill only even numbers: + >>> fill ( histo , [1,2,3,4,5,6,7] , lambda x : x , lambda y : y%2 ) + + The same (omit the trivial function) : + >>> fill ( histo , [1,2,3,4,5,6,7] , cut = lambda y : y%2 ) + + Apply the predicate: fill only pt for positively charged tracks: + >>> tracks = evtSvc['Rec/Track/Best'] + >>> fill ( histo , tracks , lambda t : t.pt() , lambda t : 0<t.charge() ) + + The same: + >>> fill ( histo , tracks , + fun = lambda t : t.pt() , + cut = lambda t : 0<t.charge() ) + + Ordinary functions are also fine: + >>> def myfun ( track ) : return sin( track.pt() + track.p() ) + >>> def mycut ( track ) : return track.p() > 100 * GeV + >>> fill ( histo , tracks , myfun , mycut ) + + The 'data' could be the address in TES, in this case the object + is retrieved from TES and the method is applied to the objects, + retrieved from TES: + >>> fill ( histo , ## the reference to the histogram + 'Rec/Track/Best' , ## the location of objects in TES + lambda t : t.pt() ) ## function to be used for histogram fill + >>> fill ( histo , ## the reference to the histogram + 'Rec/Track/Best' , ## the address of objects in TES + lambda t : t.pt() , ## the function to be used for histogram fill + lambda t : t.charge()>0 ) ## the criteria to select tracks + + The arguments 'fun' and 'cut' could be strings, in this case + they are evaluated by python before usage. + This option could be often very useful. + + """ + + # if value is a string, try to get the objects from TES + if type(data) == str: + svc = _getEvtSvc(**kwargs) + data = svc[data] + return fill(histo, data, fun, cut, **kwargs) + + # if the function is a string: evaluate it! + if type(fun) == str: + fun = eval(fun, globals()) + + # if the criterion is a string: evaluate it! + if type(cut) == str: + cut = eval(cut, globals()) + + if not hasattr(data, "__iter__"): + data = [data] + + if not hasattr(histo, "fill") and hasattr(histo, "Fill"): + setattr(histo, "fill", getattr(histo, "Fill")) + + for item in data: + if not cut(item): + continue # CONTINUE + histo.fill(fun(item)) + + return histo # RETURN + + +# ============================================================================= +# AIDA -> ROOT converter +aida2root = cpp.Gaudi.Utils.Aida2ROOT.aida2root + +# ============================================================================= +# Convert AIDA to ROOT + + +def _to_root_(self): + """ + Convert AIDA to ROOT + + >>> aida = ... ## get AIDA histogram + >>> root = aida.toROOT() ## convert it to ROOT + + """ + return aida2root(self) + + +_to_root_.__doc__ += aida2root.__doc__ + +for t in ( + cpp.AIDA.IHistogram3D, + cpp.AIDA.IHistogram2D, + cpp.AIDA.IHistogram1D, + cpp.AIDA.IProfile2D, + cpp.AIDA.IProfile1D, +): + if not hasattr(t, "Fill") and hasattr(t, "fill"): + setattr(t, "Fill", getattr(t, "fill")) + for attr in ("toROOT", "toRoot", "asROOT", "asRoot", "AsROOT", "AsRoot"): + if not hasattr(t, attr): + setattr(t, attr, _to_root_) + +cpp.AIDA.IHistogram3D.__repr__ = lambda s: cpp.GaudiAlg.Print3D.toString( + s, HID(s.title()) +) +cpp.AIDA.IHistogram3D.__str__ = cpp.AIDA.IHistogram3D.__repr__ + +HistoStats = cpp.Gaudi.Utils.HistoStats + +# ============================================================================= +# Evaluate 'bin-by-bin' momentum of certain order around the value + + +def _moment_(self, order, value=0): + """ + Evaluate 'bin-by-bin' momentum of order 'order' around the value 'value' + for 1D histogram + + >>> h1 = ... + >>> print(h1.moment ( 5 )) + + """ + return HistoStats.moment(self, order, value) + + +# ============================================================================= +# Evaluate error in 'bin-by-bin' momentum of certain order around the value + + +def _momentErr_(self, order): + """ + Evaluate error for 'bin-by-bin' momentum of order 'order' around the value 'value' + for 1D histogram + + >>> h1 = ... + >>> print(h1.momentErr ( 5 )) + + """ + return HistoStats.momentErr(self, order) + + +# ============================================================================= +# Evaluate 'bin-by-bin' central momentum (around mean value) + + +def _centralMoment_(self, order): + """ + Evaluate 'bin-by-bin' central momentum (around mean value) + for 1D histogram + + >>> h1 = ... + >>> print(h1.centralMoment ( 5 )) + + """ + return HistoStats.centralMoment(self, order) + + +# ============================================================================= +# Evaluate error in 'bin-by-bin' momentum of certain order around the value + + +def _centralMomentErr_(self, order): + """ + Evaluate error for 'bin-by-bin' central momentum (around mean value) + for 1D histogram + + >>> h1 = ... + >>> print(h1.centralMomentErr ( 5 )) + + """ + return HistoStats.centralMomentErr(self, order) + + +# ============================================================================= +# Evaluate 'bin-by-bin' skewness for 1D histogram + + +def _skewness_(self): + """ + Evaluate 'bin-by-bin' skewness for 1D AIDA histogram + + >>> h1 = ... + >>> print(h1.skewness()) + + """ + return HistoStats.skewness(self) + + +# ============================================================================= +# Evaluate error for 'bin-by-bin' skewness for 1D histogram + + +def _skewnessErr_(self): + """ + Evaluate error for 'bin-by-bin' skewness + + >>> h1 = ... + >>> print(h1.skewnessErr()) + + """ + return HistoStats.skewnessErr(self) + + +# ============================================================================= +# Evaluate 'bin-by-bin' kurtosis for 1D histogram + + +def _kurtosis_(self): + """ + Evaluate 'bin-by-bin' kurtosis + + >>> h1 = ... + >>> print(h1.kurtosis ()) + + """ + return HistoStats.kurtosis(self) + + +# ============================================================================= +# Evaluate error for 'bin-by-bin' kurtosis for 1D histogram + + +def _kurtosisErr_(self): + """ + Evaluate error for 'bin-by-bin' kurtotis for 1D AIDA histogram + + >>> h1 = ... + >>> print(h1.kurtotisErr()) + + """ + return HistoStats.kurtosisErr(self) + + +# ============================================================================= + + +def _nEff_(self): + """ + Number of equivalent entries + """ + return HistoStats.nEff(self) + + +# ============================================================================= + + +def _mean_(self): + """ + Evaluate the MEAN value + """ + return HistoStats.mean(self) + + +# ============================================================================= + + +def _meanErr_(self): + """ + Evaluate the error for MEAN estimate + """ + return HistoStats.meanErr(self) + + +# ============================================================================= + + +def _rms_(self): + """ + Evaluate the RMS for AIDA histogram + """ + return HistoStats.rms(self) + + +# ============================================================================= + + +def _rmsErr_(self): + """ + Evaluate the error for RMS estimate + """ + return HistoStats.rmsErr(self) + + +# ============================================================================= + + +def _sumBinHeightErr_(self): + """ + Get an error in the sum bin height ('in-range integral') + """ + return HistoStats.sumBinHeightErr(self) + + +# ============================================================================= + + +def _sumAllBinHeightErr_(self): + """Get an error in the sum bin height ('in-range integral')""" + return HistoStats.sumAllBinHeightErr(self) + + +# ============================================================================= + + +def _overflowEntriesFrac_(self): + """ + The fraction of overflow entries (useful for shape comparison) + """ + return HistoStats.overflowEntriesFrac(self) + + +# ============================================================================= + + +def _overflowEntriesFracErr_(self): + """ + The error for fraction of overflow entries (useful for shape comparison) + """ + return HistoStats.overflowEntriesFracErr(self) + + +# ============================================================================= + + +def _underflowEntriesFrac_(self): + """ + The fraction of underflow entries (useful for shape comparison) + """ + return HistoStats.underflowEntriesFrac(self) + + +# ============================================================================= + + +def _underflowEntriesFracErr_(self): + """ + The error for fraction of underflow entries (useful for shape comparison) + """ + return HistoStats.underflowEntriesFracErr(self) + + +# ============================================================================= + + +def _overflowIntegralFrac_(self): + """ + The fraction of overflow integral (useful for shape comparison) + """ + return HistoStats.overflowIntegralFrac(self) + + +# ============================================================================= + + +def _overflowIntegralFracErr_(self): + """ + The error for fraction of overflow integral (useful for shape comparison) + """ + return HistoStats.overflowIntegralFracErr(self) + + +# ============================================================================= + + +def _underflowIntegralFrac_(self): + """ + The fraction of underflow integral (useful for shape comparison) + """ + return HistoStats.underflowIntegralFrac(self) + + +# ============================================================================= + + +def _underflowIntegralFracErr_(self): + """ + The error for fraction of underflow integral (useful for shape comparison) + """ + return HistoStats.underflowIntegralFracErr(self) + + +# ============================================================================= +# get number of entries in histogram up to the certain bin (not-included) +# get number of entries in histogram form the certain +# minimal bin up to the certain maximal bin (not-included) + + +def _nEntries_(self, i1, i2=-10000000): + """ + Get number of entries in histogram up to the certain bin (not-included) + + attention: underflow bin is included! + + >>> h1 + >>> print(h1.nEntries ( 10 )) + + Get number of entries in histogram form the certain + minimal bin up to the certain maximal bin (not-included) + + >>> h1 + >>> print(h1.nEntries ( 10 , 15 )) + + """ + if i2 < i1 or i2 < 0: + return HistoStats.nEntries(self, i1) + return HistoStats.nEntries(self, i1, i2) + + +# ============================================================================= + + +def _nEntriesFrac_(self, i1, i2=-10000000): + """ + Get the fraction of entries in histogram up to the certain bin (not-included) + + attention: underflow bin is included! + + >>> h1 + >>> print(h1.nEntriesFrac ( 10 )) + + Get the fraction of entries in histogram form the certain + minimal bin up to the certain maximal bin (not-included) + + >>> h1 + >>> print(h1.nEntriesFrac ( 10 , 15 )) + + """ + if i2 < i1 or i2 < 0: + return HistoStats.nEntriesFrac(self, i1) + return HistoStats.nEntriesFrac(self, i1, i2) + + +# ============================================================================= + + +def _nEntriesFracErr_(self, i1, i2=-10000000): + """ + Get error for fraction of entries in histogram up to the certain bin (not-included) + + attention: underflow bin is included! + + >>> h1 + >>> print(h1.nEntriesFracErr( 10 )) + + Get error fraction of entries in histogram form the certain + minimal bin up to the certain maximal bin (not-included) + + >>> h1 + >>> print(h1.nEntriesFracErr ( 10 , 15 )) + + """ + if i2 < i1 or i2 < 0: + return HistoStats.nEntriesFracErr(self, i1) + return HistoStats.nEntriesFracErr(self, i1, i2) + + +# ============================================================================= +i1DH = cpp.AIDA.IHistogram1D + +if not hasattr(i1DH, "moment"): + i1DH.moment = _moment_ +if not hasattr(i1DH, "momentErr"): + i1DH.momentErr = _momentErr_ +if not hasattr(i1DH, "centralMoment"): + i1DH.centralMoment = _centralMoment_ +if not hasattr(i1DH, "momentMomentErr"): + i1DH.centralMomentErr = _centralMomentErr_ +if not hasattr(i1DH, "nEff"): + i1DH.nEff = _nEff_ +if not hasattr(i1DH, "mean"): + i1DH.mean = _mean_ +if not hasattr(i1DH, "meanErr"): + i1DH.meanErr = _meanErr_ +if not hasattr(i1DH, "rms"): + i1DH.rms = _rms_ +if not hasattr(i1DH, "rmsErr"): + i1DH.rmsErr = _rmsErr_ +if not hasattr(i1DH, "skewness"): + i1DH.skewness = _skewness_ +if not hasattr(i1DH, "skewnessErr"): + i1DH.skewnessErr = _skewnessErr_ +if not hasattr(i1DH, "kurtosis"): + i1DH.kurtosis = _kurtosis_ +if not hasattr(i1DH, "kurtosisErr"): + i1DH.kurtosisErr = _kurtosisErr_ + +if not hasattr(i1DH, "overflowEntriesFrac"): + i1DH.overflowEntriesFrac = _overflowEntriesFrac_ +if not hasattr(i1DH, "overflowEntriesFracErr"): + i1DH.overflowEntriesFracErr = _overflowEntriesFracErr_ +if not hasattr(i1DH, "underflowEntriesFrac"): + i1DH.underflowEntriesFrac = _underflowEntriesFrac_ +if not hasattr(i1DH, "underflowEntriesFracErr"): + i1DH.underflowEntriesFracErr = _underflowEntriesFracErr_ + +if not hasattr(i1DH, "overflowIntegralFrac"): + i1DH.overflowIntegralFrac = _overflowIntegralFrac_ +if not hasattr(i1DH, "overflowIntegralFracErr"): + i1DH.overflowIntegralFracErr = _overflowIntegralFracErr_ +if not hasattr(i1DH, "underflowIntegralFrac"): + i1DH.underflowIntegralFrac = _underflowIntegralFrac_ +if not hasattr(i1DH, "underflowIntegralFracErr"): + i1DH.underflowIntegralFracErr = _underflowIntegralFracErr_ + +if not hasattr(i1DH, "nEntries"): + i1DH.nEntries = _nEntries_ +if not hasattr(i1DH, "nEntriesFrac"): + i1DH.nEntriesFrac = _nEntriesFrac_ +if not hasattr(i1DH, "nEntriesFracErr"): + i1DH.nEntriesFracErr = _nEntriesFracErr_ + +# ============================================================================ + + +def _path_(self): + """ + Get the path in THS for the given AIDA object: + + >>> aida = + >>> print(aida.path()) + + """ + return cpp.Gaudi.Utils.Histos.path(self) + + +iBH = cpp.AIDA.IBaseHistogram +if not hasattr(iBH, "path"): + iBH.path = _path_ +if not hasattr(iBH, "TESpath"): + iBH.TESpath = _path_ +if not hasattr(iBH, "location"): + iBH.location = _path_ + + +# ============================================================================= +def __dumpHisto__(histo, *args): + """ + + Dump the histogram/profile in text format (a'la HBOOK) + + >>> histo + >>> print(dumpHisto ( histo )) + + >>> print(histo.dump()) + >>> print(histo.dump( 20 , 20 )) + >>> print(histo.dump( 20 , 20 , True )) + + Uses: + + """ + return cpp.Gaudi.Utils.Histos.histoDump(histo, *args) + + +__dumpHisto__.__doc__ = "\n" + cpp.Gaudi.Utils.Histos.histoDump.__doc__ + +# ============================================================================= +# the actual function for text dump of the histogram +histoDump = __dumpHisto__ +dumpHisto = __dumpHisto__ + +for t in ( + cpp.AIDA.IHistogram1D, + cpp.AIDA.IProfile1D, + ROOT.TH1D, + ROOT.TH1F, + ROOT.TH1, + ROOT.TProfile, +): + for method in ("dump", "dumpHisto", "dumpAsText"): + if not hasattr(t, method): + setattr(t, method, __dumpHisto__) + +# ============================================================================== + + +class HistoFile: + """ + Class to write histograms to a ROOT file. + hFile = HistoFile("myFile.root") + myHisto = ... + hFile.save(myHisto) + myHisto0 = ... + myHisto1 = ... + myHisto2 = ... + hFile.save(myHisto0, myHisto1, myHisto2) + histoList = [h0, h1, h2, h3] + hFile.save(histoList) + ... + hWriter.close() + """ + + __author__ = "Juan Palacios juan.palacios@nikhef.nl" + + def __init__(self, fileName): + self.file = ROOT.TFile(fileName, "RECREATE") + from GaudiPython import gbl + + self.aida2root = gbl.Gaudi.Utils.Aida2ROOT.aida2root + self.aidaTypes = [ + gbl.AIDA.IHistogram1D, + gbl.AIDA.IHistogram2D, + gbl.AIDA.IHistogram3D, + gbl.AIDA.IProfile1D, + gbl.AIDA.IProfile2D, + gbl.AIDA.IHistogram, + ] + + def __convertibleType(self, histo): + histoType = type(histo) + for t in self.aidaTypes: + if histoType == t: + return True + return False + + def save(self, *args): + """ + This function stores histograms on the file for future saving. + It takes an arbitrary number of AIDA or ROOT histograms or + a list of them. + """ + if args: + if type(args[0]) == list: + histoList = args[0] + else: + histoList = args + for h in histoList: + if self.__convertibleType(h): + h = self.aida2root(h) + h.Write() + + def close(self): + self.file.Write() + self.file.Close() + + +# ============================================================================= +if "__main__" == __name__: + import sys + + print(__doc__) + for o in __all__: + print(o) + print(sys.modules[__name__].__dict__[o].__doc__) + +# ============================================================================= +# The END +# ============================================================================= diff --git a/GaudiAlg/python/GaudiAlg/TupleUtils.py b/GaudiAlg/python/GaudiAlg/TupleUtils.py new file mode 100644 index 0000000000000000000000000000000000000000..86f62d72f4a2e93979acbe564d3c65c8f46de26a --- /dev/null +++ b/GaudiAlg/python/GaudiAlg/TupleUtils.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +##################################################################################### +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# # +# This software is distributed under the terms of the Apache version 2 licence, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +##################################################################################### +# ============================================================================= +# This module contains set of simple and useful utilities to booking and +# manipulation with N-Tuples (in the spirit of GaudiTuples<TYPE>) +# @author Vanya BELYAEV ibelyaev@physics.syr.edu +# @date 2007-08-04 +# ============================================================================= +""" +This module contains set of simple and useful utilities to booking and +manipulation with N-Tuples (in the spirit of GaudiTuples<TYPE>) + +""" +from __future__ import print_function + +# ============================================================================= +__author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" +# ============================================================================= +__all__ = ( + "nTuple", # function to book/retrieve N-tuple + "getNTuple", # ditto + "getNtuple", # ditto + "getntuple", # ditto + "gettuple", # ditto + "activeTuples", # get the list of all active n-tuples + "releaseTuples", # release all actibe N-tuples +) +# ============================================================================= + +from GaudiPython.Bindings import AppMgr +from GaudiPython.Bindings import gbl as cpp +from GaudiPython.Bindings import iAlgTool + +_Tool = cpp.ITupleTool +_Deco = cpp.GaudiPython.TupleToolDecorator + +# the list of aquired tools (to be released) +_TOOLS_ = [] + +# ============================================================================= +# Helper private auxillary utility to get Tool Service + + +def _getToolSvc(**kwargs): + """Helper private auxillary utility to get Tool Service""" + svc = kwargs.get("toolSvc", None) + if not svc: + svc = kwargs.get("toolsvc", None) + if not svc: + svc = kwargs.get("service", None) + if not svc: + svc = kwargs.get("svc", None) + else: + return svc # RETURN + gaudi = kwargs.get("gaudi", None) + if not gaudi: + gaudi = AppMgr() + return gaudi.toolsvc() # RETURN + + +# ============================================================================= +# Retrive N-Tuple ( book on demand ) +def _nTuple_(s, *args): + """Retrive N-tuple ( book on demand )""" + return _Deco.nTuple(s, *args) + + +# ============================================================================= +_nTuple_.__doc__ += "\n" + _Deco.nTuple.__doc__ +_Tool.nTuple = _nTuple_ +_Tool.ntuple = _nTuple_ + + +# ============================================================================= +# Retrieve (book-on-demand) 'Smart'-N-tuple object. +def nTuple(dirpath, ID, ID2=None, topdir=None, LUN="FILE1"): + """ + Retrieve 'Smart'-N-tuple object. + N-tuple is booked on-demand. + + Atetntion !! + The logical unit LUN must be configured by N-Tuple Service + + Retrieve (book-n-demand) N-Tuple using + the directory name and the title: + >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory + 'N-tuple title' , ## the title for N-Tuple + LUN = 'FILE1' ) ## logical file unit + + Retrieve (book-n-demand) N-Tuple using + the directory name, literal ID and the title: + >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory + 'Tuple1' , ## the literal ID for N-Tuple + 'N-tuple title' , ## the title for N-Tuple + LUN = 'FILE1' ) ## logical file unit + + Retrieve (book-n-demand) N-Tuple using + the directory name, numerical ID and the title: + >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory + 124 , ## the numerical ID for N-Tuple + 'N-tuple title' , ## the title for N-Tuple + LUN = 'FILE1' ) ## logical file unit + + + """ + toolSvc = _getToolSvc() + + # construct the name of the intermediate TupleTool + name = "Tuple" + LUN + "/" + if topdir: + name += topdir + name += dirpath + name += "_%s" % ID + if ID2: + name += "_%s" % ID2 + name = name.replace(".", "_") + name = name.replace("/", "_") + name = name.replace("\\", "_") + name = name.replace(" ", "_") + + # define tool properties + t0 = iAlgTool("ToolSvc." + name) + t0.OutputLevel = 1 + t0.NTupleLUN = LUN + t0.NTupleDir = dirpath + t0.PropertiesPrint = False + t0.OutputLevel = 4 + if topdir: + t0.NTupleTopDir = topdir + + # get the tool from Tool service + tool = toolSvc.create("TupleTool", name, interface=_Tool) + + # check the properties and redefine them if needed + t1 = iAlgTool(tool.name(), tool) + if t1.NTupleLUN != LUN: + t1.NTupleLUN = LUN + if t1.NTupleDir != dirpath: + t1.NTupleDir = dirpath + if topdir and (t1.NTupleTopDir != topdir): + t1.NTupleTopDir = topdir + + _TOOLS_.append(tool) + if not ID2: + return tool.nTuple(ID) # RETURN + + return tool.nTuple(ID, ID2) # RETURN + + +nTuple.__doc__ += "\n\t help(ITupleTool.nTuple) : \n" + _Tool.nTuple.__doc__ + +ntuple = nTuple +getNTuple = nTuple +getNtuple = nTuple +getntuple = nTuple +getTuple = nTuple +gettuple = nTuple + +# ============================================================================= +# Return the list of active tools + + +def activeTuples(): + """ + Return the list of active tools + """ + return _TOOLS_ + + +# ============================================================================= +# Release the active tool/tuples + + +def releaseTuples(): + """ + Release the active tool/tuples + The method needs to be invoked explicitely at the end of the job + """ + if not _TOOLS_: + return + from GaudiPython.Bindings import _gaudi + + if not _gaudi: + return + + toolSvc = _getToolSvc() + if toolSvc.isValid(): + while _TOOLS_: + t = _TOOLS_.pop() + if not t: + continue + while 1 < t.refCount(): + toolSvc._its.releaseTool(t) + + +# ============================================================================= + + +def _TupleUtils_AtExit_(): + """ + AtExit function for GaudiAlg.TupleUtils module + """ + if activeTuples(): + print("WARNING: the list of local TupleTools is not empty!") + print("WARNING: please use GaudiAlg.TupleUtils.releaseTuples() at the end") + + +import atexit + +atexit.register(_TupleUtils_AtExit_) + +# ============================================================================= +if "__main__" == __name__: + import sys + + print(__doc__, __all__) + for o in __all__: + print("\n\n\t", o, "\n") + print(sys.modules[__name__].__dict__[o].__doc__) + +# ============================================================================= +# The end +# ============================================================================= diff --git a/GaudiAlg/python/GaudiAlg/__init__.py b/GaudiAlg/python/GaudiAlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/GaudiAlg/src/components/GaudiAlg_entries.cpp b/GaudiAlg/src/components/GaudiAlg_entries.cpp index 5607b90a65828bdafa8886d888a12dece0030dc8..9a2e6dd76aecf25026497fbca95bcf4001006837 100644 --- a/GaudiAlg/src/components/GaudiAlg_entries.cpp +++ b/GaudiAlg/src/components/GaudiAlg_entries.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,12 +8,18 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/EventCounter.h" -#include "GaudiAlg/GaudiSequencer.h" -#include "GaudiAlg/Prescaler.h" -#include "GaudiAlg/Sequencer.h" +#include <GaudiAlg/EventCounter.h> +#include <GaudiAlg/GaudiSequencer.h> +#include <GaudiAlg/Prescaler.h> DECLARE_COMPONENT( EventCounter ) DECLARE_COMPONENT( Prescaler ) -DECLARE_COMPONENT( Sequencer ) DECLARE_COMPONENT( GaudiSequencer ) + +// GaudiAlg Sequencer has been moved to GaudiKernel as Gaudi::Sequencer and this +// allows for backward compatibility in options and tests. +#include <Gaudi/Sequencer.h> +struct Sequencer : Gaudi::Sequencer { + using Gaudi::Sequencer::Sequencer; +}; +DECLARE_COMPONENT( Sequencer ) diff --git a/GaudiExamples/src/Histograms/Aida2Root.cpp b/GaudiAlg/src/examples/Aida2Root.cpp similarity index 96% rename from GaudiExamples/src/Histograms/Aida2Root.cpp rename to GaudiAlg/src/examples/Aida2Root.cpp index 0d13385474f40b42ac9690f2b45d83c0ccf5e74e..692e1a05f97ed9e872fdf5a3c4102bd4c945e718 100644 --- a/GaudiExamples/src/Histograms/Aida2Root.cpp +++ b/GaudiAlg/src/examples/Aida2Root.cpp @@ -20,7 +20,7 @@ #include "AIDA/IHistogram3D.h" #include "AIDA/IProfile1D.h" #include "AIDA/IProfile2D.h" -#include "GaudiAlg/GaudiHistoAlg.h" +#include "GaudiKernel/Algorithm.h" #include "GaudiUtils/HistoStats.h" #include "TH1D.h" #include "TH2D.h" @@ -37,7 +37,7 @@ * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2007-01-24 */ -class Aida2Root : public GaudiHistoAlg { +class Aida2Root : public Algorithm { public: /// execution of the algorithm StatusCode execute() override { return StatusCode::SUCCESS; }; @@ -46,7 +46,7 @@ public: public: // standard constructor - Aida2Root( const std::string& name, ISvcLocator* pSvc ) : GaudiHistoAlg( name, pSvc ) { + Aida2Root( const std::string& name, ISvcLocator* pSvc ) : Algorithm( name, pSvc ) { setProperty( "PropertiesPrint", true ).ignore(); } @@ -72,6 +72,11 @@ private: Gaudi::Property<std::vector<std::string>> m_2Ps{ this, "Profs2D", { "SimpleHistos/321", "SimpleHistos/2dprof" }, "list of 2D-profiles" }; + + StatusCode Error( const std::string& msg ) const { + error() << msg << endmsg; + return StatusCode::FAILURE; + } }; // ============================================================================ /// Declaration of the Algorithm Factory @@ -176,7 +181,7 @@ StatusCode Aida2Root::finalize() { } } - return GaudiHistoAlg::finalize(); + return Algorithm::finalize(); } // ============================================================================ diff --git a/GaudiExamples/src/EvtColsEx/EvtColAlg.cpp b/GaudiAlg/src/examples/EvtColAlg.cpp similarity index 100% rename from GaudiExamples/src/EvtColsEx/EvtColAlg.cpp rename to GaudiAlg/src/examples/EvtColAlg.cpp diff --git a/GaudiExamples/src/IO/ExtendedEvtCol.cpp b/GaudiAlg/src/examples/ExtendedEvtCol.cpp similarity index 100% rename from GaudiExamples/src/IO/ExtendedEvtCol.cpp rename to GaudiAlg/src/examples/ExtendedEvtCol.cpp diff --git a/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp b/GaudiAlg/src/examples/GaudiCommonTests.cpp similarity index 100% rename from GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.cpp rename to GaudiAlg/src/examples/GaudiCommonTests.cpp diff --git a/GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.h b/GaudiAlg/src/examples/GaudiCommonTests.h similarity index 100% rename from GaudiExamples/src/GaudiCommonTests/GaudiCommonTests.h rename to GaudiAlg/src/examples/GaudiCommonTests.h diff --git a/GaudiExamples/src/Histograms/GaudiHistoAlgorithm.cpp b/GaudiAlg/src/examples/GaudiHistoAlgorithm.cpp similarity index 100% rename from GaudiExamples/src/Histograms/GaudiHistoAlgorithm.cpp rename to GaudiAlg/src/examples/GaudiHistoAlgorithm.cpp diff --git a/GaudiExamples/src/Histograms/GaudiHistoAlgorithm.h b/GaudiAlg/src/examples/GaudiHistoAlgorithm.h similarity index 100% rename from GaudiExamples/src/Histograms/GaudiHistoAlgorithm.h rename to GaudiAlg/src/examples/GaudiHistoAlgorithm.h diff --git a/GaudiExamples/src/Histograms/HistoTimingAlg.cpp b/GaudiAlg/src/examples/HistoTimingAlg.cpp similarity index 100% rename from GaudiExamples/src/Histograms/HistoTimingAlg.cpp rename to GaudiAlg/src/examples/HistoTimingAlg.cpp diff --git a/GaudiExamples/src/Histograms/HistoTimingAlg.h b/GaudiAlg/src/examples/HistoTimingAlg.h similarity index 100% rename from GaudiExamples/src/Histograms/HistoTimingAlg.h rename to GaudiAlg/src/examples/HistoTimingAlg.h diff --git a/GaudiAlg/src/examples/IMyTool.h b/GaudiAlg/src/examples/IMyTool.h new file mode 100644 index 0000000000000000000000000000000000000000..6dc6bfdca5ec47575f2759e83106f6fdb380f678 --- /dev/null +++ b/GaudiAlg/src/examples/IMyTool.h @@ -0,0 +1,55 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#ifndef GAUDIEXAMPLE_IMYTOOL_H +#define GAUDIEXAMPLE_IMYTOOL_H 1 + +// Include files +#include "GaudiKernel/IAlgTool.h" + +/** @class IMyTool IMyTool.h + * Example of an Interface of a Algorithm Tool + * + * @author Pere Mato + */ +class IMyTool : virtual public IAlgTool { +public: + /// InterfaceID + DeclareInterfaceID( IMyTool, 2, 0 ); + + /// Get a message + virtual const std::string& message() const = 0; + /// Do something + virtual void doIt() const = 0; +}; + +/** @class IMyOtherTool IMyTool.h + * + * Second interface, to test multiple interface tools in GaudiAlg + * + * @author Chris Jones + */ +class IMyOtherTool : virtual public IAlgTool { +public: + /// InterfaceID + DeclareInterfaceID( IMyOtherTool, 2, 0 ); + + /// Do something else + virtual void doItAgain() const = 0; +}; + +/// Interface (not implemented) to test attempts to retrieval of wrong interface +class IWrongTool : virtual public IAlgTool { +public: + /// InterfaceID + DeclareInterfaceID( IWrongTool, 1, 0 ); +}; + +#endif // GAUDIEXAMPLE_IMYTOOL_H diff --git a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp b/GaudiAlg/src/examples/MyGaudiAlgorithm.cpp similarity index 100% rename from GaudiExamples/src/AlgTools/MyGaudiAlgorithm.cpp rename to GaudiAlg/src/examples/MyGaudiAlgorithm.cpp diff --git a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h b/GaudiAlg/src/examples/MyGaudiAlgorithm.h similarity index 95% rename from GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h rename to GaudiAlg/src/examples/MyGaudiAlgorithm.h index 10cab225f94650a42cae426f3fdcdd3a16a12cf8..80dfd9dceb8a1b61b22baf53e66cb924296c6e22 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiAlgorithm.h +++ b/GaudiAlg/src/examples/MyGaudiAlgorithm.h @@ -20,8 +20,7 @@ // Forward references class IMyTool; -/** @class MyAlgorithm - Trivial Algorithm for tutotial purposes +/** Trivial Algorithm for tutorial purposes @author nobody */ @@ -62,7 +61,7 @@ private: ToolHandle<IMyTool> m_undefinedToolHandle{ this }; ToolHandle<IMyTool> m_invalidToolHandle{ this, "InvalidToolHandle", "TestToolFailing" }; - ToolHandle<IMyOtherTool> m_wrongIfaceTool{ this, "WrongIfaceTool", "MyTool/WrongIfaceTool" }; + ToolHandle<IWrongTool> m_wrongIfaceTool{ this, "WrongIfaceTool", "MyTool/WrongIfaceTool" }; PublicToolHandle<const IMyTool> m_myConstToolHandle{ "MyTool/ConstGenericToolHandle" }; diff --git a/GaudiExamples/src/AlgTools/MyGaudiTool.cpp b/GaudiAlg/src/examples/MyGaudiTool.cpp similarity index 98% rename from GaudiExamples/src/AlgTools/MyGaudiTool.cpp rename to GaudiAlg/src/examples/MyGaudiTool.cpp index 5c3054c726a37ca4814f97e4b08aa28b799cbc9c..6ddaf3569e88e6818819d7efb3a2935824b15e04 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiTool.cpp +++ b/GaudiAlg/src/examples/MyGaudiTool.cpp @@ -40,7 +40,7 @@ void MyGaudiTool::doIt() const } //------------------------------------------------------------------------------ -void MyGaudiTool::doItAgain() +void MyGaudiTool::doItAgain() const //------------------------------------------------------------------------------ { info() << "doItAgain() has been called" << endmsg; diff --git a/GaudiExamples/src/AlgTools/MyGaudiTool.h b/GaudiAlg/src/examples/MyGaudiTool.h similarity index 98% rename from GaudiExamples/src/AlgTools/MyGaudiTool.h rename to GaudiAlg/src/examples/MyGaudiTool.h index 70c3600d272df63836c2ab52dcbc7b92e1c1092e..24e1c9656dd41ef9f97151216115c290a4ae4e2c 100644 --- a/GaudiExamples/src/AlgTools/MyGaudiTool.h +++ b/GaudiAlg/src/examples/MyGaudiTool.h @@ -31,7 +31,7 @@ public: void doIt() const override; // IMyOtherTool interface - void doItAgain() override; + void doItAgain() const override; /// Overriding initialize and finalize StatusCode initialize() override; diff --git a/GaudiExamples/src/Selections/SelCreate.cpp b/GaudiAlg/src/examples/SelCreate.cpp similarity index 100% rename from GaudiExamples/src/Selections/SelCreate.cpp rename to GaudiAlg/src/examples/SelCreate.cpp diff --git a/GaudiExamples/src/Selections/SelFilter.cpp b/GaudiAlg/src/examples/SelFilter.cpp similarity index 100% rename from GaudiExamples/src/Selections/SelFilter.cpp rename to GaudiAlg/src/examples/SelFilter.cpp diff --git a/GaudiExamples/src/TupleEx/TupleAlg.cpp b/GaudiAlg/src/examples/TupleAlg.cpp similarity index 100% rename from GaudiExamples/src/TupleEx/TupleAlg.cpp rename to GaudiAlg/src/examples/TupleAlg.cpp diff --git a/GaudiExamples/src/TupleEx/TupleAlg2.cpp b/GaudiAlg/src/examples/TupleAlg2.cpp similarity index 100% rename from GaudiExamples/src/TupleEx/TupleAlg2.cpp rename to GaudiAlg/src/examples/TupleAlg2.cpp diff --git a/GaudiExamples/src/TupleEx/TupleAlg3.cpp b/GaudiAlg/src/examples/TupleAlg3.cpp similarity index 100% rename from GaudiExamples/src/TupleEx/TupleAlg3.cpp rename to GaudiAlg/src/examples/TupleAlg3.cpp diff --git a/GaudiExamples/src/TupleEx/TupleDef.cpp b/GaudiAlg/src/examples/TupleDef.cpp similarity index 100% rename from GaudiExamples/src/TupleEx/TupleDef.cpp rename to GaudiAlg/src/examples/TupleDef.cpp diff --git a/GaudiExamples/src/TupleEx/TupleDef.h b/GaudiAlg/src/examples/TupleDef.h similarity index 100% rename from GaudiExamples/src/TupleEx/TupleDef.h rename to GaudiAlg/src/examples/TupleDef.h diff --git a/GaudiPython/src/Lib/AlgDecorators.cpp b/GaudiAlg/src/lib/AlgDecorators.cpp similarity index 100% rename from GaudiPython/src/Lib/AlgDecorators.cpp rename to GaudiAlg/src/lib/AlgDecorators.cpp diff --git a/GaudiPython/src/Lib/HistoDecorator.cpp b/GaudiAlg/src/lib/HistoDecorator.cpp similarity index 100% rename from GaudiPython/src/Lib/HistoDecorator.cpp rename to GaudiAlg/src/lib/HistoDecorator.cpp diff --git a/GaudiAlg/src/lib/Sequencer.cpp b/GaudiAlg/src/lib/Sequencer.cpp deleted file mode 100644 index 23db8913356ec7324aa9071ab0eed4695cce364c..0000000000000000000000000000000000000000 --- a/GaudiAlg/src/lib/Sequencer.cpp +++ /dev/null @@ -1,419 +0,0 @@ -/***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * -* * -* This software is distributed under the terms of the Apache version 2 licence, * -* copied verbatim in the file "LICENSE". * -* * -* In applying this licence, CERN does not waive the privileges and immunities * -* granted to it by virtue of its status as an Intergovernmental Organization * -* or submit itself to any jurisdiction. * -\***********************************************************************************/ -// Sequencer class -// Implements: -// 1) Common functionality of IInterface -// 2) Default behavior for the IAlgorithm -#include "GaudiAlg/Sequencer.h" - -#include "GaudiKernel/Chrono.h" -#include "GaudiKernel/GaudiException.h" -#include "GaudiKernel/IAlgManager.h" -#include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/Stat.h" -#include "GaudiKernel/ThreadLocalContext.h" - -#define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) -#define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) - -StatusCode Sequencer::initialize() { - auto is_good = decodeMemberNames(); - if ( !is_good ) { - error() << "Unable to configure one or more sequencer members " << endmsg; - return is_good; - } - - is_good = decodeBranchMemberNames(); - if ( !is_good ) { - error() << "Unable to configure one or more branch members " << endmsg; - return is_good; - } - - // We have to "decode" members before calling base class initialize - is_good = Sequence::initialize(); - if ( !is_good ) return is_good; - - // Loop over all branches - // (Sequence does not know about branches) - for ( auto& alg : branchAlgorithms() ) { - is_good = alg->sysInitialize(); - if ( is_good.isFailure() ) { - error() << "Unable to initialize Algorithm " << alg->name() << endmsg; - return is_good; - } - } - - return is_good; -} - -StatusCode Sequencer::reinitialize() { - // Bypass the loop if this sequencer is disabled - if ( isEnabled() ) { - // Loop over all branch members calling their reinitialize functions - // if they are not disabled. - for ( auto& alg : branchAlgorithms() ) { - if ( alg->isEnabled() ) { alg->reinitialize().ignore(); } - } - return Sequence::reinitialize(); - } - return StatusCode::SUCCESS; -} - -StatusCode Sequencer::execute( const EventContext& ctx ) const { - StatusCode result = StatusCode::SUCCESS; - ON_DEBUG debug() << name() << " Sequencer::execute()" << endmsg; - - auto& state = execState( ctx ); - - // Bypass the loop if this sequencer is disabled or has already been executed - if ( isEnabled() && !( execState( ctx ).state() == AlgExecState::State::Done ) ) { - Gaudi::Algorithm* lastAlgorithm; - result = execute( ctx, *subAlgorithms(), m_isInverted, lastAlgorithm ); - if ( result.isSuccess() ) { - const bool passed = state.filterPassed(); - if ( !passed && !isStopOverride() ) { - - // Filter failed and stop override not set. Execute the - // branch if there is one associated with the filter - // algorithm that failed. Note that the first member on - // the branch is the failing algorithm and so should - // be skipped. - const auto& theAlgs = branchAlgorithms(); - if ( !theAlgs.empty() ) { - Gaudi::Algorithm* branchAlgorithm = theAlgs[0]; - if ( lastAlgorithm == branchAlgorithm ) { - - // Branch specified - Loop over branch members - result = execute( ctx, branchAlgorithms(), m_isBranchInverted, lastAlgorithm, 1 ); - if ( result.isSuccess() ) { - - // The final filter passed state will be set true if either - // of the main or branches passed, otherwise false. - - // Save the branch filter passed state. - setBranchFilterPassed( ctx, state.filterPassed() ); - } - } - } - } - } - - // Prevent multiple executions of this sequencer for the current event - state.setState( AlgExecState::State::Done ); - } - return result; -} - -StatusCode Sequencer::finalize() { - // Loop over all branch members calling their finalize functions - // if they are not disabled. Note that the Sequence::finalize - // function already does this for the main members. - for ( auto& alg : branchAlgorithms() ) { - if ( alg->sysFinalize().isFailure() ) { error() << "Unable to finalize Algorithm " << alg->name() << endmsg; } - } - return Sequence::finalize(); -} - -StatusCode Sequencer::start() { - auto is_good = Sequence::start(); - if ( !is_good ) return is_good; - - // Loop over all branches - for ( auto& alg : branchAlgorithms() ) { - is_good = alg->sysStart(); - if ( !is_good ) { - error() << "Unable to start Algorithm " << alg->name() << endmsg; - return is_good; - } - } - - return is_good; -} - -StatusCode Sequencer::stop() { - // Loop over all branch members calling their finalize functions - // if they are not disabled. - for ( auto& alg : branchAlgorithms() ) { - if ( alg->sysStop().isFailure() ) { error() << "Unable to stop Algorithm " << alg->name() << endmsg; } - } - return Sequence::stop(); -} - -bool Sequencer::branchFilterPassed( const EventContext& ctx ) const { - auto lock = std::scoped_lock{ m_branchFilterMutex }; - return m_branchFilterPassed[ctx.slot()]; -} - -void Sequencer::setBranchFilterPassed( const EventContext& ctx, bool state ) const { - auto lock = std::scoped_lock{ m_branchFilterMutex }; - m_branchFilterPassed[ctx.slot()] = state; -} - -bool Sequencer::isStopOverride() const { return m_stopOverride.value(); } - -StatusCode Sequencer::append( Gaudi::Algorithm* pAlgorithm ) { return append( pAlgorithm, *subAlgorithms() ); } - -StatusCode Sequencer::appendToBranch( Gaudi::Algorithm* pAlgorithm ) { - return append( pAlgorithm, branchAlgorithms() ); -} - -StatusCode Sequencer::createAndAppend( const std::string& type, const std::string& name, - Gaudi::Algorithm*& pAlgorithm ) { - return createAndAppend( type, name, pAlgorithm, *subAlgorithms() ); -} - -StatusCode Sequencer::createAndAppendToBranch( const std::string& type, const std::string& name, - Gaudi::Algorithm*& pAlgorithm ) { - return createAndAppend( type, name, pAlgorithm, branchAlgorithms() ); -} - -StatusCode Sequencer::remove( Gaudi::Algorithm* pAlgorithm ) { return remove( pAlgorithm->name() ); } - -StatusCode Sequencer::remove( const std::string& algname ) { return remove( algname, *subAlgorithms() ); } - -StatusCode Sequencer::removeFromBranch( Gaudi::Algorithm* pAlgorithm ) { - return removeFromBranch( pAlgorithm->name() ); -} - -StatusCode Sequencer::removeFromBranch( const std::string& algname ) { return remove( algname, branchAlgorithms() ); } - -const std::vector<Gaudi::Algorithm*>& Sequencer::branchAlgorithms() const { return m_branchAlgs; } - -std::vector<Gaudi::Algorithm*>& Sequencer::branchAlgorithms() { return m_branchAlgs; } - -StatusCode Sequencer::decodeMemberNames() { - // Decode the membership list - return decodeNames( m_names, *subAlgorithms(), m_isInverted ); -} - -StatusCode Sequencer::decodeBranchMemberNames() { - // Decode the branch membership list - return decodeNames( m_branchNames, branchAlgorithms(), m_isBranchInverted ); -} - -/** - ** Protected Member Functions - **/ - -StatusCode Sequencer::append( Gaudi::Algorithm* pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ) { - // Check that the specified algorithm doesn't already exist in the membership list - if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), pAlgorithm ) != std::end( theAlgs ) ) { - return StatusCode::FAILURE; - } - theAlgs.push_back( pAlgorithm ); - pAlgorithm->addRef(); - return StatusCode::SUCCESS; -} - -StatusCode Sequencer::createAndAppend( const std::string& type, const std::string& algName, - Gaudi::Algorithm*& pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ) { - auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); - if ( !theAlgMgr ) return StatusCode::FAILURE; - - IAlgorithm* tmp; - StatusCode result = theAlgMgr->createAlgorithm( type, algName, tmp ); - if ( result.isSuccess() ) { - try { - pAlgorithm = dynamic_cast<Gaudi::Algorithm*>( tmp ); - theAlgs.push_back( pAlgorithm ); - } catch ( ... ) { - error() << "Unable to create Algorithm " << algName << endmsg; - result = StatusCode::FAILURE; - } - } - - return result; -} - -StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, - std::vector<Gaudi::Algorithm*>& theAlgs, std::vector<bool>& theLogic ) { - StatusCode result; - auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); - if ( theAlgMgr ) { - // Clear the existing list of algorithms - theAlgs.clear(); - - // Build the list of member algorithms from the contents of the - // theNames list. - for ( const auto& n : theNames.value() ) { - - // Parse the name for a syntax of the form: - // - // <type>/<name> - // - // 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(); - - // Parse the name for a syntax of the form: - // - // <name>:invert - // - // 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( ":" ); - // 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 ); - if ( std::string::npos != invert ) { - if ( theName == theType ) { - // This means that we got something like "Type:invert", - // so we have to strip the ":invert" from the type too. - theType = theType.substr( 0, invert ); - } - theName = theName.substr( 0, invert ); - isInverted = true; - } - // Check whether the supplied name corresponds to an existing - // Algorithm object. - SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName, false ); - Gaudi::Algorithm* theAlgorithm = nullptr; - StatusCode status = StatusCode::SUCCESS; - if ( theIAlg ) { - try { - theAlgorithm = dynamic_cast<Gaudi::Algorithm*>( theIAlg.get() ); - } catch ( ... ) { - warning() << theName << " is not an Algorithm - Failed dynamic cast" << endmsg; - theAlgorithm = nullptr; // release - } - } - if ( theAlgorithm ) { - - // The specified Algorithm already exists - just append it to the membership list. - status = append( theAlgorithm, theAlgs ); - if ( status.isSuccess() ) { - ON_DEBUG debug() << theName << " already exists - appended to member list" << endmsg; - } else { - warning() << theName << " already exists - append failed!!!" << endmsg; - result = StatusCode::FAILURE; - } - } else { - - // The specified name doesn't exist - create a new object of the specified type - // and append it to the membership list. - status = createAndAppend( theType, theName, theAlgorithm, theAlgs ); - if ( status.isSuccess() ) { - ON_DEBUG debug() << theName << " doesn't exist - created and appended to member list" << endmsg; - } else { - warning() << theName << " doesn't exist - creation failed!!!" << endmsg; - result = StatusCode::FAILURE; - } - } - if ( status.isSuccess() ) theLogic.push_back( isInverted ); - } - } - // Print membership list - if ( result.isSuccess() && theAlgs.size() != 0 ) { - info() << "Member list: "; - auto ai = theAlgs.begin(); - auto li = theLogic.begin(); - for ( ; ai != theAlgs.end(); ++ai, ++li ) { - - if ( ai != theAlgs.begin() ) info() << ", "; - auto alg = *ai; - if ( alg->name() == System::typeinfoName( typeid( *alg ) ) ) - info() << alg->name(); - else - info() << System::typeinfoName( typeid( *alg ) ) << "/" << alg->name(); - - if ( *li ) info() << ":invert"; - } - info() << endmsg; - } - return result; -} - -StatusCode Sequencer::execute( const EventContext& ctx, const std::vector<Gaudi::Algorithm*>& theAlgs, - const std::vector<bool>& theLogic, Gaudi::Algorithm*& lastAlgorithm, - std::size_t first ) const { - StatusCode result = StatusCode::SUCCESS; - - auto& state = execState( ctx ); - - // Reset the branch filter passed flag - setBranchFilterPassed( ctx, false ); - - // Loop over all algorithms calling their execute functions if they - // are (a) not disabled, and (b) aren't already executed. Note that - // in the latter case the filter state is still examined. Terminate - // the loop if an algorithm indicates that it's filter didn't pass. - auto size = theAlgs.size(); - for ( auto i = first; i < size; i++ ) { - lastAlgorithm = theAlgs[i]; - result = executeMember( lastAlgorithm, ctx ); - if ( result.isSuccess() ) { - - // Take the filter passed status of this algorithm as my own status. - // Note that we take into account inverted logic. - bool passed = lastAlgorithm->execState( ctx ).filterPassed(); - bool isInverted = theLogic[i]; - if ( isInverted ) passed = !passed; - state.setFilterPassed( passed ); - - // The behaviour when the filter fails depends on the StopOverride property. - // The default action is to stop processing, but this default can be - // overridden by setting the "StopOverride" property to true. - if ( !isStopOverride() ) { - if ( !passed ) break; - } - } else { - break; - } - } - return result; -} - -StatusCode Sequencer::executeMember( Gaudi::Algorithm* theAlgorithm, const EventContext& context ) const { - StatusCode result = StatusCode::SUCCESS; - if ( theAlgorithm->isEnabled() ) { - if ( theAlgorithm->execState( context ).state() != AlgExecState::State::Done ) { - result = theAlgorithm->sysExecute( context ); - } - } - return result; -} - -StatusCode Sequencer::remove( const std::string& algname, std::vector<Gaudi::Algorithm*>& theAlgs ) { - StatusCode result = StatusCode::FAILURE; - - // Test that the algorithm exists in the member list - for ( auto& alg : theAlgs ) { - if ( alg->name() == algname ) { - - // Algorithm with specified name exists in the algorithm list - remove it - // THIS ISN'T IMPLEMENTED YET!!!! - info() << "Sequencer::remove( ) isn't implemented yet!!!!!" << endmsg; - result = StatusCode::SUCCESS; - break; - } - } - return result; -} - -std::ostream& Sequencer::toControlFlowExpression( std::ostream& os ) const { - auto& theAlgs = *subAlgorithms(); - if ( theAlgs.empty() ) return os << "CFTrue"; - - os << "seq("; - const auto algs_count = theAlgs.size(); - const auto op = isStopOverride() ? " >> " : " & "; - size_t i = 0; - while ( i < algs_count ) { - if ( i ) os << op; - if ( m_isInverted[i] ) os << "~"; - theAlgs[i]->toControlFlowExpression( os ); - ++i; - } - return os << ")"; -} diff --git a/GaudiPython/src/Lib/TupleDecorator.cpp b/GaudiAlg/src/lib/TupleDecorator.cpp similarity index 100% rename from GaudiPython/src/Lib/TupleDecorator.cpp rename to GaudiAlg/src/lib/TupleDecorator.cpp diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2root.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/aida2root.qmt similarity index 92% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2root.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/aida2root.qmt index 3c6792a563063158a5de4d0b12d46fd1b361d047..7fdb48534c220f136eeb2de927425da6cf23dfbe 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2root.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/aida2root.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> -<argument name="args"><set><text>../../options/Aida2Root.opts</text></set></argument> +<argument name="args"><set><text>options/Aida2Root.opts</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/Aida2Root.ref</text></argument> <argument name="validator"><text> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer.qmt similarity index 89% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer.qmt index b4a5a81d10b48e6b4434fa1eef6b461e09c3245e..81315e6e32c1c53d08d6d6698ed41c8c932f5c6f 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> -<argument name="args"><set><text>../../options/AlgSequencer.opts</text></set></argument> +<argument name="args"><set><text>options/AlgSequencer.opts</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/AlgSequencer.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer_pyopts.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer_pyopts.qmt similarity index 90% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer_pyopts.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer_pyopts.qmt index 1f58dcc4abc5d8cdd418e6f2fe165dcfe75392a6..0247e9e2880c6f3d336c5c2fbf85333743f9e96f 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algsequencer_pyopts.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/algsequencer_pyopts.qmt @@ -11,7 +11,7 @@ --> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> - <argument name="args"><set><text>../../options/AlgSequencer.py</text></set></argument> + <argument name="args"><set><text>options/AlgSequencer.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/AlgSequencer_pyopts.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools2.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/algtools.qmt similarity index 76% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools2.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/algtools.qmt index bcfa9f45d7bd563bb162f3a31c5035a8d9661459..e2171a87b6eb453c2e0c6c4ed32bee419bd50c97 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools2.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/algtools.qmt @@ -10,7 +10,8 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="args"><set><text>../../options/AlgTools2.opts</text></set></argument> + <argument name="program"><text>gaudirun.py</text></argument> + <argument name="args"><set><text>options/AlgTools.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> - <argument name="reference"><text>refs/AlgTools2.ref</text></argument> + <argument name="reference"><text>refs/AlgTools.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/auditors_user_timing.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/auditors_user_timing.qmt similarity index 85% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/auditors_user_timing.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/auditors_user_timing.qmt index 41f7a105b6ca470882b010037247a850e6f84aa9..ada259cac756e98221eba1de627a09712d50afc6 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/auditors_user_timing.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/auditors_user_timing.qmt @@ -17,8 +17,6 @@ from Gaudi.Configuration import * from Configurables import AuditorTestAlg, GaudiExamples__LoggingAuditor as LoggingAuditor -importOptions("Common.opts") - AuditorSvc().Auditors += [ TimingAuditor("TIMER"), LoggingAuditor("LoggingAuditor") ] @@ -31,13 +29,10 @@ app.AuditAlgorithms = True MessageSvc().setDebug.append("EventLoopMgr") </text></argument> -<argument name="environment"><set> -<text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/GaudiExamples/options</text> -</set></argument> <argument name="validator"><text> import re if not re.search("TIMER.TIMER *INFO AuditorTestAlg:loop",stdout): - causes.append("missing timing reoprt") + causes.append("missing timing report") result["GaudiTest.expected"] = result.Quote("timing report for timer 'AuditorTestAlg:loop'") </text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/chronostatsvc.qms/per_event_file.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/chronostatsvc.qms/per_event_file.qmt similarity index 90% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/chronostatsvc.qms/per_event_file.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/chronostatsvc.qms/per_event_file.qmt index 5749ae0ca9a03c53dd4c136e8c3346180a3e7af8..b73baa1b87d7c35ba8701bb3b493172c60aba7e8 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/chronostatsvc.qms/per_event_file.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/chronostatsvc.qms/per_event_file.qmt @@ -12,12 +12,14 @@ <!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> -<argument name="args"><set><text>Timing.py</text></set></argument> <argument name="options"><text> from Configurables import ChronoStatSvc, ApplicationMgr from Configurables import AuditorSvc, TimingAuditor +from Configurables import GaudiExamplesCommonConf from Gaudi.Configuration import DEBUG +GaudiExamplesCommonConf() + logfile = "timing_data.log" import os @@ -31,13 +33,13 @@ auditSvc = AuditorSvc() auditSvc.Auditors.append(TimingAuditor("TIMER")) app = ApplicationMgr() +app.TopAlg = ["GaudiExamples::TimingAlg/Timing"] +app.EvtSel = "NONE" # do not use any event input +app.EvtMax = 400 app.ExtSvc.extend(['ToolSvc', auditSvc]) app.AuditAlgorithms = True </text></argument> -<argument name="environment"><set> -<text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/GaudiExamples/options</text> -</set></argument> <argument name="validator"><text> import re expected = ( r"Timing\s+SUCCESS\s+The timing is \(in us\)\s*\n" + diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/prepare.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/prepare.qmt similarity index 95% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/prepare.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/prepare.qmt index f85b488dc384c1a7ccb4d6c37bb58798fa574c3d..9c655884a8a1657f59cd152199ba50a263cf494f 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/prepare.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/prepare.qmt @@ -13,7 +13,7 @@ <argument name="program"><text>gaudirun.py</text></argument> <argument name="args"><set> <text>-v</text> - <text>../../options/EvtColsEx/Prepare.py</text> + <text>options/EvtColsEx/Prepare.py</text> </set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/EvtColsEx/Prepare.ref</text></argument> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/read.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/read.qmt similarity index 89% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/read.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/read.qmt index e0c5ca6fa301eafe10f4c720114b32e3c3a3e34b..85ed3d50c55a799667933d7945491cfead718284 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/read.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/read.qmt @@ -13,12 +13,12 @@ <argument name="program"><text>gaudirun.py</text></argument> <argument name="args"><set> <text>-v</text> - <text>../../options/EvtColsEx/Read.py</text> + <text>options/EvtColsEx/Read.py</text> </set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/EvtColsEx/Read.ref</text></argument> <argument name="prerequisites"><set> - <tuple><text>gaudiexamples.evtcolsex.write</text><enumeral>PASS</enumeral></tuple> + <tuple><text>gaudialg.evtcolsex.write</text><enumeral>PASS</enumeral></tuple> </set></argument> <argument name="environment"><set> <text>GAUDIAPPNAME=</text> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/write.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/write.qmt similarity index 88% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/write.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/write.qmt index db49234d21c6224429a1eff4c4c7b7a09e511be9..29809be6d9ca79a0ff6f0092abc3a734a37af560 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolsex.qms/write.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/evtcolsex.qms/write.qmt @@ -13,12 +13,12 @@ <argument name="program"><text>gaudirun.py</text></argument> <argument name="args"><set> <text>-v</text> - <text>../../options/EvtColsEx/Write.py</text> + <text>options/EvtColsEx/Write.py</text> </set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/EvtColsEx/Write.ref</text></argument> <argument name="prerequisites"><set> - <tuple><text>gaudiexamples.evtcolsex.prepare</text><enumeral>PASS</enumeral></tuple> + <tuple><text>gaudialg.evtcolsex.prepare</text><enumeral>PASS</enumeral></tuple> </set></argument> <argument name="environment"><set> <text>GAUDIAPPNAME=</text> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudicommontests.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudicommontests.qmt similarity index 89% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudicommontests.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/gaudicommontests.qmt index 682eb1655033732820f1f1f751b97d50163e896d..a5f718af2a08735609c7f1e3f82279d8992bf7d8 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudicommontests.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudicommontests.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> -<argument name="args"><set><text>../../options/GaudiCommonTests.opts</text></set></argument> +<argument name="args"><set><text>options/GaudiCommonTests.opts</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/GaudiCommonTests.ref</text></argument> </extension> diff --git a/GaudiAlg/tests/qmtest/gaudialg.qms/gaudiconfig2.qms/histograms_with_global.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudiconfig2.qms/histograms_with_global.qmt new file mode 100644 index 0000000000000000000000000000000000000000..d05c022e0b250231f6ee68f1a2c4a0b8c816ad1a --- /dev/null +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudiconfig2.qms/histograms_with_global.qmt @@ -0,0 +1,17 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<!-- + (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations + + This software is distributed under the terms of the Apache version 2 licence, + copied verbatim in the file "LICENSE". + + In applying this licence, CERN does not waive the privileges and immunities + granted to it by virtue of its status as an Intergovernmental Organization + or submit itself to any jurisdiction. +--> +<extension class="GaudiTest.GaudiExeTest" kind="test"> +<argument name="program"><text>gaudirun.py</text></argument> +<argument name="args"><set><text>options/gaudiconfig2/Histograms_with_global.py</text></set></argument> +<argument name="use_temp_dir"><enumeral>true</enumeral></argument> +<argument name="reference"><text>refs/gaudiconfig2/Histograms_wg.ref</text></argument> +</extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex3.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudipython_mix.qmt similarity index 76% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex3.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/gaudipython_mix.qmt index b2e42773cb7335bd31c0a0d49876dd935dfa14d0..e45aa762314208e655a18e09016e19f07d430faf 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex3.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/gaudipython_mix.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> <!-- - (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations + (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations This software is distributed under the terms of the Apache version 2 licence, copied verbatim in the file "LICENSE". @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>TupleEx3.py</text></argument> + <argument name="program"><text>scripts/Mix.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> - <argument name="reference"><text>refs/TupleEx3.pyref</text></argument> + <argument name="reference"><text>refs/Mix.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex.qmt index 50a3923c7e2d9389f36eb4de3177b4ecc2b09cb6..88d4a6278dc2fde3ea7727b9e9a020b535fcee7c 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/HistoEx.py</text></argument> + <argument name="program"><text>scripts/HistoEx.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/HistoEx.pyref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex1.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex1.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex1.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex1.qmt index 929588bf42cb2b725d5a8846457de6648346ae1d..20ed058faee637c2dc28444160930f006cd3cef8 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex1.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex1.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/HistoEx1.py</text></argument> + <argument name="program"><text>scripts/HistoEx1.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/HistoEx1.pyref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex2.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex2.qmt similarity index 93% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex2.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex2.qmt index 17a96b572ae0f1cf592593406f250a8a6e20c26a..c8a49437d1f9b08046130d3ca0cdefe8590b7f1a 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoex2.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histo.qms/ex2.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/HistoEx2.py</text></argument> + <argument name="program"><text>scripts/HistoEx2.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="validator"><text> preprocessor = normalizeExamples + \ diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histo_ascii_dump.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histo_ascii_dump.qmt similarity index 89% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/histo_ascii_dump.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/histo_ascii_dump.qmt index cb709c1903ba3d2bfe8267614892c292d17ecbad..6c59bd48cf29d669ec64f6e42ca82702afb41c59 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histo_ascii_dump.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histo_ascii_dump.qmt @@ -10,6 +10,6 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/HistoDumpEx.py</text></argument> + <argument name="program"><text>scripts/HistoDumpEx.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> </extension> diff --git a/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_opts.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_opts.qmt new file mode 100644 index 0000000000000000000000000000000000000000..3fc649bcdbafb95839fc76d56a8362a85f64822c --- /dev/null +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_opts.qmt @@ -0,0 +1,16 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<!-- + (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations + + This software is distributed under the terms of the Apache version 2 licence, + copied verbatim in the file "LICENSE". + + In applying this licence, CERN does not waive the privileges and immunities + granted to it by virtue of its status as an Intergovernmental Organization + or submit itself to any jurisdiction. +--> +<extension class="GaudiTest.GaudiExeTest" kind="test"> +<argument name="args"><set><text>options/Histograms.opts</text></set></argument> +<argument name="use_temp_dir"><enumeral>true</enumeral></argument> +<argument name="reference"><text>refs/Histograms_opts.ref</text></argument> +</extension> diff --git a/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_py.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_py.qmt new file mode 100644 index 0000000000000000000000000000000000000000..5a83d12b67c77a0c2bb3b7602acc80e6d6593fa8 --- /dev/null +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histograms_py.qmt @@ -0,0 +1,17 @@ +<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<!-- + (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations + + This software is distributed under the terms of the Apache version 2 licence, + copied verbatim in the file "LICENSE". + + In applying this licence, CERN does not waive the privileges and immunities + granted to it by virtue of its status as an Intergovernmental Organization + or submit itself to any jurisdiction. +--> +<extension class="GaudiTest.GaudiExeTest" kind="test"> +<argument name="program"><text>gaudirun.py</text></argument> +<argument name="args"><set><text>options/Histograms.py</text></set></argument> +<argument name="use_temp_dir"><enumeral>true</enumeral></argument> +<argument name="reference"><text>refs/Histograms_py.ref</text></argument> +</extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoutilsex.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/histoutilsex.qmt similarity index 90% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/histoutilsex.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/histoutilsex.qmt index 818e154606606d0d0d120c9cdabb4d37dbd2fcf6..2532644dc9fadbc83e20596fe2e16cbe5cb43cd7 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/histoutilsex.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/histoutilsex.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/HistoUtilsEx.py</text></argument> + <argument name="program"><text>scripts/HistoUtilsEx.py</text></argument> <argument name="reference"><text>refs/HistoUtilsEx.ref</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/aida2rootex.qmt similarity index 66% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/aida2rootex.qmt index 796b6e3d8f74aaae8f2c41c58af6d1196e747356..0bcd07211f93bae2064bb88adb7d4b900705f3ef 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/aida2rootex.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/Aida2RootEx.py</text></argument> + <argument name="program"><text>scripts/Aida2RootEx.py</text></argument> <argument name="args"><set><text>-b</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/Aida2RootEx.ref</text></argument> @@ -20,9 +20,4 @@ preprocessor = (normalizeExamples + validateWithReference(preproc = preprocessor) </text></argument> -<argument name="environment"><set> -<text>STDOPTS=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options</text> -<text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/tests/qmtest:$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/tests/pyjobopts:$ENV_PROJECT_SOURCE_DIR/Gaudi/tests</text> -<text>PYTHONPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/tests/qmtest:$ENV_PROJECT_SOURCE_DIR/Gaudi/tests/python:$PYTHONPATH</text> -</set></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_38882.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/bug_38882.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_38882.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/bug_38882.qmt index 40ae76be60e5edfadfaec53c957bc89631ca42c1..eecb94ab36cf84dd87bf78cde280b207f03a0c7b 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_38882.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/bug_38882.qmt @@ -11,7 +11,7 @@ --> <!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> <extension class="GaudiTest.GaudiExeTest" kind="test"> -<argument name="program"><text>../../scripts/bug_38882.py</text></argument> +<argument name="program"><text>scripts/bug_38882.py</text></argument> <argument name="validator"><text> expected = "=== bug_38882_test_alg Execute ===" if not expected in stdout: diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/counter.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/counter.qmt similarity index 94% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/counter.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/counter.qmt index 6c02ace624e47979e86a46027f58954d1289fb0d..a2e7ca7562eed2978417de7b42ab12f55595ba7d 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/counter.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/counter.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/Counter.py</text></argument> + <argument name="program"><text>scripts/Counter.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/Counter.ref</text></argument> <argument name="environment"><set> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolread.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolread.qmt similarity index 83% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolread.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolread.qmt index bcc056ecd707624b241c66cb198948ed2e07b132..f3f11502f2677abac240446c59d70088ce1d4390 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolread.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolread.qmt @@ -10,10 +10,10 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/EvtColRead.py</text></argument> + <argument name="program"><text>scripts/EvtColRead.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/EvtColRead.pyref</text></argument> <argument name="prerequisites"><set> - <tuple><text>gaudiexamples.evtcolwrite</text><enumeral>PASS</enumeral></tuple> + <tuple><text>gaudialg.python.evtcolwrite</text><enumeral>PASS</enumeral></tuple> </set></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolwrite.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolwrite.qmt similarity index 83% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolwrite.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolwrite.qmt index 9ef5ba9d96d940f208c174aa2e074d8ccd25d986..91c37c3fd0eabc3251227f0bb1418e65d8a5770e 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/evtcolwrite.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/python.qms/evtcolwrite.qmt @@ -10,10 +10,10 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/EvtColWrite.py</text></argument> + <argument name="program"><text>scripts/EvtColWrite.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/EvtColWrite.pyref</text></argument> <argument name="prerequisites"><set> - <tuple><text>gaudiexamples.evtcolsex.prepare</text><enumeral>PASS</enumeral></tuple> + <tuple><text>gaudialg.evtcolsex.prepare</text><enumeral>PASS</enumeral></tuple> </set></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/selections.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/selections.qmt similarity index 90% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/selections.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/selections.qmt index 8317e91543c8fecb58c8bc285f688992d73d1957..e44cdecfc91e87b56a362874b931c0358c66e116 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/selections.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/selections.qmt @@ -11,7 +11,7 @@ --> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> - <argument name="args"><set><text>-v</text><text>../../options/Selections.py</text></set></argument> + <argument name="args"><set><text>-v</text><text>options/Selections.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/Selections.ref</text></argument> <argument name="environment"><set> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing_histos.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/timing_histos.qmt similarity index 79% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/timing_histos.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/timing_histos.qmt index 26bd6b56752b9f2e1d86546c7b6a81cc25c7f96c..daf7003b633294ceac089bad7ff5f9c0a672a87f 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing_histos.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/timing_histos.qmt @@ -11,12 +11,9 @@ --> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> -<argument name="args"><set><text>../../options/TimingHistograms.py</text></set></argument> +<argument name="args"><set><text>options/TimingHistograms.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TimingHistograms.ref</text></argument> -<argument name="environment"><set> -<text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/GaudiExamples/options</text> -</set></argument> <argument name="validator"><text> # Default validation. validateWithReference() @@ -25,9 +22,9 @@ validateWithReference() import os from subprocess import Popen, PIPE -testscript = os.path.join(os.environ['ENV_PROJECT_SOURCE_DIR'], 'GaudiExamples', 'tests', 'scripts', 'test_timing_histo_file.py') +testscript = os.path.join(os.environ['ENV_PROJECT_SOURCE_DIR'], 'GaudiAlg', 'tests', 'qmtest', 'scripts', 'test_timing_histo_file.py') if not os.path.exists(testscript): - testscript = os.path.join(os.environ['ENV_PROJECT_SOURCE_DIR'], 'Gaudi', 'GaudiExamples', 'tests', 'scripts', 'test_timing_histo_file.py') + testscript = os.path.join(os.environ['ENV_PROJECT_SOURCE_DIR'], 'Gaudi', 'GaudiAlg', 'tests', 'qmtest', 'scripts', 'test_timing_histo_file.py') test = Popen(['python3', testscript], stdout=PIPE, stderr=PIPE) out, err = test.communicate() diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex.qmt similarity index 90% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex.qmt index 817e9afda71c522e82c5e3ef98c8ff25293ac48a..b38e3cd4218bc067a868d8b2c64107d9759f291d 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> -<argument name="args"><set><text>../../options/TupleEx.opts</text></set></argument> +<argument name="args"><set><text>options/TupleEx.opts</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TupleEx.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex1.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex1.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex1.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex1.qmt index 973ebeec313a73c83ffeaab1bdadeaec8543f946..34f165804945e66928511d1261bf79e0ce862624 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex1.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex1.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/TupleEx1.py</text></argument> + <argument name="program"><text>scripts/TupleEx1.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TupleEx1.pyref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex2.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex2.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex2.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex2.qmt index 537add85af6fe8216f8a8c8d7c122176e1982fca..0c6196b80c14e0dfc74688514190f6873cb07eca 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex2.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex2.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/TupleEx2.py</text></argument> + <argument name="program"><text>scripts/TupleEx2.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TupleEx2.pyref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_py.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_py.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_py.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_py.qmt index 2820516bc004afdf09fb4808383d14e59981a1a1..f8ccbaaa90d1119cfece3089c3afe93741470e2b 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_py.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_py.qmt @@ -10,7 +10,7 @@ or submit itself to any jurisdiction. --> <extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/TupleEx.py</text></argument> + <argument name="program"><text>scripts/TupleEx.py</text></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TupleEx.pyref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_pyopts.qmt b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_pyopts.qmt similarity index 91% rename from GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_pyopts.qmt rename to GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_pyopts.qmt index b259d401eea4d2747d816a435abe36e9e1351b44..76b8c8181887a6c65d94009428f79b9d68dd5b8a 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex_pyopts.qmt +++ b/GaudiAlg/tests/qmtest/gaudialg.qms/tuple.qms/ex_pyopts.qmt @@ -11,7 +11,7 @@ --> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> -<argument name="args"><set><text>../../options/TupleEx.py</text></set></argument> +<argument name="args"><set><text>options/TupleEx.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="reference"><text>refs/TupleExPyOpts.ref</text></argument> </extension> diff --git a/GaudiExamples/options/Aida2Root.opts b/GaudiAlg/tests/qmtest/options/Aida2Root.opts similarity index 100% rename from GaudiExamples/options/Aida2Root.opts rename to GaudiAlg/tests/qmtest/options/Aida2Root.opts diff --git a/GaudiExamples/options/AlgSequencer.opts b/GaudiAlg/tests/qmtest/options/AlgSequencer.opts similarity index 92% rename from GaudiExamples/options/AlgSequencer.opts rename to GaudiAlg/tests/qmtest/options/AlgSequencer.opts index 9b19739b871e24a096ac8e05f0d1390c8b658363..f79df331ee97146d0267a916a83160df38c68e27 100644 --- a/GaudiExamples/options/AlgSequencer.opts +++ b/GaudiAlg/tests/qmtest/options/AlgSequencer.opts @@ -27,9 +27,9 @@ StopperAlg.StopCount = 20; //-------------------------------------------------------------- // Testing Sequencers //-------------------------------------------------------------- -ApplicationMgr.TopAlg += { "Sequencer/TopSequence" }; -TopSequence.Members = {"Sequencer/Sequence1", "Sequencer/Sequence2"}; -TopSequence.StopOverride = true; +ApplicationMgr.TopAlg += { "Gaudi::Sequencer/TopSequence" }; +TopSequence.Members = {"Gaudi::Sequencer/Sequence1", "Gaudi::Sequencer/Sequence2"}; +TopSequence.ShortCircuit = false; Sequence1.Members = {"Prescaler/Prescaler1", "HelloWorld", "EventCounter/Counter1"}; Sequence2.Members = {"Prescaler/Prescaler2", "HelloWorld", "EventCounter/Counter2"}; diff --git a/GaudiExamples/options/AlgSequencer.py b/GaudiAlg/tests/qmtest/options/AlgSequencer.py similarity index 92% rename from GaudiExamples/options/AlgSequencer.py rename to GaudiAlg/tests/qmtest/options/AlgSequencer.py index 3b3b3156379454a65d4625015bd96689ca62accc..be556daa69aceaa9d9b4f4151e079109ac8da416 100644 --- a/GaudiExamples/options/AlgSequencer.py +++ b/GaudiAlg/tests/qmtest/options/AlgSequencer.py @@ -32,9 +32,9 @@ p2 = Prescaler("Prescaler2", PercentPass=10.0, OutputLevel=WARNING) h = HelloWorld(OutputLevel=DEBUG) c1 = EventCounter("Counter1") c2 = EventCounter("Counter2") -s1 = Sequencer("Sequence1", Members=[p1, h, c1]) -s2 = Sequencer("Sequence2", Members=[p2, h, c2]) -top = Sequencer("TopSequence", Members=[s1, s2], StopOverride=True) +s1 = Gaudi__Sequencer("Sequence1", Members=[p1, h, c1]) +s2 = Gaudi__Sequencer("Sequence2", Members=[p2, h, c2]) +top = Gaudi__Sequencer("TopSequence", Members=[s1, s2], ShortCircuit=False) # ----------------------------------------------------------------- # Testing the new GaudiSequencer diff --git a/GaudiAlg/tests/qmtest/options/AlgTools.py b/GaudiAlg/tests/qmtest/options/AlgTools.py new file mode 100644 index 0000000000000000000000000000000000000000..b0e7dc74bf87cc9e705e43be69da8f4115bc0e95 --- /dev/null +++ b/GaudiAlg/tests/qmtest/options/AlgTools.py @@ -0,0 +1,66 @@ +##################################################################################### +# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# # +# This software is distributed under the terms of the Apache version 2 licence, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +##################################################################################### +############################################################### +# Job options file +# ============================================================== +from Configurables import GaudiExamplesCommonConf, MyGaudiAlgorithm, MyGaudiTool +from Gaudi.Configuration import * + +GaudiExamplesCommonConf() + +myalg = MyGaudiAlgorithm("MyAlg") + +myalg.addTool(MyGaudiTool(Int=101, Double=101.1e10, String="hundred one", Bool=False)) + +gtool = MyGaudiTool( + "MyGaudiTool", + Int=201, + Double=201.1e10, + String="two hundred and one", + Bool=True, + OutputLevel=INFO, +) + +tool_conf1 = MyGaudiTool( + "MyTool_conf1", Int=1, Double=2, String="three", Bool=True, OutputLevel=INFO +) + +tool_conf2 = MyGaudiTool( + "MyTool_conf2", Int=10, Double=20, String="xyz", Bool=False, OutputLevel=INFO +) + +myToolWithName = myalg.addTool(tool_conf2, "ToolWithName") + +myalg.ToolWithName.String = "xyz" + +assert myToolWithName.String == "xyz" +assert myalg.ToolWithName == myToolWithName + +myToolWithName.String = "abc" + +myalg.PrivToolHandle.String = "Is a private tool" + +pubtool = MyGaudiTool("TestPubToolHandle", String="Is a public tool") +myalg.PubToolHandle = pubtool + +# disable a ToolHandle +myalg.InvalidToolHandle = "" + +ApplicationMgr(EvtMax=10, EvtSel="NONE", HistogramPersistency="NONE", TopAlg=[myalg]) +# -------------------------------------------------------------- +# Test circular tool dependencies (by Chris Jones) +# -------------------------------------------------------------- +from Configurables import TestTool, TestToolAlg + +tA = TestTool("ToolA", Tools=["TestTool/ToolB"], OutputLevel=DEBUG) +tB = TestTool("ToolB", Tools=["TestTool/ToolA"], OutputLevel=DEBUG) +testalg = TestToolAlg(Tools=["TestTool/ToolA"]) +ApplicationMgr().TopAlg += [testalg] diff --git a/GaudiAlg/tests/qmtest/options/Common.opts b/GaudiAlg/tests/qmtest/options/Common.opts new file mode 100644 index 0000000000000000000000000000000000000000..f74dbeb3de0055ad88c022849572e560543007cf --- /dev/null +++ b/GaudiAlg/tests/qmtest/options/Common.opts @@ -0,0 +1,13 @@ +//************************************************************** +// +// standard job options file +// +//============================================================== + +#include "Services.opts" + +//============================================================== +// +// End of standard job options file +// +//************************************************************** diff --git a/GaudiExamples/options/EvtColsEx/Prepare.py b/GaudiAlg/tests/qmtest/options/EvtColsEx/Prepare.py similarity index 100% rename from GaudiExamples/options/EvtColsEx/Prepare.py rename to GaudiAlg/tests/qmtest/options/EvtColsEx/Prepare.py diff --git a/GaudiExamples/options/EvtColsEx/Read.py b/GaudiAlg/tests/qmtest/options/EvtColsEx/Read.py similarity index 100% rename from GaudiExamples/options/EvtColsEx/Read.py rename to GaudiAlg/tests/qmtest/options/EvtColsEx/Read.py diff --git a/GaudiExamples/options/EvtColsEx/Write.py b/GaudiAlg/tests/qmtest/options/EvtColsEx/Write.py similarity index 100% rename from GaudiExamples/options/EvtColsEx/Write.py rename to GaudiAlg/tests/qmtest/options/EvtColsEx/Write.py diff --git a/GaudiExamples/options/GaudiCommonTests.opts b/GaudiAlg/tests/qmtest/options/GaudiCommonTests.opts similarity index 100% rename from GaudiExamples/options/GaudiCommonTests.opts rename to GaudiAlg/tests/qmtest/options/GaudiCommonTests.opts diff --git a/GaudiAlg/tests/qmtest/options/Histograms.opts b/GaudiAlg/tests/qmtest/options/Histograms.opts new file mode 100644 index 0000000000000000000000000000000000000000..43ceeee968dca131f94d38a72351966ed74e4fa2 --- /dev/null +++ b/GaudiAlg/tests/qmtest/options/Histograms.opts @@ -0,0 +1,42 @@ +//############################################################## +// Job options file +//============================================================== + +AuditorSvc.Auditors = { "ChronoAuditor" }; +//-------------------------------------------------------------- + +// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) +MessageSvc.OutputLevel = 3; + +//-------------------------------------------------------------- +// Private Application Configuration options +//-------------------------------------------------------------- + +// 'Old Style' histogramming, with direct manipulation of histogram service +//ApplicationMgr.TopAlg += { "HistoAlgorithm" }; +//HistoAlgorithm.OutputLevel = 2; + +// Example of Histogramming using GaudiHistoAlg base class from GaudiAlg +ApplicationMgr.TopAlg += { "GaudiHistoAlgorithm/SimpleHistos" }; +SimpleHistos.HistoPrint = true; +SimpleHistos.OutputLevel = 2; +//MessageSvc.setDebug += { "SimpleHistos" }; + +//-------------------------------------------------------------- +// Event related parameters +//-------------------------------------------------------------- +ApplicationMgr.EvtMax = 50000; +ApplicationMgr.EvtSel = "NONE"; + +//-------------------------------------------------------------- +// Other Service Options +//-------------------------------------------------------------- +ApplicationMgr.HistogramPersistency = "ROOT"; +ApplicationMgr.ExtSvc = {"Gaudi::Monitoring::MessageSvcSink"}; +RootHistSvc.OutputFile = "histo-opts.root"; + +//NTupleSvc.Output = { "FILE1 DATAFILE='NTuple.root' OPT='NEW' TYP='ROOT'" }; + +//RndmGenSvc.Engine.Seeds = { 70, 71, 0 }; + +HistogramDataSvc.OutputLevel = 2 ; diff --git a/GaudiPython/python/HistoUtils.py b/GaudiAlg/tests/qmtest/options/Histograms.py similarity index 54% rename from GaudiPython/python/HistoUtils.py rename to GaudiAlg/tests/qmtest/options/Histograms.py index bf77de05847e1bd70178404cda6c2d8caabb1195..66a45083e9047aef8e15e0f704cc99162e292ddd 100644 --- a/GaudiPython/python/HistoUtils.py +++ b/GaudiAlg/tests/qmtest/options/Histograms.py @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -8,11 +8,24 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -""" HistoUtils python module - This module is deprecated use 'GaudiPython.HistoUtils' instead -""" -from GaudiPython.HistoUtils import * # noqa: F401 F403 +from Configurables import Gaudi__Monitoring__MessageSvcSink as MessageSvcSink +from Gaudi.Configuration import * -from GaudiPython import deprecation +AuditorSvc().Auditors = ["ChronoAuditor"] +MessageSvc().OutputLevel = INFO +RootHistSvc("RootHistSvc").OutputFile = "histo.root" -deprecation("Use 'GaudiPython.HistoUtils' module instead of 'HistoUtils'") +from Configurables import Gaudi__Histograming__Sink__Root as RootHistoSink +from Configurables import GaudiHistoAlgorithm + +algs = [ + GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=DEBUG), +] + +app = ApplicationMgr( + EvtMax=50000, + EvtSel="NONE", + HistogramPersistency="ROOT", + TopAlg=algs, + ExtSvc=[MessageSvcSink(), RootHistoSink()], +) diff --git a/GaudiExamples/options/HistogramsTiming.py b/GaudiAlg/tests/qmtest/options/HistogramsTiming.py similarity index 100% rename from GaudiExamples/options/HistogramsTiming.py rename to GaudiAlg/tests/qmtest/options/HistogramsTiming.py diff --git a/GaudiExamples/options/Selections.py b/GaudiAlg/tests/qmtest/options/Selections.py similarity index 100% rename from GaudiExamples/options/Selections.py rename to GaudiAlg/tests/qmtest/options/Selections.py diff --git a/GaudiAlg/tests/qmtest/options/Services.opts b/GaudiAlg/tests/qmtest/options/Services.opts new file mode 100644 index 0000000000000000000000000000000000000000..2bf9afc2306754b1aa740e6da716210473a86022 --- /dev/null +++ b/GaudiAlg/tests/qmtest/options/Services.opts @@ -0,0 +1,23 @@ +//************************************************************** +// +// Services needed by a standard job +// +//============================================================== + +//-------------------------------------------------------------- +// General Application Configuration options +//-------------------------------------------------------------- + +//-------------------------------------------------------------- +AuditorSvc.Auditors = { "ChronoAuditor" }; + +//-------------------------------------------------------------- +// Persistency services +//-------------------------------------------------------------- + + +//============================================================== +// +// End of standard Services options file +// +//************************************************************** diff --git a/GaudiExamples/options/TimingHistograms.py b/GaudiAlg/tests/qmtest/options/TimingHistograms.py similarity index 89% rename from GaudiExamples/options/TimingHistograms.py rename to GaudiAlg/tests/qmtest/options/TimingHistograms.py index 018ed5b30a2745d95c90088746af44764d2b92a1..87ae175e0866962a88712fa6bb4a477b2d3af4ba 100644 --- a/GaudiExamples/options/TimingHistograms.py +++ b/GaudiAlg/tests/qmtest/options/TimingHistograms.py @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -11,10 +11,12 @@ ############################################################### # Job options file # ============================================================== +from pathlib import Path from Gaudi.Configuration import * -importOptions("AlgSequencer.py") +# Reuse AlgSequencer.py options +importOptions(Path(__file__).parent / "AlgSequencer.py") # -------------------------------------------------------------- # Enable Timing Histograms diff --git a/GaudiExamples/options/TupleEx.opts b/GaudiAlg/tests/qmtest/options/TupleEx.opts similarity index 100% rename from GaudiExamples/options/TupleEx.opts rename to GaudiAlg/tests/qmtest/options/TupleEx.opts diff --git a/GaudiExamples/options/TupleEx.py b/GaudiAlg/tests/qmtest/options/TupleEx.py similarity index 100% rename from GaudiExamples/options/TupleEx.py rename to GaudiAlg/tests/qmtest/options/TupleEx.py diff --git a/GaudiAlg/tests/qmtest/options/gaudiconfig2/Histograms_with_global.py b/GaudiAlg/tests/qmtest/options/gaudiconfig2/Histograms_with_global.py new file mode 100644 index 0000000000000000000000000000000000000000..bda948b8e17f1b9844d71f0d622eaaed06f3725b --- /dev/null +++ b/GaudiAlg/tests/qmtest/options/gaudiconfig2/Histograms_with_global.py @@ -0,0 +1,53 @@ +##################################################################################### +# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# # +# This software is distributed under the terms of the Apache version 2 licence, # +# copied verbatim in the file "LICENSE". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +##################################################################################### +from GaudiConfig2 import Configurables as C +from GaudiConfig2 import useGlobalInstances + +useGlobalInstances(True) + +C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"]) + +# algorithms +algorithms = [ + C.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3), +] + +app = C.ApplicationMgr( + "ApplicationMgr", + TopAlg=["SimpleHistos"], + EvtMax=50000, + EvtSel="NONE", +) +try: + app.TopAlg.append("MessageSvc") + assert False, "this is not expected" +except TypeError: + pass # this is expected + +app.TopAlg[0].OutputLevel = 2 + +app.MessageSvcType = "MessageSvc" +app.MessageSvcType.OutputLevel = 3 +app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] + +try: + app.JobOptionsSvcType = "MessageSvc" + assert False, "this is not expected" +except TypeError: + pass # this is expected + +app.HistogramPersistency = "ROOT" +C.RootHistCnv.PersSvc("RootHistSvc", OutputFile="histo-c2g.root") + +C.HistogramSvc( + "HistogramDataSvc", + OutputLevel=2, +) diff --git a/GaudiAlg/tests/qmtest/refs/Aida2Root.ref b/GaudiAlg/tests/qmtest/refs/Aida2Root.ref new file mode 100644 index 0000000000000000000000000000000000000000..9bd0df2aabeee9347790a3511a08d805c859783d --- /dev/null +++ b/GaudiAlg/tests/qmtest/refs/Aida2Root.ref @@ -0,0 +1,308 @@ +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Histograms.opts +JobOptionsSvc INFO # (5,1): AuditorSvc.Auditors = ["ChronoAuditor"] +JobOptionsSvc INFO # (9,1): MessageSvc.OutputLevel = 3 +JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["GaudiHistoAlgorithm/SimpleHistos"] +JobOptionsSvc INFO # (21,1): SimpleHistos.HistoPrint = 1 +JobOptionsSvc INFO # (22,1): SimpleHistos.OutputLevel = 2 +JobOptionsSvc INFO # (28,1): ApplicationMgr.EvtMax = 50000 +JobOptionsSvc INFO # (29,1): ApplicationMgr.EvtSel = "NONE" +JobOptionsSvc INFO # (34,1): ApplicationMgr.HistogramPersistency = "ROOT" +JobOptionsSvc INFO # (35,1): ApplicationMgr.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] +JobOptionsSvc INFO # (36,1): RootHistSvc.OutputFile = "histo-opts.root" +JobOptionsSvc INFO # (42,1): HistogramDataSvc.OutputLevel = 2 +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Aida2Root.opts +JobOptionsSvc INFO # (3,1): ApplicationMgr.TopAlg += ["Aida2Root"] +JobOptionsSvc INFO # (4,1): ApplicationMgr.ExtSvc += ["Gaudi::Monitoring::MessageSvcSink"] +JobOptionsSvc INFO # (6,1): RootHistSvc.OutputFile = "histo-aida2root.root" +JobOptionsSvc INFO Job options successfully read in from /home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Aida2Root.opts +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:25:21 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +SimpleHistos DEBUG Property update for OutputLevel : new value = 2 +SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> +SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made +SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 +SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } +SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False +SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' +SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' +SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True +SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 +SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True +SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] +SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' +SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' +SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True +SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False +SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 +SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' +SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 +SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True +SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 +HistogramDataSvc DEBUG Service base class initialized successfully +RootHistSvc INFO Writing ROOT histograms to: histo-aida2root.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc +SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' +SimpleHistos DEBUG input handles: 0 +SimpleHistos DEBUG output handles: 0 +SimpleHistos DEBUG Data Deps for SimpleHistos +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine +RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 +RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> +SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' +SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' +SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' +SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' +SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' +SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' +SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' +SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' +SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' +SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' +SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' +SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' +SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' +SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' +SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' +SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' +SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' +SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' +SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' +SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! +ApplicationMgr INFO Application Manager Stopped successfully +SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 +SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | 101 | "Exponential" | 50000 | 0.97244 | 0.91365 | 1.4781 | 2.1471 | + | 102 | "Breit" | 50000 | -0.0047661 | 1.1982 | -0.00237 | 3.5536 | + | 1111 | "Forced Numeric ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | AutoID time test | "AutoID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | poisson | "Poisson" | 50000 | 1.8072 | 1.1794 | 0.33256 | -0.76904 | + | subdir1/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | subdir2/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | test1 | "Forced Alpha ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | varBinning/x | "1D Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0.010336 | -1.3177 | +SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 + ID=Exponential V Flat "Exponential V Flat" Ents/All=49827/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=0.96736/0.90536 + ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 + ID=binVpois "Binom V poisson" Ents/All=49936/50000<X>/sX=1.8068/1.1798,<Y>/sY=1.9088/1.1168 + ID=expoVpois "Expo V poisson" Ents/All=49987/50000<X>/sX=1.8075/1.1796,<Y>/sY=0.97291/0.91449 + ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 + ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=-0.0045774/1.0038,<Z>/sZ=0.96736/0.90536 +SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0 | -3 | +SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 + ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos DEBUG Finalize base class GaudiAlgorithm +SimpleHistos DEBUG Tools to release : +SimpleHistos DEBUG Services to release : +Aida2Root SUCCESS Get the native ROOT representation of histograms! +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/Gaussian mean=0, sigma=1': +TH1.Print Name = Gaussian mean=0, sigma=1, Entries= 50000, Total sum= 50000 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | -0.010745789 | -0.010745789 | 0 | +Aida2Root INFO | 'meanErr' | 0.00446417 | 0.00446417 | 0 | +Aida2Root INFO | 'rms' | 0.99821875 | 0.99821875 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0031863902 | 0.0031566448 | 2.9745376e-05 | +Aida2Root INFO | 'skewness' | -0.0062504859 | -0.0062504859 | 2.4806546e-16 | +Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | +Aida2Root INFO | 'kurtosis' | 0.037829984 | 0.037829984 | 1.3322676e-15 | +Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/101': +TH1.Print Name = Exponential, Entries= 50000, Total sum= 49643 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | 0.97243786 | 0.97243786 | 0 | +Aida2Root INFO | 'meanErr' | 0.0041006464 | 0.0041006464 | 0 | +Aida2Root INFO | 'rms' | 0.9136531 | 0.9136531 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0041754089 | 0.0028995949 | 0.001275814 | +Aida2Root INFO | 'skewness' | 1.4781317 | 1.4781317 | -2.220446e-16 | +Aida2Root INFO | 'skewnessErr' | 0.010993105 | 0.010993769 | -6.6434299e-07 | +Aida2Root INFO | 'kurtosis' | 2.1471444 | 2.1471444 | 1.7763568e-15 | +Aida2Root INFO | 'kurtosisErr' | 0.021984217 | 0.021987538 | -3.3215466e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/102': +TH1.Print Name = Breit, Entries= 50000, Total sum= 46916 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | -0.0047661262 | -0.0047661262 | 0 | +Aida2Root INFO | 'meanErr' | 0.0055320286 | 0.0055320286 | 0 | +Aida2Root INFO | 'rms' | 1.198243 | 1.198243 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0065184224 | 0.003911735 | 0.0026066875 | +Aida2Root INFO | 'skewness' | -0.0023700175 | -0.0023700175 | 4.7314583e-16 | +Aida2Root INFO | 'skewnessErr' | 0.011308041 | 0.011308764 | -7.2309757e-07 | +Aida2Root INFO | 'kurtosis' | 3.5535773 | 3.5535773 | -1.7763568e-15 | +Aida2Root INFO | 'kurtosisErr' | 0.022613912 | 0.022617528 | -3.6152939e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/1111': +TH1.Print Name = Forced Numeric ID time test, Entries= 50000, Total sum= 50000 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | -0.010745789 | -0.010745789 | 0 | +Aida2Root INFO | 'meanErr' | 0.00446417 | 0.00446417 | 0 | +Aida2Root INFO | 'rms' | 0.99821875 | 0.99821875 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0031863902 | 0.0031566448 | 2.9745376e-05 | +Aida2Root INFO | 'skewness' | -0.0062504859 | -0.0062504859 | 2.4806546e-16 | +Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | +Aida2Root INFO | 'kurtosis' | 0.037829984 | 0.037829984 | 1.3322676e-15 | +Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/test1': +TH1.Print Name = Forced Alpha ID time test, Entries= 50000, Total sum= 50000 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | -0.010745789 | -0.010745789 | 0 | +Aida2Root INFO | 'meanErr' | 0.00446417 | 0.00446417 | 0 | +Aida2Root INFO | 'rms' | 0.99821875 | 0.99821875 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0031863902 | 0.0031566448 | 2.9745376e-05 | +Aida2Root INFO | 'skewness' | -0.0062504859 | -0.0062504859 | 2.4806546e-16 | +Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | +Aida2Root INFO | 'kurtosis' | 0.037829984 | 0.037829984 | 1.3322676e-15 | +Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir2/bino': +TH1.Print Name = Binominal, Entries= 50000, Total sum= 48626 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | 1.9077243 | 1.9077243 | 0 | +Aida2Root INFO | 'meanErr' | 0.0050640754 | 0.0050640754 | 0 | +Aida2Root INFO | 'rms' | 1.1166946 | 1.1166946 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0029186938 | 0.003580842 | -0.00066214827 | +Aida2Root INFO | 'skewness' | 0.25325708 | 0.25325708 | 1.6653345e-16 | +Aida2Root INFO | 'skewnessErr' | 0.011107455 | 0.01110814 | -6.8529285e-07 | +Aida2Root INFO | 'kurtosis' | -0.67131117 | -0.67131117 | -4.4408921e-16 | +Aida2Root INFO | 'kurtosisErr' | 0.022212854 | 0.02221628 | -3.4262869e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir1/bino': +TH1.Print Name = Binominal, Entries= 50000, Total sum= 48626 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | 1.9077243 | 1.9077243 | 0 | +Aida2Root INFO | 'meanErr' | 0.0050640754 | 0.0050640754 | 0 | +Aida2Root INFO | 'rms' | 1.1166946 | 1.1166946 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0029186938 | 0.003580842 | -0.00066214827 | +Aida2Root INFO | 'skewness' | 0.25325708 | 0.25325708 | 1.6653345e-16 | +Aida2Root INFO | 'skewnessErr' | 0.011107455 | 0.01110814 | -6.8529285e-07 | +Aida2Root INFO | 'kurtosis' | -0.67131117 | -0.67131117 | -4.4408921e-16 | +Aida2Root INFO | 'kurtosisErr' | 0.022212854 | 0.02221628 | -3.4262869e-06 | +Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/poisson': +TH1.Print Name = Poisson, Entries= 50000, Total sum= 47490 +Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | +Aida2Root INFO | 'mean' | 1.8071594 | 1.8071594 | 0 | +Aida2Root INFO | 'meanErr' | 0.0054121148 | 0.0054121148 | 0 | +Aida2Root INFO | 'rms' | 1.1794189 | 1.1794189 | 0 | +Aida2Root INFO | 'rmsErr' | 0.0030023803 | 0.0038269431 | -0.00082456277 | +Aida2Root INFO | 'skewness' | 0.3325611 | 0.3325611 | 2.7755576e-16 | +Aida2Root INFO | 'skewnessErr' | 0.011239503 | 0.011240213 | -7.1002777e-07 | +Aida2Root INFO | 'kurtosis' | -0.76904397 | -0.76904397 | -8.8817842e-16 | +Aida2Root INFO | 'kurtosisErr' | 0.022476876 | 0.022480426 | -3.5499507e-06 | +Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Gaussian V Flat': +TH1.Print Name = Gaussian V Flat, Entries= 50000, Total sum= 25010 +Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Exponential V Flat': +TH1.Print Name = Exponential V Flat, Entries= 50000, Total sum= 24826 +Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/binVpois': +TH1.Print Name = Binom V poisson, Entries= 50000, Total sum= 46180 +Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/expoVpois': +TH1.Print Name = Expo V poisson, Entries= 50000, Total sum= 47146 +Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3D plot AutoID': +TH1.Print Name = 3D plot AutoID, Entries= 50000, Total sum= 46583 +Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3d': +TH1.Print Name = 3D plot ForcedID, Entries= 50000, Total sum= 46583 +Aida2Root INFO The native ROOT printout for 1D-profile 'SimpleHistos/Expo V Gauss 1DProf': +TH1.Print Name = Expo V Gauss 1DProf, Entries= 50000, Total sum= 45.5783 +Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/321': +TH1.Print Name = 2D profile2, Entries= 50000, Total sum= 2739.26 +Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/2dprof': +TH1.Print Name = 2D profile1, Entries= 50000, Total sum= 2739.26 +EventLoopMgr INFO Histograms converted successfully according to request. +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +1DOldStyle INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 +1DForcedNumericID INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 +1DForcedAlphaID INFO Time User : Tot= 30 [ms] Ave/Min/Max= 0.0006(+- 0.0775)/ 0/ 10 [ms] #=49999 +1DAutoID INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.0008(+- 0.0894)/ 0/ 10 [ms] #=49999 +ChronoStatSvc INFO Time User : Tot= 0.92 [s] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref b/GaudiAlg/tests/qmtest/refs/Aida2RootEx.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref rename to GaudiAlg/tests/qmtest/refs/Aida2RootEx.ref diff --git a/GaudiExamples/tests/qmtest/refs/AlgSequencer.ref b/GaudiAlg/tests/qmtest/refs/AlgSequencer.ref similarity index 98% rename from GaudiExamples/tests/qmtest/refs/AlgSequencer.ref rename to GaudiAlg/tests/qmtest/refs/AlgSequencer.ref index 5c0208d83179560584c4b8c5ffbf7c0dd6e3dcac..267b8e35aa399a9f4b260fa595de299a626e0e85 100644 --- a/GaudiExamples/tests/qmtest/refs/AlgSequencer.ref +++ b/GaudiAlg/tests/qmtest/refs/AlgSequencer.ref @@ -9,8 +9,8 @@ JobOptionsSvc INFO # (17,1): ApplicationMgr.EvtMax = 10 JobOptionsSvc INFO # (18,1): ApplicationMgr.EvtSel = "NONE" JobOptionsSvc INFO # (24,1): ApplicationMgr.TopAlg += ["StopperAlg"] JobOptionsSvc INFO # (25,1): StopperAlg.StopCount = 20 -JobOptionsSvc INFO # (30,1): ApplicationMgr.TopAlg += ["Sequencer/TopSequence"] -JobOptionsSvc INFO # (31,1): TopSequence.Members = ["Sequencer/Sequence1", "Sequencer/Sequence2"] +JobOptionsSvc INFO # (30,1): ApplicationMgr.TopAlg += ["Gaudi::Sequencer/TopSequence"] +JobOptionsSvc INFO # (31,1): TopSequence.Members = ["Gaudi::Sequencer/Sequence1", "Gaudi::Sequencer/Sequence2"] JobOptionsSvc INFO # (32,1): TopSequence.StopOverride = 1 JobOptionsSvc INFO # (33,1): Sequence1.Members = ["Prescaler/Prescaler1", "HelloWorld", "EventCounter/Counter1"] JobOptionsSvc INFO # (34,1): Sequence2.Members = ["Prescaler/Prescaler2", "HelloWorld", "EventCounter/Counter2"] @@ -43,7 +43,7 @@ TIMER.TIMER INFO This machine has a speed about 3.82 times the speed ParentAlg INFO creating sub-algorithms.... SubAlg1 INFO initializing.... SubAlg2 INFO initializing.... -TopSequence INFO Member list: Sequencer/Sequence1, Sequencer/Sequence2 +TopSequence INFO Member list: Gaudi::Sequencer/Sequence1, Gaudi::Sequencer/Sequence2 Sequence1 INFO Member list: Prescaler/Prescaler1, HelloWorld, EventCounter/Counter1 HelloWorld DEBUG Property update for OutputLevel : new value = 2 HelloWorld INFO initializing.... diff --git a/GaudiExamples/tests/qmtest/refs/AlgSequencer_pyopts.ref b/GaudiAlg/tests/qmtest/refs/AlgSequencer_pyopts.ref similarity index 99% rename from GaudiExamples/tests/qmtest/refs/AlgSequencer_pyopts.ref rename to GaudiAlg/tests/qmtest/refs/AlgSequencer_pyopts.ref index 9818cea5a095836f844a3daed2dcd62050cb2371..acd78f7805dab5ff3da6635ba9b98708b64b90d9 100644 --- a/GaudiExamples/tests/qmtest/refs/AlgSequencer_pyopts.ref +++ b/GaudiAlg/tests/qmtest/refs/AlgSequencer_pyopts.ref @@ -20,7 +20,7 @@ TIMER.TIMER INFO This machine has a speed about 2.63 times the speed ParentAlg INFO creating sub-algorithms.... SubAlg1 INFO initializing.... SubAlg2 INFO initializing.... -TopSequence INFO Member list: Sequencer/Sequence1, Sequencer/Sequence2 +TopSequence INFO Member list: Gaudi::Sequencer/Sequence1, Gaudi::Sequencer/Sequence2 Sequence1 INFO Member list: Prescaler/Prescaler1, HelloWorld, EventCounter/Counter1 HelloWorld DEBUG Property update for OutputLevel : new value = 2 HelloWorld INFO initializing.... diff --git a/GaudiAlg/tests/qmtest/refs/AlgTools.ref b/GaudiAlg/tests/qmtest/refs/AlgTools.ref new file mode 100644 index 0000000000000000000000000000000000000000..0576b3f9b05c83cc771f3e9138e5dcdd0477f934 --- /dev/null +++ b/GaudiAlg/tests/qmtest/refs/AlgTools.ref @@ -0,0 +1,357 @@ +# setting LC_ALL to "C" +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/AlgTools.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/AlgTools.py' +# applying configuration of GaudiExamplesCommonConf +# /***** User GaudiExamplesCommonConf/GaudiExamplesCommonConf **************************************** +# |-OutputLevel = 3 +# |-DummyEvents = -1 +# \----- (End of User GaudiExamplesCommonConf/GaudiExamplesCommonConf) ------------------------------- +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:55:27 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +MyAlg INFO initializing.... +ToolSvc.MyTool INFO intialize() has been called +ToolSvc.MyTool INFO Int = 100 +ToolSvc.MyTool INFO Double = 100 +ToolSvc.MyTool INFO String = hundred +ToolSvc.MyTool INFO Bool = 1 +MyAlg.MyTool INFO intialize() has been called +MyAlg.MyTool INFO Int = 100 +MyAlg.MyTool INFO Double = 100 +MyAlg.MyTool INFO String = hundred +MyAlg.MyTool INFO Bool = 1 +ToolSvc.MyGaudi... INFO intialize() has been called +ToolSvc.MyGaudi... INFO Int = 201 +ToolSvc.MyGaudi... INFO Double = 2.011e+12 +ToolSvc.MyGaudi... INFO String = two hundred and one +ToolSvc.MyGaudi... INFO Bool = 1 +MyAlg.MyGaudiTool INFO intialize() has been called +MyAlg.MyGaudiTool INFO Int = 101 +MyAlg.MyGaudiTool INFO Double = 1.011e+12 +MyAlg.MyGaudiTool INFO String = hundred one +MyAlg.MyGaudiTool INFO Bool = 0 +MyAlg.ToolWithName INFO intialize() has been called +MyAlg.ToolWithName INFO Int = 10 +MyAlg.ToolWithName INFO Double = 20 +MyAlg.ToolWithName INFO String = abc +MyAlg.ToolWithName INFO Bool = 0 +MyAlg INFO /Event/Rec/Tracks +MyAlg INFO /Event/Rec/Hits +MyAlg INFO /Rec/RAW +MyAlg INFO /Event/MyAnalysis/Tracks +MyAlg.WrongIfac... INFO intialize() has been called +MyAlg.WrongIfac... INFO Int = 100 +MyAlg.WrongIfac... INFO Double = 100 +MyAlg.WrongIfac... INFO String = hundred +MyAlg.WrongIfac... INFO Bool = 1 +MyAlg INFO unable to retrieve MyTool/WrongIfaceTool (expected) with exception: unable to dcast AlgTool MyTool/WrongIfaceTool to interface IWrongTool +MyAlg INFO ....initialization done +ToolSvc.Another... INFO intialize() has been called +ToolSvc.Another... INFO Int = 100 +ToolSvc.Another... INFO Double = 100 +ToolSvc.Another... INFO String = hundred +ToolSvc.Another... INFO Bool = 1 +ToolSvc.Another... INFO intialize() has been called +ToolSvc.Another... INFO Int = 100 +ToolSvc.Another... INFO Double = 100 +ToolSvc.Another... INFO String = hundred +ToolSvc.Another... INFO Bool = 1 +MyAlg.PrivToolH... INFO intialize() has been called +MyAlg.PrivToolH... INFO Int = 100 +MyAlg.PrivToolH... INFO Double = 100 +MyAlg.PrivToolH... INFO String = Is a private tool +MyAlg.PrivToolH... INFO Bool = 1 +ToolSvc.TestPub... INFO intialize() has been called +ToolSvc.TestPub... INFO Int = 100 +ToolSvc.TestPub... INFO Double = 100 +ToolSvc.TestPub... INFO String = Is a public tool +ToolSvc.TestPub... INFO Bool = 1 +ToolSvc.Generic... INFO intialize() has been called +ToolSvc.Generic... INFO Int = 100 +ToolSvc.Generic... INFO Double = 100 +ToolSvc.Generic... INFO String = hundred +ToolSvc.Generic... INFO Bool = 1 +MyAlg.LegacyToo... INFO intialize() has been called +MyAlg.LegacyToo... INFO Int = 100 +MyAlg.LegacyToo... INFO Double = 100 +MyAlg.LegacyToo... INFO String = hundred +MyAlg.LegacyToo... INFO Bool = 1 +ToolSvc.ToolA DEBUG Property update for OutputLevel : new value = 2 +ToolSvc.ToolA DEBUG Initialize +ToolSvc.ToolA DEBUG Loading tool ToolB of type TestTool +ToolSvc.ToolB DEBUG Property update for OutputLevel : new value = 2 +ToolSvc.ToolB DEBUG Initialize +ToolSvc.ToolB DEBUG Loading tool ToolA of type TestTool +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +ToolSvc.ConstGe... INFO intialize() has been called +ToolSvc.ConstGe... INFO Int = 100 +ToolSvc.ConstGe... INFO Double = 100 +ToolSvc.ConstGe... INFO String = hundred +ToolSvc.ConstGe... INFO Bool = 1 +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO intialize() has been called +ToolSvc.PubTool... INFO Int = 100 +ToolSvc.PubTool... INFO Double = 100 +ToolSvc.PubTool... INFO String = hundred +ToolSvc.PubTool... INFO Bool = 1 +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: public tool called by [MyAlg] +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.TestPub... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by [MyAlg]' +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO executing.... +MyAlg INFO tools created with tool<T>... +ToolSvc.MyTool INFO doIt() has been called +MyAlg.MyTool INFO doIt() has been called +ToolSvc.MyGaudi... INFO doIt() has been called +ToolSvc.MyGaudi... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by [MyAlg]' +MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.ToolWithName INFO doIt() has been called +MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.TestPub... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +ToolSvc.TestPub... INFO doIt() has been called +MyAlg.PrivToolH... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +ApplicationMgr INFO Application Manager Stopped successfully +MyAlg INFO finalizing.... +EventLoopMgr INFO Histograms converted successfully according to request. +ToolSvc INFO Removing all tools created by ToolSvc +MyAlg.ToolWithName INFO finalize() has been called +MyAlg.MyGaudiTool INFO finalize() has been called +ToolSvc.MyGaudi... INFO finalize() has been called +MyAlg.MyTool INFO finalize() has been called +ToolSvc.MyTool INFO finalize() has been called +ToolSvc.ToolB DEBUG Finalize +MyAlg.LegacyToo... INFO finalize() has been called +ToolSvc.Generic... INFO finalize() has been called +ToolSvc.Another... INFO finalize() has been called +ToolSvc.Another... INFO finalize() has been called +MyAlg.WrongIfac... INFO finalize() has been called +ToolSvc.PubTool... INFO finalize() has been called +ToolSvc.ToolA DEBUG Finalize +ToolSvc.TestPub... INFO finalize() has been called +MyAlg.PrivToolH... INFO finalize() has been called +ToolSvc.ConstGe... INFO finalize() has been called +MyAlg.ToolWithName INFO destructor has been called +MyAlg.MyGaudiTool INFO destructor has been called +ToolSvc.MyGaudi... INFO destructor has been called +MyAlg.MyTool INFO destructor has been called +ToolSvc.MyTool INFO destructor has been called +MyAlg.LegacyToo... INFO destructor has been called +ToolSvc.Generic... INFO destructor has been called +ToolSvc.Another... INFO destructor has been called +ToolSvc.Another... INFO destructor has been called +MyAlg.WrongIfac... INFO destructor has been called +ToolSvc.PubTool... INFO destructor has been called +ToolSvc.TestPub... INFO destructor has been called +MyAlg.PrivToolH... INFO destructor has been called +ToolSvc.ConstGe... INFO destructor has been called +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Counter.ref b/GaudiAlg/tests/qmtest/refs/Counter.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/Counter.ref rename to GaudiAlg/tests/qmtest/refs/Counter.ref diff --git a/GaudiExamples/tests/qmtest/refs/EvtColRead.pyref b/GaudiAlg/tests/qmtest/refs/EvtColRead.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/EvtColRead.pyref rename to GaudiAlg/tests/qmtest/refs/EvtColRead.pyref diff --git a/GaudiExamples/tests/qmtest/refs/EvtColWrite.pyref b/GaudiAlg/tests/qmtest/refs/EvtColWrite.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/EvtColWrite.pyref rename to GaudiAlg/tests/qmtest/refs/EvtColWrite.pyref diff --git a/GaudiExamples/tests/qmtest/refs/EvtColsEx/Prepare.ref b/GaudiAlg/tests/qmtest/refs/EvtColsEx/Prepare.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/EvtColsEx/Prepare.ref rename to GaudiAlg/tests/qmtest/refs/EvtColsEx/Prepare.ref diff --git a/GaudiExamples/tests/qmtest/refs/EvtColsEx/Read.ref b/GaudiAlg/tests/qmtest/refs/EvtColsEx/Read.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/EvtColsEx/Read.ref rename to GaudiAlg/tests/qmtest/refs/EvtColsEx/Read.ref diff --git a/GaudiExamples/tests/qmtest/refs/EvtColsEx/Write.ref b/GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/EvtColsEx/Write.ref rename to GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref diff --git a/GaudiExamples/tests/qmtest/refs/GaudiCommonTests.ref b/GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/GaudiCommonTests.ref rename to GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref.armv8_a b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref.armv8_a similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref.armv8_a rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref.armv8_a diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref.i686 b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref.i686 similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref.i686 rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref.i686 diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref.skylake_avx512-opt b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref.skylake_avx512-opt similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref.skylake_avx512-opt rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref.skylake_avx512-opt diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref.slc4_ia32 b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref.slc4_ia32 similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref.slc4_ia32 rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref.slc4_ia32 diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx.pyref.x86_64+avx2+fma-opt b/GaudiAlg/tests/qmtest/refs/HistoEx.pyref.x86_64+avx2+fma-opt similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx.pyref.x86_64+avx2+fma-opt rename to GaudiAlg/tests/qmtest/refs/HistoEx.pyref.x86_64+avx2+fma-opt diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx1.pyref b/GaudiAlg/tests/qmtest/refs/HistoEx1.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx1.pyref rename to GaudiAlg/tests/qmtest/refs/HistoEx1.pyref diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx2.pyref b/GaudiAlg/tests/qmtest/refs/HistoEx2.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx2.pyref rename to GaudiAlg/tests/qmtest/refs/HistoEx2.pyref diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.armv8_a b/GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.armv8_a similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.armv8_a rename to GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.armv8_a diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.skylake_avx512-opt b/GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.skylake_avx512-opt similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.skylake_avx512-opt rename to GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.skylake_avx512-opt diff --git a/GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.x86_64+avx2+fma-opt b/GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.x86_64+avx2+fma-opt similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoEx2.pyref.x86_64+avx2+fma-opt rename to GaudiAlg/tests/qmtest/refs/HistoEx2.pyref.x86_64+avx2+fma-opt diff --git a/GaudiExamples/tests/qmtest/refs/HistoUtilsEx.ref b/GaudiAlg/tests/qmtest/refs/HistoUtilsEx.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/HistoUtilsEx.ref rename to GaudiAlg/tests/qmtest/refs/HistoUtilsEx.ref diff --git a/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref b/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref new file mode 100644 index 0000000000000000000000000000000000000000..bf7330423216691d3f90ea88703322fa9b984fa7 --- /dev/null +++ b/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref @@ -0,0 +1,197 @@ +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Histograms.opts +JobOptionsSvc INFO # (5,1): AuditorSvc.Auditors = ["ChronoAuditor"] +JobOptionsSvc INFO # (9,1): MessageSvc.OutputLevel = 3 +JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["GaudiHistoAlgorithm/SimpleHistos"] +JobOptionsSvc INFO # (21,1): SimpleHistos.HistoPrint = 1 +JobOptionsSvc INFO # (22,1): SimpleHistos.OutputLevel = 2 +JobOptionsSvc INFO # (28,1): ApplicationMgr.EvtMax = 50000 +JobOptionsSvc INFO # (29,1): ApplicationMgr.EvtSel = "NONE" +JobOptionsSvc INFO # (34,1): ApplicationMgr.HistogramPersistency = "ROOT" +JobOptionsSvc INFO # (35,1): ApplicationMgr.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] +JobOptionsSvc INFO # (36,1): RootHistSvc.OutputFile = "histo-opts.root" +JobOptionsSvc INFO # (42,1): HistogramDataSvc.OutputLevel = 2 +JobOptionsSvc INFO Job options successfully read in from /home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Histograms.opts +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:13:06 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +SimpleHistos DEBUG Property update for OutputLevel : new value = 2 +SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> +SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made +SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 +SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } +SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False +SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' +SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' +SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True +SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 +SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True +SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] +SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' +SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' +SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True +SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False +SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 +SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' +SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 +SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True +SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 +HistogramDataSvc DEBUG Service base class initialized successfully +RootHistSvc INFO Writing ROOT histograms to: histo-opts.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc +SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' +SimpleHistos DEBUG input handles: 0 +SimpleHistos DEBUG output handles: 0 +SimpleHistos DEBUG Data Deps for SimpleHistos +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine +RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 +RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> +SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' +SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' +SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' +SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' +SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' +SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' +SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' +SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' +SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' +SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' +SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' +SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' +SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' +SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' +SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' +SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' +SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' +SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' +SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' +SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! +ApplicationMgr INFO Application Manager Stopped successfully +SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 +SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | 101 | "Exponential" | 50000 | 0.97244 | 0.91365 | 1.4781 | 2.1471 | + | 102 | "Breit" | 50000 | -0.0047661 | 1.1982 | -0.00237 | 3.5536 | + | 1111 | "Forced Numeric ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | AutoID time test | "AutoID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | poisson | "Poisson" | 50000 | 1.8072 | 1.1794 | 0.33256 | -0.76904 | + | subdir1/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | subdir2/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | test1 | "Forced Alpha ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | varBinning/x | "1D Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0.010336 | -1.3177 | +SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 + ID=Exponential V Flat "Exponential V Flat" Ents/All=49827/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=0.96736/0.90536 + ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 + ID=binVpois "Binom V poisson" Ents/All=49936/50000<X>/sX=1.8068/1.1798,<Y>/sY=1.9088/1.1168 + ID=expoVpois "Expo V poisson" Ents/All=49987/50000<X>/sX=1.8075/1.1796,<Y>/sY=0.97291/0.91449 + ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 + ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=-0.0045774/1.0038,<Z>/sZ=0.96736/0.90536 +SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0 | -3 | +SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 + ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos DEBUG Finalize base class GaudiAlgorithm +SimpleHistos DEBUG Tools to release : +SimpleHistos DEBUG Services to release : +EventLoopMgr INFO Histograms converted successfully according to request. +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +1DOldStyle INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 +1DForcedNumericID INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 +1DAutoID INFO Time User : Tot= 30 [ms] Ave/Min/Max= 0.0006(+- 0.0775)/ 0/ 10 [ms] #=49999 +1DForcedAlphaID INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.0008(+- 0.0894)/ 0/ 10 [ms] #=49999 +ChronoStatSvc INFO Time User : Tot= 0.91 [s] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiAlg/tests/qmtest/refs/Histograms_py.ref b/GaudiAlg/tests/qmtest/refs/Histograms_py.ref new file mode 100644 index 0000000000000000000000000000000000000000..a6b39986184be5651dceb80af0020efb95363ebc --- /dev/null +++ b/GaudiAlg/tests/qmtest/refs/Histograms_py.ref @@ -0,0 +1,187 @@ +# setting LC_ALL to "C" +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Histograms.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/Histograms.py' +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:13:07 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +Gaudi::Histogra... INFO Writing ROOT histograms to: testHisto.root +SimpleHistos DEBUG Property update for OutputLevel : new value = 2 +SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> +SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made +SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 +SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } +SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False +SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' +SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' +SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True +SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 +SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True +SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] +SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' +SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' +SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True +SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False +SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 +SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' +SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 +SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True +SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +RootHistSvc INFO Writing ROOT histograms to: histo.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc +SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' +SimpleHistos DEBUG input handles: 0 +SimpleHistos DEBUG output handles: 0 +SimpleHistos DEBUG Data Deps for SimpleHistos +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine +RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 +RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> +SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' +SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' +SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' +SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' +SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' +SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' +SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' +SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' +SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' +SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' +SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' +SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' +SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' +SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' +SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' +SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' +SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' +SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' +SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' +SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! +Gaudi::Histogra... INFO Completed update of ROOT histograms in: testHisto.root +ApplicationMgr INFO Application Manager Stopped successfully +SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 +SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | 101 | "Exponential" | 50000 | 0.97244 | 0.91365 | 1.4781 | 2.1471 | + | 102 | "Breit" | 50000 | -0.0047661 | 1.1982 | -0.00237 | 3.5536 | + | 1111 | "Forced Numeric ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | AutoID time test | "AutoID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | poisson | "Poisson" | 50000 | 1.8072 | 1.1794 | 0.33256 | -0.76904 | + | subdir1/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | subdir2/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | test1 | "Forced Alpha ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | varBinning/x | "1D Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0.010336 | -1.3177 | +SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 + ID=Exponential V Flat "Exponential V Flat" Ents/All=49827/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=0.96736/0.90536 + ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 + ID=binVpois "Binom V poisson" Ents/All=49936/50000<X>/sX=1.8068/1.1798,<Y>/sY=1.9088/1.1168 + ID=expoVpois "Expo V poisson" Ents/All=49987/50000<X>/sX=1.8075/1.1796,<Y>/sY=0.97291/0.91449 + ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 + ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=-0.0045774/1.0038,<Z>/sZ=0.96736/0.90536 +SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0 | -3 | +SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 + ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos DEBUG Finalize base class GaudiAlgorithm +SimpleHistos DEBUG Tools to release : +SimpleHistos DEBUG Services to release : +EventLoopMgr INFO Histograms converted successfully according to request. +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +1DForcedNumericID INFO Time User : Tot= 10 [ms] Ave/Min/Max= 0.0002(+- 0.0447)/ 0/ 10 [ms] #=49999 +1DAutoID INFO Time User : Tot= 10 [ms] Ave/Min/Max= 0.0002(+- 0.0447)/ 0/ 10 [ms] #=49999 +1DOldStyle INFO Time User : Tot= 30 [ms] Ave/Min/Max= 0.0006(+- 0.0775)/ 0/ 10 [ms] #=49999 +1DForcedAlphaID INFO Time User : Tot= 50 [ms] Ave/Min/Max= 0.001(+- 0.1)/ 0/ 10 [ms] #=49999 +ChronoStatSvc INFO Time User : Tot= 0.94 [s] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Mix.ref b/GaudiAlg/tests/qmtest/refs/Mix.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/Mix.ref rename to GaudiAlg/tests/qmtest/refs/Mix.ref diff --git a/GaudiExamples/tests/qmtest/refs/Selections.ref b/GaudiAlg/tests/qmtest/refs/Selections.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/Selections.ref rename to GaudiAlg/tests/qmtest/refs/Selections.ref diff --git a/GaudiExamples/tests/qmtest/refs/TimingHistograms.ref b/GaudiAlg/tests/qmtest/refs/TimingHistograms.ref similarity index 99% rename from GaudiExamples/tests/qmtest/refs/TimingHistograms.ref rename to GaudiAlg/tests/qmtest/refs/TimingHistograms.ref index 79ae75b211f5694b487d7421f8f55e48c9cf1c5c..97d904f086cf4854c4c69dad57638a657196b580 100644 --- a/GaudiExamples/tests/qmtest/refs/TimingHistograms.ref +++ b/GaudiAlg/tests/qmtest/refs/TimingHistograms.ref @@ -24,7 +24,7 @@ TIMER.TIMER INFO This machine has a speed about 3.03 times the speed ParentAlg INFO creating sub-algorithms.... SubAlg1 INFO initializing.... SubAlg2 INFO initializing.... -TopSequence INFO Member list: Sequencer/Sequence1, Sequencer/Sequence2 +TopSequence INFO Member list: Gaudi::Sequencer/Sequence1, Gaudi::Sequencer/Sequence2 Sequence1 INFO Member list: Prescaler/Prescaler1, HelloWorld, EventCounter/Counter1 HelloWorld DEBUG Property update for OutputLevel : new value = 2 HelloWorld INFO initializing.... diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx.pyref b/GaudiAlg/tests/qmtest/refs/TupleEx.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/TupleEx.pyref rename to GaudiAlg/tests/qmtest/refs/TupleEx.pyref diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx.ref b/GaudiAlg/tests/qmtest/refs/TupleEx.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/TupleEx.ref rename to GaudiAlg/tests/qmtest/refs/TupleEx.ref diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx1.pyref b/GaudiAlg/tests/qmtest/refs/TupleEx1.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/TupleEx1.pyref rename to GaudiAlg/tests/qmtest/refs/TupleEx1.pyref diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx2.pyref b/GaudiAlg/tests/qmtest/refs/TupleEx2.pyref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/TupleEx2.pyref rename to GaudiAlg/tests/qmtest/refs/TupleEx2.pyref diff --git a/GaudiExamples/tests/qmtest/refs/TupleExPyOpts.ref b/GaudiAlg/tests/qmtest/refs/TupleExPyOpts.ref similarity index 100% rename from GaudiExamples/tests/qmtest/refs/TupleExPyOpts.ref rename to GaudiAlg/tests/qmtest/refs/TupleExPyOpts.ref diff --git a/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref b/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref new file mode 100644 index 0000000000000000000000000000000000000000..3ef853ccf2e5356101f28871793c775fe73b120e --- /dev/null +++ b/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref @@ -0,0 +1,187 @@ +# setting LC_ALL to "C" +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/gaudiconfig2/Histograms_with_global.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiAlg/tests/qmtest/options/gaudiconfig2/Histograms_with_global.py' +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:13:07 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +SimpleHistos DEBUG Property update for OutputLevel : new value = 2 +SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> +SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made +SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 +SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } +SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False +SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' +SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' +SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True +SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' +SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 +SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True +SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] +SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' +SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True +SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' +SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True +SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False +SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] +SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 +SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True +SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' +SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False +SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False +SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 +SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True +SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] +SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 +HistogramDataSvc DEBUG Service base class initialized successfully +RootHistSvc INFO Writing ROOT histograms to: histo-c2g.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc +SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' +SimpleHistos DEBUG input handles: 0 +SimpleHistos DEBUG output handles: 0 +SimpleHistos DEBUG Data Deps for SimpleHistos +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine +RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 +RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> +SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' +SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' +SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' +SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' +SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' +SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' +SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' +SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' +SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' +SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' +SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' +SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' +SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' +SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' +SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' +SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' +SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' +SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' +SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' +SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' +SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' +SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' +SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' +SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' +SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' +SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' +SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' +SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' +SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' +SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' +SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' +SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! +ApplicationMgr INFO Application Manager Stopped successfully +SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 +SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | 101 | "Exponential" | 50000 | 0.97244 | 0.91365 | 1.4781 | 2.1471 | + | 102 | "Breit" | 50000 | -0.0047661 | 1.1982 | -0.00237 | 3.5536 | + | 1111 | "Forced Numeric ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | AutoID time test | "AutoID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | poisson | "Poisson" | 50000 | 1.8072 | 1.1794 | 0.33256 | -0.76904 | + | subdir1/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | subdir2/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | + | test1 | "Forced Alpha ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | + | varBinning/x | "1D Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0.010336 | -1.3177 | +SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 + ID=Exponential V Flat "Exponential V Flat" Ents/All=49827/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=0.96736/0.90536 + ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 + ID=binVpois "Binom V poisson" Ents/All=49936/50000<X>/sX=1.8068/1.1798,<Y>/sY=1.9088/1.1168 + ID=expoVpois "Expo V poisson" Ents/All=49987/50000<X>/sX=1.8075/1.1796,<Y>/sY=0.97291/0.91449 + ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 + ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 + ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=-0.0045774/1.0038,<Z>/sZ=0.96736/0.90536 +SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 + | ID | Title | # | Mean | RMS | Skewness | Kurtosis | + | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | + | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25239 | -0.030533 | 5.7699 | 0 | -3 | + | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0 | -3 | +SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 + ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 + ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 +SimpleHistos DEBUG Finalize base class GaudiAlgorithm +SimpleHistos DEBUG Tools to release : +SimpleHistos DEBUG Services to release : +EventLoopMgr INFO Histograms converted successfully according to request. +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +1DOldStyle INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 +1DForcedNumericID INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.0008(+- 0.0894)/ 0/ 10 [ms] #=49999 +1DForcedAlphaID INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.0008(+- 0.0894)/ 0/ 10 [ms] #=49999 +1DAutoID INFO Time User : Tot= 50 [ms] Ave/Min/Max= 0.001(+- 0.1)/ 0/ 10 [ms] #=49999 +ChronoStatSvc INFO Time User : Tot= 0.88 [s] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/scripts/Aida2RootEx.py b/GaudiAlg/tests/qmtest/scripts/Aida2RootEx.py similarity index 99% rename from GaudiExamples/scripts/Aida2RootEx.py rename to GaudiAlg/tests/qmtest/scripts/Aida2RootEx.py index 9a25bf7de04094a30261995e5ff8d029b17e44a1..e25617d1655826c81d2df012869f0e6d3473945a 100755 --- a/GaudiExamples/scripts/Aida2RootEx.py +++ b/GaudiAlg/tests/qmtest/scripts/Aida2RootEx.py @@ -31,7 +31,7 @@ if "-b" in sys.argv: # Force batch mode ROOT.gROOT.SetBatch(True) -from GaudiPython.GaudiAlgs import SUCCESS, HistoAlgo, aida2root +from GaudiAlg.Algs import SUCCESS, HistoAlgo, aida2root # list of booked histograms paths = ( diff --git a/GaudiExamples/scripts/Counter.py b/GaudiAlg/tests/qmtest/scripts/Counter.py similarity index 99% rename from GaudiExamples/scripts/Counter.py rename to GaudiAlg/tests/qmtest/scripts/Counter.py index ab979b85e2bd0ab0e7c0c413e1f30e72a357cbbe..7d98ef8ef38f23b1cfe719c2bc0f73b0dd999c4b 100755 --- a/GaudiExamples/scripts/Counter.py +++ b/GaudiAlg/tests/qmtest/scripts/Counter.py @@ -31,7 +31,7 @@ import six __author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" # ============================================================================= -from GaudiPython.GaudiAlgs import GaudiAlgo +from GaudiAlg.Algs import GaudiAlgo import GaudiPython diff --git a/GaudiExamples/scripts/EvtColRead.py b/GaudiAlg/tests/qmtest/scripts/EvtColRead.py similarity index 100% rename from GaudiExamples/scripts/EvtColRead.py rename to GaudiAlg/tests/qmtest/scripts/EvtColRead.py diff --git a/GaudiExamples/scripts/EvtColWrite.py b/GaudiAlg/tests/qmtest/scripts/EvtColWrite.py similarity index 99% rename from GaudiExamples/scripts/EvtColWrite.py rename to GaudiAlg/tests/qmtest/scripts/EvtColWrite.py index 1ad240cab252e3ce3c543df20a6442f55b4c0c7c..eddc6368417d2e7c1a29091cf360bd4e5679a61c 100755 --- a/GaudiExamples/scripts/EvtColWrite.py +++ b/GaudiAlg/tests/qmtest/scripts/EvtColWrite.py @@ -28,7 +28,7 @@ Rndm = GaudiPython.gbl.Rndm Numbers = Rndm.Numbers SUCCESS = GaudiPython.SUCCESS -from GaudiPython.GaudiAlgs import TupleAlgo +from GaudiAlg.Algs import TupleAlgo # ============================================================================= # Simple algorithm which book&fill 3 histograms diff --git a/GaudiExamples/scripts/HistoDumpEx.py b/GaudiAlg/tests/qmtest/scripts/HistoDumpEx.py similarity index 100% rename from GaudiExamples/scripts/HistoDumpEx.py rename to GaudiAlg/tests/qmtest/scripts/HistoDumpEx.py diff --git a/GaudiExamples/scripts/HistoEx.py b/GaudiAlg/tests/qmtest/scripts/HistoEx.py similarity index 98% rename from GaudiExamples/scripts/HistoEx.py rename to GaudiAlg/tests/qmtest/scripts/HistoEx.py index 7db7f11be0c99d75ea899d7e47f91ee9fb73a891..16e24100412c42c798f7c4e47bc62e77aad61cf2 100755 --- a/GaudiExamples/scripts/HistoEx.py +++ b/GaudiAlg/tests/qmtest/scripts/HistoEx.py @@ -22,7 +22,7 @@ __author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" # ============================================================================= -from GaudiPython.GaudiAlgs import SUCCESS, HistoAlgo +from GaudiAlg.Algs import SUCCESS, HistoAlgo # ============================================================================= # Simple algorithm which book&fill 3 histograms diff --git a/GaudiExamples/scripts/HistoEx1.py b/GaudiAlg/tests/qmtest/scripts/HistoEx1.py similarity index 98% rename from GaudiExamples/scripts/HistoEx1.py rename to GaudiAlg/tests/qmtest/scripts/HistoEx1.py index 34774872fdfc8e7e9fc7260828680173906dcbf7..d87e8c3a76b32447bb41ed0618dd288ff0c0b39c 100755 --- a/GaudiExamples/scripts/HistoEx1.py +++ b/GaudiAlg/tests/qmtest/scripts/HistoEx1.py @@ -24,7 +24,7 @@ __author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" # ============================================================================= -from GaudiPython.GaudiAlgs import SUCCESS, HistoAlgo +from GaudiAlg.Algs import SUCCESS, HistoAlgo # ============================================================================= # Simple algorithm which book&fill 3 histograms diff --git a/GaudiExamples/scripts/HistoEx2.py b/GaudiAlg/tests/qmtest/scripts/HistoEx2.py similarity index 98% rename from GaudiExamples/scripts/HistoEx2.py rename to GaudiAlg/tests/qmtest/scripts/HistoEx2.py index 019793c5ce418078b56f001c441db16c724237db..f8653df177dabfbc158a531bee86b14b57eba1d4 100755 --- a/GaudiExamples/scripts/HistoEx2.py +++ b/GaudiAlg/tests/qmtest/scripts/HistoEx2.py @@ -24,8 +24,8 @@ __author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" # ============================================================================= +from GaudiAlg.Algs import SUCCESS, HistoAlgo from GaudiPython.Bindings import gbl as cpp -from GaudiPython.GaudiAlgs import SUCCESS, HistoAlgo Rndm = cpp.Rndm diff --git a/GaudiExamples/scripts/HistoUtilsEx.py b/GaudiAlg/tests/qmtest/scripts/HistoUtilsEx.py similarity index 100% rename from GaudiExamples/scripts/HistoUtilsEx.py rename to GaudiAlg/tests/qmtest/scripts/HistoUtilsEx.py diff --git a/GaudiExamples/scripts/Mix.py b/GaudiAlg/tests/qmtest/scripts/Mix.py similarity index 90% rename from GaudiExamples/scripts/Mix.py rename to GaudiAlg/tests/qmtest/scripts/Mix.py index 93bdfca3b15f03ef5051a86f2c465386f9db8fa0..5afdd19bbed2896b4a76d3c0b42b29f7daae8623 100755 --- a/GaudiExamples/scripts/Mix.py +++ b/GaudiAlg/tests/qmtest/scripts/Mix.py @@ -25,10 +25,10 @@ __date__ = "2010-04-24" # ============================================================================= import sys -from Configurables import GaudiSequencer, HelloWorld -from Gaudi.Configuration import ApplicationMgr, importOptions +from Configurables import AuditorSvc, GaudiSequencer, HelloWorld +from Gaudi.Configuration import ApplicationMgr +from GaudiAlg.Algs import SUCCESS, GaudiAlgo from GaudiPython.Bindings import AppMgr -from GaudiPython.GaudiAlgs import SUCCESS, GaudiAlgo # ============================================================================= # @class SimpleAlgo @@ -52,7 +52,7 @@ class SimpleAlgo(GaudiAlgo): def configure(): - importOptions("Common.opts") + AuditorSvc(Auditors=["ChronoAuditor"]) ApplicationMgr( TopAlg=[ @@ -112,7 +112,3 @@ if "__main__" == __name__: seq.Members += [myAlg3.name()] gaudi.run(3) - -# ============================================================================= -# The END -# ============================================================================= diff --git a/GaudiExamples/scripts/TupleEx.py b/GaudiAlg/tests/qmtest/scripts/TupleEx.py similarity index 98% rename from GaudiExamples/scripts/TupleEx.py rename to GaudiAlg/tests/qmtest/scripts/TupleEx.py index f7b121a496fc34dc6c5b77ac5a819a8b5a60b2d3..b2042e01ec96d05f2cb65943085d78834117b365 100755 --- a/GaudiExamples/scripts/TupleEx.py +++ b/GaudiAlg/tests/qmtest/scripts/TupleEx.py @@ -38,7 +38,7 @@ from GaudiPython.Bindings import gbl as cpp Rndm = cpp.Rndm -from GaudiPython.GaudiAlgs import SUCCESS, TupleAlgo +from GaudiAlg.Algs import SUCCESS, TupleAlgo # ============================================================================= # @class TupleEx diff --git a/GaudiExamples/scripts/TupleEx1.py b/GaudiAlg/tests/qmtest/scripts/TupleEx1.py similarity index 99% rename from GaudiExamples/scripts/TupleEx1.py rename to GaudiAlg/tests/qmtest/scripts/TupleEx1.py index d3fa28b98767b39cce39e8aa289b2acc8e1e78a7..b571ba648a72c2c0df0f01a400ea25a3a95802ac 100755 --- a/GaudiExamples/scripts/TupleEx1.py +++ b/GaudiAlg/tests/qmtest/scripts/TupleEx1.py @@ -38,7 +38,7 @@ SUCCESS = GaudiPython.SUCCESS Rndm = GaudiPython.gbl.Rndm Numbers = Rndm.Numbers -from GaudiPython.GaudiAlgs import TupleAlgo +from GaudiAlg.Algs import TupleAlgo # ============================================================================= # Primitive function which transform arbitrary sequence into diff --git a/GaudiExamples/scripts/TupleEx2.py b/GaudiAlg/tests/qmtest/scripts/TupleEx2.py similarity index 99% rename from GaudiExamples/scripts/TupleEx2.py rename to GaudiAlg/tests/qmtest/scripts/TupleEx2.py index 33bac67c677e945fdea3a145738aa10c87d0e26a..0a19166b5f6e805601534d949eb45ee052c08be1 100755 --- a/GaudiExamples/scripts/TupleEx2.py +++ b/GaudiAlg/tests/qmtest/scripts/TupleEx2.py @@ -36,7 +36,7 @@ Rndm = GaudiPython.gbl.Rndm Math = GaudiPython.gbl.ROOT.Math SUCCESS = GaudiPython.SUCCESS -from GaudiPython.GaudiAlgs import TupleAlgo +from GaudiAlg.Algs import TupleAlgo # ============================================================================= # @class TupleEx2 diff --git a/GaudiExamples/scripts/bug_38882.py b/GaudiAlg/tests/qmtest/scripts/bug_38882.py similarity index 95% rename from GaudiExamples/scripts/bug_38882.py rename to GaudiAlg/tests/qmtest/scripts/bug_38882.py index 9a97f0ddef89c75e334bf27ffe434e5d2f9e2e00..860d7cd56baa2ddebe5d315ebac181c85b901597 100755 --- a/GaudiExamples/scripts/bug_38882.py +++ b/GaudiAlg/tests/qmtest/scripts/bug_38882.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -17,7 +17,7 @@ from __future__ import print_function __author__ = "Marco Clemencic" # ============================================================================= -from GaudiPython.GaudiAlgs import GaudiAlgo +from GaudiAlg.Algs import GaudiAlgo import GaudiPython diff --git a/GaudiExamples/tests/scripts/test_timing_histo_file.py b/GaudiAlg/tests/qmtest/scripts/test_timing_histo_file.py similarity index 100% rename from GaudiExamples/tests/scripts/test_timing_histo_file.py rename to GaudiAlg/tests/qmtest/scripts/test_timing_histo_file.py diff --git a/GaudiAud/CMakeLists.txt b/GaudiAud/CMakeLists.txt index 64b77575ebc5af1f8392666d063e679a72e48031..47aa37ac49f9414941b6acfa8caf689226615430 100644 --- a/GaudiAud/CMakeLists.txt +++ b/GaudiAud/CMakeLists.txt @@ -13,6 +13,7 @@ # Build the plugin gaudi_add_module(GaudiAud SOURCES src/AlgContextAuditor.cpp + src/AlgTimingAuditor.cpp src/ChronoAuditor.cpp src/CommonAuditor.cpp src/MemoryAuditor.cpp diff --git a/GaudiAud/src/AlgTimingAuditor.cpp b/GaudiAud/src/AlgTimingAuditor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3ef1e10e4761ff829631b0e4fcce65fd0e1d651a --- /dev/null +++ b/GaudiAud/src/AlgTimingAuditor.cpp @@ -0,0 +1,150 @@ +/***********************************************************************************\ +* (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#include <GaudiKernel/Auditor.h> +#include <GaudiKernel/IIncidentListener.h> +#include <GaudiKernel/IIncidentSvc.h> +#include <GaudiKernel/SmartIF.h> +#include <chrono> +#include <fmt/format.h> +#include <string> +#include <type_traits> +#include <unordered_map> +#include <vector> + +struct AlgTimingAuditor final : extends<Auditor, IIncidentListener> { + using base_class::base_class; + + using Auditor::after; + using Auditor::before; + + StatusCode initialize() override { + return base_class::initialize().andThen( [&]() { + m_incSvc = service( "IncidentSvc" ); + if ( m_incSvc ) { + m_incSvc->addListener( this, IncidentType::BeginEvent ); + m_incSvc->addListener( this, IncidentType::EndEvent ); + ++m_currentDepth; + } else { + debug() << "no IncidentSvc, I cannot measure overall event processing time" << endmsg; + } + } ); + } + + void before( StandardEventType evt, INamedInterface* alg ) override { + if ( !alg ) return; + switch ( evt ) { + case Initialize: + stats( alg ); // this implicitly adds the algorithm to the list of known ones + ++m_currentDepth; + break; + + case Execute: + stats( alg ).start(); + break; + + default: + break; + } + } + + void after( StandardEventType evt, INamedInterface* alg, const StatusCode& ) override { + if ( !alg ) return; + switch ( evt ) { + case Initialize: + --m_currentDepth; + break; + + case Execute: + stats( alg ).stop(); + break; + + default: + break; + } + } + + void handle( const Incident& i ) override { + if ( IncidentType::BeginEvent == i.type() ) { + m_eventLoopStats.start(); + } else if ( IncidentType::EndEvent == i.type() ) { + m_eventLoopStats.stop(); + } + } + + StatusCode finalize() override { + using ms = std::chrono::duration<float, std::milli>; + using s = std::chrono::duration<float>; + info() << "-------------------------------------------------------------------" << endmsg; + info() << "Algorithm | exec (ms) | count | total (s)" << endmsg; + info() << "-------------------------------------------------------------------" << endmsg; + if ( m_incSvc ) { + const auto count = m_eventLoopStats.count; + const auto total_time = m_eventLoopStats.total_time; + info() << fmt::format( "{:<30.30} | {:9.4} | {:9} | {:9.4}", "EVENT LOOP", + count ? ms( total_time ).count() / count : 0., count, s( total_time ).count() ) + << endmsg; + } + std::vector<std::pair<std::string, std::size_t>> offsets{ begin( m_offsets ), end( m_offsets ) }; + std::sort( begin( offsets ), end( offsets ), []( auto& a, auto& b ) { return a.second < b.second; } ); + for ( const auto& [name, offset] : offsets ) { + std::string indented_name = std::string( m_depths[offset], ' ' ) + name; + const auto count = m_stats[offset].count; + const auto total_time = m_stats[offset].total_time; + info() << fmt::format( "{:<30.30} | {:9.4} | {:9} | {:9.4}", indented_name, + count ? ms( total_time ).count() / count : 0., count, s( total_time ).count() ) + << endmsg; + } + info() << "-------------------------------------------------------------------" << endmsg; + + if ( m_incSvc ) { + m_incSvc->removeListener( this, IncidentType::BeginEvent ); + m_incSvc->removeListener( this, IncidentType::EndEvent ); + m_incSvc.reset(); + } + return base_class::finalize(); + } + + using clock_t = std::conditional_t<std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, + std::chrono::steady_clock>; + + struct stats_t { + clock_t::duration total_time{}; + std::size_t count{}; + clock_t::time_point started{}; + + void start() { started = clock_t::now(); } + void stop() { + total_time += clock_t::now() - started; + ++count; + } + }; + + stats_t& stats( INamedInterface* alg ) { + if ( auto it = m_offsets.find( alg->name() ); it != end( m_offsets ) ) { + return m_stats[it->second]; + } else { + m_depths.push_back( m_currentDepth ); + m_stats.emplace_back(); + m_offsets[alg->name()] = m_stats.size() - 1; + return m_stats.back(); + } + } + + SmartIF<IIncidentSvc> m_incSvc; + + std::unordered_map<std::string, std::size_t> m_offsets; + std::vector<std::uint16_t> m_depths; + std::vector<stats_t> m_stats; + stats_t m_eventLoopStats; + std::uint16_t m_currentDepth{ 0 }; +}; + +DECLARE_COMPONENT( AlgTimingAuditor ) diff --git a/GaudiCoreSvc/CMakeLists.txt b/GaudiCoreSvc/CMakeLists.txt index eb5de3f29001271ba440926e862c7c558579ec4a..670050e37d7915e6f17e5a39334d03bfc65966a1 100644 --- a/GaudiCoreSvc/CMakeLists.txt +++ b/GaudiCoreSvc/CMakeLists.txt @@ -20,6 +20,7 @@ gaudi_add_module(GaudiCoreSvc src/ApplicationMgr/DLLClassManager.cpp src/ApplicationMgr/EventLoopMgr.cpp src/ApplicationMgr/MinimalEventLoopMgr.cpp + src/ApplicationMgr/Sequencer.cpp src/ApplicationMgr/ServiceManager.cpp src/ApplicationMgr/ToolSvc.cpp src/EventSelector/DataStreamToolFactory.cpp diff --git a/GaudiExamples/src/AlgSequencer/StopperAlg.h b/GaudiCoreSvc/src/ApplicationMgr/Sequencer.cpp similarity index 50% rename from GaudiExamples/src/AlgSequencer/StopperAlg.h rename to GaudiCoreSvc/src/ApplicationMgr/Sequencer.cpp index 12f947a34f96df644749c643965317360054d565..5940adc02f1af885b47801b85975f2a6c782be12 100644 --- a/GaudiExamples/src/AlgSequencer/StopperAlg.h +++ b/GaudiCoreSvc/src/ApplicationMgr/Sequencer.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,31 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDIEXAMPLE_STOPPERALG_H -#define GAUDIEXAMPLE_STOPPERALG_H 1 +#include <Gaudi/Sequencer.h> -// Include files -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/MsgStream.h" -#include <Gaudi/Property.h> - -/** @class ParentAlg - Trivial Algorithm for tutotial purposes - - @author nobody -*/ -class StopperAlg : public GaudiAlgorithm { -public: - /// Constructor of this form must be provided - using GaudiAlgorithm::GaudiAlgorithm; - - /// Three mandatory member functions of any algorithm - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; - -private: - Gaudi::Property<int> m_stopcount{ this, "StopCount", 3 }; -}; - -#endif // GAUDIEXAMPLE_STOPPERALG_H +DECLARE_COMPONENT( Gaudi::Sequencer ) diff --git a/GaudiExamples/CMakeLists.txt b/GaudiExamples/CMakeLists.txt index 9635ebd5e831c6dcfea5c2e662ef1ae6cb79292a..f5c56310e343f5e1d2ddee3770b426778ae280d6 100644 --- a/GaudiExamples/CMakeLists.txt +++ b/GaudiExamples/CMakeLists.txt @@ -32,8 +32,6 @@ gaudi_add_module(GaudiExamples src/AlgSequencer/SubAlg.cpp src/AlgSequencer/TemplatedAlg.cpp src/AlgTools/MyAlgorithm.cpp - src/AlgTools/MyGaudiAlgorithm.cpp - src/AlgTools/MyGaudiTool.cpp src/AlgTools/MyServiceWithTool.cpp src/AlgTools/MyTool.cpp src/AlgTools/TestTool.cpp @@ -59,12 +57,13 @@ gaudi_add_module(GaudiExamples src/ExtendedProperties/ExtendedProperties.cpp src/ExtendedProperties/ExtendedProperties2.cpp src/FileMgr/FileMgrTest.cpp + src/FunctionalAlgorithms/EventCounter.cpp src/FunctionalAlgorithms/MakeAndConsume.cpp src/FunctionalAlgorithms/merging_transformer.cpp + src/FunctionalAlgorithms/Prescaler.cpp src/FunctionalAlgorithms/selector.cpp src/FunctionalAlgorithms/TestObjectVersion.cpp src/FunctionalAlgorithms/transformer.cpp - src/GaudiCommonTests/GaudiCommonTests.cpp src/Histograms/CounterHistos.cpp src/History/History.cpp src/IncidentSvc/IncidentAsyncTestAlg.cpp @@ -83,8 +82,6 @@ gaudi_add_module(GaudiExamples src/QueueingEventProcessor/QueueingEventLoopMgr.cpp src/QueueingEventProcessor/QueueingApplication.cpp src/ReEntAlg/ReEntAlg.cpp - src/Selections/SelCreate.cpp - src/Selections/SelFilter.cpp src/StringKeys/StringKeyEx.cpp src/SvcInitLoop/LoopAlg.cpp src/SvcInitLoop/ServiceA.cpp @@ -100,7 +97,7 @@ gaudi_add_module(GaudiExamples src/ToolHandles/Algorithms.cpp src/ToolHandles/FloatTool.cpp LINK GaudiKernel - GaudiAlgLib + Gaudi::Functional GaudiUtilsLib GaudiExamplesLib ROOT::Tree @@ -115,16 +112,12 @@ if(NOT ROOT_VERSION VERSION_LESS "6.20") endif() if(GAUDI_USE_AIDA) - target_sources(GaudiExamples PRIVATE src/EvtColsEx/EvtColAlg.cpp - src/Histograms/Aida2Root.cpp - src/Histograms/GaudiHistoAlgorithm.cpp + target_sources(GaudiExamples PRIVATE src/Histograms/HistoAlgorithm.cpp src/Histograms/HistoProps.cpp - src/Histograms/HistoTimingAlg.cpp src/IO/EvtCollectionSelector.cpp src/IO/EvtCollectionWrite.cpp src/IO/EvtExtCollectionSelector.cpp - src/IO/ExtendedEvtCol.cpp src/IO/ReadAlg.cpp src/IO/ReadHandleAlg.cpp src/IO/ReadTES.cpp @@ -132,13 +125,6 @@ if(GAUDI_USE_AIDA) src/IO/WriteHandleAlg.cpp src/RandomNumber/RandomNumberAlg.cpp) target_link_libraries(GaudiExamples PRIVATE AIDA::aida) - if(GAUDI_USE_CLHEP) - target_sources(GaudiExamples PRIVATE src/TupleEx/TupleAlg2.cpp - src/TupleEx/TupleAlg3.cpp - src/TupleEx/TupleAlg.cpp - src/TupleEx/TupleDef.cpp) - target_link_libraries(GaudiExamples PRIVATE CLHEP::CLHEP) - endif() endif() if(GAUDI_USE_HEPPDT) target_sources(GaudiExamples PRIVATE src/PartProp/GaudiPPS.cpp @@ -158,7 +144,6 @@ gaudi_add_executable(Allocator src/Allocator/MyClass1A.cpp src/Allocator/MyClass1.cpp LINK GaudiExamplesLib - GaudiAlgLib GaudiKernel) gaudi_add_executable(testAppMgrStateMachine SOURCES src/testing/TestAppMgrStateMachine.cpp @@ -180,21 +165,30 @@ gaudi_generate_confuserdb() # Tests gaudi_add_tests(QMTest) -if(TEST "GaudiExamples.jira.gaudi_1174" AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - set_property(TEST GaudiExamples.jira.gaudi_1174 PROPERTY DISABLED TRUE) -endif() -foreach(test IN ITEMS - metadatasvc - properties.all properties.all2 properties.all_py - bug_34121_tool_properties_in_python - deferred_write.enforced deferred_write.explicit) - if(TEST "GaudiExamples.${test}") - set_property( - TEST GaudiExamples.${test} - APPEND PROPERTY ENVIRONMENT JOBOPTSDUMPFILE=gaudiexamples.${test}.joboptsdump +if(BUILD_TESTING) + if(TEST "GaudiExamples.jira.gaudi_1174" AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + set_property(TEST GaudiExamples.jira.gaudi_1174 PROPERTY DISABLED TRUE) + endif() + foreach(test IN ITEMS + metadatasvc + properties.all properties.all2 properties.all_py + bug_34121_tool_properties_in_python + deferred_write.enforced deferred_write.explicit) + if(TEST "GaudiExamples.${test}") + set_property( + TEST GaudiExamples.${test} + APPEND PROPERTY ENVIRONMENT JOBOPTSDUMPFILE=gaudiexamples.${test}.joboptsdump + ) + endif() + endforeach() + if(NOT GAUDI_ENABLE_GAUDIALG) + # these tests are for features available in GaudiAlg, but depend on a fixture in GaudiExamples tests + set_tests_properties( + GaudiExamples.root_io.extcoll.write GaudiExamples.root_io.extcoll.read + PROPERTIES DISABLED TRUE ) endif() -endforeach() +endif() gaudi_add_pytest(tests/pytest) @@ -214,9 +208,4 @@ gaudi_add_dictionary(GaudiExamplesDict # Install python modules gaudi_install(PYTHON) # Install other scripts -configure_file(scripts/TupleEx3.py.in - ${CMAKE_CURRENT_BINARY_DIR}/generated/scripts/TupleEx3.py) -configure_file(scripts/TupleEx4.py.in - ${CMAKE_CURRENT_BINARY_DIR}/generated/scripts/TupleEx4.py) gaudi_install(SCRIPTS) -gaudi_install(SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/generated/scripts/) diff --git a/GaudiExamples/include/Gaudi/Examples/TestAlg.h b/GaudiExamples/include/Gaudi/Examples/TestAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..204a55577164bc4f49d8497c7b98aa11c2338cc4 --- /dev/null +++ b/GaudiExamples/include/Gaudi/Examples/TestAlg.h @@ -0,0 +1,37 @@ +/***********************************************************************************\ +* (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include <GaudiKernel/Algorithm.h> +#include <algorithm> + +namespace Gaudi::Examples { + + /// Simple algorithm useful as base class for tests. + struct TestAlg : ::Algorithm { + using Algorithm::Algorithm; + StatusCode initialize() override { + return Algorithm::initialize().andThen( [&]() { + if ( m_propsPrint && msgLevel( MSG::DEBUG ) ) { + auto& log = debug(); + auto properties = getProperties(); + log << "List of ALL properties of " << System::typeinfoName( typeid( *this ) ) << "/" << this->name() + << " #properties = " << properties.size() << endmsg; + std::sort( begin( properties ), end( properties ), + []( const auto& a, const auto& b ) { return a->name() < b->name(); } ); + for ( const auto& property : properties ) { log << "Property ['Name': Value] = " << *property << endmsg; } + } + } ); + } + Gaudi::Property<bool> m_propsPrint{ this, "PropertiesPrint", false, + "print the properties of the component at initialize" }; + }; +} // namespace Gaudi::Examples diff --git a/GaudiExamples/options/AlgTools.opts b/GaudiExamples/options/AlgTools.opts index 0d512d76e7ecbd9b533d997dfbf6aaf354b5bd6c..b45a88d92190b3f60f575984437dd7c6c0199bac 100644 --- a/GaudiExamples/options/AlgTools.opts +++ b/GaudiExamples/options/AlgTools.opts @@ -26,6 +26,8 @@ MyAlg.MyTool.Int = 101; MyAlg.MyTool.Double = 101.1e+10; MyAlg.MyTool.String = "hundred one"; MyAlg.MyTool.Bool = false; +// disable a ToolHandle +MyAlg.InvalidToolHandle = ""; ToolSvc.MyTool.Int = 201; ToolSvc.MyTool.Double = 201.1e+10; @@ -33,7 +35,7 @@ ToolSvc.MyTool.String = "two hundred and one"; ToolSvc.MyTool.Bool = true; ToolSvc.MyTool.OutputLevel = 3; -MyAlgorithm.OutputLevel = 2; +MyAlg.OutputLevel = 2; //-------------------------------------------------------------- // Test circular tool dependencies (by Chris Jones) @@ -44,4 +46,3 @@ ToolSvc.ToolA.Tools = { "TestTool/ToolB" }; ToolSvc.ToolB.Tools = { "TestTool/ToolA" }; ToolSvc.ToolA.OutputLevel = 2; ToolSvc.ToolB.OutputLevel = 2; - diff --git a/GaudiExamples/options/AlgTools.py b/GaudiExamples/options/AlgTools.py index 8fc33fbd19ec04d9e46a98923b6f1984c68871fb..b973e17344f6533dc7c9c58c83303fcfa733f3f5 100644 --- a/GaudiExamples/options/AlgTools.py +++ b/GaudiExamples/options/AlgTools.py @@ -11,7 +11,7 @@ ############################################################### # Job options file # ============================================================== -from Configurables import GaudiExamplesCommonConf, MyAlgorithm, MyGaudiAlgorithm, MyTool +from Configurables import GaudiExamplesCommonConf, MyAlgorithm, MyTool from Gaudi.Configuration import * GaudiExamplesCommonConf() @@ -46,18 +46,15 @@ assert myalg.ToolWithName == myToolWithName myToolWithName.String = "abc" -mygalg = MyGaudiAlgorithm("MyGaudiAlg") -mygalg.PrivToolHandle.String = "Is a private tool" +myalg.PrivToolHandle.String = "Is a private tool" pubtool = MyTool("TestPubToolHandle", String="Is a public tool") -mygalg.PubToolHandle = pubtool +myalg.PubToolHandle = pubtool # disable a ToolHandle -mygalg.InvalidToolHandle = "" +myalg.InvalidToolHandle = "" -ApplicationMgr( - EvtMax=10, EvtSel="NONE", HistogramPersistency="NONE", TopAlg=[myalg, mygalg] -) +ApplicationMgr(EvtMax=10, EvtSel="NONE", HistogramPersistency="NONE", TopAlg=[myalg]) # -------------------------------------------------------------- # Test circular tool dependencies (by Chris Jones) # -------------------------------------------------------------- diff --git a/GaudiExamples/options/AlgTools2.opts b/GaudiExamples/options/AlgTools2.opts deleted file mode 100644 index 15179b05bb38c2f4f81a165958f36a61d3365846..0000000000000000000000000000000000000000 --- a/GaudiExamples/options/AlgTools2.opts +++ /dev/null @@ -1,49 +0,0 @@ -//############################################################## -// Job options file -//============================================================== -#include "Common.opts" - -//-------------------------------------------------------------- -// Private Application Configuration options -//-------------------------------------------------------------- -//ApplicationMgr.TopAlg = { "MyAlgorithm/MyAlg" }; -ApplicationMgr.TopAlg = { "MyGaudiAlgorithm/MyAlg" }; - -// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -MessageSvc.OutputLevel = 3; - -//-------------------------------------------------------------- -// Event related parameters -//-------------------------------------------------------------- -ApplicationMgr.EvtMax = 10; // events to be processed (default is 10) -ApplicationMgr.EvtSel = "NONE"; // do not use any event input -//ApplicationMgr.HistogramPersistency = "NONE"; - - -//-------------------------------------------------------------- -// Algorithms Private Options -//-------------------------------------------------------------- -MyAlg.MyTool.Int = 101; -MyAlg.MyTool.Double = 101.1e+10; -MyAlg.MyTool.String = "hundred one"; -MyAlg.MyTool.Bool = false; -// disable a ToolHandle -MyAlg.InvalidToolHandle = ""; - -ToolSvc.MyTool.Int = 201; -ToolSvc.MyTool.Double = 201.1e+10; -ToolSvc.MyTool.String = "two hundred and one"; -ToolSvc.MyTool.Bool = true; - -ToolSvc.MyTool.OutputLevel = 3; -MyAlg.OutputLevel = 2; - -//-------------------------------------------------------------- -// Test circular tool dependencies (by Chris Jones) -//-------------------------------------------------------------- -ApplicationMgr.TopAlg += { "TestToolAlg" }; -TestToolAlg.Tools += { "TestTool/ToolA" }; -ToolSvc.ToolA.Tools = { "TestTool/ToolB" }; -ToolSvc.ToolB.Tools = { "TestTool/ToolA" }; -ToolSvc.ToolA.OutputLevel = 2; -ToolSvc.ToolB.OutputLevel = 2; diff --git a/GaudiExamples/options/AlgToolsClone.py b/GaudiExamples/options/AlgToolsClone.py index 592aef3fee2775743482a973ffa1695c12f22b14..c4ad9836df5fb1156ddebc0867eeaf257106ed4a 100644 --- a/GaudiExamples/options/AlgToolsClone.py +++ b/GaudiExamples/options/AlgToolsClone.py @@ -17,14 +17,20 @@ from Configurables import ( HiveSlimEventLoopMgr, HiveWhiteBoard, MyAlgorithm, - MyGaudiAlgorithm, ToolSvc, ) from Gaudi.Configuration import * GaudiExamplesCommonConf() -myalg = MyAlgorithm("MyAlg", PrivateToolsOnly=True, Cardinality=20) +myalg = MyAlgorithm( + "MyAlg", + PrivateToolsOnly=True, + Cardinality=20, + # this is needed because by default (for testing) + # MyAlgorithm default configuration is meant to fail + InvalidToolHandle="", +) ToolSvc(OutputLevel=INFO) diff --git a/GaudiExamples/options/AsyncIncidents.py b/GaudiExamples/options/AsyncIncidents.py index ee7ac673e26a93a440e8ec00b04900fed832d770..321b2004411fe338e24da9180d93776bf2cc5444 100644 --- a/GaudiExamples/options/AsyncIncidents.py +++ b/GaudiExamples/options/AsyncIncidents.py @@ -20,7 +20,7 @@ from Configurables import ( AvalancheSchedulerSvc, CPUCruncher, CPUCrunchSvc, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, IncidentAsyncTestAlg, @@ -105,19 +105,19 @@ Producer2 = CPUCruncher("Producer2", inpKeys=["/Event/a3"], outKeys=["/Event/a2" Filter2 = CPUCruncher("Filter2", inpKeys=["/Event/a2"]) -sequence0 = GaudiSequencer("Sequence0") +sequence0 = Gaudi__Sequencer("Sequence0") sequence0.ModeOR = False sequence0.ShortCircuit = False # whether the evaluation is lazy or not! sequence0.Members += [EventLoopInitProcAlg] -sequencex = GaudiSequencer("SequenceX") +sequencex = Gaudi__Sequencer("SequenceX") sequencex.ModeOR = False sequencex.ShortCircuit = False # whether the evaluation is lazy or not! sequencex.Members += [EventLoopFinalProcAlg] -sequence1 = GaudiSequencer("Sequence1") +sequence1 = Gaudi__Sequencer("Sequence1") sequence1.Members += [FakeInput, Producer1, Filter, Producer2, AITestAlg1, AITestAlg2] sequence1.ModeOR = False sequence1.ShortCircuit = False # whether the evaluation is lazy or not! -sequence2 = GaudiSequencer("Sequence2") +sequence2 = Gaudi__Sequencer("Sequence2") sequence2.Members += [sequence0, sequence1, Filter2, sequencex] ApplicationMgr( diff --git a/GaudiExamples/options/ControlFlow/AlgSequencer.py b/GaudiExamples/options/ControlFlow/AlgSequencer.py index 9cc50be737a22c2ded9c17e45eec3b0f8a27854c..9f4058add5b148c3c967d855c40149163d0295a8 100644 --- a/GaudiExamples/options/ControlFlow/AlgSequencer.py +++ b/GaudiExamples/options/ControlFlow/AlgSequencer.py @@ -10,16 +10,11 @@ ##################################################################################### from __future__ import print_function -from Configurables import ( - EventLoopMgr, - GaudiExamplesCommonConf, - HelloWorld, - ParentAlg, - Prescaler, - StopperAlg, - TimingAuditor, -) -from Gaudi.Configuration import * +from Configurables import AlgTimingAuditor, ApplicationMgr, AuditorSvc, EventLoopMgr +from Configurables import Gaudi__Examples__EventCounter as EventCounter +from Configurables import Gaudi__Examples__Prescaler as Prescaler +from Configurables import GaudiExamplesCommonConf, HelloWorld, ParentAlg, StopperAlg +from Gaudi.Configuration import DEBUG from GaudiConfig.ControlFlow import seq ############################################################### @@ -32,8 +27,8 @@ GaudiExamplesCommonConf() # -------------------------------------------------------------- # Testing Sequencers # -------------------------------------------------------------- -p1 = Prescaler("Prescaler1", PercentPass=50.0, OutputLevel=WARNING) -p2 = Prescaler("Prescaler2", PercentPass=10.0, OutputLevel=WARNING) +p1 = Prescaler("Prescaler1", PercentPass=50.0) +p2 = Prescaler("Prescaler2", PercentPass=10.0) h = HelloWorld(OutputLevel=DEBUG) c1 = EventCounter("Counter1") c2 = EventCounter("Counter2") @@ -43,7 +38,7 @@ s2 = seq(p2 & h & c2) top = s1 >> s2 # s1 = Sequencer('Sequence1', Members = [p1, h, c1] ) # s2 = Sequencer('Sequence2', Members = [p2, h, c2] ) -# top = Sequencer('TopSequence', Members = [s1, s2], StopOverride = True ) +# top = Sequencer('TopSequence', Members = [s1, s2], ShortCircuit = False ) # ----------------------------------------------------------------- # Testing the new GaudiSequencer @@ -69,8 +64,8 @@ ApplicationMgr( TopAlg=[all], EvtMax=10, # events to be processed (default is 10) EvtSel="NONE", # do not use any event input - ExtSvc=["ToolSvc", "AuditorSvc"], + ExtSvc=["ToolSvc", "AuditorSvc", "Gaudi::Monitoring::MessageSvcSink"], AuditAlgorithms=True, ) -AuditorSvc().Auditors += [TimingAuditor("TIMER")] +AuditorSvc().Auditors += [AlgTimingAuditor("TIMER")] diff --git a/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py b/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py index dfe0356d2bb442c9c1aa273232131d79129ba164..09b573cda52c7d99ad997dd9b2b6988e3c299172 100644 --- a/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py +++ b/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py @@ -10,7 +10,7 @@ ##################################################################################### from __future__ import print_function -from Configurables import EventLoopMgr, GaudiExamplesCommonConf, TimingAuditor +from Configurables import AlgTimingAuditor, EventLoopMgr, GaudiExamplesCommonConf from Gaudi.Configuration import * from GaudiKernel.Configurable import SuperAlgorithm @@ -51,9 +51,11 @@ class MySuperAlg(SuperAlgorithm): """ Prepare the graph represented by the SuperAlgorithm. """ - from Configurables import EventCounter, HelloWorld, Prescaler + from Configurables import Gaudi__Examples__EventCounter as EventCounter + from Configurables import Gaudi__Examples__Prescaler as Prescaler + from Configurables import HelloWorld - p = self._makeAlg(Prescaler, PercentPass=50.0) + p = self._makeAlg(Prescaler, name="Prescaler", PercentPass=50.0) h = self._makeAlg(HelloWorld, name="HW") c = self._makeAlg(EventCounter, name="Counter") # the actual graph depends on the UseHelloWorld flag @@ -76,8 +78,8 @@ ApplicationMgr( TopAlg=[top], EvtMax=10, # events to be processed (default is 10) EvtSel="NONE", # do not use any event input - ExtSvc=["ToolSvc", "AuditorSvc"], + ExtSvc=["ToolSvc", "AuditorSvc", "Gaudi::Monitoring::MessageSvcSink"], AuditAlgorithms=True, ) -AuditorSvc().Auditors.append(TimingAuditor("TIMER")) +AuditorSvc().Auditors.append(AlgTimingAuditor("TIMER")) diff --git a/GaudiExamples/options/ControlFlow/SuperAlgorithm.py b/GaudiExamples/options/ControlFlow/SuperAlgorithm.py index 1bb5202743fded0e413583765952f4c16241cc65..5f566fc905eb91b04f7fcc4aaa697a98cd6bb69e 100644 --- a/GaudiExamples/options/ControlFlow/SuperAlgorithm.py +++ b/GaudiExamples/options/ControlFlow/SuperAlgorithm.py @@ -11,15 +11,10 @@ from __future__ import print_function # see implementation of Gaudi_Test_MySuperAlg in GaudiExamples/Configuration.py -from Configurables import EventLoopMgr +from Configurables import AlgTimingAuditor, EventLoopMgr +from Configurables import Gaudi__Examples__EventCounter as GE_EventCounter from Configurables import Gaudi_Test_MySuperAlg as MySuperAlg -from Configurables import ( - GaudiExamplesCommonConf, - HelloWorld, - ParentAlg, - StopperAlg, - TimingAuditor, -) +from Configurables import GaudiExamplesCommonConf, HelloWorld, ParentAlg, StopperAlg from Gaudi.Configuration import * from GaudiConfig.ControlFlow import seq @@ -39,8 +34,8 @@ MySuperAlg("s2", PercentPass=75, OutputLevel=DEBUG) # ----------------------------------------------------------------- # Testing the new GaudiSequencer # ----------------------------------------------------------------- -sand = HelloWorld("AND") & EventCounter("ANDCounter") -sor = HelloWorld("OR") | EventCounter("ORCounter") +sand = HelloWorld("AND") & GE_EventCounter("ANDCounter") +sor = HelloWorld("OR") | GE_EventCounter("ORCounter") try: MySuperAlg("AND") @@ -60,8 +55,8 @@ ApplicationMgr( TopAlg=[all], EvtMax=10, # events to be processed (default is 10) EvtSel="NONE", # do not use any event input - ExtSvc=["ToolSvc", "AuditorSvc"], + ExtSvc=["ToolSvc", "AuditorSvc", "Gaudi::Monitoring::MessageSvcSink"], AuditAlgorithms=True, ) -AuditorSvc().Auditors.append(TimingAuditor("TIMER")) +AuditorSvc().Auditors.append(AlgTimingAuditor("TIMER")) diff --git a/GaudiExamples/options/FunctionalAlgorithms/SelectTracks.py b/GaudiExamples/options/FunctionalAlgorithms/SelectTracks.py index 086e224c3a9db8be5bbafcf5f416272a068d9237..383fa8ad09b1836234e44dfa8ed5b137738da646 100644 --- a/GaudiExamples/options/FunctionalAlgorithms/SelectTracks.py +++ b/GaudiExamples/options/FunctionalAlgorithms/SelectTracks.py @@ -30,10 +30,10 @@ esel.Input = [ ] # Algorithms -evtAlgs = GaudiSequencer( +evtAlgs = Gaudi__Sequencer( "EventAlgs", Members=[SelectTracks(), CountSelectedTracks()], VetoObjects=["FSR"] ) -fsrAlgs = GaudiSequencer( +fsrAlgs = Gaudi__Sequencer( "FSRAlgs", Members=[ReadTES(Locations=["FSR"])], RequireObjects=["FSR"] ) @@ -51,4 +51,3 @@ app.HistogramPersistency = "NONE" RootCnvSvc(OutputLevel=INFO) # ChronoStatSvc(OutputLevel=WARNING) -SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/Histograms.opts b/GaudiExamples/options/Histograms.opts index 57ce5a84d80b40a31a8fc221e8eb704fefc96a25..30ec4816e0c36269cfa9001ada23425771419bd3 100644 --- a/GaudiExamples/options/Histograms.opts +++ b/GaudiExamples/options/Histograms.opts @@ -16,13 +16,8 @@ MessageSvc.OutputLevel = 3; //ApplicationMgr.TopAlg += { "HistoAlgorithm" }; //HistoAlgorithm.OutputLevel = 2; -// Example of Histogramming using GaudiHistoAlg base class from GaudiAlg -ApplicationMgr.TopAlg += { "GaudiHistoAlgorithm/SimpleHistos" }; -// Exampel of Histograming using "histogram proeprties" +// Example of Histograming using "histogram properties" ApplicationMgr.TopAlg += { "Gaudi::Examples::HistoProps/Histos2" }; -SimpleHistos.HistoPrint = true; -SimpleHistos.OutputLevel = 2; -//MessageSvc.setDebug += { "SimpleHistos" }; Histos2.Histo2 = ('Title',-5,5,200) ; ///< (title,lowEdge,highEdge,#bins) Histos2.Histo2 = ('Title',-5,5) ; ///< (title,lowEdge,highEdge) @@ -42,13 +37,10 @@ ApplicationMgr.EvtSel = "NONE"; //-------------------------------------------------------------- // Other Service Options //-------------------------------------------------------------- -//ApplicationMgr.HistogramPersistency = "HBOOK"; -//HbookHistSvc.OutputFile = "histo.hbook"; ApplicationMgr.HistogramPersistency = "ROOT"; ApplicationMgr.ExtSvc = {"Gaudi::Monitoring::MessageSvcSink"}; RootHistSvc.OutputFile = "histo-opts.root"; -//NTupleSvc.Output = { "FILE1 DATAFILE='NTuple.hbook' OPT='NEW' TYP='HBOOK'" }; //NTupleSvc.Output = { "FILE1 DATAFILE='NTuple.root' OPT='NEW' TYP='ROOT'" }; @@ -57,8 +49,4 @@ RootHistSvc.OutputFile = "histo-opts.root"; //Input Histogram //HistogramDataSvc.Input = { "InFile DATAFILE='../data/input.hbook' TYP='HBOOK'" }; -HistogramDataSvc.Predefined1DHistos = - { - "/stat/Histos2/2" : ("TEST2",-100,200) - }; HistogramDataSvc.OutputLevel = 2 ; diff --git a/GaudiExamples/options/Histograms.py b/GaudiExamples/options/Histograms.py index 07efde9e20b95d5c21f43dee773b4a5b7fc5afc7..03128b66401734efbb9091aef5e803d75dc16664 100644 --- a/GaudiExamples/options/Histograms.py +++ b/GaudiExamples/options/Histograms.py @@ -15,19 +15,12 @@ AuditorSvc().Auditors = ["ChronoAuditor"] MessageSvc().OutputLevel = INFO RootHistSvc("RootHistSvc").OutputFile = "histo.root" -HistogramSvc("HistogramDataSvc").Input = [ - "InFile DATAFILE='../data/input.hbook' TYP='HBOOK'" -] - -# from GaudiExamples.GaudiExamplesConf import GaudiHistoAlgorithm from Configurables import ( Gaudi__Examples__Counter__GaudiHistoAlgorithm as CounterHistoAlg, ) from Configurables import Gaudi__Histograming__Sink__Root as RootHistoSink -from Configurables import GaudiHistoAlgorithm algs = [ - GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=DEBUG), CounterHistoAlg("SimpleCounterHistos", OutputLevel=DEBUG), ] diff --git a/GaudiExamples/options/Histograms_with_global.py b/GaudiExamples/options/Histograms_with_global.py index 530594fdefd67f6cc92245e426d40452d4752661..7879b8f375f72a4273103bc9fbfa873887fbad0e 100644 --- a/GaudiExamples/options/Histograms_with_global.py +++ b/GaudiExamples/options/Histograms_with_global.py @@ -17,13 +17,12 @@ C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"]) # algorithms algorithms = [ - C.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3), C.Gaudi.Examples.Counter.GaudiHistoAlgorithm("SimpleCounterHistos", OutputLevel=2), ] app = C.ApplicationMgr( "ApplicationMgr", - TopAlg=["SimpleHistos", "SimpleCounterHistos"], + TopAlg=["SimpleCounterHistos"], EvtMax=50000, EvtSel="NONE", ) @@ -51,5 +50,4 @@ C.RootHistCnv.PersSvc("RootHistSvc", OutputFile="histo-c2g.root") C.HistogramSvc( "HistogramDataSvc", OutputLevel=2, - Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"], ) diff --git a/GaudiExamples/options/IntelProfiler.py b/GaudiExamples/options/IntelProfiler.py index efeef31a782edbb4c260b0418f690ab48c28b1d4..e52012d4d682b60cdba8e344be766d00aded4f2e 100644 --- a/GaudiExamples/options/IntelProfiler.py +++ b/GaudiExamples/options/IntelProfiler.py @@ -22,8 +22,8 @@ alg4 = CpuHungryAlg("Alg4") alg1.Loops = alg2.Loops = alg3.Loops = alg4.Loops = 5000000 -subtop = Sequencer("SubSequence", Members=[alg1, alg2, alg3], StopOverride=True) -top = Sequencer("TopSequence", Members=[subtop, alg4], StopOverride=True) +subtop = Sequencer("SubSequence", Members=[alg1, alg2, alg3], ShortCircuit=False) +top = Sequencer("TopSequence", Members=[subtop, alg4], ShortCircuit=False) profiler = IntelProfilerAuditor() profiler.OutputLevel = DEBUG diff --git a/GaudiExamples/options/MultiInput/Read.py b/GaudiExamples/options/MultiInput/Read.py index 3e76d478bb26bc882286134afd1889307b8596bc..be6a820a15226e1425eea7588ed0e4e493844107 100644 --- a/GaudiExamples/options/MultiInput/Read.py +++ b/GaudiExamples/options/MultiInput/Read.py @@ -22,7 +22,7 @@ esel = EventSelector() esel.Input = ["DATAFILE='PFN:MI_Base.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"] FileCatalog(Catalogs=["xmlcatalog_file:MultiInput.xml"]) # Algorithms -evtAlgs = GaudiSequencer( +evtAlgs = Gaudi__Sequencer( "EventAlgs", Members=[ReadAlg(AddressesFile="addresses.txt", OutputLevel=DEBUG)] ) diff --git a/GaudiExamples/options/ROOT_IO/CollRead.py b/GaudiExamples/options/ROOT_IO/CollRead.py index a8998295055c66c1f6cee79e61c6d305a7d91ce4..d099e42c3856f7e477e9d96ba87e26c4493b2e59 100644 --- a/GaudiExamples/options/ROOT_IO/CollRead.py +++ b/GaudiExamples/options/ROOT_IO/CollRead.py @@ -8,7 +8,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -from Configurables import GaudiPersistency, ReadAlg, SequencerTimerTool +from Configurables import GaudiPersistency, ReadAlg from Gaudi.Configuration import * # Basic configuration for Gaudi persistency @@ -27,6 +27,3 @@ evtColl = TagCollectionSvc("EvtTupleSvc") # Application app = ApplicationMgr(TopAlg=[ReadAlg()], EvtMax=-1, HistogramPersistency="NONE") app.ExtSvc.append(evtColl) - -# Verbosity -# SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/ROOT_IO/CollWrite.py b/GaudiExamples/options/ROOT_IO/CollWrite.py index 5b94f22cfb450c2a168cfca8991f1ed1636902df..7003a0fe4ac522263d910db1c2f2a47c697a9ff7 100644 --- a/GaudiExamples/options/ROOT_IO/CollWrite.py +++ b/GaudiExamples/options/ROOT_IO/CollWrite.py @@ -8,7 +8,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -from Configurables import EvtCollectionWrite, GaudiPersistency, SequencerTimerTool +from Configurables import EvtCollectionWrite, GaudiPersistency from Gaudi.Configuration import * # Basic configuration for Gaudi persistency @@ -30,13 +30,10 @@ evtColl.Output = [ ] # Algorithms -algs = GaudiSequencer( +algs = Gaudi__Sequencer( "EventAlgs", Members=[EvtCollectionWrite("Writer")], VetoObjects=["FSR"] ) # Application app = ApplicationMgr(TopAlg=[algs], EvtMax=-1, HistogramPersistency="NONE") app.ExtSvc.append(evtColl) - -# Verbosity -SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/ROOT_IO/ExtCollWrite.py b/GaudiExamples/options/ROOT_IO/ExtCollWrite.py index 2cde670a7d70ea0760e5cb885315056bba7f704a..39ccef00ef769697ec46c631f405c16dd33b3cc4 100644 --- a/GaudiExamples/options/ROOT_IO/ExtCollWrite.py +++ b/GaudiExamples/options/ROOT_IO/ExtCollWrite.py @@ -31,7 +31,7 @@ evtColl.Output = [ ] # Algorithms -algs = GaudiSequencer( +algs = Gaudi__Sequencer( "EventAlgs", Members=[ ExtendedEvtCol("Fill", EvtColLUN="EXTEVT") @@ -42,6 +42,3 @@ algs = GaudiSequencer( # Application app = ApplicationMgr(TopAlg=[algs], EvtMax=-1, HistogramPersistency="NONE") app.ExtSvc.append(evtColl) - -# Verbosity -SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/ROOT_IO/NewInputRead.py b/GaudiExamples/options/ROOT_IO/NewInputRead.py index 2804e7033ac13a7bfc9caa6c2d5987d04e363c3a..27a1d8345503d1b813143d88817158a9f6148fe8 100644 --- a/GaudiExamples/options/ROOT_IO/NewInputRead.py +++ b/GaudiExamples/options/ROOT_IO/NewInputRead.py @@ -27,14 +27,14 @@ esel.Input = [ ] # Algorithms -evtAlgs = GaudiSequencer( +evtAlgs = Gaudi__Sequencer( "EventAlgs", Members=[ ReadAlg(OutputLevel=VERBOSE, IncidentName=FileRecordDataSvc().IncidentName) ], VetoObjects=["FSR"], ) -fsrAlgs = GaudiSequencer( +fsrAlgs = Gaudi__Sequencer( "FSRAlgs", Members=[ReadTES(Locations=["FSR"])], RequireObjects=["FSR"] ) @@ -47,4 +47,3 @@ app.EvtMax = -1 app.HistogramPersistency = "NONE" RootCnvSvc(OutputLevel=INFO) -SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/ROOT_IO/Read.py b/GaudiExamples/options/ROOT_IO/Read.py index 1f10935c647ec6b048ef8f0fe66a9fb7f76c9152..bdf1a3fe538d52f6c3537cfb8a1ccf7bf5a046ca 100644 --- a/GaudiExamples/options/ROOT_IO/Read.py +++ b/GaudiExamples/options/ROOT_IO/Read.py @@ -28,14 +28,14 @@ esel.Input = [ ] # Algorithms -evtAlgs = GaudiSequencer( +evtAlgs = Gaudi__Sequencer( "EventAlgs", Members=[ ReadAlg(OutputLevel=VERBOSE, IncidentName=FileRecordDataSvc().IncidentName) ], VetoObjects=["FSR"], ) -fsrAlgs = GaudiSequencer( +fsrAlgs = Gaudi__Sequencer( "FSRAlgs", Members=[ReadTES(Locations=["FSR"])], RequireObjects=["FSR"] ) @@ -49,4 +49,3 @@ app.HistogramPersistency = "NONE" RootCnvSvc(OutputLevel=INFO) # ChronoStatSvc(OutputLevel=WARNING) -SequencerTimerTool(OutputLevel=WARNING) diff --git a/GaudiExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py b/GaudiExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py index b1e08b688c1ab624bf990b912b74811225ece332..c3af3b35142c5e150f3dd7a5cf3bfc5c2de304ac 100644 --- a/GaudiExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py +++ b/GaudiExamples/options/ROOT_IO/WriteAndReadHandleWhiteBoard.py @@ -56,10 +56,10 @@ RootCnvSvc(OutputLevel=INFO) GaudiPersistency() -product_name = "MyCollision" +product_name = "/Event/MyCollision" writer = WriteHandleAlg("Writer", OutputLevel=DEBUG, UseHandle=True) -writer.Output.Path = "/Event/" + product_name +writer.Output.Path = product_name reader = ReadHandleAlg("Reader", OutputLevel=DEBUG) reader.Input.Path = product_name diff --git a/GaudiExamples/python/GaudiExamples/Configuration.py b/GaudiExamples/python/GaudiExamples/Configuration.py index 2fe2f7da0befe765bd1932e3950f7552741be4e7..8134ac341468578851699363a16211b8e0daa85c 100644 --- a/GaudiExamples/python/GaudiExamples/Configuration.py +++ b/GaudiExamples/python/GaudiExamples/Configuration.py @@ -43,9 +43,11 @@ class Gaudi_Test_MySuperAlg(SuperAlgorithm): """ Prepare the graph represented by the SuperAlgorithm. """ - from Configurables import EventCounter, HelloWorld, Prescaler + from Configurables import Gaudi__Examples__EventCounter as EventCounter + from Configurables import Gaudi__Examples__Prescaler as Prescaler + from Configurables import HelloWorld - p = self._makeAlg(Prescaler, PercentPass=50.0) + p = self._makeAlg(Prescaler, name="Prescaler", PercentPass=50.0) h = self._makeAlg(HelloWorld, name="HW") c = self._makeAlg(EventCounter, name="Counter") return p & h & c diff --git a/GaudiExamples/python/GaudiExamples/TestConfig2.py b/GaudiExamples/python/GaudiExamples/TestConfig2.py index 570333dd834e592653b5b1aaeb6f8e8e6d0f6cf5..4693800728ed305cab7dc9c57511363e7bdb56f8 100644 --- a/GaudiExamples/python/GaudiExamples/TestConfig2.py +++ b/GaudiExamples/python/GaudiExamples/TestConfig2.py @@ -14,7 +14,9 @@ from GaudiConfig2 import mergeConfigs def setUpAlgorithms(): algorithms = [ - C.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3), + C.Gaudi.Examples.Counter.GaudiHistoAlgorithm( + "SimpleCounterHistos", OutputLevel=3 + ), ] app = C.ApplicationMgr(TopAlg=algorithms) return algorithms + [app] @@ -35,8 +37,8 @@ def histogramWriting(filename): C.HistogramSvc( "HistogramDataSvc", OutputLevel=2, - Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"], ), + C.Gaudi.Histograming.Sink.Root(), ] diff --git a/GaudiExamples/scripts/TupleEx3.py.in b/GaudiExamples/scripts/TupleEx3.py.in deleted file mode 100644 index 2fc7d2b4c0191d4ee270b362bf7a250e2394685a..0000000000000000000000000000000000000000 --- a/GaudiExamples/scripts/TupleEx3.py.in +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env python3 -##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # -# # -# This software is distributed under the terms of the Apache version 2 licence, # -# copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -##################################################################################### -# ============================================================================= -# @file -# -# Simple example which illustrate the usage of useful -# algorithm base class for N-Tuple manipulations -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-01-24 -# ============================================================================= -""" -******************************************************************************* -* * -* Simple example which illustrate the usage of useful * -* algorithm base class for N-Tuple manipulations * -* * -******************************************************************************* -""" -from __future__ import print_function -# ============================================================================= -__author__ = 'Vanya BELYAEV ibelyaev@physics.syr.edu' -# ============================================================================= - -import GaudiPython -import math - -Rndm = GaudiPython.gbl.Rndm -Math = GaudiPython.gbl.ROOT.Math -SUCCESS = GaudiPython.SUCCESS -Gaudi = GaudiPython.gbl.Gaudi - -GaudiPython.loaddict('STLRflx') -GaudiPython.loaddict('STLAddRflx') - -from GaudiKernel import ROOT6WorkAroundEnabled -is_root6 = GaudiPython.gbl.gROOT.GetVersionCode() >= ((5 << 16) + (99 << 8)) -if not (ROOT6WorkAroundEnabled('SPI-385') and is_root6): - GaudiPython.loaddict('MathRflx') - GaudiPython.loaddict('MathAddRflx') - -vct1 = GaudiPython.gbl.vector('double') - -GaudiPython.gbl.gSystem.Load('libCLHEP-Matrix-@CLHEP_VERSION@.so') -GaudiPython.gbl.gInterpreter.Declare('#include <CLHEP/Matrix/Vector.h>') -vct2 = GaudiPython.gbl.CLHEP.HepVector - -from GaudiPython.GaudiAlgs import TupleAlgo - - -# ============================================================================= -# @class TupleEx3 -# Simple algorithm for advanced N-Tuple columns -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-01-24 -class TupleEx3(TupleAlgo): - """ - Simple algorithm for advanced (matrix&array) N-Tuple columns - """ - - # standard constructor - def __init__(self, name='TupleEx3'): - """ Constructor """ - TupleAlgo.__init__(self, name) - - # the main execution method - def execute(self): - """ The major method 'execute', it is invoked for each event """ - - gauss = Rndm.Numbers(self.randSvc(), Rndm.Gauss(0.0, 1.0)) - flat = Rndm.Numbers(self.randSvc(), Rndm.Flat(-10, 10)) - breit = Rndm.Numbers(self.randSvc(), Rndm.BreitWigner(0.0, 1.0)) - - # N-tuple with farrays - tup = self.nTuple('farrays', 'N-tuple with farrays') - - for i in range(0, 20): - - # std::vector<double> - - # prepare some data array (std::vector<double>) - v1 = vct1() - n = int(50 + 2 * flat()) - # fill it with some random data - for j in range(0, n): - v1.push_back(gauss()) - # fill N-tuple - tup.farray('gauss', v1, 'len1', 150) - - # prepare some data array (CLHEP::HepVector<double>) - n = int(50 + 2 * flat()) - v2 = vct2(n) - # fill N-tuple - tup.farray('breit', v2, 'len2', 150) - - # commit the row - tup.write() - - # N-tuple with arrays - tup = self.nTuple('arrays', 'N-tuple with arrays') - for i in range(0, 20): - - # std::vector<double> - - # prepare some data array (std::vector<double>) - v1 = vct1(30, 1.0) - # fill N-tuple - tup.array('gauss', v1) - - # use CLHEP::HepVector - v2 = vct2(30) - tup.array('breit', v2) - - # use Gaudi::Vector2 - v = Gaudi.Vector2() - tup.array('v2', v) - - # use Gaudi::Vector3 - v = Gaudi.Vector3() - tup.array('v3', v) - - # use Gaudi::Vector4 - v = Gaudi.Vector4() - tup.array('v4', v) - - # use Gaudi::Vector5 - v = Gaudi.Vector5() - tup.array('v5', v) - - # use Gaudi::Vector6 - v = Gaudi.Vector6() - tup.array('v6', v) - - # use Gaudi::Vector7 - v = Gaudi.Vector7() - tup.array('v7', v) - - # use Gaudi::Vector8 - v = Gaudi.Vector8() - tup.array('v8', v) - - # use Gaudi::Vector9 - v = Gaudi.Vector9() - tup.array('v9', v) - - # commit the row - tup.write() - - # N-tuple with fixed square matrices - tup = self.nTuple('square', 'N-tuple with square matrices') - for i in range(0, 20): - - # make a matrice - m = Gaudi.Matrix2x2() - tup.matrix("m2", m) - - # make a matrice - m = Gaudi.Matrix3x3() - tup.matrix("m3", m) - - # make a matrice - m = Gaudi.Matrix4x4() - tup.matrix("m4", m) - - # make a matrice - m = Gaudi.Matrix5x5() - # fill n-tuple - tup.matrix("m5", m) - - # make a matrice - m = Gaudi.Matrix6x6() - # fill n-tuple - tup.matrix("m6", m) - - # make a matrice - m = Gaudi.Matrix7x7() - tup.matrix("m7", m) - - # make a matrice - m = Gaudi.Matrix8x8() - # fill n-tuple - tup.matrix("m8", m) - - # make a matrice - m = Gaudi.Matrix9x9() - tup.matrix("m9", m) - - # commit the row - tup.write() - - return SUCCESS - - -# ============================================================================= -# job configuration -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def configure(gaudi=None): - """ - Configuration of the job - """ - - if not gaudi: - gaudi = GaudiPython.AppMgr() - - gaudi.JobOptionsType = 'NONE' - gaudi.EvtSel = 'NONE' - gaudi.HistogramPersistency = 'ROOT' - - gaudi.ExtSvc += ["NTupleSvc", 'ChronoStatSvc'] - - ntSvc = gaudi.service('NTupleSvc') - ntSvc.Output = ["MYLUN DATAFILE='TupleEx3.root' OPT='NEW' TYP='ROOT'"] - - gaudi.config() - - gaudi.DLLs = [ - 'GaudiAlg', - 'RootHistCnv', - ] - - alg = TupleEx3() - gaudi.setAlgorithms([alg]) - - # configure proeprties - alg.NTupleLUN = 'MYLUN' - - return SUCCESS - - -# ============================================================================= -# The actual job execution -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-01-24 -if '__main__' == __name__: - print(__doc__) - gaudi = GaudiPython.AppMgr() - configure(gaudi) - gaudi.run(10) - -# ============================================================================= -# The END -# ============================================================================= diff --git a/GaudiExamples/scripts/TupleEx4.py.in b/GaudiExamples/scripts/TupleEx4.py.in deleted file mode 100644 index 8a209e8cd3fd0b267b361360826bc2457a512045..0000000000000000000000000000000000000000 --- a/GaudiExamples/scripts/TupleEx4.py.in +++ /dev/null @@ -1,289 +0,0 @@ -#!/usr/bin/env python3 -##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # -# # -# This software is distributed under the terms of the Apache version 2 licence, # -# copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -##################################################################################### -# ============================================================================= -# @file -# Simple exmaple to illustrate the usage ofsmart and friendly -# N-Tuples outside of algoruthm-scope in "script-like" environment -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-07-04 -# ============================================================================= -""" -Simple exmaple to illustrate the usage ofsmart and friendly -N-Tuples outside of algoruthm-scope in 'script-like' environment -""" -# ============================================================================= -__author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" -# ============================================================================= - -# static configuration : "Configurbales" - -from Gaudi.Configuration import * -from Configurables import NTupleSvc, ToolSvc, RndmGenSvc, ApplicationMgr - -# configure N-Tuple Service - -# define 3 output files in 'NEW' mode -ntSvc = NTupleSvc(Output=[ - "MYLUN1 DATAFILE='TupleEx4_1.root' OPT='NEW'", - "MYLUN2 DATAFILE='TupleEx4_2.root' OPT='NEW'", - "MYLUN3 DATAFILE='TupleEx4_3.root' OPT='NEW'" -]) - -# ensure that NTuple Service will be finalized AFTER ToolSvc -ApplicationMgr(ExtSvc=[NTupleSvc(), ToolSvc(), RndmGenSvc()]) - -# go to dynamic configuration - -from GaudiPython.Bindings import AppMgr, loaddict -from GaudiPython.Bindings import gbl as cpp -import GaudiPython.TupleUtils as TupleUtils - -# get the application manager (create if needed) -gaudi = AppMgr() - -import atexit -atexit.register(gaudi.exit) - -gaudi.EvtSel = 'NONE' # no external event input -# gaudi.HistogramPersistency = 'HBOOK' ## define the persistency type for N-tuples -gaudi.HistogramPersistency = 'ROOT' # define the persistency type for N-tuples - -## configure & initialize -gaudi.config() -gaudi.initialize() - -# get some random numbers -Rndm = cpp.Rndm -IRndmGenSvc = cpp.IRndmGenSvc -rndmSvc = gaudi.service('RndmGenSvc', IRndmGenSvc) -if not rndmSvc: - gaudi.createSvc('RndmGenSvc') -rndmSvc = gaudi.service('RndmGenSvc', IRndmGenSvc) - -gauss = Rndm.Numbers(cpp.SmartIF("IRndmGenSvc")(rndmSvc), Rndm.Gauss(0.0, 1.0)) - -# get the first N-tuple -tup1 = TupleUtils.nTuple( - "path", # the path - "It is a title for my n-tuple", # the title - LUN='MYLUN1') # logical unit -# fill it: -for i in range(0, 5000): - tup1.column('i', i) # int - tup1.column('g1', gauss()) # double - tup1.column('g2', gauss()) # double - b = 0 < gauss() - tup1.column('b1', b) # bool - tup1.write() - -# get some math-stuff -Math = cpp.ROOT.Math - -# get the second N-tuple -tup2 = TupleUtils.nTuple( - "another/path", # the path - "MyTupleLV", # literal ID - "N-tuple: Lorentz Vectors ", # the title - LUN='MYLUN1') # logical unit - -# fill it: -for i in range(0, 1000): - - # Lorentz Vector - lv1 = Math.PxPyPzEVector(gauss(), gauss(), gauss(), gauss()) - tup2.column("lv1", lv1) # Lorentz Vector - - tup2.write() - -# get the third N-tuple -tup3 = TupleUtils.nTuple( - "another/path", # the path - "MyTuple3DV", # literal ID - "N-tuple: 3D-Vectors ", # the title - LUN='MYLUN2') # logical unit - -# fill it: -for i in range(0, 1000): - - # 3D-Vector - v1 = Math.XYZVector(gauss(), gauss(), gauss()) - tup3.column("v1", v1) # 3D-Vector - - tup3.write() - -# get the fourth N-tuple -tup4 = TupleUtils.nTuple( - "another/path", # the path - "MyTuple3DP", # literal ID - "N-tuple: 3D-Points", # the title - LUN='MYLUN3') # logical unit - -# fill it: -for i in range(0, 1000): - - # 3D-Point - p1 = Math.XYZPoint(gauss(), gauss(), gauss()) - tup4.column("p1", p1) # 3D-Point - - tup4.write() - -# get the 5th N-tuple -tup5 = TupleUtils.nTuple( - "another/path", # the path - 415, # integer ID - "N-tuple: VarArrays", # the title - LUN='MYLUN1') # logical unit - -## -std = cpp.std -vct1 = std.vector('double') - -cpp.gSystem.Load('libCLHEP-Matrix-@CLHEP_VERSION@.so') -cpp.gInterpreter.Declare('#include <CLHEP/Matrix/Vector.h>') -vct2 = cpp.CLHEP.HepVector - -# fill it! -for i in range(0, 100): - - # variable size vector: - v1 = vct1() - n = max(10, int(50 + 25 * gauss())) - n = min(n, 100) - while n > v1.size(): - v1.push_back(gauss()) - - tup5.farray('vct1', v1, 'len1', 100) # std::vector<double> - - n2 = min(50, max(5, int(50 + 25 * gauss()))) - v2 = vct2(n2) - - tup5.farray('vct2', v2, 'len2', 70) # CLHEP::HepVector<double> - - tup5.write() - -# get the 6th N-tuple -tup6 = TupleUtils.nTuple( - "another/path", # the path - "xTuple", # literal ID - "N-tuple: FixArrays", # the title - LUN='MYLUN2') # logical unit - -Gaudi = cpp.Gaudi - -for i in range(0, 10): - - v1 = vct1() - for j in range(0, 5): - v1.push_back(gauss()) - tup6.array("v1", v1) # std::vector<double> - - v2 = vct2(10) - tup6.array("v2", v2) # CLHEP::HepVector<double> - - v3 = Gaudi.Vector2() - tup6.array("v3", v3) # Gaudi::Vector2 - - v4 = Gaudi.Vector3() - tup6.array("v4", v4) # Gaudi::Vector3 - - v5 = Gaudi.Vector4() - tup6.array("v5", v5) # Gaudi::Vector4 - - v6 = Gaudi.Vector5() - tup6.array("v6", v6) # Gaudi::Vector5 - - v7 = Gaudi.Vector6() - tup6.array("v7", v7) # Gaudi::Vector6 - - v8 = Gaudi.Vector7() - tup6.array("v8", v8) # Gaudi::Vector7 - - tup6.write() - -# get the 7th N-tuple -tup7 = TupleUtils.nTuple( - "another/path", # the path - "FixMatrices", # literal ID - "N-tuple: FixMatrices", # the title - LUN='MYLUN3') # logical unit - -for i in range(0, 100): - - m2 = Gaudi.Matrix2x2() - tup7.matrix("m2", m2) # Gaudi::Matrix2x2 - - m3 = Gaudi.Matrix3x3() - tup7.matrix("m3", m3) # Gaudi::Matrix3x3 - - m4 = Gaudi.Matrix4x4() - tup7.matrix("m4", m4) # Gaudi::Matrix4x4 - - m5 = Gaudi.Matrix5x5() - tup7.matrix("m5", m5) # Gaudi::Matrix5x5 - - m6 = Gaudi.Matrix6x6() - tup7.matrix("m6", m6) # Gaudi::Matrix6x6 - - m7 = Gaudi.Matrix7x7() - tup7.matrix("m7", m7) # Gaudi::Matrix7x7 - - tup7.write() - -# get the 8th N-tuple -tup8 = TupleUtils.nTuple( - "another/path", # the path - "FixSymMatrices", # literal ID - "N-tuple: FixSymMatrices", # the title - LUN='MYLUN2') # logical unit - -for i in range(0, 100): - - m2 = Gaudi.SymMatrix2x2() - tup8.matrix("m2", m2) # Gaudi::SymMatrix2x2 - - m3 = Gaudi.SymMatrix3x3() - tup8.matrix("m3", m3) # Gaudi::SymMatrix3x3 - - m4 = Gaudi.SymMatrix4x4() - tup8.matrix("m4", m4) # Gaudi::SymMatrix4x4 - - m5 = Gaudi.SymMatrix5x5() - tup8.matrix("m5", m5) # Gaudi::SymMatrix5x5 - - m6 = Gaudi.SymMatrix6x6() - tup8.matrix("m6", m6) # Gaudi::SymMatrix6x6 - - m7 = Gaudi.SymMatrix7x7() - tup8.matrix("m7", m7) # Gaudi::SymMatrix7x7 - - tup8.write() - -# get the 8th N-tuple -tup9 = TupleUtils.nTuple( - "another/path2", # the path - "Time", # literal ID - "N-tuple: Gaudi::Time", # the title - LUN='MYLUN2') # logical unit - -for i in range(0, 100): - - t = cpp.Gaudi.Time() - - tup9.column(t) - tup9.write() - -# release all tuples at the end -TupleUtils.releaseTuples() - -# ============================================================================= -# The END -# ============================================================================= diff --git a/GaudiExamples/src/AbortEvent/AbortEventAlg.cpp b/GaudiExamples/src/AbortEvent/AbortEventAlg.cpp index 41ff6c90b74cbfeb7ac0d10dc90cb3feb28f7588..91202571c5b3888cafafa88cd396a150d7717714 100644 --- a/GaudiExamples/src/AbortEvent/AbortEventAlg.cpp +++ b/GaudiExamples/src/AbortEvent/AbortEventAlg.cpp @@ -30,8 +30,8 @@ DECLARE_COMPONENT( AbortEventAlg ) // Initialization //============================================================================= StatusCode AbortEventAlg::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm debug() << "==> Initialize" << endmsg; @@ -61,7 +61,7 @@ StatusCode AbortEventAlg::finalize() { debug() << "==> Finalize" << endmsg; - return GaudiAlgorithm::finalize(); // must be called after all other actions + return Algorithm::finalize(); // must be called after all other actions } //============================================================================= diff --git a/GaudiExamples/src/AbortEvent/AbortEventAlg.h b/GaudiExamples/src/AbortEvent/AbortEventAlg.h index b3fb5e5df494373811cd40912fbc86ed6ea73481..aade83cafe1b97d7560ff7207fb15317a8ce0be7 100644 --- a/GaudiExamples/src/AbortEvent/AbortEventAlg.h +++ b/GaudiExamples/src/AbortEvent/AbortEventAlg.h @@ -12,7 +12,7 @@ #define ABORTEVENTALG_H_ // Include files // from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" class IIncidentSvc; @@ -23,10 +23,10 @@ class IIncidentSvc; * @author Marco Clemencic * @date Nov 16, 2007 */ -class AbortEventAlg : public GaudiAlgorithm { +class AbortEventAlg : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution diff --git a/GaudiExamples/src/AlgSequencer/StopperAlg.cpp b/GaudiExamples/src/AlgSequencer/StopperAlg.cpp index 780641e198dadc13be25487441b49a13c628320b..ebaaa57f3945cee6df88361e9262d5ab2c70b188 100644 --- a/GaudiExamples/src/AlgSequencer/StopperAlg.cpp +++ b/GaudiExamples/src/AlgSequencer/StopperAlg.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,43 +8,28 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files -#include "GaudiKernel/DataObject.h" -#include "GaudiKernel/IDataProviderSvc.h" -#include "GaudiKernel/IEventProcessor.h" -#include "GaudiKernel/MsgStream.h" - -#include "StopperAlg.h" - -// Static Factory declaration - -DECLARE_COMPONENT( StopperAlg ) - -//------------------------------------------------------------------------------ -StatusCode StopperAlg::initialize() { - //------------------------------------------------------------------------------ - return StatusCode::SUCCESS; -} - -//------------------------------------------------------------------------------ -StatusCode StopperAlg::execute() { - //------------------------------------------------------------------------------ - static int count = 0; - - if ( ++count >= m_stopcount ) { - info() << "scheduling a event processing stop...." << endmsg; - auto evt = service<IEventProcessor>( "ApplicationMgr" ); - if ( evt->stopRun().isFailure() ) { - error() << "unable to schedule a stopRun" << endmsg; - return StatusCode::FAILURE; +#include <Gaudi/Algorithm.h> +#include <GaudiKernel/IEventProcessor.h> + +struct StopperAlg : Gaudi::Algorithm { + using Algorithm::Algorithm; + + StatusCode execute( const EventContext& ) const override { + static int count = 0; + + if ( ++count >= m_stopcount ) { + info() << "scheduling a event processing stop...." << endmsg; + auto evt = service<IEventProcessor>( "ApplicationMgr" ); + if ( evt->stopRun().isFailure() ) { + error() << "unable to schedule a stopRun" << endmsg; + return StatusCode::FAILURE; + } } + + return StatusCode::SUCCESS; } - return StatusCode::SUCCESS; -} + Gaudi::Property<int> m_stopcount{ this, "StopCount", 3 }; +}; -//------------------------------------------------------------------------------ -StatusCode StopperAlg::finalize() { - //------------------------------------------------------------------------------ - return StatusCode::SUCCESS; -} +DECLARE_COMPONENT( StopperAlg ) diff --git a/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp b/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp index da54e9dba993d79c28ad7f340e97a69fc132310f..ae1b8d5d96c5d3ddb3368f309929237fc7afb394 100644 --- a/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp +++ b/GaudiExamples/src/AlgSequencer/TemplatedAlg.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,15 +8,34 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files -#include "GaudiKernel/DataObject.h" -#include "GaudiKernel/IDataProviderSvc.h" -#include "GaudiKernel/IEventProcessor.h" -#include "GaudiKernel/MsgStream.h" -#include "TemplatedAlg.h" +#include <Gaudi/Algorithm.h> +#include <string> #include <vector> +/** @class TemplateAlg + Trivial Algorithm for tutotial purposes + + @author nobody +*/ +template <typename T, typename R> +class TemplatedAlg : public Gaudi::Algorithm { +public: + using Algorithm::Algorithm; + + StatusCode initialize() override { + return Algorithm::initialize().andThen( [&]() { + using Gaudi::PluginService::Details::demangle; + info() << "Initializing TemplatedAlg instance " << name() << " of type " << demangle( typeid( *this ) ) << endmsg; + } ); + } + StatusCode execute( const EventContext& ) const override { return StatusCode::SUCCESS; } + +private: + Gaudi::Property<T> m_t{ this, "TProperty", {} }; + Gaudi::Property<R> m_r{ this, "RProperty", {} }; +}; + // Static Factory declaration typedef TemplatedAlg<int, std::vector<std::string>> t1; typedef TemplatedAlg<double, bool> t2; @@ -25,26 +44,3 @@ DECLARE_COMPONENT( t1 ) DECLARE_COMPONENT_WITH_ID( t1, "TAlgIS" ) DECLARE_COMPONENT( t2 ) DECLARE_COMPONENT_WITH_ID( t2, "TAlgDB" ) - -//------------------------------------------------------------------------------ -template <typename T, typename R> -StatusCode TemplatedAlg<T, R>::initialize() { - //------------------------------------------------------------------------------ - using Gaudi::PluginService::Details::demangle; - info() << "Initializing TemplatedAlg instance " << name() << " of type " << demangle( typeid( *this ) ) << endmsg; - return StatusCode::SUCCESS; -} - -//------------------------------------------------------------------------------ -template <typename T, typename R> -StatusCode TemplatedAlg<T, R>::execute() { - //------------------------------------------------------------------------------ - return StatusCode::SUCCESS; -} - -//------------------------------------------------------------------------------ -template <typename T, typename R> -StatusCode TemplatedAlg<T, R>::finalize() { - //------------------------------------------------------------------------------ - return StatusCode::SUCCESS; -} diff --git a/GaudiExamples/src/AlgSequencer/TemplatedAlg.h b/GaudiExamples/src/AlgSequencer/TemplatedAlg.h deleted file mode 100644 index 7a4436aa1dca0b2ea6f4368756b538d3260f6942..0000000000000000000000000000000000000000 --- a/GaudiExamples/src/AlgSequencer/TemplatedAlg.h +++ /dev/null @@ -1,40 +0,0 @@ -/***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * -* * -* This software is distributed under the terms of the Apache version 2 licence, * -* copied verbatim in the file "LICENSE". * -* * -* In applying this licence, CERN does not waive the privileges and immunities * -* granted to it by virtue of its status as an Intergovernmental Organization * -* or submit itself to any jurisdiction. * -\***********************************************************************************/ -#ifndef GAUDIEXAMPLE_TEMPLATEALG_H -#define GAUDIEXAMPLE_TEMPLATEALG_H 1 - -// Include files -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/MsgStream.h" -#include <Gaudi/Property.h> - -/** @class TemplateAlg - Trivial Algorithm for tutotial purposes - - @author nobody -*/ -template <typename T, typename R> -class TemplatedAlg : public GaudiAlgorithm { -public: - /// Constructor of this form must be provided - using GaudiAlgorithm::GaudiAlgorithm; - - /// Three mandatory member functions of any algorithm - StatusCode initialize() override; - StatusCode execute() override; - StatusCode finalize() override; - -private: - Gaudi::Property<T> m_t{ this, "TProperty", {} }; - Gaudi::Property<R> m_r{ this, "RProperty", {} }; -}; - -#endif // GAUDIEXAMPLE_TEMPLATEDALG_H diff --git a/GaudiExamples/src/AlgTools/IMyTool.h b/GaudiExamples/src/AlgTools/IMyTool.h index f9dbcce0b2f79a187866175ae14720cbda9a0ca4..6dc6bfdca5ec47575f2759e83106f6fdb380f678 100644 --- a/GaudiExamples/src/AlgTools/IMyTool.h +++ b/GaudiExamples/src/AlgTools/IMyTool.h @@ -42,7 +42,14 @@ public: DeclareInterfaceID( IMyOtherTool, 2, 0 ); /// Do something else - virtual void doItAgain() = 0; + virtual void doItAgain() const = 0; +}; + +/// Interface (not implemented) to test attempts to retrieval of wrong interface +class IWrongTool : virtual public IAlgTool { +public: + /// InterfaceID + DeclareInterfaceID( IWrongTool, 1, 0 ); }; #endif // GAUDIEXAMPLE_IMYTOOL_H diff --git a/GaudiExamples/src/AlgTools/MyAlgorithm.cpp b/GaudiExamples/src/AlgTools/MyAlgorithm.cpp index ac53647b18421499e2aae69315931e9662f96a22..d11339f5737942afa97527437b292bbb1feb28fd 100644 --- a/GaudiExamples/src/AlgTools/MyAlgorithm.cpp +++ b/GaudiExamples/src/AlgTools/MyAlgorithm.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,23 +8,29 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files -#include "GaudiKernel/DataObject.h" -#include "GaudiKernel/IDataProviderSvc.h" -#include "GaudiKernel/IToolSvc.h" - -#include "IMyTool.h" #include "MyAlgorithm.h" - -// Static Factory declaration +#include "IMyTool.h" +#include <GaudiKernel/DataObject.h> +#include <GaudiKernel/IDataProviderSvc.h> +#include <GaudiKernel/IToolSvc.h> DECLARE_COMPONENT( MyAlgorithm ) -//------------------------------------------------------------------------------ -StatusCode MyAlgorithm::initialize() { - //------------------------------------------------------------------------------ +using Gaudi::Examples::TestAlg; + +MyAlgorithm::MyAlgorithm( const std::string& name, ISvcLocator* ploc ) : TestAlg( name, ploc ) { + // Keep at least one old-style ToolHandle property to test compilation + declareProperty( "LegacyToolHandle", m_legacyToolHandle ); + declareProperty( "UndefinedToolHandle", m_undefinedToolHandle ); - StatusCode sc; + m_myCopiedConstToolHandle = m_myPubToolHandle; + m_myCopiedToolHandle = m_myPubToolHandle; + m_myCopiedConstToolHandle2 = m_myConstToolHandle; +} + +StatusCode MyAlgorithm::initialize() { + StatusCode sc = TestAlg::initialize(); + if ( !sc ) return sc; info() << "initializing...." << endmsg; if ( !m_privateToolsOnly ) { @@ -33,11 +39,6 @@ StatusCode MyAlgorithm::initialize() { error() << "Error retrieving the public tool" << endmsg; return sc; } - sc = toolSvc()->retrieveTool( "MyGaudiTool", m_publicGTool ); - if ( sc.isFailure() ) { - error() << "Error retrieving the Gaudi public tool" << endmsg; - return sc; - } } sc = toolSvc()->retrieveTool( "MyTool", m_privateTool, this ); @@ -46,24 +47,43 @@ StatusCode MyAlgorithm::initialize() { return sc; } - sc = toolSvc()->retrieveTool( "MyGaudiTool", m_privateGTool, this ); - if ( sc.isFailure() ) { - error() << "Error retrieving the Gaudi private tool" << endmsg; - return sc; - } - sc = toolSvc()->retrieveTool( m_privateToolType, "ToolWithName", m_privateToolWithName, this ); if ( sc.isFailure() ) { error() << "Error retrieving the private tool with name" << endmsg; return sc; } - sc = toolSvc()->retrieveTool( "MyGaudiTool", m_privateOtherInterface, this ); + sc = toolSvc()->retrieveTool( "MyTool", m_privateOtherInterface, this ); if ( sc.isFailure() ) { - error() << "Error retrieving the Gaudi private tool with second interface" << endmsg; + error() << "Error retrieving the private tool with second interface" << endmsg; return sc; } + // disable ToolHandle + m_myUnusedToolHandle.disable(); + + // m_wrongIfaceTool is being retrieved via the wrong interface. + // we expect the retrieve() to throw an exception. + try { + if ( m_wrongIfaceTool.retrieve().isFailure() ) { + error() << "unable to retrieve " << m_wrongIfaceTool.typeAndName() << " (unexpected)" << endmsg; + m_wrongIfaceTool.disable(); + } + } catch ( GaudiException& ex ) { + info() << "unable to retrieve " << m_wrongIfaceTool.typeAndName() << " (expected) with exception: " << ex.what() + << endmsg; + m_wrongIfaceTool.disable(); + } + + if ( m_privateToolsOnly ) { + // disable all public tools + m_myPubToolHandle.disable(); + m_myConstToolHandle.disable(); + m_myCopiedConstToolHandle.disable(); + m_myCopiedToolHandle.disable(); + m_myCopiedConstToolHandle2.disable(); + } + info() << "....initialization done" << endmsg; return StatusCode::SUCCESS; @@ -74,15 +94,39 @@ StatusCode MyAlgorithm::execute() { //------------------------------------------------------------------------------ info() << "executing...." << endmsg; - if ( !m_privateToolsOnly ) { - m_publicTool->doIt(); - m_publicGTool->doIt(); - } + if ( !m_privateToolsOnly ) { m_publicTool->doIt(); } m_privateTool->doIt(); - m_privateGTool->doIt(); m_privateToolWithName->doIt(); m_privateOtherInterface->doItAgain(); + info() << "tools created via ToolHandle<T>...." << endmsg; + + m_myPrivToolHandle->doIt(); + if ( !m_privateToolsOnly ) { + m_myPubToolHandle->doIt(); + m_myConstToolHandle->doIt(); + } + + if ( !m_privateToolsOnly ) { + info() << "tools copied assigned via ToolHandle<T>...." << endmsg; + + m_myCopiedConstToolHandle->doIt(); + m_myCopiedToolHandle->doIt(); + m_myCopiedConstToolHandle2->doIt(); + } + + info() << "tools copied constructed via ToolHandle<T>...." << endmsg; + + // copy construct some handles + ToolHandle<IMyTool> h1( m_myPrivToolHandle ); + h1->doIt(); + + if ( !m_privateToolsOnly ) { + ToolHandle<const IMyTool> h2( m_myPubToolHandle ); + ToolHandle<const IMyTool> h3( m_myConstToolHandle ); + h2->doIt(); + h3->doIt(); + } return StatusCode::SUCCESS; } @@ -91,14 +135,10 @@ StatusCode MyAlgorithm::finalize() { //------------------------------------------------------------------------------ info() << "finalizing...." << endmsg; - if ( !m_privateToolsOnly ) { - toolSvc()->releaseTool( m_publicTool ).ignore(); - toolSvc()->releaseTool( m_publicGTool ).ignore(); - } + if ( !m_privateToolsOnly ) { toolSvc()->releaseTool( m_publicTool ).ignore(); } toolSvc()->releaseTool( m_privateTool ).ignore(); - toolSvc()->releaseTool( m_privateGTool ).ignore(); toolSvc()->releaseTool( m_privateToolWithName ).ignore(); toolSvc()->releaseTool( m_privateOtherInterface ).ignore(); - return StatusCode::SUCCESS; + return TestAlg::finalize(); } diff --git a/GaudiExamples/src/AlgTools/MyAlgorithm.h b/GaudiExamples/src/AlgTools/MyAlgorithm.h index 9fb4babb2d5c0aa15eebc7efbd1dbd9c99770ac7..220ed98ccf0f237688a3abc3345bc39f1d339b81 100644 --- a/GaudiExamples/src/AlgTools/MyAlgorithm.h +++ b/GaudiExamples/src/AlgTools/MyAlgorithm.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,26 +8,20 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDIEXAMPLE_MYALGORITHM_H -#define GAUDIEXAMPLE_MYALGORITHM_H 1 +#pragma once -// Include files -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/MsgStream.h" -#include <Gaudi/Property.h> - -// Forward references -class IMyTool; +#include "IMyTool.h" +#include <Gaudi/Examples/TestAlg.h> /** @class MyAlgorithm - Trivial Algorithm for tutotial purposes + Trivial Algorithm for tutorial purposes @author nobody */ -class MyAlgorithm : public Algorithm { +class MyAlgorithm : public Gaudi::Examples::TestAlg { public: - /// Constructor of this form must be provided - using Algorithm::Algorithm; + /// Constructor of this form must be provided or inherited from the base class + MyAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ); /// Three mandatory member functions of any algorithm StatusCode initialize() override; @@ -41,14 +35,34 @@ private: "Type of the tool to use (internal name is ToolWithName)" }; Gaudi::Property<bool> m_privateToolsOnly{ this, "PrivateToolsOnly", false, "Do not look for public tools." }; - IMyTool* m_privateTool = nullptr; - IMyTool* m_publicTool = nullptr; - IMyTool* m_privateGTool = nullptr; - IMyTool* m_publicGTool = nullptr; + IMyTool* m_privateTool = nullptr; + IMyTool* m_publicTool = nullptr; IMyTool* m_privateToolWithName = nullptr; IMyOtherTool* m_privateOtherInterface = nullptr; -}; -#endif // GAUDIEXAMPLE_MYALGORITHM_H + ToolHandle<IMyTool> m_legacyToolHandle{ "MyTool/LegacyToolHandle", this }; + + ToolHandle<IMyTool> m_myPrivToolHandle{ this, "PrivToolHandle", "MyTool/PrivToolHandle" }; + PublicToolHandle<IMyTool> m_myPubToolHandle{ this, "PubToolHandle", "MyTool/PubToolHandle" }; + + PublicToolHandle<IAlgTool> m_myGenericToolHandle{ this, "GenericToolHandle", "MyTool/GenericToolHandle" }; + + ToolHandle<IAlgTool> m_myUnusedToolHandle{ this, "UnusedToolHandle", "TestToolFailing/UnusedToolHandle" }; + + ToolHandle<IMyTool> m_undefinedToolHandle{ this }; + ToolHandle<IMyTool> m_invalidToolHandle{ this, "InvalidToolHandle", "TestToolFailing" }; + + ToolHandle<IWrongTool> m_wrongIfaceTool{ this, "WrongIfaceTool", "MyTool/WrongIfaceTool" }; + + PublicToolHandle<const IMyTool> m_myConstToolHandle{ "MyTool/ConstGenericToolHandle" }; + + PublicToolHandle<const IMyTool> m_myCopiedConstToolHandle; + PublicToolHandle<const IMyTool> m_myCopiedConstToolHandle2; + PublicToolHandle<IMyTool> m_myCopiedToolHandle; + + PublicToolHandleArray<IMyTool> m_tha{ this, + "MyPublicToolHandleArrayProperty", + { "MyTool/AnotherConstGenericToolHandle", "MyTool/AnotherInstanceOfMyTool" } }; +}; diff --git a/GaudiExamples/src/AlgTools/MyTool.cpp b/GaudiExamples/src/AlgTools/MyTool.cpp index 983f7b85ef11f9e8c95f4e703867c357c6ed8b77..edcd9bee9d891a4a50e40073eca56d9f25c1e02a 100644 --- a/GaudiExamples/src/AlgTools/MyTool.cpp +++ b/GaudiExamples/src/AlgTools/MyTool.cpp @@ -36,6 +36,13 @@ void MyTool::doIt() const debug() << "doIt() [DEBUG] has been called" << endmsg; } +//------------------------------------------------------------------------------ +void MyTool::doItAgain() const +//------------------------------------------------------------------------------ +{ + info() << "doItAgain() has been called" << endmsg; +} + //------------------------------------------------------------------------------ StatusCode MyTool::initialize() //------------------------------------------------------------------------------ diff --git a/GaudiExamples/src/AlgTools/MyTool.h b/GaudiExamples/src/AlgTools/MyTool.h index b5f7bd5e014af2b4027ec2bec5a0f3869596a798..53cf9772d77f6b9b8995d3e11e1ed10771fa56ae 100644 --- a/GaudiExamples/src/AlgTools/MyTool.h +++ b/GaudiExamples/src/AlgTools/MyTool.h @@ -21,7 +21,7 @@ * @author Pere Mato * @date 14/10/2001 */ -class MyTool : public extends<AlgTool, IMyTool> { +class MyTool : public extends<AlgTool, IMyTool, IMyOtherTool> { public: /// Standard Constructor using extends::extends; @@ -29,6 +29,8 @@ public: /// IMyTool interface const std::string& message() const override; void doIt() const override; + // IMyOtherTool interface + void doItAgain() const override; /// Overriding initialize and finalize StatusCode initialize() override; diff --git a/GaudiExamples/src/AlgTools/TestTool.cpp b/GaudiExamples/src/AlgTools/TestTool.cpp index e480cdddce1ce86bb97049e3f0cf37fc023c93e9..236cc1d4cbfe04cd317a4a60fa37ad639e8ded01 100644 --- a/GaudiExamples/src/AlgTools/TestTool.cpp +++ b/GaudiExamples/src/AlgTools/TestTool.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,12 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files - -// from Gaudi -#include "GaudiKernel/MsgStream.h" - -// local #include "TestTool.h" //----------------------------------------------------------------------------- @@ -30,7 +24,7 @@ DECLARE_COMPONENT( TestTool ) StatusCode TestTool::initialize() { debug() << "Initialize" << endmsg; - if ( !GaudiTool::initialize() ) return StatusCode::FAILURE; + if ( !base_class::initialize() ) return StatusCode::FAILURE; // setup tool registry // IAlgTool * mytool; @@ -43,7 +37,8 @@ StatusCode TestTool::initialize() { name = i.substr( slash + 1 ); } debug() << "Loading tool " << name << " of type " << type << endmsg; - /* mytool = */ tool<IAlgTool>( type, name ); + IAlgTool* tmp = nullptr; + toolSvc()->retrieve( type, name, IAlgTool::interfaceID(), tmp ).ignore(); } return StatusCode::SUCCESS; @@ -51,5 +46,5 @@ StatusCode TestTool::initialize() { StatusCode TestTool::finalize() { debug() << "Finalize" << endmsg; - return GaudiTool::finalize(); + return base_class::finalize(); } diff --git a/GaudiExamples/src/AlgTools/TestTool.h b/GaudiExamples/src/AlgTools/TestTool.h index 3f85f33e3d421f21ae6b8214e41370c9aa7b4514..0a518270b1b9517f446a6253a9164363301df3df 100644 --- a/GaudiExamples/src/AlgTools/TestTool.h +++ b/GaudiExamples/src/AlgTools/TestTool.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,17 +8,11 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef TESTTOOL_H -#define TESTTOOL_H 1 - -// Include files -// from STL -#include <string> - -// from Gaudi -#include "GaudiAlg/GaudiTool.h" +#pragma once #include "ITestTool.h" +#include <GaudiKernel/AlgTool.h> +#include <string> /** @class TestTool TestTool.h * @@ -27,7 +21,7 @@ * @date 2004-03-08 */ -class TestTool : public extends<GaudiTool, ITestTool> { +class TestTool : public extends<AlgTool, ITestTool> { public: /// Standard constructor @@ -42,4 +36,3 @@ public: private: Gaudi::Property<std::vector<std::string>> m_tools{ this, "Tools", {}, "list of tools to test" }; }; -#endif // TESTTOOL_H diff --git a/GaudiExamples/src/AlgTools/TestToolAlg.cpp b/GaudiExamples/src/AlgTools/TestToolAlg.cpp index 14ca3aa2e4b2c2cf57b21e7d331c9822a8fa9f91..2578ddff79b57b5d7483cc304b0b665b121e945b 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlg.cpp +++ b/GaudiExamples/src/AlgTools/TestToolAlg.cpp @@ -32,7 +32,7 @@ StatusCode TestToolAlg::initialize() { debug() << "Initialise" << endmsg; - if ( !GaudiAlgorithm::initialize() ) return StatusCode::FAILURE; + if ( !Algorithm::initialize() ) return StatusCode::FAILURE; // setup tool registry // IAlgTool * mytool; @@ -45,7 +45,8 @@ StatusCode TestToolAlg::initialize() { name = i.substr( slash + 1 ); } debug() << "Loading tool " << name << " of type " << type << endmsg; - /*mytool = */ tool<IAlgTool>( type, name ); + IAlgTool* tmp = nullptr; + toolSvc()->retrieve( type, name, IAlgTool::interfaceID(), tmp ).ignore(); } return StatusCode::SUCCESS; @@ -68,7 +69,7 @@ StatusCode TestToolAlg::finalize() { debug() << "Finalize" << endmsg; - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } //============================================================================= diff --git a/GaudiExamples/src/AlgTools/TestToolAlg.h b/GaudiExamples/src/AlgTools/TestToolAlg.h index 867ba0bbffe5eaae4ca2bd2c2f8a2931bc0d4aad..1803d61214ed58c0c92a5a066e7e565b378b4352 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlg.h +++ b/GaudiExamples/src/AlgTools/TestToolAlg.h @@ -15,7 +15,7 @@ #include <string> // base class -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class RichToolTest RichToolTest.h component/RichToolTest.h * @@ -24,11 +24,11 @@ * @date 2004-03-08 */ -class TestToolAlg : public GaudiAlgorithm { +class TestToolAlg : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution diff --git a/GaudiExamples/src/AlgTools/TestToolAlgFailure.cpp b/GaudiExamples/src/AlgTools/TestToolAlgFailure.cpp index 4ea67e9f9ef5b2ac226132ed7a54fbe8733ce4ec..05cf5c07daef46acdcac8d227dffa07026de357e 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlgFailure.cpp +++ b/GaudiExamples/src/AlgTools/TestToolAlgFailure.cpp @@ -32,14 +32,15 @@ StatusCode TestToolAlgFailure::initialize() { debug() << "Initialize" << endmsg; - if ( !GaudiAlgorithm::initialize() ) return StatusCode::FAILURE; + if ( !Algorithm::initialize() ) return StatusCode::FAILURE; // setup tool registry // IAlgTool * mytool; for ( const auto& i : m_tools ) { info() << "Loading tool " << i << endmsg; try { - /* mytool = */ tool<IAlgTool>( i ); + IAlgTool* tmp = nullptr; + toolSvc()->retrieve( i, IAlgTool::interfaceID(), tmp ).orThrow( "failed to load tool " + i ); info() << "Tool loaded successfully" << endmsg; } catch ( GaudiException& e ) { if ( m_ignoreFailure ) { @@ -72,7 +73,7 @@ StatusCode TestToolAlgFailure::finalize() { info() << "Finalize" << endmsg; - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } //============================================================================= diff --git a/GaudiExamples/src/AlgTools/TestToolAlgFailure.h b/GaudiExamples/src/AlgTools/TestToolAlgFailure.h index 120a91a5c24a59d7fafc9a993146d46d459b5239..0bcd05d38d97769ea581fa025bd4bbf51151a47a 100644 --- a/GaudiExamples/src/AlgTools/TestToolAlgFailure.h +++ b/GaudiExamples/src/AlgTools/TestToolAlgFailure.h @@ -15,7 +15,7 @@ #include <string> // base class -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class TestToolAlgFailure * @@ -25,11 +25,11 @@ * @date 2008-10-22 */ -class TestToolAlgFailure : public GaudiAlgorithm { +class TestToolAlgFailure : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; StatusCode execute() override; diff --git a/GaudiExamples/src/AlgTools/TestToolFailing.cpp b/GaudiExamples/src/AlgTools/TestToolFailing.cpp index 75f4e3027698c00ee77088de7cc1d2f4f0b98c20..add73da7115a8b93d862e0d257ccdf9563a20a6d 100644 --- a/GaudiExamples/src/AlgTools/TestToolFailing.cpp +++ b/GaudiExamples/src/AlgTools/TestToolFailing.cpp @@ -16,11 +16,11 @@ */ // from Gaudi -#include "GaudiAlg/GaudiTool.h" +#include "GaudiKernel/AlgTool.h" #include "ITestTool.h" -class TestToolFailing : public extends<GaudiTool, ITestTool> { +class TestToolFailing : public extends<AlgTool, ITestTool> { public: using extends::extends; @@ -34,7 +34,8 @@ DECLARE_COMPONENT( TestToolFailing ) StatusCode TestToolFailing::initialize() { debug() << "Initialize" << endmsg; - if ( !GaudiTool::initialize() ) return StatusCode::FAILURE; + if ( !base_class::initialize() ) return StatusCode::FAILURE; - return Error( "Initialization failure" ); + error() << "Initialization failure" << endmsg; + return StatusCode::FAILURE; } diff --git a/GaudiExamples/src/AnyData/AnyDataAlgorithm.cpp b/GaudiExamples/src/AnyData/AnyDataAlgorithm.cpp index 783bde2c23b53b565fe8f668d9507d0094fb177b..6b2c87110ba2a5ac13954d56678aa5182e6915fa 100644 --- a/GaudiExamples/src/AnyData/AnyDataAlgorithm.cpp +++ b/GaudiExamples/src/AnyData/AnyDataAlgorithm.cpp @@ -8,7 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" #include "GaudiKernel/AnyDataWrapper.h" #include "GaudiKernel/DataObjectHandle.h" #include <string> @@ -24,13 +24,13 @@ * @author Roel Aaij * @date 2016-05-26 */ -class AnyDataPutAlgorithm : public GaudiAlgorithm { +class AnyDataPutAlgorithm : public Algorithm { Gaudi::Property<std::string> m_loc{ this, "Location", "Test" }; DataObjectWriteHandle<std::vector<int>> m_ids{ this, "Output", "/Event/Test/Ids" }; std::vector<DataObjectWriteHandle<int>> m_id_vec; public: - AnyDataPutAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) : GaudiAlgorithm( name, pSvcLocator ) { + AnyDataPutAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) : Algorithm( name, pSvcLocator ) { for ( int i = 0; i < 100; i++ ) { m_id_vec.emplace_back( "/Event/Test/Ids" + std::to_string( i ), this ); } } @@ -40,8 +40,12 @@ public: auto i = std::make_unique<AnyDataWrapper<int>>( 0 ); auto j = std::make_unique<AnyDataWrapper<std::vector<int>>>( std::vector<int>{ 0, 1, 2, 3 } ); - put( std::move( i ), m_loc + "/One" ); - put( std::move( j ), m_loc + "/Two" ); + eventSvc() + ->registerObject( m_loc.value() + "/One", i.release() ) + .orThrow( "failed to register " + m_loc.value() + "/One" ); + eventSvc() + ->registerObject( m_loc.value() + "/Two", j.release() ) + .orThrow( "failed to register " + m_loc.value() + "/Two" ); m_ids.put( std::vector<int>( { 42, 84 } ) ); @@ -60,19 +64,26 @@ DECLARE_COMPONENT( AnyDataPutAlgorithm ) * @date 2016-05-26 */ template <class T> -class AnyDataGetAlgorithm : public GaudiAlgorithm { +class AnyDataGetAlgorithm : public Algorithm { Gaudi::Property<std::string> m_location{ this, "Location" }; DataObjectReadHandle<std::vector<int>> m_ids{ this, "Input", "/Event/Test/Ids" }; public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Execute" << endmsg; - auto base = getIfExists<AnyDataWrapperBase>( m_location ); - if ( base ) { info() << "Got base from " << m_location.value() << endmsg; } + DataObject* tmp = nullptr; + eventSvc()->retrieveObject( m_location, tmp ).ignore(); + auto base = dynamic_cast<AnyDataWrapperBase*>( tmp ); + if ( base ) { + info() << "Got base from " << m_location.value() << endmsg; + } else { + error() << "failed to get base from " << m_location.value() << endmsg; + return StatusCode::FAILURE; + } const auto i = dynamic_cast<const AnyDataWrapper<T>*>( base ); if ( i ) { info() << "Got " << System::typeinfoName( typeid( T ) ) << " from " << m_location.value() << ": " << i->getData() diff --git a/GaudiExamples/src/AnyData/AnyViewAlgorithm.cpp b/GaudiExamples/src/AnyData/AnyViewAlgorithm.cpp index da9418ea3230d0338cedbb6797ec09bd0e13ab4a..0f7754f07ffae01cc55f79ecd72fbd2a6653e252 100644 --- a/GaudiExamples/src/AnyData/AnyViewAlgorithm.cpp +++ b/GaudiExamples/src/AnyData/AnyViewAlgorithm.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,10 +8,10 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/Consumer.h" -#include "GaudiAlg/Producer.h" -#include "GaudiKernel/Algorithm.h" -#include "GaudiKernel/DataObjectHandle.h" +#include <Gaudi/Functional/Consumer.h> +#include <Gaudi/Functional/Producer.h> +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataObjectHandle.h> #include <gsl/span> #include <string> #include <string_view> diff --git a/GaudiExamples/src/Auditors/AuditorTestAlg.cpp b/GaudiExamples/src/Auditors/AuditorTestAlg.cpp index c895467d4aeefccd5448ae91a5bf3f864e208ca2..36c1ec9b0db8998527f1530b624dcd433ffd95bb 100644 --- a/GaudiExamples/src/Auditors/AuditorTestAlg.cpp +++ b/GaudiExamples/src/Auditors/AuditorTestAlg.cpp @@ -10,7 +10,7 @@ \***********************************************************************************/ // Include files // from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class AuditorTestAlg AuditorTestAlg.cpp * @@ -18,7 +18,7 @@ * @author Marco Clemencic * @date Apr 2, 2008 */ -class AuditorTestAlg : public GaudiAlgorithm { +class AuditorTestAlg : public Algorithm { public: /// Standard constructor AuditorTestAlg( const std::string& name, ISvcLocator* pSvcLocator ); @@ -45,8 +45,7 @@ DECLARE_COMPONENT( AuditorTestAlg ) //============================================================================= // Standard constructor, initializes variables //============================================================================= -AuditorTestAlg::AuditorTestAlg( const std::string& name, ISvcLocator* pSvcLocator ) - : GaudiAlgorithm( name, pSvcLocator ) {} +AuditorTestAlg::AuditorTestAlg( const std::string& name, ISvcLocator* pSvcLocator ) : Algorithm( name, pSvcLocator ) {} //============================================================================= // Destructor //============================================================================= @@ -56,8 +55,8 @@ AuditorTestAlg::~AuditorTestAlg() {} // Initialization //============================================================================= StatusCode AuditorTestAlg::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm debug() << "==> Initialize" << endmsg; @@ -86,7 +85,7 @@ StatusCode AuditorTestAlg::finalize() { debug() << "==> Finalize" << endmsg; - return GaudiAlgorithm::finalize(); // must be called after all other actions + return Algorithm::finalize(); // must be called after all other actions } //============================================================================= diff --git a/GaudiExamples/src/CounterEx/CounterAlg.cpp b/GaudiExamples/src/CounterEx/CounterAlg.cpp index 613ab63f8d6bef0a83b19098272acfcd0770c262..053e5128c06c911ab3eb8b893d2ee9d296639879 100644 --- a/GaudiExamples/src/CounterEx/CounterAlg.cpp +++ b/GaudiExamples/src/CounterEx/CounterAlg.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,10 +9,8 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "Gaudi/Accumulators.h" - -#include "GaudiAlg/Consumer.h" - +#include <Gaudi/Accumulators.h> +#include <Gaudi/Functional/Consumer.h> #include <deque> #include <fmt/format.h> #include <mutex> diff --git a/GaudiExamples/src/CounterEx/StatSvcAlg.cpp b/GaudiExamples/src/CounterEx/StatSvcAlg.cpp index 987947a47e22ec3588cf09bc8a1673812f1e5fdb..98f07aba08b71dc717ec1520daa97e3ee456bdd8 100644 --- a/GaudiExamples/src/CounterEx/StatSvcAlg.cpp +++ b/GaudiExamples/src/CounterEx/StatSvcAlg.cpp @@ -22,7 +22,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" // ============================================================================ /** @file * Simple example to illustrate the statistical abilities of @@ -47,14 +47,14 @@ namespace GaudiExamples { * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2008-07-08 */ - class StatSvcAlg : public GaudiAlgorithm { + class StatSvcAlg : public Algorithm { public: /// standard constructor from name and Service Locator - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; /// initialize the algorithm StatusCode initialize() override { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( sc.isFailure() ) return sc; // RETURN m_stat = service( "ChronoStatSvc", true ); return StatusCode::SUCCESS; diff --git a/GaudiExamples/src/DataOnDemand/DataCreator.cpp b/GaudiExamples/src/DataOnDemand/DataCreator.cpp index ddee6d54d74365dc5f173e71631c303dc28e4e86..55080fe1fce2529a12e79360213895f1e9a47dab 100644 --- a/GaudiExamples/src/DataOnDemand/DataCreator.cpp +++ b/GaudiExamples/src/DataOnDemand/DataCreator.cpp @@ -25,8 +25,7 @@ StatusCode DataCreator::initialize() { StatusCode DataCreator::execute() { //------------------------------------------------------------------------------ info() << "executing...." << endmsg; - put( new DataObject(), m_data ); - return StatusCode::SUCCESS; + return eventSvc()->registerObject( m_data, new DataObject() ); } //------------------------------------------------------------------------------ diff --git a/GaudiExamples/src/DataOnDemand/DataCreator.h b/GaudiExamples/src/DataOnDemand/DataCreator.h index cfa27a20fc93ae71f2e960d6c7aa0ee6d58b794d..e32a0b226045c66e712733d97215325a4a853b47 100644 --- a/GaudiExamples/src/DataOnDemand/DataCreator.h +++ b/GaudiExamples/src/DataOnDemand/DataCreator.h @@ -12,16 +12,16 @@ #define GAUDIEXAMPLE_DATACREATOR_H 1 // Include files -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class DataCreator Trivial Algorithm for test purposes @author nobody */ -class DataCreator : public GaudiAlgorithm { +class DataCreator : public Algorithm { public: /// Constructor of this form must be provided - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; /// Three mandatory member functions of any algorithm StatusCode initialize() override; diff --git a/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.cpp b/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.cpp index c9ee1380912739d331d035a59c7d5b0ef0d82e65..54074d06f43b0ffde57a3ba543aba8b5ea00ebd7 100644 --- a/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.cpp +++ b/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.cpp @@ -18,7 +18,7 @@ DECLARE_COMPONENT( MyDataAlgorithm ) // Constructor //------------------------------------------------------------------------------ -MyDataAlgorithm::MyDataAlgorithm( const std::string& name, ISvcLocator* ploc ) : GaudiAlgorithm( name, ploc ) { +MyDataAlgorithm::MyDataAlgorithm( const std::string& name, ISvcLocator* ploc ) : Algorithm( name, ploc ) { //------------------------------------------------------------------------------ } @@ -36,8 +36,9 @@ StatusCode MyDataAlgorithm::initialize() { StatusCode MyDataAlgorithm::execute() { //------------------------------------------------------------------------------ info() << "executing...." << endmsg; - get<DataObject>( "Rec/Muon/Digits" ); - get<DataObject>( "Rec/Muon/Foos" ); + DataObject* tmp = nullptr; + eventSvc()->retrieveObject( "Rec/Muon/Digits", tmp ).ignore(); + eventSvc()->retrieveObject( "Rec/Muon/Foos", tmp ).ignore(); info() << "....execution done" << endmsg; return StatusCode::SUCCESS; } diff --git a/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.h b/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.h index bae723e0ef4df853975ff7698dd4a72f180417c5..9392f1994b29ec2940d01cc5b4576413525a2e18 100644 --- a/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.h +++ b/GaudiExamples/src/DataOnDemand/MyDataAlgorithm.h @@ -12,14 +12,14 @@ #define GAUDIEXAMPLE_MyDataAlgorithm_H 1 // Include files -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class MyDataAlgorithm Trivial Algorithm for tutotial purposes @author nobody */ -class MyDataAlgorithm : public GaudiAlgorithm { +class MyDataAlgorithm : public Algorithm { public: /// Constructor of this form must be provided MyDataAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ); diff --git a/GaudiExamples/src/ExtendedProperties/BoostArrayProperties.cpp b/GaudiExamples/src/ExtendedProperties/BoostArrayProperties.cpp index 8c86e38e6a115126a756b5dcf3db523e056460f2..e6a159ee1f8ac6efa4e01313090546cccd4b19b5 100644 --- a/GaudiExamples/src/ExtendedProperties/BoostArrayProperties.cpp +++ b/GaudiExamples/src/ExtendedProperties/BoostArrayProperties.cpp @@ -17,7 +17,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include <Gaudi/Examples/TestAlg.h> // ============================================================================ // Boots // ============================================================================ @@ -33,7 +33,7 @@ namespace Gaudi { // ========================================================================== namespace Examples { // ======================================================================== - class BoostArrayProperties : public GaudiAlgorithm { + class BoostArrayProperties : public TestAlg { public: // ====================================================================== /// execute it! @@ -42,7 +42,7 @@ namespace Gaudi { public: // ====================================================================== /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using TestAlg::TestAlg; // ====================================================================== private: // ====================================================================== diff --git a/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp b/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp index 052d81f460902280264cba6529fda914a8b3c0ac..98818a79151693a4fbf3c1d60ffde35acd9476b6 100644 --- a/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp +++ b/GaudiExamples/src/ExtendedProperties/ExtendedProperties.cpp @@ -31,7 +31,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" // ============================================================================ #ifdef __ICC @@ -55,11 +55,11 @@ * @date 2006-03-21 */ -class ExtendedProperties : public GaudiAlgorithm { +class ExtendedProperties : public Algorithm { public: StatusCode execute() override; - ExtendedProperties( const std::string& name, ISvcLocator* pSvc ) : GaudiAlgorithm( name, pSvc ) { + ExtendedProperties( const std::string& name, ISvcLocator* pSvc ) : Algorithm( name, pSvc ) { setProperty( "PropertiesPrint", true ).ignore(); m_20["key"] = "value"; diff --git a/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp b/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp index 4a55597d47d7a9a52952165bec033bb48ec2d7fc..0313c45160d77efc737c18b61bdc18bbe7bfcdb8 100644 --- a/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp +++ b/GaudiExamples/src/ExtendedProperties/ExtendedProperties2.cpp @@ -31,7 +31,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include <Gaudi/Examples/TestAlg.h> // ============================================================================ /** @file @@ -50,7 +50,7 @@ namespace Gaudi { * @author Vanya BELYAEV ibelyaev@physics.syr.edu * @date 2009-09-05 */ - class ExtendedProperties2 : public GaudiAlgorithm { + class ExtendedProperties2 : public TestAlg { public: // ====================================================================== StatusCode execute() override; @@ -61,7 +61,7 @@ namespace Gaudi { * @param name algorithm instance name * @param pSvc pointer to Service Locator */ - ExtendedProperties2( const std::string& name, ISvcLocator* pSvc ) : GaudiAlgorithm( name, pSvc ) { + ExtendedProperties2( const std::string& name, ISvcLocator* pSvc ) : TestAlg( name, pSvc ) { setProperty( "PropertiesPrint", true ).ignore(); } // ====================================================================== diff --git a/GaudiAlg/include/GaudiAlg/ListTransformer.h b/GaudiExamples/src/FunctionalAlgorithms/EventCounter.cpp similarity index 54% rename from GaudiAlg/include/GaudiAlg/ListTransformer.h rename to GaudiExamples/src/FunctionalAlgorithms/EventCounter.cpp index 4e4011f16b0d35e452c5a729b750159fe35889ca..602b32d7890ccce162666b9d088014b27a7e2213 100644 --- a/GaudiAlg/include/GaudiAlg/ListTransformer.h +++ b/GaudiExamples/src/FunctionalAlgorithms/EventCounter.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,20 +8,16 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef LISTS_TRANSFORMER_H -#define LISTS_TRANSFORMER_H +#include <Gaudi/Accumulators.h> +#include <Gaudi/Functional/Consumer.h> -#include "GaudiAlg/MergingTransformer.h" +namespace Gaudi::Examples { + struct EventCounter final : Gaudi::Functional::Consumer<void()> { + using Consumer::Consumer; -namespace Gaudi { - namespace Functional { - template <typename Container> - using vector_of_ = details::template vector_of_const_<Container>; - template <typename Signature, typename Traits_ = Traits::useDefaults> - struct [[deprecated( "use MergingTransformer instead" )]] ListTransformer : MergingTransformer<Signature, Traits_> { - using MergingTransformer<Signature, Traits_>::MergingTransformer; - }; - } // namespace Functional -} // namespace Gaudi + void operator()() const override { ++m_count; } -#endif + mutable Gaudi::Accumulators::Counter<> m_count{ this, "count" }; + }; + DECLARE_COMPONENT( EventCounter ); +} // namespace Gaudi::Examples diff --git a/GaudiExamples/src/FunctionalAlgorithms/MakeAndConsume.cpp b/GaudiExamples/src/FunctionalAlgorithms/MakeAndConsume.cpp index 5e1150878e77c98d8171ef0575d591c6ca367d5b..e80aabb6d63af17da308cdc90c775b0c5a816300 100644 --- a/GaudiExamples/src/FunctionalAlgorithms/MakeAndConsume.cpp +++ b/GaudiExamples/src/FunctionalAlgorithms/MakeAndConsume.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,18 +8,19 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/Consumer.h" -#include "GaudiAlg/FunctionalTool.h" -#include "GaudiAlg/MergingTransformer.h" -#include "GaudiAlg/Producer.h" -#include "GaudiAlg/ScalarTransformer.h" -#include "GaudiAlg/SplittingMergingTransformer.h" -#include "GaudiAlg/Transformer.h" -#include "GaudiKernel/AlgTool.h" -#include "GaudiKernel/IAlgTool.h" -#include "GaudiKernel/IBinder.h" -#include "GaudiKernel/KeyedContainer.h" -#include "GaudiKernel/SharedObjectsContainer.h" +#include <Gaudi/Accumulators.h> +#include <Gaudi/Functional/Consumer.h> +#include <Gaudi/Functional/MergingTransformer.h> +#include <Gaudi/Functional/Producer.h> +#include <Gaudi/Functional/ScalarTransformer.h> +#include <Gaudi/Functional/SplittingMergingTransformer.h> +#include <Gaudi/Functional/ToolBinder.h> +#include <Gaudi/Functional/Transformer.h> +#include <GaudiKernel/AlgTool.h> +#include <GaudiKernel/IAlgTool.h> +#include <GaudiKernel/IBinder.h> +#include <GaudiKernel/KeyedContainer.h> +#include <GaudiKernel/SharedObjectsContainer.h> #include <cmath> #include <numeric> #include <optional> diff --git a/GaudiExamples/src/FunctionalAlgorithms/Prescaler.cpp b/GaudiExamples/src/FunctionalAlgorithms/Prescaler.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1017ff7caae31b8c9cda957ef28a8f9488f2ab57 --- /dev/null +++ b/GaudiExamples/src/FunctionalAlgorithms/Prescaler.cpp @@ -0,0 +1,34 @@ +/***********************************************************************************\ +* (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#include <Gaudi/Accumulators.h> +#include <Gaudi/Functional/FilterPredicate.h> + +namespace Gaudi::Examples { + struct Prescaler final : Gaudi::Functional::FilterPredicate<bool()> { + Prescaler( const std::string& name, ISvcLocator* pSvc ) : FilterPredicate( name, pSvc ) { + m_percentPass.verifier().setBounds( 0, 100 ); + } + + bool operator()() const override { + // if the current pass efficiency is less then requested, we let the event go through + const bool pass = m_passed.eff() * 100. <= m_percentPass; + m_passed += pass; + if ( msgLevel( MSG::DEBUG ) ) { debug() << ( pass ? "filter passed" : "filter failed" ) << endmsg; } + return pass; + } + + Gaudi::CheckedProperty<double> m_percentPass{ this, "PercentPass", 100.0, + "percentage of events that should be passed" }; + + mutable Gaudi::Accumulators::BinomialCounter<> m_passed{ this, "passed" }; + }; + DECLARE_COMPONENT( Prescaler ); +} // namespace Gaudi::Examples diff --git a/GaudiExamples/src/FunctionalAlgorithms/TestObjectVersion.cpp b/GaudiExamples/src/FunctionalAlgorithms/TestObjectVersion.cpp index b1139f94d1c184a75088c66291e7d58a7f8cb14b..9b9000dc6928be41fa91ef6be2b2483a6d10dfc7 100644 --- a/GaudiExamples/src/FunctionalAlgorithms/TestObjectVersion.cpp +++ b/GaudiExamples/src/FunctionalAlgorithms/TestObjectVersion.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,8 +8,8 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include <GaudiAlg/Consumer.h> -#include <GaudiAlg/Producer.h> +#include <Gaudi/Functional/Consumer.h> +#include <Gaudi/Functional/Producer.h> #include <GaudiKernel/KeyedContainer.h> namespace Gaudi { diff --git a/GaudiExamples/src/FunctionalAlgorithms/merging_transformer.cpp b/GaudiExamples/src/FunctionalAlgorithms/merging_transformer.cpp index c09fdc08999d801f706b45a2647ca2019292be81..bd2cc3bf5131c1c0b1fe5f27cb9945adb4e88e49 100644 --- a/GaudiExamples/src/FunctionalAlgorithms/merging_transformer.cpp +++ b/GaudiExamples/src/FunctionalAlgorithms/merging_transformer.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,7 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/MergingTransformer.h" +#include <Gaudi/Functional/MergingTransformer.h> #include <string> using ints = Gaudi::Functional::vector_of_const_<int>; diff --git a/GaudiExamples/src/FunctionalAlgorithms/selector.cpp b/GaudiExamples/src/FunctionalAlgorithms/selector.cpp index 8b7c39334cc6f9e797c8757b10bab6fbcd984906..460df88b60e49afe16a8e41c0f109284c601172c 100644 --- a/GaudiExamples/src/FunctionalAlgorithms/selector.cpp +++ b/GaudiExamples/src/FunctionalAlgorithms/selector.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,14 +8,11 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ +#include <Gaudi/Functional/FilterPredicate.h> +#include <GaudiExamples/MyTrack.h> #include <algorithm> #include <atomic> -#include "GaudiAlg/FilterPredicate.h" - -// Event Model related classes -#include "GaudiExamples/MyTrack.h" - namespace Gaudi { namespace Examples { diff --git a/GaudiExamples/src/FunctionalAlgorithms/transformer.cpp b/GaudiExamples/src/FunctionalAlgorithms/transformer.cpp index 800ea8145a5ae148e8f205f8cd8ef3e4dafbe04b..c4e724374061793193f68b31c8d3f2018d011af0 100644 --- a/GaudiExamples/src/FunctionalAlgorithms/transformer.cpp +++ b/GaudiExamples/src/FunctionalAlgorithms/transformer.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,13 +8,10 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ +#include <Gaudi/Functional/Transformer.h> +#include <GaudiExamples/MyTrack.h> #include <algorithm> -#include "GaudiAlg/Transformer.h" - -// Event Model related classes -#include "GaudiExamples/MyTrack.h" - namespace Gaudi { namespace Examples { diff --git a/GaudiExamples/src/Histograms/HistoProps.cpp b/GaudiExamples/src/Histograms/HistoProps.cpp index 1a7f69fd1eb245eabccf4b4dfa93c3ad4d87b28a..2527647db472ae846eb0aeaba0868b764c56f253 100644 --- a/GaudiExamples/src/Histograms/HistoProps.cpp +++ b/GaudiExamples/src/Histograms/HistoProps.cpp @@ -18,7 +18,9 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiHistoAlg.h" +#include "Gaudi/Accumulators/Histogram.h" +#include "GaudiKernel/Algorithm.h" +#include <fmt/format.h> // ============================================================================ /** @file * simple example, which illustrates the usage of "histogram properties" @@ -33,47 +35,49 @@ namespace Gaudi { * @author Vanay BELYAEV ibelyaev@physics.syr.edu * @date 2007-09-18 */ - class HistoProps : public GaudiHistoAlg { + class HistoProps : public ::Algorithm { public: - // ====================================================================== - /// Execute the algorithm - StatusCode execute() override; - // ====================================================================== - public: - // ====================================================================== - /** standard constructor - * @param name algorithm instance name - * @param pSvc Service Locator - */ - HistoProps( const std::string& name, ISvcLocator* pSvc ) : GaudiHistoAlg( name, pSvc ) { - setProperty( "PropertiesPrint", true ).ignore(); - setProperty( "HistoPrint", true ).ignore(); + using Algorithm::Algorithm; + + StatusCode initialize() override { + return Algorithm::initialize().andThen( [&] { + ; + using hist_t = Gaudi::Accumulators::Histogram<1>; + using axis_t = hist_t::AccumulatorType::AxisType; + m_hist1 = std::make_unique<hist_t>( this, "Histo1", "Histogram 1", axis_t{ m_hist1def.value() } ); + m_hist2 = std::make_unique<hist_t>( this, "Histo2", "Histogram 2", axis_t( m_hist2def.value() ) ); + } ); + } + StatusCode execute() override { + Rndm::Numbers gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) ); + + ++( *m_hist1 )[gauss()]; + ++( *m_hist2 )[gauss()]; + + return StatusCode::SUCCESS; + } + StatusCode finalize() override { + auto format = []( std::string_view name, auto& hist ) { + auto data = hist.toJSON(); + return fmt::format( " | {:25} | {:25} | {:7} |", name, data["axis"][0]["title"].template get<std::string>(), + data["nEntries"].template get<unsigned long long>() ); + }; + always() << fmt::format( "Histograms report\n | {:25} | {:25} | {:7} |\n", "name", "title", "entries" ) + << format( "Histo1", *m_hist1 ) << '\n' + << format( "Histo2", *m_hist2 ) << endmsg; + return Algorithm::finalize(); } // ====================================================================== private: - Gaudi::Property<Gaudi::Histo1DDef> m_hist1{ this, "Histo1", Gaudi::Histo1DDef( "Histogram1", -3, 3, 200 ), - "The parameters for the first histogram" }; - Gaudi::Property<Gaudi::Histo1DDef> m_hist2{ + Gaudi::Property<Gaudi::Histo1DDef> m_hist1def{ this, "Histo1", Gaudi::Histo1DDef( "Histogram1", -3, 3, 200 ), + "The parameters for the first histogram" }; + Gaudi::Property<Gaudi::Histo1DDef> m_hist2def{ this, "Histo2", { "Histogram2", -5, 5, 200 }, "The parameters for the second histogram" }; + + std::unique_ptr<Gaudi::Accumulators::Histogram<1>> m_hist1; + std::unique_ptr<Gaudi::Accumulators::Histogram<1>> m_hist2; }; } // namespace Examples } // end of namespace Gaudi -// ============================================================================ -/// the factory (necessary for instantiation) -using Gaudi::Examples::HistoProps; -DECLARE_COMPONENT( HistoProps ) -// ============================================================================ -// Execute the algorithm -// ============================================================================ -StatusCode Gaudi::Examples::HistoProps::execute() { - Rndm::Numbers gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) ); - - plot( gauss(), m_hist1.value() ); - plot( gauss(), m_hist2.value() ); - - return StatusCode::SUCCESS; -} -// ============================================================================ -// The END -// ============================================================================ +DECLARE_COMPONENT( Gaudi::Examples::HistoProps ) diff --git a/GaudiExamples/src/IO/ReadHandleAlg.cpp b/GaudiExamples/src/IO/ReadHandleAlg.cpp index d7f872c56b1c4451f80d7df228ab6db10ec62a38..13f7b5ae233e8e757a71e6552076522c35eddcef 100644 --- a/GaudiExamples/src/IO/ReadHandleAlg.cpp +++ b/GaudiExamples/src/IO/ReadHandleAlg.cpp @@ -9,8 +9,6 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ // Framework include files -#include "GaudiKernel/DataStoreItem.h" -#include "GaudiKernel/MsgStream.h" #include "GaudiKernel/ThreadLocalContext.h" // Example related include files diff --git a/GaudiExamples/src/IO/ReadHandleAlg.h b/GaudiExamples/src/IO/ReadHandleAlg.h index 39cc54e82613f531bf11d5aadd68fa8cca2caa45..75fcedf1855bc084e9202d342e8af1b6d6703faf 100644 --- a/GaudiExamples/src/IO/ReadHandleAlg.h +++ b/GaudiExamples/src/IO/ReadHandleAlg.h @@ -12,11 +12,8 @@ #define GAUDIEXAMPLES_READALG_H // Framework include files -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/IIncidentListener.h" // Required for inheritance - -// Forward declarations -class IIncidentSvc; +#include "GaudiKernel/Algorithm.h" +#include "GaudiKernel/DataObjectHandle.h" // Event Model related classes #include "GaudiExamples/Counter.h" @@ -28,12 +25,12 @@ using namespace Gaudi::Examples; /** @class ReadHandleAlg ReadHandleAlg.h */ -class ReadHandleAlg : public GaudiAlgorithm { +class ReadHandleAlg : public Algorithm { DataObjectReadHandle<Collision> m_inputHandle{ this, "Input", "/Event/MyCollision" }; public: - ReadHandleAlg( const std::string& n, ISvcLocator* l ) : GaudiAlgorithm( n, l ) {} + ReadHandleAlg( const std::string& n, ISvcLocator* l ) : Algorithm( n, l ) {} bool isClonable() const override { return true; } diff --git a/GaudiExamples/src/IO/ReadTES.cpp b/GaudiExamples/src/IO/ReadTES.cpp index 621b79467d700d930115f0794a793bb40f19d144..aa68bec0ff5ef6918c489473522826d077b548b8 100644 --- a/GaudiExamples/src/IO/ReadTES.cpp +++ b/GaudiExamples/src/IO/ReadTES.cpp @@ -26,12 +26,15 @@ DECLARE_COMPONENT( ReadTES ) // Initialization //============================================================================= StatusCode ReadTES::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; - if ( m_locations.empty() ) return Error( "You must define at least one TES Location" ); + if ( m_locations.empty() ) { + error() << "You must define at least one TES Location" << endmsg; + return StatusCode::FAILURE; + } return StatusCode::SUCCESS; } @@ -43,7 +46,8 @@ StatusCode ReadTES::execute() { if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Execute" << endmsg; for ( auto& loc : m_locations ) { - DataObject* pTES = get<DataObject>( loc ); + DataObject* pTES = nullptr; + eventSvc()->retrieveObject( loc, pTES ).ignore(); info() << "Found object " << loc << " at " << pTES << endmsg; } diff --git a/GaudiExamples/src/IO/ReadTES.h b/GaudiExamples/src/IO/ReadTES.h index 61301d0becaf54617fdc6c261f102af04a4edd99..12c5d6f27d3b5e21d717b50723bd4b3207266fd7 100644 --- a/GaudiExamples/src/IO/ReadTES.h +++ b/GaudiExamples/src/IO/ReadTES.h @@ -17,7 +17,7 @@ #include <vector> // from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /** @class ReadTES ReadTES.h * @@ -25,10 +25,10 @@ * @author Marco Cattaneo * @date 2008-11-03 */ -class ReadTES : public GaudiAlgorithm { +class ReadTES : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution diff --git a/GaudiExamples/src/IO/WriteHandleAlg.h b/GaudiExamples/src/IO/WriteHandleAlg.h index 7d2fdd88aae4a597fa94c2c2779fa0a3dbbfdfc3..645c1eff65c0d11c2aba0ebebd71d93887ef7024 100644 --- a/GaudiExamples/src/IO/WriteHandleAlg.h +++ b/GaudiExamples/src/IO/WriteHandleAlg.h @@ -11,7 +11,7 @@ #ifndef HANDLEWRITE_ALG_H #define HANDLEWRITE_ALG_H -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" #include "GaudiKernel/DataObjectHandle.h" @@ -24,9 +24,9 @@ using namespace Gaudi::Examples; //------------------------------------------------------------------------------ -class WriteHandleAlg : public GaudiAlgorithm { +class WriteHandleAlg : public Algorithm { public: - WriteHandleAlg( const std::string& n, ISvcLocator* l ) : GaudiAlgorithm( n, l ) {} + WriteHandleAlg( const std::string& n, ISvcLocator* l ) : Algorithm( n, l ) {} bool isClonable() const override { return true; } diff --git a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.cpp b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.cpp index acd7228b194c6f19e9ac423073e4a7909ff6ff66..5c9e67678ef1315c852f67e759bb59cddb7baaec 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.cpp +++ b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.cpp @@ -24,7 +24,7 @@ std::string& IncidentListenerTestAlg::incident() { return s_incidentType; } //============================================================================= StatusCode IncidentListenerTestAlg::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( sc.isFailure() ) return sc; // get a the incident service @@ -67,5 +67,5 @@ StatusCode IncidentListenerTestAlg::execute() { //============================================================================= StatusCode IncidentListenerTestAlg::finalize() { info() << "Finalize" << endmsg; - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } diff --git a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h index 8ef8387ba3e4e4470cd550d9c7261f0125699832..aa63daf4d1187aefa95ed5ffa0dfa1d5a754b349 100644 --- a/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h +++ b/GaudiExamples/src/IncidentSvc/IncidentListenerTestAlg.h @@ -11,16 +11,16 @@ #ifndef GAUDIEXAMPLES_INCIDENTLISTENERTESTALG_H_ #define GAUDIEXAMPLES_INCIDENTLISTENERTESTALG_H_ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" #include <memory> class IIncidentSvc; class IncidentListenerTest; -class IncidentListenerTestAlg : public GaudiAlgorithm { +class IncidentListenerTestAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; StatusCode execute() override; diff --git a/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp b/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp index 87649f1a2b1d83890c95d7caff617692bf88044a..9c03a52c2aed98d3e98c06d31bb238ce02c2c7c4 100644 --- a/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp +++ b/GaudiExamples/src/IntelProfiler/CpuHungryAlg.cpp @@ -13,15 +13,15 @@ #include <math.h> #include <unistd.h> // Gaudi: -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" /// Algorithm which consume a lot of CPU. /// /// Author: Alexander Mazurov (alexander.mazurov@gmail.com) -class CpuHungryAlg : public GaudiAlgorithm { +class CpuHungryAlg : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution @@ -43,8 +43,8 @@ DECLARE_COMPONENT( CpuHungryAlg ) /// Initialization. StatusCode CpuHungryAlg::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; return StatusCode::SUCCESS; @@ -96,7 +96,7 @@ StatusCode CpuHungryAlg::execute() { StatusCode CpuHungryAlg::finalize() { if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg; - return GaudiAlgorithm::finalize(); // must be called after all other actions + return Algorithm::finalize(); // must be called after all other actions } // ============================================================================ diff --git a/GaudiExamples/src/Maps/MapAlg.cpp b/GaudiExamples/src/Maps/MapAlg.cpp index a5b5a9391a7a864d35e7e346a342752e67663fee..76f7867980fd15eeeabe3decf6852a9565b8a46a 100644 --- a/GaudiExamples/src/Maps/MapAlg.cpp +++ b/GaudiExamples/src/Maps/MapAlg.cpp @@ -23,7 +23,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" // ============================================================================ /** @file * @@ -48,7 +48,7 @@ * @author Vanya BELYAEV ibelyav@physics.syr.edu * @date 2006-11-26 */ -class MapAlg : public GaudiAlgorithm { +class MapAlg : public Algorithm { public: typedef int Key; typedef double Value; @@ -62,7 +62,7 @@ public: << System::typeinfoName( typeid( m_map3 ) ) << endmsg << " \t4) " << System::typeinfoName( typeid( m_map4 ) ) << endmsg; // finalize the base class - return GaudiAlgorithm::finalize(); ///< finalize the base class + return Algorithm::finalize(); ///< finalize the base class }; /// the main execution method StatusCode execute() override; @@ -72,7 +72,7 @@ public: * @param name algoritmm instance name * @param pSvc pointer to Servcie Locator */ - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; /// The copy constructor is disabled MapAlg( const MapAlg& ) = delete; diff --git a/GaudiExamples/src/PartProp/GaudiPPS.cpp b/GaudiExamples/src/PartProp/GaudiPPS.cpp index 7d852e2543723fd56591c9c04d82b1b9bda80f77..88678b1d3c3d38ae78eabdf68057f8f998f7beee 100644 --- a/GaudiExamples/src/PartProp/GaudiPPS.cpp +++ b/GaudiExamples/src/PartProp/GaudiPPS.cpp @@ -28,8 +28,8 @@ namespace GaudiExamples { // Initialization //============================================================================= StatusCode GaudiPPS::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; diff --git a/GaudiExamples/src/PartProp/GaudiPPS.h b/GaudiExamples/src/PartProp/GaudiPPS.h index dd8db58467fb6f51668df1845ad3ad12b9bdb62f..b11e0ebec0dc746870dbb2ba8d7cfaa46e385353 100644 --- a/GaudiExamples/src/PartProp/GaudiPPS.h +++ b/GaudiExamples/src/PartProp/GaudiPPS.h @@ -13,7 +13,7 @@ // Include files // from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" namespace GaudiExamples { /** Small algorithm using Gaudi::ParticlePropertySvc. @@ -21,10 +21,10 @@ namespace GaudiExamples { * @author Marco CLEMENCIC * @date 2008-05-23 */ - class GaudiPPS : public GaudiAlgorithm { + class GaudiPPS : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution diff --git a/GaudiExamples/src/PluginService/SpecialCustomFactory.cpp b/GaudiExamples/src/PluginService/SpecialCustomFactory.cpp index 49a1f46f0c8bf68a26f7ccc0dad8829219f99e7a..22972c6a946e5c597742be39795d6e0e247acf9d 100644 --- a/GaudiExamples/src/PluginService/SpecialCustomFactory.cpp +++ b/GaudiExamples/src/PluginService/SpecialCustomFactory.cpp @@ -9,14 +9,14 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include "Gaudi/PluginService.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" #include <iostream> namespace PluginServiceTest { - class CustomFactoryAlgorithm : public GaudiAlgorithm { + class CustomFactoryAlgorithm : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { info() << "running" << endmsg; diff --git a/GaudiExamples/src/Properties/CustomPropertiesAlg.cpp b/GaudiExamples/src/Properties/CustomPropertiesAlg.cpp index e6f2b9c44db2e008303ff059fbc8eef4ea9e860c..4fb560cb1bec686b62caa5322e2dae7c18c00a1e 100644 --- a/GaudiExamples/src/Properties/CustomPropertiesAlg.cpp +++ b/GaudiExamples/src/Properties/CustomPropertiesAlg.cpp @@ -76,8 +76,8 @@ namespace Gaudi { // Initialization // ============================================================================ StatusCode CustomPropertiesAlg::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = TestAlg::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by TestAlg if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; @@ -105,7 +105,7 @@ namespace Gaudi { // TODO Implement finalize - return GaudiAlgorithm::finalize(); // must be called after all other actions + return TestAlg::finalize(); // must be called after all other actions } } // namespace Examples } // namespace Gaudi diff --git a/GaudiExamples/src/Properties/CustomPropertiesAlg.h b/GaudiExamples/src/Properties/CustomPropertiesAlg.h index 037538c4985c181bb40a1a7f2d068e183f288fcb..6b21c191b551e0d42befccae6e9ad72a1fddd2b2 100644 --- a/GaudiExamples/src/Properties/CustomPropertiesAlg.h +++ b/GaudiExamples/src/Properties/CustomPropertiesAlg.h @@ -12,7 +12,7 @@ #define PROPERTIES_CUSTOMPROPERTIESALG_H 1 // Include files // from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include <Gaudi/Examples/TestAlg.h> #include <unordered_map> @@ -25,10 +25,10 @@ namespace Gaudi { * @author Marco Clemencic * @date 14/11/2014 */ - class CustomPropertiesAlg : public GaudiAlgorithm { + class CustomPropertiesAlg : public TestAlg { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using TestAlg::TestAlg; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution diff --git a/GaudiExamples/src/StringKeys/StringKeyEx.cpp b/GaudiExamples/src/StringKeys/StringKeyEx.cpp index 07223425c305d12f7c23d6ac0d450f1c6268be8c..753790c2f4b6d7f41a2f4b2fce57efc973ffca28 100644 --- a/GaudiExamples/src/StringKeys/StringKeyEx.cpp +++ b/GaudiExamples/src/StringKeys/StringKeyEx.cpp @@ -24,7 +24,7 @@ // =========================================================================== // GaudiAlg // =========================================================================== -#include "GaudiAlg/GaudiAlgorithm.h" +#include <Gaudi/Examples/TestAlg.h> // =========================================================================== namespace Gaudi { // ========================================================================= @@ -36,16 +36,16 @@ namespace Gaudi { * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl * @date 2009-10-07 */ - class StringKeyEx : public GaudiAlgorithm { + class StringKeyEx : public TestAlg { public: // ====================================================================== - /// execution of the algorithm + /// execution of the Testalg StatusCode execute() override; // ====================================================================== public: // ====================================================================== /// standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using TestAlg::TestAlg; // ====================================================================== private: // ====================================================================== diff --git a/GaudiExamples/src/Timing/TimingAlg.cpp b/GaudiExamples/src/Timing/TimingAlg.cpp index 64df2f38113a851c4fcb34dceab534f47ff66588..317855d259587a788b2b1234beef0093a2327a1f 100644 --- a/GaudiExamples/src/Timing/TimingAlg.cpp +++ b/GaudiExamples/src/Timing/TimingAlg.cpp @@ -23,7 +23,7 @@ // ============================================================================ // GaudiAlg // ============================================================================ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" // ============================================================================ // Boost // ============================================================================ @@ -41,11 +41,11 @@ namespace GaudiExamples { * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl * @date 2008-04-02 */ - class TimingAlg : public GaudiAlgorithm { + class TimingAlg : public Algorithm { public: // ======================================================================== /// standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; // ======================================================================== /// the execution of the algorithm StatusCode execute() override; // the execution of the algorithm @@ -140,7 +140,7 @@ StatusCode GaudiExamples::TimingAlg::finalize() // the finalization of the algor << "| (2U) " << m_chrono2.outputUserTime( format, System::microSec ) << std::endl << "| (3U) " << m_chrono3.outputUserTime( format, System::microSec ) << endmsg; - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } // ============================================================================ // declare the factory (needed for instantiation) diff --git a/GaudiExamples/src/ToolHandles/Algorithms.cpp b/GaudiExamples/src/ToolHandles/Algorithms.cpp index fdfa32e384df8942457d55474b82b63df26f3d55..853b33f7a3acebc080d0f11330b93974e377e0e1 100644 --- a/GaudiExamples/src/ToolHandles/Algorithms.cpp +++ b/GaudiExamples/src/ToolHandles/Algorithms.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,8 +9,8 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include "FloatTool.h" -#include <GaudiAlg/Consumer.h> -#include <GaudiAlg/Producer.h> +#include <Gaudi/Functional/Consumer.h> +#include <Gaudi/Functional/Producer.h> #include <GaudiKernel/MsgStream.h> namespace Gaudi { diff --git a/GaudiExamples/src/ToolHandles/FloatTool.h b/GaudiExamples/src/ToolHandles/FloatTool.h index 0d31d8a66766ee3cf958c30c92825d69de39b3a3..138ed66a2ae9376828c5cdab3d14f2f72c6107a3 100644 --- a/GaudiExamples/src/ToolHandles/FloatTool.h +++ b/GaudiExamples/src/ToolHandles/FloatTool.h @@ -10,16 +10,16 @@ \***********************************************************************************/ #pragma once -#include "GaudiAlg/GaudiTool.h" +#include "GaudiKernel/AlgTool.h" #include "GaudiKernel/DataObjectHandle.h" namespace Gaudi { namespace Examples { - struct FloatTool : public GaudiTool { + struct FloatTool : public AlgTool { FloatTool( const std::string& type, const std::string& name, const IInterface* parent ) - : GaudiTool( type, name, parent ) {} + : AlgTool( type, name, parent ) {} float getFloat() const; diff --git a/GaudiExamples/src/testing/HistogramsTests.cpp b/GaudiExamples/src/testing/HistogramsTests.cpp index dd79489ba04f45baf8bd784aebb1634feb002b9b..5da4d13756dfe483b0af512fe76aff1c7a5e9945 100644 --- a/GaudiExamples/src/testing/HistogramsTests.cpp +++ b/GaudiExamples/src/testing/HistogramsTests.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 2021 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 2021-2023 CERN for the benefit of the LHCb and ATLAS collaborations S* * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,7 +9,8 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include <Gaudi/Accumulators/Histogram.h> -#include <GaudiAlg/Consumer.h> +#include <Gaudi/Functional/Consumer.h> +#include <GaudiKernel/AlgTool.h> #include <type_traits> namespace Gaudi::Tests::Histograms::CustomAxis { diff --git a/GaudiExamples/src/testing/TestingAlgs.cpp b/GaudiExamples/src/testing/TestingAlgs.cpp index eb0e4e137ccb0ff7d4c40e08c6bbed7472f7247d..d9ad548a1d236c25ffe11118979e760d80e61cbd 100644 --- a/GaudiExamples/src/testing/TestingAlgs.cpp +++ b/GaudiExamples/src/testing/TestingAlgs.cpp @@ -15,7 +15,7 @@ * Author: Marco Clemencic */ -#include "GaudiAlg/GaudiAlgorithm.h" +#include "GaudiKernel/Algorithm.h" #include "GaudiKernel/IEventProcessor.h" #include "GaudiKernel/IIncidentSvc.h" #include "GaudiKernel/Incident.h" @@ -28,9 +28,9 @@ namespace GaudiTesting { - class DestructorCheckAlg : public GaudiAlgorithm { + class DestructorCheckAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; ~DestructorCheckAlg() override { // do not print messages if we are created in genconf if ( System::cmdLineArgs()[0].find( "genconf" ) == std::string::npos ) { @@ -43,9 +43,9 @@ namespace GaudiTesting { } }; - class SleepyAlg : public GaudiAlgorithm { + class SleepyAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { info() << "Executing event " << ++m_counter << endmsg; info() << "Sleeping for " << m_sleep.value() << " seconds" << endmsg; @@ -62,9 +62,9 @@ namespace GaudiTesting { /** * Simple algorithm that raise a signal after N events. */ - class SignallingAlg : public GaudiAlgorithm { + class SignallingAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { if ( m_eventCount <= 0 ) { info() << "Raising signal now" << endmsg; @@ -81,14 +81,14 @@ namespace GaudiTesting { Gaudi::Property<int> m_signal{ this, "Signal", SIGINT, "Signal to raise" }; }; - class StopLoopAlg : public GaudiAlgorithm { + class StopLoopAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { if ( m_eventCount <= 0 ) { info() << "Stopping loop with " << m_mode.value() << endmsg; if ( m_mode == "exception" ) { - Exception( "Stopping loop" ); + throw GaudiException( "Stopping loop", name(), StatusCode::FAILURE ); } else if ( m_mode == "stopRun" ) { auto ep = serviceLocator()->as<IEventProcessor>(); if ( !ep ) { @@ -113,11 +113,11 @@ namespace GaudiTesting { "Type of interruption ['exception', 'stopRun', 'failure']" }; }; - class CustomIncidentAlg : public GaudiAlgorithm { + class CustomIncidentAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( sc.isFailure() ) return sc; if ( m_incident.empty() ) { @@ -144,7 +144,7 @@ namespace GaudiTesting { } StatusCode finalize() override { m_incidentSvc.reset(); - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } private: @@ -158,12 +158,12 @@ namespace GaudiTesting { /** * Simple algorithm that creates dummy objects in the transient store. */ - class PutDataObjectAlg : public GaudiAlgorithm { + class PutDataObjectAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( sc.isFailure() ) return sc; m_dataProvider = service( m_dataSvc ); @@ -187,7 +187,7 @@ namespace GaudiTesting { StatusCode finalize() override { m_dataProvider.reset(); - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } private: @@ -200,12 +200,12 @@ namespace GaudiTesting { /** * Simple algorithm that retrieves objects from the transient store. */ - class GetDataObjectAlg : public GaudiAlgorithm { + class GetDataObjectAlg : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( sc.isFailure() ) return sc; m_dataProvider = service( m_dataSvc ); @@ -232,7 +232,7 @@ namespace GaudiTesting { StatusCode finalize() override { m_dataProvider.reset(); - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } private: @@ -244,12 +244,12 @@ namespace GaudiTesting { SmartIF<IDataProviderSvc> m_dataProvider; }; - class OddEventsFilter : public GaudiAlgorithm { + class OddEventsFilter : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override { m_counter = 0; - return GaudiAlgorithm::initialize(); + return Algorithm::initialize(); } StatusCode execute() override { setFilterPassed( ( ++m_counter ) % 2 ); @@ -272,9 +272,9 @@ namespace GaudiTesting { /** * Simple algorithm that creates dummy objects in the transient store. */ - class ListTools : public GaudiAlgorithm { + class ListTools : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override { StatusCode sc = StatusCode::SUCCESS; @@ -287,12 +287,12 @@ namespace GaudiTesting { /** * Simple algorithm that prints the memory usage every N events (property "Frequency"). */ - class PrintMemoryUsage : public GaudiAlgorithm { + class PrintMemoryUsage : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override { m_counter = 0; - return GaudiAlgorithm::initialize(); + return Algorithm::initialize(); } StatusCode execute() override { if ( ( m_frequency <= 1 ) || ( ( m_counter ) % m_frequency == 0 ) ) print(); @@ -300,7 +300,7 @@ namespace GaudiTesting { } StatusCode finalize() override { print(); - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } protected: diff --git a/GaudiExamples/tests/options/GaudiMP/DelegatedWrite.py b/GaudiExamples/tests/options/GaudiMP/DelegatedWrite.py index b7bb3d62253fb3fa5cfbe5a7cb25436666f8f6ff..70ff30174d12fae1a1fc5b506967e8d39fd13c64 100644 --- a/GaudiExamples/tests/options/GaudiMP/DelegatedWrite.py +++ b/GaudiExamples/tests/options/GaudiMP/DelegatedWrite.py @@ -8,7 +8,7 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -from Configurables import ApplicationMgr, EventDataSvc, GaudiSequencer +from Configurables import ApplicationMgr, EventDataSvc, Gaudi__Sequencer from Configurables import GaudiTesting__EvenEventsFilter as EvenEvents from Configurables import GaudiTesting__OddEventsFilter as OddEvents from Configurables import RecordOutputStream, ReplayOutputStream @@ -17,13 +17,13 @@ from Configurables import SubAlg as EmptyAlg outDelegate = ReplayOutputStream() outDelegate.OutputStreams = [EmptyAlg("Stream1"), EmptyAlg("Stream2")] -oddEvtSelect = GaudiSequencer("OddEventsSelection") +oddEvtSelect = Gaudi__Sequencer("OddEventsSelection") oddEvtSelect.Members = [ OddEvents("OddEvents"), RecordOutputStream("Rec1", OutputStreamName="Stream1"), ] -evenEvtSelect = GaudiSequencer("EvenEventsSelection") +evenEvtSelect = Gaudi__Sequencer("EvenEventsSelection") evenEvtSelect.Members = [ EvenEvents("EvenEvents"), RecordOutputStream("Rec2", OutputStreamName="Stream2"), diff --git a/GaudiExamples/tests/options/GaudiMP/EnforceDelegatedWrite.py b/GaudiExamples/tests/options/GaudiMP/EnforceDelegatedWrite.py index 698982c4aa4d2389738f0d68386d31d5d84f0a7e..d00c92d3a36775be6d77bac51cb5644dc30ce394 100644 --- a/GaudiExamples/tests/options/GaudiMP/EnforceDelegatedWrite.py +++ b/GaudiExamples/tests/options/GaudiMP/EnforceDelegatedWrite.py @@ -9,16 +9,16 @@ # or submit itself to any jurisdiction. # ##################################################################################### # Standard app configuration -from Configurables import ApplicationMgr, GaudiSequencer +from Configurables import ApplicationMgr, Gaudi__Sequencer from Configurables import GaudiTesting__EvenEventsFilter as EvenEvents from Configurables import GaudiTesting__OddEventsFilter as OddEvents from Configurables import InputCopyStream, OutputStream from Configurables import SubAlg as EmptyAlg -oddEvtSelect = GaudiSequencer("OddEventsSelection") +oddEvtSelect = Gaudi__Sequencer("OddEventsSelection") oddEvtSelect.Members = [OddEvents("OddEvents"), OutputStream("Stream1")] -evenEvtSelect = GaudiSequencer("EvenEventsSelection") +evenEvtSelect = Gaudi__Sequencer("EvenEventsSelection") evenEvtSelect.Members = [EvenEvents("EvenEvents"), InputCopyStream("Stream2")] app = ApplicationMgr(EvtSel="NONE", EvtMax=4) diff --git a/GaudiExamples/tests/pytest/test_Configurables_repr.py b/GaudiExamples/tests/pytest/test_Configurables_repr.py index db076e0e5c94ae8448cbe7dc91d9031d63ef8bdc..06698e325a3ecf9645df49b3c41b824fe56b14a4 100644 --- a/GaudiExamples/tests/pytest/test_Configurables_repr.py +++ b/GaudiExamples/tests/pytest/test_Configurables_repr.py @@ -11,12 +11,12 @@ def test_repr(): import Configurables - assert repr(Configurables.TupleAlg("A")) == "TupleAlg('A')" + assert repr(Configurables.TestToolAlg("A")) == "TestToolAlg('A')" assert repr(Configurables.ToolSvc("B")) == "ToolSvc('B')" assert repr(Configurables.TestTool("C")) == "TestTool('ToolSvc.C')" assert ( - repr(Configurables.Gaudi__Examples__EvtColAlg()) - == "Gaudi__Examples__EvtColAlg('Gaudi::Examples::EvtColAlg')" + repr(Configurables.Gaudi__Examples__CountSelectedTracks()) + == "Gaudi__Examples__CountSelectedTracks('Gaudi::Examples::CountSelectedTracks')" ) assert ( repr(Configurables.Gaudi_Test_MySuperAlg()) diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algorithm_destructor.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/algorithm_destructor.qmt index 81b4717b0aedfefec99f6a9ff0178824b14f6186..20603bcc0b2e827e1441b5e94a76c7859a53274a 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algorithm_destructor.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/algorithm_destructor.qmt @@ -17,12 +17,24 @@ </set></argument> <argument name="options"><text> from Gaudi.Configuration import * -from Configurables import GaudiTesting__DestructorCheckAlg as dca; +from Configurables import GaudiTesting__DestructorCheckAlg as dca + +# FIXME: drop when we drop GAUDI_ENABLE_GAUDIALG +import Configurables +if hasattr(Configurables, "GaudiSequencer"): + # GaudiAlg available + Sequencer = Configurables.Sequencer + GaudiSequencer = Configurables.GaudiSequencer +else: + # GaudiAlg not available + Sequencer = Configurables.Gaudi__Sequencer + GaudiSequencer = Configurables.Gaudi__Sequencer + ApplicationMgr(TopAlg = [ dca("TopAlg"), - Sequencer(Members = [dca("SequencerAlg"), dca("SharedAlg")]), - GaudiSequencer(Members = [dca("GaudiSequencerAlg"), dca("SharedAlg"), dca("SharedAlg2")]), - Sequencer("Sequencer2", Members = [dca("SharedAlg2")]), + Sequencer("seq1", Members = [dca("SequencerAlg"), dca("SharedAlg")]), + GaudiSequencer("seq2", Members = [dca("GaudiSequencerAlg"), dca("SharedAlg"), dca("SharedAlg2")]), + Sequencer("seq3", Members = [dca("SharedAlg2")]), ], EvtSel = "NONE", EvtMax = 2) diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt index 0406e5d3ad88313cad5ab8ef86e5f06713e064fe..7e67e09f6e815b84f5179081b08227f97be01d5b 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/algtools_list_tools.qmt @@ -27,15 +27,12 @@ tools = set(l.strip().split()[-1] expected = set(['ToolSvc.MyTool', 'MyAlg.MyTool', - 'ToolSvc.MyGaudiTool', - 'MyAlg.MyGaudiTool', 'MyAlg.ToolWithName', - 'MyGaudiAlg.LegacyToolHandle', - 'MyGaudiAlg.MyTool', - 'MyGaudiAlg.MyGaudiTool', - 'MyGaudiAlg.ToolWithName', - 'MyGaudiAlg.PrivToolHandle', - 'MyGaudiAlg.WrongIfaceTool', + 'MyAlg.LegacyToolHandle', + 'MyAlg.MyTool', + 'MyAlg.ToolWithName', + 'MyAlg.PrivToolHandle', + 'MyAlg.WrongIfaceTool', 'ToolSvc.AnotherConstGenericToolHandle', 'ToolSvc.AnotherInstanceOfMyTool', 'ToolSvc.TestPubToolHandle', diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_30209_namespace_in_sequencer.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_30209_namespace_in_sequencer.qmt index 36ebe9e766b05eeb5e1de4450ff7a525615c7b3b..650ca696f22daa5f77809d1117283de38914c2ee 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_30209_namespace_in_sequencer.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_30209_namespace_in_sequencer.qmt @@ -14,10 +14,12 @@ <argument name="options"><text> from Gaudi.Configuration import * from Configurables import GaudiExamples__CounterSvcAlg +from Configurables import Gaudi__Sequencer as Sequencer counter2 = GaudiExamples__CounterSvcAlg("Counter2") -seq = Sequencer(Members = [ GaudiExamples__CounterSvcAlg.getType(), +seq = Sequencer("Sequencer", + Members = [ GaudiExamples__CounterSvcAlg.getType(), counter2, "GaudiExamples::StatSvcAlg:invert" ]) diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_41136.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_41136.qmt index aaa19be8247acd0db8da354f8a27823601304834..e5548a633df50224052fd6995a0a7e89d1bc2b59 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_41136.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/bug_41136.qmt @@ -26,9 +26,7 @@ ApplicationMgr(TopAlg = [ tta1, tta2 ], </text></argument> <argument name="validator"><text> -countErrorLines({"FATAL":2, - "ERROR":8, - }) +countErrorLines({"ERROR":8}) </text></argument> <argument name="exit_code"><integer>1</integer></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/control_flow.qms/algsequencer.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/control_flow.qms/algsequencer.qmt index 753068e5dbc2d6a05ce6d5dad97897102781e7b0..bd5612059f9a8c925fd5918ca7ca543f3af61bdb 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/control_flow.qms/algsequencer.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/control_flow.qms/algsequencer.qmt @@ -13,14 +13,5 @@ <argument name="program"><text>gaudirun.py</text></argument> <argument name="args"><set><text>../../options/ControlFlow/AlgSequencer.py</text></set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> - <argument name="reference"><text>refs/AlgSequencer_pyopts.ref</text></argument> - <argument name="validator"><text> -import os -import sys -sys.path.append(os.path.join(os.environ.get("ENV_PROJECT_SOURCE_DIR"), "GaudiExamples", "tests", "qmtest")) -sys.path.append(os.path.join(os.environ.get("ENV_PROJECT_SOURCE_DIR"), "Gaudi", "GaudiExamples", "tests", "qmtest")) - -from ControlFlowTestValidator import preprocessor -validateWithReference(preproc = preprocessor) - </text></argument> + <argument name="reference"><text>refs/ControlFlow/AlgSequencer.ref</text></argument> </extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudipython_mix.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudipython_mix.qmt deleted file mode 100644 index 526f8ff36b64a79daf877528a8ab16c6dde3ac1b..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/gaudipython_mix.qmt +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> -<!-- - (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations - - This software is distributed under the terms of the Apache version 2 licence, - copied verbatim in the file "LICENSE". - - In applying this licence, CERN does not waive the privileges and immunities - granted to it by virtue of its status as an Intergovernmental Organization - or submit itself to any jurisdiction. ---> -<extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>../../scripts/Mix.py</text></argument> - <argument name="use_temp_dir"><enumeral>true</enumeral></argument> - <argument name="reference"><text>refs/Mix.ref</text></argument> - <argument name="environment"><set> - <text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/GaudiExamples/options</text> - </set></argument> -</extension> diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/metadatasvc.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/metadatasvc.qmt index 6aa7f79d309a2df04dec0bb719e2ceb3614d1da4..4b887d903474b2d0a51a495ece21cad7cd58a1f0 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/metadatasvc.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/metadatasvc.qmt @@ -12,7 +12,7 @@ <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> <argument name="args"><set> - <text>../../options/TupleEx.py</text> + <text>../../options/NTuples.opts</text> <text>--option</text> <text>ApplicationMgr(EvtMax=10).ExtSvc.append('Gaudi::MetaDataSvc')</text> <text>--option</text> @@ -20,11 +20,11 @@ <text>--option</text> <text>from Configurables import Gaudi__MetaDataSvc; Gaudi__MetaDataSvc(OutputLevel=DEBUG)</text> <text>--option</text> - <text>NTupleSvc().Output = ["MYLUN DATAFILE='TupleEx_with_metadata.root' OPT='NEW' TYP='ROOT'"]</text> + <text>NTupleSvc().Output = ["MyTuples DATAFILE='ntuple_with_metadata.root' OPT='NEW' TYP='ROOT'"]</text> </set></argument> <argument name="use_temp_dir"><enumeral>true</enumeral></argument> <argument name="prerequisites"><set> - <tuple><text>gaudiexamples.tupleex_py</text><enumeral>PASS</enumeral></tuple> + <tuple><text>gaudiexamples.ntuples</text><enumeral>PASS</enumeral></tuple> </set></argument> <argument name="reference"><text>refs/MetaDataSvc.ref</text></argument> <argument name="validator"><text> @@ -40,7 +40,7 @@ stdout = filter(lambda x: x.strip(), stdout = sorted(stdout) from subprocess import check_output, CalledProcessError try: - info = eval(check_output(['dumpMetaData', 'TupleEx_with_metadata.root'])) + info = eval(check_output(['dumpMetaData', 'ntuple_with_metadata.root'])) info = [':'.join(item) for item in info.items()] info.sort() if stdout != info: diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/properties.qms/custom_properties.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/properties.qms/custom_properties.qmt index b4955139100a55fd0925f142cf61532fd4c36116..bf886e1829af3186d26d1092f5bd7877f4ba85dd 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/properties.qms/custom_properties.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/properties.qms/custom_properties.qmt @@ -22,6 +22,7 @@ from Configurables import Gaudi__Examples__CustomPropertiesAlg as CPA alg = CPA("CPA") alg.UnorderedMap["hello"] = "world" alg.UnorderedMap["abc"] = "123" +alg.PropertiesPrint = True ApplicationMgr(TopAlg=[alg], OutputLevel=DEBUG) diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing.qmt index 90b17f060bf438b6564c26466fac1cb62fe55d17..c43b4836a7141f8740deff370403204530ffc7a8 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/timing.qmt @@ -12,10 +12,7 @@ <!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> <extension class="GaudiTest.GaudiExeTest" kind="test"> <argument name="program"><text>gaudirun.py</text></argument> -<argument name="args"><set><text>Timing.py</text></set></argument> -<argument name="environment"><set> -<text>JOBOPTSEARCHPATH=$ENV_PROJECT_SOURCE_DIR/GaudiExamples/options:$ENV_PROJECT_SOURCE_DIR/Gaudi/GaudiExamples/options</text> -</set></argument> +<argument name="args"><set><text>../../options/Timing.py</text></set></argument> <argument name="validator"><text> import re expected = ( r"Timing\s+SUCCESS\s+The timing is \(in us\)\s*\n" + diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex4.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex4.qmt deleted file mode 100644 index c50b3819511e481e65707cfbbe2878cbef854030..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/tupleex4.qmt +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> -<!-- - (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations - - This software is distributed under the terms of the Apache version 2 licence, - copied verbatim in the file "LICENSE". - - In applying this licence, CERN does not waive the privileges and immunities - granted to it by virtue of its status as an Intergovernmental Organization - or submit itself to any jurisdiction. ---> -<extension class="GaudiTest.GaudiExeTest" kind="test"> - <argument name="program"><text>TupleEx4.py</text></argument> - <argument name="use_temp_dir"><enumeral>true</enumeral></argument> - <argument name="reference"><text>refs/TupleEx4.pyref</text></argument> -</extension> diff --git a/GaudiExamples/tests/qmtest/refs/Aida2Root.ref b/GaudiExamples/tests/qmtest/refs/Aida2Root.ref deleted file mode 100644 index 53a9903df5f7e9a01a2e59545e0adb2da4c5643d..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/refs/Aida2Root.ref +++ /dev/null @@ -1,423 +0,0 @@ -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Histograms.opts -JobOptionsSvc INFO # (5,1): AuditorSvc.Auditors = ["ChronoAuditor"] -JobOptionsSvc INFO # (9,1): MessageSvc.OutputLevel = 3 -JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["GaudiHistoAlgorithm/SimpleHistos"] -JobOptionsSvc INFO # (22,1): ApplicationMgr.TopAlg += ["Gaudi::Examples::HistoProps/Histos2"] -JobOptionsSvc INFO # (23,1): SimpleHistos.HistoPrint = 1 -JobOptionsSvc INFO # (24,1): SimpleHistos.OutputLevel = 2 -JobOptionsSvc INFO # (27,1): Histos2.Histo2 = ["Title", -5, 5, 200] -JobOptionsSvc INFO # (28,1): Histos2.Histo2 = ["Title", -5, 5] -JobOptionsSvc INFO # (29,1): Histos2.Histo2 = [-5, 5] -JobOptionsSvc INFO # (30,1): Histos2.Histo2 = [-5, 5, "Title"] -JobOptionsSvc INFO # (31,1): Histos2.Histo2 = [-5, 5, "Title", 200] -JobOptionsSvc INFO # (32,1): Histos2.Histo2 = [-5, 5, 200, "Title"] -JobOptionsSvc INFO # (33,1): Histos2.Histo2 = [-5, 5, 200] -JobOptionsSvc INFO # (39,1): ApplicationMgr.EvtMax = 50000 -JobOptionsSvc INFO # (40,1): ApplicationMgr.EvtSel = "NONE" -JobOptionsSvc INFO # (47,1): ApplicationMgr.HistogramPersistency = "ROOT" -JobOptionsSvc INFO # (48,1): ApplicationMgr.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] -JobOptionsSvc INFO # (49,1): RootHistSvc.OutputFile = "histo-aida2root.root" -JobOptionsSvc INFO # (60,1): HistogramDataSvc.Predefined1DHistos = {"/stat/Histos2/2":["TEST2", -100, 200]} -JobOptionsSvc INFO # (64,1): HistogramDataSvc.OutputLevel = 2 -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Aida2Root.opts -JobOptionsSvc INFO # (3,1): ApplicationMgr.TopAlg += ["Aida2Root"] -JobOptionsSvc INFO # (4,1): ApplicationMgr.ExtSvc += ["Gaudi::Monitoring::MessageSvcSink"] -JobOptionsSvc INFO Job options successfully read in from /builds/gaudi/Gaudi/GaudiExamples/options/Aida2Root.opts -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:15:52 2020 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' -SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False -SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] -HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 -HistogramDataSvc DEBUG Service base class initialized successfully -RootHistSvc INFO Writing ROOT histograms to: histo-aida2root.root -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Predefined 1D-Histograms: -HistogramDataSvc INFO Path='Histos2/2' Description ('TEST2',-100,200,100) -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -SimpleHistos DEBUG input handles: 0 -SimpleHistos DEBUG output handles: 0 -SimpleHistos DEBUG Data Deps for SimpleHistos -Histos2 SUCCESS List of ALL properties of Gaudi::Examples::HistoProps/Histos2 #properties = 45 -Histos2 SUCCESS Property ['Name': Value] = 'Histo2':('',-5.00000,5.00000,200) -Histos2 SUCCESS Property ['Name': Value] = 'Histo1':('Histogram1',-3.00000,3.00000,200) -Histos2 SUCCESS Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -Histos2 SUCCESS Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -Histos2 SUCCESS Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Histos2 SUCCESS Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -Histos2 SUCCESS Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Histos2 SUCCESS Property ['Name': Value] = 'MonitorHistograms':True -Histos2 SUCCESS Property ['Name': Value] = 'FullDetail':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoDir':'Histos2' -Histos2 SUCCESS Property ['Name': Value] = 'HistoTopDir':'' -Histos2 SUCCESS Property ['Name': Value] = 'HistoOffSet':0 -Histos2 SUCCESS Property ['Name': Value] = 'HistoSplitDir':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoCheckForNaN':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoCountersPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoProduce':True -Histos2 SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Histos2 SUCCESS Property ['Name': Value] = 'Context':'' -Histos2 SUCCESS Property ['Name': Value] = 'TypePrint':True -Histos2 SUCCESS Property ['Name': Value] = 'PropertiesPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'ErrorsPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'RootInTES':'' -Histos2 SUCCESS Property ['Name': Value] = 'FilterCircularDependencies':True -Histos2 SUCCESS Property ['Name': Value] = 'Blocking':False -Histos2 SUCCESS Property ['Name': Value] = 'NeededResources':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'Cardinality':1 -Histos2 SUCCESS Property ['Name': Value] = 'RegisterForContextService':True -Histos2 SUCCESS Property ['Name': Value] = 'MonitorService':'MonitorSvc' -Histos2 SUCCESS Property ['Name': Value] = 'Timeline':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditStop':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditStart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditFinalize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditExecute':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditRestart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditReinitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditInitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditAlgorithms':False -Histos2 SUCCESS Property ['Name': Value] = 'ErrorMax':1 -Histos2 SUCCESS Property ['Name': Value] = 'Enable':True -Histos2 SUCCESS Property ['Name': Value] = 'OutputLevel':3 -Histos2 SUCCESS Property ['Name': Value] = 'ExtraOutputs':[] -Histos2 SUCCESS Property ['Name': Value] = 'ExtraInputs':[] -Aida2Root SUCCESS List of ALL properties of Aida2Root/Aida2Root #properties = 48 -Aida2Root SUCCESS Property ['Name': Value] = 'Profs2D':[ 'SimpleHistos/321' , 'SimpleHistos/2dprof' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Profs1D':[ 'SimpleHistos/Expo V Gauss 1DProf' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos3D':[ 'SimpleHistos/3D plot AutoID' , 'SimpleHistos/3d' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos2D':[ 'SimpleHistos/Gaussian V Flat' , 'SimpleHistos/Exponential V Flat' , 'SimpleHistos/binVpois' , 'SimpleHistos/expoVpois' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos1D':[ 'SimpleHistos/Gaussian mean=0, sigma=1' , 'SimpleHistos/101' , 'SimpleHistos/102' , 'SimpleHistos/1111' , 'SimpleHistos/test1' , 'SimpleHistos/subdir2/bino' , 'SimpleHistos/subdir1/bino' , 'SimpleHistos/poisson' ] -Aida2Root SUCCESS Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -Aida2Root SUCCESS Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -Aida2Root SUCCESS Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Aida2Root SUCCESS Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -Aida2Root SUCCESS Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Aida2Root SUCCESS Property ['Name': Value] = 'MonitorHistograms':True -Aida2Root SUCCESS Property ['Name': Value] = 'FullDetail':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoDir':'Aida2Root' -Aida2Root SUCCESS Property ['Name': Value] = 'HistoTopDir':'' -Aida2Root SUCCESS Property ['Name': Value] = 'HistoOffSet':0 -Aida2Root SUCCESS Property ['Name': Value] = 'HistoSplitDir':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoCheckForNaN':True -Aida2Root SUCCESS Property ['Name': Value] = 'HistoCountersPrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'HistoPrint':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoProduce':True -Aida2Root SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Context':'' -Aida2Root SUCCESS Property ['Name': Value] = 'TypePrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'PropertiesPrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'ErrorsPrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'RootInTES':'' -Aida2Root SUCCESS Property ['Name': Value] = 'FilterCircularDependencies':True -Aida2Root SUCCESS Property ['Name': Value] = 'Blocking':False -Aida2Root SUCCESS Property ['Name': Value] = 'NeededResources':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'Cardinality':1 -Aida2Root SUCCESS Property ['Name': Value] = 'RegisterForContextService':True -Aida2Root SUCCESS Property ['Name': Value] = 'MonitorService':'MonitorSvc' -Aida2Root SUCCESS Property ['Name': Value] = 'Timeline':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditStop':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditStart':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditFinalize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditExecute':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditRestart':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditReinitialize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditInitialize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditAlgorithms':False -Aida2Root SUCCESS Property ['Name': Value] = 'ErrorMax':1 -Aida2Root SUCCESS Property ['Name': Value] = 'Enable':True -Aida2Root SUCCESS Property ['Name': Value] = 'OutputLevel':3 -Aida2Root SUCCESS Property ['Name': Value] = 'ExtraOutputs':[] -Aida2Root SUCCESS Property ['Name': Value] = 'ExtraInputs':[] -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr INFO Application Manager Started successfully -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! -Histos2 WARNING Gaudi::Examples::HistoProps:: Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID -HistogramDataSvc DEBUG Redefine the parameters for the histogram 'Histos2/2' to be ('TEST2',-100,200,100) -ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.96914 | 0.90535 | 1.4869 | 2.2322 | - | 102 | "Breit" | 50000 | 0.0068835 | 1.1951 | -0.01431 | 3.6439 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | AutoID time test | "AutoID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | poisson | "Poisson" | 50000 | 1.8073 | 1.1765 | 0.32643 | -0.75799 | - | subdir1/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | subdir2/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | varBinning/x | "1D Variable Binning" | 50000 | -0.028452 | 2.8834 | 0.015929 | -1.3136 | -SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 - ID=Exponential V Flat "Exponential V Flat" Ents/All=49848/50000<X>/sX=-0.025596/2.8825,<Y>/sY=0.97604/0.91269 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 - ID=binVpois "Binom V poisson" Ents/All=49920/50000<X>/sX=1.8072/1.1764,<Y>/sY=1.9048/1.1125 - ID=expoVpois "Expo V poisson" Ents/All=49978/50000<X>/sX=1.807/1.176,<Y>/sY=0.96904/0.9045 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.025596/2.8825,<Y>/sY=-0.0086423/1.0004,<Z>/sZ=0.97604/0.91269 -SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.009832 | 1.0001 | 1.0944 | 57.826 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.009832 | 1.0001 | 1.0944 | 57.826 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.013795 | 5.7724 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.013795 | 5.7724 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24807 | 0.026854 | 5.7561 | -0.0078314 | -1.2358 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24807 | 0.026854 | 5.7561 | -0.0078314 | -1.2358 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25193 | -0.053822 | 5.7881 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25193 | -0.053822 | 5.7881 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.028452 | 2.8834 | 0 | -3 | -SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : -Histos2 SUCCESS Booked 2 Histogram(s) : 1D=2 -Histos2 SUCCESS 1D histograms in directory "Histos2" : 2 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 2 | "TEST2" | 50000 | -0.0023399 | 1.0037 | 0.0098579 | -0.038565 | - | Histogram1 | "Histogram1" | 50000 | -0.0011467 | 0.98662 | 0.0022561 | -0.15642 | -Histos2 SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 0/0/1/0 -Histos2 SUCCESS #WARNINGS = 1 Message = 'Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID' -Aida2Root SUCCESS Get the native ROOT representation of histograms! -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/Gaussian mean=0, sigma=1': -TH1.Print Name = Gaussian mean=0, sigma=1, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-06 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.8735014e-16 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/101': -TH1.Print Name = Exponential, Entries= 50000, Total sum= 49656 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 0.9691422 | 0.9691422 | 0 | -Aida2Root INFO | 'meanErr' | 0.0040628269 | 0.0040628269 | 0 | -Aida2Root INFO | 'rms' | 0.90534515 | 0.90534515 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0041791285 | 0.0028728524 | 0.0013062761 | -Aida2Root INFO | 'skewness' | 1.4868621 | 1.4868621 | 2.220446e-16 | -Aida2Root INFO | 'skewnessErr' | 0.010991666 | 0.01099233 | -6.6408212e-07 | -Aida2Root INFO | 'kurtosis' | 2.2322439 | 2.2322439 | 0 | -Aida2Root INFO | 'kurtosisErr' | 0.02198134 | 0.02198466 | -3.3202423e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/102': -TH1.Print Name = Breit, Entries= 50000, Total sum= 46912 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 0.0068835323 | 0.0068835323 | 0 | -Aida2Root INFO | 'meanErr' | 0.0055176857 | 0.0055176857 | 0 | -Aida2Root INFO | 'rms' | 1.1950854 | 1.1950854 | 0 | -Aida2Root INFO | 'rmsErr' | 0.006554158 | 0.003901593 | 0.002652565 | -Aida2Root INFO | 'skewness' | -0.01430972 | -0.01430972 | 2.4980018e-16 | -Aida2Root INFO | 'skewnessErr' | 0.011308523 | 0.011309246 | -7.2319005e-07 | -Aida2Root INFO | 'kurtosis' | 3.6438647 | 3.6438647 | 0 | -Aida2Root INFO | 'kurtosisErr' | 0.022614876 | 0.022618492 | -3.6157563e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/1111': -TH1.Print Name = Forced Numeric ID time test, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-06 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.8735014e-16 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/test1': -TH1.Print Name = Forced Alpha ID time test, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-06 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.8735014e-16 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-07 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir2/bino': -TH1.Print Name = Binominal, Entries= 50000, Total sum= 48615 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.9060989 | 1.9060989 | 0 | -Aida2Root INFO | 'meanErr' | 0.005047036 | 0.005047036 | 0 | -Aida2Root INFO | 'rms' | 1.1128114 | 1.1128114 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0029106545 | 0.0035687934 | -0.00065813892 | -Aida2Root INFO | 'skewness' | 0.25726049 | 0.25726049 | 2.220446e-16 | -Aida2Root INFO | 'skewnessErr' | 0.011108711 | 0.011109397 | -6.8552544e-07 | -Aida2Root INFO | 'kurtosis' | -0.66968326 | -0.66968326 | -4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.022215366 | 0.022218794 | -3.4274498e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir1/bino': -TH1.Print Name = Binominal, Entries= 50000, Total sum= 48615 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.9060989 | 1.9060989 | 0 | -Aida2Root INFO | 'meanErr' | 0.005047036 | 0.005047036 | 0 | -Aida2Root INFO | 'rms' | 1.1128114 | 1.1128114 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0029106545 | 0.0035687934 | -0.00065813892 | -Aida2Root INFO | 'skewness' | 0.25726049 | 0.25726049 | 2.220446e-16 | -Aida2Root INFO | 'skewnessErr' | 0.011108711 | 0.011109397 | -6.8552544e-07 | -Aida2Root INFO | 'kurtosis' | -0.66968326 | -0.66968326 | -4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.022215366 | 0.022218794 | -3.4274498e-06 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/poisson': -TH1.Print Name = Poisson, Entries= 50000, Total sum= 47512 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.8073329 | 1.8073329 | 0 | -Aida2Root INFO | 'meanErr' | 0.0053975724 | 0.0053975724 | 0 | -Aida2Root INFO | 'rms' | 1.1765222 | 1.1765222 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0030077251 | 0.00381666 | -0.00080893493 | -Aida2Root INFO | 'skewness' | 0.32643021 | 0.32643021 | 3.3306691e-16 | -Aida2Root INFO | 'skewnessErr' | 0.011236901 | 0.01123761 | -7.0953469e-07 | -Aida2Root INFO | 'kurtosis' | -0.7579914 | -0.7579914 | 4.4408921e-16 | -Aida2Root INFO | 'kurtosisErr' | 0.022471673 | 0.022475221 | -3.5474855e-06 | -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Gaussian V Flat': -TH1.Print Name = Gaussian V Flat, Entries= 50000, Total sum= 24949 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Exponential V Flat': -TH1.Print Name = Exponential V Flat, Entries= 50000, Total sum= 24757 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/binVpois': -TH1.Print Name = Binom V poisson, Entries= 50000, Total sum= 46207 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/expoVpois': -TH1.Print Name = Expo V poisson, Entries= 50000, Total sum= 47190 -Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3D plot AutoID': -TH1.Print Name = 3D plot AutoID, Entries= 50000, Total sum= 46587 -Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3d': -TH1.Print Name = 3D plot ForcedID, Entries= 50000, Total sum= 46587 -Aida2Root INFO The native ROOT printout for 1D-profile 'SimpleHistos/Expo V Gauss 1DProf': -TH1.Print Name = Expo V Gauss 1DProf, Entries= 50000, Total sum= 42.9343 -Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/321': -TH1.Print Name = 2D profile2, Entries= 50000, Total sum= 2732.42 -Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/2dprof': -TH1.Print Name = 2D profile1, Entries= 50000, Total sum= 2732.42 -EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DOldStyle INFO Time User : Tot= 60 [ms] Ave/Min/Max= 0.0012(+- 0.11)/ 0/ 10 [ms] #=49999 -1DForcedAlphaID INFO Time User : Tot= 70 [ms] Ave/Min/Max= 0.0014(+- 0.118)/ 0/ 10 [ms] #=49999 -1DForcedNumericID INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -1DAutoID INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -ChronoStatSvc INFO Time User : Tot= 1.16 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -HistogramDataSvc DEBUG Substituted histograms #1 : -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Aida2Root.ref.winxp b/GaudiExamples/tests/qmtest/refs/Aida2Root.ref.winxp deleted file mode 100644 index 7f059f7a8671b096be69c8534e97b1093c7b220b..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/refs/Aida2Root.ref.winxp +++ /dev/null @@ -1,423 +0,0 @@ -JobOptionsSvc INFO # =======> D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts) -JobOptionsSvc INFO # (5,1): AuditorSvc.Auditors = ["ChronoAuditor"] -JobOptionsSvc INFO # (9,1): MessageSvc.OutputLevel = 3 -JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["GaudiHistoAlgorithm/SimpleHistos"] -JobOptionsSvc INFO # (22,1): ApplicationMgr.TopAlg += ["Gaudi::Examples::HistoProps/Histos2"] -JobOptionsSvc INFO # (23,1): SimpleHistos.HistoPrint = 1 -JobOptionsSvc INFO # (24,1): SimpleHistos.OutputLevel = 2 -JobOptionsSvc INFO # (27,1): Histos2.Histo2 = ["Title", -5, 5, 200] -JobOptionsSvc WARNING # (28,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (27, 1). -JobOptionsSvc INFO # (28,1): Histos2.Histo2 = ["Title", -5, 5] -JobOptionsSvc WARNING # (29,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (28, 1). -JobOptionsSvc INFO # (29,1): Histos2.Histo2 = [-5, 5] -JobOptionsSvc WARNING # (30,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (29, 1). -JobOptionsSvc INFO # (30,1): Histos2.Histo2 = [-5, 5, "Title"] -JobOptionsSvc WARNING # (31,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (30, 1). -JobOptionsSvc INFO # (31,1): Histos2.Histo2 = [-5, 5, "Title", 200] -JobOptionsSvc WARNING # (32,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (31, 1). -JobOptionsSvc INFO # (32,1): Histos2.Histo2 = [-5, 5, 200, "Title"] -JobOptionsSvc WARNING # (33,1): Reassignment of option 'Histos2.Histo2' . Previously defined at D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Histograms.opts: (32, 1). -JobOptionsSvc INFO # (33,1): Histos2.Histo2 = [-5, 5, 200] -JobOptionsSvc INFO # (39,1): ApplicationMgr.EvtMax = 50000 -JobOptionsSvc INFO # (40,1): ApplicationMgr.EvtSel = "NONE" -JobOptionsSvc INFO # (47,1): ApplicationMgr.HistogramPersistency = "ROOT" -JobOptionsSvc INFO # (48,1): RootHistSvc.OutputFile = "histo.root" -JobOptionsSvc INFO # (57,1): HistogramDataSvc.Input = ["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"] -JobOptionsSvc INFO # (59,1): HistogramDataSvc.Predefined1DHistos = {"/stat/Histos2/2":["TEST2", -100, 200]} -JobOptionsSvc INFO # (63,1): HistogramDataSvc.OutputLevel = 2 -JobOptionsSvc INFO # =======> D:/Profiles/clemenci/cmtuser/Gaudi/GaudiExamples/options/Aida2Root.opts) -JobOptionsSvc INFO # (3,1): ApplicationMgr.TopAlg += ["Aida2Root"] -JobOptionsSvc INFO Job options successfully read in from D:\Profiles\clemenci\cmtuser\Gaudi\GaudiExamples\options\Aida2Root.opts -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr $Revision: 1.77 $ - running on CERNTSLHCB05 on 08/16/11 12:53:04 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 45 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':| Title | # | Mean | RMS | Skewness | Kurtosis | -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable': | %1$-25.25s %2% -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g | -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':SimpleHistos -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir': -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'StatEntityList':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'UseEfficiencyRowFormat':True -SimpleHistos DEBUG Property ['Name': Value] = 'EfficiencyRowFormat': |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- | -SimpleHistos DEBUG Property ['Name': Value] = 'RegularRowFormat': | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| | -SimpleHistos DEBUG Property ['Name': Value] = 'StatTableHeader': | Counter | # | sum | mean/eff^* | rms/err^* | min | max | -SimpleHistos DEBUG Property ['Name': Value] = 'RootOnTES': -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES': -SimpleHistos DEBUG Property ['Name': Value] = 'Context': -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':MonitorSvc -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorCounter':0 -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -HistogramDataSvc DEBUG Service base class initialized successfully -RootHistSvc INFO Writing ROOT histograms to: histo.root -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Added stream file:../data/input.hbook as InFile -HistogramDataSvc INFO Predefined 1D-Histograms: -HistogramDataSvc INFO Path='Histos2/2' Description ('TEST2',-100,200,100) -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -Histos2 SUCCESS List of ALL properties of Gaudi::Examples::HistoProps/Histos2 #properties = 47 -Histos2 SUCCESS Property ['Name': Value] = 'Histo2':('',-5.000000,5.000000,200) -Histos2 SUCCESS Property ['Name': Value] = 'Histo1':('Histogram1',-3.000000,3.000000,200) -Histos2 SUCCESS Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -Histos2 SUCCESS Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -Histos2 SUCCESS Property ['Name': Value] = 'HeaderFor1DHistoTable':| Title | # | Mean | RMS | Skewness | Kurtosis | -Histos2 SUCCESS Property ['Name': Value] = 'ShortFormatFor1DHistoTable': | %1$-25.25s %2% -Histos2 SUCCESS Property ['Name': Value] = 'FormatFor1DHistoTable':| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g | -Histos2 SUCCESS Property ['Name': Value] = 'MonitorHistograms':True -Histos2 SUCCESS Property ['Name': Value] = 'FullDetail':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoDir':Histos2 -Histos2 SUCCESS Property ['Name': Value] = 'HistoTopDir': -Histos2 SUCCESS Property ['Name': Value] = 'HistoOffSet':0 -Histos2 SUCCESS Property ['Name': Value] = 'HistoSplitDir':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoCheckForNaN':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoProduce':True -Histos2 SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'StatEntityList':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Histos2 SUCCESS Property ['Name': Value] = 'UseEfficiencyRowFormat':True -Histos2 SUCCESS Property ['Name': Value] = 'EfficiencyRowFormat': |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- | -Histos2 SUCCESS Property ['Name': Value] = 'RegularRowFormat': | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| | -Histos2 SUCCESS Property ['Name': Value] = 'StatTableHeader': | Counter | # | sum | mean/eff^* | rms/err^* | min | max | -Histos2 SUCCESS Property ['Name': Value] = 'RootOnTES': -Histos2 SUCCESS Property ['Name': Value] = 'RootInTES': -Histos2 SUCCESS Property ['Name': Value] = 'Context': -Histos2 SUCCESS Property ['Name': Value] = 'TypePrint':True -Histos2 SUCCESS Property ['Name': Value] = 'PropertiesPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'ErrorsPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'RegisterForContextService':True -Histos2 SUCCESS Property ['Name': Value] = 'MonitorService':MonitorSvc -Histos2 SUCCESS Property ['Name': Value] = 'AuditStop':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditStart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditFinalize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditExecute':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditRestart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditReinitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditInitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditAlgorithms':False -Histos2 SUCCESS Property ['Name': Value] = 'ErrorCounter':0 -Histos2 SUCCESS Property ['Name': Value] = 'ErrorMax':1 -Histos2 SUCCESS Property ['Name': Value] = 'Enable':True -Histos2 SUCCESS Property ['Name': Value] = 'OutputLevel':3 -Aida2Root SUCCESS List of ALL properties of Aida2Root/Aida2Root #properties = 50 -Aida2Root SUCCESS Property ['Name': Value] = 'Profs2D':[ 'SimpleHistos/321' , 'SimpleHistos/2dprof' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Profs1D':[ 'SimpleHistos/Expo V Gauss 1DProf' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos3D':[ 'SimpleHistos/3D plot AutoID' , 'SimpleHistos/3d' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos2D':[ 'SimpleHistos/Gaussian V Flat' , 'SimpleHistos/Exponential V Flat' , 'SimpleHistos/binVpois' , 'SimpleHistos/expoVpois' ] -Aida2Root SUCCESS Property ['Name': Value] = 'Histos1D':[ 'SimpleHistos/Gaussian mean=0, sigma=1' , 'SimpleHistos/101' , 'SimpleHistos/102' , 'SimpleHistos/1111' , 'SimpleHistos/test1' , 'SimpleHistos/subdir2/bino' , 'SimpleHistos/subdir1/bino' , 'SimpleHistos/poisson' ] -Aida2Root SUCCESS Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -Aida2Root SUCCESS Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -Aida2Root SUCCESS Property ['Name': Value] = 'HeaderFor1DHistoTable':| Title | # | Mean | RMS | Skewness | Kurtosis | -Aida2Root SUCCESS Property ['Name': Value] = 'ShortFormatFor1DHistoTable': | %1$-25.25s %2% -Aida2Root SUCCESS Property ['Name': Value] = 'FormatFor1DHistoTable':| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g | -Aida2Root SUCCESS Property ['Name': Value] = 'MonitorHistograms':True -Aida2Root SUCCESS Property ['Name': Value] = 'FullDetail':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoDir':Aida2Root -Aida2Root SUCCESS Property ['Name': Value] = 'HistoTopDir': -Aida2Root SUCCESS Property ['Name': Value] = 'HistoOffSet':0 -Aida2Root SUCCESS Property ['Name': Value] = 'HistoSplitDir':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoCheckForNaN':True -Aida2Root SUCCESS Property ['Name': Value] = 'HistoPrint':False -Aida2Root SUCCESS Property ['Name': Value] = 'HistoProduce':True -Aida2Root SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'StatEntityList':[ ] -Aida2Root SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Aida2Root SUCCESS Property ['Name': Value] = 'UseEfficiencyRowFormat':True -Aida2Root SUCCESS Property ['Name': Value] = 'EfficiencyRowFormat': |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- | -Aida2Root SUCCESS Property ['Name': Value] = 'RegularRowFormat': | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| | -Aida2Root SUCCESS Property ['Name': Value] = 'StatTableHeader': | Counter | # | sum | mean/eff^* | rms/err^* | min | max | -Aida2Root SUCCESS Property ['Name': Value] = 'RootOnTES': -Aida2Root SUCCESS Property ['Name': Value] = 'RootInTES': -Aida2Root SUCCESS Property ['Name': Value] = 'Context': -Aida2Root SUCCESS Property ['Name': Value] = 'TypePrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'PropertiesPrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'ErrorsPrint':True -Aida2Root SUCCESS Property ['Name': Value] = 'RegisterForContextService':True -Aida2Root SUCCESS Property ['Name': Value] = 'MonitorService':MonitorSvc -Aida2Root SUCCESS Property ['Name': Value] = 'AuditStop':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditStart':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditFinalize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditExecute':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditRestart':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditReinitialize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditInitialize':False -Aida2Root SUCCESS Property ['Name': Value] = 'AuditAlgorithms':False -Aida2Root SUCCESS Property ['Name': Value] = 'ErrorCounter':0 -Aida2Root SUCCESS Property ['Name': Value] = 'ErrorMax':1 -Aida2Root SUCCESS Property ['Name': Value] = 'Enable':True -Aida2Root SUCCESS Property ['Name': Value] = 'OutputLevel':3 -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr INFO Application Manager Started successfully -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! -Histos2 WARNING Gaudi::Examples::HistoProps:: Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID -HistogramDataSvc DEBUG Redefine the parameters for the histogram 'Histos2/2' to be ('TEST2',-100,200,100) -ChronoStatSvc INFO Number of skipped events for MemStat-1 -ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS List of booked 1D histograms in directory "SimpleHistos" :- - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.96914 | 0.90535 | 1.4869 | 2.2322 | - | 102 | "Breit" | 50000 | 0.0068835 | 1.1951 | -0.01431 | 3.6439 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | AutoID time test | "AutoID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | poisson | "Poisson" | 50000 | 1.8073 | 1.1765 | 0.32643 | -0.75799 | - | subdir1/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | subdir2/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | varBinning/x | "1D Variable Binning" | 50000 | -0.028452 | 2.8834 | 0.015929 | -1.3136 | -SimpleHistos SUCCESS List of booked 2D histograms in directory "SimpleHistos" :- - ID=Exponential V Flat "Exponential V Flat" Ents/All=49848/50000<X>/sX=-0.025596/2.8825,<Y>/sY=0.97604/0.91269 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 - ID=binVpois "Binom V poisson" Ents/All=49920/50000<X>/sX=1.8072/1.1764,<Y>/sY=1.9048/1.1125 - ID=expoVpois "Expo V poisson" Ents/All=49978/50000<X>/sX=1.807/1.176,<Y>/sY=0.96904/0.9045 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos SUCCESS List of booked 3D histograms in directory "SimpleHistos" :- - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.025596/2.8825,<Y>/sY=-0.0086423/1.0004,<Z>/sZ=0.97604/0.91269 -SimpleHistos SUCCESS List of booked 1D profile histograms in directory "SimpleHistos" :- - ID=Expo V Gauss 1DProf "Expo V Gauss 1DProf" Ents/All=50000/50000<X>/sX=-0.009832/1.0001 - ID=Expo V Gauss 1DProf s "Expo V Gauss 1DProf s" Ents/All=50000/50000<X>/sX=-0.009832/1.0001 - ID=Gauss V Flat 1DProf "Gauss V Flat 1DProf" Ents/All=50000/50000<X>/sX=-0.013795/5.7724 - ID=Gauss V Flat 1DProf S "Gauss V Flat 1DProf S" Ents/All=50000/50000<X>/sX=-0.013795/5.7724 - ID=Gauss V Flat 1DProf, with limits-I "Gauss V Flat 1DProf, with limits-I" Ents/All=24807/24807<X>/sX=0.026854/5.7561 - ID=Gauss V Flat 1DProf, with limits-I s "Gauss V Flat 1DProf, with limits-I s" Ents/All=24807/24807<X>/sX=0.026854/5.7561 - ID=Gauss V Flat 1DProf, with limits-II "Gauss V Flat 1DProf, with limits-II" Ents/All=25193/25193<X>/sX=-0.053822/5.7881 - ID=Gauss V Flat 1DProf, with limits-II s "Gauss V Flat 1DProf, with limits-II s" Ents/All=25193/25193<X>/sX=-0.053822/5.7881 - ID=varBinning/a "1D Profile Variable Binning" Ents/All=24949/50000<X>/sX=-0.028452/2.8834 -SimpleHistos SUCCESS List of booked 2D profile histograms in directory "SimpleHistos" :- - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : -Histos2 SUCCESS Booked 2 Histogram(s) : 1D=2 -Histos2 SUCCESS List of booked 1D histograms in directory "Histos2" :- - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 2 | "TEST2" | 50000 | -0.0023399 | 1.0037 | 0.0098579 | -0.038565 | - | Histogram1 | "Histogram1" | 50000 | -0.0011467 | 0.98662 | 0.0022561 | -0.15642 | -Histos2 SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 0/0/1/0 -Histos2 SUCCESS #WARNINGS = 1 Message = 'Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID' -Aida2Root SUCCESS Get the native ROOT representation of histograms! -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/Gaussian mean=0, sigma=1': -TH1.Print Name = Gaussian mean=0, sigma=1, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-006 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.9602375e-016 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-007 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-016 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/101': -TH1.Print Name = Exponential, Entries= 50000, Total sum= 49656 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 0.9691422 | 0.9691422 | 0 | -Aida2Root INFO | 'meanErr' | 0.0040628269 | 0.0040628269 | 0 | -Aida2Root INFO | 'rms' | 0.90534515 | 0.90534515 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0041791285 | 0.0028728524 | 0.0013062761 | -Aida2Root INFO | 'skewness' | 1.4868621 | 1.4868621 | 0 | -Aida2Root INFO | 'skewnessErr' | 0.010991666 | 0.01099233 | -6.6408212e-007 | -Aida2Root INFO | 'kurtosis' | 2.2322439 | 2.2322439 | 0 | -Aida2Root INFO | 'kurtosisErr' | 0.02198134 | 0.02198466 | -3.3202423e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/102': -TH1.Print Name = Breit, Entries= 50000, Total sum= 46912 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 0.0068835323 | 0.0068835323 | 0 | -Aida2Root INFO | 'meanErr' | 0.0055176857 | 0.0055176857 | 0 | -Aida2Root INFO | 'rms' | 1.1950854 | 1.1950854 | 0 | -Aida2Root INFO | 'rmsErr' | 0.006554158 | 0.003901593 | 0.002652565 | -Aida2Root INFO | 'skewness' | -0.01430972 | -0.01430972 | 2.4980018e-016 | -Aida2Root INFO | 'skewnessErr' | 0.011308523 | 0.011309246 | -7.2319005e-007 | -Aida2Root INFO | 'kurtosis' | 3.6438647 | 3.6438647 | 0 | -Aida2Root INFO | 'kurtosisErr' | 0.022614876 | 0.022618492 | -3.6157563e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/1111': -TH1.Print Name = Forced Numeric ID time test, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-006 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.9602375e-016 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-007 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-016 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/test1': -TH1.Print Name = Forced Alpha ID time test, Entries= 50000, Total sum= 50000 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | -0.0098319667 | -0.0098319667 | 0 | -Aida2Root INFO | 'meanErr' | 0.0044725853 | 0.0044725853 | 0 | -Aida2Root INFO | 'rms' | 1.0001005 | 1.0001005 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0031550521 | 0.0031625954 | -7.5432549e-006 | -Aida2Root INFO | 'skewness' | 0.0095032078 | 0.0095032078 | -1.9602375e-016 | -Aida2Root INFO | 'skewnessErr' | 0.010953794 | 0.010954451 | -6.5724078e-007 | -Aida2Root INFO | 'kurtosis' | -0.0095692109 | -0.0095692109 | -4.4408921e-016 | -Aida2Root INFO | 'kurtosisErr' | 0.021905616 | 0.021908902 | -3.2860385e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir2/bino': -TH1.Print Name = Binominal, Entries= 50000, Total sum= 48615 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.9060989 | 1.9060989 | 0 | -Aida2Root INFO | 'meanErr' | 0.005047036 | 0.005047036 | 0 | -Aida2Root INFO | 'rms' | 1.1128114 | 1.1128114 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0029106545 | 0.0035687934 | -0.00065813892 | -Aida2Root INFO | 'skewness' | 0.25726049 | 0.25726049 | 2.7755576e-016 | -Aida2Root INFO | 'skewnessErr' | 0.011108711 | 0.011109397 | -6.8552544e-007 | -Aida2Root INFO | 'kurtosis' | -0.66968326 | -0.66968326 | -8.8817842e-016 | -Aida2Root INFO | 'kurtosisErr' | 0.022215366 | 0.022218794 | -3.4274498e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/subdir1/bino': -TH1.Print Name = Binominal, Entries= 50000, Total sum= 48615 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.9060989 | 1.9060989 | 0 | -Aida2Root INFO | 'meanErr' | 0.005047036 | 0.005047036 | 0 | -Aida2Root INFO | 'rms' | 1.1128114 | 1.1128114 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0029106545 | 0.0035687934 | -0.00065813892 | -Aida2Root INFO | 'skewness' | 0.25726049 | 0.25726049 | 2.7755576e-016 | -Aida2Root INFO | 'skewnessErr' | 0.011108711 | 0.011109397 | -6.8552544e-007 | -Aida2Root INFO | 'kurtosis' | -0.66968326 | -0.66968326 | -8.8817842e-016 | -Aida2Root INFO | 'kurtosisErr' | 0.022215366 | 0.022218794 | -3.4274498e-006 | -Aida2Root INFO The native ROOT printout for 1D-histogram 'SimpleHistos/poisson': -TH1.Print Name = Poisson, Entries= 50000, Total sum= 47512 -Aida2Root INFO | Compare | AIDA/HistoStats | ROOT/TH1 | Delta | -Aida2Root INFO | 'mean' | 1.8073329 | 1.8073329 | 0 | -Aida2Root INFO | 'meanErr' | 0.0053975724 | 0.0053975724 | 0 | -Aida2Root INFO | 'rms' | 1.1765222 | 1.1765222 | 0 | -Aida2Root INFO | 'rmsErr' | 0.0030077251 | 0.00381666 | -0.00080893493 | -Aida2Root INFO | 'skewness' | 0.32643021 | 0.32643021 | 3.3306691e-016 | -Aida2Root INFO | 'skewnessErr' | 0.011236901 | 0.01123761 | -7.0953469e-007 | -Aida2Root INFO | 'kurtosis' | -0.7579914 | -0.7579914 | 0 | -Aida2Root INFO | 'kurtosisErr' | 0.022471673 | 0.022475221 | -3.5474855e-006 | -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Gaussian V Flat': -TH1.Print Name = Gaussian V Flat, Entries= 50000, Total sum= 24949 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/Exponential V Flat': -TH1.Print Name = Exponential V Flat, Entries= 50000, Total sum= 24757 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/binVpois': -TH1.Print Name = Binom V poisson, Entries= 50000, Total sum= 46207 -Aida2Root INFO The native ROOT printout for 2D-histogram 'SimpleHistos/expoVpois': -TH1.Print Name = Expo V poisson, Entries= 50000, Total sum= 47190 -Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3D plot AutoID': -TH1.Print Name = 3D plot AutoID, Entries= 50000, Total sum= 46587 -Aida2Root INFO The native ROOT printout for 3D-histogram 'SimpleHistos/3d': -TH1.Print Name = 3D plot ForcedID, Entries= 50000, Total sum= 46587 -Aida2Root INFO The native ROOT printout for 1D-profile 'SimpleHistos/Expo V Gauss 1DProf': -TH1.Print Name = Expo V Gauss 1DProf, Entries= 50000, Total sum= 42.9343 -Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/321': -TH1.Print Name = 2D profile2, Entries= 50000, Total sum= 2732.42 -Aida2Root INFO The native ROOT printout for 2D-profile 'SimpleHistos/2dprof': -TH1.Print Name = 2D profile1, Entries= 50000, Total sum= 2732.42 -EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DOldStyle INFO Time User : Tot= 141 [ms] Ave/Min/Max= 2.81(+- 210)/ 0/1.56e+004 [us] #=49999 -1DAutoID INFO Time User : Tot= 125 [ms] Ave/Min/Max= 2.5(+- 198)/ 0/1.56e+004 [us] #=49999 -1DForcedAlphaID INFO Time User : Tot= 172 [ms] Ave/Min/Max= 3.44(+- 232)/ 0/1.56e+004 [us] #=49999 -1DForcedNumericID INFO Time User : Tot= 438 [ms] Ave/Min/Max= 8.75(+- 370)/ 0/1.56e+004 [us] #=49999 -ChronoStatSvc INFO Time User : Tot= 13.8 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -HistogramDataSvc DEBUG Substituted histograms #1 : -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/AlgTools.ref b/GaudiExamples/tests/qmtest/refs/AlgTools.ref index da914b706cbca5329590c6bbaf36e84651e36f77..4ab05e30eb7f937b136940bee4ad68856675077e 100644 --- a/GaudiExamples/tests/qmtest/refs/AlgTools.ref +++ b/GaudiExamples/tests/qmtest/refs/AlgTools.ref @@ -1,8 +1,6 @@ -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Services.opts +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Services.opts JobOptionsSvc INFO # (12,1): AuditorSvc.Auditors = ["ChronoAuditor"] -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Common.opts -JobOptionsSvc INFO # (9,1): ApplicationMgr.StatusCodeCheck = 1 -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/AlgTools.opts +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiExamples/options/AlgTools.opts JobOptionsSvc INFO # (9,1): ApplicationMgr.TopAlg = ["MyAlgorithm/MyAlg"] JobOptionsSvc INFO # (12,1): MessageSvc.OutputLevel = 3 JobOptionsSvc INFO # (17,1): ApplicationMgr.EvtMax = 10 @@ -11,216 +9,349 @@ JobOptionsSvc INFO # (25,1): MyAlg.MyTool.Int = 101 JobOptionsSvc INFO # (26,1): MyAlg.MyTool.Double = 101.1e+10 JobOptionsSvc INFO # (27,1): MyAlg.MyTool.String = "hundred one" JobOptionsSvc INFO # (28,1): MyAlg.MyTool.Bool = 0 -JobOptionsSvc INFO # (30,1): ToolSvc.MyTool.Int = 201 -JobOptionsSvc INFO # (31,1): ToolSvc.MyTool.Double = 201.1e+10 -JobOptionsSvc INFO # (32,1): ToolSvc.MyTool.String = "two hundred and one" -JobOptionsSvc INFO # (33,1): ToolSvc.MyTool.Bool = 1 -JobOptionsSvc INFO # (35,1): ToolSvc.MyTool.OutputLevel = 3 -JobOptionsSvc INFO # (36,1): MyAlgorithm.OutputLevel = 2 -JobOptionsSvc INFO # (41,1): ApplicationMgr.TopAlg += ["TestToolAlg"] -JobOptionsSvc INFO # (42,1): TestToolAlg.Tools += ["TestTool/ToolA"] -JobOptionsSvc INFO # (43,1): ToolSvc.ToolA.Tools = ["TestTool/ToolB"] -JobOptionsSvc INFO # (44,1): ToolSvc.ToolB.Tools = ["TestTool/ToolA"] -JobOptionsSvc INFO # (45,1): ToolSvc.ToolA.OutputLevel = 2 -JobOptionsSvc INFO # (46,1): ToolSvc.ToolB.OutputLevel = 2 -JobOptionsSvc INFO Job options successfully read in from /builds/gaudi/Gaudi/GaudiExamples/options/AlgTools.opts +JobOptionsSvc INFO # (30,1): MyAlg.InvalidToolHandle = "" +JobOptionsSvc INFO # (32,1): ToolSvc.MyTool.Int = 201 +JobOptionsSvc INFO # (33,1): ToolSvc.MyTool.Double = 201.1e+10 +JobOptionsSvc INFO # (34,1): ToolSvc.MyTool.String = "two hundred and one" +JobOptionsSvc INFO # (35,1): ToolSvc.MyTool.Bool = 1 +JobOptionsSvc INFO # (37,1): ToolSvc.MyTool.OutputLevel = 3 +JobOptionsSvc INFO # (38,1): MyAlg.OutputLevel = 2 +JobOptionsSvc INFO # (43,1): ApplicationMgr.TopAlg += ["TestToolAlg"] +JobOptionsSvc INFO # (44,1): TestToolAlg.Tools += ["TestTool/ToolA"] +JobOptionsSvc INFO # (45,1): ToolSvc.ToolA.Tools = ["TestTool/ToolB"] +JobOptionsSvc INFO # (46,1): ToolSvc.ToolB.Tools = ["TestTool/ToolA"] +JobOptionsSvc INFO # (47,1): ToolSvc.ToolA.OutputLevel = 2 +JobOptionsSvc INFO # (48,1): ToolSvc.ToolB.OutputLevel = 2 +JobOptionsSvc INFO Job options successfully read in from /home/marcocle/stacks/master/Gaudi/GaudiExamples/options/AlgTools.opts ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:15:55 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:55:26 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -StatusCodeSvc INFO initialize +MyAlg DEBUG Property update for OutputLevel : new value = 2 MyAlg INFO initializing.... ToolSvc.MyTool INFO intialize() has been called ToolSvc.MyTool INFO Int = 201 ToolSvc.MyTool INFO Double = 2.011e+12 ToolSvc.MyTool INFO String = two hundred and one ToolSvc.MyTool INFO Bool = 1 -ToolSvc.MyGaudi... INFO intialize() has been called -ToolSvc.MyGaudi... INFO Int = 100 -ToolSvc.MyGaudi... INFO Double = 100 -ToolSvc.MyGaudi... INFO String = hundred -ToolSvc.MyGaudi... INFO Bool = 1 +MyAlg.MyTool DEBUG Property update for OutputLevel : new value = 2 MyAlg.MyTool INFO intialize() has been called MyAlg.MyTool INFO Int = 101 MyAlg.MyTool INFO Double = 1.011e+12 MyAlg.MyTool INFO String = hundred one MyAlg.MyTool INFO Bool = 0 -MyAlg.MyGaudiTool INFO intialize() has been called -MyAlg.MyGaudiTool INFO Int = 100 -MyAlg.MyGaudiTool INFO Double = 100 -MyAlg.MyGaudiTool INFO String = hundred -MyAlg.MyGaudiTool INFO Bool = 1 +MyAlg.ToolWithName DEBUG Property update for OutputLevel : new value = 2 MyAlg.ToolWithName INFO intialize() has been called MyAlg.ToolWithName INFO Int = 100 MyAlg.ToolWithName INFO Double = 100 MyAlg.ToolWithName INFO String = hundred MyAlg.ToolWithName INFO Bool = 1 +MyAlg.WrongIfac... DEBUG Property update for OutputLevel : new value = 2 +MyAlg.WrongIfac... INFO intialize() has been called +MyAlg.WrongIfac... INFO Int = 100 +MyAlg.WrongIfac... INFO Double = 100 +MyAlg.WrongIfac... INFO String = hundred +MyAlg.WrongIfac... INFO Bool = 1 +MyAlg INFO unable to retrieve MyTool/WrongIfaceTool (expected) with exception: unable to dcast AlgTool MyTool/WrongIfaceTool to interface IWrongTool MyAlg INFO ....initialization done +MyAlg DEBUG input handles: 0 +MyAlg DEBUG output handles: 0 +MyAlg DEBUG Registering all Tools in ToolHandleArray MyPublicToolHandleArrayProperty +ToolSvc.Another... INFO intialize() has been called +ToolSvc.Another... INFO Int = 100 +ToolSvc.Another... INFO Double = 100 +ToolSvc.Another... INFO String = hundred +ToolSvc.Another... INFO Bool = 1 +MyAlg DEBUG Adding public ToolHandle tool ToolSvc.AnotherConstGenericToolHandle (MyTool) +ToolSvc.Another... INFO intialize() has been called +ToolSvc.Another... INFO Int = 100 +ToolSvc.Another... INFO Double = 100 +ToolSvc.Another... INFO String = hundred +ToolSvc.Another... INFO Bool = 1 +MyAlg DEBUG Adding public ToolHandle tool ToolSvc.AnotherInstanceOfMyTool (MyTool) +MyAlg.PrivToolH... DEBUG Property update for OutputLevel : new value = 2 +MyAlg.PrivToolH... INFO intialize() has been called +MyAlg.PrivToolH... INFO Int = 100 +MyAlg.PrivToolH... INFO Double = 100 +MyAlg.PrivToolH... INFO String = hundred +MyAlg.PrivToolH... INFO Bool = 1 +MyAlg DEBUG Adding private ToolHandle tool MyAlg.PrivToolHandle (MyTool) +ToolSvc.PubTool... INFO intialize() has been called +ToolSvc.PubTool... INFO Int = 100 +ToolSvc.PubTool... INFO Double = 100 +ToolSvc.PubTool... INFO String = hundred +ToolSvc.PubTool... INFO Bool = 1 +MyAlg DEBUG Adding public ToolHandle tool ToolSvc.PubToolHandle (MyTool) +ToolSvc.Generic... INFO intialize() has been called +ToolSvc.Generic... INFO Int = 100 +ToolSvc.Generic... INFO Double = 100 +ToolSvc.Generic... INFO String = hundred +ToolSvc.Generic... INFO Bool = 1 +MyAlg DEBUG Adding public ToolHandle tool ToolSvc.GenericToolHandle (MyTool) +MyAlg DEBUG ToolHandle TestToolFailing/UnusedToolHandle not used +MyAlg DEBUG ToolHandle MyTool/WrongIfaceTool not used +MyAlg.LegacyToo... DEBUG Property update for OutputLevel : new value = 2 +MyAlg.LegacyToo... INFO intialize() has been called +MyAlg.LegacyToo... INFO Int = 100 +MyAlg.LegacyToo... INFO Double = 100 +MyAlg.LegacyToo... INFO String = hundred +MyAlg.LegacyToo... INFO Bool = 1 +MyAlg DEBUG Adding private ToolHandle tool MyAlg.LegacyToolHandle (MyTool) +MyAlg DEBUG Data Deps for MyAlg ToolSvc.ToolA DEBUG Property update for OutputLevel : new value = 2 ToolSvc.ToolA DEBUG Initialize -ToolSvc.ToolA DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolA DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolA DEBUG List of ALL properties of TestTool/ToolSvc.ToolA #properties = 19 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolB' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraInputs':[] ToolSvc.ToolA DEBUG Loading tool ToolB of type TestTool ToolSvc.ToolB DEBUG Property update for OutputLevel : new value = 2 ToolSvc.ToolB DEBUG Initialize -ToolSvc.ToolB DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolB DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolB DEBUG List of ALL properties of TestTool/ToolSvc.ToolB #properties = 19 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolA' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraInputs':[] ToolSvc.ToolB DEBUG Loading tool ToolA of type TestTool -ToolSvc.ToolB DEBUG Registering tool ToolSvc.ToolA -ToolSvc.ToolA DEBUG Registering tool ToolSvc.ToolB EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO intialize() has been called +ToolSvc.ConstGe... INFO Int = 100 +ToolSvc.ConstGe... INFO Double = 100 +ToolSvc.ConstGe... INFO String = hundred +ToolSvc.ConstGe... INFO Bool = 1 +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by' MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called +MyAlg.MyTool DEBUG doIt() [DEBUG] has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called +MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied assigned via ToolHandle<T>.... +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called +MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called +ToolSvc.PubTool... INFO doIt() has been called +ToolSvc.ConstGe... INFO doIt() has been called ApplicationMgr INFO Application Manager Stopped successfully MyAlg INFO finalizing.... EventLoopMgr INFO Histograms converted successfully according to request. ToolSvc INFO Removing all tools created by ToolSvc MyAlg.ToolWithName INFO finalize() has been called -MyAlg.MyGaudiTool INFO finalize() has been called MyAlg.MyTool INFO finalize() has been called -ToolSvc.MyGaudi... INFO finalize() has been called ToolSvc.MyTool INFO finalize() has been called ToolSvc.ToolB DEBUG Finalize -ToolSvc.ToolB DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolB DEBUG Tools to release : ToolSvc.ToolA -ToolSvc.ToolB DEBUG Releasing tool 'ToolSvc.ToolA' -ToolSvc.ToolB DEBUG De-Registering tool ToolSvc.ToolA -ToolSvc.ToolB DEBUG The tool 'ToolSvc.ToolA' of type 'TestTool' is released -ToolSvc.ToolB DEBUG Services to release : +MyAlg.LegacyToo... INFO finalize() has been called +ToolSvc.Generic... INFO finalize() has been called +ToolSvc.Another... INFO finalize() has been called +ToolSvc.Another... INFO finalize() has been called +MyAlg.WrongIfac... INFO finalize() has been called ToolSvc.ToolA DEBUG Finalize -ToolSvc.ToolA DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolA DEBUG Tools to release : ToolSvc.ToolB -ToolSvc.ToolA DEBUG Releasing tool 'ToolSvc.ToolB' -ToolSvc.ToolA DEBUG De-Registering tool ToolSvc.ToolB -ToolSvc.ToolA DEBUG The tool 'ToolSvc.ToolB' of type 'TestTool' is released -ToolSvc.ToolA DEBUG Services to release : +MyAlg.PrivToolH... INFO finalize() has been called +ToolSvc.ConstGe... INFO finalize() has been called +ToolSvc.PubTool... INFO finalize() has been called MyAlg.ToolWithName INFO destructor has been called -MyAlg.MyGaudiTool INFO destructor has been called MyAlg.MyTool INFO destructor has been called -ToolSvc.MyGaudi... INFO destructor has been called ToolSvc.MyTool INFO destructor has been called +MyAlg.LegacyToo... INFO destructor has been called +ToolSvc.Generic... INFO destructor has been called +ToolSvc.Another... INFO destructor has been called +ToolSvc.Another... INFO destructor has been called +MyAlg.WrongIfac... INFO destructor has been called +MyAlg.PrivToolH... INFO destructor has been called +ToolSvc.ConstGe... INFO destructor has been called +ToolSvc.PubTool... INFO destructor has been called ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/AlgTools2.ref b/GaudiExamples/tests/qmtest/refs/AlgTools2.ref deleted file mode 100644 index 8aa5971b48af5838039a3109b2d65ee8820a4764..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/refs/AlgTools2.ref +++ /dev/null @@ -1,591 +0,0 @@ -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Services.opts -JobOptionsSvc INFO # (12,1): AuditorSvc.Auditors = ["ChronoAuditor"] -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Common.opts -JobOptionsSvc INFO # (9,1): ApplicationMgr.StatusCodeCheck = 1 -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/AlgTools2.opts -JobOptionsSvc INFO # (10,1): ApplicationMgr.TopAlg = ["MyGaudiAlgorithm/MyAlg"] -JobOptionsSvc INFO # (13,1): MessageSvc.OutputLevel = 3 -JobOptionsSvc INFO # (18,1): ApplicationMgr.EvtMax = 10 -JobOptionsSvc INFO # (19,1): ApplicationMgr.EvtSel = "NONE" -JobOptionsSvc INFO # (26,1): MyAlg.MyTool.Int = 101 -JobOptionsSvc INFO # (27,1): MyAlg.MyTool.Double = 101.1e+10 -JobOptionsSvc INFO # (28,1): MyAlg.MyTool.String = "hundred one" -JobOptionsSvc INFO # (29,1): MyAlg.MyTool.Bool = 0 -JobOptionsSvc INFO # (31,1): MyAlg.InvalidToolHandle = "" -JobOptionsSvc INFO # (33,1): ToolSvc.MyTool.Int = 201 -JobOptionsSvc INFO # (34,1): ToolSvc.MyTool.Double = 201.1e+10 -JobOptionsSvc INFO # (35,1): ToolSvc.MyTool.String = "two hundred and one" -JobOptionsSvc INFO # (36,1): ToolSvc.MyTool.Bool = 1 -JobOptionsSvc INFO # (38,1): ToolSvc.MyTool.OutputLevel = 3 -JobOptionsSvc INFO # (39,1): MyAlg.OutputLevel = 2 -JobOptionsSvc INFO # (44,1): ApplicationMgr.TopAlg += ["TestToolAlg"] -JobOptionsSvc INFO # (45,1): TestToolAlg.Tools += ["TestTool/ToolA"] -JobOptionsSvc INFO # (46,1): ToolSvc.ToolA.Tools = ["TestTool/ToolB"] -JobOptionsSvc INFO # (47,1): ToolSvc.ToolB.Tools = ["TestTool/ToolA"] -JobOptionsSvc INFO # (48,1): ToolSvc.ToolA.OutputLevel = 2 -JobOptionsSvc INFO # (49,1): ToolSvc.ToolB.OutputLevel = 2 -JobOptionsSvc INFO Job options successfully read in from /builds/gaudi/Gaudi/GaudiExamples/options/AlgTools2.opts -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:15:56 2020 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -StatusCodeSvc INFO initialize -MyAlg DEBUG Property update for OutputLevel : new value = 2 -MyAlg DEBUG Initialize base class GaudiCommon<Algorithm> -MyAlg DEBUG could not locate CounterSummarySvc, no counter summary will be made -MyAlg DEBUG List of ALL properties of MyGaudiAlgorithm/MyAlg #properties = 42 -MyAlg DEBUG Property ['Name': Value] = 'UndefinedToolHandle': -MyAlg DEBUG Property ['Name': Value] = 'LegacyToolHandle':MyTool/LegacyToolHandle -MyAlg DEBUG Property ['Name': Value] = 'trackSelection':/Event/MyAnalysis/Tracks -MyAlg DEBUG Property ['Name': Value] = 'raw':/Rec/RAW -MyAlg DEBUG Property ['Name': Value] = 'hits':/Event/Rec/Hits -MyAlg DEBUG Property ['Name': Value] = 'tracks':/Event/Rec/Tracks -MyAlg DEBUG Property ['Name': Value] = 'MyPublicToolHandleArrayProperty':[ 'MyTool/AnotherConstGenericToolHandle' , 'MyTool/AnotherInstanceOfMyTool' ] -MyAlg DEBUG Property ['Name': Value] = 'WrongIfaceTool':MyTool/WrongIfaceTool -MyAlg DEBUG Property ['Name': Value] = 'InvalidToolHandle': -MyAlg DEBUG Property ['Name': Value] = 'UnusedToolHandle':TestToolFailing/UnusedToolHandle -MyAlg DEBUG Property ['Name': Value] = 'GenericToolHandle':MyTool/GenericToolHandle -MyAlg DEBUG Property ['Name': Value] = 'PubToolHandle':MyTool/PubToolHandle -MyAlg DEBUG Property ['Name': Value] = 'PrivToolHandle':MyTool/PrivToolHandle -MyAlg DEBUG Property ['Name': Value] = 'ToolWithName':'MyTool' -MyAlg DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -MyAlg DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -MyAlg DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -MyAlg DEBUG Property ['Name': Value] = 'Context':'' -MyAlg DEBUG Property ['Name': Value] = 'TypePrint':True -MyAlg DEBUG Property ['Name': Value] = 'PropertiesPrint':False -MyAlg DEBUG Property ['Name': Value] = 'ErrorsPrint':True -MyAlg DEBUG Property ['Name': Value] = 'RootInTES':'' -MyAlg DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -MyAlg DEBUG Property ['Name': Value] = 'Blocking':False -MyAlg DEBUG Property ['Name': Value] = 'NeededResources':[ ] -MyAlg DEBUG Property ['Name': Value] = 'Cardinality':1 -MyAlg DEBUG Property ['Name': Value] = 'RegisterForContextService':True -MyAlg DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -MyAlg DEBUG Property ['Name': Value] = 'Timeline':False -MyAlg DEBUG Property ['Name': Value] = 'AuditStop':False -MyAlg DEBUG Property ['Name': Value] = 'AuditStart':False -MyAlg DEBUG Property ['Name': Value] = 'AuditFinalize':False -MyAlg DEBUG Property ['Name': Value] = 'AuditExecute':False -MyAlg DEBUG Property ['Name': Value] = 'AuditRestart':False -MyAlg DEBUG Property ['Name': Value] = 'AuditReinitialize':False -MyAlg DEBUG Property ['Name': Value] = 'AuditInitialize':False -MyAlg DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -MyAlg DEBUG Property ['Name': Value] = 'ErrorMax':1 -MyAlg DEBUG Property ['Name': Value] = 'Enable':True -MyAlg DEBUG Property ['Name': Value] = 'OutputLevel':2 -MyAlg DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -MyAlg DEBUG Property ['Name': Value] = 'ExtraInputs':[] -MyAlg INFO initializing.... -ToolSvc.MyTool INFO intialize() has been called -ToolSvc.MyTool INFO Int = 201 -ToolSvc.MyTool INFO Double = 2.011e+12 -ToolSvc.MyTool INFO String = two hundred and one -ToolSvc.MyTool INFO Bool = 1 -MyAlg DEBUG Registering tool ToolSvc.MyTool -MyAlg.MyTool DEBUG Property update for OutputLevel : new value = 2 -MyAlg.MyTool INFO intialize() has been called -MyAlg.MyTool INFO Int = 101 -MyAlg.MyTool INFO Double = 1.011e+12 -MyAlg.MyTool INFO String = hundred one -MyAlg.MyTool INFO Bool = 0 -MyAlg DEBUG Registering tool MyAlg.MyTool -ToolSvc.MyGaudi... INFO intialize() has been called -ToolSvc.MyGaudi... INFO Int = 100 -ToolSvc.MyGaudi... INFO Double = 100 -ToolSvc.MyGaudi... INFO String = hundred -ToolSvc.MyGaudi... INFO Bool = 1 -MyAlg DEBUG Registering tool ToolSvc.MyGaudiTool -MyAlg.MyGaudiTool DEBUG Property update for OutputLevel : new value = 2 -MyAlg.MyGaudiTool DEBUG Initialize base class GaudiCommon<AlgTool> -MyAlg.MyGaudiTool DEBUG could not locate CounterSummarySvc, no counter summary will be made -MyAlg.MyGaudiTool DEBUG List of ALL properties of MyGaudiTool/MyAlg.MyGaudiTool #properties = 22 -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'Bool':True -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'String':'hundred' -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'Double':100.00000 -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'Int':100 -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'Context':'' -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'TypePrint':True -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'PropertiesPrint':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'ErrorsPrint':True -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'RootInTES':'' -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditRestart':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditReinitialize':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditFinalize':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditStop':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditStart':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditInitialize':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'AuditTools':False -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'OutputLevel':2 -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -MyAlg.MyGaudiTool DEBUG Property ['Name': Value] = 'ExtraInputs':[] -MyAlg.MyGaudiTool INFO intialize() has been called -MyAlg.MyGaudiTool INFO Int = 100 -MyAlg.MyGaudiTool INFO Double = 100 -MyAlg.MyGaudiTool INFO String = hundred -MyAlg.MyGaudiTool INFO Bool = 1 -MyAlg DEBUG Registering tool MyAlg.MyGaudiTool -MyAlg.ToolWithName DEBUG Property update for OutputLevel : new value = 2 -MyAlg.ToolWithName INFO intialize() has been called -MyAlg.ToolWithName INFO Int = 100 -MyAlg.ToolWithName INFO Double = 100 -MyAlg.ToolWithName INFO String = hundred -MyAlg.ToolWithName INFO Bool = 1 -MyAlg DEBUG Registering tool MyAlg.ToolWithName -MyAlg DEBUG Registering tool MyAlg.MyGaudiTool -MyAlg INFO /Event/Rec/Tracks -MyAlg INFO /Event/Rec/Hits -MyAlg INFO /Rec/RAW -MyAlg INFO /Event/MyAnalysis/Tracks -MyAlg.WrongIfac... DEBUG Property update for OutputLevel : new value = 2 -MyAlg.WrongIfac... INFO intialize() has been called -MyAlg.WrongIfac... INFO Int = 100 -MyAlg.WrongIfac... INFO Double = 100 -MyAlg.WrongIfac... INFO String = hundred -MyAlg.WrongIfac... INFO Bool = 1 -MyAlg INFO unable to retrieve MyTool/WrongIfaceTool (expected) with exception: unable to dcast AlgTool MyTool/WrongIfaceTool to interface IMyOtherTool -MyAlg INFO ....initialization done -MyAlg DEBUG input handles: 3 -MyAlg DEBUG output handles: 1 -MyAlg DEBUG Registering all Tools in ToolHandleArray MyPublicToolHandleArrayProperty -ToolSvc.Another... INFO intialize() has been called -ToolSvc.Another... INFO Int = 100 -ToolSvc.Another... INFO Double = 100 -ToolSvc.Another... INFO String = hundred -ToolSvc.Another... INFO Bool = 1 -MyAlg DEBUG Adding public ToolHandle tool ToolSvc.AnotherConstGenericToolHandle (MyTool) -ToolSvc.Another... INFO intialize() has been called -ToolSvc.Another... INFO Int = 100 -ToolSvc.Another... INFO Double = 100 -ToolSvc.Another... INFO String = hundred -ToolSvc.Another... INFO Bool = 1 -MyAlg DEBUG Adding public ToolHandle tool ToolSvc.AnotherInstanceOfMyTool (MyTool) -MyAlg.PrivToolH... DEBUG Property update for OutputLevel : new value = 2 -MyAlg.PrivToolH... INFO intialize() has been called -MyAlg.PrivToolH... INFO Int = 100 -MyAlg.PrivToolH... INFO Double = 100 -MyAlg.PrivToolH... INFO String = hundred -MyAlg.PrivToolH... INFO Bool = 1 -MyAlg DEBUG Adding private ToolHandle tool MyAlg.PrivToolHandle (MyTool) -ToolSvc.PubTool... INFO intialize() has been called -ToolSvc.PubTool... INFO Int = 100 -ToolSvc.PubTool... INFO Double = 100 -ToolSvc.PubTool... INFO String = hundred -ToolSvc.PubTool... INFO Bool = 1 -MyAlg DEBUG Adding public ToolHandle tool ToolSvc.PubToolHandle (MyTool) -ToolSvc.Generic... INFO intialize() has been called -ToolSvc.Generic... INFO Int = 100 -ToolSvc.Generic... INFO Double = 100 -ToolSvc.Generic... INFO String = hundred -ToolSvc.Generic... INFO Bool = 1 -MyAlg DEBUG Adding public ToolHandle tool ToolSvc.GenericToolHandle (MyTool) -MyAlg DEBUG ToolHandle TestToolFailing/UnusedToolHandle not used -MyAlg DEBUG ToolHandle MyTool/WrongIfaceTool not used -MyAlg.LegacyToo... DEBUG Property update for OutputLevel : new value = 2 -MyAlg.LegacyToo... INFO intialize() has been called -MyAlg.LegacyToo... INFO Int = 100 -MyAlg.LegacyToo... INFO Double = 100 -MyAlg.LegacyToo... INFO String = hundred -MyAlg.LegacyToo... INFO Bool = 1 -MyAlg DEBUG Adding private ToolHandle tool MyAlg.LegacyToolHandle (MyTool) -MyAlg DEBUG Data Deps for MyAlg - + INPUT '/Event/Rec/Hits' - + INPUT '/Event/Rec/Tracks' - + INPUT '/Rec/RAW' - + OUTPUT '/Event/MyAnalysis/Tracks' -ToolSvc.ToolA DEBUG Property update for OutputLevel : new value = 2 -ToolSvc.ToolA DEBUG Initialize -ToolSvc.ToolA DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolA DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolA DEBUG List of ALL properties of TestTool/ToolSvc.ToolA #properties = 19 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolB' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraInputs':[] -ToolSvc.ToolA DEBUG Loading tool ToolB of type TestTool -ToolSvc.ToolB DEBUG Property update for OutputLevel : new value = 2 -ToolSvc.ToolB DEBUG Initialize -ToolSvc.ToolB DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolB DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolB DEBUG List of ALL properties of TestTool/ToolSvc.ToolB #properties = 19 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolA' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraInputs':[] -ToolSvc.ToolB DEBUG Loading tool ToolA of type TestTool -ToolSvc.ToolB DEBUG Registering tool ToolSvc.ToolA -ToolSvc.ToolA DEBUG Registering tool ToolSvc.ToolB -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr INFO Application Manager Started successfully -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO intialize() has been called -ToolSvc.ConstGe... INFO Int = 100 -ToolSvc.ConstGe... INFO Double = 100 -ToolSvc.ConstGe... INFO String = hundred -ToolSvc.ConstGe... INFO Bool = 1 -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyAlg] -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO executing.... -MyAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyAlg.MyTool INFO doIt() has been called -MyAlg.MyTool DEBUG doIt() [DEBUG] has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by [MyAlg]' -MyAlg.MyGaudiTool INFO doIt() has been called -MyAlg.MyGaudiTool DEBUG doIt() [DEBUG] has been called -MyAlg.ToolWithName INFO doIt() has been called -MyAlg.ToolWithName DEBUG doIt() [DEBUG] has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyAlg INFO tools created via ToolHandle<T>.... -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied assigned via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.PubTool... INFO doIt() has been called -ToolSvc.ConstGe... INFO doIt() has been called -MyAlg INFO tools copied constructed via ToolHandle<T>.... -ToolSvc.PubTool... INFO doIt() has been called -MyAlg.PrivToolH... INFO doIt() has been called -MyAlg.PrivToolH... DEBUG doIt() [DEBUG] has been called -ToolSvc.ConstGe... INFO doIt() has been called -ApplicationMgr INFO Application Manager Stopped successfully -MyAlg INFO finalizing.... -MyAlg DEBUG Finalize base class GaudiAlgorithm -MyAlg DEBUG Tools to release : ToolSvc.MyTool MyAlg.MyTool ToolSvc.MyGaudiTool MyAlg.MyGaudiTool MyAlg.ToolWithName MyAlg.MyGaudiTool -MyAlg DEBUG Releasing tool 'MyAlg.MyGaudiTool' -MyAlg DEBUG De-Registering tool MyAlg.MyGaudiTool -MyAlg DEBUG The tool 'MyAlg.MyGaudiTool' of type 'MyGaudiTool' is released -MyAlg DEBUG Releasing tool 'MyAlg.MyGaudiTool' -MyAlg DEBUG De-Registering tool MyAlg.MyGaudiTool -MyAlg DEBUG The tool 'MyAlg.MyGaudiTool' of type 'MyGaudiTool' is released -MyAlg DEBUG Releasing tool 'MyAlg.ToolWithName' -MyAlg DEBUG De-Registering tool MyAlg.ToolWithName -MyAlg DEBUG The tool 'MyAlg.ToolWithName' of type 'MyTool' is released -MyAlg DEBUG Releasing tool 'ToolSvc.MyGaudiTool' -MyAlg DEBUG De-Registering tool ToolSvc.MyGaudiTool -MyAlg DEBUG The tool 'ToolSvc.MyGaudiTool' of type 'MyGaudiTool' is released -MyAlg DEBUG Releasing tool 'MyAlg.MyTool' -MyAlg DEBUG De-Registering tool MyAlg.MyTool -MyAlg DEBUG The tool 'MyAlg.MyTool' of type 'MyTool' is released -MyAlg DEBUG Releasing tool 'ToolSvc.MyTool' -MyAlg DEBUG De-Registering tool ToolSvc.MyTool -MyAlg DEBUG The tool 'ToolSvc.MyTool' of type 'MyTool' is released -MyAlg DEBUG Services to release : -EventLoopMgr INFO Histograms converted successfully according to request. -ToolSvc INFO Removing all tools created by ToolSvc -MyAlg.ToolWithName INFO finalize() has been called -MyAlg.MyGaudiTool INFO finalize() has been called -MyAlg.MyGaudiTool DEBUG ==> Finalize the base class GaudiTool -MyAlg.MyGaudiTool DEBUG Tools to release : -MyAlg.MyGaudiTool DEBUG Services to release : -ToolSvc.MyGaudi... INFO finalize() has been called -MyAlg.MyTool INFO finalize() has been called -ToolSvc.MyTool INFO finalize() has been called -ToolSvc.ToolB DEBUG Finalize -ToolSvc.ToolB DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolB DEBUG Tools to release : ToolSvc.ToolA -ToolSvc.ToolB DEBUG Releasing tool 'ToolSvc.ToolA' -ToolSvc.ToolB DEBUG De-Registering tool ToolSvc.ToolA -ToolSvc.ToolB DEBUG The tool 'ToolSvc.ToolA' of type 'TestTool' is released -ToolSvc.ToolB DEBUG Services to release : -ToolSvc.ToolA DEBUG Finalize -ToolSvc.ToolA DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolA DEBUG Tools to release : ToolSvc.ToolB -ToolSvc.ToolA DEBUG Releasing tool 'ToolSvc.ToolB' -ToolSvc.ToolA DEBUG De-Registering tool ToolSvc.ToolB -ToolSvc.ToolA DEBUG The tool 'ToolSvc.ToolB' of type 'TestTool' is released -ToolSvc.ToolA DEBUG Services to release : -MyAlg.LegacyToo... INFO finalize() has been called -ToolSvc.Generic... INFO finalize() has been called -ToolSvc.Another... INFO finalize() has been called -ToolSvc.Another... INFO finalize() has been called -MyAlg.WrongIfac... INFO finalize() has been called -MyAlg.PrivToolH... INFO finalize() has been called -ToolSvc.ConstGe... INFO finalize() has been called -ToolSvc.PubTool... INFO finalize() has been called -MyAlg.ToolWithName INFO destructor has been called -MyAlg.MyGaudiTool INFO destructor has been called -ToolSvc.MyGaudi... INFO destructor has been called -MyAlg.MyTool INFO destructor has been called -ToolSvc.MyTool INFO destructor has been called -MyAlg.LegacyToo... INFO destructor has been called -ToolSvc.Generic... INFO destructor has been called -ToolSvc.Another... INFO destructor has been called -ToolSvc.Another... INFO destructor has been called -MyAlg.WrongIfac... INFO destructor has been called -MyAlg.PrivToolH... INFO destructor has been called -ToolSvc.ConstGe... INFO destructor has been called -ToolSvc.PubTool... INFO destructor has been called -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/AlgTools_pyopts.ref b/GaudiExamples/tests/qmtest/refs/AlgTools_pyopts.ref index 5cf2a3e1b5ddb7092def9b986aea93fa9bf5a1bb..13acddcc2f9dbfff7b85a833e7071d343b76329a 100644 --- a/GaudiExamples/tests/qmtest/refs/AlgTools_pyopts.ref +++ b/GaudiExamples/tests/qmtest/refs/AlgTools_pyopts.ref @@ -1,6 +1,6 @@ # setting LC_ALL to "C" -# --> Including file '/builds/gaudi/Gaudi/GaudiExamples/options/AlgTools.py' -# <-- End of file '/builds/gaudi/Gaudi/GaudiExamples/options/AlgTools.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/AlgTools.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/AlgTools.py' # applying configuration of GaudiExamplesCommonConf # /***** User GaudiExamplesCommonConf/GaudiExamplesCommonConf **************************************** # |-OutputLevel = 3 @@ -8,65 +8,33 @@ # \----- (End of User GaudiExamplesCommonConf/GaudiExamplesCommonConf) ------------------------------- ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:15:59 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:55:27 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -StatusCodeSvc INFO initialize MyAlg INFO initializing.... ToolSvc.MyTool INFO intialize() has been called ToolSvc.MyTool INFO Int = 201 ToolSvc.MyTool INFO Double = 2.011e+12 ToolSvc.MyTool INFO String = two hundred and one ToolSvc.MyTool INFO Bool = 1 -ToolSvc.MyGaudi... INFO intialize() has been called -ToolSvc.MyGaudi... INFO Int = 100 -ToolSvc.MyGaudi... INFO Double = 100 -ToolSvc.MyGaudi... INFO String = hundred -ToolSvc.MyGaudi... INFO Bool = 1 MyAlg.MyTool INFO intialize() has been called MyAlg.MyTool INFO Int = 101 MyAlg.MyTool INFO Double = 1.011e+12 MyAlg.MyTool INFO String = hundred one MyAlg.MyTool INFO Bool = 0 -MyAlg.MyGaudiTool INFO intialize() has been called -MyAlg.MyGaudiTool INFO Int = 100 -MyAlg.MyGaudiTool INFO Double = 100 -MyAlg.MyGaudiTool INFO String = hundred -MyAlg.MyGaudiTool INFO Bool = 1 MyAlg.ToolWithName INFO intialize() has been called MyAlg.ToolWithName INFO Int = 10 MyAlg.ToolWithName INFO Double = 20 MyAlg.ToolWithName INFO String = abc MyAlg.ToolWithName INFO Bool = 0 +MyAlg.WrongIfac... INFO intialize() has been called +MyAlg.WrongIfac... INFO Int = 100 +MyAlg.WrongIfac... INFO Double = 100 +MyAlg.WrongIfac... INFO String = hundred +MyAlg.WrongIfac... INFO Bool = 1 +MyAlg INFO unable to retrieve MyTool/WrongIfaceTool (expected) with exception: unable to dcast AlgTool MyTool/WrongIfaceTool to interface IWrongTool MyAlg INFO ....initialization done -MyGaudiAlg INFO initializing.... -MyGaudiAlg.MyTool INFO intialize() has been called -MyGaudiAlg.MyTool INFO Int = 100 -MyGaudiAlg.MyTool INFO Double = 100 -MyGaudiAlg.MyTool INFO String = hundred -MyGaudiAlg.MyTool INFO Bool = 1 -MyGaudiAlg.MyGa... INFO intialize() has been called -MyGaudiAlg.MyGa... INFO Int = 100 -MyGaudiAlg.MyGa... INFO Double = 100 -MyGaudiAlg.MyGa... INFO String = hundred -MyGaudiAlg.MyGa... INFO Bool = 1 -MyGaudiAlg.Tool... INFO intialize() has been called -MyGaudiAlg.Tool... INFO Int = 100 -MyGaudiAlg.Tool... INFO Double = 100 -MyGaudiAlg.Tool... INFO String = hundred -MyGaudiAlg.Tool... INFO Bool = 1 -MyGaudiAlg INFO /Event/Rec/Tracks -MyGaudiAlg INFO /Event/Rec/Hits -MyGaudiAlg INFO /Rec/RAW -MyGaudiAlg INFO /Event/MyAnalysis/Tracks -MyGaudiAlg.Wron... INFO intialize() has been called -MyGaudiAlg.Wron... INFO Int = 100 -MyGaudiAlg.Wron... INFO Double = 100 -MyGaudiAlg.Wron... INFO String = hundred -MyGaudiAlg.Wron... INFO Bool = 1 -MyGaudiAlg INFO unable to retrieve MyTool/WrongIfaceTool (expected) with exception: unable to dcast AlgTool MyTool/WrongIfaceTool to interface IMyOtherTool -MyGaudiAlg INFO ....initialization done ToolSvc.Another... INFO intialize() has been called ToolSvc.Another... INFO Int = 100 ToolSvc.Another... INFO Double = 100 @@ -77,11 +45,11 @@ ToolSvc.Another... INFO Int = 100 ToolSvc.Another... INFO Double = 100 ToolSvc.Another... INFO String = hundred ToolSvc.Another... INFO Bool = 1 -MyGaudiAlg.Priv... INFO intialize() has been called -MyGaudiAlg.Priv... INFO Int = 100 -MyGaudiAlg.Priv... INFO Double = 100 -MyGaudiAlg.Priv... INFO String = Is a private tool -MyGaudiAlg.Priv... INFO Bool = 1 +MyAlg.PrivToolH... INFO intialize() has been called +MyAlg.PrivToolH... INFO Int = 100 +MyAlg.PrivToolH... INFO Double = 100 +MyAlg.PrivToolH... INFO String = Is a private tool +MyAlg.PrivToolH... INFO Bool = 1 ToolSvc.TestPub... INFO intialize() has been called ToolSvc.TestPub... INFO Int = 100 ToolSvc.TestPub... INFO Double = 100 @@ -92,86 +60,28 @@ ToolSvc.Generic... INFO Int = 100 ToolSvc.Generic... INFO Double = 100 ToolSvc.Generic... INFO String = hundred ToolSvc.Generic... INFO Bool = 1 -MyGaudiAlg.Lega... INFO intialize() has been called -MyGaudiAlg.Lega... INFO Int = 100 -MyGaudiAlg.Lega... INFO Double = 100 -MyGaudiAlg.Lega... INFO String = hundred -MyGaudiAlg.Lega... INFO Bool = 1 +MyAlg.LegacyToo... INFO intialize() has been called +MyAlg.LegacyToo... INFO Int = 100 +MyAlg.LegacyToo... INFO Double = 100 +MyAlg.LegacyToo... INFO String = hundred +MyAlg.LegacyToo... INFO Bool = 1 ToolSvc.ToolA DEBUG Property update for OutputLevel : new value = 2 ToolSvc.ToolA DEBUG Initialize -ToolSvc.ToolA DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolA DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolA DEBUG List of ALL properties of TestTool/ToolSvc.ToolA #properties = 19 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolB' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolA DEBUG Property ['Name': Value] = 'ExtraInputs':[] ToolSvc.ToolA DEBUG Loading tool ToolB of type TestTool ToolSvc.ToolB DEBUG Property update for OutputLevel : new value = 2 ToolSvc.ToolB DEBUG Initialize -ToolSvc.ToolB DEBUG Initialize base class GaudiCommon<AlgTool> -ToolSvc.ToolB DEBUG could not locate CounterSummarySvc, no counter summary will be made -ToolSvc.ToolB DEBUG List of ALL properties of TestTool/ToolSvc.ToolB #properties = 19 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Tools':[ 'TestTool/ToolA' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ContextService':'AlgContextSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'Context':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'TypePrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'PropertiesPrint':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ErrorsPrint':True -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'RootInTES':'' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditRestart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditReinitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditFinalize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStop':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditStart':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditInitialize':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'AuditTools':False -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'OutputLevel':2 -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -ToolSvc.ToolB DEBUG Property ['Name': Value] = 'ExtraInputs':[] ToolSvc.ToolB DEBUG Loading tool ToolA of type TestTool -ToolSvc.ToolB DEBUG Registering tool ToolSvc.ToolA -ToolSvc.ToolA DEBUG Registering tool ToolSvc.ToolB EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO intialize() has been called ToolSvc.ConstGe... INFO Int = 100 @@ -179,7 +89,7 @@ ToolSvc.ConstGe... INFO Double = 100 ToolSvc.ConstGe... INFO String = hundred ToolSvc.ConstGe... INFO Bool = 1 ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO intialize() has been called ToolSvc.PubTool... INFO Int = 100 ToolSvc.PubTool... INFO Double = 100 @@ -188,323 +98,192 @@ ToolSvc.PubTool... INFO Bool = 1 ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: public tool called by [MyGaudiAlg] -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called MyAlg INFO executing.... ToolSvc.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by' MyAlg.MyTool INFO doIt() has been called -MyAlg.MyGaudiTool INFO doIt() has been called MyAlg.ToolWithName INFO doIt() has been called -MyAlg.MyGaudiTool INFO doItAgain() has been called -MyGaudiAlg INFO executing.... -MyGaudiAlg INFO tools created with tool<T>... -ToolSvc.MyTool INFO doIt() has been called -MyGaudiAlg.MyTool INFO doIt() has been called -ToolSvc.MyGaudi... INFO doIt() has been called -ToolSvc.MyGaudi... INFO MyGaudiTool:: The INFO message is suppressed : 'public tool called by [MyGaudiAlg]' -MyGaudiAlg.MyGa... INFO doIt() has been called -MyGaudiAlg.Tool... INFO doIt() has been called -MyGaudiAlg.MyGa... INFO doItAgain() has been called -MyGaudiAlg INFO tools created via ToolHandle<T>.... -MyGaudiAlg.Priv... INFO doIt() has been called +MyAlg.MyTool INFO doItAgain() has been called +MyAlg INFO tools created via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied assigned via ToolHandle<T>.... +MyAlg INFO tools copied assigned via ToolHandle<T>.... ToolSvc.PubTool... INFO doIt() has been called ToolSvc.PubTool... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called -MyGaudiAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg INFO tools copied constructed via ToolHandle<T>.... +MyAlg.PrivToolH... INFO doIt() has been called ToolSvc.TestPub... INFO doIt() has been called -MyGaudiAlg.Priv... INFO doIt() has been called ToolSvc.ConstGe... INFO doIt() has been called ApplicationMgr INFO Application Manager Stopped successfully MyAlg INFO finalizing.... -MyGaudiAlg INFO finalizing.... EventLoopMgr INFO Histograms converted successfully according to request. ToolSvc INFO Removing all tools created by ToolSvc -MyGaudiAlg.Tool... INFO finalize() has been called -MyGaudiAlg.MyGa... INFO finalize() has been called -MyGaudiAlg.MyTool INFO finalize() has been called MyAlg.ToolWithName INFO finalize() has been called -MyAlg.MyGaudiTool INFO finalize() has been called MyAlg.MyTool INFO finalize() has been called -ToolSvc.MyGaudi... INFO finalize() has been called ToolSvc.MyTool INFO finalize() has been called ToolSvc.ToolB DEBUG Finalize -ToolSvc.ToolB DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolB DEBUG Tools to release : ToolSvc.ToolA -ToolSvc.ToolB DEBUG Releasing tool 'ToolSvc.ToolA' -ToolSvc.ToolB DEBUG De-Registering tool ToolSvc.ToolA -ToolSvc.ToolB DEBUG The tool 'ToolSvc.ToolA' of type 'TestTool' is released -ToolSvc.ToolB DEBUG Services to release : -ToolSvc.ToolA DEBUG Finalize -ToolSvc.ToolA DEBUG ==> Finalize the base class GaudiTool -ToolSvc.ToolA DEBUG Tools to release : ToolSvc.ToolB -ToolSvc.ToolA DEBUG Releasing tool 'ToolSvc.ToolB' -ToolSvc.ToolA DEBUG De-Registering tool ToolSvc.ToolB -ToolSvc.ToolA DEBUG The tool 'ToolSvc.ToolB' of type 'TestTool' is released -ToolSvc.ToolA DEBUG Services to release : -MyGaudiAlg.Lega... INFO finalize() has been called +MyAlg.LegacyToo... INFO finalize() has been called ToolSvc.Generic... INFO finalize() has been called ToolSvc.Another... INFO finalize() has been called ToolSvc.Another... INFO finalize() has been called -MyGaudiAlg.Wron... INFO finalize() has been called +MyAlg.WrongIfac... INFO finalize() has been called ToolSvc.PubTool... INFO finalize() has been called +ToolSvc.ToolA DEBUG Finalize ToolSvc.TestPub... INFO finalize() has been called -MyGaudiAlg.Priv... INFO finalize() has been called +MyAlg.PrivToolH... INFO finalize() has been called ToolSvc.ConstGe... INFO finalize() has been called -MyGaudiAlg.Tool... INFO destructor has been called -MyGaudiAlg.MyGa... INFO destructor has been called -MyGaudiAlg.MyTool INFO destructor has been called MyAlg.ToolWithName INFO destructor has been called -MyAlg.MyGaudiTool INFO destructor has been called MyAlg.MyTool INFO destructor has been called -ToolSvc.MyGaudi... INFO destructor has been called ToolSvc.MyTool INFO destructor has been called -MyGaudiAlg.Lega... INFO destructor has been called +MyAlg.LegacyToo... INFO destructor has been called ToolSvc.Generic... INFO destructor has been called ToolSvc.Another... INFO destructor has been called ToolSvc.Another... INFO destructor has been called -MyGaudiAlg.Wron... INFO destructor has been called +MyAlg.WrongIfac... INFO destructor has been called ToolSvc.PubTool... INFO destructor has been called ToolSvc.TestPub... INFO destructor has been called -MyGaudiAlg.Priv... INFO destructor has been called +MyAlg.PrivToolH... INFO destructor has been called ToolSvc.ConstGe... INFO destructor has been called ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/ControlFlow/AlgSequencer.ref b/GaudiExamples/tests/qmtest/refs/ControlFlow/AlgSequencer.ref new file mode 100644 index 0000000000000000000000000000000000000000..9fd06e9c4a746cf8f2f01e0d28667adb385b0569 --- /dev/null +++ b/GaudiExamples/tests/qmtest/refs/ControlFlow/AlgSequencer.ref @@ -0,0 +1,278 @@ +# setting LC_ALL to "C" +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/AlgSequencer.py' +# --- Configured Control Flow Expression: +# ((((ParentAlg('ParentAlg') >> StopperAlg('StopperAlg')) >> (seq(((Gaudi__Examples__Prescaler('Prescaler1') & HelloWorld('HelloWorld')) & Gaudi__Examples__EventCounter('Counter1'))) >> seq(((Gaudi__Examples__Prescaler('Prescaler2') & HelloWorld('HelloWorld')) & Gaudi__Examples__EventCounter('Counter2'))))) >> (HelloWorld('AND') & Gaudi__Examples__EventCounter('ANDCounter'))) >> (HelloWorld('OR') | Gaudi__Examples__EventCounter('ORCounter'))) +# --- +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/AlgSequencer.py' +# applying configuration of GaudiExamplesCommonConf +# /***** User GaudiExamplesCommonConf/GaudiExamplesCommonConf **************************************** +# |-OutputLevel = 3 +# |-DummyEvents = -1 +# \----- (End of User GaudiExamplesCommonConf/GaudiExamplesCommonConf) ------------------------------- +ApplicationMgr SUCCESS +==================================================================================================================================== + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 18:49:12 2023 +==================================================================================================================================== +ApplicationMgr INFO Application Manager Configured successfully +seq_10 INFO Member list: Gaudi::Sequencer/seq_8, Gaudi::Sequencer/seq_9 +seq_8 INFO Member list: Gaudi::Sequencer/seq_6, Gaudi::Sequencer/seq_7 +seq_6 INFO Member list: Gaudi::Sequencer/seq_0, Gaudi::Sequencer/seq_5 +seq_0 INFO Member list: ParentAlg, StopperAlg +ParentAlg INFO creating sub-algorithms.... +SubAlg1 INFO initializing.... +SubAlg2 INFO initializing.... +seq_5 INFO Member list: Gaudi::Sequencer/seq_2, Gaudi::Sequencer/seq_4 +seq_2 INFO Member list: Gaudi::Sequencer/seq_1, Gaudi::Examples::EventCounter/Counter1 +seq_1 INFO Member list: Gaudi::Examples::Prescaler/Prescaler1, HelloWorld +HelloWorld DEBUG Property update for OutputLevel : new value = 2 +HelloWorld INFO initializing.... +HelloWorld DEBUG input handles: 0 +HelloWorld DEBUG output handles: 0 +HelloWorld DEBUG Data Deps for HelloWorld +seq_4 INFO Member list: Gaudi::Sequencer/seq_3, Gaudi::Examples::EventCounter/Counter2 +seq_3 INFO Member list: Gaudi::Examples::Prescaler/Prescaler2, HelloWorld +seq_7 INFO Member list: HelloWorld/AND, Gaudi::Examples::EventCounter/ANDCounter +AND INFO initializing.... +seq_9 INFO Member list: HelloWorld/OR, Gaudi::Examples::EventCounter/ORCounter +OR INFO initializing.... +EventLoopMgr INFO Control Flow Expression: +EventLoopMgr INFO seq(seq(seq(seq(ParentAlg('ParentAlg') >> StopperAlg('StopperAlg')) >> seq(seq(seq(Gaudi::Examples::Prescaler('Prescaler1') & HelloWorld('HelloWorld')) & Gaudi::Examples::EventCounter('Counter1')) >> seq(seq(Gaudi::Examples::Prescaler('Prescaler2') & HelloWorld('HelloWorld')) & Gaudi::Examples::EventCounter('Counter2')))) >> seq(HelloWorld('AND') & Gaudi::Examples::EventCounter('ANDCounter'))) >> seq(HelloWorld('OR') | Gaudi::Examples::EventCounter('ORCounter'))) +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. +ApplicationMgr INFO Application Manager Initialized successfully +ApplicationMgr INFO Application Manager Started successfully +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +HelloWorld INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +HelloWorld INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +HelloWorld INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +HelloWorld INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +HelloWorld INFO executing.... +AND INFO executing.... +OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +AND INFO executing.... +OR INFO executing.... +ANDCounter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 10 | +Counter1 INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 5 | +Counter2 INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 1 | +Prescaler1 INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 5 |( 50.00000 +- 15.81139)% | +Prescaler2 INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 1 |( 10.00000 +- 9.486833)% | +ApplicationMgr INFO Application Manager Stopped successfully +ParentAlg INFO finalizing.... +SubAlg1 INFO finalizing.... +SubAlg2 INFO finalizing.... +HelloWorld INFO finalizing.... +AND INFO finalizing.... +OR INFO finalizing.... +EventLoopMgr INFO Histograms converted successfully according to request. +ToolSvc INFO Removing all tools created by ToolSvc +*****Chrono***** INFO **************************************************************************************************** +*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) +*****Chrono***** INFO **************************************************************************************************** +SubAlg1:Start INFO Time User : Tot= 0 [us] #= 1 +HelloWorld:Start INFO Time User : Tot= 0 [us] #= 1 +HelloWorld:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Start INFO Time User : Tot= 0 [us] #= 1 +OR:Start INFO Time User : Tot= 0 [us] #= 1 +OR:Stop INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Finalize INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Initi... INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Start INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Stop INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Stop INFO Time User : Tot= 0 [us] #= 1 +Prescaler1:Fina... INFO Time User : Tot= 0 [us] #= 1 +Prescaler1:Start INFO Time User : Tot= 0 [us] #= 1 +Prescaler1:Stop INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Start INFO Time User : Tot= 0 [us] #= 1 +Prescaler2:Fina... INFO Time User : Tot= 0 [us] #= 1 +Prescaler2:Init... INFO Time User : Tot= 0 [us] #= 1 +Prescaler2:Stop INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Fina... INFO Time User : Tot= 0 [us] #= 1 +Counter1:Start INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Init... INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Start INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Stop INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Fina... INFO Time User : Tot= 0 [us] #= 1 +AND:Stop INFO Time User : Tot= 0 [us] #= 1 +Counter1:Finalize INFO Time User : Tot= 0 [us] #= 1 +Counter1:Initia... INFO Time User : Tot= 0 [us] #= 1 +Counter1:Stop INFO Time User : Tot= 0 [us] #= 1 +Counter2:Execute INFO Time User : Tot= 0 [us] #= 1 +Counter2:Initia... INFO Time User : Tot= 0 [us] #= 1 +AND:Start INFO Time User : Tot= 0 [us] #= 1 +Counter2:Start INFO Time User : Tot= 0 [us] #= 1 +Counter2:Stop INFO Time User : Tot= 0 [us] #= 1 +Counter2:Finalize INFO Time User : Tot= 0 [us] #= 1 +Prescaler2:Start INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Init... INFO Time User : Tot= 0 [us] #= 1 +Prescaler1:Init... INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Start INFO Time User : Tot= 0 [us] #= 1 +HelloWorld:Fina... INFO Time User : Tot= 0 [us] #= 1 +OR:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_7:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_7:Start INFO Time User : Tot= 0 [us] #= 1 +AND:Finalize INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_9:Start INFO Time User : Tot= 0 [us] #= 1 +seq_1:Start INFO Time User : Tot= 0 [us] #= 1 +seq_9:Stop INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Start INFO Time User : Tot= 0 [us] #= 1 +seq_4:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_4:Start INFO Time User : Tot= 0 [us] #= 1 +seq_1:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_0:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_0:Start INFO Time User : Tot= 0 [us] #= 1 +seq_2:Start INFO Time User : Tot= 0 [us] #= 1 +seq_2:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Finalize INFO Time User : Tot= 0 [us] #= 1 +OR:Initialize INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Initialize INFO Time User : Tot= 0 [us] #= 1 +AND:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_7:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_9:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_5:Start INFO Time User : Tot= 0 [us] #= 1 +seq_4:Finalize INFO Time User : Tot= 0 [us] #= 1 +HelloWorld:Init... INFO Time User : Tot= 0 [us] #= 1 +seq_6:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_6:Start INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_8:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_8:Start INFO Time User : Tot= 0 [us] #= 1 +seq_10:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_10:Start INFO Time User : Tot= 0 [us] #= 1 +seq_0:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_1:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_6:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_7:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_8:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_9:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_10:Finalize INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Initi... INFO Time User : Tot= 0 [us] #= 1 +seq_1:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_4:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Initialize INFO Time User : Tot= 0 [us] #= 1 +Counter1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +HelloWorld:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +Prescaler2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +StopperAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +ANDCounter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +Prescaler1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +SubAlg2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +AND:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +OR:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +SubAlg1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_3:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_9:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_4:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_7:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +ParentAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_0:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_5:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_6:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_8:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_10:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_0:Initialize INFO Time User : Tot= 140 [ms] #= 1 +seq_6:Initialize INFO Time User : Tot= 140 [ms] #= 1 +seq_8:Initialize INFO Time User : Tot= 140 [ms] #= 1 +seq_10:Initialize INFO Time User : Tot= 140 [ms] #= 1 +ChronoStatSvc INFO Time User : Tot= 150 [ms] #= 1 +*****Chrono***** INFO **************************************************************************************************** +ChronoStatSvc.f... INFO Service finalized successfully +TIMER INFO ------------------------------------------------------------------- +TIMER INFO Algorithm | exec (ms) | count | total (s) +TIMER INFO ------------------------------------------------------------------- +TIMER INFO seq_10 | 0.08812 | 10 | 0.0008812 +TIMER INFO seq_8 | 0.07443 | 10 | 0.0007443 +TIMER INFO seq_6 | 0.05825 | 10 | 0.0005825 +TIMER INFO seq_0 | 0.02413 | 10 | 0.0002413 +TIMER INFO ParentAlg | 0.01714 | 10 | 0.0001714 +TIMER INFO SubAlg1 | 0.004275 | 10 | 4.275e-05 +TIMER INFO SubAlg2 | 0.003784 | 10 | 3.784e-05 +TIMER INFO StopperAlg | 0.001317 | 10 | 1.317e-05 +TIMER INFO seq_5 | 0.02875 | 10 | 0.0002875 +TIMER INFO seq_2 | 0.01441 | 10 | 0.0001441 +TIMER INFO seq_1 | 0.008704 | 10 | 8.704e-05 +TIMER INFO Prescaler1 | 0.001764 | 10 | 1.764e-05 +TIMER INFO HelloWorld | 0.004186 | 5 | 2.093e-05 +TIMER INFO Counter1 | 0.002424 | 5 | 1.212e-05 +TIMER INFO seq_4 | 0.00887 | 10 | 8.87e-05 +TIMER INFO seq_3 | 0.004965 | 10 | 4.965e-05 +TIMER INFO Prescaler2 | 0.001275 | 10 | 1.275e-05 +TIMER INFO Counter2 | 0.00148 | 1 | 1.48e-06 +TIMER INFO seq_7 | 0.01073 | 10 | 0.0001073 +TIMER INFO AND | 0.004045 | 10 | 4.045e-05 +TIMER INFO ANDCounter | 0.001221 | 10 | 1.221e-05 +TIMER INFO seq_9 | 0.007801 | 10 | 7.801e-05 +TIMER INFO OR | 0.003919 | 10 | 3.919e-05 +TIMER INFO ORCounter | 0 | 0 | 0 +TIMER INFO ------------------------------------------------------------------- +ApplicationMgr INFO Application Manager Finalized successfully +ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgDynamicGraph.ref b/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgDynamicGraph.ref index 2b92c00dc39d7a05b20c1d0694400fa0b85ef047..efdd78bad309be9e5585ac88a7ae6b710b45411c 100644 --- a/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgDynamicGraph.ref +++ b/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgDynamicGraph.ref @@ -1,9 +1,9 @@ # setting LC_ALL to "C" -# --> Including file '/bld2/leggett/work/BeginRun/gaudi_g/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py' # --- Configured Control Flow Expression: # (MySuperAlg('s1') >> MySuperAlg('s2')) # --- -# <-- End of file '/bld2/leggett/work/BeginRun/gaudi_g/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgDynamicGraph.py' # applying configuration of GaudiExamplesCommonConf # /***** User GaudiExamplesCommonConf/GaudiExamplesCommonConf **************************************** # |-OutputLevel = 3 @@ -11,204 +11,143 @@ # \----- (End of User GaudiExamplesCommonConf/GaudiExamplesCommonConf) ------------------------------- ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v30r0) - running on zeus on Mon Dec 18 15:35:35 2017 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 11:57:53 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -StatusCodeSvc INFO initialize RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -TIMER.TIMER INFO This machine has a speed about 2.22 times the speed of a 2.8 GHz Xeon. -ChronoStatSvc INFO Number of skipped events for MemStat-1 +TIMER.TIMER INFO This machine has a speed about 3.03 times the speed of a 2.8 GHz Xeon. seq_3 INFO Member list: GaudiSequencer/seq_1, GaudiSequencer/seq_2 -ToolSvc.Sequenc... INFO This machine has a speed about 2.22 times the speed of a 2.8 GHz Xeon. -seq_1 INFO Member list: GaudiSequencer/seq_0, EventCounter/s1_Counter -seq_0 INFO Member list: Prescaler/s1_Prescaler, HelloWorld/s1_HW -s1_Prescaler INFO s1_Prescaler:Prescaler::Initialize - pass: 'PercentPass':50.000000 +ToolSvc.Sequenc... INFO This machine has a speed about 3.23 times the speed of a 2.8 GHz Xeon. +seq_1 INFO Member list: GaudiSequencer/seq_0, Gaudi::Examples::EventCounter/s1_Counter +seq_0 INFO Member list: Gaudi::Examples::Prescaler/s1_Prescaler, HelloWorld/s1_HW s1_HW INFO initializing.... -s1_Counter INFO s1_Counter:EventCounter::initialize - Frequency: 'Frequency':1 -seq_2 INFO Member list: Prescaler/s2_Prescaler, EventCounter/s2_Counter +seq_2 INFO Member list: Gaudi::Examples::Prescaler/s2_Prescaler, Gaudi::Examples::EventCounter/s2_Counter s2_Prescaler DEBUG Property update for OutputLevel : new value = 2 -s2_Prescaler DEBUG Initialize base class GaudiCommon<Algorithm> -s2_Prescaler DEBUG could not locate CounterSummarySvc, no counter summary will be made -s2_Prescaler DEBUG List of ALL properties of Prescaler/s2_Prescaler #properties = 37 -s2_Prescaler DEBUG Property ['Name': Value] = 'PercentPass':75.000000 -s2_Prescaler DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'StatEntityList':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -s2_Prescaler DEBUG Property ['Name': Value] = 'UseEfficiencyRowFormat':True -s2_Prescaler DEBUG Property ['Name': Value] = 'EfficiencyRowFormat': |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- | -s2_Prescaler DEBUG Property ['Name': Value] = 'RegularRowFormat': | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| | -s2_Prescaler DEBUG Property ['Name': Value] = 'StatTableHeader': | Counter | # | sum | mean/eff^* | rms/err^* | min | max | -s2_Prescaler DEBUG Property ['Name': Value] = 'RootInTES': -s2_Prescaler DEBUG Property ['Name': Value] = 'Context': -s2_Prescaler DEBUG Property ['Name': Value] = 'TypePrint':True -s2_Prescaler DEBUG Property ['Name': Value] = 'PropertiesPrint':False -s2_Prescaler DEBUG Property ['Name': Value] = 'ErrorsPrint':True -s2_Prescaler DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -s2_Prescaler DEBUG Property ['Name': Value] = 'Blocking':False -s2_Prescaler DEBUG Property ['Name': Value] = 'NeededResources':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'Cardinality':1 -s2_Prescaler DEBUG Property ['Name': Value] = 'RegisterForContextService':True -s2_Prescaler DEBUG Property ['Name': Value] = 'MonitorService':MonitorSvc -s2_Prescaler DEBUG Property ['Name': Value] = 'Timeline':False -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditStop':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditStart':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditFinalize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditExecute':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditRestart':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditReinitialize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditInitialize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditAlgorithms':True -s2_Prescaler DEBUG Property ['Name': Value] = 'ErrorMax':1 -s2_Prescaler DEBUG Property ['Name': Value] = 'Enable':True -s2_Prescaler DEBUG Property ['Name': Value] = 'OutputLevel':2 -s2_Prescaler DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -s2_Prescaler DEBUG Property ['Name': Value] = 'ExtraInputs':[] -s2_Prescaler INFO s2_Prescaler:Prescaler::Initialize - pass: 'PercentPass':75.000000 s2_Prescaler DEBUG input handles: 0 s2_Prescaler DEBUG output handles: 0 s2_Prescaler DEBUG Data Deps for s2_Prescaler s2_Counter DEBUG Property update for OutputLevel : new value = 2 -s2_Counter INFO s2_Counter:EventCounter::initialize - Frequency: 'Frequency':1 s2_Counter DEBUG input handles: 0 s2_Counter DEBUG output handles: 0 s2_Counter DEBUG Data Deps for s2_Counter EventLoopMgr INFO Control Flow Expression: -EventLoopMgr INFO seq(seq(seq(Prescaler('s1_Prescaler') & HelloWorld('s1_HW')) & EventCounter('s1_Counter')) & seq(Prescaler('s2_Prescaler') & EventCounter('s2_Counter'))) +EventLoopMgr INFO seq(seq(seq(Gaudi::Examples::Prescaler('s1_Prescaler') & HelloWorld('s1_HW')) & Gaudi::Examples::EventCounter('s1_Counter')) & seq(Gaudi::Examples::Prescaler('s2_Prescaler') & Gaudi::Examples::EventCounter('s2_Counter'))) EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. -HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 1 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 1 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 2 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed +s2_Prescaler DEBUG filter failed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 2 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 3 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed +s2_Prescaler DEBUG filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 3 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 4 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 5 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed +s2_Prescaler DEBUG filter failed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 4 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 6 -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed +s2_Prescaler DEBUG filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 5 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 7 +s2_Prescaler DEBUG filter passed +s2_Prescaler DEBUG filter failed +s1_Counter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 5 | +s1_Prescaler INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 5 |( 50.00000 +- 15.81139)% | +s2_Counter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 7 | +s2_Prescaler INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 7 |( 70.00000 +- 14.49138)% | ApplicationMgr INFO Application Manager Stopped successfully -s1_Prescaler INFO s1_Prescaler:Prescaler::finalize - total events: 10, passed events: 5 s1_HW INFO finalizing.... -s1_Counter INFO s1_Counter:EventCounter::finalize - total events: 5 -s2_Prescaler INFO s2_Prescaler:Prescaler::finalize - total events: 10, passed events: 7 -s2_Prescaler DEBUG Finalize base class GaudiAlgorithm -s2_Prescaler DEBUG Tools to release : -s2_Prescaler DEBUG Services to release : -s2_Counter INFO s2_Counter:EventCounter::finalize - total events: 7 EventLoopMgr INFO Histograms converted successfully according to request. ToolSvc INFO Removing all tools created by ToolSvc ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO This machine has a speed about 2.22 times the speed of a 2.8 GHz Xeon. +ToolSvc.Sequenc... INFO This machine has a speed about 3.23 times the speed of a 2.8 GHz Xeon. ToolSvc.Sequenc... INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO seq_3 | 0.000 | 0.151 | 0.087 0.2 0.04 | 10 | 0.002 | -ToolSvc.Sequenc... INFO seq_1 | 0.000 | 0.085 | 0.047 0.1 0.03 | 10 | 0.001 | -ToolSvc.Sequenc... INFO seq_0 | 0.000 | 0.060 | 0.039 0.1 0.02 | 10 | 0.001 | -ToolSvc.Sequenc... INFO s1_Prescaler | 0.000 | 0.037 | 0.030 0.1 0.01 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s1_HW | 0.000 | 0.028 | 0.024 0.0 0.00 | 5 | 0.000 | -ToolSvc.Sequenc... INFO s1_Counter | 0.000 | 0.033 | 0.028 0.0 0.01 | 5 | 0.000 | -ToolSvc.Sequenc... INFO seq_2 | 0.000 | 0.062 | 0.037 0.1 0.01 | 10 | 0.001 | -ToolSvc.Sequenc... INFO s2_Prescaler | 0.000 | 0.032 | 0.028 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s2_Counter | 0.000 | 0.027 | 0.025 0.0 0.00 | 7 | 0.000 | +ToolSvc.Sequenc... INFO seq_3 | 0.000 | 0.039 | 0.029 0.1 0.01 | 10 | 0.000 | +ToolSvc.Sequenc... INFO seq_1 | 0.000 | 0.022 | 0.014 0.0 0.01 | 10 | 0.000 | +ToolSvc.Sequenc... INFO seq_0 | 0.000 | 0.014 | 0.008 0.0 0.01 | 10 | 0.000 | +ToolSvc.Sequenc... INFO s1_Prescaler | 0.000 | 0.004 | 0.004 0.0 0.00 | 10 | 0.000 | +ToolSvc.Sequenc... INFO s1_HW | 0.000 | 0.008 | 0.008 0.0 0.00 | 5 | 0.000 | +ToolSvc.Sequenc... INFO s1_Counter | 0.000 | 0.004 | 0.004 0.0 0.00 | 5 | 0.000 | +ToolSvc.Sequenc... INFO seq_2 | 0.000 | 0.016 | 0.013 0.0 0.00 | 10 | 0.000 | +ToolSvc.Sequenc... INFO s2_Prescaler | 0.000 | 0.008 | 0.008 0.0 0.00 | 10 | 0.000 | +ToolSvc.Sequenc... INFO s2_Counter | 0.000 | 0.003 | 0.003 0.0 0.00 | 7 | 0.000 | ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- -TIMER.TIMER INFO This machine has a speed about 2.22 times the speed of a 2.8 GHz Xeon. +TIMER.TIMER INFO This machine has a speed about 3.03 times the speed of a 2.8 GHz Xeon. TIMER.TIMER INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- -TIMER.TIMER INFO EVENT LOOP | 1.000 | 0.194 | 0.104 0.4 0.08 | 10 | 0.002 | -TIMER.TIMER INFO seq_3 | 0.000 | 0.154 | 0.089 0.2 0.04 | 10 | 0.002 | -TIMER.TIMER INFO seq_1 | 0.000 | 0.082 | 0.043 0.1 0.03 | 10 | 0.001 | -TIMER.TIMER INFO seq_0 | 0.000 | 0.056 | 0.036 0.1 0.02 | 10 | 0.001 | -TIMER.TIMER INFO s1_Prescaler | 0.000 | 0.031 | 0.025 0.1 0.01 | 10 | 0.000 | -TIMER.TIMER INFO s1_HW | 0.000 | 0.024 | 0.020 0.0 0.00 | 5 | 0.000 | -TIMER.TIMER INFO s1_Counter | 0.000 | 0.028 | 0.024 0.0 0.01 | 5 | 0.000 | -TIMER.TIMER INFO seq_2 | 0.000 | 0.056 | 0.033 0.1 0.01 | 10 | 0.001 | -TIMER.TIMER INFO s2_Prescaler | 0.000 | 0.026 | 0.023 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO s2_Counter | 0.000 | 0.023 | 0.021 0.0 0.00 | 7 | 0.000 | +TIMER.TIMER INFO EVENT LOOP | 0.000 | 0.061 | 0.038 0.2 0.04 | 10 | 0.001 | +TIMER.TIMER INFO seq_3 | 0.000 | 0.041 | 0.030 0.1 0.01 | 10 | 0.000 | +TIMER.TIMER INFO seq_1 | 0.000 | 0.019 | 0.011 0.0 0.01 | 10 | 0.000 | +TIMER.TIMER INFO seq_0 | 0.000 | 0.012 | 0.007 0.0 0.01 | 10 | 0.000 | +TIMER.TIMER INFO s1_Prescaler | 0.000 | 0.002 | 0.001 0.0 0.00 | 10 | 0.000 | +TIMER.TIMER INFO s1_HW | 0.000 | 0.006 | 0.005 0.0 0.00 | 5 | 0.000 | +TIMER.TIMER INFO s1_Counter | 0.000 | 0.002 | 0.001 0.0 0.00 | 5 | 0.000 | +TIMER.TIMER INFO seq_2 | 0.000 | 0.014 | 0.011 0.0 0.00 | 10 | 0.000 | +TIMER.TIMER INFO s2_Prescaler | 0.000 | 0.006 | 0.006 0.0 0.00 | 10 | 0.000 | +TIMER.TIMER INFO s2_Counter | 0.000 | 0.001 | 0.001 0.0 0.00 | 7 | 0.000 | TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -seq_3:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_0:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_0:Start INFO Time User : Tot= 0 [us] #= 1 -seq_1:Start INFO Time User : Tot= 0 [us] #= 1 -seq_1:Stop INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 -seq_2:Start INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Start INFO Time User : Tot= 0 [us] #= 1 -seq_2:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_3:Finalize INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Start INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Start INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 -seq_3:Start INFO Time User : Tot= 0 [us] #= 1 -seq_1:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_2:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_0:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 -seq_2:Initialize INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 -s1_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 -s2_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 -s2_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -s1_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_0:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_3:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_0:Initialize INFO Time User : Tot= 70 [ms] #= 1 -seq_1:Initialize INFO Time User : Tot= 70 [ms] #= 1 -seq_3:Initialize INFO Time User : Tot= 0.52 [s] #= 1 -ChronoStatSvc INFO Time User : Tot= 0.54 [s] #= 1 +s1_HW:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Start INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 +seq_2:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_2:Start INFO Time User : Tot= 0 [us] #= 1 +seq_0:Start INFO Time User : Tot= 0 [us] #= 1 +seq_0:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 +seq_1:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_1:Start INFO Time User : Tot= 0 [us] #= 1 +seq_2:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_3:Start INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_0:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_1:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_0:Initialize INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +s1_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +s2_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 +s1_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +s2_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_0:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_3:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_1:Initialize INFO Time User : Tot= 50 [ms] #= 1 +seq_3:Initialize INFO Time User : Tot= 360 [ms] #= 1 +ChronoStatSvc INFO Time User : Tot= 370 [ms] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully diff --git a/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgorithm.ref b/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgorithm.ref index e368128f892270f077115109a0809d195cdd16ef..876b4a897afedc56707de945fe849349d62698eb 100644 --- a/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgorithm.ref +++ b/GaudiExamples/tests/qmtest/refs/ControlFlow/SuperAlgorithm.ref @@ -1,9 +1,9 @@ # setting LC_ALL to "C" -# --> Including file '/workspace/GAUDI/GAUDI_future/GaudiExamples/options/ControlFlow/SuperAlgorithm.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgorithm.py' # --- Configured Control Flow Expression: -# ((((ParentAlg('ParentAlg') >> StopperAlg('StopperAlg')) >> (MySuperAlg(name='s1', item=((Prescaler('s1_Prescaler') & HelloWorld('s1_HW')) & EventCounter('s1_Counter')), OutputLevel=3) >> MySuperAlg(name='s2', item=((Prescaler('s2_Prescaler') & HelloWorld('s2_HW')) & EventCounter('s2_Counter')), OutputLevel=2, PercentPass=75))) >> (HelloWorld('AND') & EventCounter('ANDCounter'))) >> (HelloWorld('OR') | EventCounter('ORCounter'))) +# ((((ParentAlg('ParentAlg') >> StopperAlg('StopperAlg')) >> (Gaudi_Test_MySuperAlg('s1') >> Gaudi_Test_MySuperAlg('s2'))) >> (HelloWorld('AND') & Gaudi__Examples__EventCounter('ANDCounter'))) >> (HelloWorld('OR') | Gaudi__Examples__EventCounter('ORCounter'))) # --- -# <-- End of file '/workspace/GAUDI/GAUDI_future/GaudiExamples/options/ControlFlow/SuperAlgorithm.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/ControlFlow/SuperAlgorithm.py' # applying configuration of GaudiExamplesCommonConf # /***** User GaudiExamplesCommonConf/GaudiExamplesCommonConf **************************************** # |-OutputLevel = 3 @@ -11,70 +11,24 @@ # \----- (End of User GaudiExamplesCommonConf/GaudiExamplesCommonConf) ------------------------------- ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v4r1) - running on pcphlbc16 on Fri Jul 8 12:48:55 2016 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 19:08:21 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -StatusCodeSvc INFO initialize -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -TIMER.TIMER INFO This machine has a speed about 2.81 times the speed of a 2.8 GHz Xeon. -ChronoStatSvc INFO Number of skipped events for MemStat-1 -seq_10 INFO Member list: GaudiSequencer/seq_8, GaudiSequencer/seq_9 -ToolSvc.Sequenc... INFO This machine has a speed about 3.09 times the speed of a 2.8 GHz Xeon. -seq_8 INFO Member list: GaudiSequencer/seq_6, GaudiSequencer/seq_7 -seq_6 INFO Member list: GaudiSequencer/seq_0, GaudiSequencer/seq_5 +seq_10 INFO Member list: Gaudi::Sequencer/seq_8, Gaudi::Sequencer/seq_9 +seq_8 INFO Member list: Gaudi::Sequencer/seq_6, Gaudi::Sequencer/seq_7 +seq_6 INFO Member list: Gaudi::Sequencer/seq_0, Gaudi::Sequencer/seq_5 seq_0 INFO Member list: ParentAlg, StopperAlg ParentAlg INFO creating sub-algorithms.... SubAlg1 INFO initializing.... SubAlg2 INFO initializing.... -seq_5 INFO Member list: GaudiSequencer/seq_2, GaudiSequencer/seq_4 -seq_2 INFO Member list: GaudiSequencer/seq_1, EventCounter/s1_Counter -seq_1 INFO Member list: Prescaler/s1_Prescaler, HelloWorld/s1_HW -s1_Prescaler INFO s1_Prescaler:Prescaler::Initialize - pass: 'PercentPass':50.000000 +seq_5 INFO Member list: Gaudi::Sequencer/seq_2, Gaudi::Sequencer/seq_4 +seq_2 INFO Member list: Gaudi::Sequencer/seq_1, Gaudi::Examples::EventCounter/s1_Counter +seq_1 INFO Member list: Gaudi::Examples::Prescaler/s1_Prescaler, HelloWorld/s1_HW s1_HW INFO initializing.... -s1_Counter INFO s1_Counter:EventCounter::initialize - Frequency: 'Frequency':1 -seq_4 INFO Member list: GaudiSequencer/seq_3, EventCounter/s2_Counter -seq_3 INFO Member list: Prescaler/s2_Prescaler, HelloWorld/s2_HW +seq_4 INFO Member list: Gaudi::Sequencer/seq_3, Gaudi::Examples::EventCounter/s2_Counter +seq_3 INFO Member list: Gaudi::Examples::Prescaler/s2_Prescaler, HelloWorld/s2_HW s2_Prescaler DEBUG Property update for OutputLevel : new value = 2 -s2_Prescaler DEBUG Initialize base class GaudiCommon<Algorithm> -s2_Prescaler DEBUG could not locate CounterSummarySvc, no counter summary will be made -s2_Prescaler DEBUG List of ALL properties of Prescaler/s2_Prescaler #properties = 36 -s2_Prescaler DEBUG Property ['Name': Value] = 'PercentPass':75.000000 -s2_Prescaler DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'StatEntityList':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -s2_Prescaler DEBUG Property ['Name': Value] = 'UseEfficiencyRowFormat':True -s2_Prescaler DEBUG Property ['Name': Value] = 'EfficiencyRowFormat': |*%|-48.48s|%|50t||%|10d| |%|11.5g| |(%|#9.6g| +- %|-#9.6g|)%%| ------- | ------- | -s2_Prescaler DEBUG Property ['Name': Value] = 'RegularRowFormat': | %|-48.48s|%|50t||%|10d| |%|11.7g| |%|#11.5g| |%|#11.5g| |%|#12.5g| |%|#12.5g| | -s2_Prescaler DEBUG Property ['Name': Value] = 'StatTableHeader': | Counter | # | sum | mean/eff^* | rms/err^* | min | max | -s2_Prescaler DEBUG Property ['Name': Value] = 'RootInTES': -s2_Prescaler DEBUG Property ['Name': Value] = 'Context': -s2_Prescaler DEBUG Property ['Name': Value] = 'TypePrint':True -s2_Prescaler DEBUG Property ['Name': Value] = 'PropertiesPrint':False -s2_Prescaler DEBUG Property ['Name': Value] = 'ErrorsPrint':True -s2_Prescaler DEBUG Property ['Name': Value] = 'NeededResources':[ ] -s2_Prescaler DEBUG Property ['Name': Value] = 'Cardinality':1 -s2_Prescaler DEBUG Property ['Name': Value] = 'RegisterForContextService':True -s2_Prescaler DEBUG Property ['Name': Value] = 'MonitorService':MonitorSvc -s2_Prescaler DEBUG Property ['Name': Value] = 'Timeline':False -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditStop':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditStart':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditFinalize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditExecute':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditRestart':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditReinitialize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditInitialize':True -s2_Prescaler DEBUG Property ['Name': Value] = 'AuditAlgorithms':True -s2_Prescaler DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -s2_Prescaler DEBUG Property ['Name': Value] = 'ExtraInputs':[] -s2_Prescaler DEBUG Property ['Name': Value] = 'ErrorCounter':0 -s2_Prescaler DEBUG Property ['Name': Value] = 'ErrorMax':1 -s2_Prescaler DEBUG Property ['Name': Value] = 'Enable':True -s2_Prescaler DEBUG Property ['Name': Value] = 'OutputLevel':2 -s2_Prescaler INFO s2_Prescaler:Prescaler::Initialize - pass: 'PercentPass':75.000000 s2_Prescaler DEBUG input handles: 0 s2_Prescaler DEBUG output handles: 0 s2_Prescaler DEBUG Data Deps for s2_Prescaler @@ -84,332 +38,274 @@ s2_HW DEBUG input handles: 0 s2_HW DEBUG output handles: 0 s2_HW DEBUG Data Deps for s2_HW s2_Counter DEBUG Property update for OutputLevel : new value = 2 -s2_Counter INFO s2_Counter:EventCounter::initialize - Frequency: 'Frequency':1 s2_Counter DEBUG input handles: 0 s2_Counter DEBUG output handles: 0 s2_Counter DEBUG Data Deps for s2_Counter -seq_7 INFO Member list: HelloWorld/AND, EventCounter/ANDCounter +seq_7 INFO Member list: HelloWorld/AND, Gaudi::Examples::EventCounter/ANDCounter AND INFO initializing.... -ANDCounter INFO ANDCounter:EventCounter::initialize - Frequency: 'Frequency':1 -seq_9 INFO OR Member list: HelloWorld/OR, EventCounter/ORCounter +seq_9 INFO Member list: HelloWorld/OR, Gaudi::Examples::EventCounter/ORCounter OR INFO initializing.... -ORCounter INFO ORCounter:EventCounter::initialize - Frequency: 'Frequency':1 EventLoopMgr INFO Control Flow Expression: -EventLoopMgr INFO seq(seq(seq(seq(ParentAlg('ParentAlg') & StopperAlg('StopperAlg')) & seq(seq(seq(Prescaler('s1_Prescaler') & HelloWorld('s1_HW')) & EventCounter('s1_Counter')) & seq(seq(Prescaler('s2_Prescaler') & HelloWorld('s2_HW')) & EventCounter('s2_Counter')))) & seq(HelloWorld('AND') & EventCounter('ANDCounter'))) & seq(HelloWorld('OR') | EventCounter('ORCounter'))) +EventLoopMgr INFO seq(seq(seq(seq(ParentAlg('ParentAlg') >> StopperAlg('StopperAlg')) >> seq(seq(seq(Gaudi::Examples::Prescaler('s1_Prescaler') & HelloWorld('s1_HW')) & Gaudi::Examples::EventCounter('s1_Counter')) >> seq(seq(Gaudi::Examples::Prescaler('s2_Prescaler') & HelloWorld('s2_HW')) & Gaudi::Examples::EventCounter('s2_Counter')))) >> seq(HelloWorld('AND') & Gaudi::Examples::EventCounter('ANDCounter'))) >> seq(HelloWorld('OR') | Gaudi::Examples::EventCounter('ORCounter'))) EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. -HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed -AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 1 -OR INFO executing.... -ParentAlg INFO executing.... -SubAlg1 INFO executing.... -SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 1 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 1 AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 2 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 2 +s2_Prescaler DEBUG filter failed AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 3 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 2 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 3 AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 4 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed +s2_Prescaler DEBUG filter passed +s2_HW INFO executing.... AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 5 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 3 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 4 AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 6 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed -s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 5 +s2_Prescaler DEBUG filter failed AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 7 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 4 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 6 AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 8 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter failed -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter failed +s2_Prescaler DEBUG filter passed +s2_HW INFO executing.... AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 9 OR INFO executing.... ParentAlg INFO executing.... SubAlg1 INFO executing.... SubAlg2 INFO executing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::execute - filter passed s1_HW INFO executing.... -s1_Counter INFO s1_Counter:EventCounter::execute - seen events: 5 -s2_Prescaler INFO s2_Prescaler:Prescaler::execute - filter passed +s2_Prescaler DEBUG filter passed s2_HW INFO executing.... -s2_Counter INFO s2_Counter:EventCounter::execute - seen events: 7 AND INFO executing.... -ANDCounter INFO ANDCounter:EventCounter::execute - seen events: 10 OR INFO executing.... +ParentAlg INFO executing.... +SubAlg1 INFO executing.... +SubAlg2 INFO executing.... +s2_Prescaler DEBUG filter failed +AND INFO executing.... +OR INFO executing.... +ANDCounter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 10 | +s1_Counter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 5 | +s1_Prescaler INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 5 |( 50.00000 +- 15.81139)% | +s2_Counter INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "count" | 7 | +s2_Prescaler INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + |*"passed" | 10 | 7 |( 70.00000 +- 14.49138)% | ApplicationMgr INFO Application Manager Stopped successfully ParentAlg INFO finalizing.... SubAlg1 INFO finalizing.... SubAlg2 INFO finalizing.... -s1_Prescaler INFO s1_Prescaler:Prescaler::finalize - total events: 10, passed events: 5 s1_HW INFO finalizing.... -s1_Counter INFO s1_Counter:EventCounter::finalize - total events: 5 -s2_Prescaler INFO s2_Prescaler:Prescaler::finalize - total events: 10, passed events: 7 -s2_Prescaler DEBUG Finalize base class GaudiAlgorithm -s2_Prescaler DEBUG Tools to release : -s2_Prescaler DEBUG Services to release : s2_HW INFO finalizing.... -s2_Counter INFO s2_Counter:EventCounter::finalize - total events: 7 AND INFO finalizing.... -ANDCounter INFO ANDCounter:EventCounter::finalize - total events: 10 OR INFO finalizing.... -ORCounter INFO ORCounter:EventCounter::finalize - total events: 0 EventLoopMgr INFO Histograms converted successfully according to request. ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO This machine has a speed about 3.09 times the speed of a 2.8 GHz Xeon. -ToolSvc.Sequenc... INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO seq_10 | 0.000 | 0.231 | 0.172 0.3 0.03 | 10 | 0.002 | -ToolSvc.Sequenc... INFO seq_8 | 0.000 | 0.209 | 0.151 0.2 0.03 | 10 | 0.002 | -ToolSvc.Sequenc... INFO seq_6 | 0.000 | 0.159 | 0.106 0.2 0.03 | 10 | 0.002 | -ToolSvc.Sequenc... INFO seq_0 | 0.000 | 0.043 | 0.038 0.1 0.01 | 10 | 0.000 | -ToolSvc.Sequenc... INFO ParentAlg | 0.000 | 0.031 | 0.027 0.1 0.01 | 10 | 0.000 | -ToolSvc.Sequenc... INFO StopperAlg | 0.000 | 0.006 | 0.005 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO seq_5 | 0.000 | 0.110 | 0.062 0.2 0.04 | 10 | 0.001 | -ToolSvc.Sequenc... INFO seq_2 | 0.000 | 0.046 | 0.027 0.1 0.02 | 10 | 0.000 | -ToolSvc.Sequenc... INFO seq_1 | 0.000 | 0.030 | 0.020 0.0 0.01 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s1_Prescaler | 0.000 | 0.014 | 0.013 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s1_HW | 0.000 | 0.018 | 0.017 0.0 0.00 | 5 | 0.000 | -ToolSvc.Sequenc... INFO s1_Counter | 0.000 | 0.016 | 0.015 0.0 0.00 | 5 | 0.000 | -ToolSvc.Sequenc... INFO seq_4 | 0.000 | 0.057 | 0.029 0.1 0.02 | 10 | 0.001 | -ToolSvc.Sequenc... INFO seq_3 | 0.000 | 0.035 | 0.020 0.0 0.01 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s2_Prescaler | 0.000 | 0.014 | 0.014 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO s2_HW | 0.000 | 0.018 | 0.017 0.0 0.00 | 7 | 0.000 | -ToolSvc.Sequenc... INFO s2_Counter | 0.000 | 0.016 | 0.015 0.0 0.00 | 7 | 0.000 | -ToolSvc.Sequenc... INFO seq_7 | 0.000 | 0.044 | 0.039 0.1 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO AND | 0.000 | 0.014 | 0.013 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO ANDCounter | 0.000 | 0.019 | 0.018 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO seq_9 | 0.000 | 0.020 | 0.016 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO OR | 0.000 | 0.013 | 0.010 0.0 0.00 | 10 | 0.000 | -ToolSvc.Sequenc... INFO ORCounter | 0.000 | 0.000 | 0.000 0.0 0.00 | 0 | 0.000 | -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- -TIMER.TIMER INFO This machine has a speed about 2.81 times the speed of a 2.8 GHz Xeon. -TIMER.TIMER INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | -TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- -TIMER.TIMER INFO EVENT LOOP | 0.400 | 0.262 | 0.187 0.4 0.05 | 10 | 0.003 | -TIMER.TIMER INFO seq_10 | 0.000 | 0.234 | 0.174 0.3 0.03 | 10 | 0.002 | -TIMER.TIMER INFO seq_8 | 0.000 | 0.206 | 0.147 0.2 0.03 | 10 | 0.002 | -TIMER.TIMER INFO seq_6 | 0.000 | 0.156 | 0.103 0.2 0.03 | 10 | 0.002 | -TIMER.TIMER INFO seq_0 | 0.000 | 0.040 | 0.036 0.1 0.01 | 10 | 0.000 | -TIMER.TIMER INFO ParentAlg | 0.000 | 0.025 | 0.022 0.0 0.01 | 10 | 0.000 | -TIMER.TIMER INFO SubAlg1 | 0.000 | 0.000 | 0.000 0.0 0.00 | 0 | 0.000 | -TIMER.TIMER INFO SubAlg2 | 0.000 | 0.000 | 0.000 0.0 0.00 | 0 | 0.000 | -TIMER.TIMER INFO StopperAlg | 0.000 | 0.003 | 0.003 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO seq_5 | 0.000 | 0.106 | 0.059 0.1 0.03 | 10 | 0.001 | -TIMER.TIMER INFO seq_2 | 0.000 | 0.042 | 0.023 0.1 0.02 | 10 | 0.000 | -TIMER.TIMER INFO seq_1 | 0.000 | 0.027 | 0.017 0.0 0.01 | 10 | 0.000 | -TIMER.TIMER INFO s1_Prescaler | 0.000 | 0.010 | 0.010 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO s1_HW | 0.000 | 0.013 | 0.013 0.0 0.00 | 5 | 0.000 | -TIMER.TIMER INFO s1_Counter | 0.000 | 0.013 | 0.012 0.0 0.00 | 5 | 0.000 | -TIMER.TIMER INFO seq_4 | 0.000 | 0.052 | 0.025 0.1 0.02 | 10 | 0.001 | -TIMER.TIMER INFO seq_3 | 0.000 | 0.031 | 0.017 0.0 0.01 | 10 | 0.000 | -TIMER.TIMER INFO s2_Prescaler | 0.000 | 0.011 | 0.010 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO s2_HW | 0.000 | 0.014 | 0.013 0.0 0.00 | 7 | 0.000 | -TIMER.TIMER INFO s2_Counter | 0.000 | 0.012 | 0.011 0.0 0.00 | 7 | 0.000 | -TIMER.TIMER INFO seq_7 | 0.000 | 0.039 | 0.034 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO AND | 0.000 | 0.011 | 0.010 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO ANDCounter | 0.000 | 0.014 | 0.013 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO seq_9 | 0.000 | 0.016 | 0.012 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO OR | 0.000 | 0.010 | 0.008 0.0 0.00 | 10 | 0.000 | -TIMER.TIMER INFO ORCounter | 0.000 | 0.000 | 0.000 0.0 0.00 | 0 | 0.000 | -TIMER.TIMER INFO -------------------------------------------------------------------------------------------------- *****Chrono***** INFO **************************************************************************************************** *****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) *****Chrono***** INFO **************************************************************************************************** -s2_HW:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 -ORCounter:Start INFO Time User : Tot= 0 [us] #= 1 -seq_0:Start INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_9:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_3:Start INFO Time User : Tot= 0 [us] #= 1 -seq_3:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Start INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Start INFO Time User : Tot= 0 [us] #= 1 -SubAlg1:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_4:Stop INFO Time User : Tot= 0 [us] #= 1 -SubAlg2:Stop INFO Time User : Tot= 0 [us] #= 1 -SubAlg2:Start INFO Time User : Tot= 0 [us] #= 1 -seq_5:Start INFO Time User : Tot= 0 [us] #= 1 -s2_HW:Start INFO Time User : Tot= 0 [us] #= 1 -seq_10:Stop INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 -seq_1:Start INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_1:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_2:Start INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Start INFO Time User : Tot= 0 [us] #= 1 -seq_2:Stop INFO Time User : Tot= 0 [us] #= 1 -OR:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_6:Stop INFO Time User : Tot= 0 [us] #= 1 -AND:Start INFO Time User : Tot= 0 [us] #= 1 -ORCounter:Stop INFO Time User : Tot= 0 [us] #= 1 -AND:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_5:Stop INFO Time User : Tot= 0 [us] #= 1 -OR:Start INFO Time User : Tot= 0 [us] #= 1 -seq_8:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_7:Start INFO Time User : Tot= 0 [us] #= 1 -seq_8:Start INFO Time User : Tot= 0 [us] #= 1 -seq_7:Stop INFO Time User : Tot= 0 [us] #= 1 -ANDCounter:Start INFO Time User : Tot= 0 [us] #= 1 -seq_6:Finalize INFO Time User : Tot= 0 [us] #= 1 -SubAlg1:Start INFO Time User : Tot= 0 [us] #= 1 -StopperAlg:Stop INFO Time User : Tot= 0 [us] #= 1 -StopperAlg:Start INFO Time User : Tot= 0 [us] #= 1 -StopperAlg:Init... INFO Time User : Tot= 0 [us] #= 1 -StopperAlg:Fina... INFO Time User : Tot= 0 [us] #= 1 -seq_9:Start INFO Time User : Tot= 0 [us] #= 1 -ParentAlg:Stop INFO Time User : Tot= 0 [us] #= 1 -ParentAlg:Start INFO Time User : Tot= 0 [us] #= 1 -seq_6:Start INFO Time User : Tot= 0 [us] #= 1 -seq_10:Start INFO Time User : Tot= 0 [us] #= 1 -seq_9:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_10:Finalize INFO Time User : Tot= 0 [us] #= 1 -ANDCounter:Stop INFO Time User : Tot= 0 [us] #= 1 -seq_5:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_4:Start INFO Time User : Tot= 0 [us] #= 1 -seq_4:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_8:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_3:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_7:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_2:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_0:Stop INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 -seq_1:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 -SubAlg2:Finalize INFO Time User : Tot= 0 [us] #= 1 -ParentAlg:Finalize INFO Time User : Tot= 0 [us] #= 1 -ANDCounter:Fina... INFO Time User : Tot= 0 [us] #= 1 -SubAlg2:Initialize INFO Time User : Tot= 0 [us] #= 1 -ORCounter:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 -OR:Finalize INFO Time User : Tot= 0 [us] #= 1 -AND:Finalize INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 -SubAlg1:Initialize INFO Time User : Tot= 0 [us] #= 1 -SubAlg1:Finalize INFO Time User : Tot= 0 [us] #= 1 -s2_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 -ANDCounter:Init... INFO Time User : Tot= 0 [us] #= 1 -ORCounter:Initi... INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 -AND:Initialize INFO Time User : Tot= 0 [us] #= 1 -OR:Initialize INFO Time User : Tot= 0 [us] #= 1 -s2_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 -s2_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 -seq_0:Finalize INFO Time User : Tot= 0 [us] #= 1 -s1_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 -s1_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 -ParentAlg:Initi... INFO Time User : Tot= 0 [us] #= 1 -seq_7:Initialize INFO Time User : Tot= 0 [us] #= 1 -seq_9:Initialize INFO Time User : Tot= 0 [us] #= 1 -seq_1:Initialize INFO Time User : Tot= 0 [us] #= 1 -seq_2:Initialize INFO Time User : Tot= 0 [us] #= 1 -s1_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 -s1_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 -s2_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 -s2_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 -StopperAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -OR:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -s2_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -AND:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -s1_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -ANDCounter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_9:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -ParentAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_3:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_7:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_0:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_4:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_5:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_6:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_8:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -seq_10:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 -s2_Prescaler:In... INFO Time User : Tot= 4 [ms] #= 1 -seq_3:Initialize INFO Time User : Tot= 4 [ms] #= 1 -seq_4:Initialize INFO Time User : Tot= 4 [ms] #= 1 -seq_5:Initialize INFO Time User : Tot= 4 [ms] #= 1 -seq_0:Initialize INFO Time User : Tot= 40 [ms] #= 1 -seq_6:Initialize INFO Time User : Tot= 44 [ms] #= 1 -seq_8:Initialize INFO Time User : Tot= 44 [ms] #= 1 -seq_10:Initialize INFO Time User : Tot= 372 [ms] #= 1 -ChronoStatSvc INFO Time User : Tot= 384 [ms] #= 1 +StopperAlg:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_HW:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 +s2_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 +s2_HW:Stop INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Fina... INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Init... INFO Time User : Tot= 0 [us] #= 1 +StopperAlg:Start INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Start INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Start INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Init... INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Start INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Start INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Start INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Fi... INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Start INFO Time User : Tot= 0 [us] #= 1 +AND:Start INFO Time User : Tot= 0 [us] #= 1 +AND:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Stop INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Fina... INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Init... INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Start INFO Time User : Tot= 0 [us] #= 1 +ANDCounter:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:Stop INFO Time User : Tot= 0 [us] #= 1 +s2_Counter:Fina... INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Stop INFO Time User : Tot= 0 [us] #= 1 +OR:Start INFO Time User : Tot= 0 [us] #= 1 +OR:Stop INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Finalize INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Initi... INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Start INFO Time User : Tot= 0 [us] #= 1 +ORCounter:Stop INFO Time User : Tot= 0 [us] #= 1 +s1_Prescaler:In... INFO Time User : Tot= 0 [us] #= 1 +OR:Finalize INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Finalize INFO Time User : Tot= 0 [us] #= 1 +s2_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Finalize INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_9:Start INFO Time User : Tot= 0 [us] #= 1 +AND:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_1:Start INFO Time User : Tot= 0 [us] #= 1 +seq_1:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_3:Start INFO Time User : Tot= 0 [us] #= 1 +seq_3:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_7:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_9:Stop INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Stop INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Start INFO Time User : Tot= 0 [us] #= 1 +seq_7:Start INFO Time User : Tot= 0 [us] #= 1 +SubAlg2:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Start INFO Time User : Tot= 0 [us] #= 1 +seq_4:Start INFO Time User : Tot= 0 [us] #= 1 +seq_0:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_2:Stop INFO Time User : Tot= 0 [us] #= 1 +SubAlg1:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_4:Stop INFO Time User : Tot= 0 [us] #= 1 +OR:Initialize INFO Time User : Tot= 0 [us] #= 1 +AND:Initialize INFO Time User : Tot= 0 [us] #= 1 +s2_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_0:Start INFO Time User : Tot= 0 [us] #= 1 +seq_7:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_9:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Start INFO Time User : Tot= 0 [us] #= 1 +seq_5:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_4:Finalize INFO Time User : Tot= 0 [us] #= 1 +s1_HW:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_6:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_6:Start INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_8:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_8:Start INFO Time User : Tot= 0 [us] #= 1 +seq_10:Start INFO Time User : Tot= 0 [us] #= 1 +seq_10:Stop INFO Time User : Tot= 0 [us] #= 1 +seq_0:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_1:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_6:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_7:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_9:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_8:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_10:Finalize INFO Time User : Tot= 0 [us] #= 1 +seq_3:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_1:Initialize INFO Time User : Tot= 0 [us] #= 1 +ParentAlg:Initi... INFO Time User : Tot= 0 [us] #= 1 +seq_4:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_2:Initialize INFO Time User : Tot= 0 [us] #= 1 +seq_5:Initialize INFO Time User : Tot= 0 [us] #= 1 +s1_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +s1_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 5 +s2_Counter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 +s2_HW:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 7 +ANDCounter:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +StopperAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +s1_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +SubAlg2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +SubAlg1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +AND:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +OR:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +s2_Prescaler:Ex... INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_9:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_1:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_7:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_3:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_2:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +ParentAlg:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_4:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_0:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_5:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_6:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_8:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_10:Execute INFO Time User : Tot= 0 [us] Ave/Min/Max= 0(+- 0)/ 0/ 0 [us] #= 10 +seq_0:Initialize INFO Time User : Tot= 90 [ms] #= 1 +seq_6:Initialize INFO Time User : Tot= 90 [ms] #= 1 +seq_8:Initialize INFO Time User : Tot= 100 [ms] #= 1 +seq_10:Initialize INFO Time User : Tot= 100 [ms] #= 1 +ChronoStatSvc INFO Time User : Tot= 110 [ms] #= 1 *****Chrono***** INFO **************************************************************************************************** ChronoStatSvc.f... INFO Service finalized successfully +TIMER INFO ------------------------------------------------------------------- +TIMER INFO Algorithm | exec (ms) | count | total (s) +TIMER INFO ------------------------------------------------------------------- +TIMER INFO seq_10 | 0.09244 | 10 | 0.0009244 +TIMER INFO seq_8 | 0.07947 | 10 | 0.0007947 +TIMER INFO seq_6 | 0.06407 | 10 | 0.0006407 +TIMER INFO seq_0 | 0.02248 | 10 | 0.0002248 +TIMER INFO ParentAlg | 0.01602 | 10 | 0.0001602 +TIMER INFO SubAlg1 | 0.003833 | 10 | 3.833e-05 +TIMER INFO SubAlg2 | 0.003921 | 10 | 3.921e-05 +TIMER INFO StopperAlg | 0.00113 | 10 | 1.13e-05 +TIMER INFO seq_5 | 0.03661 | 10 | 0.0003661 +TIMER INFO seq_2 | 0.01368 | 10 | 0.0001368 +TIMER INFO seq_1 | 0.008275 | 10 | 8.275e-05 +TIMER INFO s1_Prescaler | 0.001708 | 10 | 1.708e-05 +TIMER INFO s1_HW | 0.00445 | 5 | 2.225e-05 +TIMER INFO s1_Counter | 0.002424 | 5 | 1.212e-05 +TIMER INFO seq_4 | 0.01782 | 10 | 0.0001782 +TIMER INFO seq_3 | 0.01242 | 10 | 0.0001242 +TIMER INFO s2_Prescaler | 0.004882 | 10 | 4.882e-05 +TIMER INFO s2_HW | 0.003726 | 7 | 2.608e-05 +TIMER INFO s2_Counter | 0.001179 | 7 | 8.25e-06 +TIMER INFO seq_7 | 0.01041 | 10 | 0.0001041 +TIMER INFO AND | 0.004075 | 10 | 4.075e-05 +TIMER INFO ANDCounter | 0.001142 | 10 | 1.142e-05 +TIMER INFO seq_9 | 0.007486 | 10 | 7.486e-05 +TIMER INFO OR | 0.004064 | 10 | 4.064e-05 +TIMER INFO ORCounter | 0 | 0 | 0 +TIMER INFO ------------------------------------------------------------------- ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Histograms_opts.ref b/GaudiExamples/tests/qmtest/refs/Histograms_opts.ref index a425d3c0edd560fe6c70c3783fb2f937f8df0640..9c994f78d99258d9227bd8327461f800d456a073 100644 --- a/GaudiExamples/tests/qmtest/refs/Histograms_opts.ref +++ b/GaudiExamples/tests/qmtest/refs/Histograms_opts.ref @@ -1,264 +1,43 @@ -JobOptionsSvc INFO # =======> /builds/gaudi/Gaudi/GaudiExamples/options/Histograms.opts +JobOptionsSvc INFO # =======> /home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms.opts JobOptionsSvc INFO # (5,1): AuditorSvc.Auditors = ["ChronoAuditor"] JobOptionsSvc INFO # (9,1): MessageSvc.OutputLevel = 3 -JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["GaudiHistoAlgorithm/SimpleHistos"] -JobOptionsSvc INFO # (22,1): ApplicationMgr.TopAlg += ["Gaudi::Examples::HistoProps/Histos2"] -JobOptionsSvc INFO # (23,1): SimpleHistos.HistoPrint = 1 -JobOptionsSvc INFO # (24,1): SimpleHistos.OutputLevel = 2 -JobOptionsSvc INFO # (27,1): Histos2.Histo2 = ["Title", -5, 5, 200] -JobOptionsSvc INFO # (28,1): Histos2.Histo2 = ["Title", -5, 5] -JobOptionsSvc INFO # (29,1): Histos2.Histo2 = [-5, 5] -JobOptionsSvc INFO # (30,1): Histos2.Histo2 = [-5, 5, "Title"] -JobOptionsSvc INFO # (31,1): Histos2.Histo2 = [-5, 5, "Title", 200] -JobOptionsSvc INFO # (32,1): Histos2.Histo2 = [-5, 5, 200, "Title"] -JobOptionsSvc INFO # (33,1): Histos2.Histo2 = [-5, 5, 200] -JobOptionsSvc INFO # (39,1): ApplicationMgr.EvtMax = 50000 -JobOptionsSvc INFO # (40,1): ApplicationMgr.EvtSel = "NONE" -JobOptionsSvc INFO # (47,1): ApplicationMgr.HistogramPersistency = "ROOT" -JobOptionsSvc INFO # (48,1): ApplicationMgr.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] -JobOptionsSvc INFO # (49,1): RootHistSvc.OutputFile = "histo-opts.root" -JobOptionsSvc INFO # (60,1): HistogramDataSvc.Predefined1DHistos = {"/stat/Histos2/2":["TEST2", -100, 200]} -JobOptionsSvc INFO # (64,1): HistogramDataSvc.OutputLevel = 2 -JobOptionsSvc INFO Job options successfully read in from /builds/gaudi/Gaudi/GaudiExamples/options/Histograms.opts +JobOptionsSvc INFO # (20,1): ApplicationMgr.TopAlg += ["Gaudi::Examples::HistoProps/Histos2"] +JobOptionsSvc INFO # (22,1): Histos2.Histo2 = ["Title", -5, 5, 200] +JobOptionsSvc INFO # (23,1): Histos2.Histo2 = ["Title", -5, 5] +JobOptionsSvc INFO # (24,1): Histos2.Histo2 = [-5, 5] +JobOptionsSvc INFO # (25,1): Histos2.Histo2 = [-5, 5, "Title"] +JobOptionsSvc INFO # (26,1): Histos2.Histo2 = [-5, 5, "Title", 200] +JobOptionsSvc INFO # (27,1): Histos2.Histo2 = [-5, 5, 200, "Title"] +JobOptionsSvc INFO # (28,1): Histos2.Histo2 = [-5, 5, 200] +JobOptionsSvc INFO # (34,1): ApplicationMgr.EvtMax = 50000 +JobOptionsSvc INFO # (35,1): ApplicationMgr.EvtSel = "NONE" +JobOptionsSvc INFO # (40,1): ApplicationMgr.HistogramPersistency = "ROOT" +JobOptionsSvc INFO # (41,1): ApplicationMgr.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"] +JobOptionsSvc INFO # (42,1): RootHistSvc.OutputFile = "histo-opts.root" +JobOptionsSvc INFO # (52,1): HistogramDataSvc.OutputLevel = 2 +JobOptionsSvc INFO Job options successfully read in from /home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms.opts ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:17:00 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:12:37 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' -SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False -SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 HistogramDataSvc DEBUG Service base class initialized successfully RootHistSvc INFO Writing ROOT histograms to: histo-opts.root HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Predefined 1D-Histograms: -HistogramDataSvc INFO Path='Histos2/2' Description ('TEST2',-100,200,100) -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -SimpleHistos DEBUG input handles: 0 -SimpleHistos DEBUG output handles: 0 -SimpleHistos DEBUG Data Deps for SimpleHistos -Histos2 SUCCESS List of ALL properties of Gaudi::Examples::HistoProps/Histos2 #properties = 45 -Histos2 SUCCESS Property ['Name': Value] = 'Histo2':('',-5.00000,5.00000,200) -Histos2 SUCCESS Property ['Name': Value] = 'Histo1':('Histogram1',-3.00000,3.00000,200) -Histos2 SUCCESS Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -Histos2 SUCCESS Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -Histos2 SUCCESS Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Histos2 SUCCESS Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -Histos2 SUCCESS Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Histos2 SUCCESS Property ['Name': Value] = 'MonitorHistograms':True -Histos2 SUCCESS Property ['Name': Value] = 'FullDetail':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoDir':'Histos2' -Histos2 SUCCESS Property ['Name': Value] = 'HistoTopDir':'' -Histos2 SUCCESS Property ['Name': Value] = 'HistoOffSet':0 -Histos2 SUCCESS Property ['Name': Value] = 'HistoSplitDir':False -Histos2 SUCCESS Property ['Name': Value] = 'HistoCheckForNaN':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoCountersPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'HistoProduce':True -Histos2 SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Histos2 SUCCESS Property ['Name': Value] = 'Context':'' -Histos2 SUCCESS Property ['Name': Value] = 'TypePrint':True -Histos2 SUCCESS Property ['Name': Value] = 'PropertiesPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'ErrorsPrint':True -Histos2 SUCCESS Property ['Name': Value] = 'RootInTES':'' -Histos2 SUCCESS Property ['Name': Value] = 'FilterCircularDependencies':True -Histos2 SUCCESS Property ['Name': Value] = 'Blocking':False -Histos2 SUCCESS Property ['Name': Value] = 'NeededResources':[ ] -Histos2 SUCCESS Property ['Name': Value] = 'Cardinality':1 -Histos2 SUCCESS Property ['Name': Value] = 'RegisterForContextService':True -Histos2 SUCCESS Property ['Name': Value] = 'MonitorService':'MonitorSvc' -Histos2 SUCCESS Property ['Name': Value] = 'Timeline':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditStop':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditStart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditFinalize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditExecute':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditRestart':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditReinitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditInitialize':False -Histos2 SUCCESS Property ['Name': Value] = 'AuditAlgorithms':False -Histos2 SUCCESS Property ['Name': Value] = 'ErrorMax':1 -Histos2 SUCCESS Property ['Name': Value] = 'Enable':True -Histos2 SUCCESS Property ['Name': Value] = 'OutputLevel':3 -Histos2 SUCCESS Property ['Name': Value] = 'ExtraOutputs':[] -Histos2 SUCCESS Property ['Name': Value] = 'ExtraInputs':[] -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! -Histos2 WARNING Gaudi::Examples::HistoProps:: Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID -HistogramDataSvc DEBUG Redefine the parameters for the histogram 'Histos2/2' to be ('TEST2',-100,200,100) ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.96914 | 0.90535 | 1.4869 | 2.2322 | - | 102 | "Breit" | 50000 | 0.0068835 | 1.1951 | -0.01431 | 3.6439 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | AutoID time test | "AutoID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | poisson | "Poisson" | 50000 | 1.8073 | 1.1765 | 0.32643 | -0.75799 | - | subdir1/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | subdir2/bino | "Binominal" | 50000 | 1.9061 | 1.1128 | 0.25726 | -0.66968 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.009832 | 1.0001 | 0.0095032 | -0.0095692 | - | varBinning/x | "1D Variable Binning" | 50000 | -0.028452 | 2.8834 | 0.015929 | -1.3136 | -SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 - ID=Exponential V Flat "Exponential V Flat" Ents/All=49848/50000<X>/sX=-0.025596/2.8825,<Y>/sY=0.97604/0.91269 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 - ID=binVpois "Binom V poisson" Ents/All=49920/50000<X>/sX=1.8072/1.1764,<Y>/sY=1.9048/1.1125 - ID=expoVpois "Expo V poisson" Ents/All=49978/50000<X>/sX=1.807/1.176,<Y>/sY=0.96904/0.9045 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.0096715/1.0012,<Y>/sY=0.97036/0.90558,<Z>/sZ=0.0071234/1.1942 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.025596/2.8825,<Y>/sY=-0.0086423/1.0004,<Z>/sZ=0.97604/0.91269 -SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.009832 | 1.0001 | 1.0944 | 57.826 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.009832 | 1.0001 | 1.0944 | 57.826 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.013795 | 5.7724 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.013795 | 5.7724 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24807 | 0.026854 | 5.7561 | -0.0078314 | -1.2358 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24807 | 0.026854 | 5.7561 | -0.0078314 | -1.2358 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25193 | -0.053822 | 5.7881 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25193 | -0.053822 | 5.7881 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.028452 | 2.8834 | 0 | -3 | -SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.0098803/0.9999,<Y>/sY=0.96914/0.90535 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.028452/2.8834,<Y>/sY=-0.0081283/1.0011 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : -Histos2 SUCCESS Booked 2 Histogram(s) : 1D=2 -Histos2 SUCCESS 1D histograms in directory "Histos2" : 2 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 2 | "TEST2" | 50000 | -0.0023399 | 1.0037 | 0.0098579 | -0.038565 | - | Histogram1 | "Histogram1" | 50000 | -0.0011467 | 0.98662 | 0.0022561 | -0.15642 | -Histos2 SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 0/0/1/0 -Histos2 SUCCESS #WARNINGS = 1 Message = 'Cannot generate automatic literal ID from an empty title ! Using numeric ID instead for histogram ID' +Histos2 SUCCESS Histograms report + | name | title | entries | + | Histo1 | Histogram1 | 50000 | + | Histo2 | | 50000 | EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DAutoID INFO Time User : Tot= 20 [ms] Ave/Min/Max= 0.0004(+- 0.0632)/ 0/ 10 [ms] #=49999 -1DOldStyle INFO Time User : Tot= 60 [ms] Ave/Min/Max= 0.0012(+- 0.11)/ 0/ 10 [ms] #=49999 -1DForcedNumericID INFO Time User : Tot= 100 [ms] Ave/Min/Max= 0.002(+- 0.141)/ 0/ 10 [ms] #=49999 -1DForcedAlphaID INFO Time User : Tot= 50 [ms] Ave/Min/Max= 0.001(+- 0.1)/ 0/ 10 [ms] #=49999 -ChronoStatSvc INFO Time User : Tot= 1.18 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -HistogramDataSvc DEBUG Substituted histograms #1 : ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/Histograms_py.ref b/GaudiExamples/tests/qmtest/refs/Histograms_py.ref index af1541cd5e2bdc4718f2f5654baf03d2d847b980..4413f95c087ce1a1bd0c324eba0cd3f21282d5e4 100644 --- a/GaudiExamples/tests/qmtest/refs/Histograms_py.ref +++ b/GaudiExamples/tests/qmtest/refs/Histograms_py.ref @@ -1,194 +1,32 @@ # setting LC_ALL to "C" -# --> Including file '/builds/gaudi/Gaudi/GaudiExamples/options/Histograms.py' -# <-- End of file '/builds/gaudi/Gaudi/GaudiExamples/options/Histograms.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms.py' ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:16:56 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:11:54 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' -SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False -SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] -RootHistSvc INFO Writing ROOT histograms to: histo.root -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Added stream file:../data/input.hbook as InFile -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -SimpleHistos DEBUG input handles: 0 -SimpleHistos DEBUG output handles: 0 -SimpleHistos DEBUG Data Deps for SimpleHistos +Gaudi::Histogra... INFO Writing ROOT histograms to: testHisto.root SimpleCounterHi... DEBUG Property update for OutputLevel : new value = 2 SimpleCounterHi... DEBUG input handles: 0 SimpleCounterHi... DEBUG output handles: 0 SimpleCounterHi... DEBUG Data Deps for SimpleCounterHistos EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. +RootHistSvc INFO Writing ROOT histograms to: histo.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! SimpleCounterHi...SUCCESS Filling Histograms...... Please be patient ! +Gaudi::Histogra... INFO Completed update of ROOT histograms in: testHisto.root SimpleCounterHi... INFO Number of counters : 1 | Counter | # | sum | mean/eff^* | rms/err^* | min | max | | "calls" | 50000 | ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.97206 | 0.91845 | 1.4999 | 2.249 | - | 102 | "Breit" | 50000 | 0.0025008 | 1.2092 | 0.032604 | 3.5685 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | AutoID time test | "AutoID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | poisson | "Poisson" | 50000 | 1.8025 | 1.1757 | 0.33387 | -0.75618 | - | subdir1/bino | "Binominal" | 50000 | 1.9002 | 1.1114 | 0.25988 | -0.66567 | - | subdir2/bino | "Binominal" | 50000 | 1.9002 | 1.1114 | 0.25988 | -0.66567 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | varBinning/x | "1D Variable Binning" | 50000 | 0.011548 | 2.8753 | 0.0050588 | -1.3052 | -SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 - ID=Exponential V Flat "Exponential V Flat" Ents/All=49840/50000<X>/sX=0.010914/2.876,<Y>/sY=0.97261/0.91767 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 - ID=binVpois "Binom V poisson" Ents/All=49934/50000<X>/sX=1.8032/1.1748,<Y>/sY=1.9012/1.1102 - ID=expoVpois "Expo V poisson" Ents/All=49986/50000<X>/sX=1.8019/1.1756,<Y>/sY=0.97127/0.91738 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 -SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.0067064/1.0028,<Y>/sY=0.97257/0.91859,<Z>/sZ=0.0033096/1.2098 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.0067064/1.0028,<Y>/sY=0.97257/0.91859,<Z>/sZ=0.0033096/1.2098 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=0.010914/2.876,<Y>/sY=-0.012318/1.0025,<Z>/sZ=0.97261/0.91767 -SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.0036024 | 1.003 | -2.9478 | 62.513 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.0036024 | 1.003 | -2.9478 | 62.513 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.027529 | 5.7553 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.027529 | 5.7553 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24985 | -0.022904 | 5.7597 | 0.027443 | -1.2343 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24985 | -0.022904 | 5.7597 | 0.027443 | -1.2343 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25015 | -0.032149 | 5.7509 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25015 | -0.032149 | 5.7509 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 50000 | 0.011548 | 2.8753 | 0 | -3 | -SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.0045089/1.0031,<Y>/sY=0.97206/0.91845 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.0045089/1.0031,<Y>/sY=0.97206/0.91845 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DOldStyle INFO Time User : Tot= 30 [ms] Ave/Min/Max= 0.0006(+- 0.0775)/ 0/ 10 [ms] #=49999 -1DForcedAlphaID INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -1DAutoID INFO Time User : Tot= 100 [ms] Ave/Min/Max= 0.002(+- 0.141)/ 0/ 10 [ms] #=49999 -1DForcedNumericID INFO Time User : Tot= 120 [ms] Ave/Min/Max= 0.0024(+- 0.155)/ 0/ 10 [ms] #=49999 -ChronoStatSvc INFO Time User : Tot= 3.34 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/MetaDataSvc.ref b/GaudiExamples/tests/qmtest/refs/MetaDataSvc.ref index 4dd5cc9322de351f99684f69a16f7236b3c7df2b..643f59ef9ecded56b3a06c2e981b9db9b58be9cd 100644 --- a/GaudiExamples/tests/qmtest/refs/MetaDataSvc.ref +++ b/GaudiExamples/tests/qmtest/refs/MetaDataSvc.ref @@ -1,37 +1,32 @@ # setting LC_ALL to "C" -# --> Including file '/builds/gaudi/Gaudi/GaudiExamples/options/TupleEx.py' -# <-- End of file '/builds/gaudi/Gaudi/GaudiExamples/options/TupleEx.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/NTuples.opts' +# ApplicationMgr.TopAlg = { "NTupleAlgorithm" }; +# MessageSvc.OutputLevel = 3; +# ApplicationMgr.EvtMax = 10000; +# ApplicationMgr.EvtSel = "NONE"; +# ApplicationMgr.HistogramPersistency = "ROOT"; +# HistogramPersistencySvc.OutputFile = "histo.root"; +# NTupleSvc.Output = { "MyTuples DATAFILE='ntuple.root' OPT='NEW' TYP='ROOT'" }; +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/NTuples.opts' ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:17:14 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Mon Apr 17 15:54:20 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> Gaudi::MetaDataSvc DEBUG Property update for OutputLevel : new value = 2 Gaudi::MetaDataSvc DEBUG Service base class initialized successfully -RootHistSvc INFO Writing ROOT histograms to: UndefinedROOTOutputFileName -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -NTupleSvc INFO Added stream file:TupleEx_with_metadata.root as MYLUN +NTupleSvc INFO Added stream file:ntuple_with_metadata.root as MyTuples +RFileCnv INFO opening Root file "ntuple_with_metadata.root" for writing +NTupleAlgorithm INFO Finished booking NTuples EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. +RootHistSvc INFO Writing ROOT histograms to: histo.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc ApplicationMgr INFO Application Manager Initialized successfully +JobOptionsSvc INFO Properties are dumped into "gaudiexamples.metadatasvc.joboptsdump" Gaudi::MetaDataSvc DEBUG started Gaudi::MetaDataSvc DEBUG Metadata collected: -AlgContextSvc.AuditFinalize:False -AlgContextSvc.AuditInitialize:False -AlgContextSvc.AuditReinitialize:False -AlgContextSvc.AuditRestart:False -AlgContextSvc.AuditServices:False -AlgContextSvc.AuditStart:False -AlgContextSvc.AuditStop:False -AlgContextSvc.AutoRetrieveTools:True -AlgContextSvc.BypassIncidents:False -AlgContextSvc.Check:True -AlgContextSvc.CheckToolDeps:True -AlgContextSvc.OutputLevel:3 AlgExecStateSvc.AuditFinalize:False AlgExecStateSvc.AuditInitialize:False AlgExecStateSvc.AuditReinitialize:False @@ -67,7 +62,7 @@ ApplicationMgr.EventLoop:'EventLoopMgr' ApplicationMgr.EvtMax:10 ApplicationMgr.EvtSel:'NONE' ApplicationMgr.Exit:0 -ApplicationMgr.ExtSvc:[ 'RndmGenSvc' , 'Gaudi::MetaDataSvc' , 'Gaudi::Monitoring::MessageSvcSink' ] +ApplicationMgr.ExtSvc:[ 'Gaudi::MetaDataSvc' , 'Gaudi::Monitoring::MessageSvcSink' ] ApplicationMgr.ExtSvcCreates:True ApplicationMgr.Go:0 ApplicationMgr.HistogramPersistency:'ROOT' @@ -87,11 +82,10 @@ ApplicationMgr.PropertiesPrint:False ApplicationMgr.ReturnCode:0 ApplicationMgr.Runable:'AppMgrRunable' ApplicationMgr.StalledEventMonitoring:False -ApplicationMgr.StatusCodeCheck:False ApplicationMgr.StopOnSignal:False ApplicationMgr.SvcMapping:[ 'EvtDataSvc/EventDataSvc' , 'DetDataSvc/DetectorDataSvc' , 'HistogramSvc/HistogramDataSvc' , 'HbookCnv::PersSvc/HbookHistSvc' , 'RootHistCnv::PersSvc/RootHistSvc' , 'EvtPersistencySvc/EventPersistencySvc' , 'DetPersistencySvc/DetectorPersistencySvc' , 'HistogramPersistencySvc/HistogramPersistencySvc' ] ApplicationMgr.SvcOptMapping:[ ] -ApplicationMgr.TopAlg:[ 'TupleAlg/Tuple' , 'TupleAlg2/Tuple2' , 'TupleAlg3/Tuple3' ] +ApplicationMgr.TopAlg:[ 'NTupleAlgorithm' ] ApplicationMgr.UseMessageSvcForROOTMessages:True EventDataSvc.AuditFinalize:False EventDataSvc.AuditInitialize:False @@ -126,7 +120,7 @@ EventLoopMgr.OutStream:[ ] EventLoopMgr.OutStreamType:'OutputStream' EventLoopMgr.OutputLevel:3 EventLoopMgr.PrintControlFlowExpression:False -EventLoopMgr.TopAlg:[ 'TupleAlg/Tuple' , 'TupleAlg2/Tuple2' , 'TupleAlg3/Tuple3' ] +EventLoopMgr.TopAlg:[ 'NTupleAlgorithm' ] EventLoopMgr.Warnings:True EventPersistencySvc.AuditFinalize:False EventPersistencySvc.AuditInitialize:False @@ -196,7 +190,7 @@ HistogramPersistencySvc.CnvServices:[ 'RootHistSvc' ] HistogramPersistencySvc.ConvertHistos:[ ] HistogramPersistencySvc.ExcludeHistos:[ ] HistogramPersistencySvc.HistogramPersistency:'ROOT' -HistogramPersistencySvc.OutputFile:'' +HistogramPersistencySvc.OutputFile:'histo.root' HistogramPersistencySvc.OutputLevel:3 HistogramPersistencySvc.Warnings:True IncidentSvc.AuditFinalize:False @@ -225,7 +219,7 @@ JobOptionsSvc.PATH:'../options/job.opts' JobOptionsSvc.PYTHONACTION:'' JobOptionsSvc.PYTHONPARAMS:'' JobOptionsSvc.ReportUnused:False -JobOptionsSvc.SEARCHPATH:'/builds/gaudi/Gaudi/GaudiExamples/tests/qmtest:/builds/gaudi/Gaudi/GaudiExamples/options' +JobOptionsSvc.SEARCHPATH:'' JobOptionsSvc.TYPE:'NONE' MessageSvc.AuditFinalize:False MessageSvc.AuditInitialize:False @@ -268,6 +262,26 @@ MessageSvc.verboseColorCode:[ ] MessageSvc.verboseLimit:500 MessageSvc.warningColorCode:[ 'yellow' ] MessageSvc.warningLimit:500 +NTupleAlgorithm.AuditAlgorithms:False +NTupleAlgorithm.AuditExecute:False +NTupleAlgorithm.AuditFinalize:False +NTupleAlgorithm.AuditInitialize:False +NTupleAlgorithm.AuditReinitialize:False +NTupleAlgorithm.AuditRestart:False +NTupleAlgorithm.AuditStart:False +NTupleAlgorithm.AuditStop:False +NTupleAlgorithm.Blocking:False +NTupleAlgorithm.Cardinality:1 +NTupleAlgorithm.Enable:True +NTupleAlgorithm.ErrorMax:1 +NTupleAlgorithm.ExtraInputs:[] +NTupleAlgorithm.ExtraOutputs:[] +NTupleAlgorithm.FilterCircularDependencies:True +NTupleAlgorithm.MonitorService:'MonitorSvc' +NTupleAlgorithm.NeededResources:[ ] +NTupleAlgorithm.OutputLevel:3 +NTupleAlgorithm.RegisterForContextService:False +NTupleAlgorithm.Timeline:False NTupleSvc.AuditFinalize:False NTupleSvc.AuditInitialize:False NTupleSvc.AuditReinitialize:False @@ -284,7 +298,7 @@ NTupleSvc.EnableFaultHandler:False NTupleSvc.ForceLeaves:False NTupleSvc.InhibitPathes:[ ] NTupleSvc.Input:[ ] -NTupleSvc.Output:[ 'MYLUN DATAFILE=\'TupleEx_with_metadata.root\' OPT=\'NEW\' TYP=\'ROOT\'' ] +NTupleSvc.Output:[ 'MyTuples DATAFILE=\'ntuple_with_metadata.root\' OPT=\'NEW\' TYP=\'ROOT\'' ] NTupleSvc.OutputLevel:3 NTupleSvc.RootCLID:1 NTupleSvc.RootName:'/NTUPLES' @@ -298,34 +312,6 @@ NTupleSvcConversions.AuditStop:False NTupleSvcConversions.AutoRetrieveTools:True NTupleSvcConversions.CheckToolDeps:True NTupleSvcConversions.OutputLevel:3 -RFileCnv.GlobalCompression:"LZMA:6" -RndmGenSvc.AuditFinalize:False -RndmGenSvc.AuditInitialize:False -RndmGenSvc.AuditReinitialize:False -RndmGenSvc.AuditRestart:False -RndmGenSvc.AuditServices:False -RndmGenSvc.AuditStart:False -RndmGenSvc.AuditStop:False -RndmGenSvc.AutoRetrieveTools:True -RndmGenSvc.CheckToolDeps:True -RndmGenSvc.Engine:'HepRndm::Engine<CLHEP::RanluxEngine>' -RndmGenSvc.Engine.AuditFinalize:False -RndmGenSvc.Engine.AuditInitialize:False -RndmGenSvc.Engine.AuditReinitialize:False -RndmGenSvc.Engine.AuditRestart:False -RndmGenSvc.Engine.AuditServices:False -RndmGenSvc.Engine.AuditStart:False -RndmGenSvc.Engine.AuditStop:False -RndmGenSvc.Engine.AutoRetrieveTools:True -RndmGenSvc.Engine.CheckToolDeps:True -RndmGenSvc.Engine.Column:0 -RndmGenSvc.Engine.Luxury:3 -RndmGenSvc.Engine.OutputLevel:3 -RndmGenSvc.Engine.Row:1 -RndmGenSvc.Engine.Seeds:[ 1234567 , 0 ] -RndmGenSvc.Engine.SetSingleton:False -RndmGenSvc.Engine.UseTable:False -RndmGenSvc.OutputLevel:3 RootHistSvc.AuditFinalize:False RootHistSvc.AuditInitialize:False RootHistSvc.AuditReinitialize:False @@ -337,7 +323,7 @@ RootHistSvc.AutoRetrieveTools:True RootHistSvc.CheckToolDeps:True RootHistSvc.ForceAlphaIds:False RootHistSvc.OutputEnabled:True -RootHistSvc.OutputFile:'UndefinedROOTOutputFileName' +RootHistSvc.OutputFile:'histo.root' RootHistSvc.OutputLevel:3 TimelineSvc.AuditFinalize:False TimelineSvc.AuditInitialize:False @@ -353,800 +339,47 @@ TimelineSvc.OutputLevel:3 TimelineSvc.Partial:False TimelineSvc.RecordTimeline:False TimelineSvc.TimelineFile:'timeline.csv' -Tuple.AuditAlgorithms:False -Tuple.AuditExecute:False -Tuple.AuditFinalize:False -Tuple.AuditInitialize:False -Tuple.AuditReinitialize:False -Tuple.AuditRestart:False -Tuple.AuditStart:False -Tuple.AuditStop:False -Tuple.AutoStringIDPurgeMap:{ '/' : '=SLASH=' } -Tuple.Blocking:False -Tuple.Cardinality:1 -Tuple.Context:'' -Tuple.CounterList:[ '.*' ] -Tuple.Enable:True -Tuple.ErrorMax:1 -Tuple.ErrorsPrint:True -Tuple.EvtColDir:'Tuple' -Tuple.EvtColLUN:'EVTCOL' -Tuple.EvtColOffSet:0 -Tuple.EvtColSplitDir:False -Tuple.EvtColTopDir:'' -Tuple.EvtColsPrint:False -Tuple.EvtColsProduce:False -Tuple.ExtraInputs:[] -Tuple.ExtraOutputs:[] -Tuple.FilterCircularDependencies:True -Tuple.FormatFor1DHistoTable:'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Tuple.FullDetail:False -Tuple.HeaderFor1DHistoTable:'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Tuple.HistoCheckForNaN:True -Tuple.HistoCountersPrint:True -Tuple.HistoDir:'Tuple' -Tuple.HistoOffSet:0 -Tuple.HistoPrint:False -Tuple.HistoProduce:True -Tuple.HistoSplitDir:False -Tuple.HistoTopDir:'' -Tuple.MonitorHistograms:True -Tuple.MonitorService:'MonitorSvc' -Tuple.NTupleDir:'Tuple' -Tuple.NTupleLUN:'MYLUN' -Tuple.NTupleOffSet:0 -Tuple.NTuplePrint:True -Tuple.NTupleProduce:True -Tuple.NTupleSplitDir:False -Tuple.NTupleTopDir:'' -Tuple.NeededResources:[ ] -Tuple.OutputLevel:3 -Tuple.PropertiesPrint:False -Tuple.RegisterForContextService:True -Tuple.RequireObjects:[ ] -Tuple.RootInTES:'' -Tuple.ShortFormatFor1DHistoTable:' | %1$-25.25s %2%' -Tuple.Timeline:False -Tuple.TypePrint:True -Tuple.UseSequencialNumericAutoIDs:False -Tuple.VetoObjects:[ ] -Tuple2.AuditAlgorithms:False -Tuple2.AuditExecute:False -Tuple2.AuditFinalize:False -Tuple2.AuditInitialize:False -Tuple2.AuditReinitialize:False -Tuple2.AuditRestart:False -Tuple2.AuditStart:False -Tuple2.AuditStop:False -Tuple2.AutoStringIDPurgeMap:{ '/' : '=SLASH=' } -Tuple2.Blocking:False -Tuple2.Cardinality:1 -Tuple2.Context:'' -Tuple2.CounterList:[ '.*' ] -Tuple2.Enable:True -Tuple2.ErrorMax:1 -Tuple2.ErrorsPrint:True -Tuple2.EvtColDir:'Tuple2' -Tuple2.EvtColLUN:'EVTCOL' -Tuple2.EvtColOffSet:0 -Tuple2.EvtColSplitDir:False -Tuple2.EvtColTopDir:'' -Tuple2.EvtColsPrint:False -Tuple2.EvtColsProduce:False -Tuple2.ExtraInputs:[] -Tuple2.ExtraOutputs:[] -Tuple2.FilterCircularDependencies:True -Tuple2.FormatFor1DHistoTable:'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Tuple2.FullDetail:False -Tuple2.HeaderFor1DHistoTable:'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Tuple2.HistoCheckForNaN:True -Tuple2.HistoCountersPrint:True -Tuple2.HistoDir:'Tuple2' -Tuple2.HistoOffSet:0 -Tuple2.HistoPrint:False -Tuple2.HistoProduce:True -Tuple2.HistoSplitDir:False -Tuple2.HistoTopDir:'' -Tuple2.MonitorHistograms:True -Tuple2.MonitorService:'MonitorSvc' -Tuple2.NTupleDir:'Tuple2' -Tuple2.NTupleLUN:'MYLUN' -Tuple2.NTupleOffSet:0 -Tuple2.NTuplePrint:True -Tuple2.NTupleProduce:True -Tuple2.NTupleSplitDir:False -Tuple2.NTupleTopDir:'' -Tuple2.NeededResources:[ ] -Tuple2.OutputLevel:3 -Tuple2.PropertiesPrint:False -Tuple2.RegisterForContextService:True -Tuple2.RequireObjects:[ ] -Tuple2.RootInTES:'' -Tuple2.ShortFormatFor1DHistoTable:' | %1$-25.25s %2%' -Tuple2.Timeline:False -Tuple2.TypePrint:True -Tuple2.UseSequencialNumericAutoIDs:False -Tuple2.VetoObjects:[ ] -Tuple3.AuditAlgorithms:False -Tuple3.AuditExecute:False -Tuple3.AuditFinalize:False -Tuple3.AuditInitialize:False -Tuple3.AuditReinitialize:False -Tuple3.AuditRestart:False -Tuple3.AuditStart:False -Tuple3.AuditStop:False -Tuple3.AutoStringIDPurgeMap:{ '/' : '=SLASH=' } -Tuple3.Blocking:False -Tuple3.Cardinality:1 -Tuple3.Context:'' -Tuple3.CounterList:[ '.*' ] -Tuple3.Enable:True -Tuple3.ErrorMax:1 -Tuple3.ErrorsPrint:True -Tuple3.EvtColDir:'Tuple3' -Tuple3.EvtColLUN:'EVTCOL' -Tuple3.EvtColOffSet:0 -Tuple3.EvtColSplitDir:False -Tuple3.EvtColTopDir:'' -Tuple3.EvtColsPrint:False -Tuple3.EvtColsProduce:False -Tuple3.ExtraInputs:[] -Tuple3.ExtraOutputs:[] -Tuple3.FilterCircularDependencies:True -Tuple3.FormatFor1DHistoTable:'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -Tuple3.FullDetail:False -Tuple3.HeaderFor1DHistoTable:'| Title | # | Mean | RMS | Skewness | Kurtosis |' -Tuple3.HistoCheckForNaN:True -Tuple3.HistoCountersPrint:True -Tuple3.HistoDir:'Tuple3' -Tuple3.HistoOffSet:0 -Tuple3.HistoPrint:False -Tuple3.HistoProduce:True -Tuple3.HistoSplitDir:False -Tuple3.HistoTopDir:'' -Tuple3.MonitorHistograms:True -Tuple3.MonitorService:'MonitorSvc' -Tuple3.NTupleDir:'Tuple3' -Tuple3.NTupleLUN:'MYLUN' -Tuple3.NTupleOffSet:0 -Tuple3.NTuplePrint:True -Tuple3.NTupleProduce:True -Tuple3.NTupleSplitDir:False -Tuple3.NTupleTopDir:'' -Tuple3.NeededResources:[ ] -Tuple3.OutputLevel:3 -Tuple3.PropertiesPrint:False -Tuple3.RegisterForContextService:True -Tuple3.RequireObjects:[ ] -Tuple3.RootInTES:'' -Tuple3.ShortFormatFor1DHistoTable:' | %1$-25.25s %2%' -Tuple3.Timeline:False -Tuple3.TypePrint:True -Tuple3.UseSequencialNumericAutoIDs:False -Tuple3.VetoObjects:[ ] ApplicationMgr INFO Application Manager Started successfully -RFileCnv INFO opening Root file "TupleEx_with_metadata.root" for writing, CompressionLevel='LZMA:6' -RRWNTupleCnv INFO ID 1: added branch: gauss / gauss/D -RRWNTupleCnv INFO ID 1: added branch: flat / flat/D -RRWNTupleCnv INFO ID 1: added branch: expo / expo/D -RRWNTupleCnv INFO ID 1: added branch: breit / breit/D -RRWNTupleCnv INFO ID 1: added branch: poiss / poiss/I -RRWNTupleCnv INFO ID 1: added branch: binom / binom/I -RRWNTupleCnv INFO ID 1: added branch: pois2 / pois2/I -RRWNTupleCnv INFO ID 1: added branch: bino2 / bino2/I -RRWNTupleCnv INFO ID 1: added branch: poisb / poisb/O -RRWNTupleCnv INFO Booked TTree with ID:1 "Trivial Row-Wise Tuple" -RCWNTupleCnv INFO Booked TTree with ID: two "Column-Wise Tuple" in directory TupleEx_with_metadata.root:/Tuple -RCWNTupleCnv INFO Booked TTree with ID: 3 "Fixed-size arrays/vectors" in directory TupleEx_with_metadata.root:/Tuple -RCWNTupleCnv INFO Booked TTree with ID: four "Fixed-size matrices" in directory TupleEx_with_metadata.root:/Tuple/subdir -RCWNTupleCnv INFO Booked TTree with ID: 5 "Variable-size arrays/vectors" in directory TupleEx_with_metadata.root:/Tuple -RCWNTupleCnv INFO Booked TTree with ID: six "Variable-size matrices" in directory TupleEx_with_metadata.root:/Tuple -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -RCWNTupleCnv INFO Booked TTree with ID: typesCW "Types Test Column Wise" in directory TupleEx_with_metadata.root:/Tuple -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -RRWNTupleCnv INFO ID typesRW: added branch: bool / bool/O -RRWNTupleCnv INFO ID typesRW: added branch: float / float/F -RRWNTupleCnv INFO ID typesRW: added branch: double / double/D -RRWNTupleCnv INFO ID typesRW: added branch: short / short/S -RRWNTupleCnv INFO ID typesRW: added branch: ushort / ushort/s -RRWNTupleCnv INFO ID typesRW: added branch: int / int/I -RRWNTupleCnv INFO ID typesRW: added branch: uint / uint/i -RRWNTupleCnv INFO ID typesRW: added branch: long / long/L -RRWNTupleCnv INFO ID typesRW: added branch: ulong / ulong/l -RRWNTupleCnv INFO ID typesRW: added branch: longlong / longlong/L -RRWNTupleCnv INFO ID typesRW: added branch: ulonglong / ulonglong/l -RRWNTupleCnv INFO ID typesRW: added branch: char / char/B -RRWNTupleCnv INFO ID typesRW: added branch: uchar / uchar/b -RRWNTupleCnv INFO ID typesRW: added branch: EventID / EventID/l -RRWNTupleCnv INFO Booked TTree with ID:typesRW "Types Test Row Wise" -RCWNTupleCnv INFO Booked TTree with ID: dublets "Tuple with dublets" in directory TupleEx_with_metadata.root:/Tuple2 -RCWNTupleCnv INFO Booked TTree with ID: triplets "Tuple with triplets" in directory TupleEx_with_metadata.root:/Tuple2 -RCWNTupleCnv INFO Booked TTree with ID: LorentzVectors "Tuple with Lorentz Vectors " in directory TupleEx_with_metadata.root:/Tuple3 -RCWNTupleCnv INFO Booked TTree with ID: Vectors-3D "Tuple with Vectors in 3D " in directory TupleEx_with_metadata.root:/Tuple3 -RCWNTupleCnv INFO Booked TTree with ID: Math-vectors "Tuple with Math Vectors" in directory TupleEx_with_metadata.root:/Tuple3 -RCWNTupleCnv INFO Booked TTree with ID: S-matrices "Tuple with S-matrices" in directory TupleEx_with_metadata.root:/Tuple3 -RCWNTupleCnv INFO Booked TTree with ID: VectorMaps "Tuple with VectorMaps/'ExtraInfo'" in directory TupleEx_with_metadata.root:/Tuple3 -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long' -Tuple WARNING TupleAlg:: Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long' -Tuple WARNING TupleAlg:: The WARNING message is suppressed : 'Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long'' -Tuple WARNING TupleAlg:: The WARNING message is suppressed : 'Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long'' -Tuple WARNING TupleAlg:: The WARNING message is suppressed : 'Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long'' -Tuple WARNING TupleAlg:: The WARNING message is suppressed : 'Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long'' +RRWNTupleCnv INFO ID 1: added branch: Ntrack / Ntrack/I +RRWNTupleCnv INFO ID 1: added branch: Energy / Energy/F +RRWNTupleCnv INFO Booked TTree with ID:1 "Row-wise N-Tuple example" +RCWNTupleCnv INFO Booked TTree with ID: 2 "Col-Wise NTuple examples" in directory ntuple_with_metadata.root:/simple ApplicationMgr INFO Application Manager Stopped successfully -Tuple SUCCESS Booked 8 N-Tuples and 0 Event Tag Collections -Tuple SUCCESS List of booked N-Tuples in directory "MYLUN/Tuple" -Tuple SUCCESS ID=1 Title="Trivial Row-Wise Tuple" #items=9 {gauss,flat,expo,breit,poiss,binom,pois2,bino2,poisb} -Tuple SUCCESS ID=3 Title="Fixed-size arrays/vectors" #items=4 {arflat[1],arexpo[1],argau[1],argau2[1]} -Tuple SUCCESS ID=5 Title="Variable-size arrays/vectors" #items=6 {Len1,arr[1]/V,Len2,sinar[1]/V,cosar[1]/V,tanar[1]/V} -Tuple SUCCESS ID=six Title="Variable-size matrices" #items=8 {Len1,mgau[2]/V,Len2,mexpo[2]/V,Len3,m3flat[2]/V,Len4,m2expo[2]/V} -Tuple SUCCESS ID=subdir/four Title="Fixed-size matrices" #items=3 {mgau[2],mflat[2],mexpo[2]} -Tuple SUCCESS ID=two Title="Column-Wise Tuple" #items=9 {gauss,flat,expo,breit,poiss,binom,pois2,bino2,poisb} -Tuple SUCCESS ID=typesCW Title="Types Test Column Wise" #items=14 {bool,float,double,short,ushort,int,uint,long,ulong,longlong,ulonglong,char,uchar,} -Tuple SUCCESS ID=typesRW Title="Types Test Row Wise" #items=14 {bool,float,double,short,ushort,int,uint,long,ulong,longlong,ulonglong,char,uchar,} -Tuple SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 0/0/4/0 -Tuple SUCCESS #WARNINGS = 10 Message = 'Tuple 'Types Test Column Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long'' -Tuple SUCCESS #WARNINGS = 10 Message = 'Tuple 'Types Test Column Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long'' -Tuple SUCCESS #WARNINGS = 10 Message = 'Tuple 'Types Test Row Wise' 'long' has different sizes on 32/64 bit systems. Casting 'long' to 'long long'' -Tuple SUCCESS #WARNINGS = 10 Message = 'Tuple 'Types Test Row Wise' 'unsigned long' has different sizes on 32/64 bit systems. Casting 'ulong' to 'unsigned long long'' -Tuple2 SUCCESS Booked 2 N-Tuples and 0 Event Tag Collections -Tuple2 SUCCESS List of booked N-Tuples in directory "MYLUN/Tuple2" -Tuple2 SUCCESS ID=dublets Title="Tuple with dublets" #items=8 {d1F,d1S,d2F,d2S,d3F,d3S,d4F,d4S} -Tuple2 SUCCESS ID=triplets Title="Tuple with triplets" #items=6 {tr1F,tr1S,tr1T,tr2F,tr2S,tr2T} -Tuple3 SUCCESS Booked 5 N-Tuples and 0 Event Tag Collections -Tuple3 SUCCESS List of booked N-Tuples in directory "MYLUN/Tuple3" -Tuple3 SUCCESS ID=LorentzVectorsTitle="Tuple with Lorentz Vectors " #items=8 {lv1E,lv1X,lv1Y,lv1Z,lv2E,lv2X,lv2Y,lv2Z} -Tuple3 SUCCESS ID=Math-vectors Title="Tuple with Math Vectors" #items=3 {g[1],b[1],f[1]} -Tuple3 SUCCESS ID=S-matrices Title="Tuple with S-matrices" #items=3 {g[2],b[2],f[2]} -Tuple3 SUCCESS ID=VectorMaps Title="Tuple with VectorMaps/'ExtraInfo'" #items=8 {n1,map1[2]/V,n2,map2[2]/V,n3,map3[2]/V,n4,map4[2]/V} -Tuple3 SUCCESS ID=Vectors-3D Title="Tuple with Vectors in 3D " #items=6 {p3X,p3Y,p3Z,v3X,v3Y,v3Z} -RootHistSvc WARNING no ROOT output file name, Histograms cannot be persistified +NTupleAlgorithm INFO Finalizing... EventLoopMgr INFO Histograms converted successfully according to request. -RFileCnv INFO dumping contents of /NTUPLES/MYLUN -TFile: name=TupleEx_with_metadata.root, title=Gaudi Trees, option=CREATE -****************************************************************************** -*Tree :1 : Trivial Row-Wise Tuple * -*Entries : 10 : Total = 5985 bytes File Size = 1775 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :gauss : gauss/D * -*Entries : 10 : Total Size= 650 bytes File Size = 149 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :flat : flat/D * -*Entries : 10 : Total Size= 645 bytes File Size = 148 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :expo : expo/D * -*Entries : 10 : Total Size= 645 bytes File Size = 148 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :breit : breit/D * -*Entries : 10 : Total Size= 650 bytes File Size = 149 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :poiss : poiss/I * -*Entries : 10 : Total Size= 602 bytes File Size = 109 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :binom : binom/I * -*Entries : 10 : Total Size= 602 bytes File Size = 109 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :pois2 : pois2/I * -*Entries : 10 : Total Size= 602 bytes File Size = 109 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :bino2 : bino2/I * -*Entries : 10 : Total Size= 602 bytes File Size = 109 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 8 :poisb : poisb/O * -*Entries : 10 : Total Size= 566 bytes File Size = 79 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :two : Column-Wise Tuple * -*Entries : 10 : Total = 5997 bytes File Size = 1790 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :gauss : gauss/D * -*Entries : 10 : Total Size= 652 bytes File Size = 151 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :flat : flat/D * -*Entries : 10 : Total Size= 647 bytes File Size = 150 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :expo : expo/D * -*Entries : 10 : Total Size= 647 bytes File Size = 150 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :breit : breit/D * -*Entries : 10 : Total Size= 652 bytes File Size = 151 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :poiss : poiss/I * -*Entries : 10 : Total Size= 604 bytes File Size = 111 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :binom : binom/I * -*Entries : 10 : Total Size= 604 bytes File Size = 111 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :pois2 : pois2/I * -*Entries : 10 : Total Size= 604 bytes File Size = 111 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :bino2 : bino2/I * -*Entries : 10 : Total Size= 604 bytes File Size = 111 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 8 :poisb : poisb/O * -*Entries : 10 : Total Size= 568 bytes File Size = 81 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* +RFileCnv INFO dumping contents of /NTUPLES/MyTuples +TFile: name=ntuple_with_metadata.root, title=Gaudi Trees, option=CREATE ****************************************************************************** -*Tree :3 : Fixed-size arrays/vectors * -*Entries : 10 : Total = 10523 bytes File Size = 8581 * -* : : Tree compression factor = 1.01 * +*Tree :2 : Col-Wise NTuple examples * +*Entries : 10 : Total = 6032 bytes File Size = 1094 * +* : : Tree compression factor = 8.32 * ****************************************************************************** -*Br 0 :arflat : arflat[50]/F * -*Entries : 10 : Total Size= 2575 bytes File Size = 2070 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :arexpo : arexpo[62]/F * -*Entries : 10 : Total Size= 3055 bytes File Size = 2463 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.04 * -*............................................................................* -*Br 2 :argau : argau[42]/F * -*Entries : 10 : Total Size= 2250 bytes File Size = 1749 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :argau2 : argau2[42]/F * -*Entries : 10 : Total Size= 2255 bytes File Size = 1750 * +*Br 0 :N : N/I * +*Entries : 10 : Total Size= 582 bytes File Size = 105 * *Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * *............................................................................* -****************************************************************************** -*Tree :four : Fixed-size matrices * -*Entries : 10 : Total = 10829 bytes File Size = 9228 * -* : : Tree compression factor = 1.03 * -****************************************************************************** -*Br 0 :mgau : mgau[15][5]/F * -*Entries : 10 : Total Size= 3574 bytes File Size = 3008 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.02 * +*Br 1 :FNumbers : FNumbers[N]/F * +*Entries : 10 : Total Size= 2600 bytes File Size = 198 * +*Baskets : 1 : Basket Size= 32000 bytes Compression= 10.20 * *............................................................................* -*Br 1 :mflat : mflat[26][4]/F * -*Entries : 10 : Total Size= 4739 bytes File Size = 4093 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.03 * -*............................................................................* -*Br 2 :mexpo : mexpo[13][3]/F * -*Entries : 10 : Total Size= 2139 bytes File Size = 1613 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.01 * +*Br 2 :INumbers : INumbers[N]/I * +*Entries : 10 : Total Size= 2593 bytes File Size = 195 * +*Baskets : 1 : Basket Size= 32000 bytes Compression= 10.36 * *............................................................................* ****************************************************************************** -*Tree :5 : Variable-size arrays/vectors * -*Entries : 10 : Total = 4431 bytes File Size = 1638 * +*Tree :1 : Row-wise N-Tuple example * +*Entries : 10 : Total = 1597 bytes File Size = 666 * * : : Tree compression factor = 1.00 * ****************************************************************************** -*Br 0 :Len1 : Len1/I * -*Entries : 10 : Total Size= 597 bytes File Size = 108 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :arr : arr[Len1]/F * -*Entries : 10 : Total Size= 759 bytes File Size = 187 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :Len2 : Len2/I * -*Entries : 10 : Total Size= 597 bytes File Size = 108 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :sinar : sinar[Len2]/F * -*Entries : 10 : Total Size= 789 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :cosar : cosar[Len2]/F * -*Entries : 10 : Total Size= 789 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :tanar : tanar[Len2]/F * -*Entries : 10 : Total Size= 789 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :six : Variable-size matrices * -*Entries : 10 : Total = 9852 bytes File Size = 6094 * -* : : Tree compression factor = 1.01 * -****************************************************************************** -*Br 0 :Len1 : Len1/I * -*Entries : 10 : Total Size= 599 bytes File Size = 110 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :mgau : mgau[Len1][15]/F * -*Entries : 10 : Total Size= 2022 bytes File Size = 1438 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :Len2 : Len2/I * -*Entries : 10 : Total Size= 599 bytes File Size = 110 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :mexpo : mexpo[Len2][15]/F * -*Entries : 10 : Total Size= 2387 bytes File Size = 1752 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.03 * -*............................................................................* -*Br 4 :Len3 : Len3/I * -*Entries : 10 : Total Size= 599 bytes File Size = 110 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :m3flat : m3flat[Len3][6]/F * -*Entries : 10 : Total Size= 1262 bytes File Size = 672 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :Len4 : Len4/I * -*Entries : 10 : Total Size= 599 bytes File Size = 110 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :m2expo : m2expo[Len4][15]/F * -*Entries : 10 : Total Size= 1672 bytes File Size = 1080 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :typesCW : Types Test Column Wise * -*Entries : 10 : Total = 9155 bytes File Size = 2725 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :bool : bool/O * -*Entries : 10 : Total Size= 567 bytes File Size = 84 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :float : float/F * -*Entries : 10 : Total Size= 608 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :double : double/D * -*Entries : 10 : Total Size= 661 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :short : short/S * -*Entries : 10 : Total Size= 584 bytes File Size = 95 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :ushort : ushort/s * -*Entries : 10 : Total Size= 589 bytes File Size = 96 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :int : int/I * -*Entries : 10 : Total Size= 598 bytes File Size = 113 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :uint : uint/i * -*Entries : 10 : Total Size= 603 bytes File Size = 114 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :long : long/L * -*Entries : 10 : Total Size= 651 bytes File Size = 154 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 8 :ulong : ulong/l * -*Entries : 10 : Total Size= 656 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 9 :longlong : longlong/L * -*Entries : 10 : Total Size= 671 bytes File Size = 158 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 10 :ulonglong : ulonglong/l * -*Entries : 10 : Total Size= 676 bytes File Size = 159 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 11 :char : char/B * -*Entries : 10 : Total Size= 567 bytes File Size = 84 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 12 :uchar : uchar/b * -*Entries : 10 : Total Size= 572 bytes File Size = 85 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 13 :EventID : EventID/l * -*Entries : 10 : Total Size= 666 bytes File Size = 157 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :typesRW : Types Test Row Wise * -*Entries : 10 : Total = 9149 bytes File Size = 2714 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :bool : bool/O * -*Entries : 10 : Total Size= 567 bytes File Size = 84 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :float : float/F * -*Entries : 10 : Total Size= 608 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :double : double/D * -*Entries : 10 : Total Size= 661 bytes File Size = 156 * +*Br 0 :Ntrack : Ntrack/I * +*Entries : 10 : Total Size= 607 bytes File Size = 110 * *Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * *............................................................................* -*Br 3 :short : short/S * -*Entries : 10 : Total Size= 584 bytes File Size = 95 * +*Br 1 :Energy : Energy/F * +*Entries : 10 : Total Size= 607 bytes File Size = 110 * *Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * *............................................................................* -*Br 4 :ushort : ushort/s * -*Entries : 10 : Total Size= 589 bytes File Size = 96 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :int : int/I * -*Entries : 10 : Total Size= 598 bytes File Size = 113 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :uint : uint/i * -*Entries : 10 : Total Size= 603 bytes File Size = 114 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :long : long/L * -*Entries : 10 : Total Size= 651 bytes File Size = 154 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 8 :ulong : ulong/l * -*Entries : 10 : Total Size= 656 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 9 :longlong : longlong/L * -*Entries : 10 : Total Size= 671 bytes File Size = 158 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 10 :ulonglong : ulonglong/l * -*Entries : 10 : Total Size= 676 bytes File Size = 159 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 11 :char : char/B * -*Entries : 10 : Total Size= 567 bytes File Size = 84 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 12 :uchar : uchar/b * -*Entries : 10 : Total Size= 572 bytes File Size = 85 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 13 :EventID : EventID/l * -*Entries : 10 : Total Size= 666 bytes File Size = 157 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :dublets : Tuple with dublets * -*Entries : 10 : Total = 5574 bytes File Size = 1744 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :d1F : d1F/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :d1S : d1S/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :d2F : d2F/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :d2S : d2S/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :d3F : d3F/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :d3S : d3S/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :d4F : d4F/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :d4S : d4S/D * -*Entries : 10 : Total Size= 646 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :triplets : Tuple with triplets * -*Entries : 10 : Total = 4312 bytes File Size = 1424 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :tr1F : tr1F/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :tr1S : tr1S/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :tr1T : tr1T/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :tr2F : tr2F/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :tr2S : tr2S/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :tr2T : tr2T/D * -*Entries : 10 : Total Size= 652 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :LorentzVectors: Tuple with Lorentz Vectors * -*Entries : 10 : Total = 5702 bytes File Size = 1836 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :lv1E : lv1E/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :lv1X : lv1X/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :lv1Y : lv1Y/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :lv1Z : lv1Z/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :lv2E : lv2E/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :lv2X : lv2X/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :lv2Y : lv2Y/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :lv2Z : lv2Z/D * -*Entries : 10 : Total Size= 658 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :Vectors-3D: Tuple with Vectors in 3D * -*Entries : 10 : Total = 4310 bytes File Size = 1450 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :p3X : p3X/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :p3Y : p3Y/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :p3Z : p3Z/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :v3X : v3X/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :v3Y : v3Y/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :v3Z : v3Z/D * -*Entries : 10 : Total Size= 649 bytes File Size = 156 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :Math-vectors: Tuple with Math Vectors * -*Entries : 10 : Total = 5242 bytes File Size = 3882 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :g : g[4]/F * -*Entries : 10 : Total Size= 719 bytes File Size = 236 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :b : b[25]/F * -*Entries : 10 : Total Size= 1561 bytes File Size = 1076 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :f : f[50]/F * -*Entries : 10 : Total Size= 2561 bytes File Size = 2076 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -****************************************************************************** -*Tree :S-matrices: Tuple with S-matrices * -*Entries : 10 : Total = 5524 bytes File Size = 3929 * -* : : Tree compression factor = 1.07 * -****************************************************************************** -*Br 0 :g : g[4][4]/F * -*Entries : 10 : Total Size= 1203 bytes File Size = 714 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :b : b[3][15]/F * -*Entries : 10 : Total Size= 2365 bytes File Size = 1874 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :f : f[5][5]/F * -*Entries : 10 : Total Size= 1563 bytes File Size = 831 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.29 * -*............................................................................* -****************************************************************************** -*Tree :VectorMaps: Tuple with VectorMaps/'ExtraInfo' * -*Entries : 10 : Total = 69345 bytes File Size = 3734 * -* : : Tree compression factor = 21.09 * -****************************************************************************** -*Br 0 :n1 : n1/I * -*Entries : 10 : Total Size= 596 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :map1 : map1[n1][2]/F * -*Entries : 10 : Total Size= 16699 bytes File Size = 622 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 25.92 * -*............................................................................* -*Br 2 :n2 : n2/I * -*Entries : 10 : Total Size= 596 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 3 :map2 : map2[n2][2]/F * -*Entries : 10 : Total Size= 16699 bytes File Size = 654 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 24.66 * -*............................................................................* -*Br 4 :n3 : n3/I * -*Entries : 10 : Total Size= 596 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :map3 : map3[n3][2]/F * -*Entries : 10 : Total Size= 16699 bytes File Size = 606 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 26.61 * -*............................................................................* -*Br 6 :n4 : n4/I * -*Entries : 10 : Total Size= 596 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 7 :map4 : map4[n4][2]/F * -*Entries : 10 : Total Size= 16699 bytes File Size = 738 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 21.85 * -*............................................................................* NTupleSvc INFO NTuples saved successfully ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/MultiInput/Read.ref b/GaudiExamples/tests/qmtest/refs/MultiInput/Read.ref index 6242ff0fddfd27015363b5657a4050729018a110..fb84072624d536edf3ec322dbe56dee8d40d3125 100644 --- a/GaudiExamples/tests/qmtest/refs/MultiInput/Read.ref +++ b/GaudiExamples/tests/qmtest/refs/MultiInput/Read.ref @@ -1,6 +1,6 @@ # setting LC_ALL to "C" -# --> Including file '/afs/cern.ch/work/m/marcocle/workspace/Gaudi/GaudiExamples/options/MultiInput/Read.py' -# <-- End of file '/afs/cern.ch/work/m/marcocle/workspace/Gaudi/GaudiExamples/options/MultiInput/Read.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/MultiInput/Read.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/MultiInput/Read.py' # applying configuration of GaudiPersistency # /***** User GaudiPersistency/GaudiPersistency ****************************************************** # |-<no properties> @@ -12,7 +12,7 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs']}, 'EventAlgs': {'Members': ['Gaudi::Examples::MultiInput::ReadAlg/Gaudi::Examples::MultiInput::ReadAlg']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'EventSelector': {'Input': ["DATAFILE='PFN:MI_Base.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"]}, @@ -22,15 +22,11 @@ 'OutputLevel': 2}} ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v4r0) - running on pclhcb117 on Thu Feb 11 14:56:44 2016 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Wed Apr 19 23:30:05 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventAlgs INFO Member list: Gaudi::Examples::MultiInput::ReadAlg -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -ToolSvc.Sequenc... INFO This machine has a speed about 4.05 times the speed of a 2.8 GHz Xeon. Gaudi::Examples... DEBUG Property update for OutputLevel : new value = 2 Gaudi::Examples... DEBUG Reading addresses.txt Gaudi::Examples... DEBUG Read 100 addresses @@ -39,7 +35,6 @@ Gaudi::Examples... DEBUG output handles: 0 Gaudi::Examples... DEBUG Data Deps for Gaudi::Examples::MultiInput::ReadAlg EventPersistenc... INFO Added successfully Conversion service:RootCnvSvc EventSelector INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='PFN:MI_Base.dst' SVC='Gaudi::RootEvtSelector' OPT='READ' -HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully EventSelector SUCCESS Reading Event record 1. Record number within stream 1: 1 @@ -254,13 +249,8 @@ Gaudi::Examples... INFO Base event tracks: 21 Gaudi::Examples... INFO Extra event tracks: 88 ApplicationMgr INFO Application Manager Stopped successfully EventLoopMgr INFO Histograms converted successfully according to request. -RootCnvSvc INFO Disconnected data IO:B2FAEA47-C7D0-E511-B012-082E5F2B1B1D [MI_Ext.dst] -RootCnvSvc INFO Disconnected data IO:FA964946-C7D0-E511-9ED6-082E5F2B1B1D [MI_Base.dst] +RootCnvSvc INFO Disconnected data IO:095A8C84-CFB3-11ED-8483-3CECEF0DE804 [MI_Ext.dst] +RootCnvSvc INFO Disconnected data IO:FEB1A97A-CFB2-11ED-A821-3CECEF0DE804 [MI_Base.dst] ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO This machine has a speed about 4.05 times the speed of a 2.8 GHz Xeon. -ToolSvc.Sequenc... INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/ROOT_IO/CollWrite.ref b/GaudiExamples/tests/qmtest/refs/ROOT_IO/CollWrite.ref index 610c22839bb3fdb5a32de932c00f635cfc6fe63e..b481c5be13f7a0412298dae68bce5cd42b6ad69f 100644 --- a/GaudiExamples/tests/qmtest/refs/ROOT_IO/CollWrite.ref +++ b/GaudiExamples/tests/qmtest/refs/ROOT_IO/CollWrite.ref @@ -12,7 +12,7 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs']}, 'EventAlgs': {'Members': ['EvtCollectionWrite/Writer'], 'VetoObjects': ['FSR']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, @@ -21,8 +21,7 @@ 'PrintFreq': 100}, 'EvtTupleSvc': {'Output': ["EvtColl DATAFILE='PFN:ROOT_IO.tags' OPT='RECREATE' SVC='Gaudi::RootCnvSvc'"]}, 'FileCatalog': {'Catalogs': ['xmlcatalog_file:ROOTIO.xml']}, - 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, - 'ToolSvc.SequencerTimerTool': {'OutputLevel': 4}} + 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}} ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v3r5) @@ -31,13 +30,9 @@ ApplicationMgr SUCCESS ApplicationMgr INFO Application Manager Configured successfully EvtTupleSvc INFO Added stream file:PFN:ROOT_IO.tags as EvtColl EventAlgs INFO Member list: EvtCollectionWrite/Writer -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> Gaudi::RootData... INFO Recreate Database file:PFN:ROOT_IO.tags as /EvtColl EventPersistenc... INFO Added successfully Conversion service:RootCnvSvc EventSelector INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='PFN:ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ' -HistogramPersis...WARNING Histograms saving not required. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully FileRecordPersi... INFO Added successfully Conversion service:RootCnvSvc @@ -85,7 +80,6 @@ EventSelector SUCCESS Reading Event record 1801. Record number within stream EventSelector SUCCESS Reading Event record 1901. Record number within stream 2: 901 Writer INFO ================ EVENT:1000 RUN:999 ====== N(Track)=55 PASSED selection (>=50) ============ EventLoopMgr INFO No more events in event selection -EventLoopMgr INFO ---> Loop Finished - WSS 235.105 | total time (skipping 1st evt) 4507249661 ns ApplicationMgr INFO Application Manager Stopped successfully EventLoopMgr INFO Histograms converted successfully according to request. RootCnvSvc INFO Disconnected data IO:02802356-5A77-E511-9E13-001E67ABF0AC [ROOTIO.mdst] diff --git a/GaudiExamples/tests/qmtest/refs/ROOT_IO/ExtCollWrite.ref b/GaudiExamples/tests/qmtest/refs/ROOT_IO/ExtCollWrite.ref index 80f3e0baa9e39789a8a01feb2d140de555842ecc..d0a3a6738a5c01129e98c29a9821f456915a521f 100644 --- a/GaudiExamples/tests/qmtest/refs/ROOT_IO/ExtCollWrite.ref +++ b/GaudiExamples/tests/qmtest/refs/ROOT_IO/ExtCollWrite.ref @@ -13,7 +13,7 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs']}, 'EventAlgs': {'Members': ['Gaudi::Examples::ExtendedEvtCol/Fill'], 'VetoObjects': ['FSR']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, @@ -23,8 +23,7 @@ 'EvtTupleSvc': {'Output': ["EXTEVT DATAFILE='PFN:ROOT_IO.etags' OPT='RECREATE' SVC='Gaudi::RootCnvSvc'"]}, 'FileCatalog': {'Catalogs': ['xmlcatalog_file:ROOTIO.xml']}, 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, - 'Fill': {'EvtColLUN': 'EXTEVT'}, - 'ToolSvc.SequencerTimerTool': {'OutputLevel': 4}} + 'Fill': {'EvtColLUN': 'EXTEVT'}} ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v34r1) @@ -33,9 +32,6 @@ ApplicationMgr SUCCESS ApplicationMgr INFO Application Manager Configured successfully EvtTupleSvc INFO Added stream file:PFN:ROOT_IO.etags as EXTEVT EventAlgs INFO Member list: Gaudi::Examples::ExtendedEvtCol/Fill -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> Fill SUCCESS List of ALL properties of Gaudi::Examples::ExtendedEvtCol/Fill #properties = 58 Fill SUCCESS Property ['Name': Value] = 'Tracks':'MyTracks' Fill SUCCESS Property ['Name': Value] = 'EvtColDir':'Fill' @@ -101,7 +97,6 @@ ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully FileRecordPersi... INFO Added successfully Conversion service:RootCnvSvc EventSelector SUCCESS Reading Event record 1. Record number within stream 1: 1 -IODataManager INFO Referring to dataset ROOT_IO.etags by its file ID:7F71277E-1215-11EB-ABB4-0242AC110005 Gaudi::RootData... INFO Recreate Database file:PFN:ROOT_IO.etags as /EXTEVT EventSelector SUCCESS Reading Event record 101. Record number within stream 1: 101 EventSelector SUCCESS Reading Event record 201. Record number within stream 1: 201 diff --git a/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputRead.ref b/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputRead.ref index 301c5639e747c76e5b5861ea590078dfb4394c86..cd5a2a87bab0632a7a26ce70b327d2e24e0b9aa1 100644 --- a/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputRead.ref +++ b/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputRead.ref @@ -11,8 +11,8 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs', - 'GaudiSequencer/FSRAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs', + 'Gaudi::Sequencer/FSRAlgs']}, 'EventAlgs': {'Members': ['ReadAlg/ReadAlg'], 'VetoObjects': ['FSR']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'EventSelector': {'FirstEvent': 1, @@ -25,8 +25,7 @@ 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'ReadAlg': {'IncidentName': 'NEW_FILE_RECORD', 'OutputLevel': 1}, 'ReadTES': {'Locations': ['FSR']}, - 'RootCnvSvc': {'OutputLevel': 3}, - 'ToolSvc.SequencerTimerTool': {'OutputLevel': 4}} + 'RootCnvSvc': {'OutputLevel': 3}} ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v36r7) @@ -34,9 +33,6 @@ ApplicationMgr SUCCESS ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventAlgs INFO Member list: ReadAlg -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> ReadAlg DEBUG Property update for OutputLevel : new value = 1 ReadAlg VERBOSE ServiceLocatorHelper::service: found service EventDataSvc ReadAlg VERBOSE ServiceLocatorHelper::service: found service TimelineSvc diff --git a/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputWrite.ref b/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputWrite.ref index 8d4a844c68f891d264aa75d73182ee54d53df695..0130b4b65feea765160a693113aff03432ce8df0 100644 --- a/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputWrite.ref +++ b/GaudiExamples/tests/qmtest/refs/ROOT_IO/NewInputWrite.ref @@ -54,55 +54,16 @@ EventPersistenc... DEBUG Service base class initialized successfully EventLoopMgr VERBOSE ServiceLocatorHelper::service: found service EventDataSvc EventLoopMgr DEBUG Creating Output Stream CopyInputStream/NewRootDst EventLoopMgr DEBUG Creating Top Algorithm Gaudi::Hive::FetchLeavesFromFile with name NewFetch -AlgContextSvc DEBUG Service base class initialized successfully -AlgContextSvc VERBOSE ServiceLocatorHelper::service: found service IncidentSvc -IncidentSvc DEBUG Adding [BeginEvent] listener 'AlgContextSvc' with priority 0 -IncidentSvc DEBUG Adding [EndEvent] listener 'AlgContextSvc' with priority 0 -NewFetch VERBOSE ServiceLocatorHelper::service: found service AlgContextSvc NewFetch VERBOSE ServiceLocatorHelper::service: found service EventDataSvc TimelineSvc DEBUG Service base class initialized successfully TimelineSvc DEBUG initialize NewFetch VERBOSE ServiceLocatorHelper::service: found service TimelineSvc -NewFetch VERBOSE ServiceLocatorHelper::service: found service EventDataSvc -NewFetch DEBUG Initialize base class GaudiCommon<Algorithm> -NewFetch DEBUG could not locate CounterSummarySvc, no counter summary will be made -NewFetch DEBUG List of ALL properties of Gaudi::Hive::FetchLeavesFromFile/NewFetch #properties = 31 -NewFetch DEBUG Property ['Name': Value] = 'Root':'' -NewFetch DEBUG Property ['Name': Value] = 'DataService':'EventDataSvc' -NewFetch DEBUG Property ['Name': Value] = 'InputFileLeavesLocation':/Event/InputFileLeaves -NewFetch DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -NewFetch DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -NewFetch DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -NewFetch DEBUG Property ['Name': Value] = 'Context':'' -NewFetch DEBUG Property ['Name': Value] = 'TypePrint':True -NewFetch DEBUG Property ['Name': Value] = 'PropertiesPrint':False -NewFetch DEBUG Property ['Name': Value] = 'ErrorsPrint':True -NewFetch DEBUG Property ['Name': Value] = 'RootInTES':'' -NewFetch DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -NewFetch DEBUG Property ['Name': Value] = 'Blocking':False -NewFetch DEBUG Property ['Name': Value] = 'NeededResources':[ ] -NewFetch DEBUG Property ['Name': Value] = 'Cardinality':0 -NewFetch DEBUG Property ['Name': Value] = 'RegisterForContextService':True -NewFetch DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -NewFetch DEBUG Property ['Name': Value] = 'Timeline':False -NewFetch DEBUG Property ['Name': Value] = 'AuditStop':False -NewFetch DEBUG Property ['Name': Value] = 'AuditStart':False -NewFetch DEBUG Property ['Name': Value] = 'AuditFinalize':False -NewFetch DEBUG Property ['Name': Value] = 'AuditExecute':False -NewFetch DEBUG Property ['Name': Value] = 'AuditRestart':False -NewFetch DEBUG Property ['Name': Value] = 'AuditReinitialize':False -NewFetch DEBUG Property ['Name': Value] = 'AuditInitialize':False -NewFetch DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -NewFetch DEBUG Property ['Name': Value] = 'ErrorMax':1 -NewFetch DEBUG Property ['Name': Value] = 'Enable':True -NewFetch DEBUG Property ['Name': Value] = 'OutputLevel':1 -NewFetch DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -NewFetch DEBUG Property ['Name': Value] = 'ExtraInputs':[] NewFetch VERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc NewFetch DEBUG input handles: 0 NewFetch DEBUG output handles: 1 NewFetch DEBUG Data Deps for NewFetch + OUTPUT '/Event/InputFileLeaves' +NewFetch VERBOSE ServiceLocatorHelper::service: found service EventDataSvc NewRootDst VERBOSE ServiceLocatorHelper::service: found service EventDataSvc NewRootDst VERBOSE ServiceLocatorHelper::service: found service TimelineSvc IODataManager DEBUG Service base class initialized successfully @@ -134,14 +95,12 @@ HistogramPersis... DEBUG Service base class initialized successfully HistogramPersis... DEBUG Histograms saving not required. HistogramDataSvc VERBOSE ServiceLocatorHelper::service: found service HistogramPersistencySvc ApplicationMgr INFO Application Manager Initialized successfully -JobOptionsSvc INFO Properties are dumped into "gaudiexamples.root_io.newinputwrite.joboptsdump" ServiceManager DEBUG Starting service FileRecordDataSvc ServiceManager DEBUG Starting service AppMgrRunable ServiceManager DEBUG Starting service IncidentSvc ServiceManager DEBUG Starting service FileRecordPersistencySvc ServiceManager DEBUG Starting service EventPersistencySvc ServiceManager DEBUG Starting service EventDataSvc -ServiceManager DEBUG Starting service AlgContextSvc ServiceManager DEBUG Starting service TimelineSvc ServiceManager DEBUG Starting service AlgExecStateSvc ServiceManager DEBUG Starting service FileCatalog @@ -520,7 +479,6 @@ ServiceManager DEBUG Stopping service IODataManager ServiceManager DEBUG Stopping service FileCatalog ServiceManager DEBUG Stopping service AlgExecStateSvc ServiceManager DEBUG Stopping service TimelineSvc -ServiceManager DEBUG Stopping service AlgContextSvc ServiceManager DEBUG Stopping service EventDataSvc ServiceManager DEBUG Stopping service EventPersistencySvc ServiceManager DEBUG Stopping service FileRecordPersistencySvc @@ -529,9 +487,6 @@ ServiceManager DEBUG Stopping service AppMgrRunable ServiceManager DEBUG Stopping service FileRecordDataSvc ApplicationMgr INFO Application Manager Stopped successfully ServiceManager DEBUG Finalizing service EventLoopMgr -NewFetch DEBUG Finalize base class GaudiAlgorithm -NewFetch DEBUG Tools to release : -NewFetch DEBUG Services to release : NewRootDst INFO Events output: 10 IncidentSvc DEBUG Removing [AbortEvent] listener '<unknown>' EventLoopMgr INFO Histograms converted successfully according to request. @@ -552,9 +507,6 @@ ServiceManager DEBUG Finalizing service IODataManager ServiceManager DEBUG Finalizing service FileCatalog ServiceManager DEBUG Finalizing service AlgExecStateSvc ServiceManager DEBUG Finalizing service TimelineSvc -ServiceManager DEBUG Finalizing service AlgContextSvc -IncidentSvc DEBUG Removing [EndEvent] listener 'AlgContextSvc' -IncidentSvc DEBUG Removing [BeginEvent] listener 'AlgContextSvc' ServiceManager DEBUG Finalizing service EventDataSvc ServiceManager DEBUG Finalizing service EventPersistencySvc ServiceManager DEBUG Finalizing service FileRecordPersistencySvc @@ -567,7 +519,7 @@ IncidentSvc DEBUG Removing [FILE_OPEN_READ] listener 'FileRecordDataSvc' ServiceManager DEBUG Finalizing service HistogramDataSvc ServiceManager DEBUG Finalizing service HistogramPersistencySvc ServiceManager DEBUG Looping over all active services... -ServiceManager DEBUG ---- MessageSvc (refCount = 27) +ServiceManager DEBUG ---- MessageSvc (refCount = 26) ServiceManager DEBUG ---- JobOptionsSvc (refCount = 2) ServiceManager DEBUG ---- HistogramPersistencySvc (refCount = 2) ServiceManager DEBUG ---- HistogramDataSvc (refCount = 3) @@ -577,7 +529,6 @@ ServiceManager DEBUG ---- IncidentSvc (refCount = 3) ServiceManager DEBUG ---- FileRecordPersistencySvc (refCount = 2) ServiceManager DEBUG ---- EventPersistencySvc (refCount = 2) ServiceManager DEBUG ---- EventDataSvc (refCount = 5) -ServiceManager DEBUG ---- AlgContextSvc (refCount = 2) ServiceManager DEBUG ---- TimelineSvc (refCount = 3) ServiceManager DEBUG ---- AlgExecStateSvc (refCount = 4) ServiceManager DEBUG ---- FileCatalog (refCount = 2) diff --git a/GaudiExamples/tests/qmtest/refs/ROOT_IO/Read.ref b/GaudiExamples/tests/qmtest/refs/ROOT_IO/Read.ref index 31a0bbd8098ac4ad946c0094e1a077f372059897..0bab2b2eb869fa771a0ff7ec76b78b1d907aeb69 100644 --- a/GaudiExamples/tests/qmtest/refs/ROOT_IO/Read.ref +++ b/GaudiExamples/tests/qmtest/refs/ROOT_IO/Read.ref @@ -11,8 +11,8 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs', - 'GaudiSequencer/FSRAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs', + 'Gaudi::Sequencer/FSRAlgs']}, 'EventAlgs': {'Members': ['ReadAlg/ReadAlg'], 'VetoObjects': ['FSR']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'EventSelector': {'FirstEvent': 1, @@ -26,8 +26,7 @@ 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'ReadAlg': {'IncidentName': 'NEW_FILE_RECORD', 'OutputLevel': 1}, 'ReadTES': {'Locations': ['FSR']}, - 'RootCnvSvc': {'OutputLevel': 3}, - 'ToolSvc.SequencerTimerTool': {'OutputLevel': 4}} + 'RootCnvSvc': {'OutputLevel': 3}} ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v36r7) @@ -35,9 +34,6 @@ ApplicationMgr SUCCESS ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventAlgs INFO Member list: ReadAlg -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> ReadAlg DEBUG Property update for OutputLevel : new value = 1 ReadAlg VERBOSE ServiceLocatorHelper::service: found service EventDataSvc ReadAlg VERBOSE ServiceLocatorHelper::service: found service TimelineSvc diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx3.pyref b/GaudiExamples/tests/qmtest/refs/TupleEx3.pyref deleted file mode 100644 index 8e1a956362de7b4d2fc6186bc2de91b28e58acf9..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/refs/TupleEx3.pyref +++ /dev/null @@ -1,152 +0,0 @@ - -******************************************************************************* -* * -* Simple example which illustrate the usage of useful * -* algorithm base class for N-Tuple manipulations * -* * -******************************************************************************* - -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr $Revision: 1.77 $ - running on pclhcb55 on Mon Jul 27 10:40:27 2009 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -ApplicationMgr INFO Successfully loaded modules : GaudiAlg, RootHistCnv -NTupleSvc INFO Added stream file:TupleEx3.root as MYLUN -RootHistSvc INFO Writing ROOT histograms to: UndefinedROOTOutputFileName -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -DetectorDataSvc INFO Detector description not requested to be loaded -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. -ApplicationMgr INFO Application Manager Initialized successfully -ApplicationMgr INFO Application Manager Started successfully -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -RFileCnv INFO opening Root file "TupleEx3.root" for writing -RCWNTupleCnv INFO Booked TTree with ID: farrays "N-tuple with farrays" in directory TupleEx3.root:/TupleEx3 -RCWNTupleCnv INFO Booked TTree with ID: arrays "N-tuple with arrays" in directory TupleEx3.root:/TupleEx3 -RCWNTupleCnv INFO Booked TTree with ID: square "N-tuple with square matrices" in directory TupleEx3.root:/TupleEx3 -ApplicationMgr INFO Application Manager Stopped successfully -TupleEx3 SUCCESS Booked 3 N-Tuples and 0 Event Tag Collections -TupleEx3 SUCCESS List of booked N-Tuples in directory "MYLUN/TupleEx3" -TupleEx3 SUCCESS ID=arrays Title="N-tuple with arrays" #items=10 {gauss[1],breit[1],v2[1],v3[1],v4[1],v5[1],v6[1],v7[1],v8[1],v9[1]} -TupleEx3 SUCCESS ID=farrays Title="N-tuple with farrays" #items=4 {len1,gauss[1]/V,len2,breit[1]/V} -TupleEx3 SUCCESS ID=square Title="N-tuple with square matrices" #items=8 {m2[2],m3[2],m4[2],m5[2],m6[2],m7[2],m8[2],m9[2]} -RootHistSvc WARNING no ROOT output file name, Histograms cannot be persistified -EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc INFO Time User : Tot= 2.01 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully -RFileCnv INFO dumping contents of /NTUPLES/MYLUN -TFile: name=TupleEx3.root, title=Gaudi Trees, option=CREATE -****************************************************************************** -*Tree :farrays : N-tuple with farrays * -*Entries : 200 : Total = 85512 bytes File Size = 39785 * -* : : Tree compression factor = 2.13 * -****************************************************************************** -*Br 0 :len1 : len1/I * -*Entries : 200 : Total Size= 1352 bytes File Size = 376 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.32 * -*............................................................................* -*Br 1 :gauss : gauss[len1]/F * -*Entries : 200 : Total Size= 40823 bytes File Size = 37326 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.08 * -*............................................................................* -*Br 2 :len2 : len2/I * -*Entries : 200 : Total Size= 1352 bytes File Size = 375 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.33 * -*............................................................................* -*Br 3 :breit : breit[len2]/F * -*Entries : 200 : Total Size= 41775 bytes File Size = 1016 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 40.55 * -*............................................................................* -****************************************************************************** -*Tree :arrays : N-tuple with arrays * -*Entries : 200 : Total = 89083 bytes File Size = 2261 * -* : : Tree compression factor = 59.35 * -****************************************************************************** -*Br 0 :gauss : gauss[30]/F * -*Entries : 200 : Total Size= 24564 bytes File Size = 226 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 106.52 * -*............................................................................* -*Br 1 :breit : breit[30]/F * -*Entries : 200 : Total Size= 24564 bytes File Size = 211 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 114.09 * -*............................................................................* -*Br 2 :v2 : v2[2]/F * -*Entries : 200 : Total Size= 2147 bytes File Size = 107 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 15.62 * -*............................................................................* -*Br 3 :v3 : v3[3]/F * -*Entries : 200 : Total Size= 2947 bytes File Size = 114 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 21.68 * -*............................................................................* -*Br 4 :v4 : v4[4]/F * -*Entries : 200 : Total Size= 3747 bytes File Size = 118 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 27.72 * -*............................................................................* -*Br 5 :v5 : v5[5]/F * -*Entries : 200 : Total Size= 4547 bytes File Size = 121 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 33.64 * -*............................................................................* -*Br 6 :v6 : v6[6]/F * -*Entries : 200 : Total Size= 5347 bytes File Size = 124 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 39.28 * -*............................................................................* -*Br 7 :v7 : v7[7]/F * -*Entries : 200 : Total Size= 6147 bytes File Size = 128 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 44.30 * -*............................................................................* -*Br 8 :v8 : v8[8]/F * -*Entries : 200 : Total Size= 6947 bytes File Size = 131 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 49.40 * -*............................................................................* -*Br 9 :v9 : v9[9]/F * -*Entries : 200 : Total Size= 7747 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 54.26 * -*............................................................................* -****************************************************************************** -*Tree :square : N-tuple with square matrices * -*Entries : 200 : Total = 232311 bytes File Size = 3093 * -* : : Tree compression factor = 102.45 * -****************************************************************************** -*Br 0 :m2 : m2[2][2]/F * -*Entries : 200 : Total Size= 3753 bytes File Size = 118 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 27.72 * -*............................................................................* -*Br 1 :m3 : m3[3][3]/F * -*Entries : 200 : Total Size= 7753 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 54.26 * -*............................................................................* -*Br 2 :m4 : m4[4][4]/F * -*Entries : 200 : Total Size= 13353 bytes File Size = 159 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 80.95 * -*............................................................................* -*Br 3 :m5 : m5[5][5]/F * -*Entries : 200 : Total Size= 20553 bytes File Size = 191 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 105.08 * -*............................................................................* -*Br 4 :m6 : m6[6][6]/F * -*Entries : 200 : Total Size= 29353 bytes File Size = 229 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 126.07 * -*............................................................................* -*Br 5 :m7 : m7[7][7]/F * -*Entries : 200 : Total Size= 39828 bytes File Size = 377 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 104.36 * -*............................................................................* -*Br 6 :m8 : m8[8][8]/F * -*Entries : 200 : Total Size= 51828 bytes File Size = 430 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 119.40 * -*............................................................................* -*Br 7 :m9 : m9[9][9]/F * -*Entries : 200 : Total Size= 65503 bytes File Size = 588 * -*Baskets : 3 : Basket Size= 32000 bytes Compression= 110.57 * -*............................................................................* -NTupleSvc INFO NTuples saved successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/TupleEx4.pyref b/GaudiExamples/tests/qmtest/refs/TupleEx4.pyref deleted file mode 100644 index 3a223b253e086adfd315a63b4013d067bcac3c0d..0000000000000000000000000000000000000000 --- a/GaudiExamples/tests/qmtest/refs/TupleEx4.pyref +++ /dev/null @@ -1,294 +0,0 @@ -# setting LC_ALL to "C" -ApplicationMgr SUCCESS -==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v4r0) - running on pclhcb117 on Mon Feb 15 17:47:24 2016 -==================================================================================================================================== -ApplicationMgr INFO Application Manager Configured successfully -NTupleSvc INFO Added stream file:TupleEx4_1.root as MYLUN1 -NTupleSvc INFO Added stream file:TupleEx4_2.root as MYLUN2 -NTupleSvc INFO Added stream file:TupleEx4_3.root as MYLUN3 -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. -RootHistSvc INFO Writing ROOT histograms to: UndefinedROOTOutputFileName -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -ApplicationMgr INFO Application Manager Initialized successfully -RFileCnv INFO opening Root file "TupleEx4_1.root" for writing -RCWNTupleCnv INFO Booked TTree with ID: It is a title for my n-tuple "It is a title for my n-tuple" in directory TupleEx4_1.root:/path -RCWNTupleCnv INFO Booked TTree with ID: MyTupleLV "N-tuple: Lorentz Vectors " in directory TupleEx4_1.root:/another/path -RFileCnv INFO opening Root file "TupleEx4_2.root" for writing -RCWNTupleCnv INFO Booked TTree with ID: MyTuple3DV "N-tuple: 3D-Vectors " in directory TupleEx4_2.root:/another/path -RFileCnv INFO opening Root file "TupleEx4_3.root" for writing -RCWNTupleCnv INFO Booked TTree with ID: MyTuple3DP "N-tuple: 3D-Points" in directory TupleEx4_3.root:/another/path -RCWNTupleCnv INFO Booked TTree with ID: 415 "N-tuple: VarArrays" in directory TupleEx4_1.root:/another/path -RCWNTupleCnv INFO Booked TTree with ID: xTuple "N-tuple: FixArrays" in directory TupleEx4_2.root:/another/path -RCWNTupleCnv INFO Booked TTree with ID: FixMatrices "N-tuple: FixMatrices" in directory TupleEx4_3.root:/another/path -RCWNTupleCnv INFO Booked TTree with ID: FixSymMatrices "N-tuple: FixSymMatrices" in directory TupleEx4_2.root:/another/path -RCWNTupleCnv INFO Booked TTree with ID: Time "N-tuple: Gaudi::Time" in directory TupleEx4_2.root:/another/path2 -RootHistSvc WARNING no ROOT output file name, Histograms cannot be persistified -EventLoopMgr INFO Histograms converted successfully according to request. -ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN2/another/path2" -ToolSvc.TupleMY...SUCCESS ID=Time Title="N-tuple: Gaudi::Time" #items=7 {year,month,day,hour,minute,second,nsecond} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN2/another/path" -ToolSvc.TupleMY...SUCCESS ID=FixSymMatricesTitle="N-tuple: FixSymMatrices" #items=6 {m2[2],m3[2],m4[2],m5[2],m6[2],m7[2]} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN3/another/path" -ToolSvc.TupleMY...SUCCESS ID=FixMatrices Title="N-tuple: FixMatrices" #items=6 {m2[2],m3[2],m4[2],m5[2],m6[2],m7[2]} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN2/another/path" -ToolSvc.TupleMY...SUCCESS ID=xTuple Title="N-tuple: FixArrays" #items=8 {v1[1],v2[1],v3[1],v4[1],v5[1],v6[1],v7[1],v8[1]} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN1/another/path" -ToolSvc.TupleMY...SUCCESS ID=415 Title="N-tuple: VarArrays" #items=4 {len1,vct1[1]/V,len2,vct2[1]/V} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN3/another/path" -ToolSvc.TupleMY...SUCCESS ID=MyTuple3DP Title="N-tuple: 3D-Points" #items=3 {p1X,p1Y,p1Z} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN2/another/path" -ToolSvc.TupleMY...SUCCESS ID=MyTuple3DV Title="N-tuple: 3D-Vectors " #items=3 {v1X,v1Y,v1Z} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN1/another/path" -ToolSvc.TupleMY...SUCCESS ID=MyTupleLV Title="N-tuple: Lorentz Vectors " #items=4 {lv1E,lv1X,lv1Y,lv1Z} -ToolSvc.TupleMY...SUCCESS Booked 1 N-Tuples and 0 Event Tag Collections -ToolSvc.TupleMY...SUCCESS List of booked N-Tuples in directory "MYLUN1/path" -ToolSvc.TupleMY...SUCCESS ID=It is a title for my n-tupleTitle="It is a title for my n-tuple" #items=4 {i,g1,g2,b1} -RFileCnv INFO dumping contents of /NTUPLES/MYLUN1 -TFile: name=TupleEx4_1.root, title=Gaudi Trees, option=CREATE -****************************************************************************** -*Tree :It is a title for my n-tuple: It is a title for my n-tuple * -*Entries : 5000 : Total = 107902 bytes File Size = 58233 * -* : : Tree compression factor = 1.84 * -****************************************************************************** -*Br 0 :i : i/I * -*Entries : 5000 : Total Size= 20558 bytes File Size = 7102 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.83 * -*............................................................................* -*Br 1 :g1 : g1/D * -*Entries : 5000 : Total Size= 40668 bytes File Size = 24588 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.63 * -*............................................................................* -*Br 2 :g2 : g2/D * -*Entries : 5000 : Total Size= 40668 bytes File Size = 24562 * -*Baskets : 2 : Basket Size= 32000 bytes Compression= 1.64 * -*............................................................................* -*Br 3 :b1 : b1/O * -*Entries : 5000 : Total Size= 5557 bytes File Size = 1250 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.07 * -*............................................................................* -****************************************************************************** -*Tree :MyTupleLV : N-tuple: Lorentz Vectors * -*Entries : 1000 : Total = 34641 bytes File Size = 20460 * -* : : Tree compression factor = 1.62 * -****************************************************************************** -*Br 0 :lv1E : lv1E/D * -*Entries : 1000 : Total Size= 8562 bytes File Size = 4968 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.63 * -*............................................................................* -*Br 1 :lv1X : lv1X/D * -*Entries : 1000 : Total Size= 8562 bytes File Size = 4976 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -*Br 2 :lv1Y : lv1Y/D * -*Entries : 1000 : Total Size= 8562 bytes File Size = 4976 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -*Br 3 :lv1Z : lv1Z/D * -*Entries : 1000 : Total Size= 8562 bytes File Size = 4987 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -****************************************************************************** -*Tree :415 : N-tuple: VarArrays * -*Entries : 100 : Total = 37902 bytes File Size = 19178 * -* : : Tree compression factor = 1.92 * -****************************************************************************** -*Br 0 :len1 : len1/I * -*Entries : 100 : Total Size= 948 bytes File Size = 265 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.77 * -*............................................................................* -*Br 1 :vct1 : vct1[len1]/F * -*Entries : 100 : Total Size= 19487 bytes File Size = 17549 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.08 * -*............................................................................* -*Br 2 :len2 : len2/I * -*Entries : 100 : Total Size= 948 bytes File Size = 224 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.10 * -*............................................................................* -*Br 3 :vct2 : vct2[len2]/F * -*Entries : 100 : Total Size= 16295 bytes File Size = 469 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 33.54 * -*............................................................................* -RFileCnv INFO dumping contents of /NTUPLES/MYLUN2 -TFile: name=TupleEx4_2.root, title=Gaudi Trees, option=CREATE -****************************************************************************** -*Tree :MyTuple3DV: N-tuple: 3D-Vectors * -*Entries : 1000 : Total = 26054 bytes File Size = 15467 * -* : : Tree compression factor = 1.62 * -****************************************************************************** -*Br 0 :v1X : v1X/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 4985 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -*Br 1 :v1Y : v1Y/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 4981 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -*Br 2 :v1Z : v1Z/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 4994 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -****************************************************************************** -*Tree :xTuple : N-tuple: FixArrays * -*Entries : 10 : Total = 6451 bytes File Size = 1653 * -* : : Tree compression factor = 2.45 * -****************************************************************************** -*Br 0 :v1 : v1[5]/F * -*Entries : 10 : Total Size= 747 bytes File Size = 271 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :v2 : v2[10]/F * -*Entries : 10 : Total Size= 949 bytes File Size = 94 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 5.01 * -*............................................................................* -*Br 2 :v3 : v3[2]/F * -*Entries : 10 : Total Size= 627 bytes File Size = 92 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.64 * -*............................................................................* -*Br 3 :v4 : v4[3]/F * -*Entries : 10 : Total Size= 667 bytes File Size = 92 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.08 * -*............................................................................* -*Br 4 :v5 : v5[4]/F * -*Entries : 10 : Total Size= 707 bytes File Size = 92 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.51 * -*............................................................................* -*Br 5 :v6 : v6[5]/F * -*Entries : 10 : Total Size= 747 bytes File Size = 92 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.95 * -*............................................................................* -*Br 6 :v7 : v7[6]/F * -*Entries : 10 : Total Size= 787 bytes File Size = 92 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 3.38 * -*............................................................................* -*Br 7 :v8 : v8[7]/F * -*Entries : 10 : Total Size= 827 bytes File Size = 94 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 3.73 * -*............................................................................* -****************************************************************************** -*Tree :FixSymMatrices: N-tuple: FixSymMatrices * -*Entries : 100 : Total = 59375 bytes File Size = 1590 * -* : : Tree compression factor = 61.96 * -****************************************************************************** -*Br 0 :m2 : m2[2][2]/F * -*Entries : 100 : Total Size= 2161 bytes File Size = 115 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 14.60 * -*............................................................................* -*Br 1 :m3 : m3[3][3]/F * -*Entries : 100 : Total Size= 4161 bytes File Size = 126 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 29.20 * -*............................................................................* -*Br 2 :m4 : m4[4][4]/F * -*Entries : 100 : Total Size= 6961 bytes File Size = 139 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 46.61 * -*............................................................................* -*Br 3 :m5 : m5[5][5]/F * -*Entries : 100 : Total Size= 10561 bytes File Size = 155 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 65.03 * -*............................................................................* -*Br 4 :m6 : m6[6][6]/F * -*Entries : 100 : Total Size= 14961 bytes File Size = 174 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 83.21 * -*............................................................................* -*Br 5 :m7 : m7[7][7]/F * -*Entries : 100 : Total Size= 20161 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 100.40 * -*............................................................................* -****************************************************************************** -*Tree :Time : N-tuple: Gaudi::Time * -*Entries : 100 : Total = 7066 bytes File Size = 1504 * -* : : Tree compression factor = 4.87 * -****************************************************************************** -*Br 0 :year : year/I * -*Entries : 100 : Total Size= 949 bytes File Size = 98 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.81 * -*............................................................................* -*Br 1 :month : month/I * -*Entries : 100 : Total Size= 954 bytes File Size = 98 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.82 * -*............................................................................* -*Br 2 :day : day/I * -*Entries : 100 : Total Size= 944 bytes File Size = 96 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.90 * -*............................................................................* -*Br 3 :hour : hour/I * -*Entries : 100 : Total Size= 949 bytes File Size = 97 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.86 * -*............................................................................* -*Br 4 :minute : minute/I * -*Entries : 100 : Total Size= 959 bytes File Size = 96 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.93 * -*............................................................................* -*Br 5 :second : second/I * -*Entries : 100 : Total Size= 959 bytes File Size = 96 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.93 * -*............................................................................* -*Br 6 :nsecond : nsecond/I * -*Entries : 100 : Total Size= 964 bytes File Size = 97 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.89 * -*............................................................................* -RFileCnv INFO dumping contents of /NTUPLES/MYLUN3 -TFile: name=TupleEx4_3.root, title=Gaudi Trees, option=CREATE -****************************************************************************** -*Tree :MyTuple3DP: N-tuple: 3D-Points * -*Entries : 1000 : Total = 26050 bytes File Size = 15475 * -* : : Tree compression factor = 1.62 * -****************************************************************************** -*Br 0 :p1X : p1X/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 4962 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.63 * -*............................................................................* -*Br 1 :p1Y : p1Y/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 5019 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.61 * -*............................................................................* -*Br 2 :p1Z : p1Z/D * -*Entries : 1000 : Total Size= 8558 bytes File Size = 4987 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.62 * -*............................................................................* -****************************************************************************** -*Tree :FixMatrices: N-tuple: FixMatrices * -*Entries : 100 : Total = 59345 bytes File Size = 1569 * -* : : Tree compression factor = 63.20 * -****************************************************************************** -*Br 0 :m2 : m2[2][2]/F * -*Entries : 100 : Total Size= 2158 bytes File Size = 112 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 14.96 * -*............................................................................* -*Br 1 :m3 : m3[3][3]/F * -*Entries : 100 : Total Size= 4158 bytes File Size = 123 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 29.89 * -*............................................................................* -*Br 2 :m4 : m4[4][4]/F * -*Entries : 100 : Total Size= 6958 bytes File Size = 136 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 47.62 * -*............................................................................* -*Br 3 :m5 : m5[5][5]/F * -*Entries : 100 : Total Size= 10558 bytes File Size = 152 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 66.29 * -*............................................................................* -*Br 4 :m6 : m6[6][6]/F * -*Entries : 100 : Total Size= 14958 bytes File Size = 171 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 84.65 * -*............................................................................* -*Br 5 :m7 : m7[7][7]/F * -*Entries : 100 : Total Size= 20158 bytes File Size = 193 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 101.95 * -*............................................................................* -NTupleSvc INFO NTuples saved successfully -ApplicationMgr INFO Application Manager Finalized successfully -ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/conditional_output/write.ref b/GaudiExamples/tests/qmtest/refs/conditional_output/write.ref index 6bb18ce8a0b0525b9e586fcbf1b62202e4b7d640..51e6b856317306bc95f96940eb563a48109dcca3 100644 --- a/GaudiExamples/tests/qmtest/refs/conditional_output/write.ref +++ b/GaudiExamples/tests/qmtest/refs/conditional_output/write.ref @@ -59,131 +59,26 @@ EventLoopMgr DEBUG Creating Output Stream OutputStream/OutputStream EventLoopMgr DEBUG Creating Top Algorithm GaudiTesting::PutDataObjectAlg with name DataCreator EventLoopMgr DEBUG Creating Top Algorithm GaudiTesting::OddEventsFilter with name OddEvents EventLoopMgr DEBUG Creating Top Algorithm GaudiTesting::EvenEventsFilter with name EvenEvents -AlgContextSvc DEBUG Service base class initialized successfully -AlgContextSvc VERBOSE ServiceLocatorHelper::service: found service IncidentSvc -IncidentSvc DEBUG Adding [BeginEvent] listener 'AlgContextSvc' with priority 0 -IncidentSvc DEBUG Adding [EndEvent] listener 'AlgContextSvc' with priority 0 -DataCreator VERBOSE ServiceLocatorHelper::service: found service AlgContextSvc DataCreator VERBOSE ServiceLocatorHelper::service: found service EventDataSvc TimelineSvc DEBUG Service base class initialized successfully TimelineSvc DEBUG initialize DataCreator VERBOSE ServiceLocatorHelper::service: found service TimelineSvc DataCreator VERBOSE ServiceLocatorHelper::service: found service EventDataSvc -DataCreator DEBUG Initialize base class GaudiCommon<Algorithm> -DataCreator DEBUG could not locate CounterSummarySvc, no counter summary will be made -DataCreator DEBUG List of ALL properties of GaudiTesting::PutDataObjectAlg/DataCreator #properties = 30 -DataCreator DEBUG Property ['Name': Value] = 'DataSvc':'EventDataSvc' -DataCreator DEBUG Property ['Name': Value] = 'Paths':[ 'A' , 'B' , 'C' , 'D' ] -DataCreator DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -DataCreator DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -DataCreator DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -DataCreator DEBUG Property ['Name': Value] = 'Context':'' -DataCreator DEBUG Property ['Name': Value] = 'TypePrint':True -DataCreator DEBUG Property ['Name': Value] = 'PropertiesPrint':False -DataCreator DEBUG Property ['Name': Value] = 'ErrorsPrint':True -DataCreator DEBUG Property ['Name': Value] = 'RootInTES':'' -DataCreator DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -DataCreator DEBUG Property ['Name': Value] = 'Blocking':False -DataCreator DEBUG Property ['Name': Value] = 'NeededResources':[ ] -DataCreator DEBUG Property ['Name': Value] = 'Cardinality':1 -DataCreator DEBUG Property ['Name': Value] = 'RegisterForContextService':True -DataCreator DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -DataCreator DEBUG Property ['Name': Value] = 'Timeline':False -DataCreator DEBUG Property ['Name': Value] = 'AuditStop':False -DataCreator DEBUG Property ['Name': Value] = 'AuditStart':False -DataCreator DEBUG Property ['Name': Value] = 'AuditFinalize':False -DataCreator DEBUG Property ['Name': Value] = 'AuditExecute':False -DataCreator DEBUG Property ['Name': Value] = 'AuditRestart':False -DataCreator DEBUG Property ['Name': Value] = 'AuditReinitialize':False -DataCreator DEBUG Property ['Name': Value] = 'AuditInitialize':False -DataCreator DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -DataCreator DEBUG Property ['Name': Value] = 'ErrorMax':1 -DataCreator DEBUG Property ['Name': Value] = 'Enable':True -DataCreator DEBUG Property ['Name': Value] = 'OutputLevel':1 -DataCreator DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -DataCreator DEBUG Property ['Name': Value] = 'ExtraInputs':[] -DataCreator VERBOSE ServiceLocatorHelper::service: found service EventDataSvc AlgExecStateSvc DEBUG Service base class initialized successfully DataCreator VERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc AlgExecStateSvc DEBUG preInit: will add Alg DataCreator later DataCreator DEBUG input handles: 0 DataCreator DEBUG output handles: 0 DataCreator DEBUG Data Deps for DataCreator -OddEvents VERBOSE ServiceLocatorHelper::service: found service AlgContextSvc OddEvents VERBOSE ServiceLocatorHelper::service: found service EventDataSvc OddEvents VERBOSE ServiceLocatorHelper::service: found service TimelineSvc -OddEvents VERBOSE ServiceLocatorHelper::service: found service EventDataSvc -OddEvents DEBUG Initialize base class GaudiCommon<Algorithm> -OddEvents DEBUG could not locate CounterSummarySvc, no counter summary will be made -OddEvents DEBUG List of ALL properties of GaudiTesting::OddEventsFilter/OddEvents #properties = 28 -OddEvents DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -OddEvents DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -OddEvents DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -OddEvents DEBUG Property ['Name': Value] = 'Context':'' -OddEvents DEBUG Property ['Name': Value] = 'TypePrint':True -OddEvents DEBUG Property ['Name': Value] = 'PropertiesPrint':False -OddEvents DEBUG Property ['Name': Value] = 'ErrorsPrint':True -OddEvents DEBUG Property ['Name': Value] = 'RootInTES':'' -OddEvents DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -OddEvents DEBUG Property ['Name': Value] = 'Blocking':False -OddEvents DEBUG Property ['Name': Value] = 'NeededResources':[ ] -OddEvents DEBUG Property ['Name': Value] = 'Cardinality':1 -OddEvents DEBUG Property ['Name': Value] = 'RegisterForContextService':True -OddEvents DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -OddEvents DEBUG Property ['Name': Value] = 'Timeline':False -OddEvents DEBUG Property ['Name': Value] = 'AuditStop':False -OddEvents DEBUG Property ['Name': Value] = 'AuditStart':False -OddEvents DEBUG Property ['Name': Value] = 'AuditFinalize':False -OddEvents DEBUG Property ['Name': Value] = 'AuditExecute':False -OddEvents DEBUG Property ['Name': Value] = 'AuditRestart':False -OddEvents DEBUG Property ['Name': Value] = 'AuditReinitialize':False -OddEvents DEBUG Property ['Name': Value] = 'AuditInitialize':False -OddEvents DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -OddEvents DEBUG Property ['Name': Value] = 'ErrorMax':1 -OddEvents DEBUG Property ['Name': Value] = 'Enable':True -OddEvents DEBUG Property ['Name': Value] = 'OutputLevel':1 -OddEvents DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -OddEvents DEBUG Property ['Name': Value] = 'ExtraInputs':[] OddEvents VERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc AlgExecStateSvc DEBUG preInit: will add Alg OddEvents later OddEvents DEBUG input handles: 0 OddEvents DEBUG output handles: 0 OddEvents DEBUG Data Deps for OddEvents -EvenEvents VERBOSE ServiceLocatorHelper::service: found service AlgContextSvc EvenEvents VERBOSE ServiceLocatorHelper::service: found service EventDataSvc EvenEvents VERBOSE ServiceLocatorHelper::service: found service TimelineSvc -EvenEvents VERBOSE ServiceLocatorHelper::service: found service EventDataSvc -EvenEvents DEBUG Initialize base class GaudiCommon<Algorithm> -EvenEvents DEBUG could not locate CounterSummarySvc, no counter summary will be made -EvenEvents DEBUG List of ALL properties of GaudiTesting::EvenEventsFilter/EvenEvents #properties = 28 -EvenEvents DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -EvenEvents DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -EvenEvents DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -EvenEvents DEBUG Property ['Name': Value] = 'Context':'' -EvenEvents DEBUG Property ['Name': Value] = 'TypePrint':True -EvenEvents DEBUG Property ['Name': Value] = 'PropertiesPrint':False -EvenEvents DEBUG Property ['Name': Value] = 'ErrorsPrint':True -EvenEvents DEBUG Property ['Name': Value] = 'RootInTES':'' -EvenEvents DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -EvenEvents DEBUG Property ['Name': Value] = 'Blocking':False -EvenEvents DEBUG Property ['Name': Value] = 'NeededResources':[ ] -EvenEvents DEBUG Property ['Name': Value] = 'Cardinality':1 -EvenEvents DEBUG Property ['Name': Value] = 'RegisterForContextService':True -EvenEvents DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -EvenEvents DEBUG Property ['Name': Value] = 'Timeline':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditStop':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditStart':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditFinalize':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditExecute':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditRestart':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditReinitialize':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditInitialize':False -EvenEvents DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -EvenEvents DEBUG Property ['Name': Value] = 'ErrorMax':1 -EvenEvents DEBUG Property ['Name': Value] = 'Enable':True -EvenEvents DEBUG Property ['Name': Value] = 'OutputLevel':1 -EvenEvents DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -EvenEvents DEBUG Property ['Name': Value] = 'ExtraInputs':[] EvenEvents VERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc AlgExecStateSvc DEBUG preInit: will add Alg EvenEvents later EvenEvents DEBUG input handles: 0 @@ -226,7 +121,6 @@ ServiceManager DEBUG Starting service IncidentSvc ServiceManager DEBUG Starting service FileRecordPersistencySvc ServiceManager DEBUG Starting service EventPersistencySvc ServiceManager DEBUG Starting service EventDataSvc -ServiceManager DEBUG Starting service AlgContextSvc ServiceManager DEBUG Starting service TimelineSvc ServiceManager DEBUG Starting service AlgExecStateSvc ServiceManager DEBUG Starting service FileCatalog @@ -330,7 +224,6 @@ ServiceManager DEBUG Stopping service IODataManager ServiceManager DEBUG Stopping service FileCatalog ServiceManager DEBUG Stopping service AlgExecStateSvc ServiceManager DEBUG Stopping service TimelineSvc -ServiceManager DEBUG Stopping service AlgContextSvc ServiceManager DEBUG Stopping service EventDataSvc ServiceManager DEBUG Stopping service EventPersistencySvc ServiceManager DEBUG Stopping service FileRecordPersistencySvc @@ -339,15 +232,6 @@ ServiceManager DEBUG Stopping service AppMgrRunable ServiceManager DEBUG Stopping service FileRecordDataSvc ApplicationMgr INFO Application Manager Stopped successfully ServiceManager DEBUG Finalizing service EventLoopMgr -DataCreator DEBUG Finalize base class GaudiAlgorithm -DataCreator DEBUG Tools to release : -DataCreator DEBUG Services to release : -OddEvents DEBUG Finalize base class GaudiAlgorithm -OddEvents DEBUG Tools to release : -OddEvents DEBUG Services to release : -EvenEvents DEBUG Finalize base class GaudiAlgorithm -EvenEvents DEBUG Tools to release : -EvenEvents DEBUG Services to release : OutputStream INFO Events output: 10 IncidentSvc DEBUG Removing [AbortEvent] listener '<unknown>' EventLoopMgr INFO Histograms converted successfully according to request. @@ -360,9 +244,6 @@ ServiceManager DEBUG Finalizing service FileCatalog XMLCatalog INFO File 'ConditionalOutput.xml' does not exist. New file created. ServiceManager DEBUG Finalizing service AlgExecStateSvc ServiceManager DEBUG Finalizing service TimelineSvc -ServiceManager DEBUG Finalizing service AlgContextSvc -IncidentSvc DEBUG Removing [EndEvent] listener 'AlgContextSvc' -IncidentSvc DEBUG Removing [BeginEvent] listener 'AlgContextSvc' ServiceManager DEBUG Finalizing service EventDataSvc ServiceManager DEBUG Finalizing service EventPersistencySvc ServiceManager DEBUG Finalizing service FileRecordPersistencySvc @@ -370,10 +251,10 @@ ServiceManager DEBUG Finalizing service IncidentSvc IncidentSvc DEBUG Incident timing: Mean(+-rms)/Min/Max:0(+-0)/0/0[ms] Total:0[s] ServiceManager DEBUG Finalizing service AppMgrRunable ServiceManager DEBUG Finalizing service FileRecordDataSvc -IncidentSvc DEBUG Removing [FILE_OPEN_READ] listener 'FileRecordDataSvc' IncidentSvc DEBUG Removing [SAVE_FILE_RECORD] listener 'FileRecordDataSvc' +IncidentSvc DEBUG Removing [FILE_OPEN_READ] listener 'FileRecordDataSvc' ServiceManager DEBUG Looping over all active services... -ServiceManager DEBUG ---- MessageSvc (refCount = 24) +ServiceManager DEBUG ---- MessageSvc (refCount = 23) ServiceManager DEBUG ---- JobOptionsSvc (refCount = 2) ServiceManager DEBUG ---- FileRecordDataSvc (refCount = 3) ServiceManager DEBUG ---- AppMgrRunable (refCount = 3) @@ -381,7 +262,6 @@ ServiceManager DEBUG ---- IncidentSvc (refCount = 3) ServiceManager DEBUG ---- FileRecordPersistencySvc (refCount = 2) ServiceManager DEBUG ---- EventPersistencySvc (refCount = 2) ServiceManager DEBUG ---- EventDataSvc (refCount = 3) -ServiceManager DEBUG ---- AlgContextSvc (refCount = 2) ServiceManager DEBUG ---- TimelineSvc (refCount = 3) ServiceManager DEBUG ---- AlgExecStateSvc (refCount = 4) ServiceManager DEBUG ---- FileCatalog (refCount = 2) diff --git a/GaudiExamples/tests/qmtest/refs/config2/Histograms.ref b/GaudiExamples/tests/qmtest/refs/config2/Histograms.ref index c28ac15ab7a9df059dcd6270b3eb8547dbe8d2b4..0b90e7c1b9f278a2eee857255ef3baee5a6ba88c 100644 --- a/GaudiExamples/tests/qmtest/refs/config2/Histograms.ref +++ b/GaudiExamples/tests/qmtest/refs/config2/Histograms.ref @@ -1,186 +1,30 @@ -# setting LC_ALL to "C" ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:16:44 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:12:25 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' -SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False -SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] +SimpleCounterHi... DEBUG Property update for OutputLevel : new value = 2 +SimpleCounterHi... DEBUG input handles: 0 +SimpleCounterHi... DEBUG output handles: 0 +SimpleCounterHi... DEBUG Data Deps for SimpleCounterHistos +EventLoopMgr WARNING Unable to locate service "EventSelector" +EventLoopMgr WARNING No events will be processed from external input. HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 HistogramDataSvc DEBUG Service base class initialized successfully RootHistSvc INFO Writing ROOT histograms to: histo-c2.root HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Added stream file:../data/input.hbook as InFile -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -SimpleHistos DEBUG input handles: 0 -SimpleHistos DEBUG output handles: 0 -SimpleHistos DEBUG Data Deps for SimpleHistos -EventLoopMgr WARNING Unable to locate service "EventSelector" -EventLoopMgr WARNING No events will be processed from external input. ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! +SimpleCounterHi...SUCCESS Filling Histograms...... Please be patient ! +SimpleCounterHi... INFO Number of counters : 1 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "calls" | 50000 | ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.97244 | 0.91365 | 1.4781 | 2.1471 | - | 102 | "Breit" | 50000 | -0.0047661 | 1.1982 | -0.00237 | 3.5536 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | - | AutoID time test | "AutoID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | - | poisson | "Poisson" | 50000 | 1.8072 | 1.1794 | 0.33256 | -0.76904 | - | subdir1/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | - | subdir2/bino | "Binominal" | 50000 | 1.9077 | 1.1167 | 0.25326 | -0.67131 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.010746 | 0.99822 | -0.0062505 | 0.03783 | - | varBinning/x | "1D Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0.010336 | -1.3177 | -SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 - ID=Exponential V Flat "Exponential V Flat" Ents/All=49827/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=0.96736/0.90536 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 - ID=binVpois "Binom V poisson" Ents/All=49936/50000<X>/sX=1.8068/1.1798,<Y>/sY=1.9088/1.1168 - ID=expoVpois "Expo V poisson" Ents/All=49987/50000<X>/sX=1.8075/1.1796,<Y>/sY=0.97291/0.91449 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 -SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.011037/0.99886,<Y>/sY=0.97148/0.91262,<Z>/sZ=-0.0036933/1.1981 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=-0.0020678/2.8827,<Y>/sY=-0.0045774/1.0038,<Z>/sZ=0.96736/0.90536 -SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.010746 | 0.99822 | 2.2178 | 83.641 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.0066482 | 5.7661 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24761 | 0.017698 | 5.7622 | 0.010483 | -1.2479 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25239 | -0.030533 | 5.7699 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25239 | -0.030533 | 5.7699 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 50000 | -0.0016591 | 2.8821 | 0 | -3 | -SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.010929/0.99846,<Y>/sY=0.97244/0.91365 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=-0.0016591/2.8821,<Y>/sY=-0.0044761/1.0035 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DForcedAlphaID INFO Time User : Tot= 40 [ms] Ave/Min/Max= 0.0008(+- 0.0894)/ 0/ 10 [ms] #=49999 -1DOldStyle INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -1DAutoID INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -1DForcedNumericID INFO Time User : Tot= 50 [ms] Ave/Min/Max= 0.001(+- 0.1)/ 0/ 10 [ms] #=49999 -ChronoStatSvc INFO Time User : Tot= 1.06 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully +# setting LC_ALL to "C" diff --git a/GaudiExamples/tests/qmtest/refs/config2/Histograms_wg.ref b/GaudiExamples/tests/qmtest/refs/config2/Histograms_wg.ref index 08be8f1522f870f0b00ae6f6af85741b153ae954..a8bd4d4d41184a09378197a94b17dccc7d6edad3 100644 --- a/GaudiExamples/tests/qmtest/refs/config2/Histograms_wg.ref +++ b/GaudiExamples/tests/qmtest/refs/config2/Histograms_wg.ref @@ -1,196 +1,32 @@ # setting LC_ALL to "C" -# --> Including file '/builds/gaudi/Gaudi/GaudiExamples/options/Histograms_with_global.py' -# <-- End of file '/builds/gaudi/Gaudi/GaudiExamples/options/Histograms_with_global.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms_with_global.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiExamples/options/Histograms_with_global.py' ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:16:46 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Thu Apr 20 15:11:54 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully -SimpleHistos DEBUG Property update for OutputLevel : new value = 2 -SimpleHistos DEBUG Initialize base class GaudiCommon<Algorithm> -SimpleHistos DEBUG could not locate CounterSummarySvc, no counter summary will be made -SimpleHistos DEBUG List of ALL properties of GaudiHistoAlgorithm/SimpleHistos #properties = 43 -SimpleHistos DEBUG Property ['Name': Value] = 'AutoStringIDPurgeMap':{ '/' : '=SLASH=' } -SimpleHistos DEBUG Property ['Name': Value] = 'UseSequencialNumericAutoIDs':False -SimpleHistos DEBUG Property ['Name': Value] = 'HeaderFor1DHistoTable':'| Title | # | Mean | RMS | Skewness | Kurtosis |' -SimpleHistos DEBUG Property ['Name': Value] = 'ShortFormatFor1DHistoTable':' | %1$-25.25s %2%' -SimpleHistos DEBUG Property ['Name': Value] = 'FormatFor1DHistoTable':'| %2$-45.45s | %3$=7d |%8$11.5g | %10$-11.5g|%12$11.5g |%14$11.5g |' -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorHistograms':True -SimpleHistos DEBUG Property ['Name': Value] = 'FullDetail':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoDir':'SimpleHistos' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoTopDir':'' -SimpleHistos DEBUG Property ['Name': Value] = 'HistoOffSet':0 -SimpleHistos DEBUG Property ['Name': Value] = 'HistoSplitDir':False -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCheckForNaN':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoCountersPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True -SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' -SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True -SimpleHistos DEBUG Property ['Name': Value] = 'RootInTES':'' -SimpleHistos DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -SimpleHistos DEBUG Property ['Name': Value] = 'Blocking':False -SimpleHistos DEBUG Property ['Name': Value] = 'NeededResources':[ ] -SimpleHistos DEBUG Property ['Name': Value] = 'Cardinality':1 -SimpleHistos DEBUG Property ['Name': Value] = 'RegisterForContextService':True -SimpleHistos DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -SimpleHistos DEBUG Property ['Name': Value] = 'Timeline':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStop':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditStart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditFinalize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditExecute':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditRestart':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditReinitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditInitialize':False -SimpleHistos DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -SimpleHistos DEBUG Property ['Name': Value] = 'ErrorMax':1 -SimpleHistos DEBUG Property ['Name': Value] = 'Enable':True -SimpleHistos DEBUG Property ['Name': Value] = 'OutputLevel':2 -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -SimpleHistos DEBUG Property ['Name': Value] = 'ExtraInputs':[] -HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 -HistogramDataSvc DEBUG Service base class initialized successfully -RootHistSvc INFO Writing ROOT histograms to: histo-c2g.root -HistogramPersis... INFO Added successfully Conversion service:RootHistSvc -HistogramDataSvc INFO Added stream file:../data/input.hbook as InFile -SimpleHistos DEBUG GaudiHistoAlgorithm:: The histogram path is set to be 'SimpleHistos' -SimpleHistos DEBUG input handles: 0 -SimpleHistos DEBUG output handles: 0 -SimpleHistos DEBUG Data Deps for SimpleHistos SimpleCounterHi... DEBUG Property update for OutputLevel : new value = 2 SimpleCounterHi... DEBUG input handles: 0 SimpleCounterHi... DEBUG output handles: 0 SimpleCounterHi... DEBUG Data Deps for SimpleCounterHistos EventLoopMgr WARNING Unable to locate service "EventSelector" EventLoopMgr WARNING No events will be processed from external input. +HistogramDataSvc DEBUG Property update for OutputLevel : new value = 2 +HistogramDataSvc DEBUG Service base class initialized successfully +RootHistSvc INFO Writing ROOT histograms to: histo-c2g.root +HistogramPersis... INFO Added successfully Conversion service:RootHistSvc ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -SimpleHistos DEBUG Monitoring histogram 'Gaussian mean=0, sigma=1' desc = 'Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Booked 1D Histogram : ID='Gaussian mean=0, sigma=1' Path=SimpleHistos Title='Gaussian mean=0, sigma=1' -SimpleHistos DEBUG Monitoring histogram '101' desc = 'Exponential' -SimpleHistos DEBUG Booked 1D Histogram : ID='101' Path=SimpleHistos Title='Exponential' -SimpleHistos DEBUG Monitoring histogram '102' desc = 'Breit' -SimpleHistos DEBUG Booked 1D Histogram : ID='102' Path=SimpleHistos Title='Breit' -SimpleHistos DEBUG Monitoring histogram 'poisson' desc = 'Poisson' -SimpleHistos DEBUG Booked 1D Histogram : ID='poisson' Path=SimpleHistos Title='Poisson' -SimpleHistos DEBUG Monitoring histogram 'subdir1/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir1/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'subdir2/bino' desc = 'Binominal' -SimpleHistos DEBUG Booked 1D Histogram : ID='subdir2/bino' Path=SimpleHistos Title='Binominal' -SimpleHistos DEBUG Monitoring histogram 'Gaussian V Flat' desc = 'Gaussian V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Gaussian V Flat' Path=SimpleHistos Title='Gaussian V Flat' -SimpleHistos DEBUG Monitoring histogram 'Exponential V Flat' desc = 'Exponential V Flat' -SimpleHistos DEBUG Booked 2D Histogram : ID='Exponential V Flat' Path=SimpleHistos Title='Exponential V Flat' -SimpleHistos DEBUG Monitoring histogram 'binVpois' desc = 'Binom V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='binVpois' Path=SimpleHistos Title='Binom V poisson' -SimpleHistos DEBUG Monitoring histogram 'expoVpois' desc = 'Expo V poisson' -SimpleHistos DEBUG Booked 2D Histogram : ID='expoVpois' Path=SimpleHistos Title='Expo V poisson' -SimpleHistos DEBUG Monitoring histogram '3D plot AutoID' desc = '3D plot AutoID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3D plot AutoID' Path=SimpleHistos Title='3D plot AutoID' -SimpleHistos DEBUG Monitoring histogram '3d' desc = '3D plot ForcedID' -SimpleHistos DEBUG Booked 3D Histogram : ID='3d' Path=SimpleHistos Title='3D plot ForcedID' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf' desc = 'Expo V Gauss 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf' Path=SimpleHistos Title='Expo V Gauss 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Expo V Gauss 1DProf s' desc = 'Expo V Gauss 1DProf s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Expo V Gauss 1DProf s' Path=SimpleHistos Title='Expo V Gauss 1DProf s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf' desc = 'Gauss V Flat 1DProf' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf' Path=SimpleHistos Title='Gauss V Flat 1DProf' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf S' desc = 'Gauss V Flat 1DProf S' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf S' Path=SimpleHistos Title='Gauss V Flat 1DProf S' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I' desc = 'Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-I s' desc = 'Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-I s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-I s' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II' desc = 'Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II' -SimpleHistos DEBUG Monitoring histogram 'Gauss V Flat 1DProf, with limits-II s' desc = 'Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='Gauss V Flat 1DProf, with limits-II s' Path=SimpleHistos Title='Gauss V Flat 1DProf, with limits-II s' -SimpleHistos DEBUG Monitoring histogram '2dprof' desc = '2D profile1' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='2dprof' Path=SimpleHistos Title='2D profile1' -SimpleHistos DEBUG Monitoring histogram '321' desc = '2D profile2' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='321' Path=SimpleHistos Title='2D profile2' -SimpleHistos DEBUG Monitoring histogram 'varBinning/x' desc = '1D Variable Binning' -SimpleHistos DEBUG Booked 1D Histogram : ID='varBinning/x' Path=SimpleHistos Title='1D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/y' desc = '2D Variable Binning' -SimpleHistos DEBUG Booked 2D Histogram : ID='varBinning/y' Path=SimpleHistos Title='2D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/z' desc = '3D Variable Binning' -SimpleHistos DEBUG Booked 3D Histogram : ID='varBinning/z' Path=SimpleHistos Title='3D Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/a' desc = '1D Profile Variable Binning' -SimpleHistos DEBUG Booked 1D Profile Histogram : ID='varBinning/a' Path=SimpleHistos Title='1D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'varBinning/b' desc = '2D Profile Variable Binning' -SimpleHistos DEBUG Booked 2D Profile Histogram : ID='varBinning/b' Path=SimpleHistos Title='2D Profile Variable Binning' -SimpleHistos DEBUG Monitoring histogram 'AutoID time test' desc = 'AutoID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='AutoID time test' Path=SimpleHistos Title='AutoID time test' -SimpleHistos DEBUG Monitoring histogram '1111' desc = 'Forced Numeric ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='1111' Path=SimpleHistos Title='Forced Numeric ID time test' -SimpleHistos DEBUG Monitoring histogram 'test1' desc = 'Forced Alpha ID time test' -SimpleHistos DEBUG Booked 1D Histogram : ID='test1' Path=SimpleHistos Title='Forced Alpha ID time test' -SimpleHistos INFO GaudiHistoAlgorithm:: Filling Histograms...... Please be patient ! SimpleCounterHi...SUCCESS Filling Histograms...... Please be patient ! SimpleCounterHi... INFO Number of counters : 1 | Counter | # | sum | mean/eff^* | rms/err^* | min | max | | "calls" | 50000 | ApplicationMgr INFO Application Manager Stopped successfully -SimpleHistos SUCCESS Booked 30 Histogram(s) : 1D=10 2D=5 3D=3 1DProf=9 2DProf=3 -SimpleHistos SUCCESS 1D histograms in directory "SimpleHistos" : 10 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | 101 | "Exponential" | 50000 | 0.97206 | 0.91845 | 1.4999 | 2.249 | - | 102 | "Breit" | 50000 | 0.0025008 | 1.2092 | 0.032604 | 3.5685 | - | 1111 | "Forced Numeric ID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | AutoID time test | "AutoID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | Gaussian mean=0, sigma=1 | "Gaussian mean=0, sigma=1" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | poisson | "Poisson" | 50000 | 1.8025 | 1.1757 | 0.33387 | -0.75618 | - | subdir1/bino | "Binominal" | 50000 | 1.9002 | 1.1114 | 0.25988 | -0.66567 | - | subdir2/bino | "Binominal" | 50000 | 1.9002 | 1.1114 | 0.25988 | -0.66567 | - | test1 | "Forced Alpha ID time test" | 50000 | -0.0036024 | 1.003 | -0.0033262 | 0.033316 | - | varBinning/x | "1D Variable Binning" | 50000 | 0.011548 | 2.8753 | 0.0050588 | -1.3052 | -SimpleHistos SUCCESS 2D histograms in directory "SimpleHistos" : 5 - ID=Exponential V Flat "Exponential V Flat" Ents/All=49840/50000<X>/sX=0.010914/2.876,<Y>/sY=0.97261/0.91767 - ID=Gaussian V Flat "Gaussian V Flat" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 - ID=binVpois "Binom V poisson" Ents/All=49934/50000<X>/sX=1.8032/1.1748,<Y>/sY=1.9012/1.1102 - ID=expoVpois "Expo V poisson" Ents/All=49986/50000<X>/sX=1.8019/1.1756,<Y>/sY=0.97127/0.91738 - ID=varBinning/y "2D Variable Binning" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 -SimpleHistos SUCCESS 3D histograms in directory "SimpleHistos" : 3 - ID=3D plot AutoID "3D plot AutoID" Ents/All=50000/50000<X>/sX=-0.0067064/1.0028,<Y>/sY=0.97257/0.91859,<Z>/sZ=0.0033096/1.2098 - ID=3d "3D plot ForcedID" Ents/All=50000/50000<X>/sX=-0.0067064/1.0028,<Y>/sY=0.97257/0.91859,<Z>/sZ=0.0033096/1.2098 - ID=varBinning/z "3D Variable Binning" Ents/All=50000/50000<X>/sX=0.010914/2.876,<Y>/sY=-0.012318/1.0025,<Z>/sZ=0.97261/0.91767 -SimpleHistos SUCCESS 1D profile histograms in directory "SimpleHistos" : 9 - | ID | Title | # | Mean | RMS | Skewness | Kurtosis | - | Expo V Gauss 1DProf | "Expo V Gauss 1DProf" | 50000 | -0.0036024 | 1.003 | -2.9478 | 62.513 | - | Expo V Gauss 1DProf s | "Expo V Gauss 1DProf s" | 50000 | -0.0036024 | 1.003 | -2.9478 | 62.513 | - | Gauss V Flat 1DProf | "Gauss V Flat 1DProf" | 50000 | -0.027529 | 5.7553 | 0 | -3 | - | Gauss V Flat 1DProf S | "Gauss V Flat 1DProf S" | 50000 | -0.027529 | 5.7553 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I" | 24985 | -0.022904 | 5.7597 | 0.027443 | -1.2343 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-I s" | 24985 | -0.022904 | 5.7597 | 0.027443 | -1.2343 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II" | 25015 | -0.032149 | 5.7509 | 0 | -3 | - | Gauss V Flat 1DProf, with | "Gauss V Flat 1DProf, with limits-II s" | 25015 | -0.032149 | 5.7509 | 0 | -3 | - | varBinning/a | "1D Profile Variable Binning" | 50000 | 0.011548 | 2.8753 | 0 | -3 | -SimpleHistos SUCCESS 2D profile histograms in directory "SimpleHistos" : 3 - ID=2dprof "2D profile1" Ents/All=50000/50000<X>/sX=-0.0045089/1.0031,<Y>/sY=0.97206/0.91845 - ID=321 "2D profile2" Ents/All=50000/50000<X>/sX=-0.0045089/1.0031,<Y>/sY=0.97206/0.91845 - ID=varBinning/b "2D Profile Variable Binning" Ents/All=50000/50000<X>/sX=0.011548/2.8753,<Y>/sY=-0.011706/1.0024 -SimpleHistos DEBUG Finalize base class GaudiAlgorithm -SimpleHistos DEBUG Tools to release : -SimpleHistos DEBUG Services to release : EventLoopMgr INFO Histograms converted successfully according to request. -*****Chrono***** INFO **************************************************************************************************** -*****Chrono***** INFO The Final CPU consumption ( Chrono ) Table (ordered) -*****Chrono***** INFO **************************************************************************************************** -1DAutoID INFO Time User : Tot= 80 [ms] Ave/Min/Max= 0.0016(+- 0.126)/ 0/ 10 [ms] #=49999 -1DForcedAlphaID INFO Time User : Tot= 120 [ms] Ave/Min/Max= 0.0024(+- 0.155)/ 0/ 10 [ms] #=49999 -1DForcedNumericID INFO Time User : Tot= 110 [ms] Ave/Min/Max= 0.0022(+- 0.148)/ 0/ 10 [ms] #=49999 -1DOldStyle INFO Time User : Tot= 130 [ms] Ave/Min/Max= 0.0026(+- 0.161)/ 0/ 10 [ms] #=49999 -ChronoStatSvc INFO Time User : Tot= 3.26 [s] #= 1 -*****Chrono***** INFO **************************************************************************************************** -ChronoStatSvc.f... INFO Service finalized successfully ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref b/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref index 8ccc7d21ce8e85e9bf221a2fcdb36a0b657f1feb..4b241fe3264a1265f10e44634a3972833fe0f0aa 100644 --- a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref +++ b/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref @@ -1,3 +1,4 @@ +# setting LC_ALL to "C" # --> Including file '/workspace/Gaudi/GaudiExamples/options/ROOT_IO/Read.py' # <-- End of file '/workspace/Gaudi/GaudiExamples/options/ROOT_IO/Read.py' # --> Including file '/run/user/57385/tmppngpuzjj.py' @@ -13,8 +14,8 @@ 'SvcOptMapping': ['Gaudi::MultiFileCatalog/FileCatalog', 'Gaudi::IODataManager/IODataManager', 'Gaudi::RootCnvSvc/RootCnvSvc'], - 'TopAlg': ['GaudiSequencer/EventAlgs', - 'GaudiSequencer/FSRAlgs']}, + 'TopAlg': ['Gaudi::Sequencer/EventAlgs', + 'Gaudi::Sequencer/FSRAlgs']}, 'EventAlgs': {'Members': ['ReadAlg/ReadAlg'], 'VetoObjects': ['FSR']}, 'EventPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'EventSelector': {'FirstEvent': 1, @@ -27,8 +28,7 @@ 'FileRecordPersistencySvc': {'CnvServices': ['Gaudi::RootCnvSvc/RootCnvSvc']}, 'ReadAlg': {'IncidentName': 'NEW_FILE_RECORD', 'OutputLevel': 1}, 'ReadTES': {'Locations': ['FSR']}, - 'RootCnvSvc': {'OutputLevel': 3}, - 'ToolSvc.SequencerTimerTool': {'OutputLevel': 4}} + 'RootCnvSvc': {'OutputLevel': 3}} ApplicationMgr SUCCESS ==================================================================================================================================== Welcome to ApplicationMgr (GaudiCoreSvc v36r7) @@ -36,9 +36,6 @@ ApplicationMgr SUCCESS ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully EventAlgs INFO Member list: ReadAlg -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> ReadAlg DEBUG Property update for OutputLevel : new value = 1 ReadAlg VERBOSE ServiceLocatorHelper::service: found service EventDataSvc ReadAlg VERBOSE ServiceLocatorHelper::service: found service TimelineSvc diff --git a/GaudiPython/python/GaudiAlgs.py b/GaudiFunctional/CMakeLists.txt similarity index 76% rename from GaudiPython/python/GaudiAlgs.py rename to GaudiFunctional/CMakeLists.txt index fd567acce3bb078cf92b851b1999c3f47dd01c17..60a5880015c45e20450b838ad5bfb07369663c65 100644 --- a/GaudiPython/python/GaudiAlgs.py +++ b/GaudiFunctional/CMakeLists.txt @@ -8,11 +8,12 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -""" GaudiAlgs python module - This module is deprecated use 'GaudiPython.GaudiAlgs' instead -""" -from GaudiPython.GaudiAlgs import * # noqa: F401 F403 +#[=======================================================================[.rst: +GaudiFunctional +--------------- +#]=======================================================================] -from GaudiPython import deprecation - -deprecation("Use 'GaudiPython.GaudiAlgs' module instead of 'GaudiAlgs'") +gaudi_add_header_only_library(Functional + LINK + Gaudi::GaudiKernel +) diff --git a/GaudiFunctional/include/Gaudi/Functional/Consumer.h b/GaudiFunctional/include/Gaudi/Functional/Consumer.h new file mode 100644 index 0000000000000000000000000000000000000000..c8d7541b9f0eef1faa56c193d92d8a941430d5d1 --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/Consumer.h @@ -0,0 +1,70 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <utility> + +namespace Gaudi::Functional { + + namespace details { + + template <typename Signature, typename Traits_, bool isLegacy> + struct Consumer; + + template <typename... In, typename Traits_> + struct Consumer<void( const In&... ), Traits_, true> + : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes are NOT allowed to implement execute ... + StatusCode execute() override final { + try { + filter_evtcontext_t<In...>::apply( *this, this->m_inputs ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // ... instead, they must implement the following operator + virtual void operator()( const In&... ) const = 0; + }; + + template <typename... In, typename Traits_> + struct Consumer<void( const In&... ), Traits_, false> + : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes are NOT allowed to implement execute ... + StatusCode execute( const EventContext& ctx ) const override final { + try { + filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // ... instead, they must implement the following operator + virtual void operator()( const In&... ) const = 0; + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using Consumer = details::Consumer<Signature, Traits_, details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h b/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h new file mode 100644 index 0000000000000000000000000000000000000000..56e148638270048527996ee0b2bd6e1ea5dccbae --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/FilterPredicate.h @@ -0,0 +1,71 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <type_traits> +#include <utility> + +namespace Gaudi::Functional { + + namespace details { + + template <typename T, typename Traits_, bool isLegacy> + struct FilterPredicate; + + template <typename... In, typename Traits_> + struct FilterPredicate<bool( const In&... ), Traits_, true> + : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes are NOT allowed to implement execute ... + StatusCode execute() override final { + try { + return filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ? FilterDecision::PASSED + : FilterDecision::FAILED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // ... instead, they must implement the following operator + virtual bool operator()( const In&... ) const = 0; + }; + + template <typename... In, typename Traits_> + struct FilterPredicate<bool( const In&... ), Traits_, false> + : DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes are NOT allowed to implement execute ... + StatusCode execute( const EventContext& ctx ) const override final { + try { + return filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ? FilterDecision::PASSED + : FilterDecision::FAILED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // ... instead, they must implement the following operator + virtual bool operator()( const In&... ) const = 0; + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using FilterPredicate = details::FilterPredicate<Signature, Traits_, details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/MergingTransformer.h b/GaudiFunctional/include/Gaudi/Functional/MergingTransformer.h new file mode 100644 index 0000000000000000000000000000000000000000..b3bc8f7225a080b110db6d89b13cdcdded66f4dd --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/MergingTransformer.h @@ -0,0 +1,420 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <Gaudi/Algorithm.h> +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <functional> +#include <string> +#include <vector> + +namespace Gaudi::Functional { + + using details::vector_of_const_; + + namespace details { + template <typename F, size_t... Is> + auto for_impl( F&& f, std::index_sequence<Is...> ) { + if constexpr ( std::disjunction_v<std::is_void<std::invoke_result_t<F, std::integral_constant<int, Is>>>...> ) { + ( std::invoke( f, std::integral_constant<int, Is>{} ), ... ); + } else { + return std::array{ std::invoke( f, std::integral_constant<int, Is>{} )... }; + } + } + + template <auto N, typename F> + decltype( auto ) for_( F&& f ) { + return for_impl( std::forward<F>( f ), std::make_index_sequence<N>{} ); + } + + template <typename Sig> + struct is_void_fun : std::false_type {}; + template <typename... Args> + struct is_void_fun<void( Args... )> : std::true_type {}; + template <typename Sig> + inline constexpr bool is_void_fun_v = is_void_fun<Sig>::value; + + template <typename Signature, typename Traits_, bool isLegacy> + struct MergingTransformer; + + ////// Many of the same -> 1 or 0 + template <typename Out, typename In, typename Traits_> + struct MergingTransformer<Out( const vector_of_const_<In>& ), Traits_, true> + : DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_> { + private: + using base_class = DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_>; + + public: + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + + MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs ) + : base_class( std::move( name ), locator ) + , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), + [this]( Gaudi::Details::PropertyBase& ) { + this->m_inputs = + make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); + if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set + // optional flag... so do it + // explicitly here... + std::for_each( this->m_inputs.begin(), this->m_inputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } { + static_assert( std::is_void_v<Out> ); + } + + MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, const KeyValue& output ) + : base_class( std::move( name ), locator, output ) + , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), + [this]( Gaudi::Details::PropertyBase& ) { + this->m_inputs = + make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); + if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set + // optional flag... so do it + // explicitly here... + std::for_each( this->m_inputs.begin(), this->m_inputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } { + static_assert( !std::is_void_v<Out> ); + } + + // accessor to input Locations + const std::string& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } + unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } + + // derived classes can NOT implement execute + StatusCode execute() override final { + vector_of_const_<In> ins; + ins.reserve( m_inputs.size() ); + std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), details2::get_from_handle<In>{} ); + try { + if constexpr ( std::is_void_v<Out> ) { + std::as_const ( *this )( std::as_const( ins ) ); + } else { + put( std::get<0>( this->m_outputs ), std::as_const( *this )( std::as_const( ins ) ) ); + } + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + virtual Out operator()( const vector_of_const_<In>& inputs ) const = 0; + + private: + // if In is a pointer, it signals optional (as opposed to mandatory) input + template <typename T> + using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; + std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... + Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... + // TODO/FIXME: replace vector of DataObjID property + call-back with a + // vector<handle> property ... as soon as declareProperty can deal with that. + }; + + template <typename Out, typename... Ins, typename Traits_> + struct MergingTransformer<Out( const vector_of_const_<Ins>&... ), Traits_, false> + : DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_> { + + using base_class = DataHandleMixin<std::tuple<Out>, std::tuple<>, Traits_>; + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + using InKeys = details::RepeatValues_<KeyValues, sizeof...( Ins )>; + + private: + auto construct_properties( InKeys inputs ) { + return details::for_<sizeof...( Ins )>( [&]( auto I ) { + constexpr auto i = decltype( I )::value; + auto& ins = std::get<i>( inputs ); + return Gaudi::Property<std::vector<DataObjID>>{ + this, ins.first, details::to_DataObjID( ins.second ), + [this]( auto&& ) { + auto& handles = std::get<i>( this->m_inputs ); + auto& ins = std::get<i>( this->m_inputLocations ); + using Handles = typename std::decay_t<decltype( handles )>; + handles = make_vector_of_handles<Handles>( this, ins ); + if ( std::is_pointer_v<typename Handles::value_type> ) { // handle constructor does not (yet) allow to + // set + // optional flag... so do it + // explicitly here... + std::for_each( handles.begin(), handles.end(), []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } }; + } ); + } + + public: + MergingTransformer( std::string name, ISvcLocator* locator, InKeys inputs ) + : base_class( std::move( name ), locator ), m_inputLocations{ construct_properties( inputs ) } { + static_assert( std::is_void_v<Out> ); + } + + MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs ) + : MergingTransformer{ name, locator, InKeys{ inputs } } { + static_assert( sizeof...( Ins ) == 1 ); + } + + MergingTransformer( std::string name, ISvcLocator* locator, InKeys inputs, const KeyValue& output ) + : base_class( std::move( name ), locator, output ), m_inputLocations{ construct_properties( inputs ) } { + static_assert( !std::is_void_v<Out> ); + } + + MergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, const KeyValue& output ) + : MergingTransformer{ name, locator, InKeys{ inputs }, output } { + static_assert( sizeof...( Ins ) == 1 ); + } + + // accessor to input Locations + const std::string& inputLocation( unsigned int i, unsigned int j ) const { + return m_inputLocations.at( i ).value().at( j ).key(); + } + const std::string& inputLocation( unsigned int i ) const { + static_assert( sizeof...( Ins ) == 1 ); + return inputLocation( 0, i ); + } + unsigned int inputLocationSize( int i = 0 ) const { return m_inputLocations.at( i ).value().size(); } + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ) const override final { + std::tuple<vector_of_const_<Ins>...> inss; + details::for_<sizeof...( Ins )>( [&]( auto I ) { + constexpr size_t i = decltype( I )::value; + auto& ins = std::get<i>( inss ); + auto& handles = std::get<i>( m_inputs ); + ins.reserve( handles.size() ); + std::transform( handles.begin(), handles.end(), std::back_inserter( ins ), + details::details2::get_from_handle<typename std::decay_t<decltype( ins )>::value_type>{} ); + } ); + try { + if constexpr ( std::is_void_v<Out> ) { + std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, inss ); + } else { + put( std::get<0>( this->m_outputs ), + std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, + inss ) ); + } + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + virtual Out operator()( const vector_of_const_<Ins>&... inputs ) const = 0; + + private: + // if In is a pointer, it signals optional (as opposed to mandatory) input + template <typename T> + using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; + std::tuple<std::vector<InputHandle_t<Ins>>...> m_inputs; // and make the handles properties instead... + std::array<Gaudi::Property<std::vector<DataObjID>>, sizeof...( Ins )> m_inputLocations; // TODO/FIXME: remove + // this duplication... + // TODO/FIXME: replace vector of string property + call-back with a + // vector<handle> property ... as soon as declareProperty can deal with that. + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using MergingTransformer = details::MergingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; + + // more meaningful alias for cases where the return type in Signature is void + template <typename Signature, typename Traits_ = Traits::useDefaults, + typename = std::enable_if_t<details::is_void_fun_v<Signature>>> + using MergingConsumer = details::MergingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; + + // M vectors of the same -> N + template <typename Signature, typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>> + struct MergingMultiTransformer; + + template <typename... Outs, typename... Ins, typename Traits_> + struct MergingMultiTransformer<std::tuple<Outs...>( vector_of_const_<Ins> const&... ), Traits_> + : details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_> { + + private: + using base_class = details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_>; + + public: + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + using InKeys = details::RepeatValues_<KeyValues, sizeof...( Ins )>; + using OutKeys = details::RepeatValues_<KeyValue, sizeof...( Outs )>; + static constexpr size_t n_args = sizeof...( Ins ); + + MergingMultiTransformer( std::string const& name, ISvcLocator* pSvcLocator, InKeys inputs, OutKeys outputs ) + : base_class{ name, pSvcLocator, std::move( outputs ) } + , m_inputLocations{ details::for_<n_args>( [&]( auto I ) { + constexpr auto i = decltype( I )::value; + auto& ins = std::get<i>( inputs ); + return Gaudi::Property<std::vector<DataObjID>>{ + this, ins.first, details::to_DataObjID( ins.second ), + [this]( auto&& ) { + auto& handles = std::get<i>( this->m_inputs ); + auto& ins = std::get<i>( this->m_inputLocations ); + using In = typename std::decay_t<decltype( handles )>::value_type; + handles = details::make_vector_of_handles<std::decay_t<decltype( handles )>>( this, ins ); + if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set + // optional flag... so do it + // explicitly here... + std::for_each( handles.begin(), handles.end(), []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } }; + } ) } {} + + MergingMultiTransformer( std::string const& name, ISvcLocator* pSvcLocator, KeyValues inputs, OutKeys outputs ) + : MergingMultiTransformer{ name, pSvcLocator, InKeys{ std::move( inputs ) }, std::move( outputs ) } { + static_assert( sizeof...( Ins ) == 1 ); + } + + // accessor to input Locations + std::string const& inputLocation( unsigned int i, unsigned int j ) const { + return m_inputLocations.at( i ).value().at( j ).key(); + } + std::string const& inputLocation( unsigned int j ) const { + static_assert( n_args == 1 ); + return inputLocation( 0, j ); + } + unsigned int inputLocationSize( int i = 0 ) const { return m_inputLocations.at( i ).value().size(); } + + // derived classes can NOT implement execute + StatusCode execute( EventContext const& ) const override final { + std::tuple<vector_of_const_<Ins>...> inss; + details::for_<sizeof...( Ins )>( [&]( auto I ) { + constexpr size_t i = decltype( I )::value; + auto& ins = std::get<i>( inss ); + auto& handles = std::get<i>( m_inputs ); + ins.reserve( handles.size() ); + std::transform( handles.begin(), handles.end(), std::back_inserter( ins ), + details::details2::get_from_handle<typename std::decay_t<decltype( ins )>::value_type>{} ); + } ); + try { + std::apply( + [&]( auto&... outhandle ) { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + std::apply( + [&outhandle...]( auto&&... data ) { + ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... ); + }, + std::apply( [&]( auto&&... ins ) { return std::as_const( *this )( std::as_const( ins )... ); }, + inss ) ); + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + }, + this->m_outputs ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + virtual std::tuple<Outs...> operator()( const vector_of_const_<Ins>&... inputs ) const = 0; + + private: + // 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::tuple<std::vector<InputHandle_t<Ins>>...> m_inputs; // and make the handles properties instead... + std::array<Gaudi::Property<std::vector<DataObjID>>, sizeof...( Ins )> m_inputLocations; // TODO/FIXME: remove this + // duplication... + // TODO/FIXME: replace vector of string property + call-back with a + // vector<handle> property ... as soon as declareProperty can deal with that. + }; + + // Many of the same -> N with filter functionality + template <typename Signature, typename Traits_ = Traits::BaseClass_t<Gaudi::Algorithm>> + struct MergingMultiTransformerFilter; + + template <typename... Outs, typename In, typename Traits_> + struct MergingMultiTransformerFilter<std::tuple<Outs...>( vector_of_const_<In> const& ), Traits_> + : details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_> { + + private: + using base_class = details::DataHandleMixin<std::tuple<Outs...>, std::tuple<>, Traits_>; + + public: + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + using OutKeys = details::RepeatValues_<KeyValue, sizeof...( Outs )>; + + MergingMultiTransformerFilter( std::string const& name, ISvcLocator* locator, KeyValues const& inputs, + OutKeys const& outputs ); + + // accessor to input Locations + std::string const& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } + unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } + + // derived classes can NOT implement execute + StatusCode execute( EventContext const& ) const override final { + vector_of_const_<In> ins; + ins.reserve( m_inputs.size() ); + std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), + details::details2::get_from_handle<In>{} ); + try { + return std::apply( + [&]( auto&... outhandle ) { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + return std::apply( + [&outhandle...]( bool passed, auto&&... data ) { + ( details::put( outhandle, std::forward<decltype( data )>( data ) ), ... ); + return passed; + }, + ( *this )( std::as_const( ins ) ) ); + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + }, + this->m_outputs ) + ? FilterDecision::PASSED + : FilterDecision::FAILED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + virtual std::tuple<bool, Outs...> operator()( const vector_of_const_<In>& inputs ) const = 0; + + private: + // 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<InputHandle_t<In>> m_inputs; // and make the handles properties instead... + Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... + // TODO/FIXME: replace vector of string property + call-back with a + // vector<handle> property ... as soon as declareProperty can deal with that. + }; + + template <typename... Outs, typename In, typename Traits_> + MergingMultiTransformerFilter<std::tuple<Outs...>( const vector_of_const_<In>& ), + Traits_>::MergingMultiTransformerFilter( std::string const& name, + ISvcLocator* pSvcLocator, + KeyValues const& inputs, + OutKeys const& outputs ) + : base_class( name, pSvcLocator, outputs ) + , m_inputLocations{ + this, inputs.first, details::to_DataObjID( inputs.second ), + [this]( Gaudi::Details::PropertyBase& ) { + this->m_inputs = details::make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); + if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set + // optional flag... so do it + // explicitly here... + std::for_each( this->m_inputs.begin(), this->m_inputs.end(), []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } {} + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/Producer.h b/GaudiFunctional/include/Gaudi/Functional/Producer.h new file mode 100644 index 0000000000000000000000000000000000000000..f05ec7304acb1e984810a66e39093883e427176c --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/Producer.h @@ -0,0 +1,38 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "Transformer.h" +#include <utility> + +namespace Gaudi::Functional { + + namespace details { + + template <typename Signature, typename Traits_, bool isLegacy> + struct Producer; + + template <typename... Out, typename Traits_, bool legacy> + struct Producer<std::tuple<Out...>(), Traits_, legacy> : MultiTransformer<std::tuple<Out...>(), Traits_, legacy> { + using MultiTransformer<std::tuple<Out...>(), Traits_, legacy>::MultiTransformer; + }; + + template <typename Out, typename Traits_, bool legacy> + struct Producer<Out(), Traits_, legacy> : Transformer<Out(), Traits_, legacy> { + using Transformer<Out(), Traits_, legacy>::Transformer; + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using Producer = details::Producer<Signature, Traits_, details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/ScalarTransformer.h b/GaudiFunctional/include/Gaudi/Functional/ScalarTransformer.h new file mode 100644 index 0000000000000000000000000000000000000000..34b485f98e3484cffbbd4310ea2634ba852f885b --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/ScalarTransformer.h @@ -0,0 +1,90 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "Transformer.h" + +namespace Gaudi::Functional { + + // Scalar->Vector adapted N->1 algorithm + template <typename ScalarOp, typename TransformerSignature, typename Traits_ = Traits::useDefaults> + class ScalarTransformer; + template <typename ScalarOp, typename Out, typename... In, typename Traits_> + class ScalarTransformer<ScalarOp, Out( const In&... ), Traits_> : public Transformer<Out( const In&... ), Traits_> { + + /// Access the scalar operator + const ScalarOp& scalarOp() const { return static_cast<const ScalarOp&>( *this ); } + + public: + using Transformer<Out( const In&... ), Traits_>::Transformer; + + /// The main operator + Out operator()( const In&... in ) const override final { + const auto inrange = details::zip::range( in... ); + Out out; + out.reserve( inrange.size() ); + auto& scalar = scalarOp(); + for ( const auto&& tuple : inrange ) { + /// Call the scalar operator with the objects obtained from the given tuple as arguments + details::invoke_optionally( + [&out]( auto&& arg ) { details::insert( out, std::forward<decltype( arg )>( arg ) ); }, + std::apply( [&]( const auto&... i ) { return scalar( details::deref( i )... ); }, tuple ) ); + } + details::applyPostProcessing( scalar, out ); + return out; + } + }; + + // Scalar->Vector adapted N->M algorithm + template <typename ScalarOp, typename TransformerSignature, typename Traits_ = Traits::useDefaults> + class MultiScalarTransformer; + template <typename ScalarOp, typename... Out, typename... In, typename Traits_> + class MultiScalarTransformer<ScalarOp, std::tuple<Out...>( const In&... ), Traits_> + : public MultiTransformer<std::tuple<Out...>( const In&... ), Traits_> { + + /// Access the scalar operator + const ScalarOp& scalarOp() const { return static_cast<const ScalarOp&>( *this ); } + + public: + using MultiTransformer<std::tuple<Out...>( const In&... ), Traits_>::MultiTransformer; + + /// The main operator + std::tuple<Out...> operator()( const In&... in ) const override final { + const auto inrange = details::zip::range( in... ); + std::tuple<Out...> out; + std::apply( [sz = inrange.size()]( auto&&... o ) { ( o.reserve( sz ), ... ); }, out ); + auto& scalar = scalarOp(); + for ( const auto&& indata : inrange ) { + std::apply( + [&scalar, &indata]( auto&... out ) { + /// Call the scalar operator with the objects obtained from the given indata, + /// and invoke insert with it (unless the resulting type is an optional, + /// and the optional is not engaged) + details::invoke_optionally( + [&out...]( auto&& outdata ) { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + std::apply( + [&out...]( auto&&... outdata1 ) { + ( details::insert( out, std::forward<decltype( outdata1 )>( outdata1 ) ), ... ); + }, + std::forward<decltype( outdata )>( outdata ) ); + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + }, + std::apply( [&scalar]( const auto&... args ) { return scalar( details::deref( args )... ); }, + indata ) ); + }, + out ); + } + details::applyPostProcessing( scalar, out ); + return out; + } + }; +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/SplittingMergingTransformer.h b/GaudiFunctional/include/Gaudi/Functional/SplittingMergingTransformer.h new file mode 100644 index 0000000000000000000000000000000000000000..a19645375df1df6c7be3cb45dac1ac2cfc2333df --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/SplittingMergingTransformer.h @@ -0,0 +1,127 @@ +/*****************************************************************************\ +* (c) Copyright 2022-2023 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <functional> +#include <optional> +#include <string> +#include <vector> + +namespace Gaudi::Functional { + template <typename Container> + using vector_of_ = std::vector<Container>; + template <typename Container> + using vector_of_optional_ = std::vector<std::optional<Container>>; + using details::vector_of_const_; + + namespace details { + + template <typename Signature, typename Traits_, bool isLegacy> + class SplittingMergingTransformer; + + template <typename Out, typename In, typename Traits_> + class SplittingMergingTransformer<vector_of_<Out>( const vector_of_const_<In>& ), Traits_, false> + : public BaseClass_t<Traits_> { + using base_class = BaseClass_t<Traits_>; + static_assert( std::is_base_of_v<Algorithm, base_class>, "BaseClass must inherit from Algorithm" ); + + public: + using KeyValues = std::pair<std::string, std::vector<std::string>>; + + SplittingMergingTransformer( std::string name, ISvcLocator* locator, const KeyValues& inputs, + const KeyValues& outputs ) + : base_class( std::move( name ), locator ) + , m_inputLocations{ this, inputs.first, details::to_DataObjID( inputs.second ), + [this]( Gaudi::Details::PropertyBase& ) { + this->m_inputs = + make_vector_of_handles<decltype( this->m_inputs )>( this, m_inputLocations ); + if ( std::is_pointer_v<In> ) { // handle constructor does not (yet) allow to set + // optional flag... so do it + // explicitly here... + std::for_each( this->m_inputs.begin(), this->m_inputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } } + , m_outputLocations( + this, outputs.first, details::to_DataObjID( outputs.second ), + [this]( Gaudi::Details::PropertyBase& ) { + this->m_outputs = + details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); + if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to + // set optional flag... so + // do it explicitly here... + std::for_each( this->m_outputs.begin(), this->m_outputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} + + // accessor to output Locations + const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } + unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } + + // accessor to input Locations + const std::string& inputLocation( unsigned int n ) const { return m_inputLocations.value()[n].key(); } + unsigned int inputLocationSize() const { return m_inputLocations.value().size(); } + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ) const override final { + try { + vector_of_const_<In> ins; + ins.reserve( m_inputs.size() ); + std::transform( m_inputs.begin(), m_inputs.end(), std::back_inserter( ins ), + details2::get_from_handle<In>{} ); + // TODO:FIXME: how does operator() know the number and order of expected outputs? + auto out = ( *this )( std::as_const( ins ) ); + if ( out.size() != m_outputs.size() ) { + throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + + " containers, got " + std::to_string( out.size() ) + " instead", + this->name(), StatusCode::FAILURE ); + } + for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // TODO/FIXME: how does the callee know in which order to produce the outputs? + // (note: 'missing' items can be specified by making Out an std::optional<Out>, + // and only those entries which contain an Out are stored) + virtual vector_of_<Out> operator()( const vector_of_const_<In>& ) const = 0; + + private: + // if In is a pointer, it signals optional (as opposed to mandatory) input + template <typename T> + using InputHandle_t = InputHandle_t<Traits_, std::remove_pointer_t<T>>; + std::vector<InputHandle_t<In>> m_inputs; // and make the handles properties instead... + Gaudi::Property<std::vector<DataObjID>> m_inputLocations; // TODO/FIXME: remove this duplication... + // TODO/FIXME: replace vector of DataObjID property + call-back with a + // vector<handle> property ... as soon as declareProperty can deal with that. + template <typename T> + using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; + std::vector<OutputHandle<Out>> m_outputs; + Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the + // actual handles! + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using SplittingMergingTransformer = + details::SplittingMergingTransformer<Signature, Traits_, false>; // details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/SplittingTransformer.h b/GaudiFunctional/include/Gaudi/Functional/SplittingTransformer.h new file mode 100644 index 0000000000000000000000000000000000000000..715f184bc7292985bb9ee93ab8ae8e4c205cad48 --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/SplittingTransformer.h @@ -0,0 +1,173 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <functional> +#include <optional> +#include <string> +#include <vector> + +namespace Gaudi::Functional { + + template <typename Container> + using vector_of_ = std::vector<Container>; + template <typename Container> + using vector_of_optional_ = std::vector<std::optional<Container>>; + + namespace details { + + template <typename Signature, typename Traits_, bool isLegacy> + class SplittingTransformer; + + ////// N -> Many of the same one (value of Many not known at compile time, but known at configuration time) + template <typename Out, typename... In, typename Traits_> + class SplittingTransformer<vector_of_<Out>( const In&... ), Traits_, true> + : public details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using base_class = details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>; + + public: + constexpr static std::size_t N = base_class::N_in; + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + + SplittingTransformer( std::string name, ISvcLocator* locator, const RepeatValues_<KeyValue, N>& inputs, + const KeyValues& outputs ) + : base_class( std::move( name ), locator, inputs ) + , m_outputLocations( + this, outputs.first, details::to_DataObjID( outputs.second ), + [=]( Gaudi::Details::PropertyBase& ) { + this->m_outputs = + details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); + if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to + // set optional flag... so + // do it explicitly here... + std::for_each( this->m_outputs.begin(), this->m_outputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} + + SplittingTransformer( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValues& output ) + : SplittingTransformer( std::move( name ), locator, std::forward_as_tuple( input ), output ) { + static_assert( N == 1, "single input argument requires single input signature" ); + } + + // accessor to output Locations + const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } + unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } + + // derived classes can NOT implement execute + StatusCode execute() override final { + try { + // TODO:FIXME: how does operator() know the number and order of expected outputs? + auto out = details::filter_evtcontext_t<In...>::apply( *this, this->m_inputs ); + if ( out.size() != m_outputs.size() ) { + throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + + " containers, got " + std::to_string( out.size() ) + " instead", + this->name(), StatusCode::FAILURE ); + } + for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // TODO/FIXME: how does the callee know in which order to produce the outputs? + // (note: 'missing' items can be specified by making Out an std::optional<Out>, + // and only those entries which contain an Out are stored) + virtual vector_of_<Out> operator()( const In&... ) const = 0; + + private: + template <typename T> + using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; + std::vector<OutputHandle<Out>> m_outputs; + Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the + // actual handles! + }; + + template <typename Out, typename... In, typename Traits_> + class SplittingTransformer<vector_of_<Out>( const In&... ), Traits_, false> + : public details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_> { + using base_class = details::DataHandleMixin<std::tuple<>, filter_evtcontext<In...>, Traits_>; + + public: + constexpr static std::size_t N = base_class::N_in; + using KeyValue = typename base_class::KeyValue; + using KeyValues = typename base_class::KeyValues; + + SplittingTransformer( std::string name, ISvcLocator* locator, const RepeatValues_<KeyValue, N>& inputs, + const KeyValues& outputs ) + : base_class( std::move( name ), locator, inputs ) + , m_outputLocations( + this, outputs.first, details::to_DataObjID( outputs.second ), + [=]( Gaudi::Details::PropertyBase& ) { + this->m_outputs = + details::make_vector_of_handles<decltype( this->m_outputs )>( this, m_outputLocations ); + if constexpr ( details::is_optional_v<Out> ) { // handle constructor does not (yet) allow to + // set optional flag... so + // do it explicitly here... + std::for_each( this->m_outputs.begin(), this->m_outputs.end(), + []( auto& h ) { h.setOptional( true ); } ); + } + }, + Gaudi::Details::Property::ImmediatelyInvokeHandler{ true } ) {} + + SplittingTransformer( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValues& output ) + : SplittingTransformer( std::move( name ), locator, std::forward_as_tuple( input ), output ) { + static_assert( N == 1, "single input argument requires single input signature" ); + } + + // accessor to output Locations + const std::string& outputLocation( unsigned int n ) const { return m_outputLocations.value()[n].key(); } + unsigned int outputLocationSize() const { return m_outputLocations.value().size(); } + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ctx ) const override final { + try { + // TODO:FIXME: how does operator() know the number and order of expected outputs? + auto out = details::filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ); + if ( out.size() != m_outputs.size() ) { + throw GaudiException( "Error during transform: expected " + std::to_string( m_outputs.size() ) + + " containers, got " + std::to_string( out.size() ) + " instead", + this->name(), StatusCode::FAILURE ); + } + for ( unsigned i = 0; i != out.size(); ++i ) details::put( m_outputs[i], std::move( out[i] ) ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // TODO/FIXME: how does the callee know in which order to produce the outputs? + // (note: 'missing' items can be specified by making Out an std::optional<Out>, + // and only those entries which contain an Out are stored) + virtual vector_of_<Out> operator()( const In&... ) const = 0; + + private: + template <typename T> + using OutputHandle = details::OutputHandle_t<Traits_, details::remove_optional_t<T>>; + std::vector<OutputHandle<Out>> m_outputs; + Gaudi::Property<std::vector<DataObjID>> m_outputLocations; // TODO/FIXME for now: use a call-back to update the + // actual handles! + }; + + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using SplittingTransformer = details::SplittingTransformer<Signature, Traits_, details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/ToolBinder.h b/GaudiFunctional/include/Gaudi/Functional/ToolBinder.h new file mode 100644 index 0000000000000000000000000000000000000000..d0592cc0d39947e75d19a6179e49fd0612ef5878 --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/ToolBinder.h @@ -0,0 +1,85 @@ +/*****************************************************************************\ +* (c) Copyright 2021-2023 CERN for the benefit of the LHCb Collaboration * +* * +* This software is distributed under the terms of the GNU General Public * +* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\*****************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/IBinder.h> + +#define GAUDI_FUNCTIONAL_TOOL_BINDER_USES_CREATE + +namespace Gaudi::Functional { + namespace details { + template <typename Signature, typename Traits> + class ToolBinder; + + template <typename IFace, typename... Args, typename Traits> + class ToolBinder<Gaudi::Interface::Bind::Box<IFace>( Args const&... ), Traits> + : public extends<details::BaseClass_t<Traits, AlgTool>, Gaudi::Interface::Bind::IBinder<IFace>> { + + constexpr static std::size_t N = sizeof...( Args ); + + template <typename IArgs, std::size_t... I> + ToolBinder( std::string type, std::string name, const IInterface* parent, IArgs&& args, + Gaudi::Interface::Bind::Box<IFace> ( *creator )( void const*, Args const&... ), + std::index_sequence<I...> ) + : extends<details::BaseClass_t<Traits>, Gaudi::Interface::Bind::IBinder<IFace>>{ std::move( type ), + std::move( name ), parent } + , m_handles{ std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( args ) )... } + , m_creator{ creator } {} + + std::tuple<details::InputHandle_t<Traits, Args>...> m_handles; + Gaudi::Interface::Bind::Box<IFace> ( *m_creator )( void const*, Args const&... ); + + public: + using KeyValue = std::pair<std::string, std::string>; + ToolBinder( std::string type, std::string name, const IInterface* parent, + Gaudi::Functional::details::RepeatValues_<KeyValue, N> const& inputs, + Gaudi::Interface::Bind::Box<IFace> ( *creator )( void const*, Args const&... ) ) + : ToolBinder{ std::move( type ), std::move( name ), parent, inputs, creator, std::make_index_sequence<N>{} } { + } + + Gaudi::Interface::Bind::Box<IFace> bind( EventContext const& ctx ) const final { + return std::apply( + [&]( auto const&... arg ) { + using namespace details; + return std::invoke( m_creator, this, get( arg, *this, ctx )... ); + }, + m_handles ); + } + + template <std::size_t N = 0> + decltype( auto ) inputLocation() const { + using namespace details; + return getKey( std::get<N>( m_handles ) ); + } + template <typename T> + decltype( auto ) inputLocation() const { + using namespace details; + return getKey( std::get<InputHandle_t<Traits, std::decay_t<T>>>( m_handles ) ); + } + + // TODO: make this a callable instance? + template <typename BoundInstance, typename Self> + static auto construct( Self* ) { + static_assert( std::is_base_of_v<ToolBinder, Self> ); + return +[]( void const* ptr, const Args&... args ) { + return Gaudi::Interface::Bind::Box<IFace>{ std::in_place_type<BoundInstance>, + static_cast<std::add_const_t<Self>*>( ptr ), args... }; + }; + } + }; + } // namespace details + + template <typename Signature, typename Traits_ = Traits::use_<Traits::BaseClass_t<AlgTool>>> + using ToolBinder = details::ToolBinder<Signature, Traits_>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/Transformer.h b/GaudiFunctional/include/Gaudi/Functional/Transformer.h new file mode 100644 index 0000000000000000000000000000000000000000..5846ebfc5d45b1f13c530f68eaaf50322c8dd51c --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/Transformer.h @@ -0,0 +1,245 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include "details.h" +#include "utilities.h" +#include <GaudiKernel/FunctionalFilterDecision.h> +#include <GaudiKernel/GaudiException.h> +#include <type_traits> +#include <utility> + +// Adapt an Algorithm (by default, GaudiAlgorithm) so that derived classes +// a) do not need to access the event store, and have to explicitly +// state their data dependencies +// b) are encouraged not to have state which depends on the events +// (eg. histograms, counters will have to be mutable) + +namespace Gaudi ::Functional { + + namespace details { + + template <typename Signature, typename Traits_, bool isLegacy> + struct Transformer; + + // general N -> 1 algorithms + template <typename Out, typename... In, typename Traits_> + struct Transformer<Out( const In&... ), Traits_, true> + : DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute() override final { + try { + if constexpr ( sizeof...( In ) == 0 ) { + put( std::get<0>( this->m_outputs ), ( *this )() ); + } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { + put( std::get<0>( this->m_outputs ), ( *this )( Gaudi::Hive::currentContext() ) ); + } else { + put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ); + } + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual Out operator()( const In&... ) const = 0; + }; + + template <typename Out, typename... In, typename Traits_> + struct Transformer<Out( const In&... ), Traits_, false> + : DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ctx ) const override final { + try { + if constexpr ( sizeof...( In ) == 0 ) { + put( std::get<0>( this->m_outputs ), ( *this )() ); + } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { + put( std::get<0>( this->m_outputs ), ( *this )( ctx ) ); + } else { + put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); + } + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual Out operator()( const In&... ) const = 0; + }; + + // + // general N -> M algorithms + // + template <typename Signature, typename Traits_, bool isLegacy> + struct MultiTransformer; + + template <typename... Out, typename... In, typename Traits_> + struct MultiTransformer<std::tuple<Out...>( const In&... ), Traits_, true> + : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute() override final { + try { + std::apply( + [this]( auto&... ohandle ) { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + + if constexpr ( sizeof...( In ) == 0 ) { + std::apply( [&ohandle...]( + auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, + std::as_const( *this )() ); + } else { + std::apply( [&ohandle...]( + auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, + filter_evtcontext_t<In...>::apply( std::as_const( *this ), this->m_inputs ) ); + } + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + }, + this->m_outputs ); + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual std::tuple<Out...> operator()( const In&... ) const = 0; + }; + + template <typename... Out, typename... In, typename Traits_> + struct MultiTransformer<std::tuple<Out...>( const In&... ), Traits_, false> + : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ctx ) const override final { + try { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + std::apply( + [this, &ctx]( auto&... ohandle ) { + if constexpr ( sizeof...( In ) == 0 ) { + std::apply( [&ohandle...]( + auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, + ( *this )() ); + } else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) { + std::apply( [&ohandle...]( + auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, + ( *this )( ctx ) ); + } else { + std::apply( [&ohandle...]( + auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); }, + filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); + } + }, + this->m_outputs ); + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + return FilterDecision::PASSED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual std::tuple<Out...> operator()( const In&... ) const = 0; + }; + + // + // general N -> M algorithms with filter functionality + // + template <typename Signature, typename Traits_, bool isLegacy> + struct MultiTransformerFilter; + + template <typename... Out, typename... In, typename Traits_> + struct MultiTransformerFilter<std::tuple<Out...>( const In&... ), Traits_, true> + : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute() override final { + try { + return std::apply( + [&]( auto&... ohandle ) { + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN + return std::apply( + [&ohandle...]( bool passed, auto&&... data ) { + ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); + return passed; + }, + filter_evtcontext_t<In...>::apply( *this, this->m_inputs ) ); + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + }, + this->m_outputs ) + ? FilterDecision::PASSED + : FilterDecision::FAILED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual std::tuple<bool, Out...> operator()( const In&... ) const = 0; + }; + + template <typename... Out, typename... In, typename Traits_> + struct MultiTransformerFilter<std::tuple<Out...>( const In&... ), Traits_, false> + : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> { + using DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_>::DataHandleMixin; + + // derived classes can NOT implement execute + StatusCode execute( const EventContext& ctx ) const override final { + try { + return std::apply( + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN[&]( auto&... ohandle ) { + return std::apply( + [&ohandle...]( bool passed, auto&&... data ) { + ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); + return passed; + }, + filter_evtcontext_t<In...>::apply( *this, ctx, this->m_inputs ) ); + }, + GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END + + this->m_outputs ) + ? FilterDecision::PASSED + : FilterDecision::FAILED; + } catch ( GaudiException& e ) { + ( e.code() ? this->warning() : this->error() ) << e.tag() << " : " << e.message() << endmsg; + return e.code(); + } + } + + // instead they MUST implement this operator + virtual std::tuple<bool, Out...> operator()( const In&... ) const = 0; + }; + } // namespace details + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using Transformer = details::Transformer<Signature, Traits_, details::isLegacy<Traits_>>; + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using MultiTransformer = details::MultiTransformer<Signature, Traits_, details::isLegacy<Traits_>>; + + template <typename Signature, typename Traits_ = Traits::useDefaults> + using MultiTransformerFilter = details::MultiTransformerFilter<Signature, Traits_, details::isLegacy<Traits_>>; + +} // namespace Gaudi::Functional diff --git a/GaudiFunctional/include/Gaudi/Functional/details.h b/GaudiFunctional/include/Gaudi/Functional/details.h new file mode 100644 index 0000000000000000000000000000000000000000..e6c8ed79917bd00f1fe464e10d52d063d3efea02 --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/details.h @@ -0,0 +1,704 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include <Gaudi/Algorithm.h> +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataObjectHandle.h> +#include <GaudiKernel/GaudiException.h> +#include <GaudiKernel/IBinder.h> +#include <GaudiKernel/ThreadLocalContext.h> +#include <GaudiKernel/detected.h> +#include <cassert> +#include <range/v3/version.hpp> +#include <range/v3/view/const.hpp> +#include <range/v3/view/zip.hpp> +#include <sstream> +#include <stdexcept> +#include <type_traits> + +// upstream has renamed namespace ranges::view ranges::views +#if RANGE_V3_VERSION < 900 +namespace ranges::views { + using namespace ranges::view; +} +#endif + +#if defined( __clang__ ) && ( __clang_major__ < 11 ) || defined( __APPLE__ ) && ( __clang_major__ < 12 ) +# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN \ + _Pragma( "clang diagnostic push" ) _Pragma( "clang diagnostic ignored \"-Wunused-lambda-capture\"" ) +# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END _Pragma( "clang diagnostic pop" ) +#else +# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_BEGIN +# define GF_SUPPRESS_SPURIOUS_CLANG_WARNING_END +#endif + +// temporary hack to help in transition to updated constructor +// allows to write code which is forward and backwards compatible +#define GAUDI_FUNCTIONAL_CONSTRUCTOR_USES_TUPLE + +namespace Gaudi::Functional::details { + + // CRJ : Stuff for zipping + namespace zip { + + /// Print the parameter + template <typename OS, typename Arg> + void printSizes( OS& out, Arg&& arg ) { + out << "SizeOf'" << System::typeinfoName( typeid( Arg ) ) << "'=" << std::forward<Arg>( arg ).size(); + } + + /// Print the parameters + template <typename OS, typename Arg, typename... Args> + void printSizes( OS& out, Arg&& arg, Args&&... args ) { + printSizes( out, arg ); + out << ", "; + printSizes( out, args... ); + } + + /// Resolve case there is only one container in the range + template <typename A> + inline bool check_sizes( const A& ) noexcept { + return true; + } + + /// Compare sizes of two containers + template <typename A, typename B> + inline bool check_sizes( const A& a, const B& b ) noexcept { + return a.size() == b.size(); + } + + /// Compare sizes of 3 or more containers + template <typename A, typename B, typename... C> + inline bool check_sizes( const A& a, const B& b, const C&... c ) noexcept { + return ( check_sizes( a, b ) && check_sizes( b, c... ) ); + } + + /// Verify the data container sizes have the same sizes + template <typename... Args> + inline decltype( auto ) verifySizes( Args&... args ) { + if ( !check_sizes( args... ) ) { + std::ostringstream mess; + mess << "Zipped containers have different sizes : "; + printSizes( mess, args... ); + throw GaudiException( mess.str(), "Gaudi::Functional::details::zip::verifySizes", StatusCode::FAILURE ); + } + } + + /// Zips multiple containers together to form a single range + template <typename... Args> + inline decltype( auto ) range( Args&&... args ) { +#ifndef NDEBUG + verifySizes( args... ); +#endif + return ranges::views::zip( std::forward<Args>( args )... ); + } + + /// Zips multiple containers together to form a single const range + template <typename... Args> + inline decltype( auto ) const_range( Args&&... args ) { +#ifndef NDEBUG + verifySizes( args... ); +#endif + return ranges::views::const_( ranges::views::zip( std::forward<Args>( args )... ) ); + } + } // namespace zip + + inline std::vector<DataObjID> to_DataObjID( const std::vector<std::string>& in ) { + std::vector<DataObjID> out; + out.reserve( in.size() ); + std::transform( in.begin(), in.end(), std::back_inserter( out ), + []( const std::string& i ) { return DataObjID{ i }; } ); + return out; + } + + ///////////////////////////////////////// + namespace details2 { + template <typename T> + using is_optional_ = decltype( std::declval<T>().has_value(), std::declval<T>().value() ); + + template <typename T> + using value_type_of_t = typename T::value_type; + + } // namespace details2 + template <typename Arg> + constexpr bool is_optional_v = Gaudi::cpp17::is_detected_v<details2::is_optional_, Arg>; + + template <typename Arg> + using require_is_optional = std::enable_if_t<is_optional_v<Arg>>; + + template <typename Arg> + using require_is_not_optional = std::enable_if_t<!is_optional_v<Arg>>; + + template <typename T> + using remove_optional_t = + std::conditional_t<is_optional_v<T>, Gaudi::cpp17::detected_t<details2::value_type_of_t, T>, T>; + + constexpr struct invoke_optionally_t { + template <typename F, typename Arg, typename = require_is_not_optional<Arg>> + decltype( auto ) operator()( F&& f, Arg&& arg ) const { + return std::invoke( std::forward<F>( f ), std::forward<Arg>( arg ) ); + } + template <typename F, typename Arg, typename = require_is_optional<Arg>> + void operator()( F&& f, Arg&& arg ) const { + if ( arg ) std::invoke( std::forward<F>( f ), *std::forward<Arg>( arg ) ); + } + } invoke_optionally{}; + ///////////////////////////////////////// + + template <typename Value, std::size_t... I> + auto get_values_helper( std::index_sequence<I...> ) { + return std::make_tuple( ( (void)I, Value{} )... ); + } + + template <typename Value, auto N> + using RepeatValues_ = decltype( get_values_helper<Value>( std::make_index_sequence<N>() ) ); + + ///////////////////////////////////////// + + template <typename Out1, typename Out2, + typename = std::enable_if_t<std::is_constructible_v<Out1, Out2> && std::is_base_of_v<DataObject, Out1>>> + auto put( const DataObjectHandle<Out1>& out_handle, Out2&& out ) { + return out_handle.put( std::make_unique<Out1>( std::forward<Out2>( out ) ) ); + } + + template <typename Out1, typename Out2, typename = std::enable_if_t<std::is_constructible_v<Out1, Out2>>> + auto put( const DataObjectHandle<AnyDataWrapper<Out1>>& out_handle, Out2&& out ) { + return out_handle.put( std::forward<Out2>( out ) ); + } + + // optional put + template <typename OutHandle, typename OptOut, typename = require_is_optional<OptOut>> + void put( const OutHandle& out_handle, OptOut&& out ) { + if ( out ) put( out_handle, *std::forward<OptOut>( out ) ); + } + + ///////////////////////////////////////// + // adapt to differences between eg. std::vector (which has push_back) and KeyedContainer (which has insert) + // adapt to getting a T, and a container wanting T* by doing new T{ std::move(out) } + // adapt to getting a optional<T> + + constexpr struct insert_t { + // for Container<T*>, return T + template <typename Container> + using c_remove_ptr_t = std::remove_pointer_t<typename Container::value_type>; + + template <typename Container, typename Value> + auto operator()( Container& c, Value&& v ) const -> decltype( c.push_back( v ) ) { + return c.push_back( std::forward<Value>( v ) ); + } + + template <typename Container, typename Value> + auto operator()( Container& c, Value&& v ) const -> decltype( c.insert( v ) ) { + return c.insert( std::forward<Value>( v ) ); + } + + // Container<T*> with T&& as argument + template <typename Container, typename Value, + typename = std::enable_if_t<std::is_pointer_v<typename Container::value_type>>, + typename = std::enable_if_t<std::is_convertible_v<Value, c_remove_ptr_t<Container>>>> + auto operator()( Container& c, Value&& v ) const { + return operator()( c, new c_remove_ptr_t<Container>{ std::forward<Value>( v ) } ); + } + + } insert{}; + + ///////////////////////////////////////// + + constexpr struct deref_t { + template <typename In, typename = std::enable_if_t<!std::is_pointer_v<In>>> + const In& operator()( const In& in ) const { + return in; + } + + template <typename In, typename = std::enable_if_t<!std::is_pointer_v<std::decay_t<In>>>> + In operator()( In&& in ) const { + return std::forward<In>( in ); + } + + template <typename In> + const In& operator()( const In* in ) const { + assert( in != nullptr ); + return *in; + } + } deref{}; + + ///////////////////////////////////////// + // if Container is a pointer, then we're optional items + namespace details2 { + template <typename T> + struct is_gaudi_range : std::false_type {}; + + template <typename T, typename IT> + struct is_gaudi_range<Gaudi::Range_<T, IT>> : std::true_type {}; + + template <typename T, typename IT> + struct is_gaudi_range<Gaudi::NamedRange_<T, IT>> : std::true_type {}; + + template <typename T> + constexpr static bool is_gaudi_range_v = is_gaudi_range<T>::value; + + template <typename Container, typename Value> + void push_back( Container& c, const Value& v, std::true_type ) { + c.push_back( v ); + } + template <typename Container, typename Value> + void push_back( Container& c, const Value& v, std::false_type ) { + c.push_back( &v ); + } + + template <typename In> + struct get_from_handle { + template <template <typename> class Handle, typename I, typename = std::enable_if_t<std::is_convertible_v<I, In>>> + auto operator()( const Handle<I>& h ) -> const In& { + return *h.get(); + } + template <template <typename> class Handle, typename I, typename IT> + auto operator()( const Handle<Gaudi::Range_<I, IT>>& h ) -> const In { + return h.get(); + } + template <template <typename> class Handle, typename I, typename IT> + auto operator()( const Handle<Gaudi::NamedRange_<I, IT>>& h ) -> const In { + return h.get(); + } + template <template <typename> class Handle, typename I, + typename = std::enable_if_t<std::is_convertible_v<I*, In>>> + auto operator()( const Handle<I>& h ) -> const In { + return h.getIfExists(); + } // In is-a pointer + }; + + template <typename T> + T* deref_if( T* const t, std::false_type ) { + return t; + } + template <typename T> + T& deref_if( T* const t, std::true_type ) { + return *t; + } + } // namespace details2 + + template <typename Container> + class vector_of_const_ { + static constexpr bool is_pointer = std::is_pointer_v<Container>; + static constexpr bool is_range = details2::is_gaudi_range_v<Container>; + using val_t = std::add_const_t<std::remove_pointer_t<Container>>; + using ptr_t = std::add_pointer_t<val_t>; + using ref_t = std::add_lvalue_reference_t<val_t>; + using ContainerVector = std::vector<std::conditional_t<is_range, std::remove_const_t<val_t>, ptr_t>>; + ContainerVector m_containers; + + public: + using value_type = std::conditional_t<is_pointer, ptr_t, val_t>; + using size_type = typename ContainerVector::size_type; + class iterator { + using it_t = typename ContainerVector::const_iterator; + it_t m_i; + friend class vector_of_const_; + iterator( it_t iter ) : m_i( iter ) {} + using ret_t = std::conditional_t<is_pointer, ptr_t, ref_t>; + + public: + using iterator_category = typename it_t::iterator_category; + using value_type = typename it_t::iterator_category; + using reference = typename it_t::reference; + using pointer = typename it_t::pointer; + using difference_type = typename it_t::difference_type; + + friend bool operator!=( const iterator& lhs, const iterator& rhs ) { return lhs.m_i != rhs.m_i; } + friend bool operator==( const iterator& lhs, const iterator& rhs ) { return lhs.m_i == rhs.m_i; } + friend auto operator-( const iterator& lhs, const iterator& rhs ) { return lhs.m_i - rhs.m_i; } + ret_t operator*() const { + if constexpr ( is_range ) { + return *m_i; + } else { + return details2::deref_if( *m_i, std::bool_constant<!is_pointer>{} ); + } + } + iterator& operator++() { + ++m_i; + return *this; + } + iterator& operator--() { + --m_i; + return *this; + } + bool is_null() const { return !*m_i; } + explicit operator bool() const { return !is_null(); } + }; + vector_of_const_() = default; + void reserve( size_type size ) { m_containers.reserve( size ); } + template <typename T> // , typename = std::is_convertible<T,std::conditional_t<is_pointer,ptr_t,val_t>> + void push_back( T&& container ) { + details2::push_back( m_containers, std::forward<T>( container ), + std::bool_constant < is_pointer || is_range > {} ); + } // 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(); } + size_type size() const { return m_containers.size(); } + + template <typename X = Container> + std::enable_if_t<!std::is_pointer_v<X>, ref_t> front() const { + return *m_containers.front(); + } + template <typename X = Container> + std::enable_if_t<std::is_pointer_v<X>, ptr_t> front() const { + return m_containers.front(); + } + + template <typename X = Container> + std::enable_if_t<!std::is_pointer_v<X>, ref_t> back() const { + return *m_containers.back(); + } + template <typename X = Container> + std::enable_if_t<std::is_pointer_v<X>, ptr_t> back() const { + return m_containers.back(); + } + + template <typename X = Container> + std::enable_if_t<!std::is_pointer_v<X>, ref_t> operator[]( size_type i ) const { + return *m_containers[i]; + } + template <typename X = Container> + std::enable_if_t<std::is_pointer_v<X>, ptr_t> operator[]( size_type i ) const { + return m_containers[i]; + } + + template <typename X = Container> + std::enable_if_t<!std::is_pointer_v<X>, ref_t> at( size_type i ) const { + return *m_containers[i]; + } + template <typename X = Container> + std::enable_if_t<std::is_pointer_v<X>, ptr_t> at( size_type i ) const { + return m_containers[i]; + } + + bool is_null( size_type i ) const { return !m_containers[i]; } + }; + + ///////////////////////////////////////// + namespace detail2 { // utilities for detected_or_t{,_} usage + template <typename Tr> + using BaseClass_t = typename Tr::BaseClass; + template <typename Tr, typename T> + using OutputHandle_t = typename Tr::template OutputHandle<T>; + template <typename Tr, typename T> + using InputHandle_t = typename Tr::template InputHandle<T>; + + template <typename T> + constexpr auto is_tool_v = std::is_base_of_v<IAlgTool, std::decay_t<T>>; + + template <typename T> + using ToolHandle_t = ToolHandle<Gaudi::Interface::Bind::IBinder<std::decay_t<T>>>; + + template <typename T> + using DefaultInputHandle = std::conditional_t<is_tool_v<T>, ToolHandle_t<T>, DataObjectReadHandle<T>>; + } // namespace detail2 + + // check whether Traits::BaseClass is a valid type, + // if so, define BaseClass_t<Traits> as being Traits::BaseClass + // else define as being Gaudi::Algorithm + template <typename Tr, typename Base = Gaudi::Algorithm> + using BaseClass_t = Gaudi::cpp17::detected_or_t<Base, detail2::BaseClass_t, Tr>; + + // check whether Traits::{Input,Output}Handle<T> is a valid type, + // if so, define {Input,Output}Handle_t<Traits,T> as being Traits::{Input,Output}Handle<T> + // else define as being DataObject{Read,,Write}Handle<T> + + template <typename Tr, typename T> + using OutputHandle_t = Gaudi::cpp17::detected_or_t<DataObjectWriteHandle<T>, detail2::OutputHandle_t, Tr, T>; + template <typename Tr, typename T> + using InputHandle_t = Gaudi::cpp17::detected_or_t<detail2::DefaultInputHandle<T>, detail2::InputHandle_t, Tr, T>; + + template <typename Traits> + inline constexpr bool isLegacy = + std::is_base_of_v<Gaudi::details::LegacyAlgorithmAdapter, details::BaseClass_t<Traits>>; + + ///////// +#define GAUDI_FUNCTIONAL_MAKE_VECTOR_OF_HANDLES_USES_DATAOBJID + + template <typename Handles> + Handles make_vector_of_handles( IDataHandleHolder* owner, const std::vector<DataObjID>& init ) { + Handles handles; + handles.reserve( init.size() ); + std::transform( init.begin(), init.end(), std::back_inserter( handles ), + [&]( const auto& loc ) -> typename Handles::value_type { + return { loc, owner }; + } ); + return handles; + } + + template <typename Handle, typename Algo> + auto get( const Handle& handle, const Algo&, const EventContext& ) + -> decltype( details::deref( handle.get() ) ) // make it SFINAE friendly... + { + return details::deref( handle.get() ); + } + + template <typename IFace, typename Algo> + auto get( const ToolHandle<Gaudi::Interface::Bind::IBinder<IFace>>& handle, const Algo&, const EventContext& ctx ) { + return handle.bind( ctx ); + } + + template <typename Handle> + auto getKey( const Handle& h ) -> decltype( h.objKey() ) { + return h.objKey(); + } + + /////////////////////// + // given a pack, return a corresponding tuple + template <typename... In> + struct filter_evtcontext_t { + using type = std::tuple<In...>; + + static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>, + "EventContext can only appear as first argument" ); + + template <typename Algorithm, typename Handles> + static auto apply( const Algorithm& algo, Handles& handles ) { + return std::apply( + [&]( const auto&... handle ) { return algo( get( handle, algo, Gaudi::Hive::currentContext() )... ); }, + handles ); + } + template <typename Algorithm, typename Handles> + static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) { + return std::apply( [&]( const auto&... handle ) { return algo( get( handle, algo, ctx )... ); }, handles ); + } + }; + + // except when it starts with EventContext, then drop it + template <typename... In> + struct filter_evtcontext_t<EventContext, In...> { + using type = std::tuple<In...>; + + static_assert( !std::disjunction_v<std::is_same<EventContext, In>...>, + "EventContext can only appear as first argument" ); + + template <typename Algorithm, typename Handles> + static auto apply( const Algorithm& algo, const EventContext& ctx, Handles& handles ) { + return std::apply( [&]( const auto&... handle ) { return algo( ctx, get( handle, algo, ctx )... ); }, handles ); + } + + template <typename Algorithm, typename Handles> + static auto apply( const Algorithm& algo, Handles& handles ) { + return apply( algo, Gaudi::Hive::currentContext(), handles ); + } + }; + + template <typename... In> + using filter_evtcontext = typename filter_evtcontext_t<In...>::type; + + template <typename OutputSpec, typename InputSpec, typename Traits_> + class DataHandleMixin; + + template <typename Out, typename In, typename Tr> + void updateHandleLocation( DataHandleMixin<Out, In, Tr>& parent, const std::string& prop, + const std::string& newLoc ) { + auto sc = parent.setProperty( prop, newLoc ); + if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc ); + } + + template <typename Out, typename In, typename Tr> + void updateHandleLocations( DataHandleMixin<Out, In, Tr>& parent, const std::string& prop, + const std::vector<std::string>& newLocs ) { + std::ostringstream ss; + GaudiUtils::details::ostream_joiner( + ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& { return os << "'" << i << "'"; } ) + << ']'; + auto sc = parent.setProperty( prop, ss.str() ); + if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc ); + } + + template <typename... Out, typename... In, typename Traits_> + class DataHandleMixin<std::tuple<Out...>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> { + static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); + + template <typename IArgs, typename OArgs, std::size_t... I, std::size_t... J> + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...>, + const OArgs& outputs, std::index_sequence<J...> ) + : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) + , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... ) + , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) { + // make sure this algorithm is seen as reentrant by Gaudi + this->setProperty( "Cardinality", 0 ).ignore(); + } + + public: + constexpr static std::size_t N_in = sizeof...( In ); + constexpr static std::size_t N_out = sizeof...( Out ); + + using KeyValue = std::pair<std::string, std::string>; + using KeyValues = std::pair<std::string, std::vector<std::string>>; + + // generic constructor: N -> M + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_in> const& inputs, + RepeatValues_<KeyValue, N_out> const& outputs ) + : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{}, outputs, + std::index_sequence_for<Out...>{} ) {} + + // special cases: forward to the generic case... + // 1 -> 1 + DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input, const KeyValue& output ) + : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ), + std::forward_as_tuple( output ) ) {} + // 1 -> N + DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input, + RepeatValues_<KeyValue, N_out> const& outputs ) + : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ), outputs ) {} + // N -> 1 + DataHandleMixin( std::string name, ISvcLocator* locator, RepeatValues_<KeyValue, N_in> const& inputs, + const KeyValue& output ) + : DataHandleMixin( std::move( name ), locator, inputs, std::forward_as_tuple( output ) ) {} + + template <std::size_t N = 0> + decltype( auto ) inputLocation() const { + return getKey( std::get<N>( m_inputs ) ); + } + template <typename T> + decltype( auto ) inputLocation() const { + return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) ); + } + constexpr unsigned int inputLocationSize() const { return N_in; } + + template <std::size_t N = 0> + decltype( auto ) outputLocation() const { + return getKey( std::get<N>( m_outputs ) ); + } + template <typename T> + decltype( auto ) outputLocation() const { + return getKey( std::get<details::OutputHandle_t<Traits_, std::decay_t<T>>>( m_outputs ) ); + } + constexpr unsigned int outputLocationSize() const { return N_out; } + + protected: + bool isReEntrant() const override { return true; } + + std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; + std::tuple<details::OutputHandle_t<Traits_, Out>...> m_outputs; + }; + + template <typename Traits_> + class DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> { + static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); + + public: + using KeyValue = std::pair<std::string, std::string>; + using KeyValues = std::pair<std::string, std::vector<std::string>>; + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, std::tuple<> = {}, std::tuple<> = {} ) + : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) { + // make sure this algorithm is seen as reentrant by Gaudi + this->setProperty( "Cardinality", 0 ).ignore(); + } + + protected: + bool isReEntrant() const override { return true; } + + std::tuple<> m_inputs; + }; + + template <typename... In, typename Traits_> + class DataHandleMixin<std::tuple<>, std::tuple<In...>, Traits_> : public BaseClass_t<Traits_> { + static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); + + template <typename IArgs, std::size_t... I> + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const IArgs& inputs, std::index_sequence<I...> ) + : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) + , m_inputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<I>( inputs ) )... ) { + // make sure this algorithm is seen as reentrant by Gaudi + this->setProperty( "Cardinality", 0 ).ignore(); + } + + public: + using KeyValue = std::pair<std::string, std::string>; + using KeyValues = std::pair<std::string, std::vector<std::string>>; + constexpr static std::size_t N_in = sizeof...( In ); + + // generic constructor: N -> 0 + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_in> const& inputs ) + : DataHandleMixin( std::move( name ), pSvcLocator, inputs, std::index_sequence_for<In...>{} ) {} + + // special cases: forward to the generic case... + // 1 -> 0 + DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& input ) + : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( input ) ) {} + + template <std::size_t N = 0> + decltype( auto ) inputLocation() const { + return getKey( std::get<N>( m_inputs ) ); + } + template <typename T> + decltype( auto ) inputLocation() const { + return getKey( std::get<details::InputHandle_t<Traits_, std::decay_t<T>>>( m_inputs ) ); + } + constexpr unsigned int inputLocationSize() const { return N_in; } + + protected: + bool isReEntrant() const override { return true; } + + std::tuple<details::InputHandle_t<Traits_, In>...> m_inputs; + }; + + template <typename Traits_> + class DataHandleMixin<std::tuple<void>, std::tuple<>, Traits_> + : public DataHandleMixin<std::tuple<>, std::tuple<>, Traits_> { + public: + using DataHandleMixin<std::tuple<>, std::tuple<>, Traits_>::DataHandleMixin; + }; + + template <typename... Out, typename Traits_> + class DataHandleMixin<std::tuple<Out...>, std::tuple<>, Traits_> : public BaseClass_t<Traits_> { + static_assert( std::is_base_of_v<Algorithm, BaseClass_t<Traits_>>, "BaseClass must inherit from Algorithm" ); + + template <typename OArgs, std::size_t... J> + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, const OArgs& outputs, std::index_sequence<J...> ) + : BaseClass_t<Traits_>( std::move( name ), pSvcLocator ) + , m_outputs( std::tuple_cat( std::forward_as_tuple( this ), std::get<J>( outputs ) )... ) { + // make sure this algorithm is seen as reentrant by Gaudi + this->setProperty( "Cardinality", 0 ).ignore(); + } + + public: + constexpr static std::size_t N_out = sizeof...( Out ); + using KeyValue = std::pair<std::string, std::string>; + using KeyValues = std::pair<std::string, std::vector<std::string>>; + + // generic constructor: 0 -> N + DataHandleMixin( std::string name, ISvcLocator* pSvcLocator, RepeatValues_<KeyValue, N_out> const& outputs ) + : DataHandleMixin( std::move( name ), pSvcLocator, outputs, std::index_sequence_for<Out...>{} ) {} + + // 0 -> 1 + DataHandleMixin( std::string name, ISvcLocator* locator, const KeyValue& output ) + : DataHandleMixin( std::move( name ), locator, std::forward_as_tuple( output ) ) {} + + template <std::size_t N = 0> + decltype( auto ) outputLocation() const { + return getKey( std::get<N>( m_outputs ) ); + } + constexpr unsigned int outputLocationSize() const { return N_out; } + + protected: + bool isReEntrant() const override { return true; } + + std::tuple<details::OutputHandle_t<Traits_, Out>...> m_outputs; + }; + + ///////////////// + template <typename Fun, typename Container, typename... Args> + constexpr void applyPostProcessing( const Fun&, Container&, Args... ) { + static_assert( sizeof...( Args ) == 0, "Args should not be used!" ); + } + + template <typename Fun, typename Container> + auto applyPostProcessing( const Fun& fun, Container& c ) -> decltype( fun.postprocess( c ), void() ) { + fun.postprocess( c ); + } + +} // namespace Gaudi::Functional::details diff --git a/GaudiFunctional/include/Gaudi/Functional/utilities.h b/GaudiFunctional/include/Gaudi/Functional/utilities.h new file mode 100644 index 0000000000000000000000000000000000000000..de42e2f44687ac3a8d571a88f420807d94a5eb73 --- /dev/null +++ b/GaudiFunctional/include/Gaudi/Functional/utilities.h @@ -0,0 +1,106 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include <GaudiKernel/DataObjectHandle.h> +#include <GaudiKernel/SerializeSTL.h> +#include <boost/algorithm/string/join.hpp> +#include <initializer_list> +#include <string> + +namespace Gaudi::Functional { + + // This utility is needed when the inputs of a functional algorithm may be stored in several locations + inline std::string concat_alternatives( std::initializer_list<std::string> c ) { + return boost::algorithm::join( c, ":" ); + } + + template <typename... Strings> + std::string concat_alternatives( const Strings&... s ) { + return concat_alternatives( std::initializer_list<std::string>{ s... } ); + } + + [[deprecated( "please use `updateHandleLocation` instead of `Gaudi::Functional::updateHandleLocation`" )]] inline void + updateHandleLocation( IProperty& parent, const std::string& prop, const std::string& newLoc ) { + auto sc = parent.setProperty( prop, newLoc ); + if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + newLoc, sc ); + } + + [[deprecated( + "please use `updateHandleLocations` instead of `Gaudi::Functional::updateHandleLocations`" )]] inline void + updateHandleLocations( IProperty& parent, const std::string& prop, const std::vector<std::string>& newLocs ) { + std::ostringstream ss; + GaudiUtils::details::ostream_joiner( + ss << '[', newLocs, ", ", []( std::ostream & os, const auto& i ) -> auto& { return os << "'" << i << "'"; } ) + << ']'; + auto sc = parent.setProperty( prop, ss.str() ); + if ( sc.isFailure() ) throw GaudiException( "Could not set Property", prop + " -> " + ss.str(), sc ); + } + + namespace Traits { + + // traits classes used to customize Transformer and FilterPredicate + // Define the types to to be used as baseclass, and as in- resp. output hanldes. + // In case a type is not specified in the traits struct, a default is used. + // + // The defaults are: + // + // using BaseClass = GaudiAlgorithm + // template <typename T> using InputHandle = DataObjectHandle<T>; + // template <typename T> using OutputHandle = DataObjectHandle<T>; + // + + // the best way to 'compose' traits is by inheriting them one-by-one... + template <typename... Base> + struct use_ : Base... {}; + + // helper classes one can inherit from to specify a specific trait + template <typename Base> + struct BaseClass_t { + using BaseClass = Base; + }; + + template <template <typename> class Handle> + struct InputHandle_t { + template <typename T> + using InputHandle = Handle<T>; + }; + + template <template <typename> class Handle> + struct OutputHandle_t { + template <typename T> + using OutputHandle = Handle<T>; + }; + + template <typename Data, typename View> + struct writeViewFor { + template <typename T> + using OutputHandle = std::enable_if_t<std::is_same_v<T, Data>, DataObjectWriteHandle<View, Data>>; + }; + + // add support for objects that should reside in the TES for lifetime management, but should not + // be used explicitly and/or directly by downstream code. + template <typename Data> + struct WriteOpaqueFor { + struct OpaqueView { + OpaqueView() = default; + template <typename T> + OpaqueView( T const& ) {} + }; + + template <typename T> + using OutputHandle = std::enable_if_t<std::is_same_v<T, Data>, DataObjectWriteHandle<OpaqueView, Data>>; + }; + + // this uses the defaults -- and it itself is the default ;-) + using useDefaults = use_<>; + } // namespace Traits +} // namespace Gaudi::Functional diff --git a/GaudiHive/CMakeLists.txt b/GaudiHive/CMakeLists.txt index 3c014e5b1634912966e479343a97b64d813ce589..2ca937faf1b70ff8d81f9a1281eaaf0ed6815686 100644 --- a/GaudiHive/CMakeLists.txt +++ b/GaudiHive/CMakeLists.txt @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -35,7 +35,7 @@ gaudi_add_module(GaudiHive src/TimelineSvc.cpp src/ViewTester.cpp LINK GaudiKernel - GaudiAlgLib + Gaudi::Functional Boost::headers Boost::system Boost::filesystem diff --git a/GaudiHive/options/BasicViewTest.py b/GaudiHive/options/BasicViewTest.py index 9c581b70d5c85cf64a9e0b0573a28d598e75dc8e..040d60252d27a9ce7a76e259193279f48f92bb46 100644 --- a/GaudiHive/options/BasicViewTest.py +++ b/GaudiHive/options/BasicViewTest.py @@ -26,7 +26,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -95,11 +95,11 @@ for algo in [a1, a2, a3, a4]: algo.Cardinality = cardinality algo.OutputLevel = INFO -viewNode = GaudiSequencer( +viewNode = Gaudi__Sequencer( "viewNode", Members=[a2, a3], Sequential=False, ShortCircuit=False, OutputLevel=INFO ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNode, a4], Sequential=True, OutputLevel=INFO ) diff --git a/GaudiHive/options/CFBugWithEmptyNode.py b/GaudiHive/options/CFBugWithEmptyNode.py index e8f4dc6ade319e7eb42b099526a18f2e81161402..5e746bc02715fa571705ba03d0e50ee1e50efa1c 100644 --- a/GaudiHive/options/CFBugWithEmptyNode.py +++ b/GaudiHive/options/CFBugWithEmptyNode.py @@ -21,7 +21,7 @@ In this test, A2 will run unless the bug has been fixed from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -80,7 +80,7 @@ a2.Cardinality = cardinality a2.OutputLevel = INFO a2.viewNodeName = "" -emptySeq = GaudiSequencer( +emptySeq = Gaudi__Sequencer( "emptySeq", Members=[], Sequential=False, @@ -89,7 +89,7 @@ emptySeq = GaudiSequencer( OutputLevel=INFO, ) -topSeq = GaudiSequencer( +topSeq = Gaudi__Sequencer( "topSeq", # Members=[emptySeq, a1], #This finds a different bug/quirk Members=[a1, emptySeq, a2], diff --git a/GaudiHive/options/CFinViewTest.py b/GaudiHive/options/CFinViewTest.py index bb0cfdc09cb413e39bdb4485aea249073509bf01..2d7213f046bc63e9c1f7a03c238af4519c5d9de3 100644 --- a/GaudiHive/options/CFinViewTest.py +++ b/GaudiHive/options/CFinViewTest.py @@ -28,7 +28,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -103,15 +103,15 @@ for algo in [a1, a2, a3, a4, b1, b2]: algo.Cardinality = cardinality algo.OutputLevel = DEBUG -nodeInView = GaudiSequencer( +nodeInView = Gaudi__Sequencer( "nodeInView", Members=[b1, b2], Sequential=False, OutputLevel=VERBOSE ) -viewNode = GaudiSequencer( +viewNode = Gaudi__Sequencer( "viewNode", Members=[a2, nodeInView, a3], Sequential=False, OutputLevel=VERBOSE ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNode, a4], Sequential=True, OutputLevel=VERBOSE ) diff --git a/GaudiHive/options/ConditionsStallTest.py b/GaudiHive/options/ConditionsStallTest.py index 6fd056ff0f47638c5e413b712fc4d41e86f947a2..3984b4bf5f50f9429a461fa9ceabe0227f5cc5fe 100644 --- a/GaudiHive/options/ConditionsStallTest.py +++ b/GaudiHive/options/ConditionsStallTest.py @@ -89,7 +89,7 @@ a2.inpKeys = ["/Event/A1"] a3 = Test__ViewTester("AlgC", OutputLevel=INFO) a3.outKeys = ["/Event/A2"] -algSeq = GaudiSequencer( +algSeq = Gaudi__Sequencer( "algSeq", Members=[a1, a2, a3], Sequential=True, OutputLevel=INFO ) diff --git a/GaudiHive/options/ControlFlowBranching+CrossBranchDataFlow.py b/GaudiHive/options/ControlFlowBranching+CrossBranchDataFlow.py index d16de972f33e267e065f4509e9aa02d2fe9844d7..7b4ef3ce44111681c50a20a83b35f958c27f1c76 100644 --- a/GaudiHive/options/ControlFlowBranching+CrossBranchDataFlow.py +++ b/GaudiHive/options/ControlFlowBranching+CrossBranchDataFlow.py @@ -22,7 +22,7 @@ from Configurables import ( AvalancheSchedulerSvc, CPUCruncher, CPUCrunchSvc, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, ) @@ -62,8 +62,8 @@ for a in [a1, a2, a3]: a.avgRuntime = 0.01 # Assemble control flow graph -branch1 = GaudiSequencer("Branch1", ModeOR=False, ShortCircuit=False) -branch2 = GaudiSequencer("Branch2", ModeOR=False, ShortCircuit=True, Sequential=True) +branch1 = Gaudi__Sequencer("Branch1", ModeOR=False, ShortCircuit=False) +branch2 = Gaudi__Sequencer("Branch2", ModeOR=False, ShortCircuit=True, Sequential=True) branch2.Members = [a1, a2] branch1.Members = [branch2, a3] diff --git a/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py b/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py index 9b68c04cdd06f6eff5198aa2fa9078b68d1b2d25..519850aad47d320f1cb7527372e90161db4fa14e 100644 --- a/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py +++ b/GaudiHive/options/EarlyTerminatingBranchesSharingAlgorithm.py @@ -15,7 +15,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, ) @@ -37,7 +37,7 @@ AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight, OutputLevel=DEBUG) def parOR(name, subs=[]): """parallel OR sequencer""" - seq = GaudiSequencer(name) + seq = Gaudi__Sequencer(name) seq.ModeOR = True seq.Sequential = False seq.ShortCircuit = False @@ -49,7 +49,7 @@ def parOR(name, subs=[]): def seqAND(name, subs=[]): """sequential AND sequencer""" - seq = GaudiSequencer(name) + seq = Gaudi__Sequencer(name) seq.ModeOR = False seq.Sequential = True # seq.StopOverride = True @@ -59,7 +59,7 @@ def seqAND(name, subs=[]): return seq -topSequence = GaudiSequencer("topSequence") +topSequence = Gaudi__Sequencer("topSequence") and1A = seqAND("AND1A") diff --git a/GaudiHive/options/ManySmallAlgs.py b/GaudiHive/options/ManySmallAlgs.py index d2dee00a4f4f2af4f745ccbacc041b1bebe43895..1bdcdb956ddfb793c21f6ce74041d9e8e2889df7 100644 --- a/GaudiHive/options/ManySmallAlgs.py +++ b/GaudiHive/options/ManySmallAlgs.py @@ -19,15 +19,9 @@ Those nodes are then given 2 different CF node parents (20 in total) which inclu In sequential mode (sequence=True) the prescale algorithms will randomly deactivate CF nodes at a frequency given by filterPass """ -from Configurables import ( - AlgResourcePool, - AvalancheSchedulerSvc, - GaudiSequencer, - HiveSlimEventLoopMgr, - HiveWhiteBoard, - Prescaler, - Test__ViewTester, -) +from Configurables import AlgResourcePool, AvalancheSchedulerSvc +from Configurables import Gaudi__Examples__Prescaler as Prescaler +from Configurables import Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard from Gaudi.Configuration import * # metaconfig ------------------------------------------------------------------- @@ -89,7 +83,7 @@ for i in range(1000): alg.PercentPass = 100.0 allAlgs.append(alg) -baseSeq = GaudiSequencer( +baseSeq = Gaudi__Sequencer( "baseSeq", Members=allAlgs, Sequential=sequence, @@ -104,7 +98,7 @@ allSeqSeqs = [] if nested: for i in range(100): seqAlgs = allAlgs[10 * i : 10 * (i + 1)] - seq = GaudiSequencer( + seq = Gaudi__Sequencer( "seq" + str(i), Members=seqAlgs, Sequential=sequence, @@ -122,7 +116,7 @@ if nested: filterAlg.Cardinality = cardinality filterAlg.PercentPass = filterPass - seq = GaudiSequencer( + seq = Gaudi__Sequencer( "seqSeq" + str(i), Members=[filterAlg] + seqSeqs, Sequential=sequence, @@ -140,7 +134,7 @@ if nested: filterAlg.Cardinality = cardinality filterAlg.PercentPass = filterPass - seq = GaudiSequencer( + seq = Gaudi__Sequencer( "seqSeq" + str(i + 10), Members=[filterAlg] + seqSeqs, Sequential=sequence, diff --git a/GaudiHive/options/ModelDFAmbiguity.py b/GaudiHive/options/ModelDFAmbiguity.py index e3115954478e5de976462b611c50ac80626e4e05..6d1b3de2ba1aa0c07a80eb5ebcd911bf4590ca3d 100644 --- a/GaudiHive/options/ModelDFAmbiguity.py +++ b/GaudiHive/options/ModelDFAmbiguity.py @@ -62,10 +62,10 @@ updaterAlg3.outKeys = ["/Event/B"] updaterAlg4 = CPUCruncher(name="UpdaterAlg4") updaterAlg4.outKeys = ["/Event/A"] -branch2 = GaudiSequencer("ConditionalBranch", Sequential=True, ShortCircuit=True) +branch2 = Gaudi__Sequencer("ConditionalBranch", Sequential=True, ShortCircuit=True) branch2.Members = [producerAlg1, updaterAlg1, producerAlg2, updaterAlg3] -branch = GaudiSequencer("UnConditionalBranch", ShortCircuit=False) +branch = Gaudi__Sequencer("UnConditionalBranch", ShortCircuit=False) branch.Members = [branch2, updaterAlg2, updaterAlg4] ApplicationMgr( diff --git a/GaudiHive/options/ReadAndWriteWhiteBoard.py b/GaudiHive/options/ReadAndWriteWhiteBoard.py index 09c7d76129784b701f44b34f99078dace29be3fe..d2903634dcaf825a9e7466b056b7e5fe3d20dbc2 100644 --- a/GaudiHive/options/ReadAndWriteWhiteBoard.py +++ b/GaudiHive/options/ReadAndWriteWhiteBoard.py @@ -12,7 +12,7 @@ # Write a DST and a miniDST, including File Summary Records #################################################################### -from Configurables import AlgResourcePool, AvalancheSchedulerSvc +from Configurables import AvalancheSchedulerSvc from Configurables import Gaudi__RootCnvSvc as RootCnvSvc from Configurables import ( GaudiPersistency, @@ -20,7 +20,6 @@ from Configurables import ( HiveSlimEventLoopMgr, HiveWhiteBoard, ReadHandleAlg, - WriteHandleAlg, ) from Gaudi.Configuration import * @@ -28,7 +27,6 @@ from Gaudi.Configuration import * MessageSvc(OutputLevel=WARNING) IncidentSvc(OutputLevel=DEBUG) RootCnvSvc(OutputLevel=INFO) -SequencerTimerTool(OutputLevel=WARNING) # Output setup # - DST diff --git a/GaudiHive/options/ReadWhiteBoard.py b/GaudiHive/options/ReadWhiteBoard.py index 1e57c8eeb4b55683448d207e39ec4b688c662050..e987d5bd99941771e9fe95edbee70c66d7686fe7 100644 --- a/GaudiHive/options/ReadWhiteBoard.py +++ b/GaudiHive/options/ReadWhiteBoard.py @@ -12,7 +12,7 @@ # Write a DST and a miniDST, including File Summary Records #################################################################### -from Configurables import AlgResourcePool, AvalancheSchedulerSvc +from Configurables import AvalancheSchedulerSvc from Configurables import Gaudi__RootCnvSvc as RootCnvSvc from Configurables import ( GaudiPersistency, @@ -21,7 +21,6 @@ from Configurables import ( HiveWhiteBoard, ReadHandleAlg, StoreSnifferAlg, - WriteHandleAlg, ) from Gaudi.Configuration import * @@ -29,7 +28,6 @@ from Gaudi.Configuration import * MessageSvc(OutputLevel=WARNING) IncidentSvc(OutputLevel=INFO) RootCnvSvc(OutputLevel=INFO) -SequencerTimerTool(OutputLevel=WARNING) GaudiPersistency() diff --git a/GaudiHive/options/SequentialAlgSequencerTest.py b/GaudiHive/options/SequentialAlgSequencerTest.py index 8b5768011439b6d91b6097f9202510479ea2d387..ac6864a659ab7b434f6e64be0e58c65612518b76 100644 --- a/GaudiHive/options/SequentialAlgSequencerTest.py +++ b/GaudiHive/options/SequentialAlgSequencerTest.py @@ -11,11 +11,9 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, - ContextEventCounterData, - ContextEventCounterPtr, CPUCruncher, CPUCrunchSvc, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, ) @@ -87,7 +85,7 @@ for algo in [a1, a2, a3, a4]: for algo in [a3]: algo.Cardinality = cardinality -seq = GaudiSequencer( +seq = Gaudi__Sequencer( "CriticalSection", Members=[a1, a2, a4], Sequential=True, OutputLevel=VERBOSE ) diff --git a/GaudiHive/options/SubSlotException.py b/GaudiHive/options/SubSlotException.py index 1d1f1cf1c31c537d31eafb5a6968e73bf093800c..283f9dae014db658c8fe503c68377f2c94131a90 100644 --- a/GaudiHive/options/SubSlotException.py +++ b/GaudiHive/options/SubSlotException.py @@ -26,7 +26,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, GaudiTesting__StopLoopAlg, HiveSlimEventLoopMgr, HiveWhiteBoard, @@ -100,11 +100,11 @@ for algo in [a1, a2, a3, a4]: algo.Cardinality = cardinality algo.OutputLevel = INFO -viewNode = GaudiSequencer( +viewNode = Gaudi__Sequencer( "viewNode", Members=[a2, a3], Sequential=False, ShortCircuit=False, OutputLevel=INFO ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNode, a4], Sequential=True, OutputLevel=INFO ) diff --git a/GaudiHive/options/SubSlotVsSlotIsolation.py b/GaudiHive/options/SubSlotVsSlotIsolation.py index d7bd724ddb58b808781d26a90f16b59a75268133..5d51da7c2aead6ba04dfe55ab2a4eba24ec74f5e 100644 --- a/GaudiHive/options/SubSlotVsSlotIsolation.py +++ b/GaudiHive/options/SubSlotVsSlotIsolation.py @@ -29,7 +29,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -115,15 +115,15 @@ for algo in [a1, a2, a3, a4, a5, a6, a7]: algo.Cardinality = cardinality algo.OutputLevel = DEBUG -viewNodeOne = GaudiSequencer( +viewNodeOne = Gaudi__Sequencer( "viewNodeOne", Members=[a2, a3], Sequential=False, ShortCircuit=False ) -viewNodeTwo = GaudiSequencer( +viewNodeTwo = Gaudi__Sequencer( "viewNodeTwo", Members=[a5, a6], Sequential=False, ShortCircuit=False ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNodeOne, a4, viewNodeTwo, a7], Sequential=True, diff --git a/GaudiHive/options/ViewIsolationTest.py b/GaudiHive/options/ViewIsolationTest.py index bc90856e918e603a54cc4ca53082073a54565a5e..674fc67a255dcb68f0d26109c7bcc91e95437541 100644 --- a/GaudiHive/options/ViewIsolationTest.py +++ b/GaudiHive/options/ViewIsolationTest.py @@ -29,7 +29,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -103,11 +103,11 @@ for algo in [a1, a2, a3, a4, a5]: algo.Cardinality = cardinality algo.OutputLevel = INFO -extraNode = GaudiSequencer( +extraNode = Gaudi__Sequencer( "extraNode", Members=[a2, a3], Sequential=True, OutputLevel=INFO ) -viewNodeOne = GaudiSequencer( +viewNodeOne = Gaudi__Sequencer( "viewNodeOne", Members=[extraNode], Sequential=False, @@ -115,7 +115,7 @@ viewNodeOne = GaudiSequencer( OutputLevel=INFO, ) -viewNodeTwo = GaudiSequencer( +viewNodeTwo = Gaudi__Sequencer( "viewNodeTwo", Members=[extraNode], Sequential=False, @@ -123,7 +123,7 @@ viewNodeTwo = GaudiSequencer( OutputLevel=INFO, ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNodeOne, a4, viewNodeTwo, a5], Sequential=True, diff --git a/GaudiHive/options/ViewThenViewTest.py b/GaudiHive/options/ViewThenViewTest.py index 3dc71bd37caf222ff1824ef19a6f62cdc2f86709..45dedb53f9a85aa53845a421aa34482773945257 100644 --- a/GaudiHive/options/ViewThenViewTest.py +++ b/GaudiHive/options/ViewThenViewTest.py @@ -28,7 +28,7 @@ from Configurables import ( AlgResourcePool, AvalancheSchedulerSvc, CPUCruncher, - GaudiSequencer, + Gaudi__Sequencer, HiveSlimEventLoopMgr, HiveWhiteBoard, Test__ViewTester, @@ -108,15 +108,15 @@ for algo in [a1, a2, a3, a4, a5, a6, a7]: algo.Cardinality = cardinality algo.OutputLevel = DEBUG -viewNodeOne = GaudiSequencer( +viewNodeOne = Gaudi__Sequencer( "viewNodeOne", Members=[a2, a3], Sequential=False, OutputLevel=VERBOSE ) -viewNodeTwo = GaudiSequencer( +viewNodeTwo = Gaudi__Sequencer( "viewNodeTwo", Members=[a5, a6], Sequential=False, OutputLevel=VERBOSE ) -createViewSeq = GaudiSequencer( +createViewSeq = Gaudi__Sequencer( "createViewSeq", Members=[a1, viewNodeOne, a4, viewNodeTwo, a7], Sequential=True, diff --git a/GaudiHive/options/detectSimpleStall.py b/GaudiHive/options/detectSimpleStall.py index 7dcf5acd7627ac0d288f34bd66aa6ec375aecb5a..e44af5f5e6c09431d01a005d2853494522b1a242 100644 --- a/GaudiHive/options/detectSimpleStall.py +++ b/GaudiHive/options/detectSimpleStall.py @@ -58,7 +58,7 @@ a3 = CPUCruncher("A3") a3.inpKeys = ["/Event/a2"] # Assemble control flow graph -branch = GaudiSequencer( +branch = Gaudi__Sequencer( "EarlyExitBranch", ModeOR=False, ShortCircuit=True, Sequential=True ) branch.Members = [a1, a2] diff --git a/GaudiHive/python/GaudiHive/precedence.py b/GaudiHive/python/GaudiHive/precedence.py index 45c6a011b677448cfd267b1f959510e5d0c7bf9a..dcc39f561dbeb363ca3d1ba6812891894188a5f8 100644 --- a/GaudiHive/python/GaudiHive/precedence.py +++ b/GaudiHive/python/GaudiHive/precedence.py @@ -19,7 +19,7 @@ import warnings warnings.filterwarnings("ignore", message='"is" with a literal', category=SyntaxWarning) import networkx as nx -from Configurables import CPUCruncher, GaudiSequencer +from Configurables import CPUCruncher, Gaudi__Sequencer from Gaudi.Configuration import INFO @@ -283,7 +283,7 @@ class CruncherSequence(object): """Assemble the tree of sequencers.""" if not seq: - seq = GaudiSequencer(name, ShortCircuit=False) + seq = Gaudi__Sequencer(name, ShortCircuit=False) for n in self.cfg[name]: # extract entity name and type @@ -309,7 +309,7 @@ class CruncherSequence(object): else: self.dupl_seqs[n] += 1 - seq_daughter = GaudiSequencer(algo_name, OutputLevel=INFO) + seq_daughter = Gaudi__Sequencer(algo_name, OutputLevel=INFO) if self.cfg.nodes[n].get("ModeOR") == "True": self.OR_sequencers.append(n) seq_daughter.ModeOR = True diff --git a/GaudiHive/src/AlgResourcePool.cpp b/GaudiHive/src/AlgResourcePool.cpp index ce538705e99064699235ad98506bc09732c54f06..3eb4f6369bbc36fae49de21728c83cb4617f00c5 100644 --- a/GaudiHive/src/AlgResourcePool.cpp +++ b/GaudiHive/src/AlgResourcePool.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,10 +9,8 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include "AlgResourcePool.h" -#include "GaudiAlg/GaudiSequencer.h" -#include "GaudiKernel/ISvcLocator.h" - -// C++ +#include <Gaudi/Sequence.h> +#include <GaudiKernel/ISvcLocator.h> #include <functional> #include <queue> #include <sstream> diff --git a/GaudiHive/src/AlgResourcePool.h b/GaudiHive/src/AlgResourcePool.h index 590b06ae0d2f8d90c8d515b97d376b319290fbec..c36adb9b372266c43839e08fd442e113d36cfb82 100644 --- a/GaudiHive/src/AlgResourcePool.h +++ b/GaudiHive/src/AlgResourcePool.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,29 +8,25 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef GAUDIHIVE_ALGRESOURCEPOOL_H -#define GAUDIHIVE_ALGRESOURCEPOOL_H +#pragma once -#include "GaudiKernel/IAlgManager.h" -#include "GaudiKernel/IAlgResourcePool.h" -#include "GaudiKernel/IAlgorithm.h" -#include "GaudiKernel/Service.h" #include <Gaudi/Algorithm.h> - +#include <GaudiKernel/IAlgManager.h> +#include <GaudiKernel/IAlgResourcePool.h> +#include <GaudiKernel/IAlgorithm.h> +#include <GaudiKernel/Service.h> #include <atomic> #include <bitset> +#include <boost/dynamic_bitset.hpp> #include <list> #include <map> #include <mutex> #include <string> #include <string_view> +#include <tbb/concurrent_queue.h> #include <unordered_map> #include <vector> -// External libs -#include "boost/dynamic_bitset.hpp" -#include "tbb/concurrent_queue.h" - /** @class AlgResourcePool AlgResourcePool.h GaudiHive/AlgResourcePool.h The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface. @@ -112,5 +108,3 @@ private: /// The top list of algorithms std::list<IAlgorithm*> m_topAlgPtrList; }; - -#endif // GAUDIHIVE_ALGRESOURCEPOOL_H diff --git a/GaudiHive/src/CPUCruncher.cpp b/GaudiHive/src/CPUCruncher.cpp index b792e03164b4220bb23fd86fda035f451c3fb767..d7f6ffe12456ac08d9b3358928735a8acf1b5f51 100644 --- a/GaudiHive/src/CPUCruncher.cpp +++ b/GaudiHive/src/CPUCruncher.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,12 +9,11 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include "CPUCruncher.h" -#include "GaudiKernel/ThreadLocalContext.h" #include "HiveNumbers.h" +#include <GaudiKernel/ThreadLocalContext.h> #include <ctime> #include <sys/resource.h> #include <sys/times.h> - #include <tbb/blocked_range.h> #include <tbb/parallel_for.h> #include <tbb/tick_count.h> @@ -34,7 +33,7 @@ DECLARE_COMPONENT( CPUCruncher ) CPUCruncher::CPUCruncher( const std::string& name, // the algorithm instance name ISvcLocator* pSvc ) - : GaudiAlgorithm( name, pSvc ) { + : Algorithm( name, pSvc ) { // Register the algo in the static concurrent hash map in order to // monitor the # of copies @@ -50,7 +49,7 @@ CPUCruncher::~CPUCruncher() { } StatusCode CPUCruncher::initialize() { - auto sc = GaudiAlgorithm::initialize(); + auto sc = Algorithm::initialize(); if ( !sc ) return sc; m_crunchSvc = serviceLocator()->service( "CPUCrunchSvc" ); @@ -261,7 +260,7 @@ StatusCode CPUCruncher::finalize() // the finalization of the algorithm name_ninstances->second = 0; } - return GaudiAlgorithm::finalize(); + return Algorithm::finalize(); } //------------------------------------------------------------------------------ diff --git a/GaudiHive/src/CPUCruncher.h b/GaudiHive/src/CPUCruncher.h index 19ec7a11f24e15bdbdd7c132baf5e8f7a9400a2e..3341657964d7e7393e6f2a9db80579034f2c3afd 100644 --- a/GaudiHive/src/CPUCruncher.h +++ b/GaudiHive/src/CPUCruncher.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,12 +9,12 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/ICPUCrunchSvc.h" -#include "GaudiKernel/IRndmGenSvc.h" -#include "GaudiKernel/RegistryEntry.h" -#include "GaudiKernel/RndmGenerators.h" - +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataObjectHandle.h> +#include <GaudiKernel/ICPUCrunchSvc.h> +#include <GaudiKernel/IRndmGenSvc.h> +#include <GaudiKernel/RegistryEntry.h> +#include <GaudiKernel/RndmGenerators.h> #include <tbb/concurrent_hash_map.h> //------------------------------------------------------------------------------ @@ -26,7 +26,7 @@ * unit of the CPU. * */ -class CPUCruncher : public GaudiAlgorithm { +class CPUCruncher : public Algorithm { public: typedef tbb::concurrent_hash_map<std::string, unsigned int> CHM; diff --git a/GaudiHive/src/FetchDataFromFile.cpp b/GaudiHive/src/FetchDataFromFile.cpp index c0280f06deb5c662ad2117300a786bbd72bd6973..63ebba8b21baeaa53932584c85f929565d86b962 100644 --- a/GaudiHive/src/FetchDataFromFile.cpp +++ b/GaudiHive/src/FetchDataFromFile.cpp @@ -8,7 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/GaudiAlgorithm.h" +#include <GaudiKernel/Algorithm.h> namespace Gaudi { namespace Hive { diff --git a/GaudiHive/src/FetchLeavesFromFile.cpp b/GaudiHive/src/FetchLeavesFromFile.cpp index 08a9ee21bff9ce88ac81dbfaea692b456ff93b50..a39bb46c1b5734fb5fbef74e1ec7cd68abd86356 100644 --- a/GaudiHive/src/FetchLeavesFromFile.cpp +++ b/GaudiHive/src/FetchLeavesFromFile.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,8 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include <GaudiAlg/GaudiAlgorithm.h> -#include <GaudiAlg/Producer.h> +#include <Gaudi/Functional/Producer.h> #include <GaudiKernel/DataObject.h> #include <GaudiKernel/IDataManagerSvc.h> #include <GaudiKernel/IDataProviderSvc.h> diff --git a/GaudiHive/src/HiveReadAlgorithm.cpp b/GaudiHive/src/HiveReadAlgorithm.cpp index 47d3ff49f798ee487c24d6e663b36056ab4af4c2..15bbb20c17d7964c9e58a2efee69b86d474a9d42 100644 --- a/GaudiHive/src/HiveReadAlgorithm.cpp +++ b/GaudiHive/src/HiveReadAlgorithm.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,13 +8,13 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/DataStoreItem.h" -#include "GaudiKernel/ThreadLocalContext.h" +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataStoreItem.h> +#include <GaudiKernel/ThreadLocalContext.h> -class GAUDI_API HiveReadAlgorithm : public GaudiAlgorithm { +class GAUDI_API HiveReadAlgorithm : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; StatusCode execute() override; }; @@ -22,7 +22,7 @@ public: DECLARE_COMPONENT( HiveReadAlgorithm ) StatusCode HiveReadAlgorithm::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Algorithm::initialize(); if ( !sc ) return sc; return evtSvc()->addPreLoadItem( DataStoreItem( "/Event", 99 ) ); } diff --git a/GaudiHive/src/HiveTestAlgorithm.h b/GaudiHive/src/HiveTestAlgorithm.h index cc70a52bed7a980c1b202643b081b8d076516928..6c67f295cd54f2a5613305fc4a89fdae5afd5c86 100644 --- a/GaudiHive/src/HiveTestAlgorithm.h +++ b/GaudiHive/src/HiveTestAlgorithm.h @@ -1,20 +1,23 @@ -// -// HiveTestAlgorithm.h -// -// -// Created by Benedikt Hegner on 7/21/12. -// Copyright (c) 2012 __CERN__. All rights reserved. -// - -#include "GaudiAlg/GaudiAlgorithm.h" +/***********************************************************************************\ +* (c) Copyright 2012-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ #include <Gaudi/Property.h> +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataObjectHandle.h> -class GAUDI_API HiveTestAlgorithm : public GaudiAlgorithm { +class GAUDI_API HiveTestAlgorithm : public Algorithm { public: /** ** Constructor(s) **/ - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; /***************************** ** Public Function Members ** diff --git a/GaudiHive/src/PrecedenceSvc.cpp b/GaudiHive/src/PrecedenceSvc.cpp index 65149a02382afae982a9d68ccf62a7a752d4faae..1743e063c693bba878d8ba0bac59232cafbd2a7c 100644 --- a/GaudiHive/src/PrecedenceSvc.cpp +++ b/GaudiHive/src/PrecedenceSvc.cpp @@ -187,7 +187,7 @@ StatusCode PrecedenceSvc::assembleCFRules( Gaudi::Algorithm* algo, const std::st allPass = ( algo->getProperty( "IgnoreFilterPassed" ).toString() == "True" ); promptDecision = ( algo->getProperty( "ShortCircuit" ).toString() == "True" ); isInverted = ( algo->getProperty( "Invert" ).toString() == "True" ); - if ( allPass ) promptDecision = false; // standard GaudiSequencer behavior on all pass is to execute everything + if ( allPass ) promptDecision = false; // standard Gaudi::Sequencer behavior on all pass is to execute everything isSequential = ( algo->hasProperty( "Sequential" ) && ( algo->getProperty( "Sequential" ).toString() == "True" ) ); } else if ( isAthSequencer ) { modeOr = ( algo->getProperty( "ModeOR" ).toString() == "True" ); diff --git a/GaudiHive/src/ViewTester.cpp b/GaudiHive/src/ViewTester.cpp index aa6a054ad64e4c8f13bf4854b99b7f1a494527aa..56187cfe2f3d2ef9c3436336634b7fe437f7bb98 100644 --- a/GaudiHive/src/ViewTester.cpp +++ b/GaudiHive/src/ViewTester.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,7 +9,7 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ #include "ViewTester.h" -#include "GaudiKernel/ThreadLocalContext.h" +#include <GaudiKernel/ThreadLocalContext.h> DECLARE_COMPONENT( Test::ViewTester ) @@ -25,10 +25,10 @@ using namespace Test; ViewTester::ViewTester( const std::string& name, // the algorithm instance name ISvcLocator* pSvc ) - : GaudiAlgorithm( name, pSvc ) {} + : Algorithm( name, pSvc ) {} StatusCode ViewTester::initialize() { - auto sc = GaudiAlgorithm::initialize(); + auto sc = Algorithm::initialize(); if ( !sc ) return sc; // This is a bit ugly. There is no way to declare a vector of DataObjectHandles, so @@ -102,12 +102,3 @@ StatusCode ViewTester::execute() // the execution of the algorithm return StatusCode::SUCCESS; } - -//------------------------------------------------------------------------------ - -StatusCode ViewTester::finalize() // the finalization of the algorithm -{ - return GaudiAlgorithm::finalize(); -} - -//------------------------------------------------------------------------------ diff --git a/GaudiHive/src/ViewTester.h b/GaudiHive/src/ViewTester.h index 9d30e64a4ab88475dc79afaf4fe120bcc7681596..564f96d60339352bcc86901defd64dca4545b3ae 100644 --- a/GaudiHive/src/ViewTester.h +++ b/GaudiHive/src/ViewTester.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,11 +8,11 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ - -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/IScheduler.h" -#include "GaudiKernel/RegistryEntry.h" -#include "GaudiKernel/RndmGenerators.h" +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/DataObjectHandle.h> +#include <GaudiKernel/IScheduler.h> +#include <GaudiKernel/RegistryEntry.h> +#include <GaudiKernel/RndmGenerators.h> //------------------------------------------------------------------------------ @@ -22,7 +22,7 @@ */ namespace Test { - class ViewTester : public GaudiAlgorithm { + class ViewTester : public Algorithm { public: bool isClonable() const override { return true; } @@ -31,8 +31,6 @@ namespace Test { StatusCode execute() override; /// Its initialization StatusCode initialize() override; - /// the finalization of the algorithm - StatusCode finalize() override; ViewTester( const std::string& name, // the algorithm instance name ISvcLocator* pSvc ); // the Service Locator diff --git a/GaudiHive/tests/qmtest/refs/SubSlotVsSlotIsolation.ref b/GaudiHive/tests/qmtest/refs/SubSlotVsSlotIsolation.ref index 595ba079ca2f22d15b7fcea5100b1e7877dd6fcb..e3958ca5ce4ffd795d37bfb486a32c3f4269f9d1 100644 --- a/GaudiHive/tests/qmtest/refs/SubSlotVsSlotIsolation.ref +++ b/GaudiHive/tests/qmtest/refs/SubSlotVsSlotIsolation.ref @@ -1,6 +1,6 @@ # setting LC_ALL to "C" -# --> Including file '/builds/gaudi/Gaudi/GaudiHive/options/SubSlotVsSlotIsolation.py' -# <-- End of file '/builds/gaudi/Gaudi/GaudiHive/options/SubSlotVsSlotIsolation.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/SubSlotVsSlotIsolation.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/SubSlotVsSlotIsolation.py' # Dumping all configurables and properties (different from default) {'A1': {'Cardinality': 1, 'OutputLevel': 2, @@ -33,7 +33,7 @@ 'EvtSel': 'NONE', 'ExtSvc': ['HiveWhiteBoard/EventDataSvc'], 'MessageSvcType': 'InertMessageSvc', - 'TopAlg': ['GaudiSequencer/createViewSeq']}, + 'TopAlg': ['Gaudi::Sequencer/createViewSeq']}, 'AvalancheSchedulerSvc': {'OutputLevel': 3, 'ThreadPoolSize': 1, 'VerboseSubSlots': True}, @@ -41,9 +41,9 @@ 'HiveSlimEventLoopMgr': {'OutputLevel': 2, 'SchedulerName': 'AvalancheSchedulerSvc'}, 'createViewSeq': {'Members': ['Test::ViewTester/A1', - 'GaudiSequencer/viewNodeOne', + 'Gaudi::Sequencer/viewNodeOne', 'Test::ViewTester/A4', - 'GaudiSequencer/viewNodeTwo', + 'Gaudi::Sequencer/viewNodeTwo', 'Test::ViewTester/A7'], 'OutputLevel': 1, 'Sequential': True}, @@ -56,8 +56,8 @@ MessageSvc INFO Activating in a separate thread ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v34r1) - running on runner-7f-zqs17-project-38-concurrent-0 on Mon Oct 19 16:18:29 2020 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 19:24:52 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully HiveSlimEventLo... DEBUG Property update for OutputLevel : new value = 2 @@ -70,185 +70,30 @@ AlgResourcePool INFO TopAlg list empty. Recovering the one of Application M createViewSeq DEBUG Property update for OutputLevel : new value = 1 createViewSeq VERBOSE ServiceLocatorHelper::service: found service EventDataSvc createViewSeq VERBOSE ServiceLocatorHelper::service: found service TimelineSvc -createViewSeq DEBUG ==> Initialise -createViewSeq VERBOSE ServiceLocatorHelper::service: found service ApplicationMgr -createViewSeq DEBUG Added algorithm A1 -createViewSeq DEBUG Added algorithm viewNodeOne -createViewSeq DEBUG Added algorithm A4 -createViewSeq DEBUG Added algorithm viewNodeTwo -createViewSeq DEBUG Added algorithm A7 -createViewSeq INFO Member list: Test::ViewTester/A1, GaudiSequencer/viewNodeOne, Test::ViewTester/A4, GaudiSequencer/viewNodeTwo, Test::ViewTester/A7 -createViewSeq VERBOSE ServiceLocatorHelper::service: found service ToolSvc -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -ToolSvc.Sequenc... INFO This machine has a speed about 2.94 times the speed of a 2.8 GHz Xeon. -createViewSeq DEBUG Registering tool ToolSvc.SequencerTimerTool -createViewSeq DEBUG Releasing tool 'ToolSvc.SequencerTimerTool' -createViewSeq DEBUG De-Registering tool ToolSvc.SequencerTimerTool -createViewSeq DEBUG The tool 'ToolSvc.SequencerTimerTool' of type 'SequencerTimerTool' is released +createViewSeq DEBUG A1 doesn't exist - created and appended to member list +createViewSeq DEBUG viewNodeOne doesn't exist - created and appended to member list +createViewSeq DEBUG A4 doesn't exist - created and appended to member list +createViewSeq DEBUG viewNodeTwo doesn't exist - created and appended to member list +createViewSeq DEBUG A7 doesn't exist - created and appended to member list +createViewSeq INFO Member list: Test::ViewTester/A1, Gaudi::Sequencer/viewNodeOne, Test::ViewTester/A4, Gaudi::Sequencer/viewNodeTwo, Test::ViewTester/A7 A1 DEBUG Property update for OutputLevel : new value = 2 -A1 DEBUG Initialize base class GaudiCommon<Algorithm> -A1 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A1 DEBUG List of ALL properties of Test::ViewTester/A1 #properties = 33 -A1 DEBUG Property ['Name': Value] = 'viewNodeName':'viewNodeOne' -A1 DEBUG Property ['Name': Value] = 'viewNumber':1 -A1 DEBUG Property ['Name': Value] = 'baseViewName':'viewOne' -A1 DEBUG Property ['Name': Value] = 'outKeys':[ ] -A1 DEBUG Property ['Name': Value] = 'inpKeys':[ ] -A1 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A1 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A1 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A1 DEBUG Property ['Name': Value] = 'Context':'' -A1 DEBUG Property ['Name': Value] = 'TypePrint':True -A1 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A1 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A1 DEBUG Property ['Name': Value] = 'RootInTES':'' -A1 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A1 DEBUG Property ['Name': Value] = 'Blocking':False -A1 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A1 DEBUG Property ['Name': Value] = 'Cardinality':1 -A1 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A1 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A1 DEBUG Property ['Name': Value] = 'Timeline':False -A1 DEBUG Property ['Name': Value] = 'AuditStop':False -A1 DEBUG Property ['Name': Value] = 'AuditStart':False -A1 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A1 DEBUG Property ['Name': Value] = 'AuditExecute':False -A1 DEBUG Property ['Name': Value] = 'AuditRestart':False -A1 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A1 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A1 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A1 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A1 DEBUG Property ['Name': Value] = 'Enable':True -A1 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A1 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A1 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A1 DEBUG input handles: 0 A1 DEBUG output handles: 0 A1 DEBUG Data Deps for A1 viewNodeOne INFO Member list: Test::ViewTester/A2, Test::ViewTester/A3 A2 DEBUG Property update for OutputLevel : new value = 2 -A2 DEBUG Initialize base class GaudiCommon<Algorithm> -A2 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A2 DEBUG List of ALL properties of Test::ViewTester/A2 #properties = 33 -A2 DEBUG Property ['Name': Value] = 'viewNodeName':'' -A2 DEBUG Property ['Name': Value] = 'viewNumber':0 -A2 DEBUG Property ['Name': Value] = 'baseViewName':'view' -A2 DEBUG Property ['Name': Value] = 'outKeys':[ '/Event/a2' ] -A2 DEBUG Property ['Name': Value] = 'inpKeys':[ ] -A2 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A2 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A2 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A2 DEBUG Property ['Name': Value] = 'Context':'' -A2 DEBUG Property ['Name': Value] = 'TypePrint':True -A2 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A2 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A2 DEBUG Property ['Name': Value] = 'RootInTES':'' -A2 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A2 DEBUG Property ['Name': Value] = 'Blocking':False -A2 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A2 DEBUG Property ['Name': Value] = 'Cardinality':1 -A2 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A2 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A2 DEBUG Property ['Name': Value] = 'Timeline':False -A2 DEBUG Property ['Name': Value] = 'AuditStop':False -A2 DEBUG Property ['Name': Value] = 'AuditStart':False -A2 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A2 DEBUG Property ['Name': Value] = 'AuditExecute':False -A2 DEBUG Property ['Name': Value] = 'AuditRestart':False -A2 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A2 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A2 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A2 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A2 DEBUG Property ['Name': Value] = 'Enable':True -A2 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A2 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A2 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A2 DEBUG adding output key /Event/a2 A2 DEBUG input handles: 0 A2 DEBUG output handles: 1 A2 DEBUG Data Deps for A2 + OUTPUT '/Event/a2' A3 DEBUG Property update for OutputLevel : new value = 2 -A3 DEBUG Initialize base class GaudiCommon<Algorithm> -A3 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A3 DEBUG List of ALL properties of Test::ViewTester/A3 #properties = 33 -A3 DEBUG Property ['Name': Value] = 'viewNodeName':'' -A3 DEBUG Property ['Name': Value] = 'viewNumber':0 -A3 DEBUG Property ['Name': Value] = 'baseViewName':'view' -A3 DEBUG Property ['Name': Value] = 'outKeys':[ ] -A3 DEBUG Property ['Name': Value] = 'inpKeys':[ '/Event/a2' ] -A3 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A3 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A3 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A3 DEBUG Property ['Name': Value] = 'Context':'' -A3 DEBUG Property ['Name': Value] = 'TypePrint':True -A3 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A3 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A3 DEBUG Property ['Name': Value] = 'RootInTES':'' -A3 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A3 DEBUG Property ['Name': Value] = 'Blocking':False -A3 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A3 DEBUG Property ['Name': Value] = 'Cardinality':1 -A3 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A3 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A3 DEBUG Property ['Name': Value] = 'Timeline':False -A3 DEBUG Property ['Name': Value] = 'AuditStop':False -A3 DEBUG Property ['Name': Value] = 'AuditStart':False -A3 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A3 DEBUG Property ['Name': Value] = 'AuditExecute':False -A3 DEBUG Property ['Name': Value] = 'AuditRestart':False -A3 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A3 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A3 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A3 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A3 DEBUG Property ['Name': Value] = 'Enable':True -A3 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A3 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A3 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A3 DEBUG adding input key /Event/a2 A3 DEBUG input handles: 1 A3 DEBUG output handles: 0 A3 DEBUG Data Deps for A3 + INPUT '/Event/a2' A4 DEBUG Property update for OutputLevel : new value = 2 -A4 DEBUG Initialize base class GaudiCommon<Algorithm> -A4 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A4 DEBUG List of ALL properties of Test::ViewTester/A4 #properties = 33 -A4 DEBUG Property ['Name': Value] = 'viewNodeName':'viewNodeTwo' -A4 DEBUG Property ['Name': Value] = 'viewNumber':1 -A4 DEBUG Property ['Name': Value] = 'baseViewName':'viewTwo' -A4 DEBUG Property ['Name': Value] = 'outKeys':[ '/Event/a4' ] -A4 DEBUG Property ['Name': Value] = 'inpKeys':[ ] -A4 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A4 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A4 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A4 DEBUG Property ['Name': Value] = 'Context':'' -A4 DEBUG Property ['Name': Value] = 'TypePrint':True -A4 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A4 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A4 DEBUG Property ['Name': Value] = 'RootInTES':'' -A4 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A4 DEBUG Property ['Name': Value] = 'Blocking':False -A4 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A4 DEBUG Property ['Name': Value] = 'Cardinality':1 -A4 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A4 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A4 DEBUG Property ['Name': Value] = 'Timeline':False -A4 DEBUG Property ['Name': Value] = 'AuditStop':False -A4 DEBUG Property ['Name': Value] = 'AuditStart':False -A4 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A4 DEBUG Property ['Name': Value] = 'AuditExecute':False -A4 DEBUG Property ['Name': Value] = 'AuditRestart':False -A4 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A4 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A4 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A4 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A4 DEBUG Property ['Name': Value] = 'Enable':True -A4 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A4 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A4 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A4 DEBUG adding output key /Event/a4 A4 DEBUG input handles: 0 A4 DEBUG output handles: 1 @@ -256,136 +101,28 @@ A4 DEBUG Data Deps for A4 + OUTPUT '/Event/a4' viewNodeTwo INFO Member list: Test::ViewTester/A5, Test::ViewTester/A6 A5 DEBUG Property update for OutputLevel : new value = 2 -A5 DEBUG Initialize base class GaudiCommon<Algorithm> -A5 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A5 DEBUG List of ALL properties of Test::ViewTester/A5 #properties = 33 -A5 DEBUG Property ['Name': Value] = 'viewNodeName':'' -A5 DEBUG Property ['Name': Value] = 'viewNumber':0 -A5 DEBUG Property ['Name': Value] = 'baseViewName':'view' -A5 DEBUG Property ['Name': Value] = 'outKeys':[ ] -A5 DEBUG Property ['Name': Value] = 'inpKeys':[ '/Event/a4' ] -A5 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A5 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A5 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A5 DEBUG Property ['Name': Value] = 'Context':'' -A5 DEBUG Property ['Name': Value] = 'TypePrint':True -A5 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A5 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A5 DEBUG Property ['Name': Value] = 'RootInTES':'' -A5 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A5 DEBUG Property ['Name': Value] = 'Blocking':False -A5 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A5 DEBUG Property ['Name': Value] = 'Cardinality':1 -A5 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A5 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A5 DEBUG Property ['Name': Value] = 'Timeline':False -A5 DEBUG Property ['Name': Value] = 'AuditStop':False -A5 DEBUG Property ['Name': Value] = 'AuditStart':False -A5 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A5 DEBUG Property ['Name': Value] = 'AuditExecute':False -A5 DEBUG Property ['Name': Value] = 'AuditRestart':False -A5 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A5 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A5 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A5 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A5 DEBUG Property ['Name': Value] = 'Enable':True -A5 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A5 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A5 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A5 DEBUG adding input key /Event/a4 A5 DEBUG input handles: 1 A5 DEBUG output handles: 0 A5 DEBUG Data Deps for A5 + INPUT '/Event/a4' A6 DEBUG Property update for OutputLevel : new value = 2 -A6 DEBUG Initialize base class GaudiCommon<Algorithm> -A6 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A6 DEBUG List of ALL properties of Test::ViewTester/A6 #properties = 33 -A6 DEBUG Property ['Name': Value] = 'viewNodeName':'' -A6 DEBUG Property ['Name': Value] = 'viewNumber':0 -A6 DEBUG Property ['Name': Value] = 'baseViewName':'view' -A6 DEBUG Property ['Name': Value] = 'outKeys':[ ] -A6 DEBUG Property ['Name': Value] = 'inpKeys':[ ] -A6 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A6 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A6 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A6 DEBUG Property ['Name': Value] = 'Context':'' -A6 DEBUG Property ['Name': Value] = 'TypePrint':True -A6 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A6 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A6 DEBUG Property ['Name': Value] = 'RootInTES':'' -A6 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A6 DEBUG Property ['Name': Value] = 'Blocking':False -A6 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A6 DEBUG Property ['Name': Value] = 'Cardinality':1 -A6 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A6 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A6 DEBUG Property ['Name': Value] = 'Timeline':False -A6 DEBUG Property ['Name': Value] = 'AuditStop':False -A6 DEBUG Property ['Name': Value] = 'AuditStart':False -A6 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A6 DEBUG Property ['Name': Value] = 'AuditExecute':False -A6 DEBUG Property ['Name': Value] = 'AuditRestart':False -A6 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A6 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A6 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A6 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A6 DEBUG Property ['Name': Value] = 'Enable':True -A6 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A6 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A6 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A6 DEBUG input handles: 0 A6 DEBUG output handles: 0 A6 DEBUG Data Deps for A6 A7 DEBUG Property update for OutputLevel : new value = 2 -A7 DEBUG Initialize base class GaudiCommon<Algorithm> -A7 DEBUG could not locate CounterSummarySvc, no counter summary will be made -A7 DEBUG List of ALL properties of Test::ViewTester/A7 #properties = 33 -A7 DEBUG Property ['Name': Value] = 'viewNodeName':'' -A7 DEBUG Property ['Name': Value] = 'viewNumber':0 -A7 DEBUG Property ['Name': Value] = 'baseViewName':'view' -A7 DEBUG Property ['Name': Value] = 'outKeys':[ ] -A7 DEBUG Property ['Name': Value] = 'inpKeys':[ ] -A7 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] -A7 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] -A7 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -A7 DEBUG Property ['Name': Value] = 'Context':'' -A7 DEBUG Property ['Name': Value] = 'TypePrint':True -A7 DEBUG Property ['Name': Value] = 'PropertiesPrint':False -A7 DEBUG Property ['Name': Value] = 'ErrorsPrint':True -A7 DEBUG Property ['Name': Value] = 'RootInTES':'' -A7 DEBUG Property ['Name': Value] = 'FilterCircularDependencies':True -A7 DEBUG Property ['Name': Value] = 'Blocking':False -A7 DEBUG Property ['Name': Value] = 'NeededResources':[ ] -A7 DEBUG Property ['Name': Value] = 'Cardinality':1 -A7 DEBUG Property ['Name': Value] = 'RegisterForContextService':True -A7 DEBUG Property ['Name': Value] = 'MonitorService':'MonitorSvc' -A7 DEBUG Property ['Name': Value] = 'Timeline':False -A7 DEBUG Property ['Name': Value] = 'AuditStop':False -A7 DEBUG Property ['Name': Value] = 'AuditStart':False -A7 DEBUG Property ['Name': Value] = 'AuditFinalize':False -A7 DEBUG Property ['Name': Value] = 'AuditExecute':False -A7 DEBUG Property ['Name': Value] = 'AuditRestart':False -A7 DEBUG Property ['Name': Value] = 'AuditReinitialize':False -A7 DEBUG Property ['Name': Value] = 'AuditInitialize':False -A7 DEBUG Property ['Name': Value] = 'AuditAlgorithms':False -A7 DEBUG Property ['Name': Value] = 'ErrorMax':1 -A7 DEBUG Property ['Name': Value] = 'Enable':True -A7 DEBUG Property ['Name': Value] = 'OutputLevel':2 -A7 DEBUG Property ['Name': Value] = 'ExtraOutputs':[] -A7 DEBUG Property ['Name': Value] = 'ExtraInputs':[] A7 DEBUG input handles: 0 A7 DEBUG output handles: 0 A7 DEBUG Data Deps for A7 createViewSeq VERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc AlgResourcePool DEBUG List of algorithms is: -AlgResourcePool DEBUG o Test::ViewTester/A1 @ 0x148af30 -AlgResourcePool DEBUG o Test::ViewTester/A2 @ 0x14bfe50 -AlgResourcePool DEBUG o Test::ViewTester/A3 @ 0x14c1be0 -AlgResourcePool DEBUG o Test::ViewTester/A4 @ 0x148ebd0 -AlgResourcePool DEBUG o Test::ViewTester/A5 @ 0x14cd5f0 -AlgResourcePool DEBUG o Test::ViewTester/A6 @ 0x14cf060 -AlgResourcePool DEBUG o Test::ViewTester/A7 @ 0x1492880 +AlgResourcePool DEBUG o Test::ViewTester/A1 @ 0x39d9d10 +AlgResourcePool DEBUG o Test::ViewTester/A2 @ 0x39e4f30 +AlgResourcePool DEBUG o Test::ViewTester/A3 @ 0x39e63d0 +AlgResourcePool DEBUG o Test::ViewTester/A4 @ 0x39dd940 +AlgResourcePool DEBUG o Test::ViewTester/A5 @ 0x39ee3e0 +AlgResourcePool DEBUG o Test::ViewTester/A6 @ 0x39ef770 +AlgResourcePool DEBUG o Test::ViewTester/A7 @ 0x39e0370 AvalancheSchedu... INFO Found 7 algorithms AvalancheSchedu... INFO Data Dependencies for Algorithms: A1 @@ -501,34 +238,10 @@ PrecedenceSvc WARNING To trace temporal and topological aspects of execution HiveSlimEventLo... DEBUG Context obtained HiveSlimEventLo... FATAL Failed event detected on s: 0 e: 0 HiveSlimEventLo... DEBUG Clearing slot 0 (event 0) of the whiteboard -HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 54.918 total time 12280761 +HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 130.129 total time 2951536 HiveSlimEventLo... INFO 0 events were SKIPed ApplicationMgr INFO Application Manager Stopped successfully -createViewSeq DEBUG Tools to release : -createViewSeq DEBUG Services to release : -A1 DEBUG Finalize base class GaudiAlgorithm -A1 DEBUG Tools to release : -A1 DEBUG Services to release : -A2 DEBUG Finalize base class GaudiAlgorithm -A2 DEBUG Tools to release : -A2 DEBUG Services to release : -A3 DEBUG Finalize base class GaudiAlgorithm -A3 DEBUG Tools to release : -A3 DEBUG Services to release : -A4 DEBUG Finalize base class GaudiAlgorithm -A4 DEBUG Tools to release : -A4 DEBUG Services to release : -A5 DEBUG Finalize base class GaudiAlgorithm -A5 DEBUG Tools to release : -A5 DEBUG Services to release : -A6 DEBUG Finalize base class GaudiAlgorithm -A6 DEBUG Tools to release : -A6 DEBUG Services to release : -A7 DEBUG Finalize base class GaudiAlgorithm -A7 DEBUG Tools to release : -A7 DEBUG Services to release : HiveSlimEventLo... INFO Histograms converted successfully according to request. AvalancheSchedu... INFO Joining Scheduler thread -ToolSvc INFO Removing all tools created by ToolSvc ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiHive/tests/qmtest/refs/ViewExceptionTest.ref b/GaudiHive/tests/qmtest/refs/ViewExceptionTest.ref index 16425a6f5ffb0e4ad90dfd5f1662f1ef14213fc0..9091eb7c4c761a80d237cc46c20e559c91b54596 100644 --- a/GaudiHive/tests/qmtest/refs/ViewExceptionTest.ref +++ b/GaudiHive/tests/qmtest/refs/ViewExceptionTest.ref @@ -1,6 +1,8 @@ # setting LC_ALL to "C" -# --> Including file '/workdir/gaudi/GaudiHive/options/SubSlotException.py' -# <-- End of file '/workdir/gaudi/GaudiHive/options/SubSlotException.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/SubSlotException.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/SubSlotException.py' +# --> Including file '/tmp/marcocle/tmpr0_r55f2.py' +# <-- End of file '/tmp/marcocle/tmpr0_r55f2.py' # Dumping all configurables and properties (different from default) {'A1': {'Cardinality': 1, 'OutputLevel': 3, @@ -19,7 +21,7 @@ 'EvtSel': 'NONE', 'ExtSvc': ['HiveWhiteBoard/EventDataSvc'], 'MessageSvcType': 'InertMessageSvc', - 'TopAlg': ['GaudiSequencer/createViewSeq']}, + 'TopAlg': ['Gaudi::Sequencer/createViewSeq']}, 'AvalancheSchedulerSvc': {'OutputLevel': 3, 'ThreadPoolSize': 1, 'VerboseSubSlots': True}, @@ -27,7 +29,7 @@ 'HiveSlimEventLoopMgr': {'OutputLevel': 3, 'SchedulerName': 'AvalancheSchedulerSvc'}, 'createViewSeq': {'Members': ['Test::ViewTester/A1', - 'GaudiSequencer/viewNode', + 'Gaudi::Sequencer/viewNode', 'Test::ViewTester/A4'], 'OutputLevel': 3, 'Sequential': True}, @@ -39,18 +41,14 @@ MessageSvc INFO Activating in a separate thread ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v36r0) - running on 05d0ccd909cb on Mon Aug 16 17:47:42 2021 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 19:34:27 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully ThreadPoolSvc INFO no thread init tools attached AvalancheSchedu... INFO Activating scheduler in a separate thread AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager -createViewSeq INFO Member list: Test::ViewTester/A1, GaudiSequencer/viewNode, Test::ViewTester/A4 -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -ToolSvc.Sequenc... INFO This machine has a speed about 2.94 times the speed of a 2.8 GHz Xeon. +createViewSeq INFO Member list: Test::ViewTester/A1, Gaudi::Sequencer/viewNode, Test::ViewTester/A4 viewNode INFO Member list: Test::ViewTester/A2, GaudiTesting::StopLoopAlg/A3 AvalancheSchedu... INFO Found 4 algorithms AvalancheSchedu... INFO Data Dependencies for Algorithms: @@ -92,11 +90,10 @@ A2 INFO Running in view view0 A3 INFO 1 events to go A2 INFO Running in view view1 A3 INFO Stopping loop with exception -A3 FATAL GaudiTesting::StopLoopAlg:: Exception throw: Stopping loop StatusCode=FAILURE -A3 FATAL Exception with tag= is caught -A3 ERROR A3:: Stopping loop StatusCode=FAILURE -AlgTask FATAL .executeEvent(): Exception with tag= thrown by A3 -AlgTask ERROR A3:: Stopping loop StatusCode=FAILURE +A3 FATAL Exception with tag=A3 is caught +A3 ERROR A3 Stopping loop StatusCode=FAILURE +AlgTask FATAL .executeEvent(): Exception with tag=A3 thrown by A3 +AlgTask ERROR A3 Stopping loop StatusCode=FAILURE AvalancheSchedu... ERROR *** Stall detected, event context: s: 0 e: 1 AvalancheSchedu... ERROR Event 1 on slot 0 failed AvalancheSchedu... INFO Dumping scheduler state @@ -114,6 +111,7 @@ WARNING Enable TimelineSvc in record mode (RecordTimeline = True) to trace the m ERROR alg(s): in subslot(s) + Number of sub-slots: 2 [ slot: 0, sub-slot: 0, entry: viewNode, event: 1 ]: @@ -132,13 +130,10 @@ ERROR alg(s): A3 PrecedenceSvc WARNING To trace temporal and topological aspects of execution flow, set DumpPrecedenceRules property to True HiveSlimEventLo... FATAL Failed event detected on s: 0 e: 1 -HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 152.238 total time 3002218 +HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 219.785 total time 4035442 HiveSlimEventLo... INFO 0 events were SKIPed ApplicationMgr INFO Application Manager Stopped successfully -A3 SUCCESS Exceptions/Errors/Warnings/Infos Statistics : 1/0/0/0 -A3 SUCCESS #EXCEPTIONS = 1 Message = 'Stopping loop' HiveSlimEventLo... INFO Histograms converted successfully according to request. AvalancheSchedu... INFO Joining Scheduler thread -ToolSvc INFO Removing all tools created by ToolSvc ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr ERROR Application Manager Terminated with error code 6 diff --git a/GaudiHive/tests/qmtest/refs/ViewIsolationTest.ref b/GaudiHive/tests/qmtest/refs/ViewIsolationTest.ref index ff066a52f88aaab8a8a351619bc4b143bae54465..a82e351011a09a912b3fffba24cca4449c72c9bf 100644 --- a/GaudiHive/tests/qmtest/refs/ViewIsolationTest.ref +++ b/GaudiHive/tests/qmtest/refs/ViewIsolationTest.ref @@ -1,6 +1,6 @@ # setting LC_ALL to "C" -# --> Including file '/home/ishapova/workspace/eclipse.workspaces/GaudiMT/GaudiMC/GaudiHive/options/ViewIsolationTest.py' -# <-- End of file '/home/ishapova/workspace/eclipse.workspaces/GaudiMT/GaudiMC/GaudiHive/options/ViewIsolationTest.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/ViewIsolationTest.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/ViewIsolationTest.py' # Dumping all configurables and properties (different from default) {'A1': {'Cardinality': 1, 'OutputLevel': 3, @@ -21,47 +21,43 @@ 'EvtSel': 'NONE', 'ExtSvc': ['HiveWhiteBoard/EventDataSvc'], 'MessageSvcType': 'InertMessageSvc', - 'TopAlg': ['GaudiSequencer/createViewSeq']}, + 'TopAlg': ['Gaudi::Sequencer/createViewSeq']}, 'AvalancheSchedulerSvc': {'OutputLevel': 3, 'ThreadPoolSize': 1}, 'EventDataSvc': {'EventSlots': 1}, 'HiveSlimEventLoopMgr': {'OutputLevel': 3, 'SchedulerName': 'AvalancheSchedulerSvc'}, 'createViewSeq': {'Members': ['Test::ViewTester/A1', - 'GaudiSequencer/viewNodeOne', + 'Gaudi::Sequencer/viewNodeOne', 'Test::ViewTester/A4', - 'GaudiSequencer/viewNodeTwo', + 'Gaudi::Sequencer/viewNodeTwo', 'Test::ViewTester/A5'], 'OutputLevel': 3, 'Sequential': True}, 'extraNode': {'Members': ['Test::ViewTester/A2', 'Test::ViewTester/A3'], 'OutputLevel': 3, 'Sequential': True}, - 'viewNodeOne': {'Members': ['GaudiSequencer/extraNode'], + 'viewNodeOne': {'Members': ['Gaudi::Sequencer/extraNode'], 'OutputLevel': 3, 'Sequential': False, 'ShortCircuit': False}, - 'viewNodeTwo': {'Members': ['GaudiSequencer/extraNode'], + 'viewNodeTwo': {'Members': ['Gaudi::Sequencer/extraNode'], 'OutputLevel': 3, 'Sequential': False, 'ShortCircuit': False}} MessageSvc INFO Activating in a separate thread ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on horizon-76 on Thu Mar 7 15:35:40 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 19:24:56 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully ThreadPoolSvc INFO no thread init tools attached AvalancheSchedu... INFO Activating scheduler in a separate thread AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager -createViewSeq INFO Member list: Test::ViewTester/A1, GaudiSequencer/viewNodeOne, Test::ViewTester/A4, GaudiSequencer/viewNodeTwo, Test::ViewTester/A5 -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -ToolSvc.Sequenc... INFO This machine has a speed about 3.33 times the speed of a 2.8 GHz Xeon. -viewNodeOne INFO Member list: GaudiSequencer/extraNode +createViewSeq INFO Member list: Test::ViewTester/A1, Gaudi::Sequencer/viewNodeOne, Test::ViewTester/A4, Gaudi::Sequencer/viewNodeTwo, Test::ViewTester/A5 +viewNodeOne INFO Member list: Gaudi::Sequencer/extraNode extraNode INFO Member list: Test::ViewTester/A2, Test::ViewTester/A3 -viewNodeTwo INFO Member list: GaudiSequencer/extraNode +viewNodeTwo INFO Member list: Gaudi::Sequencer/extraNode AvalancheSchedu... INFO Found 5 algorithms AvalancheSchedu... INFO Data Dependencies for Algorithms: A1 @@ -85,7 +81,6 @@ AvalancheSchedu... INFO o Preemptive scheduling of CPU-blocking tasks: disabl AvalancheSchedu... INFO o Scheduling of condition tasks: disabled HiveSlimEventLo...WARNING Unable to locate service "EventSelector" HiveSlimEventLo...WARNING No events will be processed from external input. -HistogramPersis...WARNING Histograms saving not required. HiveSlimEventLo... INFO Found 0 events in black list ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully @@ -240,16 +235,10 @@ A2 INFO Running in view viewTwo1 A3 INFO Running in view viewTwo0 A3 INFO Running in view viewTwo1 A5 INFO Running in whole event context -HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 66.5469 total time 1624932 +HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 125.648 total time 2355420 HiveSlimEventLo... INFO 0 events were SKIPed ApplicationMgr INFO Application Manager Stopped successfully HiveSlimEventLo... INFO Histograms converted successfully according to request. AvalancheSchedu... INFO Joining Scheduler thread -ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO This machine has a speed about 3.33 times the speed of a 2.8 GHz Xeon. -ToolSvc.Sequenc... INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiHive/tests/qmtest/refs/ViewTest.ref b/GaudiHive/tests/qmtest/refs/ViewTest.ref index ad280114f5fb1fbae6953ef8d6eb577e93bf100d..a0cd575ab437c4716f1423454185ddaad58cd0c9 100644 --- a/GaudiHive/tests/qmtest/refs/ViewTest.ref +++ b/GaudiHive/tests/qmtest/refs/ViewTest.ref @@ -1,6 +1,6 @@ # setting LC_ALL to "C" -# --> Including file '/afs/cern.ch/work/b/bwynne/IllyaGaudi/GaudiHive/options/BasicViewTest.py' -# <-- End of file '/afs/cern.ch/work/b/bwynne/IllyaGaudi/GaudiHive/options/BasicViewTest.py' +# --> Including file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/BasicViewTest.py' +# <-- End of file '/home/marcocle/stacks/master/Gaudi/GaudiHive/options/BasicViewTest.py' # Dumping all configurables and properties (different from default) {'A1': {'Cardinality': 1, 'OutputLevel': 3, @@ -16,13 +16,13 @@ 'EvtSel': 'NONE', 'ExtSvc': ['HiveWhiteBoard/EventDataSvc'], 'MessageSvcType': 'InertMessageSvc', - 'TopAlg': ['GaudiSequencer/createViewSeq']}, + 'TopAlg': ['Gaudi::Sequencer/createViewSeq']}, 'AvalancheSchedulerSvc': {'OutputLevel': 3, 'ThreadPoolSize': 1}, 'EventDataSvc': {'EventSlots': 1}, 'HiveSlimEventLoopMgr': {'OutputLevel': 3, 'SchedulerName': 'AvalancheSchedulerSvc'}, 'createViewSeq': {'Members': ['Test::ViewTester/A1', - 'GaudiSequencer/viewNode', + 'Gaudi::Sequencer/viewNode', 'Test::ViewTester/A4'], 'OutputLevel': 3, 'Sequential': True}, @@ -33,18 +33,14 @@ MessageSvc INFO Activating in a separate thread ApplicationMgr SUCCESS ==================================================================================================================================== - Welcome to ApplicationMgr (GaudiCoreSvc v31r0) - running on lxplus748.cern.ch on Thu May 2 18:45:31 2019 + Welcome to ApplicationMgr (GaudiCoreSvc v36r12) + running on lbbuildinter01.cern.ch on Fri Apr 21 19:25:01 2023 ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully ThreadPoolSvc INFO no thread init tools attached AvalancheSchedu... INFO Activating scheduler in a separate thread AlgResourcePool INFO TopAlg list empty. Recovering the one of Application Manager -createViewSeq INFO Member list: Test::ViewTester/A1, GaudiSequencer/viewNode, Test::ViewTester/A4 -RndmGenSvc.Engine INFO Generator engine type:CLHEP::RanluxEngine -RndmGenSvc.Engine INFO Current Seed:1234567 Luxury:3 -RndmGenSvc INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine> -ToolSvc.Sequenc... INFO This machine has a speed about 3.03 times the speed of a 2.8 GHz Xeon. +createViewSeq INFO Member list: Test::ViewTester/A1, Gaudi::Sequencer/viewNode, Test::ViewTester/A4 viewNode INFO Member list: Test::ViewTester/A2, Test::ViewTester/A3 AvalancheSchedu... INFO Found 4 algorithms AvalancheSchedu... INFO Data Dependencies for Algorithms: @@ -67,7 +63,6 @@ AvalancheSchedu... INFO o Preemptive scheduling of CPU-blocking tasks: disabl AvalancheSchedu... INFO o Scheduling of condition tasks: disabled HiveSlimEventLo...WARNING Unable to locate service "EventSelector" HiveSlimEventLo...WARNING No events will be processed from external input. -HistogramPersis...WARNING Histograms saving not required. HiveSlimEventLo... INFO Found 0 events in black list ApplicationMgr INFO Application Manager Initialized successfully ApplicationMgr INFO Application Manager Started successfully @@ -152,16 +147,10 @@ A3 INFO Running in view view0 A2 INFO Running in view view1 A3 INFO Running in view view1 A4 INFO Running in whole event context -HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 49.7188 total time 1592237 +HiveSlimEventLo... INFO ---> Loop Finished (skipping 1st evt) - WSS 110.121 total time 1414948 HiveSlimEventLo... INFO 0 events were SKIPed ApplicationMgr INFO Application Manager Stopped successfully HiveSlimEventLo... INFO Histograms converted successfully according to request. AvalancheSchedu... INFO Joining Scheduler thread -ToolSvc INFO Removing all tools created by ToolSvc -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO This machine has a speed about 3.03 times the speed of a 2.8 GHz Xeon. -ToolSvc.Sequenc... INFO Algorithm (millisec) | <user> | <clock> | min max sigma | entries | total (s) | -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- -ToolSvc.Sequenc... INFO -------------------------------------------------------------------------------------------------- ApplicationMgr INFO Application Manager Finalized successfully ApplicationMgr INFO Application Manager Terminated successfully diff --git a/GaudiKernel/CMakeLists.txt b/GaudiKernel/CMakeLists.txt index 5b23098a60c73c11a369807665d17e9d6ce3ea43..f29acd8d61bbdfdfbfa7bc4e9debe10a64020d7e 100644 --- a/GaudiKernel/CMakeLists.txt +++ b/GaudiKernel/CMakeLists.txt @@ -126,6 +126,7 @@ gaudi_add_library(GaudiKernel src/Lib/RndmTypeInfos.cpp src/Lib/Selector.cpp src/Lib/Sequence.cpp + src/Lib/Sequencer.cpp src/Lib/Service.cpp src/Lib/ServiceHistory.cpp src/Lib/ServiceLocatorHelper.cpp diff --git a/GaudiKernel/include/Gaudi/Sequencer.h b/GaudiKernel/include/Gaudi/Sequencer.h new file mode 100644 index 0000000000000000000000000000000000000000..1237c527f4dd37a0513b85d6b38cea342717e298 --- /dev/null +++ b/GaudiKernel/include/Gaudi/Sequencer.h @@ -0,0 +1,210 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +#pragma once + +#include <Gaudi/Property.h> +#include <Gaudi/Sequence.h> +#include <mutex> + +namespace Gaudi { + /** A Sequencer is essentially a list of Algorithms and is responsible + * for their management. Note that Sequences may themselves contain other + * Sequences. The default execute() implementation loops over the + * members of the sequence, calling their execute() methods. However, this + * can be modified if a member is disabled, has already been executed, or a + * member indicates that it's filter fails. The the former two cases the + * execution of the member is bypassed. In the latter case, the loop is + * terminated and the Sequencer assumes the same filtered state as the + * last member. + */ + class GAUDI_API Sequencer : public Gaudi::Sequence { + public: + using Gaudi::Sequence::Sequence; + + /** Initialization of a sequencer. + * + * Typically things like histogram creation, + * setting up of data structures etc, should be done here. If a sequence + * has properties specified in the job options file, they will be set to + * the requested values BEFORE the initialize() method is invoked. + */ + StatusCode initialize() override; + + /// Sequencer Reinitialization. + StatusCode reinitialize() override; + + /// Sequencer finalization. + StatusCode start() override; + + /// The actions to be performed by the sequencer on an event. + StatusCode execute( const EventContext& ctx ) const override; + + /// Sequencer stop. + StatusCode stop() override; + + /// Sequencer finalization. + StatusCode finalize() override; + + /// Was the branch filter passed for the last event? + bool branchFilterPassed( const EventContext& ctx ) const; + + /// Set the branch filter passed flag for the last event + void setBranchFilterPassed( const EventContext& ctx, bool state ) const; + + /// Append an algorithm to the sequencer. + StatusCode append( Gaudi::Algorithm* pAlgorithm ); + + /// Append an algorithm to the sequencer branch + StatusCode appendToBranch( Gaudi::Algorithm* pAlgorithm ); + + /** Create a algorithm and append it to the sequencer. + * + * A call to this method + * creates a child algorithm object. Note that the returned pointer is + * to Algorithm (as opposed to IAlgorithm), and thus the methods of + * IProperty are also available for the direct setting of the algorithm's + * properties. Using this mechanism instead of creating algorithms + * 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 + Gaudi::Algorithm*& pAlgorithm // Set to point to the newly created algorithm object + ); + + /** Create a algorithm and append it to the sequencer branch. + * + * A call to this method creates a child algorithm object. Note that the returned pointer is + * to Algorithm (as opposed to IAlgorithm), and thus the methods of + * IProperty are also available for the direct setting of the algorithm's + * properties. Using this mechanism instead of creating algorithms + * directly via the new operator is preferred since then the framework + * may take care of all of the necessary book-keeping. + */ + StatusCode createAndAppendToBranch( const std::string& type, // The concrete algorithm class of the algorithm + const std::string& name, // The name to be given to the algorithm + Gaudi::Algorithm*& pAlgorithm // Set to point to the newly created algorithm + // object + ); + + /// Remove the specified algorithm from the sequencer + StatusCode remove( Gaudi::Algorithm* pAlgorithm ); + StatusCode remove( const std::string& name ); + StatusCode removeFromBranch( Gaudi::Algorithm* pAlgorithm ); + StatusCode removeFromBranch( const std::string& name ); + + /** List of branch algorithms. + * + * These are the algorithms + * that would get executed if a filter algorithm indicated + * a failure. The branch is located within the main sequence + * by the first element, which is the filter algorithm. + */ + const std::vector<Gaudi::Algorithm*>& branchAlgorithms() const; + std::vector<Gaudi::Algorithm*>& branchAlgorithms(); + + /// Decode Member Name list + StatusCode decodeMemberNames(); + + /// Decode branch member name list + StatusCode decodeBranchMemberNames(); + + protected: + /** + ** Append an algorithm to the sequencer. + **/ + StatusCode append( Gaudi::Algorithm* pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ); + + /** + ** Create a algorithm and append it to the sequencer. A call to this method + ** creates a child algorithm object. Note that the returned pointer is + ** to Algorithm (as opposed to IAlgorithm), and thus the methods of + ** IProperty are also available for the direct setting of the algorithm's + ** properties. Using this mechanism instead of creating algorithms + ** 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 + Gaudi::Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object + std::vector<Gaudi::Algorithm*>& theAlgs ); + + /** + ** Decode algorithm names, creating or appending algorithms as appropriate + **/ + StatusCode decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, + std::vector<Gaudi::Algorithm*>& theAlgs, std::vector<bool>& theLogic ); + + /** + ** Execute the members in the specified list + **/ + StatusCode execute( const EventContext& ctx, const std::vector<Gaudi::Algorithm*>& theAlgs, + const std::vector<bool>& theLogic, Gaudi::Algorithm*& lastAlgorithm, + std::size_t first = 0 ) const; + + /** + ** Execute member algorithm + **/ + StatusCode executeMember( Gaudi::Algorithm* theAlgorithm, const EventContext& context ) const; + + /** + ** Remove the specified algorithm from the sequencer + **/ + + StatusCode remove( const std::string& algname, std::vector<Gaudi::Algorithm*>& theAlgs ); + + // NO COPY / ASSIGNMENT ALLOWED + Sequencer( const Sequencer& a ) = delete; + Sequencer& operator=( const Sequencer& rhs ) = delete; + + public: + /// Produce string representation of the control flow expression. + std::ostream& toControlFlowExpression( std::ostream& os ) const override; + + private: + Gaudi::Property<std::vector<std::string>> m_names{ this, + "Members", + {}, + [this]( auto& ) { + if ( this->isInitialized() ) + this->decodeMemberNames().ignore(); + }, + "member names", + "vector<Algorithm>" }; + Gaudi::Property<std::vector<std::string>> m_branchNames{ this, + "BranchMembers", + {}, + [this]( auto& ) { + if ( this->isInitialized() ) + this->decodeBranchMemberNames().ignore(); + }, + "branch member names", + "vector<Algorithm>" }; + + Gaudi::Property<bool> m_shortCircuit{ this, "ShortCircuit", true, "stop processing as soon as possible" }; + 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_invert{ this, "Invert", false, "invert the logic result of the sequencer" }; + + Gaudi::Property<std::vector<std::string>> m_vetoObjs{ + this, "VetoObjects", {}, "skip execute if one or more of these TES objects exist" }; + Gaudi::Property<std::vector<std::string>> m_requireObjs{ + this, "RequireObjects", {}, "execute only if one or more of these TES objects exist" }; + + std::vector<bool> m_isInverted; // Member logic inverted list + std::vector<Gaudi::Algorithm*> m_branchAlgs; // Branch algorithms + std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list + + mutable std::mutex m_branchFilterMutex; + mutable std::map<EventContext::ContextID_t, bool> m_branchFilterPassed; // Branch filter passed flag + }; +} // namespace Gaudi diff --git a/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h b/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h index 5b801ae0b9bfcb2302b9b4ffa5c4ba060201275c..5e1adc341b5abee12e63d8d84a1c09e8718e2afe 100644 --- a/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h +++ b/GaudiKernel/include/GaudiKernel/AnyDataWrapper.h @@ -46,7 +46,7 @@ public: T& getData() { return m_data; } std::optional<std::size_t> size() const override { - using details::size; + using ::details::size; return size( getData() ); } }; diff --git a/GaudiKernel/python/GaudiKernel/Configurable.py b/GaudiKernel/python/GaudiKernel/Configurable.py index a3aa4b9bf265b5bb0208c40b726b50ae92b9335b..c49a05b4e0d035e0a50090877eee598af597bf5a 100644 --- a/GaudiKernel/python/GaudiKernel/Configurable.py +++ b/GaudiKernel/python/GaudiKernel/Configurable.py @@ -1804,9 +1804,9 @@ class CreateSequencesVisitor(object): return name def _newSeq(self, prefix="seq_", **kwargs): - from Configurables import GaudiSequencer + from Configurables import Gaudi__Sequencer - return GaudiSequencer(self._getUniqueName("seq_"), **kwargs) + return Gaudi__Sequencer(self._getUniqueName("seq_"), **kwargs) def leave(self, visitee): stack = self.stack @@ -1821,7 +1821,6 @@ class CreateSequencesVisitor(object): Members=[a, b], ModeOR=isinstance(visitee, OrNode), ShortCircuit=not isinstance(visitee, OrderedNode), - MeasureTime=True, ) stack.append(seq) elif isinstance(visitee, ignore): diff --git a/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py b/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py index 725c0ae1d4b23131d4cd32d030bddd1c6ee3e3dd..6036709f901bdfc0977a0ad0f650dbd3f3b9b05c 100644 --- a/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py +++ b/GaudiKernel/python/GaudiKernel/ProcessJobOptions.py @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2021 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -483,7 +483,7 @@ _parser = JobOptsParser() def _import_python(file): with open(file) as f: code = compile(f.read(), file, "exec") - exec(code, {}) + exec(code, {"__file__": file}) def _import_pickle(file): diff --git a/GaudiKernel/src/Lib/Sequencer.cpp b/GaudiKernel/src/Lib/Sequencer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..17ff5cfb72ce0b7f514588c3f782e192e2000406 --- /dev/null +++ b/GaudiKernel/src/Lib/Sequencer.cpp @@ -0,0 +1,447 @@ +/***********************************************************************************\ +* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* * +* This software is distributed under the terms of the Apache version 2 licence, * +* copied verbatim in the file "LICENSE". * +* * +* In applying this licence, CERN does not waive the privileges and immunities * +* granted to it by virtue of its status as an Intergovernmental Organization * +* or submit itself to any jurisdiction. * +\***********************************************************************************/ +// Sequencer class +// Implements: +// 1) Common functionality of IInterface +// 2) Default behavior for the IAlgorithm +#include <Gaudi/Sequencer.h> + +#include <GaudiKernel/Chrono.h> +#include <GaudiKernel/GaudiException.h> +#include <GaudiKernel/IAlgManager.h> +#include <GaudiKernel/ISvcLocator.h> +#include <GaudiKernel/Stat.h> +#include <GaudiKernel/ThreadLocalContext.h> + +#define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) +#define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) + +namespace Gaudi { + StatusCode Sequencer::initialize() { + auto is_good = decodeMemberNames(); + if ( !is_good ) { + error() << "Unable to configure one or more sequencer members " << endmsg; + return is_good; + } + + is_good = decodeBranchMemberNames(); + if ( !is_good ) { + error() << "Unable to configure one or more branch members " << endmsg; + return is_good; + } + + // We have to "decode" members before calling base class initialize + is_good = Sequence::initialize(); + if ( !is_good ) return is_good; + + // Loop over all branches + // (Sequence does not know about branches) + for ( auto& alg : branchAlgorithms() ) { + is_good = alg->sysInitialize(); + if ( is_good.isFailure() ) { + error() << "Unable to initialize Algorithm " << alg->name() << endmsg; + return is_good; + } + } + + return is_good; + } + + StatusCode Sequencer::reinitialize() { + // Bypass the loop if this sequencer is disabled + if ( isEnabled() ) { + // Loop over all branch members calling their reinitialize functions + // if they are not disabled. + for ( auto& alg : branchAlgorithms() ) { + if ( alg->isEnabled() ) { alg->reinitialize().ignore(); } + } + return Sequence::reinitialize(); + } + return StatusCode::SUCCESS; + } + + StatusCode Sequencer::execute( const EventContext& ctx ) const { + StatusCode result = StatusCode::SUCCESS; + ON_DEBUG debug() << name() << " Sequencer::execute()" << endmsg; + + auto& state = execState( ctx ); + + // Bypass the loop if this sequencer is disabled or has already been executed + if ( isEnabled() && !( execState( ctx ).state() == AlgExecState::State::Done ) ) { + Gaudi::Algorithm* lastAlgorithm; + result = execute( ctx, *subAlgorithms(), m_isInverted, lastAlgorithm ); + if ( result.isSuccess() ) { + const bool passed = state.filterPassed(); + if ( !passed && m_shortCircuit ) { + + // Filter failed and stop override not set. Execute the + // branch if there is one associated with the filter + // algorithm that failed. Note that the first member on + // the branch is the failing algorithm and so should + // be skipped. + const auto& theAlgs = branchAlgorithms(); + if ( !theAlgs.empty() ) { + Gaudi::Algorithm* branchAlgorithm = theAlgs[0]; + if ( lastAlgorithm == branchAlgorithm ) { + + // Branch specified - Loop over branch members + result = execute( ctx, branchAlgorithms(), m_isBranchInverted, lastAlgorithm, 1 ); + if ( result.isSuccess() ) { + + // The final filter passed state will be set true if either + // of the main or branches passed, otherwise false. + + // Save the branch filter passed state. + setBranchFilterPassed( ctx, state.filterPassed() ); + } + } + } + } + } + + // Prevent multiple executions of this sequencer for the current event + state.setState( AlgExecState::State::Done ); + } + return result; + } + + StatusCode Sequencer::finalize() { + // Loop over all branch members calling their finalize functions + // if they are not disabled. Note that the Sequence::finalize + // function already does this for the main members. + for ( auto& alg : branchAlgorithms() ) { + if ( alg->sysFinalize().isFailure() ) { error() << "Unable to finalize Algorithm " << alg->name() << endmsg; } + } + return Sequence::finalize(); + } + + StatusCode Sequencer::start() { + auto is_good = Sequence::start(); + if ( !is_good ) return is_good; + + // Loop over all branches + for ( auto& alg : branchAlgorithms() ) { + is_good = alg->sysStart(); + if ( !is_good ) { + error() << "Unable to start Algorithm " << alg->name() << endmsg; + return is_good; + } + } + + return is_good; + } + + StatusCode Sequencer::stop() { + // Loop over all branch members calling their finalize functions + // if they are not disabled. + for ( auto& alg : branchAlgorithms() ) { + if ( alg->sysStop().isFailure() ) { error() << "Unable to stop Algorithm " << alg->name() << endmsg; } + } + return Sequence::stop(); + } + + bool Sequencer::branchFilterPassed( const EventContext& ctx ) const { + auto lock = std::scoped_lock{ m_branchFilterMutex }; + return m_branchFilterPassed[ctx.slot()]; + } + + void Sequencer::setBranchFilterPassed( const EventContext& ctx, bool state ) const { + auto lock = std::scoped_lock{ m_branchFilterMutex }; + m_branchFilterPassed[ctx.slot()] = state; + } + + StatusCode Sequencer::append( Gaudi::Algorithm* pAlgorithm ) { return append( pAlgorithm, *subAlgorithms() ); } + + StatusCode Sequencer::appendToBranch( Gaudi::Algorithm* pAlgorithm ) { + return append( pAlgorithm, branchAlgorithms() ); + } + + StatusCode Sequencer::createAndAppend( const std::string& type, const std::string& name, + Gaudi::Algorithm*& pAlgorithm ) { + return createAndAppend( type, name, pAlgorithm, *subAlgorithms() ); + } + + StatusCode Sequencer::createAndAppendToBranch( const std::string& type, const std::string& name, + Gaudi::Algorithm*& pAlgorithm ) { + return createAndAppend( type, name, pAlgorithm, branchAlgorithms() ); + } + + StatusCode Sequencer::remove( Gaudi::Algorithm* pAlgorithm ) { return remove( pAlgorithm->name() ); } + + StatusCode Sequencer::remove( const std::string& algname ) { return remove( algname, *subAlgorithms() ); } + + StatusCode Sequencer::removeFromBranch( Gaudi::Algorithm* pAlgorithm ) { + return removeFromBranch( pAlgorithm->name() ); + } + + StatusCode Sequencer::removeFromBranch( const std::string& algname ) { return remove( algname, branchAlgorithms() ); } + + const std::vector<Gaudi::Algorithm*>& Sequencer::branchAlgorithms() const { return m_branchAlgs; } + + std::vector<Gaudi::Algorithm*>& Sequencer::branchAlgorithms() { return m_branchAlgs; } + + StatusCode Sequencer::decodeMemberNames() { + // Decode the membership list + return decodeNames( m_names, *subAlgorithms(), m_isInverted ); + } + + StatusCode Sequencer::decodeBranchMemberNames() { + // Decode the branch membership list + return decodeNames( m_branchNames, branchAlgorithms(), m_isBranchInverted ); + } + + /** + ** Protected Member Functions + **/ + + StatusCode Sequencer::append( Gaudi::Algorithm* pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ) { + // Check that the specified algorithm doesn't already exist in the membership list + if ( std::find( std::begin( theAlgs ), std::end( theAlgs ), pAlgorithm ) != std::end( theAlgs ) ) { + return StatusCode::FAILURE; + } + theAlgs.push_back( pAlgorithm ); + pAlgorithm->addRef(); + return StatusCode::SUCCESS; + } + + StatusCode Sequencer::createAndAppend( const std::string& type, const std::string& algName, + Gaudi::Algorithm*& pAlgorithm, std::vector<Gaudi::Algorithm*>& theAlgs ) { + auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); + if ( !theAlgMgr ) return StatusCode::FAILURE; + + IAlgorithm* tmp; + StatusCode result = theAlgMgr->createAlgorithm( type, algName, tmp ); + if ( result.isSuccess() ) { + try { + pAlgorithm = dynamic_cast<Gaudi::Algorithm*>( tmp ); + theAlgs.push_back( pAlgorithm ); + } catch ( ... ) { + error() << "Unable to create Algorithm " << algName << endmsg; + result = StatusCode::FAILURE; + } + } + + return result; + } + + StatusCode Sequencer::decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, + std::vector<Gaudi::Algorithm*>& theAlgs, std::vector<bool>& theLogic ) { + StatusCode result; + auto theAlgMgr = serviceLocator()->service<IAlgManager>( "ApplicationMgr" ); + if ( theAlgMgr ) { + // Clear the existing list of algorithms + theAlgs.clear(); + + // Build the list of member algorithms from the contents of the + // theNames list. + for ( const auto& n : theNames.value() ) { + + // Parse the name for a syntax of the form: + // + // <type>/<name> + // + // 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(); + + // Parse the name for a syntax of the form: + // + // <name>:invert + // + // 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( ":" ); + // 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 ); + if ( std::string::npos != invert ) { + if ( theName == theType ) { + // This means that we got something like "Type:invert", + // so we have to strip the ":invert" from the type too. + theType = theType.substr( 0, invert ); + } + theName = theName.substr( 0, invert ); + isInverted = true; + } + // Check whether the supplied name corresponds to an existing + // Algorithm object. + SmartIF<IAlgorithm>& theIAlg = theAlgMgr->algorithm( theName, false ); + Gaudi::Algorithm* theAlgorithm = nullptr; + StatusCode status = StatusCode::SUCCESS; + if ( theIAlg ) { + try { + theAlgorithm = dynamic_cast<Gaudi::Algorithm*>( theIAlg.get() ); + } catch ( ... ) { + warning() << theName << " is not an Algorithm - Failed dynamic cast" << endmsg; + theAlgorithm = nullptr; // release + } + } + if ( theAlgorithm ) { + + // The specified Algorithm already exists - just append it to the membership list. + status = append( theAlgorithm, theAlgs ); + if ( status.isSuccess() ) { + ON_DEBUG debug() << theName << " already exists - appended to member list" << endmsg; + } else { + warning() << theName << " already exists - append failed!!!" << endmsg; + result = StatusCode::FAILURE; + } + } else { + + // The specified name doesn't exist - create a new object of the specified type + // and append it to the membership list. + status = createAndAppend( theType, theName, theAlgorithm, theAlgs ); + if ( status.isSuccess() ) { + ON_DEBUG debug() << theName << " doesn't exist - created and appended to member list" << endmsg; + } else { + warning() << theName << " doesn't exist - creation failed!!!" << endmsg; + result = StatusCode::FAILURE; + } + } + if ( status.isSuccess() ) theLogic.push_back( isInverted ); + } + } + // Print membership list + if ( result.isSuccess() && theAlgs.size() != 0 ) { + info() << "Member list: "; + auto ai = theAlgs.begin(); + auto li = theLogic.begin(); + for ( ; ai != theAlgs.end(); ++ai, ++li ) { + + if ( ai != theAlgs.begin() ) info() << ", "; + auto alg = *ai; + if ( alg->name() == System::typeinfoName( typeid( *alg ) ) ) + info() << alg->name(); + else + info() << System::typeinfoName( typeid( *alg ) ) << "/" << alg->name(); + + if ( *li ) info() << ":invert"; + } + info() << endmsg; + } + return result; + } + + StatusCode Sequencer::execute( const EventContext& ctx, const std::vector<Gaudi::Algorithm*>& theAlgs, + const std::vector<bool>& theLogic, Gaudi::Algorithm*& lastAlgorithm, + std::size_t first ) const { + StatusCode result = StatusCode::SUCCESS; + + auto& state = execState( ctx ); + state.setFilterPassed( !m_modeOR ); // for OR, result will be false, unless (at least) one is true + // for AND, result will be true, unless (at least) one is false + // also see comment below ....) + + // Reset the branch filter passed flag + setBranchFilterPassed( ctx, false ); + + auto exists = [&]( const std::string_view loc ) -> bool { + DataObject* tmp{ nullptr }; + return evtSvc()->retrieveObject( loc, tmp ).isSuccess(); + }; + + // Do not execute if one or more of the m_vetoObjs exist in TES + if ( const auto it = find_if( begin( m_vetoObjs ), end( m_vetoObjs ), exists ); it != end( m_vetoObjs ) ) { + if ( msgLevel( MSG::DEBUG ) ) debug() << *it << " found, skipping event " << endmsg; + return result; + } + + // Execute if m_requireObjs is empty + // or if one or more of the m_requireObjs exist in TES + if ( !( m_requireObjs.empty() || any_of( begin( m_requireObjs ), end( m_requireObjs ), exists ) ) ) { + return result; + } + + // Loop over all algorithms calling their execute functions if they + // are (a) not disabled, and (b) aren't already executed. Note that + // in the latter case the filter state is still examined. Terminate + // the loop if an algorithm indicates that it's filter didn't pass. + auto size = theAlgs.size(); + for ( auto i = first; i < size; i++ ) { + lastAlgorithm = theAlgs[i]; + result = executeMember( lastAlgorithm, ctx ); + if ( result.isSuccess() ) { + if ( !m_ignoreFilter ) { + // Take the filter passed status of this algorithm as my own status. + // Note that we take into account inverted logic. + bool passed = lastAlgorithm->execState( ctx ).filterPassed(); + bool isInverted = theLogic[i]; + if ( isInverted ) passed = !passed; + + // in OR mode, we don't care about things + // which are false, as they leave our current state alone (provided + // we stared as 'false'!), and in AND mode, we keep our current + // state until someone returns 'false' (provided we started as 'true') + if ( m_modeOR ? passed : !passed ) { + state.setFilterPassed( m_modeOR ); + if ( m_shortCircuit ) { break; } + } + } + } else { + break; + } + } + if ( m_invert ) state.setFilterPassed( !state.filterPassed() ); + return result; + } + + StatusCode Sequencer::executeMember( Gaudi::Algorithm* theAlgorithm, const EventContext& context ) const { + StatusCode result = StatusCode::SUCCESS; + if ( theAlgorithm->isEnabled() ) { + if ( theAlgorithm->execState( context ).state() != AlgExecState::State::Done ) { + result = theAlgorithm->sysExecute( context ); + } + } + return result; + } + + StatusCode Sequencer::remove( const std::string& algname, std::vector<Gaudi::Algorithm*>& theAlgs ) { + StatusCode result = StatusCode::FAILURE; + + // Test that the algorithm exists in the member list + for ( auto& alg : theAlgs ) { + if ( alg->name() == algname ) { + + // Algorithm with specified name exists in the algorithm list - remove it + // THIS ISN'T IMPLEMENTED YET!!!! + info() << "Sequencer::remove( ) isn't implemented yet!!!!!" << endmsg; + result = StatusCode::SUCCESS; + break; + } + } + return result; + } + + std::ostream& Sequencer::toControlFlowExpression( std::ostream& os ) const { + if ( m_invert ) os << '~'; + + auto& theAlgs = *subAlgorithms(); + if ( theAlgs.empty() ) return os << ( ( !m_modeOR ) ? "CFTrue" : "CFFalse" ); + + // if we have only one element, we do not need a name + if ( theAlgs.size() > 1 ) os << "seq("; + + const auto algs_count = theAlgs.size(); + const auto op = m_shortCircuit ? ( m_modeOR ? " | " : " & " ) : " >> "; + size_t i = 0; + while ( i < algs_count ) { + if ( i ) os << op; + if ( m_isInverted[i] ) os << '~'; + theAlgs[i]->toControlFlowExpression( os ); + ++i; + } + if ( theAlgs.size() > 1 ) os << ')'; + return os; + } +} // namespace Gaudi diff --git a/GaudiMP/CMakeLists.txt b/GaudiMP/CMakeLists.txt index 3459aaf35327e3345740329b2a42fdad88b0a279..fa296d653ea16a0c23393601c4d6a64422380d9f 100644 --- a/GaudiMP/CMakeLists.txt +++ b/GaudiMP/CMakeLists.txt @@ -25,7 +25,6 @@ gaudi_add_library(GaudiMPLib gaudi_add_module(GaudiMP SOURCES src/component/IoComponentMgr.cpp LINK GaudiMPLib - GaudiAlgLib Python::Python ROOT::Net ROOT::RIO diff --git a/GaudiMP/src/component/RecordOutputStream.cpp b/GaudiMP/src/component/RecordOutputStream.cpp index 30674a7a39e956512413b33b67fb35284884b7e4..ec51874fa0493911d92fa68f872c865dc30e81f9 100644 --- a/GaudiMP/src/component/RecordOutputStream.cpp +++ b/GaudiMP/src/component/RecordOutputStream.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,10 +8,8 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files - -// local #include "RecordOutputStream.h" +#include <GaudiKernel/DataObject.h> // ---------------------------------------------------------------------------- // Implementation file for class: RecordOutputStream @@ -24,8 +22,8 @@ DECLARE_COMPONENT( RecordOutputStream ) // Initialization // ============================================================================ StatusCode RecordOutputStream::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; @@ -44,23 +42,10 @@ StatusCode RecordOutputStream::initialize() { StatusCode RecordOutputStream::execute() { if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Execute" << endmsg; - getOrCreate<DataObject, DataObject>( m_flagLocation, false ); - /* - if (!exist(m_flagLocation, false)) { - DataObject *obj = new DataObject(); - put(obj, m_flagLocation, false); + DataObject* tmp = nullptr; + if ( !eventSvc()->retrieveObject( m_flagLocation, tmp ) ) { + tmp = new DataObject(); + return eventSvc()->registerObject( m_flagLocation, tmp ); } - */ return StatusCode::SUCCESS; } - -// ============================================================================ -// Finalize -// ============================================================================ -StatusCode RecordOutputStream::finalize() { - if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg; - - return GaudiAlgorithm::finalize(); // must be called after all other actions -} - -// ============================================================================ diff --git a/GaudiMP/src/component/RecordOutputStream.h b/GaudiMP/src/component/RecordOutputStream.h index f3533ef2b39f2e172fc595eb661d8e4acb838007..0f78662e38327820c07e0a57f961fa3332cfb2e1 100644 --- a/GaudiMP/src/component/RecordOutputStream.h +++ b/GaudiMP/src/component/RecordOutputStream.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,11 +8,9 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef COMPONENT_RECORDOUTPUTSTREAM_H -#define COMPONENT_RECORDOUTPUTSTREAM_H 1 -// Include files -// from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#pragma once + +#include <GaudiKernel/Algorithm.h> /** @class RecordOutputStream * @@ -27,13 +25,12 @@ * @author Marco Clemencic * @date 30/08/2013 */ -class RecordOutputStream : public GaudiAlgorithm { +class RecordOutputStream : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution - StatusCode finalize() override; ///< Algorithm finalization /// Return the path in the Transient Store used to record the triggered /// instances. @@ -47,5 +44,3 @@ private: /// called std::string m_flagLocation; }; - -#endif // COMPONENT_RECORDOUTPUTSTREAM_H diff --git a/GaudiMP/src/component/ReplayOutputStream.cpp b/GaudiMP/src/component/ReplayOutputStream.cpp index 6082b31b5b2b0143a081d9f8310d0e5b2c4cddee..74669174f21e71d3e19acd5fa63f2ed071db41a4 100644 --- a/GaudiMP/src/component/ReplayOutputStream.cpp +++ b/GaudiMP/src/component/ReplayOutputStream.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,15 +8,11 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files - -// From Gaudi -#include "GaudiKernel/IAlgManager.h" -#include "GaudiKernel/IDataManagerSvc.h" -// local -#include "RecordOutputStream.h" #include "ReplayOutputStream.h" - +#include "RecordOutputStream.h" +#include <GaudiKernel/IAlgManager.h> +#include <GaudiKernel/IDataManagerSvc.h> +#include <GaudiKernel/IRegistry.h> #include <algorithm> #include <functional> #include <list> @@ -91,16 +87,22 @@ StatusCode ReplayOutputStream::i_outStreamTransition() { // Initialization // ============================================================================ StatusCode ReplayOutputStream::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; m_algMgr = service( "ApplicationMgr" ); - if ( !m_algMgr ) return Error( "cannot retrieve IAlgManager" ); + if ( !m_algMgr ) { + error() << "cannot retrieve IAlgManager" << endmsg; + return StatusCode::FAILURE; + } m_evtMgr = evtSvc(); - if ( !m_evtMgr ) return Error( "cannot retrieve IDataManagerSvc " ); + if ( !m_evtMgr ) { + error() << "cannot retrieve IDataManagerSvc" << endmsg; + return StatusCode::FAILURE; + } std::for_each( m_outputStreamNames.begin(), m_outputStreamNames.end(), OutStreamAdder( this ) ); @@ -108,8 +110,8 @@ StatusCode ReplayOutputStream::initialize() { } StatusCode ReplayOutputStream::start() { - StatusCode sc = GaudiAlgorithm::start(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::start(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by Algorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Start" << endmsg; @@ -161,7 +163,7 @@ StatusCode ReplayOutputStream::finalize() { m_algMgr.reset(); m_evtMgr.reset(); - StatusCode fsc = GaudiAlgorithm::finalize(); // must be called after all other actions + StatusCode fsc = Algorithm::finalize(); // must be called after all other actions if ( sc.isSuccess() ) sc = fsc; return sc; } @@ -171,7 +173,7 @@ StatusCode ReplayOutputStream::stop() { StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>(); - StatusCode ssc = GaudiAlgorithm::stop(); // must be called after all other actions + StatusCode ssc = Algorithm::stop(); // must be called after all other actions if ( sc.isSuccess() ) sc = ssc; return sc; } diff --git a/GaudiMP/src/component/ReplayOutputStream.h b/GaudiMP/src/component/ReplayOutputStream.h index c4d999434b0c9f5e0bc788858ec07d7dc4affb0f..4437116ea704c5d5e289d22b0eac016396ffa1e1 100644 --- a/GaudiMP/src/component/ReplayOutputStream.h +++ b/GaudiMP/src/component/ReplayOutputStream.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,14 +8,12 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef COMPONENT_REPLAYOUTPUTSTREAM_H -#define COMPONENT_REPLAYOUTPUTSTREAM_H 1 -// Include files -// from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/HashMap.h" -#include "GaudiKernel/SmartIF.h" -#include "GaudiKernel/ThreadLocalContext.h" +#pragma once + +#include <GaudiKernel/Algorithm.h> +#include <GaudiKernel/HashMap.h> +#include <GaudiKernel/SmartIF.h> +#include <GaudiKernel/ThreadLocalContext.h> class IAlgManager; struct IDataManagerSvc; @@ -26,10 +24,10 @@ struct IDataManagerSvc; * @author Marco Clemencic * @date 30/08/2013 */ -class ReplayOutputStream : public GaudiAlgorithm { +class ReplayOutputStream : public Algorithm { public: /// Inherited constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode start() override; ///< Algorithm initialization @@ -68,5 +66,3 @@ private: SmartIF<IAlgManager> m_algMgr; SmartIF<IDataManagerSvc> m_evtMgr; }; - -#endif // COMPONENT_REPLAYOUTPUTSTREAM_H diff --git a/GaudiPolicy/python/GaudiTesting/BaseTest.py b/GaudiPolicy/python/GaudiTesting/BaseTest.py index b61feda4483b990b41b1ee898b7d25b88e0af59c..6c631f39dfa7dd9e70e6c815d6742204c978f24e 100644 --- a/GaudiPolicy/python/GaudiTesting/BaseTest.py +++ b/GaudiPolicy/python/GaudiTesting/BaseTest.py @@ -1022,8 +1022,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"\s+[+-]?[0-9]+[0-9.]*", " 0"), # Normalize time output + ("TIMER", r"\s+[+-]?[0-9]+[0-9.e+-]*", " 0"), # Normalize time output ("release all pending", r"^.*/([^/]*:.*)", r"\1"), ("^#.*file", r"file '.*[/\\]([^/\\]*)$", r"file '\1"), ( @@ -1057,7 +1056,7 @@ for w, o, r in [ (r"Property \['Name': Value\]", r"( = '[^']+':)'(.*)'", r"\1\2"), ("TimelineSvc", "to file 'TimelineFile':", "to file "), ("DataObjectHandleBase", r'DataObjectHandleBase\("([^"]*)"\)', r"'\1'"), -]: # [ ("TIMER.TIMER","[0-9]+[0-9.]*", "") ] +]: normalizeExamples += RegexpReplacer(o, r, w) lineSkipper = LineSkipper( diff --git a/GaudiProfiling/CMakeLists.txt b/GaudiProfiling/CMakeLists.txt index 8f39c939d4fdc17b2a9e42945ce45963f789ebd5..34fe145fbacd9a830f973c38338b9df4a3e3565e 100644 --- a/GaudiProfiling/CMakeLists.txt +++ b/GaudiProfiling/CMakeLists.txt @@ -1,5 +1,5 @@ ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -51,7 +51,6 @@ if(GAUDI_USE_GPERFTOOLS) gaudi_add_module(GaudiGoogleProfiling SOURCES src/component/google/GoogleAuditor.cpp LINK GaudiKernel - GaudiAlgLib ZLIB::ZLIB) # but we still need to add the include directories to the search path target_include_directories(GaudiGoogleProfiling @@ -87,7 +86,6 @@ if(GAUDI_USE_INTELAMPLIFIER) gaudi_add_module(GaudiIntelProfiling SOURCES src/component/intel/IntelProfile.cpp LINK GaudiKernel - GaudiAlgLib IntelAmplifier::libittnotify) else() message(STATUS "GaudiProfiling: the module Intel VTune profiler is disabled") @@ -99,7 +97,6 @@ endif() gaudi_add_module(GaudiValgrindProfiling SOURCES src/component/valgrind/CallgrindProfile.cpp LINK GaudiKernel - GaudiAlgLib ZLIB::ZLIB) #----------------------------------- @@ -108,8 +105,7 @@ gaudi_add_module(GaudiValgrindProfiling gaudi_add_module(GaudiJemalloc SOURCES src/component/jemalloc/JemallocProfile.cpp src/component/jemalloc/JemallocProfileSvc.cpp - LINK GaudiKernel - GaudiAlgLib) + LINK GaudiKernel) #----------------------------------- # Linux perf @@ -119,7 +115,7 @@ gaudi_add_module(GaudiJemalloc gaudi_add_module(GaudiPerf SOURCES src/component/perf/PerfProfile.cpp LINK GaudiKernel - GaudiAlgLib) + Gaudi::Functional) # Special handling of unresolved symbols in Jemmalloc. # The profilers need to have libjemalloc.so pre-loaded to diff --git a/GaudiProfiling/src/component/google/GoogleAuditor.cpp b/GaudiProfiling/src/component/google/GoogleAuditor.cpp index 60d4c053078282723e5ac1cda22fe6bf2e941c8d..e84c8bcb6d13792a5a08bfae5b9a8effdc1c2e32 100644 --- a/GaudiProfiling/src/component/google/GoogleAuditor.cpp +++ b/GaudiProfiling/src/component/google/GoogleAuditor.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -9,32 +9,22 @@ * or submit itself to any jurisdiction. * \***********************************************************************************/ +#include <GaudiKernel/Auditor.h> +#include <GaudiKernel/GaudiException.h> +#include <GaudiKernel/IAlgorithm.h> +#include <GaudiKernel/IAuditorSvc.h> +#include <GaudiKernel/IIncidentListener.h> +#include <GaudiKernel/IIncidentSvc.h> +#include <GaudiKernel/MsgStream.h> #include <algorithm> +#include <gperftools/heap-checker.h> +#include <gperftools/heap-profiler.h> +#include <gperftools/profiler.h> #include <memory> #include <string> #include <utility> #include <vector> -#include "GaudiKernel/Auditor.h" -#include "GaudiKernel/GaudiException.h" -#include "GaudiKernel/IAuditorSvc.h" -#include "GaudiKernel/IIncidentListener.h" -#include "GaudiKernel/IIncidentSvc.h" -#include "GaudiKernel/MsgStream.h" - -#include "GaudiAlg/GaudiSequencer.h" -#include "GaudiAlg/Sequencer.h" - -#ifdef TCMALLOC_OLD_GOOGLE_HEADERS -# include "google/heap-checker.h" -# include "google/heap-profiler.h" -# include "google/profiler.h" -#else -# include "gperftools/heap-checker.h" -# include "gperftools/heap-profiler.h" -# include "gperftools/profiler.h" -#endif - namespace Google { /** @class AuditorBase GoogleAuditor.cpp @@ -94,10 +84,10 @@ namespace Google { m_sampleEventCount = 0; } - /** Check if the component in question is a GaudiSequencer or - * a Sequencer */ + // Check if the component in question is a Sequencer inline bool isSequencer( INamedInterface* i ) const { - return ( dynamic_cast<GaudiSequencer*>( i ) != NULL || dynamic_cast<Sequencer*>( i ) != NULL ); + if ( auto alg = dynamic_cast<IAlgorithm*>( i ) ) { return alg->isSequence(); } + return false; } /// Check if auditing is enabled for the current processing phase diff --git a/GaudiProfiling/src/component/intel/IntelProfile.h b/GaudiProfiling/src/component/intel/IntelProfile.h index f284dfc85b66875f8a5972ba284aaefbc599165c..b9ca03dc99205c83690bc47bb99c42ac1ce40fd6 100644 --- a/GaudiProfiling/src/component/intel/IntelProfile.h +++ b/GaudiProfiling/src/component/intel/IntelProfile.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,22 +8,19 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef INTEL_INTELPROFILE_H -#define INTEL_INTELPROFILE_H 1 +#pragma once -// Include files -// from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" -#include "ittnotify.h" +#include <GaudiKernel/Algorithm.h> +#include <ittnotify.h> /** Algorithm to enable/disable the profiling by Intel at given events. * Works with vtune and intel advisor. Not working with inspector. * * @author Ben Couturier Sebastien Ponce */ -class IntelProfile : public GaudiAlgorithm { +class IntelProfile : public Algorithm { public: - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode execute() override; ///< Algorithm execution private: @@ -34,4 +31,3 @@ private: int m_eventNumber = 0; // Current event number }; -#endif // INTEL_INTELPROFILE_H diff --git a/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp b/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp index 5bd45cc210524297cbef7771558b7bb9b105d676..001f3e277f01f1a82a6adcb3169c1342625c2557 100644 --- a/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp +++ b/GaudiProfiling/src/component/jemalloc/JemallocProfile.cpp @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,9 +8,6 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -// Include files - -// local #include "JemallocProfile.h" // including jemmalloc.h is difficult as the malloc signature is not exactly identical @@ -34,8 +31,8 @@ DECLARE_COMPONENT( JemallocProfile ) // Initialization //============================================================================= StatusCode JemallocProfile::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first - if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm + StatusCode sc = Algorithm::initialize(); // must be executed first + if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg; bool active = true; @@ -71,14 +68,3 @@ StatusCode JemallocProfile::execute() { } return StatusCode::SUCCESS; } - -//============================================================================= -// Finalize -//============================================================================= -StatusCode JemallocProfile::finalize() { - - if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg; - return GaudiAlgorithm::finalize(); // must be called after all other actions -} - -//============================================================================= diff --git a/GaudiProfiling/src/component/jemalloc/JemallocProfile.h b/GaudiProfiling/src/component/jemalloc/JemallocProfile.h index a3d92279636fd34db3721f8f3e9743d713154b3b..06dda39c465918519d7af3fb619ee3a189ae4093 100644 --- a/GaudiProfiling/src/component/jemalloc/JemallocProfile.h +++ b/GaudiProfiling/src/component/jemalloc/JemallocProfile.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -8,12 +8,9 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#ifndef JEMALLOC_PROFILE_H -#define JEMALLOC_PROFILE_H 1 +#pragma once -// Include files -// from Gaudi -#include "GaudiAlg/GaudiAlgorithm.h" +#include <GaudiKernel/Algorithm.h> /** @class JemallocProfile JemallocProfile.h jemalloc/JemallocProfile.h * @@ -26,14 +23,13 @@ * @author Ben Couturier * @date 2015-06-09 */ -class JemallocProfile : public GaudiAlgorithm { +class JemallocProfile : public Algorithm { public: /// Standard constructor - using GaudiAlgorithm::GaudiAlgorithm; + using Algorithm::Algorithm; StatusCode initialize() override; ///< Algorithm initialization StatusCode execute() override; ///< Algorithm execution - StatusCode finalize() override; ///< Algorithm finalization private: Gaudi::Property<int> m_nStartFromEvent{ this, "StartFromEventN", 1, "After what event we start profiling. " }; @@ -45,4 +41,3 @@ private: 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/perf/PerfProfile.cpp b/GaudiProfiling/src/component/perf/PerfProfile.cpp index a3914e49e9632e65650c2391c803813068cfade3..a1e57ca97e13f92ee35367b3004d3cbd5b245853 100644 --- a/GaudiProfiling/src/component/perf/PerfProfile.cpp +++ b/GaudiProfiling/src/component/perf/PerfProfile.cpp @@ -8,7 +8,7 @@ * granted to it by virtue of its status as an Intergovernmental Organization * * or submit itself to any jurisdiction. * \***********************************************************************************/ -#include "GaudiAlg/Consumer.h" +#include <Gaudi/Functional/Consumer.h> #include <fcntl.h> #include <string_view> #include <sys/stat.h> diff --git a/GaudiPython/CMakeLists.txt b/GaudiPython/CMakeLists.txt index c23e42c2187458e015464b16de874f08662726b2..6b0a13f8cc60137980469da44a749be552043c56 100644 --- a/GaudiPython/CMakeLists.txt +++ b/GaudiPython/CMakeLists.txt @@ -12,21 +12,12 @@ # Build the library gaudi_add_library(GaudiPythonLib - SOURCES src/Lib/AlgDecorators.cpp - src/Lib/CallbackStreamBuf.cpp + SOURCES src/Lib/CallbackStreamBuf.cpp src/Lib/Algorithm.cpp src/Lib/Helpers.cpp LINK - PUBLIC GaudiAlgLib + PUBLIC Gaudi::GaudiKernel Python::Python) -if(GAUDI_USE_AIDA) - target_sources(GaudiPythonLib PRIVATE src/Lib/HistoDecorator.cpp) - target_link_libraries(GaudiPythonLib PUBLIC AIDA::aida) - if(GAUDI_USE_CLHEP) - target_sources(GaudiPythonLib PRIVATE src/Lib/TupleDecorator.cpp) - target_link_libraries(GaudiPythonLib PUBLIC CLHEP::CLHEP) - endif() -endif() # Build the plugin gaudi_add_module(GaudiPython @@ -37,15 +28,35 @@ gaudi_add_module(GaudiPython # ROOT dictionaries gaudi_add_dictionary(GaudiPythonDict HEADERFILES dict/kernel.h - SELECTION dict/selection_kernel.xml + SELECTION ${CMAKE_CURRENT_BINARY_DIR}/selection.xml LINK GaudiPythonLib GaudiUtilsLib) + +set(selection_fragments main) if(GAUDI_USE_AIDA) target_compile_definitions(GaudiPythonDict PRIVATE AIDA_FOUND) endif() if(GAUDI_USE_CLHEP) target_compile_definitions(GaudiPythonDict PRIVATE CLHEP_FOUND) endif() +list(TRANSFORM selection_fragments PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/dict/selection_fragment_") +list(TRANSFORM selection_fragments APPEND ".xml") + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gen_selection.cmake +" +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/selection.xml \"<lcgdict>\") +foreach(fragment IN ITEMS ${selection_fragments}) + file(READ \${fragment} fragment_data) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/selection.xml \"\${fragment_data}\") +endforeach() +file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/selection.xml \"</lcgdict>\") +" +) +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/selection.xml + COMMENT "Generate GaudiPythonDict selection.xml" + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/gen_selection.cmake + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gen_selection.cmake ${selection_fragments} +) # Install python modules gaudi_install(PYTHON) diff --git a/GaudiPython/dict/kernel.h b/GaudiPython/dict/kernel.h index f62a5210b4358310a6ea9228201fe1a86615e424..d7b790349083bbe235a16e741f620dc9b56e052e 100644 --- a/GaudiPython/dict/kernel.h +++ b/GaudiPython/dict/kernel.h @@ -1,5 +1,5 @@ /***********************************************************************************\ -* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * +* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations * * * * This software is distributed under the terms of the Apache version 2 licence, * * copied verbatim in the file "LICENSE". * @@ -22,6 +22,7 @@ #include "GaudiKernel/Chrono.h" #include "GaudiKernel/ChronoEntity.h" #include "GaudiKernel/HashMap.h" +#include "GaudiKernel/IRegistry.h" #include "GaudiKernel/Map.h" #include "GaudiKernel/MapBase.h" #include "GaudiKernel/ParticleProperty.h" @@ -69,42 +70,19 @@ #include "GaudiPython/Helpers.h" -#include "GaudiPython/AlgDecorators.h" #include "GaudiPython/Algorithm.h" #include "GaudiPython/CallbackStreamBuf.h" #include "GaudiPython/GaudiPython.h" -#ifdef AIDA_FOUND -# include "GaudiPython/HistoDecorator.h" -# ifdef CLHEP_FOUND -# include "GaudiPython/TupleDecorator.h" -# endif // CLHEP_FOUND -#endif // AIDA_FOUND #include "GaudiPython/Interface.h" #include "GaudiPython/Printer.h" #include "GaudiPython/Vector.h" -#ifdef AIDA_FOUND -# include "GaudiAlg/GaudiHistoAlg.h" -# include "GaudiAlg/GaudiTupleAlg.h" -# include "GaudiAlg/Print.h" -// Added to avoid warnings about inlined functions never implemented. -# include "GaudiAlg/GaudiHistos.icpp" -#endif // AIDA_FOUND -#include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiAlg/GaudiCommon.h" -#include "GaudiAlg/GaudiHistoID.h" -#include "GaudiAlg/IErrorTool.h" -#include "GaudiAlg/IGenericTool.h" -#include "GaudiAlg/IHistoTool.h" -#include "GaudiAlg/ISequencerTimerTool.h" -#include "GaudiAlg/ITupleTool.h" -#include "GaudiAlg/Tuple.h" - #ifdef AIDA_FOUND # include "GaudiUtils/Aida2ROOT.h" # include "GaudiUtils/HistoDump.h" # include "GaudiUtils/HistoStats.h" # include "GaudiUtils/HistoStrings.h" +# include "GaudiUtils/HistoTableFormat.h" #endif // AIDA_FOUND #include "GaudiUtils/IFileCatalog.h" #include "GaudiUtils/IFileCatalogMgr.h" @@ -145,10 +123,9 @@ namespace GaudiPython { std::list<IAlgorithm*> i01; std::list<IService*> i02; - std::vector<IService*> i05_1; - std::vector<IAlgTool*> i05_2; - std::vector<StatEntity*> i05_3; - std::vector<GaudiAlg::ID> i05_4; + std::vector<IService*> i05_1; + std::vector<IAlgTool*> i05_2; + std::vector<StatEntity*> i05_3; #ifdef AIDA_FOUND std::vector<AIDA::IHistogram1D*> i05_5; std::vector<AIDA::IHistogram2D*> i05_6; @@ -161,12 +138,6 @@ namespace GaudiPython { GaudiUtils::VectorMap<int, double> i034; - GaudiPython::PyAlg<GaudiAlgorithm> _alg0; -#ifdef AIDA_FOUND - GaudiPython::PyAlg<GaudiHistoAlg> _alg1; - GaudiPython::PyAlg<GaudiTupleAlg> _alg2; -#endif // AIDA_FOUND - GaudiPython::Matrix _mtrx; GaudiPython::Vector _vctr; std::vector<std::vector<double>> _vct1; diff --git a/GaudiPython/dict/selection_kernel.xml b/GaudiPython/dict/selection_fragment_main.xml similarity index 60% rename from GaudiPython/dict/selection_kernel.xml rename to GaudiPython/dict/selection_fragment_main.xml index 13c08c61f28b5140b91d0347d99ff951edbf8ad0..db2f7f5f854df43a73d1487e2dca505cfea8ba1a 100644 --- a/GaudiPython/dict/selection_kernel.xml +++ b/GaudiPython/dict/selection_fragment_main.xml @@ -1,5 +1,5 @@ <!-- - (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations + (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations This software is distributed under the terms of the Apache version 2 licence, copied verbatim in the file "LICENSE". @@ -8,9 +8,7 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> -<lcgdict> <class name = "__gnu_cxx::dummy" /> - <!--class pattern = "GaudiPython::Interface<*>"/--> <class name = "GaudiPython::Helper"/> <class name = "std::vector<Gaudi::Details::PropertyBase*>" /> @@ -19,7 +17,6 @@ <class name = "std::vector<std::vector<double> >" rootmap="false"/> <class name = "std::vector<IRegistry*>"/> <class name = "std::ostream"/> - <!--class name = "std::basic_ostream<char,std::char_traits<char> >" rootmap="false"/--> <class name = "std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> >" rootmap="false"/> <class name = "std::map<std::basic_string<char>,std::basic_string<char> >" rootmap="false"/> <class pattern = "std::_Bit_reference*"/> @@ -34,7 +31,6 @@ <class name = "std::vector<IAlgTool*>" /> <class name = "std::vector<StatEntity*>" /> - <class name = "std::vector<GaudiAlg::ID>" /> <class name = "std::vector<AIDA::IHistogram1D*>"/> <class name = "std::vector<AIDA::IHistogram2D*>"/> <class name = "std::vector<AIDA::IHistogram3D*>"/> @@ -44,18 +40,9 @@ <function name = "Gaudi::Utils::Histos::histoDump" /> <class name = "Gaudi::Utils::Histos::HistoStrings" /> - <class pattern = "GaudiAlg::*" /> - <class name = "GaudiAlgorithm" /> - <class pattern = "GaudiPython::PyAlg<*>" /> - <class name = "Tuples::Tuple" /> - <class pattern = "GaudiPython::*Decorator*" /> <class name = "StatEntity" /> <class pattern = "GaudiPython::Printer<*>" /> - <class pattern = "GaudiAlg::Print*" /> - <class pattern = "GaudiCommon<*>" /> - <class pattern = "GaudiHistos<*>" /> - <class pattern = "GaudiTuples<*>" /> <class name = "Gaudi::Utils::Aida2ROOT" /> <class name = "Stat" /> @@ -69,12 +56,6 @@ <class name = "Gaudi::StringKey" /> <class name = "Gaudi::Utils::MapBase" /> - <class name = "IErrorTool" /> - <class name = "IGenericTool" /> - <class name = "IHistoTool" /> - <class name = "ITupleTool" /> - <class name = "ISequencerTimerTool" /> - <function name= "Gaudi::Utils::hasProperty" /> <class name = "Gaudi::IFileCatalog" /> @@ -95,30 +76,3 @@ <function name= "Gaudi::Utils::QuasiRandom::mixString" /> <class name= "Gaudi::RangeBase_" /> - - <exclusion> - <class name = "GaudiAlg::ID::LiteralID" /> - <class name = "GaudiAlg::HistoBinEdges" /> - <class pattern = "std::list<std::pair<InterfaceID,*" /> - <class pattern = "std::vector<*table_node*" /> - <class pattern = "GaudiUtils::HashMap<*Tuple*>" /> - <class pattern = "GaudiUtils::HashMap<*Histo*>" /> - <class pattern = "GaudiUtils::HashMap<*Profi*>" /> - <class pattern = "GaudiUtils::HashMap<GaudiAlg::ID*>" /> - <class pattern = "GaudiAlg::*Map*" /> - <class pattern = "GaudiHistos<*>::*Map*" /> - <class pattern = "GaudiTuples<*>::*Map*" /> - <class pattern = "*__int128*" /> - <class name = "GaudiPython::CallbackStreamBuf"> - <!-- assignment operator and copy constructor cannot compile --> - <method name="="/> - <method proto_pattern="CallbackStreamBuf*CallbackStreamBuf*"/> - </class> - <class pattern = "std::basic_ostream<char*"> - <!-- assignment operator and copy constructor cannot compile --> - <method name="="/> - <!-- We should exclude only the copy constructor, but I did not manage to do it --> - <!--method pattern="basic_ostream*"/--> - </class> - </exclusion> -</lcgdict> diff --git a/GaudiPython/include/GaudiPython/Algorithm.h b/GaudiPython/include/GaudiPython/Algorithm.h index 129160b4fe9ab3a69b2995661f72e0bec2f12158..84928af89b6966ec28650443beda71cecbb881e2 100644 --- a/GaudiPython/include/GaudiPython/Algorithm.h +++ b/GaudiPython/include/GaudiPython/Algorithm.h @@ -57,64 +57,6 @@ namespace GaudiPython { PyObject* m_self; }; // ========================================================================== - /** @class PyAlg - * general class to embed the existing algorithm/base class - * into the python - * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr - * @date 2005-08-03 - */ - template <class ALGORITHM> - class GAUDI_API PyAlg : public ALGORITHM { - // ======================================================================== - public: - // ======================================================================== - /** constructor from Python object and the name - * @param self python object - * @param name name of algorithm instance - */ - PyAlg( PyObject* self, const std::string& name ) : ALGORITHM( name, Gaudi::svcLocator() ), m_self( self ) { - // the printout of actual type for embedded algorithm has no sense - this->setProperty( "TypePrint", false ); - // The owner of the Algorithm is Python (as creator) therefore - // it should not be deleted by Gaudi (added an extra addRef()). - this->addRef(); - this->addRef(); - this->setType( System::typeinfoName( typeid( PyAlg ) ) ); - } - /// get the object - PyObject* _obj() const { return m_self; } // get the object - // ======================================================================== - public: - // ======================================================================== - StatusCode initialize() override { return GaudiPython::call_python_method( m_self, "initialize" ); } - StatusCode start() override { return GaudiPython::call_python_method( m_self, "start" ); } - StatusCode execute() override { return GaudiPython::call_python_method( m_self, "execute" ); } - StatusCode stop() override { return GaudiPython::call_python_method( m_self, "stop" ); } - StatusCode finalize() override { return GaudiPython::call_python_method( m_self, "finalize" ); } - // ======================================================================== - virtual IAlgorithm* ialgorithm() { return this; } - virtual IProperty* iproperty() { return this; } - // ======================================================================== - // preserve the existing methods - virtual StatusCode initialize_() { return ALGORITHM::initialize(); } - virtual StatusCode finalize_() { return ALGORITHM::finalize(); } - // ======================================================================== - private: - // ======================================================================== - /// the default constructor is disabled - PyAlg() = delete; - /// the copy constructor is disabled - PyAlg( const PyAlg& ) = delete; - /// the assignment operator is disabled - PyAlg& operator=( const PyAlg& ) = delete; - // ======================================================================== - private: - // ======================================================================== - /// "shadow" python class - PyObject* m_self; // "shadow" python class - // ======================================================================== - }; - // ========================================================================== } // end of namespace GaudiPython // ============================================================================ // The END diff --git a/GaudiPython/python/GaudiPython/GaudiAlgs.py b/GaudiPython/python/GaudiPython/GaudiAlgs.py index afb9737d7498e559521aea97ce30a0f9177f8e27..ea829bbadb032eb7db5165391c969ba6103bbfaa 100644 --- a/GaudiPython/python/GaudiPython/GaudiAlgs.py +++ b/GaudiPython/python/GaudiPython/GaudiAlgs.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 ##################################################################################### -# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -9,1624 +9,19 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -# ============================================================================= -# @file -# -# Helper module, which effectively 'imports' few useful C++ algorithmic -# base classes into Python -# -# -# The major imported classes are : -# -# - GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package -# - HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package -# - TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 -# ============================================================================= -""" -******************************************************************************* -* * 'Physisics do not like it, * -* * physisics do not need it, * -* * physisics do not use it' * -* * **************************** -* * -* Helper module, which effectively 'imports' few useful C++ algorithmic * -* base classes into Python * -* * -******************************************************************************* -* The major imported classes are : * -* * -* (1) GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package * -* (2) HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package * -* (3) TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package * -******************************************************************************* -""" -from __future__ import print_function +# deprecated module -# ============================================================================= -__author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" -# ============================================================================= -# list of "public" symbols -# ============================================================================= -__all__ = ( - "GaudiAlgo", # base class for algorithms - "HistoAlgo", # base class for histo-related algorithms - "TupleAlgo", # base class for tuple-related algorithms - "Tuple", # N-Tuple - "HistoID", # ID for N-tuples - "TupleID", # ID for Histograms - "aida2root", # AIDA -> ROOT converter - "SUCCESS", # status code -) -# ============================================================================= -# import core of Gaudi -import GaudiPython.Bindings # The basic module +# TODO: enable deprecation warning +# import warnings +# warnings.warn( +# "GaudiPython: Use 'GaudiAlg.Algs' module instead of deprecated 'GaudiPython.GaudiAlgs'", +# DeprecationWarning, +# stacklevel=3, +# ) +# del warnings -iAlgorithm = GaudiPython.Bindings.iAlgorithm # Algorithm interface -iAlgTool = GaudiPython.Bindings.iAlgTool # Tool interface +import sys -from GaudiPython.Bindings import SUCCESS # status code -from GaudiPython.Bindings import AppMgr # Application Manager -from GaudiPython.Bindings import InterfaceCast # "queryInterface" -from GaudiPython.Bindings import iDataSvc # Data Service -from GaudiPython.Bindings import iHistogramSvc # Histogram Service -from GaudiPython.Bindings import iNTupleSvc # N-Tuple service -from GaudiPython.Bindings import gbl as cpp # global C++ namepspace -from GaudiPython.HistoUtils import aida2root # AIDA -> ROTO converter +import GaudiAlg.Algs -from GaudiKernel import ROOT6WorkAroundEnabled - -# ============================================================================= -# std C++ namespace -std = cpp.std # std C++ namespace - -# "typedef" for GaudiPython::Vector -Vector = std.vector("double") -# "typedef" for GaudiPython::Matrix -Matrix = std.vector("std::vector<double>") - -# histogram and N-Tuple universal identifier -HID = cpp.GaudiAlg.ID -HistoID = HID -TID = HID -TupleID = TID - -# get the decorator: -AlgDecorator = cpp.GaudiPython.AlgDecorator -HistoDecorator = cpp.GaudiPython.HistoDecorator -TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator -TupleDecorator = cpp.GaudiPython.TupleDecorator - -# ============================================================================= -# Useful method to locate the tool a certain -# -# Usage: -# -# @code -# -# # locate public tool -# t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') -# # locate private tool -# t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) -# # locate public tool with defined name -# t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') -# # locate private tool with defined name -# t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) -# # locate public tool with defined name -# t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') -# # locate private tool with defined name -# t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) -# -# @endcode -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _tool_(self, interface, typename, name=None, parent=None, create=True): - """ - Useful method to locate the tool a certain - - Usage: - - # locate public tool - t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') - # locate private tool - t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) - # locate public tool with defined name - t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') - # locate private tool with defined name - t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) - # locate public tool with defined name - t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') - # locate private tool with defined name - t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) - - """ - if not interface: - interface = cpp.IAlgTool - if not parent: - parent = self - if name: - typename += "/" + name - _tool = AlgDecorator.tool_(self, typename, parent, create) - if not _tool: - return None - _tool = InterfaceCast(interface)(_tool) - if not _tool: - self.Warning("Invalid cast to interface %s" % interface) - return None - return _tool - - -# ============================================================================= -# Useful method to locate a service: -# -# Usage: -# -# @code -# -# ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) -# -# @endcode -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _service_(self, interface, name, create=True): - """ - Useful method to locate a service: - - Usage: - - ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) - - """ - if not interface: - interface = cpp.IInterface - _svc = AlgDecorator.svc_(self, name, create) - if not _svc: - return None - _svc = InterfaceCast(interface)(_svc) - if not _svc: - self.Warning("Invalid cast to interface %s" % interface) - return None - return _svc - - -# ============================================================================= -# The constructor from unique algorithm instance name, -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _init_(self, name, **args): - """ - The constructor from unique algorithm instance name & parameters - """ - self._Base.__init__(self, self, name) - appMgr = AppMgr() - algMgr = appMgr._algmgr - status = algMgr.addAlgorithm(self) - if status.isFailure(): - raise RuntimeError('Unable to add Algorithm "' + name + '"') - self._ialg = iAlgorithm(name, self) - for key in args: - setattr(self, key, args[key]) - # take some care about the ownership of the algorithms - if "GaudiPythonAlgos" not in appMgr.__dict__: - appMgr.__dict__["GaudiPythonAlgos"] = [] - appMgr.__dict__["GaudiPythonAlgos"].append(self) - - -# ============================================================================= -# The default initialization (initialization of base C++ class + data -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _initialize_(self): - """ - The default initialization (initialization of base C++ class + data) - """ - status = self._Base.initialize_(self) - if status.isFailure(): - return status - - # set the basic services - _e = self._Base.evtSvc(self) - _s = InterfaceCast(cpp.IService)(_e) - self._evtSvc_ = iDataSvc(_s.name(), _e) - - _d = self._Base.detSvc(self) - _s = InterfaceCast(cpp.IService)(_d) - self._detSvc_ = iDataSvc(_s.name(), _d) - - return status - - -# ============================================================================= -# The default initialization (initialization of base C++ class + data members) -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _initialize_histo_(self): - """ - The default initialization (initialization of base C++ class + data members) - """ - status = _initialize_(self) - if status.isFailure(): - return status - - # set the basic services - _h = self._Base.histoSvc(self) - _s = InterfaceCast(cpp.IService)(_h) - self._histoSvc_ = iHistogramSvc(_s.name(), _h) - - return status - - -# ============================================================================= -# The default initialization (initialization of base C++ class + data members) -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _initialize_tuple_(self): - """ - The default initialization (initialization of base C++ class + data members) - """ - status = _initialize_histo_(self) - if status.isFailure(): - return status - - # set the basic services - if self.produceNTuples(): - _n = self._Base.ntupleSvc(self) - _s = InterfaceCast(cpp.IService)(_n) - self._ntupleSvc_ = iNTupleSvc(_s.name(), _n) - - if self.produceEvtCols(): - _n = self._Base.evtColSvc(self) - _s = InterfaceCast(cpp.IService)(_n) - self._evtcolSvc_ = iNTupleSvc(_s.name(), _n) - - return status - - -# ============================================================================= -# Trivial helper function to access Event Data and Event Data Service -# -# Usage: -# -# @code -# -# # get event data service -# svc = self.evtSvc() -# -# # get the data -# hits = self.evtSvc('MC/Calo/Hits') -# -# @endcode -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _evtSvc(self, location=None): - """ - Trivial helper function to access Event Data and Event Data Service - - Usage: - - # get event data service - svc = self.evtSvc() - - # get the data - hits = self.evtSvc('MC/Calo/Hits') - """ - if not location: - return self._evtSvc_ - return self._evtSvc_[location] - - -# ============================================================================= -# Trivial helper function to access Detector Data and Detector Data Service -# -# Usage: -# -# @code -# -# # get detector data service -# svc = self.detSvc() -# -# # get the data -# lhcb = self.detSvc('/dd/Structure/LHCb') -# -# @endcode -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _detSvc(self, location=None): - """ - Trivial helper function to access Detector Data and Event Data Service - - Usage: - # get detector data service - svc = self.detSvc() - - # get the data - lhcb = self.detSvc('/dd/Structure/LHCb') - """ - if location is None: - return self._detSvc_ - return self._detSvc_[location] - - -# ============================================================================= -# Trivial helper function to access Histogram Data and Histogram Data Service -# -# Usage: -# -# @code -# -# # get histogram data service -# svc = self.histoSvc() -# -# # get the data -# histo = self.histoSvc('/stat/Calo/1') -# -# @endcode -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -def _histoSvc(self, address=None): - """ - Trivial helper function to access Histogram Data and Histogram Data Service - - Usage: - - # get histogram data service - svc = self.histoSvc() - - # get the data - histo = self.histoSvc('/stat/Calo/1') - """ - if not address: - return self._histoSvc_ - return self._histoSvc_[address] - - -# ============================================================================= -# Trivial function to access the data in TES - - -def _get(self, location): - """ - Trivial function to access the data in TES using the data service - """ - return self._evtSvc_[location] - - -# ============================================================================= -# Trivial function to access the data in TDS - - -def _getDet(self, location): - """ - Trivial function to access the data in TDS using data service - """ - return self._detSvc_[location] - - -# ============================================================================= -# get the data from TES using GaudiCommon methods, respecting RootInTES - - -def _get_(self, location, rootInTES=True): - """ - Get the object from Transient Event Store using GaudiCommon machinery, - respecting RootInTES behaviour - """ - return AlgDecorator.get_(self, location, rootInTES) - - -# ============================================================================= -# check the data from TES using GaudiCommon methods, respecting RootInTES - - -def _exist_(self, location, rootInTES=True): - """ - Check the object in Transient Event Store using GaudiCommon machinery, - respecting RootInTES behaviour - """ - return AlgDecorator.exist_(self, location, rootInTES) - - -# ============================================================================= -# Trivial helper function to access NTuple Service - - -def _ntupleSvc(self): - """ - Trivial function to access N-Tuple Service - """ - return self._ntupleSvc_ - - -# ============================================================================= -# Trivial helper function to access Event Collection Service - - -def _evtcolSvc(self): - """ - Trivial function to access Event Collection Service - """ - return self._evtcolSvc_ - - -# ============================================================================= -# The default finalization (finalization of base C++ class) -def _finalize_(self): - """ - The default finalization : finalize the base C++ class - """ - status = self._Base.finalize_(self) - return status - - -# ============================================================================= -# Dummy method returning success - - -def _success_(self): - return SUCCESS - - -# ============================================================================= -# check the existence of the property with the given name -def _hasProperty_(self, pname): - """ - The trivial function which checks the existence of the property with given name - """ - return cpp.Gaudi.Utils.hasProperty(self, pname) - - -# ============================================================================= -# get the value of the given property - - -def _getProperty_(self, pname): - """ - Get the property by name - """ - if not self.hasProperty(pname): - raise AttributeError("property %s does not exist" % pname) - return self._ialg.__getattr__(pname) - - -# ============================================================================= -# set the value for the given property - - -def _setProperty_(self, pname, pvalue): - """ - Set the property from the value - """ - if not self.hasProperty(pname): - raise AttributeError("property %s does not exist" % pname) - return self._ialg.__setattr__(pname, pvalue) - - -# ============================================================================= -# get the attribute or property - - -def _get_attr_(self, pname): - """ - Get the attribute (or property) - - if the attribute name corresponds to the property name, property value is returned - """ - if self.hasProperty(pname): - return self._ialg.__getattr__(pname) - else: - # Since self does not inherit from iAlgorithm (see !1116, 4f05f03678), - # delegate attribute lookup to self._ialg. - try: - return getattr(self._ialg, pname) - except AttributeError: - pass - raise AttributeError("attribute/property %s does not exist" % pname) - - -# ============================================================================= -# set the attribute or property - - -def _set_attr_(self, pname, pvalue): - """ - Set the attribute (or property) : - - if the attribute name corresponds to the property name, the property is updated - """ - if not self.hasProperty(pname): - self.__dict__[pname] = pvalue - else: - self._ialg.__setattr__(pname, pvalue) - - -_GaudiAlgorithm = cpp.GaudiPython.PyAlg("GaudiAlgorithm") -_GaudiHistoAlg = cpp.GaudiPython.PyAlg("GaudiHistoAlg") -_GaudiTupleAlg = cpp.GaudiPython.PyAlg("GaudiTupleAlg") - -# ============================================================================= -# @class GaudiAlgo -# the base class for all algorithm -# Python-image of C++ clkass GaudiAlgorithm -# -# Usage: -# -# @code -# -# from GauidPython.GaudiAlgs import GaudiAlgo, SUCCESS -# -# class MyClass(GaudiAlgo) : -# """ -# My specific Algorithm, derived from GaudiAlgo base class -# """ -# def __init__( self , name , **args ) : -# """ -# Constructor from algorithm instance name & parameters' -# """ -# #invoke the constructor of base class -# GaudiAlgo.__init__(self , name , **args ) -# -# def initialize ( self ) : -# 'Algorithm initialization' -# # initialize the base class -# status = GaudiAlgo.initialize( self ) -# if status.isFailure() : return status -# -# # locate the services and tools -# -# # locate some tool: -# extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') -# -# # locate the service -# rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') -# -# return SUCCESS -# -# -# def execute ( self ) : -# 'Major method (from IAlgorithm interface)' -# -# # get some data from Transient Event Store -# tracks = self.get('/Event/Rec/Tracks') -# -# # use counters -# c1 = self.counter('#Tracks') -# c2 = self.counter('No Tracks') -# if tracks.empty : -# c2+=1 -# c1 += tracks->size() -# -# if 1000 < tracks.size() : -# return self.Error('The event is *VERY* busy') -# -# return SUCCESS -# -# @endcode -# -# @see GaudiAlgorithm -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -class GaudiAlgo(_GaudiAlgorithm): - """ - ******************************************************************************* - * * 'Physisics do not like it, * - * * physisics do not need it, * - * * physisics do not use it' * - * * **************************** - * Usage: * - * * - * from GaudiPython.GaudiAlgs import GaudiAlgo, SUCCESS * - * * - * class MyClass(GaudiAlgo) : * - * ' My specific Algorithm, derived from GaudiAlgo base class ' * - * def __init__( self , name , **args ) : * - * 'Constructor from algorithm instance name & parameters' * - * #invoke the constructor of base class * - * GaudiAlgo.__init__(self , name , **args ) * - * * - * def initialize ( self ) : * - * 'Algorithm initialization' * - * # initialize the base class * - * status = GaudiAlgo.initialize( self ) * - * if status.isFailure() : return status * - * * - * # locate the services and tools * - * * - * # locate some tool: * - * extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') * - * * - * # locate the service * - * rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') * - * * - * return SUCCESS * - * * - * * - * def execute ( self ) : * - * 'Major method (from IAlgorithm interface)' * - * * - * # get some data from Transient Event Store * - * tracks = self.get('/Event/Rec/Tracks') * - * * - * # use counters * - * c1 = self.counter('#Tracks') * - * c2 = self.counter('No Tracks') * - * if tracks.empty : * - * c2+=1 * - * c1 += tracks->size() * - * * - * if 1000 < tracks.size() : * - * return self.Error('The event is *VERY* busy') * - * * - * return SUCCESS * - * * - ******************************************************************************* - """ - - pass - - -# ============================================================================= -# @class HistoAlgo -# The base class for easy histogramming -# -# Usage: -# -# -# @code -# -# from GaudiPython.GaudiAlgs import HistoAlgo, SUCCESS -# -# class MyClass(HistoAlgo) : -# ' My specific Algorithm, derived from GaudiAlgo base class ' -# def __init__( self , name , **args ) : -# 'Constructor from algorithm instance name & parameters' -# #invoke the constructor of base class -# HistoAlgo.__init__(self , name , **args ) -# -# def execute ( self ) : -# 'Major method (from IAlgorithm interface)' -# -# # get some data from Transient Event Store -# tracks = self.get('/Event/Rec/Tracks') -# -# self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) -# -# return SUCCESS -# -# @endcode -# -# Alternatively the histogram could be booked in advance: -# -# @code -# -# class MyClass(HistoAlgo) : -# ' My specific Algorithm, derived from GaudiAlgo base class ' -# def __init__( self , name ) : -# 'Constructor from algorithm instance name' -# #invoke the constructor of base class -# HistoAlgo.__init__(self , name ) -# -# def initialize ( self ) : -# 'Algorithm initialization' -# # initialize the base class -# status = HistoAlgo.initialize( self ) -# if status.isFailure() : return status -# -# # book the histogram -# self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) -# -# return SUCCESS -# -# -# def execute ( self ) : -# 'Major method (from IAlgorithm interface)' -# -# # get some data from Transient Event Store -# tracks = self.get('/Event/Rec/Tracks') -# -# # fill the histogram -# self.h1.fill ( tracks->size() ) -# -# return SUCCESS -# @endcode -# -# @see GaudiHistoAlg -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -class HistoAlgo(_GaudiHistoAlg): - """ - ******************************************************************************* - * * 'Physisics do not like it, * - * * physisics do not need it, * - * * physisics do not use it' * - * * **************************** - * Usage: * - * * - * from GaudiPython.GaudiAlgs import HistoAlgo, SUCCESS * - * * - * class MyClass(HistoAlgo) : * - * ' My specific Algorithm, derived from GaudiAlgo base class ' * - * def __init__( self , name , **args ) : * - * 'Constructor from algorithm instance name' * - * #invoke the constructor of base class * - * HistoAlgo.__init__(self , name , **args ) * - * * - * def execute ( self ) : * - * 'Major method (from IAlgorithm interface)' * - * * - * # get some data from Transient Event Store * - * tracks = self.get('/Event/Rec/Tracks') * - * * - * self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) * - * * - * return SUCCESS * - * * - * Alternatively the histogram could be booked in advance: * - * * - * class MyClass(HistoAlgo) : * - * ' My specific Algorithm, derived from GaudiAlgo base class ' * - * def __init__( self , name ) : * - * 'Constructor from algorithm instance name' * - * #invoke the constructor of base class * - * HistoAlgo.__init__(self , name ) * - * * - * def initialize ( self ) : * - * 'Algorithm initialization' * - * # initialize the base class * - * status = HistoAlgo.initialize( self ) * - * if status.isFailure() : return status * - * * - * # book the histogram * - * self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) * - * * - * return SUCCESS * - * * - * * - * def execute ( self ) : * - * 'Major method (from IAlgorithm interface)' * - * * - * # get some data from Transient Event Store * - * tracks = self.get('/Event/Rec/Tracks') * - * * - * # fill the histogram * - * self.h1.fill ( tracks->size() ) * - * * - * return SUCCESS * - * * - ******************************************************************************* - """ - - pass - - -# ============================================================================= -# @class TupleAlgo -# The base class for easy manupulations with N-Tuples -# -# Usage: -# -# @code -# -# from GaudiPython.GaudiAlgs import TupleAlgo, SUCCESS -# -# class MyClass(TupleAlgo) : -# ' My specific Algorithm, derived from TupleAlgo base class ' -# def __init__( self , name , **args ) : -# 'Constructor from algorithm instance name& parameters' -# #invoke the constructor of base class -# TupleAlgo.__init__(self , name , **args ) -# -# def execute ( self ) : -# 'Major method (from IAlgorithm interface)' -# -# # get some data from Transient Event Store -# tracks = self.get('/Event/Rec/Tracks') -# -# tup = self.nTuple('My N-Tuple') -# -# for track in tracks : -# -# pt = track.pt () -# p = track.p () -# chi2 = track.chi2 () -# -# #fill N-tuple: -# tup.column ( 'pt' , pt ) -# tup.column ( 'p' , p ) -# tup.column ( 'chi2' , chi2 ) -# #commit the row -# tup.write () -# -# return SUCCESS -# -# @endcode -# -# @see GaudiTupleAlg -# -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2006-11-26 - - -class TupleAlgo(_GaudiTupleAlg): - """ - ******************************************************************************* - * * 'Physisics do not like it, * - * * physisics do not need it, * - * * physisics do not use it' * - * * **************************** - * Usage: * - * * - * from GaudiPython.GaudiAlgs import TupleAlgo, SUCCESS * - * * - * class MyClass(TupleAlgo) : * - * ' My specific Algorithm, derived from TupleAlgo base class ' * - * def __init__( self , name , **args ) : * - * 'Constructor from algorithm instance name & parameters' * - * #invoke the constructor of base class * - * TupleAlgo.__init__(self , name , **args ) * - * * - * def execute ( self ) : * - * 'Major method (from IAlgorithm interface)' * - * * - * # get some data from Transient Event Store * - * tracks = self.get('/Event/Rec/Tracks') * - * * - * tup = self.nTuple('My N-Tuple') * - * * - * for track in tracks : * - * * - * pt = track.pt () * - * p = track.p () * - * chi2 = track.chi2 () * - * * - * #fill N-tuple: * - * tup.column ( 'pt' , pt ) * - * tup.column ( 'p' , p ) * - * tup.column ( 'chi2' , chi2 ) * - * #commit the row * - * tup.write () * - * * - * return SUCCESS * - * * - ******************************************************************************* - """ - - pass - - -class objectmethod(object): - def __init__(self, m): - self.method = m - - def __call__(self, *args): - print(args) - return self.method(*args) - - -GaudiAlgo._Base = _GaudiAlgorithm -HistoAlgo._Base = _GaudiHistoAlg -TupleAlgo._Base = _GaudiTupleAlg - -# initialize is 'unique' method : -GaudiAlgo.initialize = _initialize_ -HistoAlgo.initialize = _initialize_histo_ -TupleAlgo.initialize = _initialize_tuple_ - - -def _start_(self): - """ - The stub 'start' method needed by the internal implementation of PyAlg<>. - """ - # return self._Base.start_(self) - return SUCCESS - - -GaudiAlgo.start = _start_ -HistoAlgo.start = _start_ -TupleAlgo.start = _start_ - - -def _execute_(self): - """ - The fictive 'execute' method, which MUST be overwitten by user - """ - raise RuntimeError("Execute method is not implemented for %s" % self.name()) - - -GaudiAlgo.execute = _execute_ -HistoAlgo.execute = _execute_ -TupleAlgo.execute = _execute_ - - -def _stop_(self): - """ - The stub 'stop' method needed by the internal implementation of PyAlg<>. - """ - # return self._Base.stop_(self) - return SUCCESS - - -GaudiAlgo.stop = _stop_ -HistoAlgo.stop = _stop_ -TupleAlgo.stop = _stop_ - -# ============================================================================= - - -def _plot1D_(s, *a): - """ - The basic method to fill (book-on-demand) 1D-histogram - - The histogram will be created/booked dautomatically according to the - specifications: - - - literal or numerical ID (optional) - - title - - low edge - - high edge - - number of bins (default is 100) - - The reference to the histogram is returned and could be used for later manipulations - - """ - return HistoDecorator.plot1D(s, *a) - - -# ============================================================================= - - -def _plot2D_(s, *a): - """ - The basic method to fill (book-on-demand) 2D-histogram - - The histogram will be created/booked dautomatically according to the - specifications: - - - literal or numerical ID (optional) - - title - - low X-edge - - high X-edge - - low Y-edge - - high Y-edge - - number of X-bins (default is 50) - - number of Y-bins (default is 50) - - The reference to the histogram is returned and could be used for later manipulations - - """ - return HistoDecorator.plot2D(s, *a) - - -# ============================================================================= - - -def _plot3D_(s, *a): - """ - The basic method to fill (book-on-demand) 3D-histogram - - The histogram will be created/booked dautomatically according to the - specifications: - - - literal or numerical ID (optional) - - title - - low X-edge - - high X-edge - - low Y-edge - - high Y-edge - - low Z-edge - - high Z-edge - - number of X-bins (default is 10) - - number of Y-bins (default is 10) - - number of Y-bins (default is 10) - - The reference to the histogram is returned and could be used for later manipulations - - """ - return HistoDecorator.plot3D(s, *a) - - -# ============================================================================= - - -def _profile1D_(s, *a): - """ - The basic method to fill (book-on-demand) 1D profile histogram - - The profile histogram will be created/booked dautomatically - according to the specifications: - - - literal or numerical ID (optional) - - title - - low X-edge - - high X-edge - - number of X-bins (default is 100) - - The reference to the histogram is returned and could be used for later manipulations - - """ - return HistoDecorator.profile1D(s, *a) - - -# ============================================================================= - - -def _profile2D_(s, *a): - """ - The basic method to fill (book-on-demand) 2D profile histiogram - - The profile histogram will be created/booked automatically - according to the specifications: - - - literal or numerical ID (optional) - - title - - low X-edge - - high X-edge - - low Y-edge - - high Y-edge - - number of X-bins (default is 50) - - number of Y-bins (default is 50) - - The reference to the histogram is returned and could be used for later manipulations - - """ - return HistoDecorator.profile2D(s, *a) - - -# ============================================================================= - -_plot1D_.__doc__ += "\n" + HistoDecorator.plot1D.__doc__ -_plot2D_.__doc__ += "\n" + HistoDecorator.plot2D.__doc__ -_plot3D_.__doc__ += "\n" + HistoDecorator.plot3D.__doc__ -_profile1D_.__doc__ += "\n" + HistoDecorator.profile1D.__doc__ -_profile2D_.__doc__ += "\n" + HistoDecorator.profile2D.__doc__ - - -def _decorate_plots_(klasses): - t = type(klasses) - if not issubclass(t, list) and not issubclass(t, tuple): - klasses = [klasses] - for klass in klasses: - klass.plot = _plot1D_ - klass.plot1D = _plot1D_ - klass.plot2D = _plot2D_ - klass.plot3D = _plot3D_ - klass.profile1D = _profile1D_ - klass.profile2D = _profile2D_ - - -_decorate_plots_(HistoAlgo) -_decorate_plots_(TupleAlgo) - - -# ============================================================================= -def _nTuple_(s, *a): - """ - Retrieve (book-on-demand) N-Tuple object - """ - return TupleAlgDecorator.nTuple(s, *a) - - -# ============================================================================= - - -def _evtCol_(s, *a): - """ - Retrieve (book-on-demand) N-Tuple object for Event Tag Collections - """ - return TupleAlgDecorator.evtCol(s, *a) - - -_nTuple_.__doc__ += "\n" + TupleAlgDecorator.nTuple.__doc__ -_evtCol_.__doc__ += "\n" + TupleAlgDecorator.evtCol.__doc__ - - -def _decorate_tuples_(klasses): - t = type(klasses) - if not issubclass(t, list) and not issubclass(t, tuple): - klasses = [klasses] - for klass in klasses: - klass.nTuple = _nTuple_ - klass.evtCol = _evtCol_ - klass.ntupleSvc = _ntupleSvc - klass.tupleSvc = _ntupleSvc - klass.ntupSvc = _ntupleSvc - klass.tupSvc = _ntupleSvc - klass.evtColSvc = _evtcolSvc - klass.evtcolSvc = _evtcolSvc - - -# ========================================================== -_decorate_tuples_(TupleAlgo) - -# "decorate N-Tuple object -Tuple = cpp.Tuples.Tuple -_Dec = TupleDecorator - - -class TupleDecColumnDispatcher(object): - """Helper decorator class to workaround ROOT-6697""" - - def __init__(self, func): - self.func = func - self.__doc__ = func.__doc__ - dispatcher = func.disp if hasattr(func, "disp") else func.__overload__ - - mapping = {int: "int", bool: "bool", float: "double"} - for k in mapping: - signature = ( - "const Tuples::Tuple& tuple, const string& name, const %s value" - % (mapping[k]) - ) - mapping[k] = dispatcher(signature) - self.mapping = mapping - - def __call__(self, *a): - """ - Explicitly call the explicit signature for the case with 3 arguments and - the last one is 'int', 'bool' or 'float', for the other cases fall back - on the default dispatcher. - """ - if len(a) == 3: - t = type(a[-1]) - try: - return self.mapping[t](*a) - except KeyError: - pass - return self.func(*a) - - -if ROOT6WorkAroundEnabled("ROOT-6697") and ( - hasattr(_Dec.column, "disp") or hasattr(_Dec.column, "__overload__") -): - _Dec.column = TupleDecColumnDispatcher(_Dec.column) - - -def _t_nTuple_(s, *a): - """ - Access to underlying INTuple object - """ - return _Dec.nTuple(s, *a) - - -def _t_ntuple_(s, *a): - """ - Access to underlying NTuple::Tuple object - """ - return _Dec.ntuple(s, *a) - - -def _t_valid_(s, *a): - """ - Valid NTuple::Tuple object? - """ - return _Dec.valid(s, *a) - - -def _t_write_(s, *a): - """ - Commit the row/record to n-tuple - """ - return _Dec.write(s, *a) - - -def _t_column_(s, *a): - """ - Fill the certain column to n-tuple - """ - return _Dec.column(s, *a) - - -def _t_column_ll_(s, *a): - """ - Fill the 'long long' column - """ - return _Dec.column_ll(s, *a) - - -def _t_column_ull_(s, *a): - """ - Fill the 'unsigned long long' column - """ - return _Dec.column_ull(s, *a) - - -def _t_array_(s, *a): - """ - Fill the fixed-size array column - """ - return _Dec.array(s, *a) - - -def _t_matrix_(s, *a): - """ - Fill the fixed-size matrix column - """ - return _Dec.matrix(s, *a) - - -def _t_farray_(s, *a): - """ - Fill the floating-size array column - """ - return _Dec.farray(s, *a) - - -def _t_fmatrix_(s, *a): - """ - Fill the floating-size matrix column - """ - return _Dec.fmatrix(s, *a) - - -_t_nTuple_.__doc__ += "\n" + _Dec.nTuple.__doc__ -_t_ntuple_.__doc__ += "\n" + _Dec.ntuple.__doc__ -_t_valid_.__doc__ += "\n" + _Dec.valid.__doc__ -_t_write_.__doc__ += "\n" + _Dec.write.__doc__ -_t_column_.__doc__ += "\n" + _Dec.column.__doc__ -_t_column_ll_.__doc__ += "\n" + _Dec.column_ll.__doc__ -_t_column_ull_.__doc__ += "\n" + _Dec.column_ull.__doc__ -_t_array_.__doc__ += "\n" + _Dec.array.__doc__ -_t_matrix_.__doc__ += "\n" + _Dec.matrix.__doc__ -_t_farray_.__doc__ += "\n" + _Dec.farray.__doc__ -_t_fmatrix_.__doc__ += "\n" + _Dec.fmatrix.__doc__ - -Tuple.nTuple = _t_nTuple_ -Tuple.ntuple = _t_ntuple_ -Tuple.valid = _t_valid_ -Tuple.write = _t_write_ -Tuple.column = _t_column_ -Tuple.column_ll = _t_column_ll_ -Tuple.column_ull = _t_column_ull_ -Tuple.array = _t_array_ -Tuple.matrix = _t_matrix_ -Tuple.farray = _t_farray_ -Tuple.fmatrix = _t_fmatrix_ - -_alg_map_ = { - "__init__": _init_, # constructor - "tool": _tool_, # service locator - "svc": _service_, # tool locator - "evtSvc": _evtSvc, # event data service - "eventSvc": _evtSvc, # event data service - "detSvc": _detSvc, # detector data service - "histoSvc": _histoSvc, # histogram data service - "histSvc": _histoSvc, # histogram data service - "get": _get, # access to event data - "get_": _get_, # access to event data - "exist_": _exist_, # check the event data - "getDet": _getDet, # access to detector data - "finalize": _finalize_, # algorithm finalization - # - "hasProperty": _hasProperty_, # check the existence of property with given name - "getProperty": _getProperty_, # get the property value with given name - "setProperty": _setProperty_, # set the property with given name - "__setattr__": _set_attr_, # set the attribute/property with given name - "__getattr__": _get_attr_, # set the attribute/property with given name -} - - -# decorate the classes with the useful methods -def _decorate_algs_(klasses): - t = type(klasses) - if not issubclass(t, list) and not issubclass(t, tuple): - klasses = [klasses] - for _alg in klasses: - for key in _alg_map_: - setattr(_alg, key, _alg_map_[key]) - - -# = -_decorate_algs_(GaudiAlgo) -_decorate_algs_(HistoAlgo) -_decorate_algs_(TupleAlgo) - -# ============================================================================= -# Helper function to fill histogram/ntuple using 'map'-operation -# ============================================================================= - - -def mapvct(func, sequence, ovct=None): - """Helper function to fill histogram/ntuple using 'map'-operation""" - if not ovct: - vct = GaudiPython.Vector - else: - vct = ovct - if hasattr(sequence, "size"): - vct.reserve(vct.size() + sequence.size()) - elif hasattr(sequence, "__len__"): - vct.reserve(vct.size() + len(sequence)) - for object in sequence: - vct.push_back(func(object)) - if not ovct: - return vct - - -# ============================================================================= - - -# ============================================================================= -# get the list of tools -# ============================================================================= -def _get_all_tools_(self, method): - """ - Get all tools - """ - _tools = std.vector("IAlgTool*")() - _func = getattr(AlgDecorator, method) - _num = _func(self, _tools) - if _tools.size() != _num: - raise RuntimeError("Unable to extract Tools") - _res = [] - for _tool in _tools: - _res += [iAlgTool(_tool.name(), _tool)] - return _res - - -# ============================================================================= - - -def _Tools_a_(self): - """ - Retrieve the list of tools, - aquired by component through GaudiCommon<TYPE> base: - - >>> alg = ... ## get the algorithm - >>> tools = alg.Tools() ## get the tools - >>> for tool in tools : - ... print(tool) - - """ - _cmp = getattr(self, "_ialg") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_ialg") - return _get_all_tools_(_cmp, "_tools_a_") - - -# ============================================================================= - - -def _Tools_t_(self): - """ - Retrieve the list of tools, - aquired by component through GaudiCommon<TYPE> base: - - >>> tool = ... ## get the tool - >>> tools = tool.Tools() ## get the tools - >>> for t in tools : - ... print(t) - - """ - _cmp = getattr(self, "_itool") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_itool") - return _get_all_tools_(_cmp, "_tools_t_") - - -# ============================================================================= -# get the counter -# ============================================================================= - - -def _get_counter_(self, method, name): - """ - get the counter - """ - _func = getattr(AlgDecorator, method) - return _func(self, name) - - -# ============================================================================== - - -def _Counter_a_(self, name): - """ - Retrieve the counter managed GaudiCommon<TYPE> base by name: - - >>> alg = ... ## get the algorithm - >>> cnt = alg.Counter('#accept') ## get the counter - >>> print(cnt) - - """ - _cmp = getattr(self, "_ialg") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_ialg") - return _get_counter_(_cmp, "_counter_a_", name) - - -# ============================================================================== - - -def _Counter_t_(self, name): - """ - Retrieve the counter managed GaudiCommon<TYPE> base by name: - - >>> tool = ... ## get the tool - >>> cnt = tool.Counter('#accept') ## get the counter - >>> print(cnt) - - """ - _cmp = getattr(self, "_itool") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_itool") - return _get_counter_(_cmp, "_counter_t_", name) - - -# ============================================================================= -# get all histos -# ============================================================================= -cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString -cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString -cpp.StatEntity.__repr__ = cpp.StatEntity.toString -cpp.StatEntity.__str__ = cpp.StatEntity.toString - -# ============================================================================= - - -def _get_all_histos_(component, method, name): - """ - Get All histogram form the component - """ - _res = {} - for _his in ( - std.vector("AIDA::IProfile2D*"), - std.vector("AIDA::IProfile1D*"), - std.vector("AIDA::IHistogram3D*"), - std.vector("AIDA::IHistogram2D*"), - std.vector("AIDA::IHistogram1D*"), - ): - _his = _his() - _ids = std.vector("GaudiAlg::ID")() - _fun = getattr(HistoDecorator, method) - _num = _fun(component, _ids, _his) - if _ids.size() != _num or _his.size() != _num: - raise RuntimeError("Unable to extract Histos!") - for _i in range(0, _num): - _id = _ids[_i] - if _id.numeric(): - _id = _id.numericID() - elif _id.literal(): - _id = _id.literalID() - else: - _id = _id.idAsString() - _res[_id] = _his[_i] - - if not name: - return _res # return the dictionary - - id = cpp.GaudiAlg.ID(name) - for i in (name, id.literalID(), id.numericID(), id.idAsString(), id): - h = _res.get(i, None) - if not not h: - return h # return the histogram - - return None - - -# ============================================================================= - - -def _Histos_a_(self, name=None): - """ - Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: - - >>> alg = ... ## get the algorithm - >>> histos = alg.Histos() ## get all histograms & profiles - >>> for key in histos : - ... print(key, histos[key]) - - Retrive the histogram with the certain ID : - - >>> alg = ... ## get the algorithm - >>> histo = alg.Histos('some histo ID') ## get the histo by ID - >>> print(histo) - - """ - _cmp = getattr(self, "_ialg") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_ialg") - return _get_all_histos_(_cmp, "_histos_a_", name) - - -# ============================================================================= - - -def _Histos_t_(self, name=None): - """ - Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: - - >>> tool = ... ## get the tool - >>> histos = tool.Histos() ## get all histograms & profiles - >>> for key in histos : - ... print(key, histos[key]) - - Retrive the historgam with certain ID : - - >>> tool = ... ## get the tool - >>> histo = tool.Histos('some histo ID') ## get the histo by ID - >>> print(histo) - - """ - _cmp = getattr(self, "_itool") - if not _cmp: - self.retrieveInterface() - _cmp = getattr(self, "_itool") - return _get_all_histos_(_cmp, "_histos_t_", name) - - -# ============================================================================= - -_Tools_a_.__doc__ += "\n" + AlgDecorator._tools_a_.__doc__ -_Tools_t_.__doc__ += "\n" + AlgDecorator._tools_t_.__doc__ -_Counter_a_.__doc__ += "\n" + AlgDecorator._counter_a_.__doc__ -_Counter_t_.__doc__ += "\n" + AlgDecorator._counter_t_.__doc__ -_Histos_a_.__doc__ += "\n" + HistoDecorator._histos_a_.__doc__ -_Histos_t_.__doc__ += "\n" + HistoDecorator._histos_t_.__doc__ - -iAlgorithm.Tools = _Tools_a_ -iAlgTool.Tools = _Tools_t_ -iAlgorithm.Counter = _Counter_a_ -iAlgTool.Counter = _Counter_t_ -iAlgorithm.Histos = _Histos_a_ -iAlgTool.Histos = _Histos_t_ - -# finally add some decoration for histograms -import GaudiPython.HistoUtils - -# ============================================================================= -# pseudo help -# ============================================================================= - - -def _help_(): - print(__doc__, __author__) - print("\t\t\tDoc-string for class GaudiAlgo \n", GaudiAlgo.__doc__) - print("\t\t\tDoc-string for class HistoAlgo \n", HistoAlgo.__doc__) - print("\t\t\tDoc-string for class TupleAlgo \n", TupleAlgo.__doc__) - - -# ============================================================================= -# pseudo-test suite -# ============================================================================= -if __name__ == "__main__": - _help_() - -# ============================================================================= -# The END -# ============================================================================= +sys.modules[__name__] = GaudiAlg.Algs diff --git a/GaudiPython/python/GaudiPython/HistoUtils.py b/GaudiPython/python/GaudiPython/HistoUtils.py index ecfbde81c53a35453812a03b664fef4f7fe23c96..990b2e56494ad9cae263bb28c2a7cd3199be53bc 100644 --- a/GaudiPython/python/GaudiPython/HistoUtils.py +++ b/GaudiPython/python/GaudiPython/HistoUtils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 ##################################################################################### -# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -9,1072 +9,19 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -# ============================================================================= -# This module contains set of simple and useful utilities for booking and -# manipulations with Gaudi-AIDA histograms, inspired by Thomas' request -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-08-03 -# ============================================================================= -""" -This module contains set of simple and useful utilities for booking and -manipulations with Gaudi-AIDA histograms, inspired by Thomas' request +# deprecated module -The module contains following public symbols: +# TODO: enable deprecation warning +# import warnings +# warnings.warn( +# "GaudiPython: Use 'GaudiAlg.HistoUtils' module instead of deprecated 'GaudiPython.HistoUtils'", +# DeprecationWarning, +# stacklevel=3, +# ) +# del warnings - - book for booking of various 1D,2D&3D-histograms - - bookProf for booking of various 1D&2D-profiles - - getAsAIDA for retrieval of histograms/profiles from HTS in AIDA format - - getAsROOT for retrieval of histograms/profiles from HTS in ROOT format - - fill for smart filling of 1D-histogram (AIDA or ROOT) - - aida2root for conversion of AIDA histogram to ROOT - - HistoStats for many statistical information - - HistoFile class for storing histograms to a file - - histoDump for dumping of the histogram in text format (a'la HBOOK) - - dumpHisto for dumping of the histogram in text format (a'la HBOOK) +import sys -""" -from __future__ import print_function +import GaudiAlg.HistoUtils -# ============================================================================= -__author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" -# ============================================================================= -__all__ = ( - "book", # book AIDA histogram using Histogram Service - "bookProf", # book AIDA profile histogram using Histogram Service - "getAsAIDA", # get the histogram form Histogram Service as AIDA histogram - "getAsROOT", # get the histogram form Histogram Service as AIDA histogram - "fill", # "power-fill" method for filling of histograms - "aida2root", # AIDA -> ROOT converter - "HistoStats", # statistical information for 1D-histograms - "HistoFile", # class for storing histograms to a file - "histoDump", # dump histogramintext format a'la HBOOK - "dumpHisto", # dump histogramintext format a'la HBOOK -) -# ============================================================================= -# import core of Gaudi -import ROOT -from GaudiPython.Bindings import AppMgr -from GaudiPython.Bindings import gbl as cpp -from GaudiPython.Bindings import iHistogramSvc - -HID = cpp.GaudiAlg.ID - -## global flag -useROOT = False - -# ============================================================================= -# Helper private auxiliary function to get Application Manager - - -def _getAppMgr(**kwargs): - """ - Helper private auxiliary function to get Application Manager - """ - gaudi = kwargs.get("gaudi", None) - if not gaudi: - gaudi = AppMgr() - if not gaudi: - raise RuntimeError("Unable to get valid ApplicationMgr") - - state = gaudi._isvc.FSMState() - if state < cpp.Gaudi.StateMachine.CONFIGURED: - gaudi.config() - state = gaudi._isvc.FSMState() - if state < cpp.Gaudi.StateMachine.INITIALIZED: - gaudi.initialize() - - return gaudi # RETURN - - -# ============================================================================= -# Helper private auxiliary function to get iHistogramSvs - - -def _getHistoSvc(**kwargs): - """ - Helper private auxiliary function to get iHistogramSvs - """ - svc = kwargs.get("service", None) - if not svc: - svc = kwargs.get("svc", None) - else: - return svc # RETURN - gaudi = _getAppMgr(**kwargs) - return gaudi.histsvc() # RETURN - - -# ============================================================================= -# Helper private auxiliary function to get iDataSvs - - -def _getEvtSvc(**kwargs): - """ - Helper private auxiliary function to get iDataSvs - """ - svc = kwargs.get("service", None) - if not svc: - svc = kwargs.get("svc", None) - else: - return svc # RETURN - gaudi = _getAppMgr(**kwargs) - return gaudi.evtsvc() # RETURN - - -# ============================================================================= -# The trivial function to book the various 1D,2D&3D-histograms - - -def book(*args, **kwargs): - """ - The trivial function to book the various 1D,2D&3D-histograms - - (1) book the trivial 1D histogram with full path - - >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store - 'cosine of decay angle ' , ## histogram title - 100 , ## number of bins - -1 , ## low edge - 100 ) ## high edge - - (2) book the trivial 1D histogram with directory path and string ID : - - >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS - 'H1' , ## string histogram identifier - 'cosine of decay angle ' , ## histogram title - 100 , ## number of bins - -1 , ## low edge - 100 ) ## high edge - - (3) book the trivial 1D histogram with directory path and integer ID : - - >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS - 124 , ## integer histogram identifier - 'cosine of decay angle ' , ## histogram title - 100 , ## number of bins - -1 , ## low edge - 100 ) ## high edge - - (4) book the trivial 2D histogram with full path - - >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store - 'm12**2 versus m13**2' , ## histogram title - 50 , ## number of X-bins - 1.0 , ## low X-edge - 4.0 , ## high X-edge - 50 , ## number of Y-bins - 1 , ## low Y-edge - 2 ) ## high Y-edge - - (5) book the trivial 2D histogram with directory path and literal ID - - >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store - 'Dalitz1' , ## literal histogram identifier - 'm12**2 versus m13**2' , ## histogram title - 50 , ## number of X-bins - 1.0 , ## low X-edge - 4.0 , ## high X-edge - 50 , ## number of Y-bins - 1 , ## low Y-edge - 2 ) ## high Y-edge - - (6) book the trivial 2D histogram with directory path and integer ID - - >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store - 854 , ## integer histogram identifier - 'm12**2 versus m13**2' , ## histogram title - 50 , ## number of X-bins - 1.0 , ## low X-edge - 4.0 , ## high X-edge - 50 , ## number of Y-bins - 1.0 , ## low Y-edge - 4.0 ) ## high Y-edge - - (7) book the trivial 3D histogram with full path - - >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store - 'x vs y vs z ' , ## histogram title - 10 , ## number of X-bins - -1.0 , ## low X-edge - 1.0 , ## high X-edge - 10 , ## number of Y-bins - -1.0 , ## low Y-edge - 1.0 , ## high Y-edge - 10 , ## number of Z-bins - -1.0 , ## low Z-edge - 1.0 ) ## high Z-edge - - (8) book the trivial 3D histogram with directory path and literal ID - - >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store - 'xyz' , ## literal histogram identifier - 'x vs y vs z' , ## histogram title - 10 , ## number of X-bins - -1.0 , ## low X-edge - 1.0 , ## high X-edge - 10 , ## number of Y-bins - -1.0 , ## low Y-edge - 1.0 , ## high Y-edge - 10 , ## number of Z-bins - -1.0 , ## low Z-edge - 1.0 ) ## high Z-edge - - (9) book the trivial 3D histogram with directory path and integer ID - - >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store - 888 , ## integer histogram identifier - 'x vs y vs z' , ## histogram title - 10 , ## number of X-bins - -1.0 , ## low X-edge - 1.0 , ## high X-edge - 10 , ## number of Y-bins - -1.0 , ## low Y-edge - 1.0 , ## high Y-edge - 10 , ## number of Z-bins - -1.0 , ## low Z-edge - 1.0 ) ## high Z-edge - - Many other booking methods are available, - e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book - - """ - if useROOT or kwargs.get("useROOT", False) or not kwargs.get("useAIDA", True): - from ROOT import TH1D - - a0 = args[0] - a1 = args[1] - a2 = args[2] - if not isinstance(a1, str): - a1 = "h" + str(a1) - if str is type(a2): - return TH1D(a0 + a1, a2, *args[3:]) - else: - return TH1D(a0, a1, *args[2:]) - - svc = _getHistoSvc(**kwargs) - if not svc: - raise RuntimeError("Unable to get valid HistogramService ") - # book the histogram using the service - return svc.book(*args) # RETURN - - -book.__doc__ += ( - "\n\n" + "\thelp(iHistogramSvc.book) : \n\n" + iHistogramSvc.book.__doc__ -) -book.__doc__ += ( - "\n\n" + "\thelp(IHistogramSvc::book) : \n\n" + cpp.IHistogramSvc.book.__doc__ -) - -# ============================================================================= -# The trivial function to book 1D&2D profile histograms: - - -def bookProf(*args, **kwargs): - """ - - The trivial function to book 1D&2D profile histograms: - - (1) book 1D-profile histogram with full path in Histogram Transient Store: - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 'Energy Correction' , ## the histogram title - 100 , ## number of X-bins - 0.0 , ## low X-edge - 100 ) ## high X-edge - - (2) book 1D-profile histogram with directory path and literal ID - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 'Calibration' , ## the histogram literal identifier - 'Energy Correction' , ## the histogram title - 100 , ## number of X-bins - 0.0 , ## low X-edge - 100 ) ## high X-edge - - (3) book 1D-profile histogram with directory path and integer ID - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 418 , ## the histogram integer identifier - 'Energy Correction' , ## the histogram title - 100 , ## number of X-bins - 0.0 , ## low X-edge - 100 ) ## high X-edge - - (4) book 2D-profile histogram with full path in Histogram Transient Store: - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 'Energy Correction' , ## the histogram title - 50 , ## number of X-bins - 0.0 , ## low X-edge - 100 , ## high X-edge - 50 , ## number of Y-bins - 0.0 , ## low Y-edge - 100 ) ## high Y-edge - - (5) book 2D-profile histogram with directory path and literal ID - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 'Calibration' , ## the histogram literal identifier - 'Energy Correction' , ## the histogram title - 50 , ## number of X-bins - 0.0 , ## low X-edge - 100 , ## high X-edge - 50 , ## number of Y-bins - 0.0 , ## low Y-edge - 100 ) ## high Y-edge - - (6) book 2D-profile histogram with directory path and integer ID - >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store - 418 , ## the histogram integer identifier - 'Energy Correction' , ## the histogram title - 50 , ## number of X-bins - 0.0 , ## low X-edge - 100 , ## high X-edge - 50 , ## number of Y-bins - 0.0 , ## low Y-edge - 100 ) ## high Y-edge - - Many other booking methods are available, - e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book - - """ - svc = _getHistoSvc(**kwargs) - if not svc: - raise RuntimeError("Unable to get valid HistogramService ") - # book the histogram using the service - return svc.bookProf(*args) # RETURN - - -bookProf.__doc__ += ( - "\n\n" + "\thelp(iHistogramSvc.bookProf) : \n\n" + iHistogramSvc.bookProf.__doc__ -) -bookProf.__doc__ += ( - "\n\n" - + "\thelp(IHistogramSvc::bookProf) : \n\n" - + cpp.IHistogramSvc.bookProf.__doc__ -) - -# ============================================================================= -# The most trivial function to retrieve the histogram from Histogram Transient Store - - -def getAsAIDA(path, **kwargs): - """ - - The most trivial function to retrieve the histogram from Histogram Transient Store - The histogram is returned by reference to its AIDA-representation (if possible) - - >>> h = getAsAIDA ( 'some/path/to/my/histogram' ) - - """ - svc = _getHistoSvc(**kwargs) - if not svc: - raise RuntimeError("Unable to get valid HistogramService ") - # return the histogram - return svc.getAsAIDA(path) # RETURN - - -getAsAIDA.__doc__ += ( - "\n\n" + "\thelp(iHistogramSvc.getAsAIDA) : \n\n" + iHistogramSvc.getAsAIDA.__doc__ -) -getAsAIDA.__doc__ += ( - "\n\n" + "\thelp(iHistogramSvc.retrieve) : \n\n" + iHistogramSvc.retrieve.__doc__ -) - -# ============================================================================= -# The most trivial function to retrieve the histogram from Histogram Transient Store - - -def getAsROOT(path, **kwargs): - """ - - The most trivial function to retrieve the histogram from Histogram Transient Store - The histogram is returned by reference to its underlying native ROOT-representation (if possible) - - >>> h = getAsROOT ( 'some/path/to/my/histogram' ) - - """ - svc = _getHistoSvc(**kwargs) - if not svc: - raise RuntimeError("Unable to get valid HistogramService ") - # return the histogram - return svc.getAsROOT(path) # RETURN - - -getAsROOT.__doc__ += ( - "\n\n" + "\thelp(iHistogramSvc.getAsROOT) : \n\n" + iHistogramSvc.getAsROOT.__doc__ -) - - -# ============================================================================= -# The function which allows 'the smart fill' of 1D-histogram -def fill( - histo, # histogram - data, # input data - fun=lambda x: x, # function to be used - cut=lambda x: True, # cut to be applied - **kwargs -): # optional extra arguments - """ - - The function which allows 'the smart fill' of 1D-histogram - - >>> histo = ... - - The most trivial case, fill with the value - >>> fill ( histo , 1.0 ) - - Fill from any iterable object (sequence) - >>> fill ( histo , [1,,2,3,4,5,10] ) - - Fill from iterable object and apply the function: - >>> fill ( histo , [1,2,3,4,5] , math.sin ) - - Use lambda form: - >>> fill ( histo , [1,2,3,4,5] , lambda x : x*x ) - - The same - >>> fill ( histo , [1,2,3,4,5] , fun = lambda x : x*x ) - - Use internal attributes: - >>> tracks = evtSvc['Rec/Track/Best'] ## iterable container of tracks - >>> fill ( histo , tracks , lambda t : t.pt() ) - - Apply the predicate: fill only even numbers: - >>> fill ( histo , [1,2,3,4,5,6,7] , lambda x : x , lambda y : y%2 ) - - The same (omit the trivial function) : - >>> fill ( histo , [1,2,3,4,5,6,7] , cut = lambda y : y%2 ) - - Apply the predicate: fill only pt for positively charged tracks: - >>> tracks = evtSvc['Rec/Track/Best'] - >>> fill ( histo , tracks , lambda t : t.pt() , lambda t : 0<t.charge() ) - - The same: - >>> fill ( histo , tracks , - fun = lambda t : t.pt() , - cut = lambda t : 0<t.charge() ) - - Ordinary functions are also fine: - >>> def myfun ( track ) : return sin( track.pt() + track.p() ) - >>> def mycut ( track ) : return track.p() > 100 * GeV - >>> fill ( histo , tracks , myfun , mycut ) - - The 'data' could be the address in TES, in this case the object - is retrieved from TES and the method is applied to the objects, - retrieved from TES: - >>> fill ( histo , ## the reference to the histogram - 'Rec/Track/Best' , ## the location of objects in TES - lambda t : t.pt() ) ## function to be used for histogram fill - >>> fill ( histo , ## the reference to the histogram - 'Rec/Track/Best' , ## the address of objects in TES - lambda t : t.pt() , ## the function to be used for histogram fill - lambda t : t.charge()>0 ) ## the criteria to select tracks - - The arguments 'fun' and 'cut' could be strings, in this case - they are evaluated by python before usage. - This option could be often very useful. - - """ - - # if value is a string, try to get the objects from TES - if type(data) == str: - svc = _getEvtSvc(**kwargs) - data = svc[data] - return fill(histo, data, fun, cut, **kwargs) - - # if the function is a string: evaluate it! - if type(fun) == str: - fun = eval(fun, globals()) - - # if the criterion is a string: evaluate it! - if type(cut) == str: - cut = eval(cut, globals()) - - if not hasattr(data, "__iter__"): - data = [data] - - if not hasattr(histo, "fill") and hasattr(histo, "Fill"): - setattr(histo, "fill", getattr(histo, "Fill")) - - for item in data: - if not cut(item): - continue # CONTINUE - histo.fill(fun(item)) - - return histo # RETURN - - -# ============================================================================= -# AIDA -> ROOT converter -aida2root = cpp.Gaudi.Utils.Aida2ROOT.aida2root - -# ============================================================================= -# Convert AIDA to ROOT - - -def _to_root_(self): - """ - Convert AIDA to ROOT - - >>> aida = ... ## get AIDA histogram - >>> root = aida.toROOT() ## convert it to ROOT - - """ - return aida2root(self) - - -_to_root_.__doc__ += aida2root.__doc__ - -for t in ( - cpp.AIDA.IHistogram3D, - cpp.AIDA.IHistogram2D, - cpp.AIDA.IHistogram1D, - cpp.AIDA.IProfile2D, - cpp.AIDA.IProfile1D, -): - if not hasattr(t, "Fill") and hasattr(t, "fill"): - setattr(t, "Fill", getattr(t, "fill")) - for attr in ("toROOT", "toRoot", "asROOT", "asRoot", "AsROOT", "AsRoot"): - if not hasattr(t, attr): - setattr(t, attr, _to_root_) - -cpp.AIDA.IHistogram3D.__repr__ = lambda s: cpp.GaudiAlg.Print3D.toString( - s, HID(s.title()) -) -cpp.AIDA.IHistogram3D.__str__ = cpp.AIDA.IHistogram3D.__repr__ - -HistoStats = cpp.Gaudi.Utils.HistoStats - -# ============================================================================= -# Evaluate 'bin-by-bin' momentum of certain order around the value - - -def _moment_(self, order, value=0): - """ - Evaluate 'bin-by-bin' momentum of order 'order' around the value 'value' - for 1D histogram - - >>> h1 = ... - >>> print(h1.moment ( 5 )) - - """ - return HistoStats.moment(self, order, value) - - -# ============================================================================= -# Evaluate error in 'bin-by-bin' momentum of certain order around the value - - -def _momentErr_(self, order): - """ - Evaluate error for 'bin-by-bin' momentum of order 'order' around the value 'value' - for 1D histogram - - >>> h1 = ... - >>> print(h1.momentErr ( 5 )) - - """ - return HistoStats.momentErr(self, order) - - -# ============================================================================= -# Evaluate 'bin-by-bin' central momentum (around mean value) - - -def _centralMoment_(self, order): - """ - Evaluate 'bin-by-bin' central momentum (around mean value) - for 1D histogram - - >>> h1 = ... - >>> print(h1.centralMoment ( 5 )) - - """ - return HistoStats.centralMoment(self, order) - - -# ============================================================================= -# Evaluate error in 'bin-by-bin' momentum of certain order around the value - - -def _centralMomentErr_(self, order): - """ - Evaluate error for 'bin-by-bin' central momentum (around mean value) - for 1D histogram - - >>> h1 = ... - >>> print(h1.centralMomentErr ( 5 )) - - """ - return HistoStats.centralMomentErr(self, order) - - -# ============================================================================= -# Evaluate 'bin-by-bin' skewness for 1D histogram - - -def _skewness_(self): - """ - Evaluate 'bin-by-bin' skewness for 1D AIDA histogram - - >>> h1 = ... - >>> print(h1.skewness()) - - """ - return HistoStats.skewness(self) - - -# ============================================================================= -# Evaluate error for 'bin-by-bin' skewness for 1D histogram - - -def _skewnessErr_(self): - """ - Evaluate error for 'bin-by-bin' skewness - - >>> h1 = ... - >>> print(h1.skewnessErr()) - - """ - return HistoStats.skewnessErr(self) - - -# ============================================================================= -# Evaluate 'bin-by-bin' kurtosis for 1D histogram - - -def _kurtosis_(self): - """ - Evaluate 'bin-by-bin' kurtosis - - >>> h1 = ... - >>> print(h1.kurtosis ()) - - """ - return HistoStats.kurtosis(self) - - -# ============================================================================= -# Evaluate error for 'bin-by-bin' kurtosis for 1D histogram - - -def _kurtosisErr_(self): - """ - Evaluate error for 'bin-by-bin' kurtotis for 1D AIDA histogram - - >>> h1 = ... - >>> print(h1.kurtotisErr()) - - """ - return HistoStats.kurtosisErr(self) - - -# ============================================================================= - - -def _nEff_(self): - """ - Number of equivalent entries - """ - return HistoStats.nEff(self) - - -# ============================================================================= - - -def _mean_(self): - """ - Evaluate the MEAN value - """ - return HistoStats.mean(self) - - -# ============================================================================= - - -def _meanErr_(self): - """ - Evaluate the error for MEAN estimate - """ - return HistoStats.meanErr(self) - - -# ============================================================================= - - -def _rms_(self): - """ - Evaluate the RMS for AIDA histogram - """ - return HistoStats.rms(self) - - -# ============================================================================= - - -def _rmsErr_(self): - """ - Evaluate the error for RMS estimate - """ - return HistoStats.rmsErr(self) - - -# ============================================================================= - - -def _sumBinHeightErr_(self): - """ - Get an error in the sum bin height ('in-range integral') - """ - return HistoStats.sumBinHeightErr(self) - - -# ============================================================================= - - -def _sumAllBinHeightErr_(self): - """Get an error in the sum bin height ('in-range integral')""" - return HistoStats.sumAllBinHeightErr(self) - - -# ============================================================================= - - -def _overflowEntriesFrac_(self): - """ - The fraction of overflow entries (useful for shape comparison) - """ - return HistoStats.overflowEntriesFrac(self) - - -# ============================================================================= - - -def _overflowEntriesFracErr_(self): - """ - The error for fraction of overflow entries (useful for shape comparison) - """ - return HistoStats.overflowEntriesFracErr(self) - - -# ============================================================================= - - -def _underflowEntriesFrac_(self): - """ - The fraction of underflow entries (useful for shape comparison) - """ - return HistoStats.underflowEntriesFrac(self) - - -# ============================================================================= - - -def _underflowEntriesFracErr_(self): - """ - The error for fraction of underflow entries (useful for shape comparison) - """ - return HistoStats.underflowEntriesFracErr(self) - - -# ============================================================================= - - -def _overflowIntegralFrac_(self): - """ - The fraction of overflow integral (useful for shape comparison) - """ - return HistoStats.overflowIntegralFrac(self) - - -# ============================================================================= - - -def _overflowIntegralFracErr_(self): - """ - The error for fraction of overflow integral (useful for shape comparison) - """ - return HistoStats.overflowIntegralFracErr(self) - - -# ============================================================================= - - -def _underflowIntegralFrac_(self): - """ - The fraction of underflow integral (useful for shape comparison) - """ - return HistoStats.underflowIntegralFrac(self) - - -# ============================================================================= - - -def _underflowIntegralFracErr_(self): - """ - The error for fraction of underflow integral (useful for shape comparison) - """ - return HistoStats.underflowIntegralFracErr(self) - - -# ============================================================================= -# get number of entries in histogram up to the certain bin (not-included) -# get number of entries in histogram form the certain -# minimal bin up to the certain maximal bin (not-included) - - -def _nEntries_(self, i1, i2=-10000000): - """ - Get number of entries in histogram up to the certain bin (not-included) - - attention: underflow bin is included! - - >>> h1 - >>> print(h1.nEntries ( 10 )) - - Get number of entries in histogram form the certain - minimal bin up to the certain maximal bin (not-included) - - >>> h1 - >>> print(h1.nEntries ( 10 , 15 )) - - """ - if i2 < i1 or i2 < 0: - return HistoStats.nEntries(self, i1) - return HistoStats.nEntries(self, i1, i2) - - -# ============================================================================= - - -def _nEntriesFrac_(self, i1, i2=-10000000): - """ - Get the fraction of entries in histogram up to the certain bin (not-included) - - attention: underflow bin is included! - - >>> h1 - >>> print(h1.nEntriesFrac ( 10 )) - - Get the fraction of entries in histogram form the certain - minimal bin up to the certain maximal bin (not-included) - - >>> h1 - >>> print(h1.nEntriesFrac ( 10 , 15 )) - - """ - if i2 < i1 or i2 < 0: - return HistoStats.nEntriesFrac(self, i1) - return HistoStats.nEntriesFrac(self, i1, i2) - - -# ============================================================================= - - -def _nEntriesFracErr_(self, i1, i2=-10000000): - """ - Get error for fraction of entries in histogram up to the certain bin (not-included) - - attention: underflow bin is included! - - >>> h1 - >>> print(h1.nEntriesFracErr( 10 )) - - Get error fraction of entries in histogram form the certain - minimal bin up to the certain maximal bin (not-included) - - >>> h1 - >>> print(h1.nEntriesFracErr ( 10 , 15 )) - - """ - if i2 < i1 or i2 < 0: - return HistoStats.nEntriesFracErr(self, i1) - return HistoStats.nEntriesFracErr(self, i1, i2) - - -# ============================================================================= -i1DH = cpp.AIDA.IHistogram1D - -if not hasattr(i1DH, "moment"): - i1DH.moment = _moment_ -if not hasattr(i1DH, "momentErr"): - i1DH.momentErr = _momentErr_ -if not hasattr(i1DH, "centralMoment"): - i1DH.centralMoment = _centralMoment_ -if not hasattr(i1DH, "momentMomentErr"): - i1DH.centralMomentErr = _centralMomentErr_ -if not hasattr(i1DH, "nEff"): - i1DH.nEff = _nEff_ -if not hasattr(i1DH, "mean"): - i1DH.mean = _mean_ -if not hasattr(i1DH, "meanErr"): - i1DH.meanErr = _meanErr_ -if not hasattr(i1DH, "rms"): - i1DH.rms = _rms_ -if not hasattr(i1DH, "rmsErr"): - i1DH.rmsErr = _rmsErr_ -if not hasattr(i1DH, "skewness"): - i1DH.skewness = _skewness_ -if not hasattr(i1DH, "skewnessErr"): - i1DH.skewnessErr = _skewnessErr_ -if not hasattr(i1DH, "kurtosis"): - i1DH.kurtosis = _kurtosis_ -if not hasattr(i1DH, "kurtosisErr"): - i1DH.kurtosisErr = _kurtosisErr_ - -if not hasattr(i1DH, "overflowEntriesFrac"): - i1DH.overflowEntriesFrac = _overflowEntriesFrac_ -if not hasattr(i1DH, "overflowEntriesFracErr"): - i1DH.overflowEntriesFracErr = _overflowEntriesFracErr_ -if not hasattr(i1DH, "underflowEntriesFrac"): - i1DH.underflowEntriesFrac = _underflowEntriesFrac_ -if not hasattr(i1DH, "underflowEntriesFracErr"): - i1DH.underflowEntriesFracErr = _underflowEntriesFracErr_ - -if not hasattr(i1DH, "overflowIntegralFrac"): - i1DH.overflowIntegralFrac = _overflowIntegralFrac_ -if not hasattr(i1DH, "overflowIntegralFracErr"): - i1DH.overflowIntegralFracErr = _overflowIntegralFracErr_ -if not hasattr(i1DH, "underflowIntegralFrac"): - i1DH.underflowIntegralFrac = _underflowIntegralFrac_ -if not hasattr(i1DH, "underflowIntegralFracErr"): - i1DH.underflowIntegralFracErr = _underflowIntegralFracErr_ - -if not hasattr(i1DH, "nEntries"): - i1DH.nEntries = _nEntries_ -if not hasattr(i1DH, "nEntriesFrac"): - i1DH.nEntriesFrac = _nEntriesFrac_ -if not hasattr(i1DH, "nEntriesFracErr"): - i1DH.nEntriesFracErr = _nEntriesFracErr_ - -# ============================================================================ - - -def _path_(self): - """ - Get the path in THS for the given AIDA object: - - >>> aida = - >>> print(aida.path()) - - """ - return cpp.Gaudi.Utils.Histos.path(self) - - -iBH = cpp.AIDA.IBaseHistogram -if not hasattr(iBH, "path"): - iBH.path = _path_ -if not hasattr(iBH, "TESpath"): - iBH.TESpath = _path_ -if not hasattr(iBH, "location"): - iBH.location = _path_ - - -# ============================================================================= -def __dumpHisto__(histo, *args): - """ - - Dump the histogram/profile in text format (a'la HBOOK) - - >>> histo - >>> print(dumpHisto ( histo )) - - >>> print(histo.dump()) - >>> print(histo.dump( 20 , 20 )) - >>> print(histo.dump( 20 , 20 , True )) - - Uses: - - """ - return cpp.Gaudi.Utils.Histos.histoDump(histo, *args) - - -__dumpHisto__.__doc__ = "\n" + cpp.Gaudi.Utils.Histos.histoDump.__doc__ - -# ============================================================================= -# the actual function for text dump of the histogram -histoDump = __dumpHisto__ -dumpHisto = __dumpHisto__ - -for t in ( - cpp.AIDA.IHistogram1D, - cpp.AIDA.IProfile1D, - ROOT.TH1D, - ROOT.TH1F, - ROOT.TH1, - ROOT.TProfile, -): - for method in ("dump", "dumpHisto", "dumpAsText"): - if not hasattr(t, method): - setattr(t, method, __dumpHisto__) - -# ============================================================================== - - -class HistoFile: - """ - Class to write histograms to a ROOT file. - hFile = HistoFile("myFile.root") - myHisto = ... - hFile.save(myHisto) - myHisto0 = ... - myHisto1 = ... - myHisto2 = ... - hFile.save(myHisto0, myHisto1, myHisto2) - histoList = [h0, h1, h2, h3] - hFile.save(histoList) - ... - hWriter.close() - """ - - __author__ = "Juan Palacios juan.palacios@nikhef.nl" - - def __init__(self, fileName): - self.file = ROOT.TFile(fileName, "RECREATE") - from GaudiPython import gbl - - self.aida2root = gbl.Gaudi.Utils.Aida2ROOT.aida2root - self.aidaTypes = [ - gbl.AIDA.IHistogram1D, - gbl.AIDA.IHistogram2D, - gbl.AIDA.IHistogram3D, - gbl.AIDA.IProfile1D, - gbl.AIDA.IProfile2D, - gbl.AIDA.IHistogram, - ] - - def __convertibleType(self, histo): - histoType = type(histo) - for t in self.aidaTypes: - if histoType == t: - return True - return False - - def save(self, *args): - """ - This function stores histograms on the file for future saving. - It takes an arbitrary number of AIDA or ROOT histograms or - a list of them. - """ - if args: - if type(args[0]) == list: - histoList = args[0] - else: - histoList = args - for h in histoList: - if self.__convertibleType(h): - h = self.aida2root(h) - h.Write() - - def close(self): - self.file.Write() - self.file.Close() - - -# ============================================================================= -if "__main__" == __name__: - import sys - - print(__doc__) - for o in __all__: - print(o) - print(sys.modules[__name__].__dict__[o].__doc__) - -# ============================================================================= -# The END -# ============================================================================= +sys.modules[__name__] = GaudiAlg.HistoUtils diff --git a/GaudiPython/python/GaudiPython/TupleUtils.py b/GaudiPython/python/GaudiPython/TupleUtils.py index 937f23de5a1bf00eaa42f86bcf3fb32a25db3bf1..7073b86e6ebc46d0e8a597a9ead16b3155baab0a 100644 --- a/GaudiPython/python/GaudiPython/TupleUtils.py +++ b/GaudiPython/python/GaudiPython/TupleUtils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 ##################################################################################### -# (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # +# (c) Copyright 2023 CERN for the benefit of the LHCb and ATLAS collaborations # # # # This software is distributed under the terms of the Apache version 2 licence, # # copied verbatim in the file "LICENSE". # @@ -9,224 +9,19 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ##################################################################################### -# ============================================================================= -# This module contains set of simple and useful utilities to booking and -# manipulation with N-Tuples (in the spirit of GaudiTuples<TYPE>) -# @author Vanya BELYAEV ibelyaev@physics.syr.edu -# @date 2007-08-04 -# ============================================================================= -""" -This module contains set of simple and useful utilities to booking and -manipulation with N-Tuples (in the spirit of GaudiTuples<TYPE>) +# deprecated module -""" -from __future__ import print_function +# TODO: enable deprecation warning +# import warnings +# warnings.warn( +# "GaudiPython: Use 'GaudiAlg.TupleUtils' module instead of deprecated 'GaudiPython.TupleUtils'", +# DeprecationWarning, +# stacklevel=3, +# ) +# del warnings -# ============================================================================= -__author__ = "Vanya BELYAEV ibelyaev@physics.syr.edu" -# ============================================================================= -__all__ = ( - "nTuple", # function to book/retrieve N-tuple - "getNTuple", # ditto - "getNtuple", # ditto - "getntuple", # ditto - "gettuple", # ditto - "activeTuples", # get the list of all active n-tuples - "releaseTuples", # release all actibe N-tuples -) -# ============================================================================= +import sys -import GaudiPython.GaudiAlgs -from GaudiPython.Bindings import AppMgr -from GaudiPython.Bindings import gbl as cpp +import GaudiAlg.TupleUtils -_Tool = cpp.ITupleTool -_Deco = cpp.GaudiPython.TupleToolDecorator - -# the list of aquired tools (to be released) -_TOOLS_ = [] - -# ============================================================================= -# Helper private auxillary utility to get Tool Service - - -def _getToolSvc(**kwargs): - """Helper private auxillary utility to get Tool Service""" - svc = kwargs.get("toolSvc", None) - if not svc: - svc = kwargs.get("toolsvc", None) - if not svc: - svc = kwargs.get("service", None) - if not svc: - svc = kwargs.get("svc", None) - else: - return svc # RETURN - gaudi = kwargs.get("gaudi", None) - if not gaudi: - gaudi = AppMgr() - return gaudi.toolsvc() # RETURN - - -# ============================================================================= -# Retrive N-Tuple ( book on demand ) -def _nTuple_(s, *args): - """Retrive N-tuple ( book on demand )""" - return _Deco.nTuple(s, *args) - - -# ============================================================================= -_nTuple_.__doc__ += "\n" + _Deco.nTuple.__doc__ -_Tool.nTuple = _nTuple_ -_Tool.ntuple = _nTuple_ - - -# ============================================================================= -# Retrieve (book-on-demand) 'Smart'-N-tuple object. -def nTuple(dirpath, ID, ID2=None, topdir=None, LUN="FILE1"): - """ - Retrieve 'Smart'-N-tuple object. - N-tuple is booked on-demand. - - Atetntion !! - The logical unit LUN must be configured by N-Tuple Service - - Retrieve (book-n-demand) N-Tuple using - the directory name and the title: - >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory - 'N-tuple title' , ## the title for N-Tuple - LUN = 'FILE1' ) ## logical file unit - - Retrieve (book-n-demand) N-Tuple using - the directory name, literal ID and the title: - >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory - 'Tuple1' , ## the literal ID for N-Tuple - 'N-tuple title' , ## the title for N-Tuple - LUN = 'FILE1' ) ## logical file unit - - Retrieve (book-n-demand) N-Tuple using - the directory name, numerical ID and the title: - >>> t = nTuple ( 'the/path/to/directory' , ## the path to the directory - 124 , ## the numerical ID for N-Tuple - 'N-tuple title' , ## the title for N-Tuple - LUN = 'FILE1' ) ## logical file unit - - - """ - toolSvc = _getToolSvc() - - # construct the name of the intermediate TupleTool - name = "Tuple" + LUN + "/" - if topdir: - name += topdir - name += dirpath - name += "_%s" % ID - if ID2: - name += "_%s" % ID2 - name = name.replace(".", "_") - name = name.replace("/", "_") - name = name.replace("\\", "_") - name = name.replace(" ", "_") - - # define tool properties - t0 = GaudiPython.iAlgTool("ToolSvc." + name) - t0.OutputLevel = 1 - t0.NTupleLUN = LUN - t0.NTupleDir = dirpath - t0.PropertiesPrint = False - t0.OutputLevel = 4 - if topdir: - t0.NTupleTopDir = topdir - - # get the tool from Tool service - tool = toolSvc.create("TupleTool", name, interface=_Tool) - - # check the properties and redefine them if needed - t1 = GaudiPython.iAlgTool(tool.name(), tool) - if t1.NTupleLUN != LUN: - t1.NTupleLUN = LUN - if t1.NTupleDir != dirpath: - t1.NTupleDir = dirpath - if topdir and (t1.NTupleTopDir != topdir): - t1.NTupleTopDir = topdir - - _TOOLS_.append(tool) - if not ID2: - return tool.nTuple(ID) # RETURN - - return tool.nTuple(ID, ID2) # RETURN - - -nTuple.__doc__ += "\n\t help(ITupleTool.nTuple) : \n" + _Tool.nTuple.__doc__ - -ntuple = nTuple -getNTuple = nTuple -getNtuple = nTuple -getntuple = nTuple -getTuple = nTuple -gettuple = nTuple - -# ============================================================================= -# Return the list of active tools - - -def activeTuples(): - """ - Return the list of active tools - """ - return _TOOLS_ - - -# ============================================================================= -# Release the active tool/tuples - - -def releaseTuples(): - """ - Release the active tool/tuples - The method needs to be invoked explicitely at the end of the job - """ - if not _TOOLS_: - return - from GaudiPython.Bindings import _gaudi - - if not _gaudi: - return - - toolSvc = _getToolSvc() - if toolSvc.isValid(): - while _TOOLS_: - t = _TOOLS_.pop() - if not t: - continue - while 1 < t.refCount(): - toolSvc._its.releaseTool(t) - - -# ============================================================================= - - -def _TupleUtils_AtExit_(): - """ - AtExit function for GaudiPython.TupleUtils module - """ - if activeTuples(): - print("WARNING: the list of local TupleTools is not empty!") - print("WARNING: please use GaudiPython.TupleUtils.releaseTuples() at the end") - - -import atexit - -atexit.register(_TupleUtils_AtExit_) - -# ============================================================================= -if "__main__" == __name__: - import sys - - print(__doc__, __all__) - for o in __all__: - print("\n\n\t", o, "\n") - print(sys.modules[__name__].__dict__[o].__doc__) - -# ============================================================================= -# The end -# ============================================================================= +sys.modules[__name__] = GaudiAlg.TupleUtils diff --git a/GaudiPython/python/TupleUtils.py b/GaudiPython/python/TupleUtils.py deleted file mode 100644 index c23f7d6fbdda00216451135674863d6b30827a9b..0000000000000000000000000000000000000000 --- a/GaudiPython/python/TupleUtils.py +++ /dev/null @@ -1,18 +0,0 @@ -##################################################################################### -# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # -# # -# This software is distributed under the terms of the Apache version 2 licence, # -# copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -##################################################################################### -""" TupleUtils python module - This module is deprecated use 'GaudiPython.TupleUtils' instead -""" -from GaudiPython.TupleUtils import * # noqa: F401 F403 - -from GaudiPython import deprecation - -deprecation("Use 'GaudiPython.TupleUtils' module instead of 'TupleUtils'") diff --git a/GaudiPython/python/gaudimodule.py b/GaudiPython/python/gaudimodule.py deleted file mode 100644 index b3d20026adee8818030a1198775ac8feb110fa7e..0000000000000000000000000000000000000000 --- a/GaudiPython/python/gaudimodule.py +++ /dev/null @@ -1,19 +0,0 @@ -##################################################################################### -# (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # -# # -# This software is distributed under the terms of the Apache version 2 licence, # -# copied verbatim in the file "LICENSE". # -# # -# In applying this licence, CERN does not waive the privileges and immunities # -# granted to it by virtue of its status as an Intergovernmental Organization # -# or submit itself to any jurisdiction. # -##################################################################################### -""" Gaudi Python module interface. - This module provides the basic bindings of the main Gaudi - components to Python. It is itself based on the ROOT cppyy - Python extension module. -""" -from GaudiPython import * # noqa: F401 F403 -from GaudiPython import deprecation - -deprecation("Use 'GaudiPython' module instead of deprecated 'gaudimodule'") diff --git a/GaudiUtils/CMakeLists.txt b/GaudiUtils/CMakeLists.txt index 13b368a69f4f75b5b7c4876b6bf201362e694395..fdac1319fe5a3334d42fdb71ec1acf175efa8682 100644 --- a/GaudiUtils/CMakeLists.txt +++ b/GaudiUtils/CMakeLists.txt @@ -87,5 +87,5 @@ if(BUILD_TESTING AND GAUDI_USE_CPPUNIT AND GAUDI_USE_XERCESC) add_test(NAME ${package_name}.testXMLFileCatalogRead COMMAND run $<TARGET_FILE:testXMLFileCatalogRead>) set_property(TEST ${package_name}.testXMLFileCatalogRead - PROPERTY DEPENDS testXMLFileCatalogWrite) + PROPERTY DEPENDS ${package_name}.testXMLFileCatalogWrite) endif() diff --git a/cmake/GaudiConfig.cmake.in b/cmake/GaudiConfig.cmake.in index 2bf9087823bf7ddf6ca4b64477caca0502352e34..a92e80b971796be1ffd08e7be73d562f09fd1dbf 100644 --- a/cmake/GaudiConfig.cmake.in +++ b/cmake/GaudiConfig.cmake.in @@ -7,7 +7,7 @@ Imported Targets The following targets will be imported: * Shared libraries - * ``Gaudi::GaudiAlgLib`` + * ``Gaudi::GaudiAlgLib`` (optional) * ``Gaudi::GaudiCommonSvcLib`` * ``Gaudi::GaudiExamplesLib`` * ``Gaudi::GaudiKernel`` @@ -17,6 +17,7 @@ The following targets will be imported: * ``Gaudi::GaudiUtilsLib`` * ``Gaudi::RootCnvLib`` * Header only libraries + * ``Gaudi::Functional`` * ``Gaudi::GaudiHiveHeaders`` * ``Gaudi::GaudiProfilingHeaders`` * Executable diff --git a/cmake/GaudiDependencies.cmake b/cmake/GaudiDependencies.cmake index 818e045a5244ac4e18dcb33acac6803a451f91a0..084fe04799f5ea21fc46f39ae9594742ac1f231a 100644 --- a/cmake/GaudiDependencies.cmake +++ b/cmake/GaudiDependencies.cmake @@ -141,6 +141,8 @@ endif() # Identify dependencies using pkgconfig (by the pkgconfig module to use) set(gperftools_pkgconfig_module "libprofiler>=2.7.0") +option(GAUDI_ENABLE_GAUDIALG "Build the subdirectory GaudiAlg" YES) + foreach(dep IN LISTS deps) string(TOUPPER ${dep} DEP) diff --git a/cmake/tests/testGaudiInstallation.cmake b/cmake/tests/testGaudiInstallation.cmake index 6df6a1a995fe3a35c1e3fb55af3dc25ee6807755..ddf6b530f9f94d5bed7dcb6cccc0f0b50db5b941 100644 --- a/cmake/tests/testGaudiInstallation.cmake +++ b/cmake/tests/testGaudiInstallation.cmake @@ -70,9 +70,9 @@ elseif(DEFINED TEST_GAUDI_INSTALL_FILES_EXIST) # check some files that should be message(FATAL_ERROR "Scripts not installed correctly," " IOTest.py not found in bin/") endif() - if(NOT EXISTS ${GAUDI_INSTALL_DIR}/bin/EvtColRead.py) + if(NOT EXISTS ${GAUDI_INSTALL_DIR}/bin/ExtendedProperties.py) message(FATAL_ERROR "Scripts not installed correctly," - " EvtColRead.py not found in bin/") + " ExtendedProperties.py not found in bin/") endif() if(NOT EXISTS ${GAUDI_INSTALL_DIR}/bin/quick-merge) message(FATAL_ERROR "Scripts not installed correctly," @@ -82,10 +82,6 @@ elseif(DEFINED TEST_GAUDI_INSTALL_FILES_EXIST) # check some files that should be message(FATAL_ERROR "Scripts not installed correctly," " merge_confdb2_parts not found in bin/") endif() - if(NOT EXISTS ${GAUDI_INSTALL_DIR}/bin/TupleEx3.py) # generated files - message(FATAL_ERROR "Scripts not installed correctly," - " TupleEx3.py not found in bin/") - endif() # Check public headers if(NOT EXISTS ${GAUDI_INSTALL_DIR}/include/Gaudi/Algorithm.h) message(FATAL_ERROR "Include directory not installed correctly," @@ -103,7 +99,7 @@ elseif(DEFINED TEST_GAUDI_INSTALL_FILES_EXIST) # check some files that should be message(FATAL_ERROR "Include directory not installed correctly," " Aida2ROOT.h not found in include/GaudiUtils/") endif() - if(NOT EXISTS ${GAUDI_INSTALL_DIR}/include/GaudiAlg/Fill.h) + if(WITH_GAUDIALG AND NOT EXISTS ${GAUDI_INSTALL_DIR}/include/GaudiAlg/Fill.h) message(FATAL_ERROR "Include directory not installed correctly," " Fill.h not found in include/GaudiAlg/") endif() @@ -115,7 +111,7 @@ elseif(DEFINED TEST_GAUDI_INSTALL_FILES_EXIST) # check some files that should be message(FATAL_ERROR "Include directory not installed correctly," " TESSerializer.h not found in include/GaudiMP/") endif() - if(NOT EXISTS ${GAUDI_INSTALL_DIR}/include/GaudiPython/AlgDecorators.h) + if(WITH_GAUDIALG AND NOT EXISTS ${GAUDI_INSTALL_DIR}/include/GaudiPython/AlgDecorators.h) message(FATAL_ERROR "Include directory not installed correctly," " AlgDecorators.h not found in include/GaudiPython/") endif() @@ -182,9 +178,9 @@ elseif(DEFINED TEST_GAUDI_INSTALL_FILES_EXIST) # check some files that should be message(FATAL_ERROR "Python modules not installed correctly," " GenerateGaudiOpts.py not found in python/GaudiProfiling/") endif() - if(NOT EXISTS ${GAUDI_INSTALL_DIR}/python/GaudiPython/HistoUtils.py) + if(WITH_GAUDIALG AND NOT EXISTS ${GAUDI_INSTALL_DIR}/python/GaudiAlg/HistoUtils.py) message(FATAL_ERROR "Python modules not installed correctly," - " HistoUtils.py not found in python/GaudiPython/") + " HistoUtils.py not found in python/GaudiAlg/") endif() if(NOT EXISTS ${GAUDI_INSTALL_DIR}/python/GaudiSvc/ExtraModules.py) message(FATAL_ERROR "Python modules not installed correctly," @@ -270,6 +266,7 @@ else() add_test(NAME cmake.test_gaudi_install_check COMMAND ${CMAKE_COMMAND} -D TEST_GAUDI_INSTALL_FILES_EXIST:BOOL=TRUE -D GAUDI_INSTALL_DIR=${tmpInstallDest} + -D WITH_GAUDIALG=${GAUDI_ENABLE_GAUDIALG} -P ${CMAKE_CURRENT_LIST_FILE}) set_tests_properties(cmake.test_gaudi_install_check PROPERTIES DEPENDS cmake.test_gaudi_install