| Seq |
Start |
Duration |
Avg. Rate |
Events |
File |
Size |
Checksum |
Status
|
| |
|
[Min] |
[Hz] |
|
|
[GB] |
|
<%
If registered=1 then
response.write("Change Run")
else
response.write(" ")
end if
%>
|
<%
'
' Get information about sequences, move through two recordsets, this is to simplify sql
'
nseq_s=0
nseq_e=0
nseq_n=0
total=0
Do While ((Not RS_seq_action.EoF) And (Not RS_seq.EoF))
sequence=CInt(RS_seq_action("sequence"))
action=CStr(RS_seq_action("action"))
ldate=CStr(RS_seq_action("ldate"))
ldatef=CStr(RS_seq_action("ldatef"))
If Not RS_Seq.EoF Then
if not isnull(RS_seq("stat")) then
stat=cint(RS_seq("stat"))
else
stat="N/A"
end if
If CInt(RS_seq_action("sequence"))<>CInt(RS_Seq("sequence")) Then
Response.write("Inconsistent sequence numbers
")
End If
Else
Response.write("Error: End Of file on sequence tables !
")
End If
If (action="START_SEQ") Then
If Not IsNull(RS_Seq("name")) Then
fname=CStr(RS_Seq("dir")) & "/" & CStr(RS_Seq("name"))
Else
fname="N/A"
End If
nseq_s=nseq_s+1
Response.Write("" & VbCrLf)
' Response.Write("| " & CStr(sequence) & " | " & VbCrLf)
Response.Write("")
Response.Write(" ")
Response.Write(CStr(sequence) & "")
Response.Write(" | " & VbCrLf)
Response.Write("" & ldate & " | " & VbCrLf)
sdate=ldate
sdatef=ldatef
Elseif (action="END_SEQ") Then
nseq_e=nseq_e+1
If Not IsNull(RS_seq("nevents")) Then
nevents=CLng(RS_seq("nevents"))
If Not IsNull(RS_seq("fsize")) Then
fsize=CStr(Round(CDbl(RS_seq("fsize")),2))
Else
fsize="N/A"
End If
If Not IsNull(RS_seq("checksum")) Then
checksum=CStr(RS_seq("checksum"))
Else
checksum="N/A"
End If
Else
nevents=0
End If
duration=DateDiff("s",sdatef,ldatef)
If duration<>0 Then
rate=nevents/duration
Else
rate=0
End If
total=total+nevents
Response.Write("" & CStr(Round(duration/60,1)) & " | " & VbCrLf)
Response.Write("" & CStr(Round(rate,1)) & " | " & VbCrLf)
Response.Write("" & CStr(nevents) & " | " & VbCrLf)
Response.Write("" & fname & " | " & VbCrLf)
Response.Write("" & fsize & " | " & VbCrLf)
Response.Write("" & checksum & " | " & VbCrLf)
If registered=1 then
response.write(""&stat&" | ")
else
response.write(""&stat&" | ")
end if
Response.Write("
" & VbCrLf)
Elseif (action="NEW_RUN_SEQUENCE") Then ' This is purely for last year's runs
If nseq_n=0 Then
Response.Write("" & VbCrLf)
Response.Write("| 0 | " & VbCrLf)
Response.Write("" & sdate & " | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("
" & VbCrLf)
End If
nseq_n=nseq_n+1
Response.Write("" & VbCrLf)
Response.Write("| " & CStr(sequence) & " | " & VbCrLf)
Response.Write("" & ldate & " | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
Response.Write("N/A | " & VbCrLf)
If registered=1 then
response.write(""&stat&" | ")
else
response.write(""&stat&" | ")
end if
Response.Write("
" & VbCrLf)
End If
RS_seq_action.MoveNext
If Not RS_seq_action.EoF Then
If CInt(RS_seq_action("sequence"))<>sequence Then
RS_seq.MoveNext
End If
End If
Loop
If (nseq_s>nseq_e) Then ' run still in progress ?
If inprogress Then
Response.Write("In Progress | " & VbCrLf)
Else
Response.Write("DAQ crashed | " & VbCrLf)
End If
Response.Write("" & fname & " | " & VbCrLf)
Response.Write(" | " & VbCrLf)
Response.Write("" & VbCrLf)
End If
%>