%@ LANGUAGE="VBScript" %> <% if request("run")<>"" then run=cint(Request("run")) else run=6300 end if ' ' Open Database ' Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd statement="select to_char(sysdate,'YYYY/MM/DD HH24:MI') repdate, to_char(run_date,'YYYY/MM/DD HH24:MI') time from phoffline.runs where run between "& run&" and "& run+1 'response.write(statement) set RS1=connection.Execute(statement) dim j, logdate1(2) j=0 logdate1(1)=null do while not RS1.EOF logdate1(j)=cstr(RS1("time")) repdate=cstr(RS1("repdate")) j=j+1 RS1.movenext Loop 'if run is current then take the end time to be the current time If isnull(logdate1(1)) then logdate1(1)=repdate end if set RS1=nothing 'response.write(logdate1(0)&","& logdate1(1)) SQLt="select to_char(logdate,'MM/DD/YY HH24:MI') logtime, " SQLt=SQLt &"nvl(to_char(BEAM_ENERGY_BL,'999.00'),'N/A') energyblue, " SQLt=SQLt &"nvl(to_char(BUNCH_LENGTH_BL,'990.0'),'N/A') lengthblue," SQLt=SQLt &"to_char(CURRENT_BL,'9990.0') currentblue," SQLt=SQLt &" nvl(to_char(FILL_START_BL,'HH24:MI'),'N/A') startblue," SQLt=SQLt &"nvl(to_char(GAMMA_BL,'999.00'),'N/A') gammablue," SQLt=SQLt &"LIFETIME_BL lifetimeblue," SQLt=SQLt &"nvl(to_char(LUMI_START_BL,'HH24:MI'),'N/A') lumiblue," SQLt=SQLt &"nvl(to_char( MOM_SPREAD_BL),'N/A') momblue, " SQLt=SQLt &"nvl(RING_STATE_BL,'N/A') stateblue," SQLt=SQLt &"nvl(to_char(BEAM_ENERGY_YL,'999.00'),'N/A') energyyellow, " SQLt=SQLt &"nvl(to_char(BUNCH_LENGTH_YL,'990.0'),'N/A') lengthyellow," SQLt=SQLt &"to_char(CURRENT_YL,'9990.0') currentyellow, " SQLt=SQLt &"nvl(to_char(FILL_START_YL,'HH24:MI'),'N/A') startyellow," SQLt=SQLt &"nvl(to_char(GAMMA_YL,'999.00'),'N/A') gammayellow, " SQLt=SQLt &"LIFETIME_YL lifetimeyellow," SQLt=SQLt &"nvl(to_char(LUMI_START_YL,'HH24:MI'),'N/A') lumiyellow," SQLt=SQLt &"nvl(to_char(MOM_SPREAD_YL),'N/A') momyellow, " SQLt=SQLt &"nvl(RING_STATE_YL,'N/A') stateyellow " SQLt=SQLt &"from phoffline.rhic_parameters " SQLt=SQLt &"where logdate> to_date('"&logdate1(0)&"', 'YYYY-MM-DD HH24:MI') and logdate <" SQLt=SQLt &"to_date('"&logdate1(1)&"', 'YYYY-MM-DD HH24:MI')" 'response.write(SQLt) set RS=connection.Execute(SQLt) %>
1.Beam Energy | 2.Lifetime | 3.Ring State | 4.Bunch Length | 5.RHIC Current (10^9 ions/sec) |
6.Fill Start | 7.Gamma | 8.Luminosity@start | 9.MOM Spread |
Time | BLUE Ring | YELLOW Ring | ||||||||||||||||
" & Vbcrlf) for i=0 to 8 response.write(" | " &i+1&" | " & Vbcrlf) next for i=0 to 8 response.write("" &i+1&" | " & Vbcrlf) next response.write("||||||||||||||||
"& logtime &" | " & Vbcrlf) for i=0 to 8 resultsbl(i)=cstr(RS(my1array(i))) response.write(""& resultsbl(i)&" | " & Vbcrlf) next for i=0 to 8 resultsyl(i)=cstr(RS(my2array(i))) response.write(""& resultsyl(i)&" | " & Vbcrlf) next response.write("
<% Connection.Close Set RS=nothing Set Connection=nothing %>