예제 #1
0
$tables['LS'][7] = "MON_PN_IRED_DAT";
// Page Title
echo "<center>";
echo "<h1>List of bad channels - run " . $run . " @ " . $loc . "</h1>";
echo "</center>";
echo "<hr/>";
echo "<h2>" . $tasks[$taskcode] . "</h2>";
echo "<hr/>";
if ($taskcode == 'CS' || $taskcode == 'BC' || $taskcode == 'BH' || $taskcode == 'TT') {
    echo "<h3>No bad channel lists are produced by this task</h3>";
    echo "<hr/>";
    exit;
}
foreach ($tables[$taskcode] as $table) {
    $data = fetch_mon_dataset_data($table, $iov_id, " task_status = :ts", array(':ts' => "0"));
    $headers = fetch_mon_dataset_headers($table);
    $headers = reorder_columns($table, $headers);
    $nrows = count($data['RUN']);
    $ncols = count($headers);
    // Table Title
    echo "<h4>{$table}<h4>";
    if ($nrows == 0) {
        echo "<h5>No bad channels in {$table}</h5>";
        echo "<hr/>";
        continue;
    }
    // Header row
    echo "<table class='bads'>";
    echo "<tr>";
    foreach ($headers as $code => $head) {
        echo "<th>{$head}</th>";
예제 #2
0
파일: test_funcs.php 프로젝트: sOval/cmssw
 * $Id: test_funcs.php,v 1.5 2007/04/12 11:04:42 fra Exp $
 */
-->

<html>
<body>
<h1>Test Functions</h1>
<pre>

<?php 
require_once 'db_functions.php';
echo build_mon_dataset_sql("MON_CRYSTAL_CONSISTENCY_DAT", "task_status = :ts"), "\n";
$data = fetch_mon_dataset_data("MON_CRYSTAL_CONSISTENCY_DAT", 75, "task_status != 0");
echo " data ";
var_dump($data);
$headers = fetch_mon_dataset_headers("MON_CRYSTAL_CONSISTENCY_DAT");
echo " headers ";
var_dump($headers);
$t_meta = fetch_table_meta("MON_CRYSTAL_CONSISTENCY_DAT");
echo " table meta ";
var_dump($t_meta);
$f_meta = fetch_field_meta("MON_CRYSTAL_CONSISTENCY_DAT");
echo " field meta ";
var_dump($f_meta);
$c_meta = fetch_channel_meta("EB_crystal_number");
echo " channel meta ";
var_dump($c_meta);
?>
</pre>