Changeset 7051


Ignore:
Timestamp:
05/17/05 16:53:35 (20 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7050 r7051  
    116116     - adapted paths
    117117
     118   * datacenter/scripts/insertdataset
     119     - added logging
     120
    118121   * datacenter/scripts/runganymed
    119122     - added (script to run ganymed automatically for datasets)
     123
     124   * datacenter/scripts/runcallisto
     125     - adapted paths
     126     - fixed bug
     127
     128   * datacenter/scripts/runstar
     129     - adapted paths
     130     - fixed bug
    120131
    121132   * steps.rc
  • trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets

    r7037 r7051  
    3636cd /home/operator/Mars.cvs
    3737
     38datetime=`date +%F-%H-%M-%S`
     39year=`date +%Y`
     40
     41scriptlogpath=$logpath/run/insertdatasets/`date +%Y/%m`
     42if [ ! -d $scriptlogpath ]
     43then
     44  mkdir -pv $scriptlogpath
     45  if [ ! -d $scriptlogpath ]
     46  then
     47     echo "could not make scriptlogpath "$scriptlogpath
     48     exit
     49  fi
     50fi
     51
     52scriptlog=$scriptlogpath/insertdatasets-$datetime.log
     53
     54date >> $scriptlog 2>&1
     55
     56date > $lockpath/lock-insertdatasets.txt >> $scriptlog 2>&1
     57checklock0=$?
     58case $checklock0 in
     59    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
     60    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
     61         echo "-> getting list for callisto is running -> exit" >> $scriptlog 2>&1
     62         date  >> $scriptlog 2>&1
     63         exit;;
     64    *)   echo "checklock0=$checklock0 -> something went completely wrong" >> $scriptlog 2>&1;;
     65esac
     66
    3867
    3968datasetfiles=(`ls /magic/datasets/*/*`)
    40 echo "datasetfiles: "${datasetfiles[@]}
    41 echo ""
     69echo "datasetfiles: "${datasetfiles[@]}  >> $scriptlog 2>&1
     70echo "" >> $scriptlog 2>&1
    4271
    4372for datasetfile in ${datasetfiles[@]}
     
    4877   if [ "$no" = "$no3" ]
    4978   then
    50       echo "number in filename and in file are the same -> continue"
     79      echo "number in filename and in file are the same -> continue" >> $scriptlog 2>&1
    5180   else
    52       echo "number in filename and in file are not the same "
    53       echo " -> continue with next dataset"
     81      echo "number in filename and in file are not the same " >> $scriptlog 2>&1
     82      echo " -> continue with next dataset" >> $scriptlog 2>&1
    5483      continue
    5584   fi
    56    source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'`
    57    mode=`grep 'WobbleMode:' $datasetfile`
    58    mode2=`echo $mode | grep ^\#`
     85   source=`grep 'SourceName:' $datasetfile | sed -e 's/SourceName://g' | sed -e 's/ //g' | sed -e 's/#//g'` >> $scriptlog 2>&1
     86   mode=`grep 'WobbleMode:' $datasetfile` >> $scriptlog 2>&1
     87   mode2=`echo $mode | grep ^\#` >> $scriptlog 2>&1
    5988   if [ "$mode2" = "" ]
    6089   then
    61       wobble="Y"
     90      wobble="Y" >> $scriptlog 2>&1
    6291   else
    63       wobble="N"
     92      wobble="N" >> $scriptlog 2>&1
    6493   fi
    65    echo "file: "$datasetfile
    66    echo "  datasetno:  "$no2
    67    echo "  sourcename: "$source
    68    echo "  wobble:     "$wobble
    69    echo " "
    70 #   check0=`root -q -b $macrospath/insertdataset.C+\("\"$no\""\,"\"$source\""\,"\"$type\""\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'`
    71    check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\"",kFALSE\) | grep int | sed -e 's/(int)//'`
     94   echo "file: "$datasetfile >> $scriptlog 2>&1
     95   echo "  datasetno:  "$no2 >> $scriptlog 2>&1
     96   echo "  sourcename: "$source >> $scriptlog 2>&1
     97   echo "  wobble:     "$wobble >> $scriptlog 2>&1
     98   echo " " >> $scriptlog 2>&1
     99   
     100   insertdatasetpath=$logpath/insertdataset/$no3
     101   if [ ! -d $insertdatasetpath ]
     102      then
     103      mkdir -pv $insertdatasetpath >> $scriptlog 2>&1
     104      if [ ! -d $insertdatasetpath ]
     105      then
     106         echo "could not make insertdatasetpath "$insertdatasetpath >> $scriptlog 2>&1
     107         continue
     108      fi
     109   fi
     110   insertdatasetlog=$insertdatasetpath/insertdataset-$no3.log
     111   check0=`root -q -b $macrospath/insertdataset.C+\("\"$no2\""\,"\"$source\""\,"\"$wobble\"",kFALSE\) | tee $insertdatasetlog | grep int | sed -e 's/(int)//'`
    72112   case $check0 in
    73       1)   echo "check0=$check0 -> everthing ok ";;
    74       *)   echo "check0=$check0 -> ERROR ";;
     113      1)   echo "check0=$check0 -> everthing ok " >> $scriptlog 2>&1 ;;
     114      *)   echo "check0=$check0 -> ERROR " >> $scriptlog 2>&1 ;;
    75115   esac
    76116done
    77117
     118rm -v $todofile >> $scriptlog 2>&1
     119rm -v $lockpath/lock-insertdatasets.txt >> $scriptlog 2>&1
    78120
     121set +C
     122
     123date  >> $scriptlog 2>&1
     124
     125
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r7030 r7051  
    172172for sequence in ${sequences[@]}
    173173do
    174   no=`printf %08d $sequence | cut -c 4`
    175   outpath="/magic/data/callisto/"`printf %04d $no`"/"`printf %08d $sequence`
     174  no=`printf %08d $sequence | cut -c 0-4`
     175  no2=`printf %08d $sequence`
     176  outpath="/magic/data/callisto/$no/$no2"
    176177  echo "outpath: "$outpath >> $scriptlog 2>&1
    177178  if [ ! -d $outpath ]
     
    184185    fi
    185186  fi
    186   sequfile="/magic/sequences/"`printf %04d $no`"/sequence"`printf %08d $sequence`".txt"
     187  sequfile="/magic/sequences/$no/sequence$no2.txt"
    187188  echo "sequfile: "$sequfile >> $scriptlog 2>&1
    188189 
     
    198199
    199200  echo "run callisto..." >> $scriptlog 2>&1
    200   ./callisto -b -q -f -raw --log=$outpath/callisto$sequence.log --out=$outpath --config=$callistorcseq $sequfile  2>> $scriptlog > /dev/null
     201  ./callisto -b -q -f -raw --log=$outpath/callisto$no2.log --out=$outpath --config=$callistorcseq $sequfile  2>> $scriptlog > /dev/null
    201202  check1=$?
    202203
     
    275276         
    276277          echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1
    277           setstatuslogpath=$logpath/setstatus/callisto/`printf %04d $no`
     278          setstatuslogpath=$logpath/setstatus/callisto/$no
    278279          if [ ! -d $setstatuslogpath ]
    279280          then
     
    285286            fi
    286287          fi
    287           setstatuslog=$setstatuslogpath/setstatus-callisto
    288           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'`
     288          setstatuslog=$setstatuslogpath/setstatus-callisto-$no2.log
     289          check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    289290          case $check4 in
    290291             1)   echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runganymed

    r7050 r7051  
    171171do
    172172  no=`printf %08d $dataset | cut -c 0-4`
    173   outpath="/magic/data/ganymed/$no/"`printf %08d $dataset`
    174   inpath=`echo $outpath | sed -e 's/ganymed/star/'`
    175   echo "inpath: "$inpath >> $scriptlog 2>&1
     173  no2=`printf %08d $dataset`
     174  outpath="/magic/data/ganymed/$no/$no2"
    176175  echo "outpath: "$outpath >> $scriptlog 2>&1
    177176  if [ ! -d $outpath ]
     
    184183    fi
    185184  fi
    186   datasetfile="/magic/datasets/$no/dataset"`printf %08d $dataset`".txt"
     185  datasetfile="/magic/datasets/$no/dataset$no2.txt"
    187186  echo "datasetfile: "$datasetfile >> $scriptlog 2>&1
    188187 
    189188  echo "run ganymed..." >> $scriptlog 2>&1
    190   ./ganymed -b -q -f --log=$outpath/ganymed$dataset.log --ind=$inpath --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
     189  ./ganymed -b -q -f --log=$outpath/ganymed$no2.log --out=$outpath $datasetfile  2>> $scriptlog> /dev/null
    191190  check1=$?
    192191
     
    204203            fi
    205204          fi
    206           setstatuslog=$setstatuslogpath/setstatus-ganymed
    207           check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$dataset.log | grep int | sed -e 's/(int)//'`
     205          setstatuslog=$setstatuslogpath/setstatus-ganymed-$no2.log
     206          check4=`root -q -b $macrospath/setstatus.C+\("\"$dataset\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    208207          case $check4 in
    209208             1)   echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;;
  • trunk/MagicSoft/Mars/datacenter/scripts/runstar

    r7030 r7051  
    167167for sequence in ${sequences[@]}
    168168do
    169   no=`printf %08d $sequence | cut -c 4`
    170   outpath="/magic/data/star/"`printf %04d $no`"/"`printf %08d $sequence`
     169  no=`printf %08d $sequence | cut -c 0-4`
     170  no2=`printf %08d $sequence`
     171  outpath="/magic/data/star/$no/$no2"
    171172  inpath=`echo $outpath | sed -e 's/star/callisto/'`
    172173  echo "inpath: "$inpath >> $scriptlog 2>&1
     
    181182    fi
    182183  fi
    183   sequfile="/magic/sequences/"`printf %04d $no`"/sequence"`printf %08d $sequence`".txt"
     184  sequfile="/magic/sequences/$no/sequence$no2.txt"
    184185  echo "sequfile: "$sequfile >> $scriptlog 2>&1
    185186 
     
    191192     0)   echo "check1=$check1 -> everthing ok " >> $scriptlog 2>&1
    192193          echo "-> inserting the status for star for sequence $sequence into the db" >> $scriptlog 2>&1
    193           setstatuslogpath=$logpath/setstatus/star/`printf %04d $no`
     194          setstatuslogpath=$logpath/setstatus/star/$no
    194195          if [ ! -d $setstatuslogpath ]
    195196          then
     
    201202            fi
    202203          fi
    203           setstatuslog=$setstatuslogpath/setstatus-star
    204           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'`
     204          setstatuslog=$setstatuslogpath/setstatus-star-$no2.log
     205          check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    205206          case $check4 in
    206207             1)   echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;;
Note: See TracChangeset for help on using the changeset viewer.