Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-18 22:51:00

0001 #!/bin/tcsh
0002 
0003 cmsenv
0004 rehash
0005 
0006 set rawLHC = L1RePack
0007 set rawSIM = DigiL1Raw
0008 
0009 echo
0010 date +%F\ %a\ %T
0011 echo Starting $0 $1 $2
0012 
0013 if ( $2 == "" ) then
0014   set tables = ( GRun )
0015 else if ( ($2 == all) || ($2 == ALL) ) then
0016   set tables = ( GRun HIon PIon PRef 2022v14 Fake Fake1 Fake2 )
0017 else if ( ($2 == ib) || ($2 == IB) ) then
0018   set tables = ( GRun HIon PIon PRef )
0019 else if ( ($2 == dev) || ($2 == DEV) ) then
0020   set tables = ( GRun HIon PIon PRef )
0021 else if ( ($2 == full) || ($2 == FULL) ) then
0022   set tables = ( FULL )
0023 else if ( ($2 == fake) || ($2 == FAKE) ) then
0024   set tables = ( Fake Fake1 Fake2 )
0025 else if ( ($2 == frozen) || ($2 == FROZEN) ) then
0026   set tables = ( 2022v14 )
0027 else
0028   set tables = ( $2 )
0029 endif
0030 
0031 foreach gtag ( $1 )
0032 
0033   foreach table ( $tables )
0034 
0035     if ($gtag == DATA) then
0036       set realData = True
0037       set base = RelVal_${rawLHC}
0038     else
0039       set realData = False
0040       set base = RelVal_${rawSIM}
0041     endif
0042 
0043 #   run workflows
0044 
0045     set base = ( $base OnLine_HLT RelVal_HLT RelVal_HLT2 )
0046 
0047     foreach task ( $base )
0048 
0049       echo
0050       set name = ${task}_${table}_${gtag}
0051       rm -f $name.{log,root}
0052 
0053       if ( $task == OnLine_HLT ) then
0054         set short = ${task}_${table}
0055         echo "`date +%T` cmsRun $short.py realData=${realData} globalTag="@" inputFiles="@" >& $name.log"
0056 #       ls -l        $short.py
0057         time  cmsRun $short.py realData=${realData} globalTag="@" inputFiles="@" >& $name.log
0058         echo "`date +%T` exit status: $?"
0059       else
0060         echo "`date +%T` cmsRun $name.py >& $name.log"
0061 #       ls -l        $name.py
0062         time  cmsRun $name.py >& $name.log
0063         echo "`date +%T` exit status: $?"
0064       endif
0065 
0066       if ( ( $task == RelVal_${rawLHC} ) || ( $task == RelVal_${rawSIM} ) ) then
0067 #       link to input file for subsequent steps
0068         rm -f              RelVal_Raw_${table}_${gtag}.root
0069         ln -s ${name}.root RelVal_Raw_${table}_${gtag}.root
0070       endif
0071 
0072     end
0073 
0074   end
0075 
0076 end
0077 
0078 # separate hlt+reco and reco+(validation)+dqm workflows
0079 
0080 foreach gtag ( $1 )
0081 
0082   foreach table ( $tables )
0083 
0084     if ($gtag == DATA) then
0085       set base = ( RelVal_HLT_Reco                     RelVal_RECO )
0086     else
0087       set base = ( RelVal_HLT_Reco RelVal_DigiL1RawHLT RelVal_RECO )
0088     endif
0089 
0090     foreach task ( $base )
0091 
0092       echo
0093       set name = ${task}_${table}_${gtag}
0094       rm -f $name.{log,root}
0095       echo "`date +%T` cmsRun $name.py >& $name.log"
0096 #     ls -l        $name.py
0097       time  cmsRun $name.py >& $name.log
0098       echo "`date +%T` exit status: $?"
0099 
0100     end
0101 
0102   end
0103 
0104 end
0105 
0106 # running each HLT trigger path individually one by one
0107 
0108 if ( ($2 != all) && ($2 != ib) && ($2 != dev) && ($2 != full) && ($2 != fake) && ($2 != frozen) ) then
0109   ./runIntegration.csh $1 $2
0110 endif
0111 
0112 echo
0113 echo Finished $0 $1 $2
0114 date +%F\ %a\ %T
0115 #