\hypertarget{EFS_8h}{
\section{EFS.h File Reference}
\label{EFS_8h}\index{EFS.h@{EFS.h}}
}
Defines the interface for summarizing the event-by-event results of a filtering process into a statistics table. This is a generic facility, with very little specific filter information. 

{\tt \#include \char`\"{}EMP/LSD\_\-sdi.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-cpu.h\char`\"{}}\par
{\tt \#include \char`\"{}LSF/LSF\_\-origin.h\char`\"{}}\par


Include dependency graph for EFS.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{EFS_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=93pt]{EFS_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
unsigned char $\ast$ \hyperlink{EFS_8h_a0}{EFS\_\-construct} (\hyperlink{struct__EFS}{EFS} $\ast$efs, const EFC\_\-DB\_\-Schema\-Analysis $\ast$schema, int result\_\-size, unsigned int apid\_\-offset, unsigned int dgmid\_\-offset, LSF\_\-CPU\_\-K cpu, LSF\_\-ORIGIN\_\-K origin, unsigned int schema\_\-key, LSD\_\-sdi\-Write\-Cbp $\ast$write\-Cbp)
\begin{CompactList}\small\item\em Constructs an Event Filter Statistics handle. \item\end{CompactList}\item 
void \hyperlink{EFS_8h_a1}{EFS\_\-post} (\hyperlink{struct__EFS}{EFS} $\ast$efs, int reason, const void $\ast$beg, const void $\ast$end, const \hyperlink{struct__EFA__span}{EFA\_\-span} $\ast$span)
\begin{CompactList}\small\item\em Formats the datagram and eventually writes the datagram to the output device. \item\end{CompactList}\item 
int \hyperlink{EFS_8h_a2}{EFS\_\-sizeof} (int max\_\-records)
\begin{CompactList}\small\item\em Computes the size, in bytes, of the EFS control structure. \item\end{CompactList}\item 
int \hyperlink{EFS_8h_a3}{EFS\_\-start} (\hyperlink{struct__EFS}{EFS} $\ast$efs, int reason, int run\_\-id, int start\-Time, int mode)
\begin{CompactList}\small\item\em Captures the start run information. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Defines the interface for summarizing the event-by-event results of a filtering process into a statistics table. This is a generic facility, with very little specific filter information. 

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


\footnotesize\begin{verbatim}   CVS $Id: EFS.h,v 1.1 2007/10/10 23:40:42 russell Exp $
\end{verbatim}
\normalsize


\subsection{Function Documentation}
\hypertarget{EFS_8h_a0}{
\index{EFS.h@{EFS.h}!EFS_construct@{EFS\_\-construct}}
\index{EFS_construct@{EFS\_\-construct}!EFS.h@{EFS.h}}
\subsubsection[EFS\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}unsigned char $\ast$ EFS\_\-construct (\hyperlink{struct__EFS}{EFS} $\ast$ {\em efs}, const EFC\_\-DB\_\-Schema\-Analysis $\ast$ {\em schema}, int {\em result\_\-size}, unsigned int {\em apid\_\-offset}, unsigned int {\em dgmid\_\-offset}, LSF\_\-CPU\_\-K {\em cpu}, LSF\_\-ORIGIN\_\-K {\em origin}, unsigned int {\em schema\_\-key}, LSD\_\-sdi\-Write\-Cbp $\ast$ {\em write})}}
\label{EFS_8h_a0}


Constructs an Event Filter Statistics handle. 

\begin{Desc}
\item[Returns:]The next available memory location\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efs}]The control handle to be initialized \item[{\em schema}]The analysis schema \item[{\em result\_\-size}]The size, in 32-bit words, of a result vector This application only uses the first 32-bits assuming them to be a 32-bit Event Filter status mask. \item[{\em apid\_\-offset}]The offset to the base value of the APID. This must be a value between 0 - 4. In general it is represented by on of the values LSF\_\-CPU\_\-K\_\-EPU\_\-0,1,2 or LSF\_\-CPU\_\-SIU\_\-0,1 \item[{\em dgmid\_\-offset}]The offset of the datagram id. The value LSF\_\-ID\_\-K\_\-EFS will be added to this value. \item[{\em cpu}]One of the enumeration LSE\_\-CPU\_\-K specifying the CPU that is writing the datagram \item[{\em origin}]One of the enumeration LSE\_\-ORIGIN\_\-K specifying the origin of the data \item[{\em schema\_\-key}]The, usually FMX, key of the configuration file currently being used to produce the result vectors. This allows the consumer of the EFS datagrams to understand the conditions that the data was taken \item[{\em write}]Callback routine and parameter to commit the formatted datagram to the output device\end{description}
\end{Desc}
\hypertarget{EFS_8h_a1}{
\index{EFS.h@{EFS.h}!EFS_post@{EFS\_\-post}}
\index{EFS_post@{EFS\_\-post}!EFS.h@{EFS.h}}
\subsubsection[EFS\_\-post]{\setlength{\rightskip}{0pt plus 5cm}void EFS\_\-post (\hyperlink{struct__EFS}{EFS} $\ast$ {\em efs}, int {\em reason}, const void $\ast$ {\em beg}, const void $\ast$ {\em end}, const \hyperlink{struct__EFA__span}{EFA\_\-span} $\ast$ {\em span})}}
\label{EFS_8h_a1}


Formats the datagram and eventually writes the datagram to the output device. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efs}]The Event Filter Statistics handle \item[{\em reason}]The reason EFS\_\-post is being called. These are enumerated in EFA\_\-FLUSH\_\-REASON but, briefly are the set of the LSF\_\-REASONs augmented to a record update reason and a record process reason. \item[{\em beg}]The first result vector to analyze \item[{\em end}]The last (actually one past the last) result vector to analyze \item[{\em span}]Structure defining the span of events, both in time and event sequence numbers, that are being analyzed.\end{description}
\end{Desc}
\hypertarget{EFS_8h_a2}{
\index{EFS.h@{EFS.h}!EFS_sizeof@{EFS\_\-sizeof}}
\index{EFS_sizeof@{EFS\_\-sizeof}!EFS.h@{EFS.h}}
\subsubsection[EFS\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int EFS\_\-sizeof (int {\em max\_\-records})}}
\label{EFS_8h_a2}


Computes the size, in bytes, of the EFS control structure. 

\begin{Desc}
\item[Returns:]The size, in bytes,\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em max\_\-records}]The maximum number of records in a datagram\end{description}
\end{Desc}
\hypertarget{EFS_8h_a3}{
\index{EFS.h@{EFS.h}!EFS_start@{EFS\_\-start}}
\index{EFS_start@{EFS\_\-start}!EFS.h@{EFS.h}}
\subsubsection[EFS\_\-start]{\setlength{\rightskip}{0pt plus 5cm}int EFS\_\-start (\hyperlink{struct__EFS}{EFS} $\ast$ {\em efs}, int {\em reason}, int {\em run\_\-id}, int {\em start\-Time}, int {\em mode})}}
\label{EFS_8h_a3}


Captures the start run information. 

\begin{Desc}
\item[Returns:]0 is successful, non-zero otherwise\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efs}]The Event Filter Statistics handle \item[{\em reason}]The LSF\_\-REASON\_\-OPEN to indicate why the stream is being started \item[{\em run\_\-id}]Suggested use is to identify the block of events between when EDS\_\-fw\-Handler\-Start is called and EDS\_\-fw\-Handler\-Flush is called with a stop reason \item[{\em start\-Time}]The run start time rounded to the nearest second \item[{\em mode}]This must be the running mode.\end{description}
\end{Desc}
