From a556bbce5dd27b7c7252bfad246885af514ba54c Mon Sep 17 00:00:00 2001 From: Walter Lampl Date: Thu, 9 Jun 2022 13:21:29 +0200 Subject: [PATCH 1/2] EventIDRage c'tor: Don't reset UNDEF values to 0 --- GaudiKernel/src/Lib/EventIDRange.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/GaudiKernel/src/Lib/EventIDRange.cpp b/GaudiKernel/src/Lib/EventIDRange.cpp index b9a6cf2f3..e2b4ef8b2 100644 --- a/GaudiKernel/src/Lib/EventIDRange.cpp +++ b/GaudiKernel/src/Lib/EventIDRange.cpp @@ -26,20 +26,7 @@ EventIDRange::EventIDRange() , m_stop( EventIDBase::UNDEFNUM, EventIDBase::UNDEFEVT, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM, EventIDBase::UNDEFNUM, 0 ) {} -EventIDRange::EventIDRange( const EventIDBase& start, const EventIDBase& stop ) : m_start( start ), m_stop( stop ) { - - // For pure time-stamp range, re-adjust start so that it covers O-INF in terms of run-lumi - if ( m_start.m_run_number == EventIDBase::UNDEFNUM ) { - m_start.m_run_number = 0; - m_start.m_event_number = 0; - m_start.m_lumi_block = 0; - } - // For pure run/lumi range, re-adjust start so that it covers 0-inf in terms of time-stamp - else if ( m_start.m_time_stamp == EventIDBase::UNDEFNUM ) { - m_start.m_time_stamp = 0; - m_start.m_time_stamp_ns_offset = 0; - } -} +EventIDRange::EventIDRange( const EventIDBase& start, const EventIDBase& stop ) : m_start( start ), m_stop( stop ) {} EventIDRange& EventIDRange::operator=( const EventIDRange& r ) { if ( this != &r ) { -- GitLab From 1d75ee0834f241adacc13085b666bc6b26ff4abc Mon Sep 17 00:00:00 2001 From: Gitlab CI Date: Thu, 9 Jun 2022 11:22:45 +0000 Subject: [PATCH 2/2] pre-commit fixes patch generated by https://gitlab.cern.ch/wlampl/Gaudi/-/jobs/22405232 --- GaudiConfiguration/python/GaudiConfig2/semantics.py | 2 +- GaudiConfiguration/tests/nose/test_semantics.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GaudiConfiguration/python/GaudiConfig2/semantics.py b/GaudiConfiguration/python/GaudiConfig2/semantics.py index 3160d3c6e..5781fb25f 100644 --- a/GaudiConfiguration/python/GaudiConfig2/semantics.py +++ b/GaudiConfiguration/python/GaudiConfig2/semantics.py @@ -25,7 +25,7 @@ if sys.version_info >= (3,): # pragma no cover basestring = str _log = logging.getLogger(__name__) -is_64bits = sys.maxsize > 2 ** 32 +is_64bits = sys.maxsize > 2**32 class PropertySemantics(object): diff --git a/GaudiConfiguration/tests/nose/test_semantics.py b/GaudiConfiguration/tests/nose/test_semantics.py index 2bed1073c..49606a5a4 100644 --- a/GaudiConfiguration/tests/nose/test_semantics.py +++ b/GaudiConfiguration/tests/nose/test_semantics.py @@ -97,7 +97,7 @@ def test_int_ok(): @raises(ValueError) def test_int_bad(): - getSemanticsFor("int").store(2 ** 32) + getSemanticsFor("int").store(2**32) @raises(ValueError) -- GitLab