$production=$_GET['production']; $trigger=$_GET['trigger']; $charge=$_GET['charge']; $colli=$_GET['colli']; $comment=$_GET['comment']; $spec=$_GET['spec']; $setproduction=$production; $settrigger=$trigger; $setcharge=$charge; $setcolli=$colli; $setcomment=$comment; $setspec=$spec; $setkinematic=$kine; echo "
\n"; echo "
Kinematic | \n"; echo "Run | \n"; echo "Target | \n"; echo "Time (minutes) | \n"; echo "Events | \n"; if($spec) { echo "LHRS p0 (GeV/c) | \n"; echo "LHRS angle (deg) | \n"; echo "BigBite I (A) | \n"; echo "BigBite angle (deg) | \n"; } if($trigger) { echo "T1 (pre/real) | \n"; echo "T2 (pre/real) | \n"; echo "T3 (pre/real) | \n"; echo "T4 (pre/real) | \n"; echo "T5 (pre/real) | \n"; echo "T6 (pre/real) | \n"; echo "T7 (pre/real) | \n"; echo "T8 (pre/real) | \n"; } if($charge) { echo "u1 (C) | \n"; echo "u3 (C) | \n"; echo "u10 (C) | \n"; echo "d1 (C) | \n"; echo "d3 (C) | \n"; echo "d10 (C) | \n"; } if($colli) { echo "LHRS Colli | \n"; echo "BB Colli | \n"; } if($comment) { echo "Comment | \n"; } $i=0; $bkg_color="white"; while($i<$run_info_nrows) { $runnumber=mysql_result($run_info_result,$i,"RunNumber"); $target=mysql_result($run_info_result,$i,"TargetName"); $scaler_query = " SELECT * FROM scalerinfo WHERE RunInfo_RunNumber=$runnumber "; $scaler_query .= "ORDER BY scalerID DESC LIMIT 1"; $scaler_info_result=mysql_query($scaler_query); $scaler_info_nrows=mysql_numrows($scaler_info_result); if($scaler_info_nrows==0) { $i++; continue; } $ana_query = " SELECT * FROM AnalysisInfo "; $ana_query .= " WHERE RunInfo_RunNumber=$runnumber"; $ana_query .= " ORDER BY anaID DESC LIMIT 1"; $ana_result=mysql_query($ana_query); $ana_nrows=mysql_numrows($ana_result); if($ana_nrows==0) { $kinematic = ""; } else { $kinematic = mysql_result($ana_result,0,"KineName"); $isproduction = mysql_result($ana_result,0,"Production"); } if($production&&!$isproduction) { $i++; continue; } if($isproduction) { $bkg_color="lightblue"; } else { $bkg_color="white"; } $events = mysql_result($scaler_info_result,0,"Events"); $time = mysql_result($scaler_info_result,0,"Time"); echo "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
\n"; echo "$kinematic\n"; echo " | \n"; echo "\n"; echo "$runnumber\n"; echo " | \n"; echo "\n"; echo "$target\n"; echo " | \n"; echo "\n"; echo "$time"; echo " | \n"; echo "\n"; echo "$events\n"; echo " | \n"; if($spec) { $runinfo_query = " SELECT * FROM RunInfo WHERE RunNumber=$runnumber "; $runinfo_result=mysql_query($runinfo_query); $lhrs_p0 = mysql_result($runinfo_result,0,"LeftMomentum"); $lhrs_ang = mysql_result($runinfo_result,0,"LeftAngle"); $bb_I = mysql_result($runinfo_result,0,"BBCurrent"); $bb_ang = mysql_result($runinfo_result,0,"BBAngle"); echo "\n"; echo "$lhrs_p0\n"; echo " | \n"; echo "\n"; echo "$lhrs_ang\n"; echo " | \n"; echo "\n"; echo "$bb_I\n"; echo " | \n"; echo "\n"; echo "$bb_ang\n"; echo " | \n"; } if($trigger) { for($j=1; $j<=8; $j++) { $pre = mysql_result($scaler_info_result,0,"T".$j."prescaled"); $real = mysql_result($scaler_info_result,0,"T".$j."real"); echo "\n"; echo "$pre / $real\n"; echo " | \n"; } } if($charge) { $bcmarray = array("u1","u3","u10","d1","d3","d10"); foreach ($bcmarray as $bcm) { echo "\n"; $chg = mysql_result($scaler_info_result,0,$bcm."charge"); echo "$chg\n"; echo " | \n"; } } if($colli) { $lhrs_colli = mysql_result($scaler_info_result,0,"lhrs_colli"); $bb_colli = mysql_result($scaler_info_result,0,"bb_colli"); echo "\n"; echo "$lhrs_colli\n"; echo " | \n"; echo "\n"; echo "$bb_colli\n"; echo " | \n"; } if($comment) { $sw_comment = mysql_result($scaler_info_result,0,"sw_comment"); echo "\n"; echo "$sw_comment\n"; echo " | \n"; } echo "