" . htmlentities( $title ) . "\n"; } else { echo "\n"; } return NULL; } function show_plot( $run, $plot ) { /* Looks in the repository config for a matching entry, builds the filename and shows the plot if it's there... */ // look for the plot config global $repo; $found = 0; foreach( $repo as $idx => $dqplot ) { if ( $idx == $plot ) { $found = 1; break; } } // display the plot if we have a valid runnumber and found the config if ( ( $run > 0 ) && ( $found > 0 ) ) { // build the filename $fname = sprintf( "%s/%s-%d.gif", $dqplot['location'], $dqplot['prefix'], $run ); if ( file_exists( $fname ) ) { echo "
\n"; } else { echo "This plot is unavailable, sorry for the inconvenience...
\n"; } } else { // nothing to display echo "Nothing to display...
\n"; } return NULL; } function display_runinfo( $info ) { ?>
Run taken on {$info['date']} at {$info['starttime']}
\n"; echo "Runperiod : {$info['period']}, Pedestal run : {$info['pedrun']}, "; echo "Runtype : {$info['type']}, Experiment : {$info['experiment']}
\n"; echo "Av. Chicane current : {$info['magcurr']}, Av. Wiggler current : {$info['wigcurr']}
\n"; echo "Av. Fb xpos setpoint : {$info['fbxpos']}, Av. Fb ypos setpoint : {$info['fbypos']}
\n"; echo "Av. Fb xang setpoint : {$info['fbxang']}, Av. Fb yang setpoint : {$info['fbyang']}
\n"; echo "DQ word : {$info['dqword']}
\n"; echo "Sub processes : {$info['subprocs']}
\n"; echo "Shift crew : {$info['crew']}
\n"; echo "DAQ Comments : {$info['daqcomment']}
\n"; echo "User Comments : {$info['usercomment']}
\n"; echo "
\n"; ?>
OpenConnection(); printHeader( "ESA DataQuality / Monitoring" ); $run = 0; $plot = 0; if ( ( (strlen( $_REQUEST['run']))&& ($_REQUEST['run'] != strval(intval($_REQUEST['run']))) ) || ( (strlen( $_REQUEST['plot']))&& ($_REQUEST['plot'] != strval(intval($_REQUEST['plot']))) ) ) { echo "Please provide some proper input...
"; exit; } else { $run = intval( $_REQUEST["run"] ); $plot = intval( $_REQUEST["plot"] ); } // get the run entry from the database $query = "SELECT * FROM runinfo WHERE runnr=$run"; $result = mysql_query( $query ) or die( mysql_error() ); ?>
Welcome to the ESA Dataquality page. Select the runnumber and the type of plot you want to see. Click Display to retreive the graph. If you want to scan through the runs, just click the next run and previous run links. Use your browser "back" button to return to eventuall search results from database.

Run information...

No run info to display...

DQ plot selection...

RunNumber :   Plot : \n"; foreach ( $repo as $idx => $dqplot ) { printoption( $idx, $dqplot['title'] ); } echo "  "; ?>

:: next run :: previous run :: runinfo index ::


CloseConnection(); printFooter(); ?>