diff --git a/DaVinciSys/CMakeLists.txt b/DaVinciSys/CMakeLists.txt index 901895bbb2b289ebdf1bba22bf66e724fe3b08ac..4939136fd6bfb8ccea59bafedea6c0ef574a648d 100644 --- a/DaVinciSys/CMakeLists.txt +++ b/DaVinciSys/CMakeLists.txt @@ -10,6 +10,8 @@ gaudi_depends_on_subdirs(DaVinciTests ############################## Phys/DaVinci Phys/KaliCalo - Phys/Tesla) + Phys/Tesla + Phys/TurboCache + ) gaudi_add_test(QMTest QMTEST) diff --git a/DaVinciSys/cmt/requirements b/DaVinciSys/cmt/requirements index c4fc60e7bd3224fbbc896e3a47820d348bb6eb4e..d35d8dcc77cb1b579eb9965391a41960b4242955 100755 --- a/DaVinciSys/cmt/requirements +++ b/DaVinciSys/cmt/requirements @@ -8,6 +8,7 @@ branches doc cmt # To be decided if longer term this stays in the DaVinci # project, or moves elsewhere. use StrippingCache * Phys +use TurboCache * Phys ############################## # Packages diff --git a/Phys/TurboCache/CMakeLists.txt b/Phys/TurboCache/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..46d47996a75e481e70fcf1a0eb538512d2c32e82 --- /dev/null +++ b/Phys/TurboCache/CMakeLists.txt @@ -0,0 +1,74 @@ +################################################################################ +# Package: TurboCache +################################################################################ +gaudi_subdir(TurboCache v1r0) + +gaudi_depends_on_subdirs(Phys/Tesla + Phys/LoKiHlt + Phys/LoKiArrayFunctors + Phys/LoKiHlt + Phys/LoKiPhys + Phys/LoKiAlgo + Phys/LoKiCore) + +# Do not build for the -O0 platform, as this seems to have problems. +# To be investigated... +if ( NOT "$ENV{CMTCONFIG}" STREQUAL "x86_64-slc6-gcc48-do0" ) + + foreach(pack Tesla ) + # FIXME: this will be needed until GAUDI-1055 is fixed. + if(EXISTS ${CMAKE_BINARY_DIR}/Phys/${pack}/genConf/${pack}) + gaudi_build_env(PREPEND PYTHONPATH ${CMAKE_BINARY_DIR}/Phys/${pack}/genConf/${pack}) + endif() + # if(TARGET ${pack}Conf) + # set(deps ${conf_deps} ${pack}Conf ) + # endif() + # if(TARGET ${pack}ComponentsList) + # set(deps ${conf_deps} ${pack}ComponentsList ) + # endif() + endforeach() + + # Import the cache creation module + + include(LoKiFunctorsCache) + + # Set dependency so caches build last, after Tesla itself. + set ( conf_deps ${deps} TeslaConfUserDB ) + + # Build the caches, most recent first + foreach(production Turbo03) + if (production STREQUAL Turbo03) + # Cannot set with $APPCONFIGROOT apparently + #set ( optsfile1 $ENV{APPCONFIGROOT}/options/Turbo/Tesla_Data_2016_forStreams_v2.py ) + set ( optsfile1 ${CMAKE_CURRENT_SOURCE_DIR}/options/Tesla_Data_2016_forStreams_v2.py ) + endif() + foreach(version v4r1) + # Stripping cache name + set ( sname S${production}_${version}FunctorCache ) + + #set ( optsfile1 $ENV{APPCONFIGROOT}/options/Turbo/Streams_${version}.py ) + set ( optsfile2 ${CMAKE_CURRENT_SOURCE_DIR}/options/Streams_${version}.py ) + # cache build if options exist + if ( EXISTS ${optsfile1} ) + + # Print this cache + MESSAGE( STATUS "S" ${production} ${version} " : " ${optsfile1} " " ${optsfile2} ) + + # Build ! + loki_functors_cache(${sname} + options/SuppressLogMessages.py + ${optsfile1} + ${optsfile2} + options/SilenceErrors.py + options/NoEvents.py + options/DisableLoKiCacheFunctors.py + LINK_LIBRARIES LoKiHltLib + DEPENDS ${conf_deps} + SPLIT 10 + FACTORIES HltFactory Hlt2HltFactory) + + endif() + + endforeach() + endforeach() +endif() diff --git a/Phys/TurboCache/cmt/requirements b/Phys/TurboCache/cmt/requirements new file mode 100644 index 0000000000000000000000000000000000000000..dc2ff29a42442f645f2fd421cee520519b279b26 --- /dev/null +++ b/Phys/TurboCache/cmt/requirements @@ -0,0 +1,13 @@ +# ============================================================================= +# Created : 2016-09-14 +# Maintainer : +# ============================================================================= +package TurboCache +version v1r0 + +# The build of this package is not enabled with CMT + +# ============================================================================= +# The END +# ============================================================================= + diff --git a/Phys/TurboCache/doc/release.notes b/Phys/TurboCache/doc/release.notes new file mode 100644 index 0000000000000000000000000000000000000000..7018dfe28c4a03338da01e56e13f71451b5248df --- /dev/null +++ b/Phys/TurboCache/doc/release.notes @@ -0,0 +1,14 @@ +! ----------------------------------------------------------------------------- +! Package : TurboCache +! Responsible : +! Purpose : Keep C++ functors for turbo +! Created : 2016-09-17 +! ----------------------------------------------------------------------------- + +2016-09-17 - Sascha Stahl +- Initial commit of TurboCache, creates the cache for the first streaming + production of 2016. + +! ----------------------------------------------------------------------------- +! The END +! ----------------------------------------------------------------------------- diff --git a/Phys/TurboCache/options/DisableLoKiCacheFunctors.py b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py new file mode 100644 index 0000000000000000000000000000000000000000..e168c86cc06439840a83f62c0dee94a276584d0a --- /dev/null +++ b/Phys/TurboCache/options/DisableLoKiCacheFunctors.py @@ -0,0 +1,3 @@ + +from Configurables import ApplicationMgr +ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1' diff --git a/Phys/TurboCache/options/NoEvents.py b/Phys/TurboCache/options/NoEvents.py new file mode 100644 index 0000000000000000000000000000000000000000..147e369efcd2b3534167b6b0440b568ceb6984bf --- /dev/null +++ b/Phys/TurboCache/options/NoEvents.py @@ -0,0 +1,2 @@ +from Tesla.Configuration import Tesla +Tesla().EvtMax = 0 diff --git a/Phys/TurboCache/options/SilenceErrors.py b/Phys/TurboCache/options/SilenceErrors.py new file mode 100644 index 0000000000000000000000000000000000000000..3aef38f82d32db66684610167b7c5abe0d6fe00f --- /dev/null +++ b/Phys/TurboCache/options/SilenceErrors.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +from Gaudi.Configuration import MessageSvc, FATAL +MessageSvc(OutputLevel=FATAL) diff --git a/Phys/TurboCache/options/Streams_v4r1.py b/Phys/TurboCache/options/Streams_v4r1.py new file mode 100644 index 0000000000000000000000000000000000000000..6594f48d50b7828f79713b816a17a43d64e6cd14 --- /dev/null +++ b/Phys/TurboCache/options/Streams_v4r1.py @@ -0,0 +1,8 @@ +from TurboStreamProd.streams import turbo_streams +from Tesla.Configuration import Tesla +Tesla().Streams = turbo_streams + +#Tesla().ValidateStreams = True +# Turn on Sascha's algorithm ignoring TurboCalib +Tesla().EnableLineChecker = True +Tesla().IgnoredLines = [".*TurboCalib"] diff --git a/Phys/TurboCache/options/SuppressLogMessages.py b/Phys/TurboCache/options/SuppressLogMessages.py new file mode 100644 index 0000000000000000000000000000000000000000..9b04125c71da7f76044bb92f6d805433a32ba282 --- /dev/null +++ b/Phys/TurboCache/options/SuppressLogMessages.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +from Gaudi.Configuration import log +import logging +import re + +IGNORED_MESSAGES = map(re.compile, + ( + # errors + r'The default_config of .* (is not a dictionary|has incorrect keys)', + r'The key .* is not allowed', + r'Allowed keys are:', + # warnings + r'Line .* is declared but not appended to any stream', + r'uses plain Gaudi configurable', + r'has non-default configuration', + r' .*\(default =', + r'The usage of unique HLT is deprecated', + r'Requests Flavor Tagging but is not assigned', + r'has prescale <= 0', + r'share the same output location', + r'how to add new bank', + r'Using default tag.*for partition', + r'The lines going to MDST.DST are', + r'No explicit tuning for DataType', + r'something else configured a decoder already', + r'REMOVE UT decoding from DataOnDemand', + r'Applied corrections configured via options for', + r'requesting factory via old name' + )) + +_orig_log_filter = log.filter +def old_stripping_filter(record): + ''' + Hide known warnings and errors in old Stripping configurations. + ''' + if record.levelno >= logging.WARNING: + if any(exp.search(record.msg) for exp in IGNORED_MESSAGES): + return False + if not record.msg.strip(): + return False # why should anyone want to print an empty warning? + return _orig_log_filter(record) + +log.filter = old_stripping_filter diff --git a/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py new file mode 100755 index 0000000000000000000000000000000000000000..42b238e74ce73166be193d143aee461edd3f3816 --- /dev/null +++ b/Phys/TurboCache/options/Tesla_Data_2016_forStreams_v2.py @@ -0,0 +1,18 @@ +from Tesla.Configuration import Tesla +Tesla().Pack = True +Tesla().InputType = "RAW" +Tesla().DataType = '2016' +Tesla().Simulation = False +Tesla().Mode = 'Online' +Tesla().RawFormatVersion = 0.2 +Tesla().VertRepLoc = 'Hlt2' +Tesla().Park=True +Tesla().KillInputHlt2Reps=True + +Tesla().outputSuffix = ".mdst" +#Tesla().outputPrefix = "TURBO_" + +### Already juggled online +Tesla().VetoJuggle = True + +Tesla().HDRFilter=True