Changeset 9147 for trunk/MagicSoft/Mars/datacenter/scripts/mcsequences
- Timestamp:
- 11/11/08 10:38:56 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/mcsequences
r8967 r9147 19 19 # 20 20 # Author(s): Daniela Dorner 12/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 # Author(s): Daniel a Dorner06/2008 <mailto:hoehne@astro.uni-wuerzburg.de>21 # Author(s): Daniel Hoehne 06/2008 <mailto:hoehne@astro.uni-wuerzburg.de> 22 22 # 23 23 # Copyright: MAGIC Software Development, 2000-2008 … … 103 103 do 104 104 trainupdate=" update MCRunData set fSequenceFirst=\"$firstruntrain\" where fRunNumber=\"$trainrun\" " 105 mysql -ss -u $user --password=$pw --host= vela$db -e " $trainupdate "105 mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainupdate " 106 106 done 107 107 108 108 trainquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntrain\" " 109 109 trainquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($trainruns2) " 110 trainvalues=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery1 "`111 trainvalues2=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery2 "`110 trainvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery1 "` 111 trainvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery2 "` 112 112 trainspec=`echo $trainvalues | cut -d" " -f1` 113 113 trainpsf=`echo $trainvalues | cut -d" " -f2` … … 125 125 trainquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntrain\" " 126 126 trainquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntrain\" " 127 traincheck3=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery3 "`128 traincheck4=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery4 "`127 traincheck3=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery3 "` 128 traincheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery4 "` 129 129 traininsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntrain\", fSequenceFileWritten=Now() " 130 130 traininsert2=" insert MCSequences set fSequenceFirst=\"$firstruntrain\", fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTestTrainKEY=2 " … … 132 132 if [ "$traincheck3" == "" ] 133 133 then 134 mysql -ss -u $user --password=$pw --host= vela$db -e " $traininsert1 "134 mysql -ss -u $user --password=$pw --host=$ho $db -e " $traininsert1 " 135 135 fi 136 136 if [ "$traincheck4" == "" ] 137 137 then 138 mysql -ss -u $user --password=$pw --host= vela$db -e " $traininsert2 "138 mysql -ss -u $user --password=$pw --host=$ho $db -e " $traininsert2 " 139 139 else 140 mysql -ss -u $user --password=$pw --host= vela$db -e " $trainupdate2 "140 mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainupdate2 " 141 141 fi 142 142 … … 166 166 do 167 167 testupdate=" update MCRunData set fSequenceFirst=\"$firstruntest\" where fRunNumber=\"$testrun\" " 168 mysql -ss -u $user --password=$pw --host= vela$db -e " $testupdate "168 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testupdate " 169 169 done 170 170 171 171 testquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntest\" " 172 172 testquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($testruns2) " 173 testvalues=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery1 "`174 testvalues2=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery2 "`173 testvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery1 "` 174 testvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery2 "` 175 175 testspec=`echo $testvalues | cut -d" " -f1` 176 176 testpsf=`echo $testvalues | cut -d" " -f2` … … 188 188 testquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntest\" " 189 189 testquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntest\" " 190 testcheck3=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery3 "`191 testcheck4=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery4 "`190 testcheck3=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery3 "` 191 testcheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery4 "` 192 192 testinsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntest\", fSequenceFileWritten=Now() " 193 193 testinsert2=" insert MCSequences set fSequenceFirst=\"$firstruntest\", fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTestTrainKEY=3 " … … 195 195 if [ "$testcheck3" == "" ] 196 196 then 197 mysql -ss -u $user --password=$pw --host= vela$db -e " $testinsert1 "197 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testinsert1 " 198 198 fi 199 199 if [ "$testcheck4" == "" ] 200 200 then 201 mysql -ss -u $user --password=$pw --host= vela$db -e " $testinsert2 "201 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testinsert2 " 202 202 else 203 mysql -ss -u $user --password=$pw --host= vela$db -e " $testupdate2 "203 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testupdate2 " 204 204 fi 205 205
Note:
See TracChangeset
for help on using the changeset viewer.