diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/exec_TrigUpgradeTest_art_post.sh index cd76aa83cccac3bd2efad3725ae2a5d722fb8ae7..7261b031e6f1b61e98f081d36fa05ca4f666d351 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 0000000000000000000000000000000000000000..4b060e27479ecfab5718e978a54305b1525bfa7a --- /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 +