File indexing completed on 2024-04-06 12:17:08
0001
0002
0003
0004 MASTER="/dev/CMSSW_5_2_6/HLT"
0005 TARGET="/dev/CMSSW_5_2_6/\$TABLE"
0006
0007 TABLES="PIon"
0008
0009
0010 VERBOSE=false
0011
0012 [ "$1" == "-v" ] && { VERBOSE=true; shift; }
0013
0014 function log() {
0015 $VERBOSE && echo -e "$@"
0016 }
0017
0018 function findHltScript() {
0019 local PACKAGE="HLTrigger/Configuration"
0020 local SCRIPT="$1"
0021
0022 if [ -f "$SCRIPT" ]; then
0023 echo "./$SCRIPT"
0024 elif [ -f "$CMSSW_BASE/src/$PACKAGE/test/$SCRIPT" ]; then
0025 echo "$CMSSW_BASE/src/$PACKAGE/test/$SCRIPT"
0026 elif [ -f "$CMSSW_RELEASE_BASE/src/$PACKAGE/test/$SCRIPT" ]; then
0027 echo "$CMSSW_RELEASE_BASE/src/$PACKAGE/test/$SCRIPT"
0028 else
0029 echo "cannot find $SCRIPT, aborting"
0030 exit 1
0031 fi
0032 }
0033
0034 GETCONTENT=$(findHltScript getEventContent.py)
0035 GETDATASETS=$(findHltScript getDatasets.py)
0036
0037 function getConfigForCVS() {
0038 local CONFIG="$1"
0039 local NAME="$2"
0040 log " dumping HLT cff for $NAME"
0041
0042
0043 if [ "$NAME" == "GRun" ]; then
0044 local L1XmlPP="L1Menu_Collisions2012_v3_L1T_Scales_20101224_Imp0_0x102b.xml"
0045 hltGetConfiguration --cff --offline --mc $CONFIG --type $NAME --l1Xml $L1XmlPP > HLT_${NAME}_cff.py
0046 hltGetConfiguration --cff --offline --data $CONFIG --type $NAME --l1Xml $L1XmlPP > HLT_${NAME}_data_cff.py
0047 hltGetConfiguration --fastsim $CONFIG --type $NAME --l1Xml $L1XmlPP > HLT_${NAME}_Famos_cff.py
0048 elif [ "$NAME" == "HIon" ]; then
0049 hltGetConfiguration --cff --offline --mc $CONFIG --type $NAME > HLT_${NAME}_cff.py
0050 hltGetConfiguration --cff --offline --data $CONFIG --type $NAME > HLT_${NAME}_data_cff.py
0051 hltGetConfiguration --fastsim $CONFIG --type $NAME > HLT_${NAME}_Famos_cff.py
0052 elif [ "$NAME" == "PIon" ]; then
0053 local L1XmlPI="L1Menu_CollisionsHeavyIons2013_v0_L1T_Scales_20101224_Imp0_0x102c.xml"
0054 hltGetConfiguration --cff --offline --mc $CONFIG --type $NAME --l1Xml $L1XmlPI > HLT_${NAME}_cff.py
0055 hltGetConfiguration --cff --offline --data $CONFIG --type $NAME --l1Xml $L1XmlPI > HLT_${NAME}_data_cff.py
0056 hltGetConfiguration --fastsim $CONFIG --type $NAME --l1Xml $L1XmlPI > HLT_${NAME}_Famos_cff.py
0057 else
0058 hltGetConfiguration --cff --offline --mc $CONFIG --type $NAME > HLT_${NAME}_cff.py
0059 hltGetConfiguration --cff --offline --data $CONFIG --type $NAME > HLT_${NAME}_data_cff.py
0060 hltGetConfiguration --fastsim $CONFIG --type $NAME > HLT_${NAME}_Famos_cff.py
0061 fi
0062 diff -C0 HLT_${NAME}_cff.py HLT_${NAME}_data_cff.py
0063 }
0064
0065 function getContentForCVS() {
0066 local CONFIG="$1"
0067
0068 log " dumping EventContet"
0069 $GETCONTENT $CONFIG
0070 rm -f hltOutput*_cff.py*
0071 }
0072
0073 function getDatasetsForCVS() {
0074 local CONFIG="$1"
0075 local TARGET="$2"
0076
0077 log " dumping Primary Dataset"
0078 $GETDATASETS $CONFIG > $TARGET
0079 }
0080
0081 function getConfigForOnline() {
0082 local CONFIG="$1"
0083 local NAME="$2"
0084
0085 local L1TPP="L1GtTriggerMenu_L1Menu_Collisions2012_v3_mc,sqlite_file:/afs/cern.ch/user/g/ghete/public/L1Menu/L1Menu_Collisions2012_v3/sqlFile/L1Menu_Collisions2012_v3_mc.db"
0086
0087
0088 local L1THI="L1GtTriggerMenu_L1Menu_CollisionsHeavyIons2011_v0_mc"
0089 local L1TPI="L1GtTriggerMenu_L1Menu_CollisionsHeavyIons2013_v0_mc,sqlite_file:/afs/cern.ch/user/g/ghete/public/L1Menu/L1Menu_Collisions2012_v3/sqlFile/L1Menu_CollisionsHeavyIons2013_v0_mc.db"
0090
0091
0092 local L1XmlPP="L1Menu_Collisions2012_v3_L1T_Scales_20101224_Imp0_0x102b.xml"
0093 local L1XmlPI="L1Menu_CollisionsHeavyIons2013_v0_L1T_Scales_20101224_Imp0_0x102c.xml"
0094
0095 log " dumping full HLT for $NAME"
0096
0097 if [ "$NAME" == "GRun" ]; then
0098 hltGetConfiguration --full --offline --data $CONFIG --type $NAME --unprescale --process HLT$NAME --l1Xml $L1XmlPP --l1-emulator --globaltag auto:hltonline_GRun > OnData_HLT_$NAME.py
0099 hltGetConfiguration --full --offline --mc $CONFIG --type $NAME --unprescale --process HLT$NAME --l1Xml $L1XmlPP --l1-emulator --globaltag auto:startup_GRun > OnLine_HLT_$NAME.py
0100 elif [ "$NAME" == "HIon" ]; then
0101 hltGetConfiguration --full --offline --data $CONFIG --type $NAME --unprescale --process HLT$NAME --l1 $L1THI --globaltag auto:hltonline_HIon > OnData_HLT_$NAME.py
0102 hltGetConfiguration --full --offline --mc $CONFIG --type $NAME --unprescale --process HLT$NAME --l1 $L1THI --globaltag auto:starthi_HIon > OnLine_HLT_$NAME.py
0103 elif [ "$NAME" == "PIon" ]; then
0104 hltGetConfiguration --full --offline --data $CONFIG --type $NAME --unprescale --process HLT$NAME --l1Xml $L1XmlPI --globaltag auto:hltonline_PIon > OnData_HLT_$NAME.py
0105 hltGetConfiguration --full --offline --mc $CONFIG --type $NAME --unprescale --process HLT$NAME --l1Xml $L1XmlPI --globaltag auto:startup_PIon > OnLine_HLT_$NAME.py
0106 else
0107 hltGetConfiguration --full --offline --data $CONFIG --type $NAME --unprescale --process HLT$NAME --globaltag auto:hltonline > OnData_HLT_$NAME.py
0108 hltGetConfiguration --full --offline --mc $CONFIG --type $NAME --unprescale --process HLT$NAME > OnLine_HLT_$NAME.py
0109 fi
0110
0111
0112
0113
0114 }
0115
0116
0117 eval `scramv1 runtime -sh`
0118 hash -r
0119
0120
0121 echo "Extracting CVS python dumps"
0122 rm -f HLT*_cff.py
0123 getConfigForCVS $MASTER FULL
0124 getContentForCVS $MASTER
0125 for TABLE in $TABLES; do
0126 getConfigForCVS $(eval echo $TARGET) $TABLE
0127 getDatasetsForCVS $(eval echo $TARGET) HLTrigger_Datasets_${TABLE}_cff.py
0128 done
0129 log "Done"
0130 ls -l HLT_*_cff.py HLTrigger_EventContent_cff.py HLTrigger_Datasets_*_cff.py
0131 mv -f HLT_*_cff.py HLTrigger_EventContent_cff.py HLTrigger_Datasets_*_cff.py ../python/
0132 echo
0133
0134
0135 echo "Extracting full configurations"
0136 rm -f OnData_HLT_GRun_*.py
0137 rm -f OnData_HLT_HIon_*.py
0138 rm -f OnData_HLT_PIon_*.py
0139 rm -f OnLine_HLT_GRun_*.py
0140 rm -f OnLine_HLT_HIon_*.py
0141 rm -f OnLine_HLT_PIon_*.py
0142 for TABLE in $TABLES; do
0143 getConfigForOnline $(eval echo $TARGET) $TABLE
0144 done
0145 log "Done"
0146 ls -l OnData_HLT_*.py
0147 ls -l OnLine_HLT_*.py
0148 echo