- General information
- Data readiness
- Calibration
- BeamLine Constraint
- Run 10, Au+Au 200 GeV
- Run 10, Au+Au 39 GeV
- Run 11
- Run 12
- Run 13
- Run 15 pAu200
- Run 15 pp200
- Run 2 (200 GeV pp)
- Run 3 (200 GeV dAu and pp)
- Run 4 (pp)
- Run 5
- Run 6 (pp)
- Run 6: Issues with 2006 BeamLine calibration
- Run 7 (200GeV AuAu)
- Run 8 (200 GeV dAu and pp)
- Run 8 (9GeV AuAu)
- Run 9 (pp500 and pp200)
- Run 9, pp200 GeV Full Field (FF) - new calibration (May 2012)
- Calibration Run preparation
- Calibration Schedules
- Calibration topics by dataset
- Docs
- STAR Automated Calibration Project
- SVT Calibrations
- TPC Calibrations
- BeamLine Constraint
- Databases
- Quality Assurance
- Calibration
- Grid and Cloud
- Infrastructure
- Machine Learning
- Offline Software
- Production
- S&C internal group meetings
- Test tree
mktxt2005.txt
Updated on Wed, 2009-03-18 18:22. Originally created by genevb on 2009-03-18 18:22.
Under:
#!/bin/csh set sdir = ./StarDb/Calibrations/rhic set tdir = ./txt set files = `ls -1 $sdir/*.C` set vs = (x0 err_x0 y0 err_y0 dxdz err_dxdz dydz err_dydz stats) set len = 0 set ofile = "" set dummy = "aa bb" # Necessary instantiation to make each element of oline a string with spaces set oline = ( \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" "aa bb" \ ) set firstTime = 1 set newString = "" foreach vv ($vs) set ofile = $tdir/${vv}.txt touch $ofile rm $ofile touch $ofile set va = "row.$vv" set fnum = 0 foreach file ($files) @ fnum = $fnum + 1 set vb = `cat $file | fgrep $va` set vc = $vb[3] @ len = `echo $vc | wc -c` - 1 set vd = `echo $vc | colrm $len` echo $vd >> $ofile if ($firstTime) then set newString = "$vd" else set newString = "${oline[${fnum}]} $vd" endif set oline[$fnum] = "$newString" end set firstTime = 0 end set ff = (date.time days) set vf foreach fff ($ff) set vg = $tdir/${fff}.txt set vf = ($vf $vg) touch $vg rm $vg touch $vg end set ofile = ${tdir}/full.txt touch $ofile rm $ofile touch $ofile set days = 0 set frac = 0 set fnum = 0 foreach file ($files) @ len = `echo $file | wc -c` - 18 set dt = `echo $file | colrm 1 $len | colrm 16` set year = `echo $file | colrm 1 $len | colrm 5` @ len = $len + 4 set month = `echo $file | colrm 1 $len | colrm 3` @ len = $len + 2 set day = `echo $file | colrm 1 $len | colrm 3` @ len = $len + 3 set hour = `echo $file | colrm 1 $len | colrm 3` @ len = $len + 2 set min = `echo $file | colrm 1 $len | colrm 3` @ len = $len + 2 set sec = `echo $file | colrm 1 $len | colrm 3` set modi = 0 # Feb has 28 = 31-3 days (this is a leap year) if ($month > 2) @ modi += 2 # Apr,Jun,Sep,Nov have 30 = 31-1 days if ($month > 4) @ modi += 1 if ($month > 6) @ modi += 1 if ($month > 9) @ modi += 1 if ($month > 11) @ modi += 1 echo $modi # convert to seconds since 01-Jan-2005 EST (5 hours behind GMT) @ year = $year - 2005 @ month = ($month + ($year * 12)) - 1 @ day = $day + ($month * 31) - $modi @ hour = ($hour + ($day * 24)) - 5 @ min = $min + ($hour * 60) @ sec = $sec + ($min * 60) # convert to days since 01-Jan-2005 EST (5 hours behind GMT) @ days = $sec / 86400 @ sec = $sec - ($days * 86400) @ frac = ($sec * 10000) / 864 set fra = "$frac" set len = `echo $fra | wc -c` @ len = 7 - $len while ($len > 0) set fra = "0${fra}" @ len = $len - 1 end echo $dt >> $vf[1] echo ${days}.$fra >> $vf[2] @ fnum = $fnum + 1 echo "${days}.$fra ${oline[${fnum}]} $dt" >> $ofile end
»
- Printer-friendly version
- Login or register to post comments