next up previous contents
Next: `offline' calibrations Up: BRAHMS Database Time Validity Previous: `online' and `offline' calibrations

`online' calibrations

Let's consider the `online' calibrations first. Figure 1 shows three different consecutive calibrations ( cal1, cal2, cal3) stored at time ( $t_1, t_2, t_3, \ldots$). The validity intervals are well defined. Between t1 and t2 cal1 is valid, between t2 and t3 cal2 is valid and from t3 to infinity, cal3is valid, until superceeded by cal4 stored at a later time t4.


  
Figure 1: `Online' calibrations
\begin{figure}\epsfig{file=KObratdb1.eps,width=\textwidth}\iffalse
\begin{tex2ht...
...------------> time
t1 t2 t3\end{verbatim}\end{tex2html_preform}\fi
\end{figure}

Let's take a look at calibrations retrieval.

We have already decided that the getData() function will specify a time interval $[t_{start}\ldots t_{end}]$ and the database will return the calibrations that are valid inside this interval and that the application can safely use them without further validity checks or getData() calls. tstart and tend might correspond to the run start and end times or to the times of the first and last events in a data file.

Examples are in order (see Figure 2).

  
Figure 2: Querieng `online' calibrations
\begin{figure}\epsfig{file=KObratdb2.eps,width=\textwidth}\iffalse
\begin{tex2ht...
...eturns an error
tstart tend\end{verbatim}\end{tex2html_preform}\fi
\end{figure}

query1 and query2 return the obvious results.

query3 is more interesting because it happens to overlap two validity intervals. What should such a query return? It cannot return cal1 because it is not valid in the interval [t2..tend], it cannot return cal2 because it is not valid in the interval [tstart..t2]. Therefore it should return an error because it cannot return any data. I would call this case a bad query because obviously there is nothing wrong with the data in the database and yet the query cannot return any data.

This example shows that even the simplest validity interval scheme has to deal with bad queries.


next up previous contents
Next: `offline' calibrations Up: BRAHMS Database Time Validity Previous: `online' and `offline' calibrations
Christian Holm Christensen
2000-05-15