Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
#!/bin/tcsh

eval `scram runtime -csh`

echo
date +%F\ %a\ %T
echo Starting $0 $1 $2

if ( $2 == "" ) then
  set tables = ( GRun )
else if ( $2 == ALL ) then
  set tables = ( GRun HIon PIon PRef Special 2025v10 Fake Fake1 Fake2 )
else if ( $2 == IB ) then
  set tables = ( GRun HIon PIon PRef Special)
else if ( $2 == DEV ) then
  set tables = ( GRun HIon PIon PRef Special)
else if ( $2 == FULL ) then
  set tables = ( FULL )
else if ( $2 == FAKE ) then
  set tables = ( Fake Fake1 Fake2 )
else if ( $2 == FROZEN ) then
  set tables = ( 2025v10 )
else
  set tables = ( $2 )
endif

foreach gtag ( $1 )

  if ( $gtag == DATA ) then
    set extraflags = "-x realData=1 -x globalTag=@"
  else
    set extraflags = "-x realData=0 -x globalTag=@"
  endif

  foreach table ( $tables )

    echo
    set name = HLT_Integration_${table}_${gtag}
    touch ${name}
    rm -rf ${name}*

    set infile = file:../RelVal_Raw_${table}_${gtag}.root

    set hltIntegTestCmd = "hltIntegrationTests OnLine_HLT_${table}.py ${extraflags} -d ${name} -i ${infile} -n 100 -j 4 -a cpu"

    echo "`date +%T` ${hltIntegTestCmd} >& ${name}.log"
    time ${hltIntegTestCmd} >& ${name}.log
    set STATUS = $?

    echo "`date +%T` exit status: $STATUS"
    rm -f ${name}/*.root

    if ($STATUS != 0) then
      touch ${name}/issues.txt
      foreach line ("`cat ${name}/issues.txt`")
        cp ${name}/${line}.py  ${name}_${line}.py
        cp ${name}/${line}.log ${name}_${line}.log
      end
    endif

  end

end

echo
echo Finish $0 $1 $2
date +%F\ %a\ %T