\hypertarget{QLMC_8h}{
\section{QLMC.h File Reference}
\label{QLMC_8h}\index{QLMC.h@{QLMC.h}}
}
Public definitions for the LMC data access routines.  


{\tt \#include $<$LMC/LMC\_\-pubdefs.h$>$}\par
{\tt \#include $<$LSF/LSF.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__QLMC__timestamp}{\_\-QLMC\_\-timestamp}
\begin{CompactList}\small\item\em Sample timestamp. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__calCount}{\_\-QLMC\_\-calCount}
\begin{CompactList}\small\item\em Calorimeter counter data item. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__tkrCount}{\_\-QLMC\_\-tkrCount}
\begin{CompactList}\small\item\em Tracker counter data item. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__acdCount}{\_\-QLMC\_\-acdCount}
\begin{CompactList}\small\item\em ACD counter data item. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__deadCount}{\_\-QLMC\_\-deadCount}
\begin{CompactList}\small\item\em Deadtime counter data item. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__calRecord}{\_\-QLMC\_\-calRecord}
\begin{CompactList}\small\item\em Calorimeter counter record. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__tkrRecord}{\_\-QLMC\_\-tkrRecord}
\begin{CompactList}\small\item\em Tracker counter record. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__acdRecord}{\_\-QLMC\_\-acdRecord}
\begin{CompactList}\small\item\em ACD counter record. \item\end{CompactList}\item 
struct \hyperlink{struct__QLMC__deadRecord}{\_\-QLMC\_\-deadRecord}
\begin{CompactList}\small\item\em Deadtime counter record. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{QLMC_8h_dcb220bf8e99647ca624447c5dcb9212}{
typedef struct \hyperlink{struct__QLMC__timestamp}{\_\-QLMC\_\-timestamp} \hyperlink{QLMC_8h_dcb220bf8e99647ca624447c5dcb9212}{QLMC\_\-timestamp}}
\label{QLMC_8h_dcb220bf8e99647ca624447c5dcb9212}

\begin{CompactList}\small\item\em Sample timestamp. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_3d20b40fb1d8f3edc7f0e5a18dcfbaee}{
typedef struct \hyperlink{struct__QLMC__calCount}{\_\-QLMC\_\-calCount} \hyperlink{QLMC_8h_3d20b40fb1d8f3edc7f0e5a18dcfbaee}{QLMC\_\-calCount}}
\label{QLMC_8h_3d20b40fb1d8f3edc7f0e5a18dcfbaee}

\begin{CompactList}\small\item\em Calorimeter counter data item. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_2aeb0b183e8a761c8073562155c8095b}{
typedef struct \hyperlink{struct__QLMC__tkrCount}{\_\-QLMC\_\-tkrCount} \hyperlink{QLMC_8h_2aeb0b183e8a761c8073562155c8095b}{QLMC\_\-tkrCount}}
\label{QLMC_8h_2aeb0b183e8a761c8073562155c8095b}

\begin{CompactList}\small\item\em Tracker counter data item. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_43702720565b4e128c86944665cad01b}{
typedef struct \hyperlink{struct__QLMC__acdCount}{\_\-QLMC\_\-acdCount} \hyperlink{QLMC_8h_43702720565b4e128c86944665cad01b}{QLMC\_\-acdCount}}
\label{QLMC_8h_43702720565b4e128c86944665cad01b}

\begin{CompactList}\small\item\em ACD counter data item. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_92477ecaa89495d8bf7b044d2d42919c}{
typedef struct \hyperlink{struct__QLMC__deadCount}{\_\-QLMC\_\-deadCount} \hyperlink{QLMC_8h_92477ecaa89495d8bf7b044d2d42919c}{QLMC\_\-deadCount}}
\label{QLMC_8h_92477ecaa89495d8bf7b044d2d42919c}

\begin{CompactList}\small\item\em Deadtime counter data item. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_08799f90ca3681a175b6928641dee546}{
typedef struct \hyperlink{struct__QLMC__calRecord}{\_\-QLMC\_\-calRecord} \hyperlink{QLMC_8h_08799f90ca3681a175b6928641dee546}{QLMC\_\-calRecord}}
\label{QLMC_8h_08799f90ca3681a175b6928641dee546}

\begin{CompactList}\small\item\em Calorimeter counter record. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_0fd37b3f86796407297468269471edd5}{
typedef struct \hyperlink{struct__QLMC__tkrRecord}{\_\-QLMC\_\-tkrRecord} \hyperlink{QLMC_8h_0fd37b3f86796407297468269471edd5}{QLMC\_\-tkrRecord}}
\label{QLMC_8h_0fd37b3f86796407297468269471edd5}

\begin{CompactList}\small\item\em Tracker counter record. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_f82ff1218dc80882daec1553d474f911}{
typedef struct \hyperlink{struct__QLMC__acdRecord}{\_\-QLMC\_\-acdRecord} \hyperlink{QLMC_8h_f82ff1218dc80882daec1553d474f911}{QLMC\_\-acdRecord}}
\label{QLMC_8h_f82ff1218dc80882daec1553d474f911}

\begin{CompactList}\small\item\em ACD counter record. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_24eb4b03ea14adad3934e68ec02a3981}{
typedef struct \hyperlink{struct__QLMC__deadRecord}{\_\-QLMC\_\-deadRecord} \hyperlink{QLMC_8h_24eb4b03ea14adad3934e68ec02a3981}{QLMC\_\-deadRecord}}
\label{QLMC_8h_24eb4b03ea14adad3934e68ec02a3981}

\begin{CompactList}\small\item\em Deadtime counter record. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}{
typedef void \hyperlink{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}{QLMC\_\-calCB} (\hyperlink{struct__QLMC__calRecord}{QLMC\_\-calRecord} $\ast$recd, int nCntr, void $\ast$parm)}
\label{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}

\begin{CompactList}\small\item\em Callback routine to process calorimeter data records. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}{
typedef void \hyperlink{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}{QLMC\_\-tkrCB} (\hyperlink{struct__QLMC__tkrRecord}{QLMC\_\-tkrRecord} $\ast$recd, int nCntr, void $\ast$parm)}
\label{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}

\begin{CompactList}\small\item\em Callback routine to process tracker data records. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}{
typedef void \hyperlink{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}{QLMC\_\-acdCB} (\hyperlink{struct__QLMC__acdRecord}{QLMC\_\-acdRecord} $\ast$recd, int nCntr, void $\ast$parm)}
\label{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}

\begin{CompactList}\small\item\em Callback routine to process ACD data records. \item\end{CompactList}\item 
\hypertarget{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}{
typedef void \hyperlink{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}{QLMC\_\-deadCB} (\hyperlink{struct__QLMC__deadRecord}{QLMC\_\-deadRecord} $\ast$recd, int nCntr, void $\ast$parm)}
\label{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}

\begin{CompactList}\small\item\em Callback routine to process deadtime data records. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{QLMC_8h_4abd8b73e064fc92b41e90300f3ba309}{QLMC\_\-procDgm} (const LSF\_\-datagram $\ast$dgm, void $\ast$parm, \hyperlink{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}{QLMC\_\-calCB} calRtn, \hyperlink{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}{QLMC\_\-tkrCB} tkrRtn, \hyperlink{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}{QLMC\_\-acdCB} acdRtn, \hyperlink{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}{QLMC\_\-deadCB} deadRtn)
\begin{CompactList}\small\item\em Process a datagram. \item\end{CompactList}\item 
unsigned \hyperlink{QLMC_8h_1602d121214804c10548d66e217ca2c4}{QLMC\_\-readDiag} (char $\ast$fName, void $\ast$parm, \hyperlink{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}{QLMC\_\-calCB} calRtn, \hyperlink{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}{QLMC\_\-tkrCB} tkrRtn, \hyperlink{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}{QLMC\_\-acdCB} acdRtn, \hyperlink{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}{QLMC\_\-deadCB} deadRtn)
\begin{CompactList}\small\item\em Read the contents of an LMC packet file. \item\end{CompactList}\item 
unsigned \hyperlink{QLMC_8h_3529339dc4344eeb68488beeb3b3628f}{QLMC\_\-readSci} (char $\ast$fName, void $\ast$parm, \hyperlink{QLMC_8h_bafa1084cdd8b25bea97ce325d50f4e9}{QLMC\_\-calCB} calRtn, \hyperlink{QLMC_8h_8af1196ba418ff4d9dc7c535b39f43f2}{QLMC\_\-tkrCB} tkrRtn, \hyperlink{QLMC_8h_758fd3078e24f04ea6d2f93e61e9fbcb}{QLMC\_\-acdCB} acdRtn, \hyperlink{QLMC_8h_003df63843481f4e0131b80d8f78f3c0}{QLMC\_\-deadCB} deadRtn)
\begin{CompactList}\small\item\em Read the contents of an LMC datagram file. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public definitions for the LMC data access routines. 

\begin{Desc}
\item[Author:]Owen H Saxton\end{Desc}
\begin{Desc}
\item[Id]\hyperlink{QLMC_8h}{QLMC.h},v 1.5 2011/03/31 18:33:14 saxton Exp \end{Desc}


\subsection{Function Documentation}
\hypertarget{QLMC_8h_4abd8b73e064fc92b41e90300f3ba309}{
\index{QLMC.h@{QLMC.h}!QLMC\_\-procDgm@{QLMC\_\-procDgm}}
\index{QLMC\_\-procDgm@{QLMC\_\-procDgm}!QLMC.h@{QLMC.h}}
\subsubsection[{QLMC\_\-procDgm}]{\setlength{\rightskip}{0pt plus 5cm}void QLMC\_\-procDgm (const LSF\_\-datagram $\ast$ {\em dgm}, \/  void $\ast$ {\em parm}, \/  {\bf QLMC\_\-calCB} {\em calRtn}, \/  {\bf QLMC\_\-tkrCB} {\em tkrRtn}, \/  {\bf QLMC\_\-acdCB} {\em acdRtn}, \/  {\bf QLMC\_\-deadCB} {\em deadRtn})}}
\label{QLMC_8h_4abd8b73e064fc92b41e90300f3ba309}


Process a datagram. 

This routine processes a complete datagram of LMC data, and calls a user-supplied routine for each type of data record present.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dgm}]The datagram to be processed.\item[{\em parm}]User parameter to pass to the processing routine.\item[{\em calRtn}]Routine to call for each LMC calorimeter data record in the datagram. Can be NULL.\item[{\em tkrRtn}]Routine to call for each LMC tracker data record in the datagram. Can be NULL.\item[{\em acdRtn}]Routine to call for each LMC ACD data record in the datagram. Can be NULL.\item[{\em deadRtn}]Routine to call for each LMC deadtime data record in the datagram. Can be NULL. \end{description}
\end{Desc}


References \_\-QLMC\_\-acdCount::cnt0, \_\-QLMC\_\-tkrCount::cnt0, \_\-QLMC\_\-calCount::cnt0, \_\-QLMC\_\-deadRecord::cntrs, \_\-QLMC\_\-acdRecord::cntrs, \_\-QLMC\_\-tkrRecord::cntrs, \_\-QLMC\_\-calRecord::cntrs, \_\-QLMC\_\-tkrRecord::pad, \_\-QLMC\_\-calRecord::pad, \_\-QLMC\_\-deadRecord::tenb, and \_\-QLMC\_\-acdCount::tile0.

Referenced by QLMC\_\-readSci().\hypertarget{QLMC_8h_1602d121214804c10548d66e217ca2c4}{
\index{QLMC.h@{QLMC.h}!QLMC\_\-readDiag@{QLMC\_\-readDiag}}
\index{QLMC\_\-readDiag@{QLMC\_\-readDiag}!QLMC.h@{QLMC.h}}
\subsubsection[{QLMC\_\-readDiag}]{\setlength{\rightskip}{0pt plus 5cm}unsigned QLMC\_\-readDiag (char $\ast$ {\em fName}, \/  void $\ast$ {\em parm}, \/  {\bf QLMC\_\-calCB} {\em calRtn}, \/  {\bf QLMC\_\-tkrCB} {\em tkrRtn}, \/  {\bf QLMC\_\-acdCB} {\em acdRtn}, \/  {\bf QLMC\_\-deadCB} {\em deadRtn})}}
\label{QLMC_8h_1602d121214804c10548d66e217ca2c4}


Read the contents of an LMC packet file. 

This routine reads a file of LMC diagnostic data returned from the LAT and calls a user-supplied processing routine for each type of data record found.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fName}]The name of the file to be processed\item[{\em parm}]User parameter to pass to the processing routine.\item[{\em calRtn}]Routine to call for each LMC calorimeter data record in the file. Can be NULL.\item[{\em tkrRtn}]Routine to call for each LMC tracker data record in the file. Can be NULL.\item[{\em acdRtn}]Routine to call for each LMC ACD data record in the file. Can be NULL.\item[{\em deadRtn}]Routine to call for each LMC deadtime data record in the file. Can be NULL.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em QLMC\_\-SUCCESS}]Success \end{description}
\end{Desc}


References \_\-QLMC\_\-acdCount::cnt0, \_\-QLMC\_\-tkrCount::cnt0, \_\-QLMC\_\-calCount::cnt0, \_\-QLMC\_\-deadRecord::cntrs, \_\-QLMC\_\-acdRecord::cntrs, \_\-QLMC\_\-tkrRecord::cntrs, \_\-QLMC\_\-calRecord::cntrs, \_\-QLMC\_\-deadCount::dt, \_\-QLMC\_\-acdCount::dt, \_\-QLMC\_\-tkrCount::dt, \_\-QLMC\_\-calCount::dt, \_\-QLMC\_\-tkrRecord::lmsk, \_\-QLMC\_\-calRecord::lmsk, \_\-QLMC\_\-timestamp::secs, \_\-QLMC\_\-deadRecord::tenb, \_\-QLMC\_\-tkrRecord::tenb, \_\-QLMC\_\-calRecord::tenb, \_\-QLMC\_\-acdCount::tile0, \_\-QLMC\_\-deadRecord::ts, \_\-QLMC\_\-acdRecord::ts, \_\-QLMC\_\-tkrRecord::ts, and \_\-QLMC\_\-calRecord::ts.\hypertarget{QLMC_8h_3529339dc4344eeb68488beeb3b3628f}{
\index{QLMC.h@{QLMC.h}!QLMC\_\-readSci@{QLMC\_\-readSci}}
\index{QLMC\_\-readSci@{QLMC\_\-readSci}!QLMC.h@{QLMC.h}}
\subsubsection[{QLMC\_\-readSci}]{\setlength{\rightskip}{0pt plus 5cm}unsigned QLMC\_\-readSci (char $\ast$ {\em fName}, \/  void $\ast$ {\em parm}, \/  {\bf QLMC\_\-calCB} {\em calRtn}, \/  {\bf QLMC\_\-tkrCB} {\em tkrRtn}, \/  {\bf QLMC\_\-acdCB} {\em acdRtn}, \/  {\bf QLMC\_\-deadCB} {\em deadRtn})}}
\label{QLMC_8h_3529339dc4344eeb68488beeb3b3628f}


Read the contents of an LMC datagram file. 

This routine reads a file of LMC datagrams returned from the LAT, and calls a user-supplied processing routine for each type of data record found.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fName}]The name of the file to be displayed\item[{\em parm}]User parameter to pass to the processing routine.\item[{\em calRtn}]Routine to call for each LMC calorimeter data record in the file. Can be NULL.\item[{\em tkrRtn}]Routine to call for each LMC tracker data record in the file. Can be NULL.\item[{\em acdRtn}]Routine to call for each LMC ACD data record in the file. Can be NULL.\item[{\em deadRtn}]Routine to call for each LMC deadtime data record in the file. Can be NULL.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em QLMC\_\-SUCCESS}]Success \end{description}
\end{Desc}


References QLMC\_\-procDgm().