\hypertarget{GRB_8h}{
\section{GRB.h File Reference}
\label{GRB_8h}\index{GRB.h@{GRB.h}}
}
Gamma Ray Burst Analysis Code Defines the interface to and data structures containing the parameters used in processing and generating gamma ray burst alerts. 

{\tt \#include \char`\"{}PBS/WCT.h\char`\"{}}\par


Include dependency graph for GRB.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{GRB_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=99pt]{GRB_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__GRB__alertMsg}{\_\-GRB\_\-alert\-Msg}
\begin{CompactList}\small\item\em Structure containing a GRB alert message. \item\end{CompactList}\item 
struct \hyperlink{struct__GRB__GbmCalc}{\_\-GRB\_\-Gbm\-Calc}
\begin{CompactList}\small\item\em Structure containing a GBM Calc Info message. \item\end{CompactList}\item 
struct \hyperlink{struct__GRB__GbmRpt}{\_\-GRB\_\-Gbm\-Rpt}
\begin{CompactList}\small\item\em Structure containing a GBM Repoint message. \item\end{CompactList}\item 
struct \hyperlink{struct__GRB__GbmClose}{\_\-GRB\_\-Gbm\-Close}
\begin{CompactList}\small\item\em Structure containing a GBM Close message. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{GRB_8h_a0}{
typedef enum \hyperlink{GRB_8h_a30}{\_\-GRBSim\_\-Modes} \hyperlink{GRB_8h_a0}{GRBSim\_\-Modes}}
\label{GRB_8h_a0}

\begin{CompactList}\small\item\em Typedef for enum {\em \_\-GRBSim\_\-Modes\/}. \item\end{CompactList}\item 
typedef void($\ast$ \hyperlink{GRB_8h_a1}{GRB\_\-suspect\-Cb} )(\hyperlink{struct__GRB__alertMsg}{GRB\_\-alert\-Msg} $\ast$alert)
\begin{CompactList}\small\item\em Signature for a GRB Suspect Alert callback routine. \item\end{CompactList}\item 
typedef void($\ast$ \hyperlink{GRB_8h_a2}{GRB\_\-update\-Cb} )(\hyperlink{struct__GRB__alertMsg}{GRB\_\-alert\-Msg} $\ast$alert)
\begin{CompactList}\small\item\em Signature for a GRB Update Alert callback routine. \item\end{CompactList}\item 
typedef void($\ast$ \hyperlink{GRB_8h_a3}{GRB\_\-confirm\-Cb} )(\hyperlink{struct__GRB__alertMsg}{GRB\_\-alert\-Msg} $\ast$alert, unsigned int dur)
\begin{CompactList}\small\item\em Signature for a GRB Confirm Alert callback routine. \item\end{CompactList}\item 
typedef void($\ast$ \hyperlink{GRB_8h_a4}{GRB\_\-closeout\-Cb} )(\hyperlink{struct__GRB__alertMsg}{GRB\_\-alert\-Msg} $\ast$alert)
\begin{CompactList}\small\item\em Signature for a GRB Closeout Alert callback routine. \item\end{CompactList}\item 
typedef unsigned int($\ast$ \hyperlink{GRB_8h_a5}{GRB\_\-att\-Xform\-JCb} )(const WCT\_\-time t, const double $\ast$Vl, double $\ast$Vj)
\begin{CompactList}\small\item\em Signature for a GRB attitude J2000 transformation routine Transforms LAT cartesian vector to J2000. \item\end{CompactList}\item 
typedef unsigned int($\ast$ \hyperlink{GRB_8h_a6}{GRB\_\-att\-Xform\-SCb} )(const double $\ast$Vc, double $\ast$Vs)
\begin{CompactList}\small\item\em Signature for a GRB attitude spherical transformation routine Transforms J2000 vector to RA,DEC spherical coordinates. \item\end{CompactList}\item 
typedef WCT\_\-time($\ast$ \hyperlink{GRB_8h_a7}{GRB\_\-time\-Lookup\-Cb} )(unsigned int gem\_\-strobe, unsigned int gem\_\-clk)
\begin{CompactList}\small\item\em Signature for a GRB time lookup routine. \item\end{CompactList}\item 
typedef \hyperlink{struct__GRB__alertMsg}{\_\-GRB\_\-alert\-Msg} \hyperlink{GRB_8h_a8}{GRB\_\-alert\-Msg}
\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__GRB__alertMsg}{\_\-GRB\_\-alert\-Msg}. \item\end{CompactList}\item 
typedef \hyperlink{struct__GRB__GbmCalc}{\_\-GRB\_\-Gbm\-Calc} \hyperlink{GRB_8h_a9}{GRB\_\-Gbm\-Calc}
\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__GRB__GbmCalc}{\_\-GRB\_\-Gbm\-Calc}. \item\end{CompactList}\item 
typedef \hyperlink{struct__GRB__GbmRpt}{\_\-GRB\_\-Gbm\-Rpt} \hyperlink{GRB_8h_a10}{GRB\_\-Gbm\-Rpt}
\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__GRB__GbmRpt}{\_\-GRB\_\-Gbm\-Rpt}. \item\end{CompactList}\item 
typedef \hyperlink{struct__GRB__GbmClose}{\_\-GRB\_\-Gbm\-Close} \hyperlink{GRB_8h_a11}{GRB\_\-Gbm\-Close}
\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__GRB__GbmClose}{\_\-GRB\_\-Gbm\-Close}. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{GRB_8h_a30}{\_\-GRBSim\_\-Modes} \{ \par
\hyperlink{GRB_8h_a30a12}{GRBSIM\_\-MODE\_\-DISABLE} =  0, 
\par
\hyperlink{GRB_8h_a30a13}{GRBSIM\_\-MODE\_\-FULL} =  1, 
\par
\hyperlink{GRB_8h_a30a14}{GRBSIM\_\-MODE\_\-SUSPECT} =  2, 
\par
\hyperlink{GRB_8h_a30a15}{GRBSIM\_\-MODE3} =  3, 
\par
\hyperlink{GRB_8h_a30a16}{GRBSIM\_\-MODE4} =  4, 
\par
\hyperlink{GRB_8h_a30a17}{GRBSIM\_\-MODE5} =  5
 \}
\begin{CompactList}\small\item\em LPA GRB Algorithm Simulation Modes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{GRB_8h_a18}{GRB\_\-sizeof\-Alg\-Ctl} (void)
\begin{CompactList}\small\item\em Returns the size of a algorithm control block. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a19}{GRB\_\-init\-Alg\-Ctl} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl)
\begin{CompactList}\small\item\em Initializes an algorithm control block. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a20}{GRB\_\-register\-Cbs} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, \hyperlink{GRB_8h_a1}{GRB\_\-suspect\-Cb} suspect, \hyperlink{GRB_8h_a2}{GRB\_\-update\-Cb} update, \hyperlink{GRB_8h_a3}{GRB\_\-confirm\-Cb} confirm, \hyperlink{GRB_8h_a4}{GRB\_\-closeout\-Cb} closeout, \hyperlink{GRB_8h_a5}{GRB\_\-att\-Xform\-JCb} xformj, \hyperlink{GRB_8h_a6}{GRB\_\-att\-Xform\-SCb} xforms, \hyperlink{GRB_8h_a7}{GRB\_\-time\-Lookup\-Cb} lktime)
\begin{CompactList}\small\item\em Registers the posting routines for alert messaging. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a21}{GRB\_\-handle\-Events} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, void $\ast$dat, unsigned int size, unsigned int prm)
\begin{CompactList}\small\item\em Processes GRB event summaries from the GRB filter. This is a counting simulation and transitions between detection states based on summary counters. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a22}{GRB\_\-handle\-Gbm\-Int} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl)
\begin{CompactList}\small\item\em Handle the GBM Interrupt. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a23}{GRB\_\-handle\-Gbm\-Calc} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, \hyperlink{struct__GRB__GbmCalc}{GRB\_\-Gbm\-Calc} $\ast$dat)
\begin{CompactList}\small\item\em Handle the GBM Calc Info command. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a24}{GRB\_\-handle\-Gbm\-Rpt} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, \hyperlink{struct__GRB__GbmRpt}{GRB\_\-Gbm\-Rpt} $\ast$dat)
\begin{CompactList}\small\item\em Handle the GBM Repoint command. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a25}{GRB\_\-handle\-Gbm\-Close} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, \hyperlink{struct__GRB__GbmClose}{GRB\_\-Gbm\-Close} $\ast$dat)
\begin{CompactList}\small\item\em Handle the GBM Closeout command. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a26}{GRB\_\-reset} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl)
\begin{CompactList}\small\item\em Reset the GRB algorithm control block. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a27}{GRB\_\-load\-Db\-Siu} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, unsigned int fid, unsigned int instance)
\begin{CompactList}\small\item\em Loads the GRB\_\-DB. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a28}{GRB\_\-sim\-Config} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl, unsigned int mode, unsigned int repoint, unsigned int interval)
\begin{CompactList}\small\item\em Configure for a simulated GRB detection. \item\end{CompactList}\item 
int \hyperlink{GRB_8h_a29}{GRB\_\-sim\-Detect} (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ctl)
\begin{CompactList}\small\item\em Simulate a GRB detection. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Gamma Ray Burst Analysis Code Defines the interface to and data structures containing the parameters used in processing and generating gamma ray burst alerts. 

\begin{Desc}
\item[Author:]Sergio Maldonado - \href{mailto:smaldona@slac.stanford.edu}{\tt smaldona@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}    CVS $Id: GRB.h,v 1.3 2007/03/15 17:00:56 smaldona Exp $
\end{verbatim}
\normalsize


\subsection{Typedef Documentation}
\hypertarget{GRB_8h_a8}{
\index{GRB.h@{GRB.h}!GRB_alertMsg@{GRB\_\-alertMsg}}
\index{GRB_alertMsg@{GRB\_\-alertMsg}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-alertMsg]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__GRB__alertMsg}{GRB\_\-alert\-Msg}}}
\label{GRB_8h_a8}


Typedef for struct \hyperlink{struct__GRB__alertMsg}{\_\-GRB\_\-alert\-Msg}. 

\begin{Desc}
\item[]This structure describes the content of a GRB alert message.\end{Desc}
\hypertarget{GRB_8h_a5}{
\index{GRB.h@{GRB.h}!GRB_attXformJCb@{GRB\_\-attXformJCb}}
\index{GRB_attXformJCb@{GRB\_\-attXformJCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-attXformJCb]{\setlength{\rightskip}{0pt plus 5cm}unsigned int($\ast$ \hyperlink{GRB_8h_a5}{GRB\_\-att\-Xform\-JCb})(const WCT\_\-time t, const double $\ast$Vl, double $\ast$Vj)}}
\label{GRB_8h_a5}


Signature for a GRB attitude J2000 transformation routine Transforms LAT cartesian vector to J2000. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]The timestamp for the attitude information. \item[{\em Vl}]Input vector in LAT coordinates. \par
 Vl\mbox{[}0\mbox{]} = x \par
 Vl\mbox{[}1\mbox{]} = y \par
 Vl\mbox{[}2\mbox{]} = z \par
\item[{\em Vj}]Output vector in J2000 coordinates. \par
 Vj\mbox{[}0\mbox{]} = x \par
 Vj\mbox{[}1\mbox{]} = y \par
 Vj\mbox{[}2\mbox{]} = z \par
\end{description}
\end{Desc}
\hypertarget{GRB_8h_a6}{
\index{GRB.h@{GRB.h}!GRB_attXformSCb@{GRB\_\-attXformSCb}}
\index{GRB_attXformSCb@{GRB\_\-attXformSCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-attXformSCb]{\setlength{\rightskip}{0pt plus 5cm}unsigned int($\ast$ \hyperlink{GRB_8h_a6}{GRB\_\-att\-Xform\-SCb})(const double $\ast$Vc, double $\ast$Vs)}}
\label{GRB_8h_a6}


Signature for a GRB attitude spherical transformation routine Transforms J2000 vector to RA,DEC spherical coordinates. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em Vc}]The input vector in cartisian coordinates. \par
 Vc\mbox{[}0\mbox{]} = x \par
 Vc\mbox{[}1\mbox{]} = y \par
 Vc\mbox{[}2\mbox{]} = z \par
\item[{\em Vs}]The output vector in spherical coordinates. \par
 Vs\mbox{[}0\mbox{]} = ra \par
 Vs\mbox{[}1\mbox{]} = dec \par
\end{description}
\end{Desc}
\hypertarget{GRB_8h_a4}{
\index{GRB.h@{GRB.h}!GRB_closeoutCb@{GRB\_\-closeoutCb}}
\index{GRB_closeoutCb@{GRB\_\-closeoutCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-closeoutCb]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ \hyperlink{GRB_8h_a4}{GRB\_\-closeout\-Cb})(GRB\_\-Alert $\ast$alert)}}
\label{GRB_8h_a4}


Signature for a GRB Closeout Alert callback routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em alert}]The alert message\end{description}
\end{Desc}
\hypertarget{GRB_8h_a3}{
\index{GRB.h@{GRB.h}!GRB_confirmCb@{GRB\_\-confirmCb}}
\index{GRB_confirmCb@{GRB\_\-confirmCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-confirmCb]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ \hyperlink{GRB_8h_a3}{GRB\_\-confirm\-Cb})(GRB\_\-Alert $\ast$alert, unsigned int dur)}}
\label{GRB_8h_a3}


Signature for a GRB Confirm Alert callback routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em alert}]The alert message \item[{\em dur}]Duration in seconds of the requested repoint\end{description}
\end{Desc}
\hypertarget{GRB_8h_a9}{
\index{GRB.h@{GRB.h}!GRB_GbmCalc@{GRB\_\-GbmCalc}}
\index{GRB_GbmCalc@{GRB\_\-GbmCalc}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-GbmCalc]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__GRB__GbmCalc}{GRB\_\-Gbm\-Calc}}}
\label{GRB_8h_a9}


Typedef for struct \hyperlink{struct__GRB__GbmCalc}{\_\-GRB\_\-Gbm\-Calc}. 

\begin{Desc}
\item[]This structure describes the content of a GBM Calc Info message.\end{Desc}
\hypertarget{GRB_8h_a11}{
\index{GRB.h@{GRB.h}!GRB_GbmClose@{GRB\_\-GbmClose}}
\index{GRB_GbmClose@{GRB\_\-GbmClose}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-GbmClose]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__GRB__GbmClose}{GRB\_\-Gbm\-Close}}}
\label{GRB_8h_a11}


Typedef for struct \hyperlink{struct__GRB__GbmClose}{\_\-GRB\_\-Gbm\-Close}. 

\begin{Desc}
\item[]This structure describes the content of a GBM Close message.\end{Desc}
\hypertarget{GRB_8h_a10}{
\index{GRB.h@{GRB.h}!GRB_GbmRpt@{GRB\_\-GbmRpt}}
\index{GRB_GbmRpt@{GRB\_\-GbmRpt}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-GbmRpt]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct__GRB__GbmRpt}{GRB\_\-Gbm\-Rpt}}}
\label{GRB_8h_a10}


Typedef for struct \hyperlink{struct__GRB__GbmRpt}{\_\-GRB\_\-Gbm\-Rpt}. 

\begin{Desc}
\item[]This structure describes the content of a GBM Repoint message.\end{Desc}
\hypertarget{GRB_8h_a1}{
\index{GRB.h@{GRB.h}!GRB_suspectCb@{GRB\_\-suspectCb}}
\index{GRB_suspectCb@{GRB\_\-suspectCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-suspectCb]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ \hyperlink{GRB_8h_a1}{GRB\_\-suspect\-Cb})(GRB\_\-Alert $\ast$alert)}}
\label{GRB_8h_a1}


Signature for a GRB Suspect Alert callback routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em alert}]The alert message\end{description}
\end{Desc}
\hypertarget{GRB_8h_a7}{
\index{GRB.h@{GRB.h}!GRB_timeLookupCb@{GRB\_\-timeLookupCb}}
\index{GRB_timeLookupCb@{GRB\_\-timeLookupCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-timeLookupCb]{\setlength{\rightskip}{0pt plus 5cm}WCT\_\-time($\ast$ \hyperlink{GRB_8h_a7}{GRB\_\-time\-Lookup\-Cb})(unsigned int gem\_\-strobe, unsigned int gem\_\-clk)}}
\label{GRB_8h_a7}


Signature for a GRB time lookup routine. 

\begin{Desc}
\item[Returns:]Wall clock time\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em gem\_\-strobe}]strobe counter from GEM from event data \item[{\em gem\_\-clk}]clock counter from GEM from event data\end{description}
\end{Desc}
\hypertarget{GRB_8h_a2}{
\index{GRB.h@{GRB.h}!GRB_updateCb@{GRB\_\-updateCb}}
\index{GRB_updateCb@{GRB\_\-updateCb}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-updateCb]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ \hyperlink{GRB_8h_a2}{GRB\_\-update\-Cb})(GRB\_\-Alert $\ast$alert)}}
\label{GRB_8h_a2}


Signature for a GRB Update Alert callback routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em alert}]The alert message\end{description}
\end{Desc}


\subsection{Enumeration Type Documentation}
\hypertarget{GRB_8h_a30}{
\index{GRB.h@{GRB.h}!_GRBSim_Modes@{\_\-GRBSim\_\-Modes}}
\index{_GRBSim_Modes@{\_\-GRBSim\_\-Modes}!GRB.h@{GRB.h}}
\subsubsection[\_\-GRBSim\_\-Modes]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{GRB_8h_a30}{\_\-GRBSim\_\-Modes}}}
\label{GRB_8h_a30}


LPA GRB Algorithm Simulation Modes. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{GRBSIM_MODE_DISABLE@{GRBSIM\_\-MODE\_\-DISABLE}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE_DISABLE@{GRBSIM\_\-MODE\_\-DISABLE}}\item[{\em 
\hypertarget{GRB_8h_a30a12}{
GRBSIM\_\-MODE\_\-DISABLE}
\label{GRB_8h_a30a12}
}]GRB detection simulation disabled \index{GRBSIM_MODE_FULL@{GRBSIM\_\-MODE\_\-FULL}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE_FULL@{GRBSIM\_\-MODE\_\-FULL}}\item[{\em 
\hypertarget{GRB_8h_a30a13}{
GRBSIM\_\-MODE\_\-FULL}
\label{GRB_8h_a30a13}
}]GRB detection simulation mode full \index{GRBSIM_MODE_SUSPECT@{GRBSIM\_\-MODE\_\-SUSPECT}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE_SUSPECT@{GRBSIM\_\-MODE\_\-SUSPECT}}\item[{\em 
\hypertarget{GRB_8h_a30a14}{
GRBSIM\_\-MODE\_\-SUSPECT}
\label{GRB_8h_a30a14}
}]GRB detection mode suspect only \index{GRBSIM_MODE3@{GRBSIM\_\-MODE3}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE3@{GRBSIM\_\-MODE3}}\item[{\em 
\hypertarget{GRB_8h_a30a15}{
GRBSIM\_\-MODE3}
\label{GRB_8h_a30a15}
}]GRB detection mode 3 unused \index{GRBSIM_MODE4@{GRBSIM\_\-MODE4}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE4@{GRBSIM\_\-MODE4}}\item[{\em 
\hypertarget{GRB_8h_a30a16}{
GRBSIM\_\-MODE4}
\label{GRB_8h_a30a16}
}]GRB detection mode 4 unused \index{GRBSIM_MODE5@{GRBSIM\_\-MODE5}!GRB.h@{GRB.h}}\index{GRB.h@{GRB.h}!GRBSIM_MODE5@{GRBSIM\_\-MODE5}}\item[{\em 
\hypertarget{GRB_8h_a30a17}{
GRBSIM\_\-MODE5}
\label{GRB_8h_a30a17}
}]GRB detection mode 5 unused \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{GRB_8h_a21}{
\index{GRB.h@{GRB.h}!GRB_handleEvents@{GRB\_\-handleEvents}}
\index{GRB_handleEvents@{GRB\_\-handleEvents}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-handleEvents]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-handle\-Events (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, void $\ast$ {\em dat}, unsigned int {\em size}, unsigned int {\em prm})}}
\label{GRB_8h_a21}


Processes GRB event summaries from the GRB filter. This is a counting simulation and transitions between detection states based on summary counters. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctl}]The GRB algorithm control block \item[{\em dat}]The GRB event summary block \item[{\em size}]The GRB event summary size \item[{\em prm}]The GRB event summary parameter\end{description}
\end{Desc}
\hypertarget{GRB_8h_a23}{
\index{GRB.h@{GRB.h}!GRB_handleGbmCalc@{GRB\_\-handleGbmCalc}}
\index{GRB_handleGbmCalc@{GRB\_\-handleGbmCalc}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-handleGbmCalc]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-handle\-Gbm\-Calc (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, \hyperlink{struct__GRB__GbmCalc}{GRB\_\-Gbm\-Calc} $\ast$ {\em dat})}}
\label{GRB_8h_a23}


Handle the GBM Calc Info command. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a25}{
\index{GRB.h@{GRB.h}!GRB_handleGbmClose@{GRB\_\-handleGbmClose}}
\index{GRB_handleGbmClose@{GRB\_\-handleGbmClose}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-handleGbmClose]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-handle\-Gbm\-Close (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, \hyperlink{struct__GRB__GbmClose}{GRB\_\-Gbm\-Close} $\ast$ {\em dat})}}
\label{GRB_8h_a25}


Handle the GBM Closeout command. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a22}{
\index{GRB.h@{GRB.h}!GRB_handleGbmInt@{GRB\_\-handleGbmInt}}
\index{GRB_handleGbmInt@{GRB\_\-handleGbmInt}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-handleGbmInt]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-handle\-Gbm\-Int (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl})}}
\label{GRB_8h_a22}


Handle the GBM Interrupt. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a24}{
\index{GRB.h@{GRB.h}!GRB_handleGbmRpt@{GRB\_\-handleGbmRpt}}
\index{GRB_handleGbmRpt@{GRB\_\-handleGbmRpt}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-handleGbmRpt]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-handle\-Gbm\-Rpt (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, \hyperlink{struct__GRB__GbmRpt}{GRB\_\-Gbm\-Rpt} $\ast$ {\em dat})}}
\label{GRB_8h_a24}


Handle the GBM Repoint command. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a19}{
\index{GRB.h@{GRB.h}!GRB_initAlgCtl@{GRB\_\-initAlgCtl}}
\index{GRB_initAlgCtl@{GRB\_\-initAlgCtl}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-initAlgCtl]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-init\-Alg\-Ctl (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl})}}
\label{GRB_8h_a19}


Initializes an algorithm control block. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]Success \item[{\em -1}]Failure\end{description}
\end{Desc}
\hypertarget{GRB_8h_a27}{
\index{GRB.h@{GRB.h}!GRB_loadDbSiu@{GRB\_\-loadDbSiu}}
\index{GRB_loadDbSiu@{GRB\_\-loadDbSiu}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-loadDbSiu]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-load\-Db\-Siu (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, unsigned int {\em fid}, unsigned int {\em instance})}}
\label{GRB_8h_a27}


Loads the GRB\_\-DB. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em file}]key \item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a20}{
\index{GRB.h@{GRB.h}!GRB_registerCbs@{GRB\_\-registerCbs}}
\index{GRB_registerCbs@{GRB\_\-registerCbs}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-registerCbs]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-register\-Cbs (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, \hyperlink{GRB_8h_a1}{GRB\_\-suspect\-Cb} {\em suspect}, \hyperlink{GRB_8h_a2}{GRB\_\-update\-Cb} {\em update}, \hyperlink{GRB_8h_a3}{GRB\_\-confirm\-Cb} {\em confirm}, \hyperlink{GRB_8h_a4}{GRB\_\-closeout\-Cb} {\em closeout}, \hyperlink{GRB_8h_a5}{GRB\_\-att\-Xform\-JCb} {\em xformj}, \hyperlink{GRB_8h_a6}{GRB\_\-att\-Xform\-SCb} {\em xforms}, \hyperlink{GRB_8h_a7}{GRB\_\-time\-Lookup\-Cb} {\em lktime})}}
\label{GRB_8h_a20}


Registers the posting routines for alert messaging. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctl}]The GRB algorithm control block \item[{\em suspect}]The suspect alert post routine \item[{\em update}]The update alert post routine \item[{\em confirm}]The confirm alert post routine \item[{\em closeout}]The closeout alert post routine \item[{\em xformj}]The J2000 coordinate transform routine \item[{\em xforms}]The spherical coordinate transform routine \item[{\em lktime}]The event time lookup routine\end{description}
\end{Desc}
\hypertarget{GRB_8h_a26}{
\index{GRB.h@{GRB.h}!GRB_reset@{GRB\_\-reset}}
\index{GRB_reset@{GRB\_\-reset}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-reset]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-reset (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl})}}
\label{GRB_8h_a26}


Reset the GRB algorithm control block. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\hypertarget{GRB_8h_a28}{
\index{GRB.h@{GRB.h}!GRB_simConfig@{GRB\_\-simConfig}}
\index{GRB_simConfig@{GRB\_\-simConfig}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-simConfig]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-sim\-Config (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl}, unsigned int {\em mode}, unsigned int {\em repoint}, unsigned int {\em interval})}}
\label{GRB_8h_a28}


Configure for a simulated GRB detection. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctl}]The GRB algorithm control block \item[{\em mode}]The GRB simulation mode \item[{\em repoint}]The GRB repoint time \item[{\em interval}]The interval in seconds between state transitions\end{description}
\end{Desc}
\hypertarget{GRB_8h_a29}{
\index{GRB.h@{GRB.h}!GRB_simDetect@{GRB\_\-simDetect}}
\index{GRB_simDetect@{GRB\_\-simDetect}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-simDetect]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-sim\-Detect (\hyperlink{struct__GRB__algCtl}{GRB\_\-alg\-Ctl} $\ast$ {\em ctl})}}
\label{GRB_8h_a29}


Simulate a GRB detection. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Success}]\item[{\em -1,Failure}]\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ctl}]The GRB algorithm control block\end{description}
\end{Desc}
\hypertarget{GRB_8h_a18}{
\index{GRB.h@{GRB.h}!GRB_sizeofAlgCtl@{GRB\_\-sizeofAlgCtl}}
\index{GRB_sizeofAlgCtl@{GRB\_\-sizeofAlgCtl}!GRB.h@{GRB.h}}
\subsubsection[GRB\_\-sizeofAlgCtl]{\setlength{\rightskip}{0pt plus 5cm}int GRB\_\-sizeof\-Alg\-Ctl (void)}}
\label{GRB_8h_a18}


Returns the size of a algorithm control block. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em Size}]in bytes of algorithm control block\end{description}
\end{Desc}
