Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-14 23:41:08

0001 #! /bin/bash
0002 
0003 function usage() {
0004   echo "Usage: hltInfo FILE"
0005   echo
0006   echo "Print the CMSSW process names, releases, global tags, and the HLT menu, used to collect or simulate FILE."
0007 }
0008 
0009 
0010 if ! [ "$1" ]; then
0011   usage
0012   exit 1
0013 fi
0014 
0015 if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
0016   usage
0017   exit 0
0018 fi
0019 
0020 FILE="$1"
0021 
0022 edmProvDump "$FILE" | awk '
0023   BEGIN {keep=0}
0024   /Producers with data in file/ {keep=0}
0025   /^Processing History:/ {keep=1; next}
0026   keep && NF >= 4 {
0027     proc = $1;
0028     rel  = gensub(/["'\'']/, "", "g", $2);
0029     hash = gensub(/[()]/, "", "g", $4);
0030     print proc, rel, hash;
0031   }
0032 ' | while read PROC REL HASH; do
0033   echo "process $PROC (release $REL)"
0034   edmProvDump "$FILE" --dumpPSetID "$HASH" 2>/dev/null | \
0035     grep -E '^\s*tableName:|^\s*globaltag:' | \
0036     sed -E -e 's/.*tableName:[^=]*= */   HLT menu:   /' \
0037            -e 's/.*globaltag:[^=]*= */   global tag: /'
0038   echo
0039 done