Changeset 7471


Ignore:
Timestamp:
02/01/06 18:04:43 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7468 r7471  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/02/01 Daniel Hoehne
     21
     22   * datacenter/scripts/buildsequenceentries, checkfilesforsequenceavail,
     23     checkstardone, correcttime, dodatacheck, doexclusions, fillcallisto,
     24     fillganymed, fillstar, writesequencefiles:
     25     - adapted usage of function setstatus
     26
     27
     28
    2029 2006/01/31 Daniela Dorner
    2130
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7465 r7471  
    103103   echo "building sequence entries for date $date..." >> $scriptlog 2>&1
    104104   year2=`echo $date | cut -c 1-4`
     105   var1=$year2
     106   var2=$date
    105107   buildsequentriespath=$logpath/$program/$year2
    106108   makedir  $buildsequentriespath >> $scriptlog 2>&1
     109
     110   echo "run $program..." >> $scriptlog 2>&1
     111   setstatus "start" >> $scriptlog 2>&1
    107112
    108113   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
    109114
    110115   case $check1 in
    111       1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1
    112            statustime="Now()"
    113            failed="NULL"
    114            starttime="NULL"
    115            failedtime="NULL"
    116            var1=$year2
    117            var2=$date
    118            setstatus
    119            ;;
    120       *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;
     116      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1;;
     117      *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1
     118           com="building of sequences for date $date failed"
     119           check=$check1
     120           ;;
    121121   esac
     122
     123   echo "inserting the status for $program for date $date into the db" >> $scriptlog 2>&1
     124   setstatus "stop" >> $scriptlog 2>&1
    122125done
    123126
  • trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail

    r7465 r7471  
    103103   no=`printf %08d $sequence | cut -c 0-4`
    104104   no2=`printf %08d $sequence`
     105   var1=$no
     106   var2=$no2
    105107   outpath=$logpath/$program/$no
    106108   echo "outpath: "$outpath  >> $scriptlog 2>&1
     
    109111   sequencefile=$sequpath/$no/sequence$no2.txt
    110112
     113   echo "run $program..." >> $scriptlog 2>&1
     114   setstatus "start" >> $scriptlog 2>&1
     115
    111116   check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
    112117
    113118   case $check1 in
    114       1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    115            statustime="Now()"
    116            failed="NULL"
    117            starttime="NULL"
    118            failedtime="NULL"
    119            var1=$no
    120            var2=$sequence
    121            setstatus
    122            ;;
    123       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     119      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
     120      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     121           com="checking availability of files for sequence $sequence failed"
     122           check=$check1
     123           ;;
    124124   esac
     125
     126   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     127   setstatus "stop" >> $scriptlog 2>&1
    125128done
    126129
  • trunk/MagicSoft/Mars/datacenter/scripts/checkstardone

    r7465 r7471  
    100100do
    101101   no=`printf %08d $dataset | cut -c 0-5`
     102   var1=$no
     103   var2=$dataset
    102104   echo "checking files for dataset $dataset..." >> $scriptlog 2>&1
    103105   datasetfile=$datasetpath/$no/dataset`printf %08d $dataset`.txt
     
    117119   makedir $outpath  >> $scriptlog 2>&1
    118120   
     121   echo "run $program..." >> $scriptlog 2>&1
     122   setstatus "start" >> $scriptlog 2>&1
     123
    119124   for sequence in ${sequences[@]}
    120125   do
     126
    121127      check1=`root -q -b $macrospath/checkstardone.C+\(\""$sequence\""\) | tee $outpath/checkstardone-$sequence.log | grep int | sed -e 's/(int)//'`
    122128
     
    125131         *)   echo "check1=$check1 -> ERROR " >> $scriptlog 2>&1
    126132              echo "starfiles not available for sequence -> continue" >> $scriptlog 2>&1
    127               continue 2
     133              com="starfile missing for sequence $sequence"
     134              check=$check1
     135              break
    128136              ;;
    129137      esac
    130138   done
    131139   
    132    statustime="Now()"
    133    failed="NULL"
    134    starttime="NULL"
    135    failedtime="NULL"
    136    var1=$no
    137    var2=$dataset
    138    setstatus
     140   echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
     141   setstatus "stop" >> $scriptlog 2>&1
    139142done
    140143
  • trunk/MagicSoft/Mars/datacenter/scripts/correcttime

    r7465 r7471  
    8080for run in ${runs[@]}
    8181do
     82  no=`printf %08d $run | cut -c 1-5`
     83  var1=$no
     84  var2=$run
    8285  echo "getting path for run $run ... "
    8386  infile=`find $datapath/rawfiles-wrong-timing/ -name *${run}_[D,C,P,S]_*`
     
    9497 
    9598  check1=0
    96   echo "run $program..."
     99  echo "run $program..." >> $scriptlog 2>&1
     100  setstatus "start" >> $scriptlog 2>&1
     101
    97102  /home/tape/MagicReadout/correct_raw_time $infile $outfile > $timecorrpath/$program-$run.log
    98103  check1=$?
    99104
    100105  case $check1 in
    101      1)   echo "check1=$check1 -> everything ok -> setting status..."
    102           no=`printf %08d $run | cut -c 1-5`
    103           statustime="Now()"
    104           failed="NULL"
    105           starttime="NULL"
    106           failedtime="NULL"
    107           var1=$no
    108           var2=$run
    109           setstatus
    110         ;;
    111      *)   echo "check1=$check1 -> ERROR -> step has to be repeated";;
     106     1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
     107     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     108          com="time correction for run $run failed"
     109          check=$check1
     110          ;;
    112111  esac
     112  echo "inserting the status for $program for run $run into the db" >> $scriptlog 2>&1
     113  setstatus "stop" >> $scriptlog 2>&1
    113114done
    114115
  • trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck

    r7465 r7471  
    143143for run in ${runs[@]}
    144144do
    145    date
    146145   echo "do $program for run "$run >> $scriptlog 2>&1
    147146   no=`printf %08d $run | cut -c 0-2`
    148147   no2=`printf %08d $run`
     148   var1=$date
     149   var2=$no2
    149150   rawfile=`find /magic/data/rawfiles/ -name *${run}_[D,P,C,S]_*_E.raw`
    150151   echo "rawfile: "$rawfile >> $scriptlog 2>&1
     
    161162
    162163   echo "doing filldotraw..." >> $scriptlog 2>&1
     164   setstatus "start" >> $scriptlog 2>&1
     165
    163166   check1=`root -q -b $macrospath/filldotraw.C+\("\"$rawfile\""\,kFALSE\) | tee $filldotrawlogfile | grep int | sed -e 's/.*(int)//'`
    164167
     
    167170            ;;
    168171       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    169             continue;;
     172            com="filldotraw for run $run failed"
     173            check=$check1
     174            setstatus "stop" >> $scriptlog 2>&1
     175            continue ;;
    170176   esac
    171177   
     
    189195               ;;
    190196          *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     197               com="sinope for run $run failed"
     198               check=$check2
     199               setstatus "stop" >> $scriptlog 2>&1
    191200               continue 2;;
    192201      esac
     
    206215            ;;
    207216       *)   echo "check3=$check3 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     217            com="fillsinope for run $run failed"
     218            check=$check3
     219            setstatus "stop" >> $scriptlog 2>&1
    208220            continue;;
    209221   esac
     
    222234           ;;
    223235      *)   echo "check5=$check5 -> ERROR -> step could not be resetted -> repeat step " >> $scriptlog 2>&1
     236           com="reset status for fExclusionsDone for date $date2 failed"
     237           check=$check5
     238           setstatus "stop" >> $scriptlog 2>&1
    224239           continue;;
    225240   esac
  • trunk/MagicSoft/Mars/datacenter/scripts/doexclusions

    r7465 r7471  
    103103   echo "do exclusions for date "$date >> $scriptlog 2>&1
    104104   year2=`echo $date | cut -c 1-4`
     105   var1=$year2
     106   var2=$date
    105107   doexclusionspath=$logpath/$program/$year2
    106108   makedir $doexclusionspath >> $scriptlog 2>&1
     109
     110   echo "run $program..." >> $scriptlog 2>&1
     111   setstatus "start" >> $scriptlog 2>&1
    107112
    108113   check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionspath/doexclusions-$date.log | grep int | sed -e 's/(int)//'`
    109114
    110115   case $check1 in
    111       1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    112            statustime="Now()"
    113            failed="NULL"
    114            starttime="NULL"
    115            failedtime="NULL"
    116            var1=$year2
    117            var2=$date
    118            setstatus
    119         ;;
     116      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
    120117      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     118           com="doing exclusions for date $date failed"
     119           check=$check1
     120           ;;
    121121   esac
     122   echo "inserting the status for $program for date $date into the db" >> $scriptlog 2>&1
     123   setstatus "stop" >> $scriptlog 2>&1
    122124done
    123125
  • trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto

    r7465 r7471  
    104104   no=`printf %08d $sequence | cut -c 0-4`
    105105   no2=`printf %08d $sequence`
     106   var1=$no
     107   var2=$no2
    106108   path="$datapath/callisto/$no/$no2"
    107109   signalfile=$path/signal$no2.root
     
    114116
    115117   echo "run $program for sequence $sequence" >> $scriptlog 2>&1
     118   setstatus "start" >> $scriptlog 2>&1
    116119   echo "run fillcalib..." >> $scriptlog 2>&1
     120
    117121   check1=`root -q -b $macrospath/fillcalib.C+\("\"$calibfile\""\,kFALSE\) | tee $fillcaliblog | grep int | sed -e 's/(int)//'`
    118122
    119123   case $check1 in
    120       1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1;;
     124      1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;;
    121125      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    122            continue;;
     126           com="fillcalib for sequence $sequence failed"
     127           check=$check1
     128           setstatus "stop" >> $scriptlog 2>&1
     129           continue ;;
    123130   esac
    124131
    125132   check2=`root -q -b $macrospath/fillsignal.C+\("\"$signalfile\""\,kFALSE\) | tee $fillsignallog | grep int | sed -e 's/(int)//'`
    126133   case $check2 in
    127       1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    128            echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
    129            statustime="Now()"
    130            failed="NULL"
    131            starttime="NULL"
    132            failedtime="NULL"
    133            var1=$no
    134            var2=$sequence
    135            setstatus
    136           ;;
    137       *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     134      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
     135      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     136           com="fillsignal for sequencec $sequence failed"
     137           check=$check2
     138           ;;
    138139   esac
     140   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     141   setstatus "stop" >> $scriptlog 2>&1
    139142done
    140143
  • trunk/MagicSoft/Mars/datacenter/scripts/fillganymed

    r7465 r7471  
    104104   no=`printf %08d $dataset | cut -c 0-5`
    105105   no2=`printf %08d $dataset`
     106   var1=$no
     107   var2=$no2
    106108   path="$datapath/ganymed/$no/$no2"
    107109   ganymedfile=$path/ganymed$no2.root
     
    112114
    113115   echo "run $program for dataset $dataset" >> $scriptlog 2>&1
     116   setstatus "start" >> $scriptlog 2>&1
     117
    114118   check2=`root -q -b $macrospath/fillganymed.C+\("\"$ganymedfile\""\,kFALSE\) | tee $fillganymedlog | grep int | sed -e 's/(int)//'`
    115119   case $check2 in
    116       1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    117            echo "-> inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
    118            statustime="Now()"
    119            failed="NULL"
    120            starttime="NULL"
    121            failedtime="NULL"
    122            var1=$no
    123            var2=$no2
    124            setstatus
    125           ;;
    126       *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     120      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
     121      *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     122          com="fillganymed for dataset $dataset failed"
     123          check=$check2
     124          ;;
    127125   esac
     126   echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
     127   setstatus "stop" >> scriptlog 2>&1
    128128done
    129129
  • trunk/MagicSoft/Mars/datacenter/scripts/fillstar

    r7465 r7471  
    104104   no=`printf %08d $sequence | cut -c 0-4`
    105105   no2=`printf %08d $sequence`
     106   var1=$no
     107   var2=$no2
    106108   path="$datapath/star/$no/$no2"
    107109   starfile=$path/star$no2.root
     
    112114
    113115   echo "run $program for sequence $sequence" >> $scriptlog 2>&1
     116   setstatus "start" >> $scriptlog 2>&1
     117
    114118   check2=`root -q -b $macrospath/fillstar.C+\("\"$starfile\""\,kFALSE\) | tee $fillstarlog | grep int | sed -e 's/(int)//'`
    115119   case $check2 in
    116       1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    117            echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
    118            statustime="Now()"
    119            failed="NULL"
    120            starttime="NULL"
    121            failedtime="NULL"
    122            var1=$no
    123            var2=$no2
    124            setstatus
    125           ;;
     120      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    126121      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     122           com="fillstar for sequence $sequence failed"
     123           check=$check2
     124           ;;
    127125   esac
     126   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     127   setstatus "stop" >> $scriptlog 2>&1
    128128done
    129129
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7470 r7471  
    7979   echo " failedtime=$failedtime"
    8080   echo "-- check: -$check-"
    81    ech
    8281   echo ""
    8382}
  • trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles

    r7465 r7471  
    104104   no=`printf %08d $sequence | cut -c 0-4`
    105105   no2=`printf %08d $sequence`
     106   var1=$no
     107   var2=$no2
    106108   sequencepath=$sequpath/$no
    107109   makedir $sequencepath >> $scriptlog 2>&1
     
    112114
    113115   echo "write sequencefile for sequence $sequence" >> $scriptlog 2>&1
     116   setstatus "start" >> $scriptlog 2>&1
     117
    114118   check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelogpath/writesequencefile-$no2.log | grep int | sed -e 's/(int)//'`
    115119   case $check2 in
    116       1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1
    117            echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
    118            statustime="Now()"
    119            failed="NULL"
    120            starttime="NULL"
    121            failedtime="NULL"
    122            var1=$no
    123            var2=$no2
    124            setstatus
    125           ;;
     120      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
    126121      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
     122           com="writing of sequencefile for sequence $sequence failed"
     123           check=$check2
     124           ;;
    127125   esac
     126   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
     127   setstatus "stop" >> $scriptlog 2>&1
    128128done
    129129
Note: See TracChangeset for help on using the changeset viewer.