<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"> 
<html xmlns    = " http://www.w3.org/1999/xhtml" 
      xml:lang = "en" 
      lang     = "en"> 

 <head>
  <title>Pixel DQM Viewer</title>
  <meta http-equiv = "content-type" 
        content    = "text/html; charset=utf-8" />
  <meta name       = "keywords" 
        content    = "css, stylesheets, form" />
  <link rel = "stylesheet" type = "text/css" href = "css_files/Online.css"             />
  <link rel = "stylesheet" type = "text/css" href = "css_files/tab-view.css"	       />
  <link rel = "stylesheet" type = "text/css" href = "css_files/context-menu.css"       />
  <link rel = "stylesheet" type = "text/css" href = "css_files/folder-tree-static.css" />
  <link rel = "stylesheet" type = "text/css" href = "css_files/IMGC.css"	       />
<!--  <link rel = "stylesheet" type = "text/css" href = "../../TrackerCommon/test/css_files/tab-view.css"           />
  <link rel = "stylesheet" type = "text/css" href = "../../TrackerCommon/test/css_files/context-menu.css"       />
  <link rel = "stylesheet" type = "text/css" href = "../../TrackerCommon/test/css_files/folder-tree-static.css" />
  <link rel = "stylesheet" type = "text/css" href = "../../TrackerCommon/test/css_files/IMGC.css"               />
-->
  <script type = "text/javascript" src = "WebLib.js">                                  </script> 
  <script type = "text/javascript" src = "js_files/tab-view.js">		       </script>
  <script type = "text/javascript" src = "js_files/scriptaculous/lib/prototype.js">    </script>
  <script type = "text/javascript" src = "js_files/scriptaculous/src/scriptaculous.js"></script>
  <script type = "text/javascript" src = "js_files/scriptaculous/lib/moo.fx.js">       </script>
  <script type = "text/javascript" src = "js_files/IMGC.js">			       </script>
  <script type = "text/javascript" src = "js_files/SlideShow.js">		       </script>
<!--  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/tab-view.js">                       </script>
  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/scriptaculous/lib/prototype.js">    </script>
  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/scriptaculous/src/scriptaculous.js"></script>
  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/scriptaculous/lib/moo.fx.js">       </script>
  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/IMGC.js">                           </script>
  <script type = "text/javascript" src = "../../TrackerCommon/test/js_files/SlideShow.js">                      </script>
-->
  <script type = "text/javascript">
   function CloseUpperWindow()
   {
    var url = WebLib.getApplicationURL2();
    var s0          = (url.lastIndexOf(".ch:")+4);
    var s1          = url.lastIndexOf("/urn:");
    var port_number = url.substring(s0, s1);
    if (port_number == "1972") {
      var frameSet = parent.document.getElementsByTagName("frameset") ;
      frameSet[0].setAttribute("rows","0,100%") ;
    }
   }
   function ShowTabs(option) 
   {
     var obj = document.getElementById("dhtmlgoodies_tabView1");
     if (obj == null) return;
     obj.style.visibility = option; // "visible" or "hidden"
   }
   function ShowButtons(option) 
   {
     var obj;
     obj = document.getElementById("collate_me");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("create_summary");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("check_qtest_result");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("create_tkmap");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("pixel_summary_overview_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("barrel_summary_overview_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("endcap_summary_overview_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("structure_for_overview");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("errorOverview_slideShow");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("errorOverview_plot_creation");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("errorOverview_plot_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("summary_plot_creation");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("update_slideshow");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("save_to_file");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("start_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("previous_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("play_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("stop_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("next_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("end_slide_show");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("list_ME_command");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("refreshInterval");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("create_tkmap");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("list_module");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("TKMapContentType");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("structure_for_module");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("clearSingleModuleViewTree");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("list_summary");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("structure_name");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("clearSingleModuleViewTree");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("read_alarm");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("structure_for_alarm");
     if (obj != null ) obj.disabled=option;
     obj = document.getElementById("clearAlarmViewTree");
     if (obj != null ) obj.disabled=option;
   }
   function ShowProgress (option) 
   {
     var progress = document.getElementById("progressIcon");
     if (progress == null) return;
   
     var label = document.getElementById("progress_message");
     if (label == null) return;
   
     var args = arguments[1];
     if (args != null && args.length > 0) {
       label.innerHTML = args;
     }
     progress.style.visibility = option; // "visible" or "hidden"
   }
   function RequestReadyState() 
   {
     var queryString;
     var url = WebLib.getApplicationURL2();
     queryString = "RequestID=IsReady";
     url += queryString;
     WebLib.makeRequest(url, FillReadyState);
   }
   function FillReadyState() 
   {
     if (WebLib.http_request.readyState == 4) {
       if (WebLib.http_request.status == 200) {
         try {
           var callAgain = false;
           var doc = WebLib.http_request.responseXML;
           var root = doc.documentElement;
           var hrows = root.getElementsByTagName('LName');
           if (hrows.length < 1) {
             callAgain = true; 
           } 
           else {

             for (var i = 0; i < hrows.length; i++) {
               var l_name  = hrows[i].childNodes[0].nodeValue;
	       var slideName = l_name + ".png";
               ErrorListFiles.push(slideName); 
	       slideName = "Plot=" + slideName + "&Folder=" + l_name;
               ErrorListTitles.push(slideName); 

               var MErows = root.getElementsByTagName('LMEName');
               for (var j = 0; j < MErows.length; j++) {
                 var lME_name = MErows[j].childNodes[0].nodeValue;
                 if( lME_name.match(l_name) ){ 
		   slideName = lME_name + ".png";
                   slideListFiles.push(slideName); 
		   if(l_name.match("Barrel")) BarrelListFiles.push(slideName); 
		   if(l_name.match("Endcap")) EndcapListFiles.push(slideName); 
		   slideName = "Plot=" + slideName + "&Folder=" + l_name;
                   slideListTitles.push(slideName); 
		   if(l_name.match("Barrel")) BarrelListTitles.push(slideName); 
		   if(l_name.match("Endcap")) EndcapListTitles.push(slideName); 
                 }
               }

             }
             nSlides = slideListFiles.length;

       	     ShowButtons(false);
             ShowTabs('visible');
             ShowProgress('hidden');

           }
           if (callAgain){
             setTimeout('RequestReadyState()',20000);
           }
         } 
         catch (err) {
           alert ("Error detail: " + err.message); 
         }
       }
     }
   }

   function Onload()
   {
     try{
       CloseUpperWindow();
       ShowProgress("visible","&nbsp Histograms from Collector");
       RequestReadyState();
     }catch(e){
       alert(e.message);
     }
   }
  </script> 
 </head>
 
 <body onresize = "IMGC.repaintUponResize()"
       onload   = "Onload(); CloseUpperWindow()">
  <form id     = "theWholeForm"
  	action = "javascript:void%200">

   <!-- The left frame: the canvas where all ME plots end up -->
   
   <div class = "theCanvas"
  	id    = "theCanvas"
  	style = "width:  70%  ; 
	         height: 100% ; 
		 float:  left ;">
     <fieldset style = "background:#DDEFFF;"> 
         <div id = "progressIcon">	 
          <h3>
           <img id  = "progress_icon"
	        src = "images/loading.gif" 
		border = "0" /> 
                &nbsp; Please, wait, loading...
           </img>
           <label class = "label"
                  id    = "progress_message"
                  style = "text-align:left;">
           </label>
          </h3>
         </div>
     </fieldset>
   </div> 

   <!-- The right frame: the DQM controls -->   
   <div class = "dqmControls"
        id    = "dqmControls"
        style = "width:  30%   ; 
    	         height: 100%  ; 
                 float:  right ;">
      
    <!-- Following is the area of the client control buttons: -->
    <fieldset style = "background:#DDEFFF;">
     <legend id    = "theLegend"
    	     style = "background: #DDEFFF;
    		      font-family: Verdana, Arial;
    		      font-size:  12px;
    		      color:	  black;">
      &nbsp; Client Controls &nbsp; 
     </legend>
      <div class = "bloc"  
           id    = "bloc2_1" 
	   style = "background:#C093FF;">
       <div  id    = "dhtmlgoodies_tabView1" 
             style = "float:  right;
                      width:  300px;">
        <div class = "dhtmlgoodies_aTab">
         <div class = "bloc" 
              id    = "bloc2_2"
          <!-- These are the Summary Canvas buttons: -->
          <label id	 = "summary_canvas"
          	 style   = "margin-left:2%">
              Status Summary:
          </label>
           <!-- <input name	 = "PixelSummaryOverviewShow" 
          	 id	 = "pixel_summary_overview_show"
          	 class   = "controlButton"
          	 value   = "testing" 
          	 onClick = "IMGC.plotFromPath('Pixel/Barrel/Shell_mI/Layer_1/Ladder_01H/Module_1')"
          	 type	 = "submit">
          </input> -->
          <input name	 = "BarrelSummaryOverviewShow" 
          	 id	 = "barrel_summary_overview_show"
          	 class   = "controlButton"
          	 value   = "Barrel" 
          	 onClick = "IMGC.plotFromPath('Pixel/Barrel')"
          	 type	 = "submit">
          </input>
          <input name	 = "EndcapSummaryOverviewShow" 
          	 id	 = "endcap_summary_overview_show"
          	 class   = "controlButton"
          	 value   = "Endcap" 
          	 onClick = "IMGC.plotFromPath('Pixel/Endcap')"
          	 type	 = "submit">
          </input>
         </div>
        </div>
       
        <div class = "dhtmlgoodies_aTab">
         <div class = "bloc" 
              id    = "bloc2_3">
         <input name	= "listMECommand"
         	id	= "list_ME_command"
         	class	= "controlButton"
         	value	= "Get ME List"
         	onClick = "RequestHistos.RequestMEList('CB')"
         	type	= "submit">

         </input>
         <label id	= "MEList"
                class	= "label">
          ME list:
         </label>
         <select name	= "strucMEList"
                 class  = "selector"
                 id	= "monitoring_element_list">
         </select>
         <p/>
         <input name	 = "UpdateTrackerMap"
                id	 = "create_tkmap"
                class	 = "controlButton"
                value	 = "Create view"
                onClick  = "ClientActions.CreateTrackerMap()"
                type	 = "submit"
		disabled = "">
         </input>
         <label id	= "MEList"
                class	= "label">
          Refresh:
         </label>
         <select name	  = "refreshInterval"
                 class    = "selector"
                 id	  = "refreshInterval"
                 onchange = "SvgMap.changeRefreshInterval()">
            <option	     value = "10000" >10 sec</option>
            <option selected value = "30000" >30 sec</option>
            <option	     value = "60000" > 1 min</option>
            <option	     value = "120000"> 2 min</option>
         </select>
         <p />

         <label id	= "TrackerMapStyle"
                class	= "label">
          Color code:
         </label>
         <select name	  = "TKMapContentType"
                 class    = "selector"
                 id	  = "TKMapContentType"
                 onchange = "SvgMap.changeContentType()">
            <option selected value = "Averages" >Averages</option>
            <option	     value = "Alarms"	>Alarms  </option>
            <option	     value = "Entries"  >Entries </option>
         </select>
        </div> 
      </div>
        <div class = "dhtmlgoodies_aTab">
         <div class = "bloc" 
              id    = "bloc2_4"
          <!-- These are the expert action buttons: -->
          <input name	 = "subscribe"
           	 id	 = "subscribe_all"
           	 class   = "controlButton"
           	 value   = "Subscribe All"
           	 onClick = "ClientActions.SubscribeAll()"
           	 type	 = "submit">
          </input>
          <input name	 = "dump"
           	 id	 = "dump_modIds"
           	 class   = "controlButton"
           	 value   = "Dump IDs"
           	 onClick = "ClientActions.DumpModIds()"
           	 type	 = "submit">
          </input>
          <input name	 = "summary"
           	 id	 = "create_summary"
           	 class   = "controlButton"
           	 value   = "Update Summary"
           	 onClick = "ClientActions.CreateSummary()"
           	 type	 = "submit">
          </input>
          <input name	 = "QtestResult"
           	 id	 = "check_qtest_result"
           	 class   = "controlButton"
           	 value   = "Update QTests"
           	 onClick = "ClientActions.CheckQualityTestResults()"
           	 type	 = "submit">
          </input>
          <!-- <input name	 = "save"
           	 id	 = "save_to_file"
           	 class   = "controlButton"
           	 value   = "Save All"
           	 onClick = "ClientActions.SaveToFile()"
           	 type	 = "submit">
          </input> -->
         </div>
        </div>
     </fieldset>

     <!-- Following is the area to display the trees: -->
     <fieldset style = "background:#DDEFFF;">

      <label>Detector Trees</label>
      
      <div id = "dhtmlgoodies_tabView2" 
           style = "float:  right;
        	    width:  300px;">
       <div class = "dhtmlgoodies_aTab">
        <div class = "bloc" 
             id    = "bloc2_5">
         <div class = "bloc" 
              id    = "bloc2_5_1">
          <label id    = "structures"
                 style = "margin-left:1%">
           Sub-Detectors:
          </label>
          <select name  = "struc_name"
          	  id	= "structure_for_module"
          	  class = "selector">
             <option value = "Pixel" 							  > ALL PIXELS	               </option>
             <option value = "Pixel/Barrel"					  > Barrel        	       </option>
             <option value = "Pixel/Endcap"					  > Endcap        	       </option>
             <option value = "Pixel/Barrel/Shell_mI" 		SELECTED	  > Barrel/Shell_mI		   </option>
             <option value = "Pixel/Barrel/Shell_mO"				  > Barrel/Shell_mO		   </option>
             <option value = "Pixel/Barrel/Shell_pI"				  > Barrel/Shell_pI		   </option>
             <option value = "Pixel/Barrel/Shell_pO"				  > Barrel/Shell_pO		   </option>
             <option value = "Pixel/Endcap/HalfCylinder_mI"			  > Endcap/HalfCylinder_mI	   </option>
             <option value = "Pixel/Endcap/HalfCylinder_mO"			  > Endcap/HalfCylinder_mO	   </option>
             <option value = "Pixel/Endcap/HalfCylinder_pI"			  > Endcap/HalfCylinder_pI	   </option>
             <option value = "Pixel/Endcap/HalfCylinder_pO"			  > Endcap/HalfCylinder_pO	   </option>
             <option value = "Pixel/Endcap/HalfCylinder_pO/Disk_1/Blade_01/Panel_1"> Endcap/HalfCylinder_pO/Disk_1/Blade_01/Panel_1</option>
             <option value = "Pixel/Endcap/HalfCylinder_pO/Disk_2/Blade_01/Panel_1"> Endcap/HalfCylinder_pO/Disk_2/Blade_01/Panel_1</option>
          </select>
          <p />
          <input name	 = "listmodule"
          	 id	 = "list_module"
          	 class   = "controlButton"
          	 value   = "Get Tree"
          	 onClick = "javascript:RequestHistos.RequestModuleTree()"
          	 type	 = "submit">
          </input>
          <input name	 = "clearSingleModuleViewTree"
          	 id	 = "clearSingleModuleViewTree"
          	 class   = "controlButton"
          	 value   = "Clear selection"
          	 onClick = "javascript:IMGC.clearSelection()"
          	 type	 = "submit">
          </input>
         </div>
         <p />
         <div class = "bloc" 
              id    = "modtree_list" 
              style = "overflow:scroll;height:300px;width:100%;background:#FFF;">
         </div>
        </div>
       </div>
             
       <div class = "dhtmlgoodies_aTab">
        <div class = "bloc" 
             id	   = "bloc2_6">
         <div class = "bloc" 
              id    = "bloc2_6_1">
          <label id    = "structures"
                 class = "label">
           Sub-Detectors:
          </label>
           <select name  = "struc_name"
           	   id	 = "structure_name"
           	   class = "selector">
              <option value = "Pixel"	            				   > ALL PIXELS 		</option>
              <option value = "Pixel/Barrel" SELECTED				   > Barrel			</option>
              <option value = "Pixel/Endcap"         				   > Endcap			</option>
              <option value = "Pixel/Barrel/Shell_mI"> Barrel/Shell_mI</option>
              <option value = "Pixel/Barrel/Shell_mO"> Barrel/Shell_mO</option>
              <option value = "Pixel/Barrel/Shell_pI"> Barrel/Shell_pI</option>
              <option value = "Pixel/Barrel/Shell_pO"> Barrel/Shell_pO</option>
              <option value = "Pixel/Endcap/HalfCylinder_mI"> Endcap/HalfCylinder_mI</option>
              <option value = "Pixel/Endcap/HalfCylinder_mO"> Endcap/HalfCylinder_mO</option>
              <option value = "Pixel/Endcap/HalfCylinder_pI"> Endcap/HalfCylinder_pI</option>
              <option value = "Pixel/Endcap/HalfCylinder_pO"> Endcap/HalfCylinder_pO</option>
              <option value = "Pixel/Endcap/HalfCylinder_pO/Disk_1/Blade_01/Panel_1"> Endcap/HalfCylinder_pO/Disk_2</option>
           </select>
           <p />
           <input name    = "listsummary"
           	  id	  = "list_summary"
           	  class   = "controlButton"
           	  value   = "Get Tree"
           	  onClick = "RequestHistos.RequestSummaryHistoList()"
           	  type    = "submit">
           </input>
           <input name    = "clearSingleModuleViewTree"
           	  id	  = "clearSingleModuleViewTree"
           	  class   = "controlButton"
           	  value   = "Clear selection"
           	  onClick = "javascript:IMGC.clearSelection()"
           	  type    = "submit">
           </input>
         </div>
         <p />
         <div class = "bloc" 
              id    = "tree_list" 
              style = "overflow:scroll;height:300px;width:100%;background:#FFF;">
         </div>
        </div>
       </div>

       <div class = "dhtmlgoodies_aTab">
        <div class = "bloc" 
           id	 = "bloc2_7">
         <div class = "bloc" 
            id    = "bloc2_7_1">
          <label id    = "alarm_structures"
                 class = "label">
           Sub-Detectors:
          </label>
          <select name  = "struc_alarm"
          	  id	= "structure_for_alarm"
          	  class = "selector">
             <option value = "Pixel"> ALL PIXELS		  </option>
             <option value = "Pixel/Barrel" SELECTED> Barrel </option>
             <option value = "Pixel/Endcap"> Endcap	  </option>
          </select> 
          <p />
          <input name	 = "listalarm"
          	 id	 = "read_alarm"
          	 class   = "controlButton"
          	 value   = "Get Alarms"
          	 onClick = "RequestHistos.RequestAlarmList()"
          	 type	 = "submit">
          </input>
          <input name	 = "clearAlarmViewTree"
          	 id	 = "clearAlarmViewTree"
          	 class   = "controlButton"
          	 value   = "Clear selection"
          	 onClick = "javascript:IMGC.clearSelection()"
          	 type	 = "submit">
          </input>
         </div>
         <p />
         <div class = "bloc" 
              id    = "alarm_list" 
              style = "overflow:scroll;height:200px;width:100%;background:#FFF;">
         </div>
         <div class = "block" 
              id    = "status_area" 
              style = "overflow:scroll;height:100px;width:100%;background:#FFF8C9">
         </div>
      </div>
     </div>
    </fieldset>
   </div>
  </form>
  
  <script type="text/javascript">
   initTabs('dhtmlgoodies_tabView1', Array('Summary Slides','TrackerMaps','Expert Actions'), 0, '99.5%','100%');
   initTabs('dhtmlgoodies_tabView2', Array('Single Module View','Summary View','Alarm View'), 0, '99.5%','100%');
  </script>
  
 </body>
 
</html>
