From 1291e02cf2f59dca9c5a8c513d2f1f83500331ab Mon Sep 17 00:00:00 2001 From: Rafal Bielski <rafal.bielski@cern.ch> Date: Thu, 11 Apr 2019 02:31:27 +0200 Subject: [PATCH] add provisional chainDump to TrigUpgradeTest --- .../test/exec_TrigUpgradeTest_art_post.sh | 8 ++++++ .../TrigValTools/bin/chainDumpWorkaround.sh | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 Trigger/TrigValidation/TrigValTools/bin/chainDumpWorkaround.sh diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh index cd76aa83ccc..7261b031e6f 100755 --- a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh +++ b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh @@ -100,6 +100,14 @@ else echo "art-result: 999 RootComp" fi +### CHAINDUMP + +# Using temporary workaround to dump HLTChain.txt +if [ -f expert-monitoring.root ]; then + echo "Running chainDumpWorkaround.sh" + chainDumpWorkaround.sh expert-monitoring.root +fi + ### SUMMARY echo $(date "+%FT%H:%M %Z")" Files in directory:" diff --git a/Trigger/TrigValidation/TrigValTools/bin/chainDumpWorkaround.sh b/Trigger/TrigValidation/TrigValTools/bin/chainDumpWorkaround.sh new file mode 100755 index 00000000000..4b060e27479 --- /dev/null +++ b/Trigger/TrigValidation/TrigValTools/bin/chainDumpWorkaround.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# + +# +# This script is a temporary workaround to generate counts file HLTChain.txt from TrigUpgradeTest expert-monitoring.root +# It will be needed only as long as we don't implement the ChainAcceptance histogram in the HLT monitoring +# + +histFile=$1 +if [ ! -f ${histFile} ]; then + echo "Usage: $0 file.root" + exit 1 +fi + +rootScript="TFile f(\"$histFile\"); \ +TH2* h2d=(TH2*)f.Get(\"TrigSteer_HLT/SignatureAcceptance\"); \ +int biny=h2d->GetYaxis()->FindBin(\"Output\"); \ +TH1* h1d=(TH1*)h2d->ProjectionX(\"\",biny,biny); \ +for (int i=0; i<=h1d->GetNbinsX(); ++i) {int num=h1d->GetBinContent(i); printf(\"%s %d\\n\",h1d->GetXaxis()->GetBinLabel(i),num);}" + +root -b -l -q -e "${rootScript}" | grep 'HLT_' | sort > HLTChain.txt + -- GitLab