From 0fe4136bf0f3dce29ae132b8d82e5520cb3e3483 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Thu, 1 Nov 2018 13:45:29 +0100
Subject: [PATCH] Update packages:HLToks JiveXMLServer HLTUtils TrigTransform
 TrigCommon TrigExMTHelloWorldLvl1 TrigExPartialEB TrigExL2muCalibTest
 TrigExMTHelloWorld TrigServices TrigPython TrigKernel TrigPSC HLTRates2COOL
 TrigOnlineMonitor TrigConf2COOLOnline HLTTestApps ByteStreamEmonSvc
 TrigByteStreamCnvSvc  from upstream/21.1 to upstream/master via pseudo-merge

---
 HLT/HLTTestApps/src/Event.cxx                 |  10 +-
 HLT/HLTUtils/python/hltOksUtils.py            |  23 +++-
 HLT/HLTUtils/share/asetup_wrapper             | 111 +++++++++---------
 HLT/HLTUtils/share/make_hlt_rep.py            | 106 +++++++++++------
 .../TrigConf2COOLOnline/CMakeLists.txt        |  45 +------
 .../TrigConf2COOLOnline/OnlTrigC2CWriter.h    |   2 +-
 .../schema/is_trigconf_hlt.schema.xml         | 100 ----------------
 .../schema/is_trigconf_l1.schema.xml          | 100 ----------------
 .../src/OnlTrigC2CWriter.cxx                  |  10 +-
 .../TrigTransform/python/dbgAnalysis.py       |   8 +-
 .../TrigTransform/python/dbgEventInfo.py      |   1 -
 .../TrigTransform/python/trigRecoExe.py       |   2 +-
 12 files changed, 172 insertions(+), 346 deletions(-)
 delete mode 100644 HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_hlt.schema.xml
 delete mode 100644 HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_l1.schema.xml

diff --git a/HLT/HLTTestApps/src/Event.cxx b/HLT/HLTTestApps/src/Event.cxx
index 74d36b66073..d717abfe63c 100644
--- a/HLT/HLTTestApps/src/Event.cxx
+++ b/HLT/HLTTestApps/src/Event.cxx
@@ -304,7 +304,15 @@ HLTTestApps::Event::Event(const eformat::read::FullEventFragment& event)
                               "ignore the current ROB fragment.");
             msg % robid % m_lvl1_id;
             ers::warning(HLTTESTAPPS_UNCLASSIFIED(msg.str()));
-          }
+          } 
+	  else if ((!sm_rob2ros.empty()) && (sm_rob2ros.find(robid)==sm_rob2ros.end())) 
+          {
+            boost::format msg("Found ROB id (0x%08x) while "
+                              "configuring event with LVL1 id=%lu, which is not in the provided ROS to ROB mapping. "
+                              "This ROB fragment will be ignored.");
+            msg % robid % m_lvl1_id;
+            ers::warning(HLTTESTAPPS_UNCLASSIFIED(msg.str()));
+	  }
           else
           {
             m_map.insert(std::make_pair(robid, ROB{robid, pair.second, eformat::read::ROBFragment(pair.second).fragment_size_word()}));
diff --git a/HLT/HLTUtils/python/hltOksUtils.py b/HLT/HLTUtils/python/hltOksUtils.py
index cc1152c365e..9f74b79390e 100644
--- a/HLT/HLTUtils/python/hltOksUtils.py
+++ b/HLT/HLTUtils/python/hltOksUtils.py
@@ -1,15 +1,30 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 """
 Utilities for HLT OKS file generation
 """
 
+import os
+
 def defaultTags():
    """Return list of supported CMTCONFIG tags"""
    
    import pm.common
-   tags = [pm.common.tdaqRepository.getObject('Tag', 'x86_64-slc6-gcc62-opt'),
-           pm.common.tdaqRepository.getObject('Tag', 'x86_64-slc6-gcc62-dbg')]
-   
+
+   tag = platform()
+   opt_tag = '-'.join(tag.split('-')[:-1])+'-opt'
+   dbg_tag = '-'.join(tag.split('-')[:-1])+'-dbg'
+   tags = [pm.common.tdaqRepository.getObject('Tag', opt_tag),
+           pm.common.tdaqRepository.getObject('Tag', dbg_tag)]
+
    return tags
 
+def platform():
+   """Return current CMTCONFIG tag"""
+
+   project = os.environ.get('AtlasProject','')
+   tag = os.environ.get('%s_PLATFORM' % project, os.environ.get('CMTCONFIG',None))
+
+   return tag
+
+
diff --git a/HLT/HLTUtils/share/asetup_wrapper b/HLT/HLTUtils/share/asetup_wrapper
index a3af5204c0f..e0e78e8c8d4 100755
--- a/HLT/HLTUtils/share/asetup_wrapper
+++ b/HLT/HLTUtils/share/asetup_wrapper
@@ -4,12 +4,20 @@
 #
 
 if [ $# -lt 1 -o "$1" == "-h" ]; then
-    echo 'Syntax: asetup_wrapper CMD [ARGS]'
-    echo 'Required environment: '
-    echo '   AtlasSetup     : location of AtlasSetup installation'
-    echo '   ASETUP_ARGS    : arguments passed to asetup'
-    echo 'Optional environment: '
-    echo '   ASETUP_PRELOAD : Value to set for LD_PRELOAD after asetup has been run'
+cat <<EOF
+Syntax: asetup_wrapper CMD [ARGS]
+
+Will run 'asetup \$ASETUP_ARGS' before executing CMD with optional ARGS.
+- CORAL_AUTH_PATH, CORAL_DBLOOKUP_PATH are protected from modification
+
+Required environment: 
+   AtlasSetup     : location of AtlasSetup installation
+   ASETUP_ARGS    : arguments passed to asetup
+Optional environment: 
+   ASETUP_PRELOAD       : Value to set for LD_PRELOAD after asetup has been run
+   ASETUP_EXTRA_SW_PATH : Extra build area to prepend (i.e. the InstallArea directory)
+   ASETUP_VERBOSE       : Print environment before/after asetup
+EOF
     exit 1
 fi
 
@@ -17,28 +25,11 @@ cmd=$1
 shift
 args="$*"
 
+LOG='+++ asetup_wrapper:'
+
 # Not provided by default in partition
 export PATH=${PATH}:/bin:/usr/bin
 
-if [ ! -z "${HLT_VERBOSE}" ]; then
-    echo "================================================================================"
-    echo "Environment delivered to asetup_wrapper script:"
-    printenv | sort
-    echo "================================================================================"
-fi
-
-set_coredump()
-{
-    # Set core dump limits if required and allowed
-    if [ ! -z "${HLT_COREDUMPSIZE}" ]
-	then
-	echo "Setting core dump limits to: ${HLT_COREDUMPSIZE}"
-	ulimit -c ${HLT_COREDUMPSIZE}
-	ulimit -a
-    fi
-}
-
-
 reverse_paths()
 {
     result=""
@@ -51,47 +42,54 @@ reverse_paths()
 
 update_paths()
 {
-    if [ ! -z "${HLT_EXTRA_SW_PATH}" ]
+    if [ ! -z "${ASETUP_EXTRA_SW_PATH}" ]
 	then
-	for dir in `reverse_paths ${HLT_EXTRA_SW_PATH}`
+	for dir in `reverse_paths ${ASETUP_EXTRA_SW_PATH}`
 	  do
 	  if [ -d ${dir} ]
 	      then 
-	      export PATH=${dir}/InstallArea/share/bin:${dir}/InstallArea/${CMTCONFIG}/bin:${PATH}
-	      export LD_LIBRARY_PATH=${dir}/InstallArea/${CMTCONFIG}/lib:${LD_LIBRARY_PATH}
-	      export PYTHONPATH=${dir}/InstallArea/python:${PYTHONPATH}
-	      export JOBOPTSEARCHPATH=${dir}/InstallArea/jobOptions:${JOBOPTSEARCHPATH}
-	      export DATAPATH=${dir}/InstallArea/share:${DATAPATH}
-          export CALIBPATH=${dir}/InstallArea/share:${CALIBPATH}
-	      export XMLPATH=${dir}/InstallArea/XML:${XMLPATH}
+	      export PATH=${dir}/${CMTCONFIG}/share/bin:${dir}/${CMTCONFIG}/bin:${PATH}
+	      export LD_LIBRARY_PATH=${dir}/${CMTCONFIG}/lib:${LD_LIBRARY_PATH}
+	      export PYTHONPATH=${dir}/${CMTCONFIG}/python:${PYTHONPATH}
+	      export JOBOPTSEARCHPATH=${dir}/${CMTCONFIG}/jobOptions:${JOBOPTSEARCHPATH}
+	      export DATAPATH=${dir}/${CMTCONFIG}/share:${DATAPATH}
+              export CALIBPATH=${dir}/${CMTCONFIG}/share:${CALIBPATH}
+	      export XMLPATH=${dir}/${CMTCONFIG}/XML:${XMLPATH}
 	  else
-	      echo "WARNING: directory ${dir} does not exist !"
+	      echo "$LOG WARNING: directory ${dir} does not exist !"
 	  fi
-	done 
-	echo "PATH=`echo ${PATH} | tr ':' '\n'`"
-	echo "LD_LIBRARY_PATH=`echo ${LD_LIBRARY_PATH} | tr ':' '\n'`"
-	echo "PYTHONPATH=`echo ${PYTHONPATH} | tr ':' '\n'`"
-	echo "JOBOPTSEARCHPATH=`echo ${JOBOPTSEARCHPATH} | tr ':' '\n'`"
-	echo "DATAPATH=`echo ${DATAPATH} | tr ':' '\n'`"
-	echo "CALIBPATH=`echo ${CALIBPATH} | tr ':' '\n'`"
-	echo "XMLPATH=`echo ${XMLPATH} | tr ':' '\n'`"
+          echo "$LOG Using ASETUP_EXTRA_SW_PATH=$ASETUP_EXTRA_SW_PATH:"
+          printenv | egrep ^PATH\|^LD_LIBRARY_PATH\|^PYTHONPATH\|^JOBOPTSEARCHPATH\|^DATAPATH\|^CALIBPATH\|^XMLPATH
+	done        
     fi
 }
 
-update_paths
-set_coredump
+if [ ! -z "${ASETUP_VERBOSE}" ]; then
+    echo "================================================================================"
+    echo "$LOG Environment delivered to asetup_wrapper script:"
+    printenv | sort
+    echo "================================================================================"
+fi
+
+# Protect a few environment variables if they are set
+protect_env=`printenv | egrep ^CORAL_AUTH_PATH\|^CORAL_DBLOOKUP_PATH`
+
+if [ ! -z "${protect_env}" ]; then
+    echo "$LOG Will RESTORE the following variables after running asetup:"
+    echo "$protect_env"
+fi
 
 if [ ! -e ${AtlasSetup}/scripts/asetup.sh ]; then
-    echo 'Cannot find asetup. Make sure $AtlasSetup is set correctly.'
+    echo '$LOG Cannot find asetup. Make sure $AtlasSetup is set correctly.'
     exit 1
 fi
 
 if [ -z "${ASETUP_ARGS}" ]; then
-    echo 'No asetup tags given. Please set $ASETUP_ARGS.'
+    echo '$LOG No asetup tags given. Please set $ASETUP_ARGS.'
     exit 1
 fi
 
-echo "asetup environment with tags: ${ASETUP_ARGS}"
+echo "$LOG Executing asetup ${ASETUP_ARGS}"
 source ${AtlasSetup}/scripts/asetup.sh --input=None ${ASETUP_ARGS}
 
 if [ $? -ne 0 ]; then
@@ -100,16 +98,23 @@ fi
     
 if [ ! -z "${ASETUP_PRELOAD}" ]; then    
     export LD_PRELOAD=${ASETUP_PRELOAD}
-    echo "Setting LD_PRELOAD=${LD_PRELOAD}"
+    echo "$LOG Setting LD_PRELOAD=${LD_PRELOAD}"
 fi
 
-if [ ! -z "${HLT_VERBOSE}" ]; then    
+# Restore protected variables
+set -o allexport
+eval $protect_env
+set +o allexport
+
+# Now add any extra directory if specified
+update_paths
+
+if [ ! -z "${ASETUP_VERBOSE}" ]; then    
     echo "================================================================================"
-    echo "Environment before calling 'exec $cmd $args'"
+    echo "$LOG Environment before calling 'exec $cmd $args'"
     printenv | sort
     echo "================================================================================"
 fi
 
-echo "exec $cmd $args"
+echo "$LOG exec $cmd $args"
 exec $cmd $args
-
diff --git a/HLT/HLTUtils/share/make_hlt_rep.py b/HLT/HLTUtils/share/make_hlt_rep.py
index 0faa0b1821d..f1e35840f91 100755
--- a/HLT/HLTUtils/share/make_hlt_rep.py
+++ b/HLT/HLTUtils/share/make_hlt_rep.py
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
+# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 
 import optparse
+import os
 
 import pm.project
 import pm.common
@@ -14,7 +16,7 @@ modifier = ''
 parser = optparse.OptionParser(description="Create HLT S/W respository")
 
 parser.add_option("-p", "--prefix", action="store",
-                  help="Prefix used in make_hlt_env (default: 'HLT')")
+                  help="Prefix used for all objects (default: 'HLT')")
 
 parser.add_option("-m", "--modifier", action="store",
                   help="Modifier for objects in S/W repository (default: '')")
@@ -29,45 +31,85 @@ if opt.modifier is not None and len(opt.modifier)>0:
 
 rep = pm.project.Project('daq/sw/repository.data.xml')
 onlineRep  = rep.getObject('SW_Repository', 'Online')
-hlt_env = pm.project.Project('daq/segments/%s-Environment.data.xml' % prefix)
+common_env = pm.project.Project('daq/segments/common-environment.data.xml')
 
-apps = [
-    dal.Script('asetup_wrapper%s' % modifier,
-               BinaryName='asetup_wrapper',
-               Description='Provide asetup environment to any command'
-               )    
-    ]
+atlas_project = os.environ.get('AtlasProject')
+
+if 'AtlasBuildStamp' in os.environ:
+    # nightly
+    atlas_version='%s,r%s' % (os.environ.get('AtlasBuildBranch'),
+                              os.environ.get('AtlasBuildStamp'))
+else:    
+    # numbered releases
+    atlas_version = os.environ.get('AtlasVersion')
+
+platform = hltOksUtils.platform()
 
-vars = [
-    dal.SW_PackageVariable('XMLPATH%s' % modifier,
+swvars = [
+    dal.SW_PackageVariable('XMLPATH',
                            Name='XMLPATH',
-                           Suffix="XML"),
-    dal.SW_PackageVariable('DATAPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"XML")),
+    dal.SW_PackageVariable('DATAPATH',
                            Name='DATAPATH',
-                           Suffix="share"),
-    dal.SW_PackageVariable('CALIBPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"share")),
+    dal.SW_PackageVariable('CALIBPATH',
                            Name='CALIBPATH',
-                           Suffix="share"),                           
-    dal.SW_PackageVariable('JOBOPTSEARCHPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"share")),                           
+    dal.SW_PackageVariable('JOBOPTSEARCHPATH',
                            Name='JOBOPTSEARCHPATH',
-                           Suffix="jobOptions"),
-    dal.SW_PackageVariable('PYTHONPATH%s' % modifier,
+                           Suffix=os.path.join(platform,"jobOptions")),
+    dal.SW_PackageVariable('PYTHONPATH',
                            Name='PYTHONPATH',
-                           Suffix="python")
+                           Suffix=os.path.join(platform,"python"))
+]
+
+puvars = [
+    dal.Variable('%s_ASETUP_ARGS' % prefix,
+                 Name='ASETUP_ARGS',
+                 Value=('%s,%s' % (atlas_project, '${%s_VERSION}' % prefix)),
+                 Description='asetup arguments'),
+
+    dal.Variable('%s_PRELOAD' % prefix,
+                 Name='ASETUP_PRELOAD',
+                 Value='libtcmalloc_minimal.so:libimf.so:libintlc.so.5',
+                 Description='Preload libraries'),
+
+    dal.Variable('%s_VERBOSE' % prefix,
+                 Name='ASETUP_VERBOSE',
+                 Value='0',
+                 Description='Verbosity for asetup_wrapper'),
+
+    dal.Variable('%s_EXTRA_SW_PATH' % prefix,
+                 Name='ASETUP_EXTRA_SW_PATH',
+                 Value='',
+                 Description='Patch area (e.g. /my/path/InstallArea)'),
+    
+    common_env.getObject('Variable','AtlasSetup')
+]
+
+pars = dal.VariableSet('%s-Parameters' % prefix,
+                       Description='Parameters to expand for executables',
+                       Contains = [ dal.Variable('%s_VERSION' % prefix,
+                                                 Name='%s_VERSION' % prefix,
+                                                 Value=atlas_version,
+                                                 Description='%s release version' % prefix) ])
+
+apps = [
+    dal.Binary('HLTMPPU_asetup',
+               BinaryName='asetup_wrapper',
+               Description='HLTMPPU_main with asetup environment',
+               DefaultParameters='HLTMPPU_main',
+               ProcessEnvironment=puvars)  
 ]
 
 
-try:
-    rel = hlt_env.getObject('Variable','%s-AtlasArea' % prefix).Value.split('/')[-1]
-except:
-    print ('Could not determine release number from AtlasArea')
-  
 hltRep = dal.SW_Repository('%s-Repository' % prefix,
-                           Name='HLT-Repository',
-                           InstallationPath="${ATLAS_BASE}/AtlasHLT/%s/InstallArea" % rel,
+                           Name=('%s-Repository' % prefix),
+                           InstallationPath="%s/InstallArea" % os.environ.get('AtlasArea'),
                            SW_Objects=apps,
-                           Tags=hltOksUtils.defaultTags(),
-                           ISInfoDescriptionFiles=['share/data/daq/schema/is_trigconf_hlt.schema.xml']
+                           Tags=[pm.common.tdaqRepository.getObject('Tag',hltOksUtils.platform())],
+                           ISInfoDescriptionFiles=[os.path.join(platform,'share/data/daq/schema/is_trigconf_hlt.schema.xml')],
+                           AddProcessEnvironment = swvars
                            )
 
 for app in apps:
@@ -75,10 +117,8 @@ for app in apps:
 
 proj = pm.project.Project('%s_SW_Repository.data.xml' % prefix,
                           ['daq/schema/core.schema.xml',
-                           'daq/sw/repository.data.xml',
-                           'daq/segments/%s-Environment.data.xml' % prefix
-                           ])
+                           'daq/sw/repository.data.xml'])
     
 proj.addObjects([hltRep])
-proj.addObjects(vars)
-    
+proj.addObjects([pars])
+
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/CMakeLists.txt b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/CMakeLists.txt
index 16a6a5bc40f..d359f2b9deb 100644
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/CMakeLists.txt
+++ b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/CMakeLists.txt
@@ -1,4 +1,3 @@
-# $Id: CMakeLists.txt 773563 2016-09-16 11:02:38Z smh $
 ################################################################################
 # Package: TrigConf2COOLOnline
 ################################################################################
@@ -17,49 +16,13 @@ atlas_depends_on_subdirs(
 find_package( Boost COMPONENTS program_options )
 find_package( COOL COMPONENTS CoolKernel CoolApplication )
 find_package( tdaq COMPONENTS daq-core-dal daq-hlt-dal 
-              rc_CmdLine rc_ItemCtrl rc_OnlSvc rc_RCCommands omniORB4 omnithread owl is ipc config)
+              rc_CmdLine rc_ItemCtrl rc_OnlSvc rc_RCCommands omniORB4 omnithread owl is ipc config TTCInfo)
 find_package( tdaq-common COMPONENTS ers )
 find_package( TBB )
 
-# Names of the auto-generated headers:
-set( _autogenHeaders
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline/TrigConfSmKeyNamed.h
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline/TrigConfL1PsKeyNamed.h
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline/TrigConfL1BgKeyNamed.h
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline/TrigConfHltPsKeyNamed.h
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline/TrigConfReleaseNamed.h )
-
-# The hardcoded location of the Java executable:
-set( _javaHome
-   /afs/cern.ch/atlas/project/tdaq/inst/sw/lcg/external/Java/JDK/1.8.0/amd64 )
-
-# Construct a functional CLASSPATH from the .jar files in tdaq:
-file( GLOB _jarFiles "${TDAQ_ROOT}/installed/share/lib/*.jar" )
-set( _classpath "." )
-foreach( _jar ${_jarFiles} )
-   set( _classpath "${_classpath}:${_jar}" )
-endforeach()
-unset( _jarFiles )
-
-# Set up a rule generating some header files:
-add_custom_command( OUTPUT ${_autogenHeaders}
-   COMMAND ${CMAKE_COMMAND} -E make_directory
-   ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline
-   COMMAND ${CMAKE_COMMAND} -E env TDAQ_JAVA_HOME=${_javaHome}
-   CLASSPATH=${_classpath}
-   ${CMAKE_BINARY_DIR}/atlas_build_run.sh is_generator.sh
-   -d ${CMAKE_CURRENT_BINARY_DIR}/TrigConf2COOLOnline --cpp
-   -n ${CMAKE_CURRENT_SOURCE_DIR}/schema/is_trigconf_hlt.schema.xml
-   ${CMAKE_CURRENT_SOURCE_DIR}/schema/is_trigconf_l1.schema.xml )
-unset( _classpath )
-
-# Clean up the files on "make clean":
-set_directory_properties( PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-   "${_autogenHeaders}" )
-
 # Component(s) in the package:
 atlas_add_library( TrigConf2COOLOnline
-   src/*.cxx ${_autogenHeaders}
+   src/*.cxx
    PUBLIC_HEADERS TrigConf2COOLOnline
    INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} ${TDAQ_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS}
@@ -75,7 +38,3 @@ atlas_add_executable( TrigConf2CoolOnline
    LINK_LIBRARIES ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${TDAQ_LIBRARIES}
    TrigConf2COOLOnline )
 
-# Install files from the package:
-atlas_install_generic( schema/*.xml
-   DESTINATION share/data/daq/schema
-   TYPENAME Schema )
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/TrigConf2COOLOnline/OnlTrigC2CWriter.h b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/TrigConf2COOLOnline/OnlTrigC2CWriter.h
index 5c12ed0040d..62c51a30d6d 100644
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/TrigConf2COOLOnline/OnlTrigC2CWriter.h
+++ b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/TrigConf2COOLOnline/OnlTrigC2CWriter.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 /*
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_hlt.schema.xml b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_hlt.schema.xml
deleted file mode 100644
index de27c863c1d..00000000000
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_hlt.schema.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-
-<!-- oks-schema version 2.0 -->
-
-
-<!DOCTYPE oks-schema [
-  <!ELEMENT oks-schema (info, (include)?, (class)+)>
-  <!ELEMENT info EMPTY>
-  <!ATTLIST info
-      name CDATA #REQUIRED
-      type CDATA #REQUIRED
-      num-of-includes CDATA #REQUIRED
-      num-of-items CDATA #REQUIRED
-      oks-format CDATA #FIXED "schema"
-      oks-version CDATA #REQUIRED
-      created-by CDATA #REQUIRED
-      created-on CDATA #REQUIRED
-      creation-time CDATA #REQUIRED
-      last-modified-by CDATA #REQUIRED
-      last-modified-on CDATA #REQUIRED
-      last-modification-time CDATA #REQUIRED
-  >
-  <!ELEMENT include (file)+>
-  <!ELEMENT file EMPTY>
-  <!ATTLIST file
-      path CDATA #REQUIRED
-  >
-  <!ELEMENT class (superclass | attribute | relationship | method)*>
-  <!ATTLIST class
-      name CDATA #REQUIRED
-      description CDATA ""
-      is-abstract (yes|no) "no"
-  >
-  <!ELEMENT superclass EMPTY>
-  <!ATTLIST superclass name CDATA #REQUIRED>
-  <!ELEMENT attribute EMPTY>
-  <!ATTLIST attribute
-      name CDATA #REQUIRED
-      description CDATA ""
-      type (bool|s8|u8|s16|u16|s32|u32|float|double|date|time|string|uid|enum) #REQUIRED
-      range CDATA ""
-      format (dec|hex|oct) "dec"
-      is-multi-value (yes|no) "no"
-      multi-value-implementation (list|vector) "list"
-      init-value CDATA ""
-      is-not-null (yes|no) "no"
-  >
-  <!ELEMENT relationship EMPTY>
-  <!ATTLIST relationship
-      name CDATA #REQUIRED
-      description CDATA ""
-      class-type CDATA #REQUIRED
-      low-cc (zero|one) #REQUIRED
-      high-cc (one|many) #REQUIRED
-      is-composite (yes|no) #REQUIRED
-      is-exclusive (yes|no) #REQUIRED
-      is-dependent (yes|no) #REQUIRED
-      multi-value-implementation (list|vector) "list"
-  >
-  <!ELEMENT method (method-implementation*)>
-  <!ATTLIST method
-      name CDATA #REQUIRED
-      description CDATA ""
-  >
-  <!ELEMENT method-implementation EMPTY>
-  <!ATTLIST method-implementation
-      language CDATA #REQUIRED
-      prototype CDATA #REQUIRED
-      body CDATA ""
-  >
-]>
-
-<oks-schema>
-
-  <info name="" type="" num-of-includes="1" num-of-items="2" oks-format="schema" oks-version="oks-03-07-02 built &quot;Jul 23 2007&quot;" created-by="pauly" created-on="pcphate12.cern.ch" creation-time="20/7/06 15:42:51" last-modified-by="pauly" last-modified-on="pcphate14" last-modification-time="20/8/07 14:44:05"/>
-  
-  <include>
-    <file path="is/is.xml"/>
-  </include>
-  
-  <class name="TrigConfSmKey" description="Trigger configuration database key in use">
-    <superclass name="Info"/>
-    <attribute name="SuperMasterKey" description="Supermaster key of the trigger configuration" type="u32"/>
-    <attribute name="SuperMasterComment" description="Supermaster comment" type="string"/>
-  </class>
-  
-  <class name="TrigConfHltPsKey" description="Current HLT prescale key">
-    <superclass name="Info"/>
-    <attribute name="HltPrescaleKey" description="HLT prescale key of the trigger configuration" type="u32"/>
-    <attribute name="HltPrescaleComment" description="HLT prescale comment" type="string"/>
-  </class>
-  
-  <class name="TrigConfRelease" description="HLT Release description">
-    <superclass name="Info"/>
-    <attribute name="HLTReleaseVersion" description="Release and patch version like 15.5.1.2" type="string"/>
-    <attribute name="HLTPatchProject" description="Name of patch project, usualy AtlasP1HLT" type="string"/>
-    <attribute name="HLTExtraPatch" description="Path to extra patch area, should be empty except during commissioning" type="string"/>
-  </class>
-  
-</oks-schema>
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_l1.schema.xml b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_l1.schema.xml
deleted file mode 100644
index 73bcf9766cf..00000000000
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/schema/is_trigconf_l1.schema.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-
-<!-- oks-schema version 2.0 -->
-
-
-<!DOCTYPE oks-schema [
-  <!ELEMENT oks-schema (info, (include)?, (class)+)>
-  <!ELEMENT info EMPTY>
-  <!ATTLIST info
-      name CDATA #REQUIRED
-      type CDATA #REQUIRED
-      num-of-includes CDATA #REQUIRED
-      num-of-items CDATA #REQUIRED
-      oks-format CDATA #FIXED "schema"
-      oks-version CDATA #REQUIRED
-      created-by CDATA #REQUIRED
-      created-on CDATA #REQUIRED
-      creation-time CDATA #REQUIRED
-      last-modified-by CDATA #REQUIRED
-      last-modified-on CDATA #REQUIRED
-      last-modification-time CDATA #REQUIRED
-  >
-  <!ELEMENT include (file)+>
-  <!ELEMENT file EMPTY>
-  <!ATTLIST file
-      path CDATA #REQUIRED
-  >
-  <!ELEMENT class (superclass | attribute | relationship | method)*>
-  <!ATTLIST class
-      name CDATA #REQUIRED
-      description CDATA ""
-      is-abstract (yes|no) "no"
-  >
-  <!ELEMENT superclass EMPTY>
-  <!ATTLIST superclass name CDATA #REQUIRED>
-  <!ELEMENT attribute EMPTY>
-  <!ATTLIST attribute
-      name CDATA #REQUIRED
-      description CDATA ""
-      type (bool|s8|u8|s16|u16|s32|u32|float|double|date|time|string|uid|enum) #REQUIRED
-      range CDATA ""
-      format (dec|hex|oct) "dec"
-      is-multi-value (yes|no) "no"
-      multi-value-implementation (list|vector) "list"
-      init-value CDATA ""
-      is-not-null (yes|no) "no"
-  >
-  <!ELEMENT relationship EMPTY>
-  <!ATTLIST relationship
-      name CDATA #REQUIRED
-      description CDATA ""
-      class-type CDATA #REQUIRED
-      low-cc (zero|one) #REQUIRED
-      high-cc (one|many) #REQUIRED
-      is-composite (yes|no) #REQUIRED
-      is-exclusive (yes|no) #REQUIRED
-      is-dependent (yes|no) #REQUIRED
-      multi-value-implementation (list|vector) "list"
-  >
-  <!ELEMENT method (method-implementation*)>
-  <!ATTLIST method
-      name CDATA #REQUIRED
-      description CDATA ""
-  >
-  <!ELEMENT method-implementation EMPTY>
-  <!ATTLIST method-implementation
-      language CDATA #REQUIRED
-      prototype CDATA #REQUIRED
-      body CDATA ""
-  >
-]>
-
-<oks-schema>
-
-  <info name="" type="" num-of-includes="1" num-of-items="2" oks-format="schema" oks-version="oks-03-07-02 built &quot;Jul 23 2007&quot;" created-by="pauly" created-on="pcphate12.cern.ch" creation-time="20/7/06 15:42:51" last-modified-by="pauly" last-modified-on="pcphate14" last-modification-time="20/8/07 14:44:05"/>
-  
-  <include>
-    <file path="is/is.xml"/>
-  </include>
-  
-  <class name="TrigConfL1PsKey" description="Current L1 prescale key">
-    <superclass name="Info"/>
-    <attribute name="L1PrescaleKey" description="L1 prescale key of the trigger configuration" type="u32"/>
-    <attribute name="L1PrescaleComment" description="L1 prescale comment" type="string"/>
-  </class>
-  
-  <class name="TrigConfL1BgKey" description="Current L1 bunch group key">
-    <superclass name="Info"/>
-    <attribute name="L1BunchGroupKey" description="LVL1 bunch group key of the trigger configuration" type="u32"/>
-    <attribute name="L1BunchGroupComment" description="LVL1 bunch group comment" type="string"/>
-  </class>
-  
-  <class name="TrigConfRelease" description="HLT Release description">
-    <superclass name="Info"/>
-    <attribute name="HLTReleaseVersion" description="Release and patch version like 15.5.1.2" type="string"/>
-    <attribute name="HLTPatchProject" description="Name of patch project, usualy AtlasP1HLT" type="string"/>
-    <attribute name="HLTExtraPatch" description="Path to extra patch area, should be empty except during commissioning" type="string"/>
-  </class>
-  
-</oks-schema>
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/src/OnlTrigC2CWriter.cxx b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/src/OnlTrigC2CWriter.cxx
index 5c29f298022..0054daf5894 100644
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/src/OnlTrigC2CWriter.cxx
+++ b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/src/OnlTrigC2CWriter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -17,10 +17,10 @@
 
 #include "TrigConf2COOLOnline/OnlTrigC2CWriter.h"
 
-#include "TrigConf2COOLOnline/TrigConfSmKeyNamed.h"
-#include "TrigConf2COOLOnline/TrigConfL1PsKeyNamed.h"
-#include "TrigConf2COOLOnline/TrigConfHltPsKeyNamed.h"
-#include "TrigConf2COOLOnline/TrigConfReleaseNamed.h"
+#include "TTCInfo/TrigConfSmKeyNamed.h"
+#include "TTCInfo/TrigConfL1PsKeyNamed.h"
+#include "TTCInfo/TrigConfHltPsKeyNamed.h"
+#include "TTCInfo/TrigConfReleaseNamed.h"
 
 #include "config/Configuration.h"
 
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
index 93b7fab3129..2657baa2bd2 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
@@ -28,7 +28,7 @@ def dbgPreRun(inputFileList,outputFileList):
     total = 0
     #open root output file
     out_file = outputFileList[0]
-    hfile = TFile( out_file , 'UPDATE' )
+    hfile = TFile( out_file , 'RECREATE' )
     #inicialize dbgEventInfo,  this is the main event analysis class
     eventInfo = dbgEventInfo("_Pre",inputFileList.value[0])
     data = []
@@ -264,13 +264,13 @@ def getAsetupString(release):
     #If TestArea is for tzero (tzero/software/patches/AtlasP1HLT-RELEASE), then returns tzero/software/patches/AtlasP1HLT-release where release is the parameter given to this function getAsetupString(release)    
     if eVarDic.get('TestArea') :
         TestArea = eVarDic['TestArea']
-        if  TestArea.find("tzero/software/patches/AtlasP1HLT-") > 0 :
+        if  TestArea.find("tzero/software/patches/AthenaP1-") > 0 :
             testarea = TestArea.split('-')
             TestArea = testarea[0]+'-'+release
-        asetupString = AtlasProject + ',' + release + ',gcc49,cvmfs --testarea '+ TestArea
+        asetupString = AtlasProject + ',' + release + ',gcc62 --testarea '+ TestArea
         return asetupString
 
     #else, there is no TestArea,  then use the local directory    
     else :
-        asetupString = AtlasProject + ',' + release + ',gcc49,here'
+        asetupString = AtlasProject + ',' + release + ',gcc62,here'
     return asetupString
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
index e9ce500f4f4..579683da3b1 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgEventInfo.py
@@ -405,7 +405,6 @@ class dbgEventInfo:
 
 
     def root_definitions(self,dbgStep,inputFile):
-        gROOT.Reset()
         gStyle.SetCanvasColor(0)
         gStyle.SetOptStat(000000)
         gROOT.SetStyle("Plain")
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
index 5e5b57a9236..8726c20d3ed 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
@@ -16,7 +16,7 @@ import re
 from PyJobTransforms.trfExe import athenaExecutor
 
 #imports for preExecute
-from PyJobTransforms.trfUtils import asetupReport
+from PyJobTransforms.trfUtils import asetupReport, cvmfsDBReleaseCheck
 import PyJobTransforms.trfEnv as trfEnv
 import PyJobTransforms.trfExceptions as trfExceptions
 from PyJobTransforms.trfExitCodes import trfExit as trfExit
-- 
GitLab