<%@ LANGUAGE="VBScript" %> <% If Not IsEmpty(request.form("Close")) Then %> <% End If timedate=Request("timedate") 'Response.Expires=0 Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If timedate="" Or IsEmpty(request.form("Selected_Time")) Then SQLStmt = " select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') timedate from dual " Set RS = Connection.Execute(SQLStmt) timedate = CStr(RS("timedate")) Set RS=nothing End If If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> Detector Systems Status

Nominal Detector System Status

               

<% SQLStmt = " select max(lchange) lchange,max(operator) operator,min(operator) operator2,max(text) text, " SQLStmt = SQLStmt & " max(detsystem) detsystem,max(stat) stat,max(description) description,max(display) display,max(dorder) dorder " SQLStmt = SQLStmt & " from (select to_char(ds.startdate,'MM/DD/YYYY HH24:MI:SS') lchange,lo.operator,lc.text, " SQLStmt = SQLStmt & " ds.detsystem,ds.stat,d.description, d.display ,d.dorder from " SQLStmt = SQLStmt & " phoffline.log_entries le,phoffline.detsystems_status ds, " SQLStmt = SQLStmt & " phoffline.detsystems d, " SQLStmt = SQLStmt & " phoffline.log_operators lo,phoffline.log_comments lc, " SQLStmt = SQLStmt & " (select max(ds.startdate) startdate,max(ds.detsystem) detsystem " SQLStmt = SQLStmt & " from phoffline.detsystems_status ds " SQLStmt = SQLStmt & " where to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')>ds.startdate " SQLStmt = SQLStmt & " group by ds.detsystem) dsl " SQLStmt = SQLStmt & " where dsl.startdate=ds.startdate and dsl.detsystem=ds.detsystem " SQLStmt = SQLStmt & " and ds.detsystem=d.detsystem and le.logid=ds.logid " SQLStmt = SQLStmt & " and le.logid=lo.logid(+) and le.logid=lc.logid(+) ) " SQLStmt = SQLStmt & " group by detsystem " SQLStmt = SQLStmt & " order by dorder " ' This prints out the SQL statement ' response.write(SQLStmt & "
" ) ' Set RS = Connection.Execute(SQLStmt) DisplayIndex=0 StatusIndex=1 LastChangeIndex=2 LastOperatorIndex=3 DetSystemIndex=4 DescriptionIndex=5 Dim Si_LV(6,50) 'Low voltage Dim Si_BV(6,50) 'Bias voltage Dim Si_CLDA(6,50) 'Cooling and Dry Air Dim ZDC_HV(6,50) 'ZDC High voltage Dim PL_HV(6,50) 'Plastic High voltage Dim Mag_BLM(6,50) 'Magnet and BLM monitors ' Trigger and CR image filename determined by state of system, default is off, Dim TRCR_IMAGE(5) TRCR_IMAGE(0)="TRIG" TRCR_IMAGE(1)="OFF" TRCR_IMAGE(2)="_CR" TRCR_IMAGE(3)="OFF" TRCR_IMAGE(4)=".jpg" ' TOF image filename determined by state of system, default is off, Dim TOF_IMAGE(3) TOF_IMAGE(0)="TOF" TOF_IMAGE(1)="OFF" TOF_IMAGE(2)=".jpg" Si_LV_index=0 Si_BV_index=0 Si_CLDA_index=0 ZDC_HV_index=0 PL_HV_index=0 Mag_BLM_index=0 ' Loop over the entries from the db, and fill the appropriate arrays, to be used for ' displaying status If (Not RS.Eof) Then Do While (Not RS.Eof) If (Not IsNull(RS("detsystem"))) Then detsystem=CStr(RS("detsystem")) Else detsystem="Unknown" End If If (Not IsNull(RS("display"))) Then display=CStr(RS("display")) Else display="Unknown" End If If (Not IsNull(RS("stat"))) Then status=CStr(RS("stat")) Else status="Unknown" End If If (Not IsNull(RS("operator"))) Then lastoperator=CStr(RS("operator")) Else lastoperator="Unknown" End If If (Not IsNull(RS("lchange"))) Then lastchange=CStr(RS("lchange")) Else lastchange="Unknown" End If If (Not IsNull(RS("text"))) Then text=CStr(RS("text")) Else text="Unknown" End If If (Not IsNull(RS("description"))) Then description=CStr(RS("description")) Else description="Unknown" End If If (InStr(1,detsystem,"SI")>0) Then If (InStr(1,detsystem,"LV")>0) Then Si_LV(DisplayIndex,Si_LV_index)=display Si_LV(StatusIndex,Si_LV_index)=status Si_LV(LastChangeIndex,Si_LV_index)=lastchange Si_LV(LastOperatorIndex,Si_LV_index)=lastoperator Si_LV(DetSystemIndex,Si_LV_index)=detsystem Si_LV(DescriptionIndex,Si_LV_index)=description Si_LV_index=Si_LV_index+1 End If If (InStr(1,detsystem,"BV")>0) Then Si_BV(DisplayIndex,Si_BV_index)=display Si_BV(StatusIndex,Si_BV_index)=status Si_BV(LastChangeIndex,Si_BV_index)=lastchange Si_BV(LastOperatorIndex,Si_BV_index)=lastoperator Si_BV(DetSystemIndex,Si_BV_index)=detsystem Si_BV(DescriptionIndex,Si_BV_index)=description Si_BV_index=Si_BV_index+1 End If If ((InStr(1,detsystem,"CL")>0) Or (InStr(1,detsystem,"DA")>0)) Then Si_CLDA(DisplayIndex,Si_CLDA_index)=display Si_CLDA(StatusIndex,Si_CLDA_index)=status Si_CLDA(LastChangeIndex,Si_CLDA_index)=lastchange Si_CLDA(LastOperatorIndex,Si_CLDA_index)=lastoperator Si_CLDA(DetSystemIndex,Si_CLDA_index)=detsystem Si_CLDA(DescriptionIndex,Si_CLDA_index)=description Si_CLDA_index=Si_CLDA_index+1 End If End If If ((InStr(1,detsystem,"BLM")>0) Or (InStr(1,detsystem,"MAG")>0)) Then Mag_BLM(DisplayIndex,Mag_BLM_index)=display Mag_BLM(StatusIndex,Mag_BLM_index)=status Mag_BLM(LastChangeIndex,Mag_BLM_index)=lastchange Mag_BLM(LastOperatorIndex,Mag_BLM_index)=lastoperator Mag_BLM(DetSystemIndex,Mag_BLM_index)=detsystem Mag_BLM(DescriptionIndex,Mag_BLM_index)=description Mag_BLM_index=Mag_BLM_index+1 End If If (InStr(1,detsystem,"ZCAL")>0) Then ZDC_HV(DisplayIndex,ZDC_HV_index)=display ZDC_HV(StatusIndex,ZDC_HV_index)=status ZDC_HV(LastChangeIndex,ZDC_HV_index)=lastchange ZDC_HV(LastOperatorIndex,ZDC_HV_index)=lastoperator ZDC_HV(DetSystemIndex,ZDC_HV_index)=detsystem ZDC_HV(DescriptionIndex,ZDC_HV_index)=description ZDC_HV_index=ZDC_HV_index+1 End If If (InStr(1,detsystem,"PL")>0) Then PL_HV(DisplayIndex,PL_HV_index)=display PL_HV(StatusIndex,PL_HV_index)=status PL_HV(LastChangeIndex,PL_HV_index)=lastchange PL_HV(LastOperatorIndex,PL_HV_index)=lastoperator PL_HV(DetSystemIndex,PL_HV_index)=detsystem PL_HV(DescriptionIndex,PL_HV_index)=description PL_HV_index=PL_HV_index+1 ' To make gif filename for HV if (InStr(1,detsystem,"TOF")>0) Then TOF_IMAGE(1)=status elseif (InStr(1,detsystem,"TRIG")>0) Then TRCR_IMAGE(1)=status elseif (InStr(1,detsystem,"CR")>0) Then TRCR_IMAGE(3)=status elseif (InStr(1,detsystem,"BAF")>0) Then 'Do nothing as BaF does not have a gif file associated with it 'response.write("just checking
") elseif (InStr(1,detsystem,"T0")>0) Then 'Do nothing as BaF does not have a gif file associated with it 'response.write("just checking
") else response.write(detsystem & " " & display & " " & status & " " & "
") response.write(" Error : This is not part of the expected plastic format, contact Nigel immedately
") End if End If 'response.write("detsystem " & detsystem & " display=" & display & " status=" & status ) 'response.write(" lastchange=" & lastchange & " loperator=" & lastoperator & "
") 'response.write(" description=" & description & " text=" & text & "
") Rem lchange,lo.operator,lc.text,ds.detsystem,ds.stat,d.description, d.display ,d.dorder RS.MoveNext Loop End If %>
<% ' RowIndex=0 For RowIndex=0 To 1 ' Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#7BC618" Else color="#FF0000" End If %> <% if (RowIndex=0) Then detsystem_par=Si_LV(DetSystemIndex,ColumnIndex) lop_par=Replace(Si_LV(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(Si_LV(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(Si_LV(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(Si_LV(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(Si_LV(DescriptionIndex,ColumnIndex)," ","_") %> <%Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% Next ' RowIndex=RowIndex+1 ' Loop %>
Silicon FEC Power Supplies
<%=Si_LV(RowIndex,ColumnIndex)%> <%=Si_LV(RowIndex,ColumnIndex)%>
<% RowIndex=0 Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#7BC618" Else color="#FF0000" End If %> <% if (RowIndex=0) Then detsystem_par=Si_BV(DetSystemIndex,ColumnIndex) lop_par=Replace(Si_BV(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(Si_BV(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(Si_BV(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(Si_BV(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(Si_BV(DescriptionIndex,ColumnIndex)," ","_") %> <%Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% RowIndex=RowIndex+1 Loop %>
Silicon Bias Power Supplies
<%=Si_BV(RowIndex,ColumnIndex)%> <%=Si_BV(RowIndex,ColumnIndex)%>
<% RowIndex=0 Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#7BC618" Else color="#FF0000" End If %> <% if (RowIndex=0) Then detsystem_par=Si_CLDA(DetSystemIndex,ColumnIndex) lop_par=Replace(Si_CLDA(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(Si_CLDA(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(Si_CLDA(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(Si_CLDA(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(Si_CLDA(DescriptionIndex,ColumnIndex)," ","_") %> <%Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% RowIndex=RowIndex+1 Loop %>
Silicon Cooling and Dry Air
<%=Si_CLDA(RowIndex,ColumnIndex)%> <%=Si_CLDA(RowIndex,ColumnIndex)%>
<% RowIndex=0 Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#FF0000" Else color="#7BC618" End If %> <% if (RowIndex=0) Then detsystem_par=Mag_BLM(DetSystemIndex,ColumnIndex) lop_par=Replace(Mag_BLM(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(Mag_BLM(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(Mag_BLM(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(Mag_BLM(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(Mag_BLM(DescriptionIndex,ColumnIndex)," ","_") %> <%Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% RowIndex=RowIndex+1 Loop %>
Magnet and BLMs
<%=Mag_BLM(RowIndex,ColumnIndex)%> <%=Mag_BLM(RowIndex,ColumnIndex)%>
<% RowIndex=0 Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#7BC618" Else color="#FF0000" End If %> <% if (RowIndex=0) Then detsystem_par=ZDC_HV(DetSystemIndex,ColumnIndex) lop_par=Replace(ZDC_HV(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(ZDC_HV(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(ZDC_HV(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(ZDC_HV(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(ZDC_HV(DescriptionIndex,ColumnIndex)," ","_") %> <%Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% RowIndex=RowIndex+1 Loop %>
Zero Degree Calorimeter High Voltage
<%=ZDC_HV(RowIndex,ColumnIndex)%> <%=ZDC_HV(RowIndex,ColumnIndex)%>
<% RowIndex=0 Do while RowIndex<2 %> <% ColumnIndex=0 Do while ColumnIndex0) Then color="#7BC618" Else color="#FF0000" End If %> <% if (RowIndex=0) Then detsystem_par=PL_HV(DetSystemIndex,ColumnIndex) lop_par=Replace(PL_HV(LastOperatorIndex,ColumnIndex)," ","%20") timedate_par=Replace(timedate," ","%20") status_par=Replace(PL_HV(StatusIndex,ColumnIndex)," ","%20") lchange_par=Replace(PL_HV(LastChangeIndex,ColumnIndex)," ","%20") description_par=Replace(PL_HV(DescriptionIndex,ColumnIndex)," ","%20") description=Replace(PL_HV(DescriptionIndex,ColumnIndex)," ","_") %> <% Else%> <%End If%> <% ColumnIndex=ColumnIndex+1 Loop %> <% RowIndex=RowIndex+1 Loop %> <% TOFPictureHeight=300 TOFPictureWidth=300 TRCRPictureHeight=300 TRCRPictureWidth=200 ' For some odd reason join puts spaces in? tempname=join(TOF_IMAGE) TOFPictureFileName=replace(tempname," ","") TOFPictureFileName="../../Counting_House/Documentation/ToF/" & TOFPictureFileName ' For some odd reason join puts spaces in? tempname=join(TRCR_IMAGE) TRCRPictureFileName=replace(tempname," ","") TRCRPictureFileName="../../Counting_House/Documentation/Trigger/" & TRCRPictureFileName %>
Plastic High Voltage
<%=PL_HV(RowIndex,ColumnIndex)%> <%=PL_HV(RowIndex,ColumnIndex)%>
<% Connection.Close %>