\hypertarget{EFC_8c}{
\section{EFC.c File Reference}
\label{EFC_8c}\index{EFC.c@{EFC.c}}
}
Implementation of a wrapper for a generic filter. 

{\tt \#include \char`\"{}EFC\_\-DB/EFC\_\-DB\_\-schema\-Filter.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC\_\-DB/EFC\_\-DB\_\-sampler.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC/EFC.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC/EFA.h\char`\"{}}\par
{\tt \#include \char`\"{}EFA\_\-p.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC\_\-sampler\-Def.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC/EFC\_\-eds\-Fw.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-fw\-Services.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EDS\_\-cfg.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/EBF\_\-siv.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/FFS.h\char`\"{}}\par
{\tt \#include \char`\"{}EFC/EFR\_\-key.h\char`\"{}}\par
{\tt \#include \char`\"{}CDM/CDM\_\-pubdefs.h\char`\"{}}\par
{\tt \#include \char`\"{}CMX/CMX\_\-lookup\-Pub.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par


Include dependency graph for EFC.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=334pt]{EFC_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__EFC__cfgDbMember}{\_\-EFC\_\-cfg\-Db\-Member}
\begin{CompactList}\small\item\em One database member. \item\end{CompactList}\item 
struct \hyperlink{struct__EFC__cfgDb}{\_\-EFC\_\-cfg\-Db}
\begin{CompactList}\small\item\em The database of bound the filter's bound sampler and configuration blocks. \item\end{CompactList}\item 
struct \hyperlink{struct__EFC__cfg}{\_\-EFC\_\-cfg}
\begin{CompactList}\small\item\em The configuration control structure. \item\end{CompactList}\item 
struct \hyperlink{struct__EFC}{\_\-EFC}
\begin{CompactList}\small\item\em The control structure for the filter framework. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{EFC_8c_a0}{
typedef \hyperlink{struct__EFC__cfgDbMember}{\_\-EFC\_\-cfg\-Db\-Member} \hyperlink{EFC_8c_a0}{EFC\_\-cfg\-Db\-Member}}
\label{EFC_8c_a0}

\begin{CompactList}\small\item\em Typedef for struct \_\-EFCcfg\-Db\-Member. \item\end{CompactList}\item 
\hypertarget{EFC_8c_a1}{
typedef \hyperlink{struct__EFC__cfgDb}{\_\-EFC\_\-cfg\-Db} \hyperlink{EFC_8c_a1}{EFC\_\-cfg\-Db}}
\label{EFC_8c_a1}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__EFC__cfgDb}{\_\-EFC\_\-cfg\-Db}. \item\end{CompactList}\item 
\hypertarget{EFC_8c_a2}{
typedef \hyperlink{struct__EFC__cfg}{\_\-EFC\_\-cfg} \hyperlink{EFC_8c_a2}{EFC\_\-cfg}}
\label{EFC_8c_a2}

\begin{CompactList}\small\item\em Typedef for struct \hyperlink{struct__EFC__cfg}{\_\-EFC\_\-cfg}. \item\end{CompactList}\item 
\hypertarget{EFC_8c_a3}{
typedef \hyperlink{struct__EFC}{\_\-EFC} {\bf EFC}}
\label{EFC_8c_a3}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
const EDS\_\-fw\-Handler\-Services\-X1 $\ast$ \hyperlink{EFC_8c_a4}{construct\_\-efc} (\hyperlink{struct__EFC}{EFC} $\ast$efc, unsigned int id, const EFC\_\-DB\_\-Schema\-Filter $\ast$schema, unsigned int schema\_\-key, void $\ast$prm, EDS\_\-fw $\ast$eds\-Fw, const \hyperlink{struct__EFC__services}{EFC\_\-services} $\ast$services, const \hyperlink{struct__EFC__sizes}{EFC\_\-sizes} $\ast$sizes, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$classes, unsigned int objects, unsigned int needs)
\begin{CompactList}\small\item\em Resolves all the indirect references in the specified master configuration file and files in both the EFC control structure and the filter specific control structure. \item\end{CompactList}\item 
static \_\-\_\-inline void \hyperlink{EFC_8c_a5}{copy\-Result} (EDS\_\-rsd\-Dsc $\ast$dsc, unsigned int $\ast$results, unsigned int flip)
\begin{CompactList}\small\item\em Copies the result vector into the result summary data descriptor. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{EFC_8c_a6}{get\-Active} (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$sampler)
\begin{CompactList}\small\item\em Gets the active set of vetoes and passes bits for this event. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{EFC_8c_a7}{update\-Disabled\-Passes} (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$sampler, unsigned int disabled\_\-passes, unsigned int status)
\begin{CompactList}\small\item\em Updates the list of disabled pass bits. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a8}{update\-Prescaler} (\hyperlink{struct__EFC__samplerPrescaleCounter}{EFC\_\-sampler\-Prescale\-Counter} $\ast$prescaler)
\begin{CompactList}\small\item\em Updates the prescaler. \item\end{CompactList}\item 
static \_\-\_\-inline int \hyperlink{EFC_8c_a9}{if\_\-would\_\-have\_\-been\_\-vetoed} (int status, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$enabled)
\item 
static \_\-\_\-inline int \hyperlink{EFC_8c_a10}{construct\_\-prescaler} (\hyperlink{struct__EFC__samplerPrescaleCounter}{EFC\_\-sampler\-Prescale\-Counter} $\ast$prescaler, int refresh)
\begin{CompactList}\small\item\em Constructs a prescaler. \item\end{CompactList}\item 
static void \hyperlink{EFC_8c_a11}{construct\_\-sampler} (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$sampler, const EFC\_\-DB\_\-sampler $\ast$db\_\-sampler, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$defined)
\begin{CompactList}\small\item\em Compiles/commits the set of user sampling parameters into the the configuration block. \item\end{CompactList}\item 
static int \hyperlink{EFC_8c_a12}{efc\_\-flush} (\hyperlink{struct__EFC}{EFC} $\ast$efc, int reason)
\begin{CompactList}\small\item\em Currently just a call-through to EFA\_\-flush. \item\end{CompactList}\item 
static int \hyperlink{EFC_8c_a13}{efc\_\-result\_\-sizeof} (\hyperlink{struct__EFC}{EFC} $\ast$efc)
\begin{CompactList}\small\item\em Just a call-through to EFA\_\-result\-Sizeof. \item\end{CompactList}\item 
const EFC\_\-DB\_\-Schema $\ast$ \hyperlink{EFC_8c_a14}{EFC\_\-lookup} (unsigned short int schema\_\-id, unsigned short int instance\_\-id)
\begin{CompactList}\small\item\em Looks up the CDM database associated with the specified {\em schema\_\-id\/} and {\em instance\_\-id\/}. \item\end{CompactList}\item 
const EDS\_\-fw\-Handler\-Services\-X1 $\ast$ \hyperlink{EFC_8c_a15}{EFC\_\-construct} (\hyperlink{struct__EFC}{EFC} $\ast$efc, unsigned int id, const EFC\_\-DB\_\-Schema\-Filter $\ast$schema, unsigned int schema\_\-key, void $\ast$prm, EDS\_\-fw $\ast$eds\-Fw, const \hyperlink{struct__EFC__definition}{EFC\_\-definition} $\ast$definition, unsigned int objects, unsigned int needs)
\begin{CompactList}\small\item\em Resolves all the indirect references in the specified master configuration file and files in both the EFC control structure and the filter specific control structure. This is merely a call-through to the general purpose constructor. \item\end{CompactList}\item 
void $\ast$ \hyperlink{EFC_8c_a16}{EFC\_\-get} (const \hyperlink{struct__EFC}{EFC} $\ast$efc, \hyperlink{EFC_8h_a9}{EFC\_\-OBJECT\_\-K} object)
\begin{CompactList}\small\item\em Returns a pointer to named object. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a17}{EFC\_\-set} (\hyperlink{struct__EFC}{EFC} $\ast$efc, \hyperlink{EFC_8h_a9}{EFC\_\-OBJECT\_\-K} object, void $\ast$value)
\begin{CompactList}\small\item\em Sets the named object to the specified value. This is primarily used for backdoor debugging. \item\end{CompactList}\item 
unsigned int \hyperlink{EFC_8c_a18}{EFC\_\-objects\-Get} (const \hyperlink{struct__EFC}{EFC} $\ast$efc)
\begin{CompactList}\small\item\em Returns the list of EDS framework objects needed by this filter. \item\end{CompactList}\item 
unsigned int \hyperlink{EFC_8c_a19}{EFC\_\-needs\-Get} (const \hyperlink{struct__EFC}{EFC} $\ast$efc)
\begin{CompactList}\small\item\em Returns the list of EDS framework needs for this filter. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a20}{EFC\_\-mode\-Associate} (\hyperlink{struct__EFC}{EFC} $\ast$efc, int mode, int configuration)
\begin{CompactList}\small\item\em Establish a new configuration to be associated with the indicated mode. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a21}{EFC\_\-mode\-Select} (\hyperlink{struct__EFC}{EFC} $\ast$efc, int mode, EDS\_\-cfg\-Info $\ast$info)
\begin{CompactList}\small\item\em Selects the operating environment according to the specified mode. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a22}{EFC\_\-start} (\hyperlink{struct__EFC}{EFC} $\ast$efc, unsigned int reason, unsigned int run\_\-id, unsigned int start\_\-time, unsigned int mode)
\begin{CompactList}\small\item\em EDS start run callback routine. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a23}{EFC\_\-sizeof} (const EFC\_\-DB\_\-Schema\-Filter $\ast$schema, void $\ast$prm, const \hyperlink{struct__EFC__sizes}{EFC\_\-sizes} $\ast$sizes)
\begin{CompactList}\small\item\em Returns the size, in bytes, of the filter control structure and the associated configuration constants. \item\end{CompactList}\item 
void \hyperlink{EFC_8c_a24}{EFC\_\-report} (\hyperlink{struct__EFC}{EFC} $\ast$efc, unsigned int list)
\begin{CompactList}\small\item\em Calls back the user to report on the configuration. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a25}{EFC\_\-filter} (\hyperlink{struct__EFC}{EFC} $\ast$efc, unsigned int pkt\-Bytes, EBF\_\-pkt $\ast$pkt, EBF\_\-siv siv, EDS\_\-fw\-Ixb $\ast$ixb, int id)
\begin{CompactList}\small\item\em Calls the filter function for each of the specified events. \item\end{CompactList}\item 
int \hyperlink{EFC_8c_a26}{EFC\_\-destruct} (\hyperlink{struct__EFC}{EFC} $\ast$efc)
\begin{CompactList}\small\item\em Returns any resources garnered by EFC\_\-construct. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implementation of a wrapper for a generic filter. 

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


\footnotesize\begin{verbatim}   CVS $Id: EFC.c,v 1.20 2008/01/25 23:10:49 russell Exp $
\end{verbatim}
\normalsize


\begin{Desc}
\item[Overview]This is wrapper for the EDS\_\-fw framework layer, allowing one to register individual and modular filters. A filter in consists of\end{Desc}
\begin{enumerate}
\item A processing routine that takes as its arguments the set of arguments from of an EDS framework callback plus a veto mask and a result vector\item A set of callback routines to allocate an array of result vectors and to post the array all entries have been filled. The custumary use of this mechanism to compute and output summary statistics\end{enumerate}


\begin{Desc}
\item[Result Vector]This collection of routines makes only the following assumptions about a filter's result vector\end{Desc}
\begin{enumerate}
\item An array of them can be allocated via a user callback routine\item It has a fixed size, so that it can allocate the next one from the array\item When all elements of the result vector array are filled or when a flush routine is called, another user routine is called to post the array of now, presumably, filled result arrays.\end{enumerate}


\subsection{Function Documentation}
\hypertarget{EFC_8c_a4}{
\index{EFC.c@{EFC.c}!construct_efc@{construct\_\-efc}}
\index{construct_efc@{construct\_\-efc}!EFC.c@{EFC.c}}
\subsubsection[construct\_\-efc]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-fw\-Handler\-Services\-X1 $\ast$ construct\_\-efc (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, unsigned int {\em id}, const EFC\_\-DB\_\-Schema\-Filter $\ast$ {\em schema}, unsigned int {\em schema\_\-key}, void $\ast$ {\em prm}, EDS\_\-fw $\ast$ {\em eds\-Fw}, const \hyperlink{struct__EFC__services}{EFC\_\-services} $\ast$ {\em services}, const \hyperlink{struct__EFC__sizes}{EFC\_\-sizes} $\ast$ {\em sizes}, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$ {\em classes}, unsigned int {\em objects}, unsigned int {\em needs})}}
\label{EFC_8c_a4}


Resolves all the indirect references in the specified master configuration file and files in both the EFC control structure and the filter specific control structure. 

\begin{Desc}
\item[Returns:]A pointer to the service vector of routines\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter Control block to initialize \item[{\em id}]A unique identifier to assign to this EFC handler \item[{\em schema}]Pointer to the schema of the filter configuration file \item[{\em schema\_\-key}]The schema's file resolution key \item[{\em prm}]An optional, modifying parameter \item[{\em eds\-Fw}]The controlling EDS framework handle \item[{\em sizes}]The sizes of the various components of this filter \item[{\em services}]The standard set of EFC services \item[{\em classes}]The status word classes (sets of bits giving the vetoes, passes, etc.) \item[{\em objects}]The list of EDS framework objects used by this filter \item[{\em needs}]The list of EDS needs for this filter.\end{description}
\end{Desc}
\begin{Desc}
\item[]The schema pertains to an instantiation of a filter. Each filter is described by 3 relevant pieces of information\end{Desc}
\begin{enumerate}
\item A set of global information. This includes\begin{itemize}
\item The primary schema ID of the filter itself. All filter configurations will be accessed using this ID and an instance number.\item A count of the number of configurations defined for this filter.\item A string, giving the name of the routine to get the filter service vector\end{itemize}
\item An array (dimensioned by the count indicated above) giving the instance ID of each configuration\item An array indicating which configuration (from the array configurations), will be used in each of 8 possible modes\end{enumerate}


\begin{Desc}
\item[]After locating the service vector, each configuration is constructed and the mapping of mode to configuration is resolved.\end{Desc}
\hypertarget{EFC_8c_a10}{
\index{EFC.c@{EFC.c}!construct_prescaler@{construct\_\-prescaler}}
\index{construct_prescaler@{construct\_\-prescaler}!EFC.c@{EFC.c}}
\subsubsection[construct\_\-prescaler]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int construct\_\-prescaler (\hyperlink{struct__EFC__samplerPrescaleCounter}{EFC\_\-sampler\-Prescale\-Counter} $\ast$ {\em prescaler}, int {\em refresh})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a10}


Constructs a prescaler. 

\begin{Desc}
\item[Returns:]Non-zero if this is an active prescaler\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prescaler}]The prescaler to configure \item[{\em refresh}]The refresh value\end{description}
\end{Desc}
\hypertarget{EFC_8c_a11}{
\index{EFC.c@{EFC.c}!construct_sampler@{construct\_\-sampler}}
\index{construct_sampler@{construct\_\-sampler}!EFC.c@{EFC.c}}
\subsubsection[construct\_\-sampler]{\setlength{\rightskip}{0pt plus 5cm}static void construct\_\-sampler (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$ {\em sampler}, const EFC\_\-DB\_\-sampler $\ast$ {\em db\_\-sampler}, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$ {\em classes})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a11}


Compiles/commits the set of user sampling parameters into the the configuration block. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sampler}]The destination parameter sampler block \item[{\em db\_\-sampler}]The set of user defined sampling parameters \item[{\em classes}]The bit list defining the various sets (classes) e.g. vetoes, passes, etc\end{description}
\end{Desc}
\hypertarget{EFC_8c_a5}{
\index{EFC.c@{EFC.c}!copyResult@{copyResult}}
\index{copyResult@{copyResult}!EFC.c@{EFC.c}}
\subsubsection[copyResult]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline void copy\-Result (EDS\_\-rsd\-Dsc $\ast$ {\em dsc}, unsigned int $\ast$ {\em results}, unsigned int {\em flip})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a5}


Copies the result vector into the result summary data descriptor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dsc}]The destination descriptor \item[{\em results}]The result descriptor \item[{\em flip}]Bits to flip in the first (status) word\end{description}
\end{Desc}
\hypertarget{EFC_8c_a15}{
\index{EFC.c@{EFC.c}!EFC_construct@{EFC\_\-construct}}
\index{EFC_construct@{EFC\_\-construct}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-construct]{\setlength{\rightskip}{0pt plus 5cm}const EDS\_\-fw\-Handler\-Services\-X1$\ast$ EFC\_\-construct (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, unsigned int {\em id}, const EFC\_\-DB\_\-Schema\-Filter $\ast$ {\em schema}, unsigned int {\em schema\_\-key}, void $\ast$ {\em prm}, EDS\_\-fw $\ast$ {\em eds\-Fw}, const \hyperlink{struct__EFC__definition}{EFC\_\-definition} $\ast$ {\em definition}, unsigned int {\em objects}, unsigned int {\em needs})}}
\label{EFC_8c_a15}


Resolves all the indirect references in the specified master configuration file and files in both the EFC control structure and the filter specific control structure. This is merely a call-through to the general purpose constructor. 

\begin{Desc}
\item[Returns:]A pointer to the service vector of routines\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter Control block to initialize \item[{\em id}]A unique identifier to assign to this EFC handler \item[{\em schema}]Pointer to the schema of the filter configuration file \item[{\em schema\_\-key}]The schema's file resolution key \item[{\em prm}]An optional, modifying parameter \item[{\em eds\-Fw}]The controlling EDS framework handle \item[{\em definition}]The defining information for this filter \item[{\em objects}]The list of EDS framework objects used by this filter \item[{\em needs}]The list of EDS needs for this filter.\end{description}
\end{Desc}
\hypertarget{EFC_8c_a26}{
\index{EFC.c@{EFC.c}!EFC_destruct@{EFC\_\-destruct}}
\index{EFC_destruct@{EFC\_\-destruct}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-destruct]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-destruct (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc})}}
\label{EFC_8c_a26}


Returns any resources garnered by EFC\_\-construct. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The event filter control structure to destroy\end{description}
\end{Desc}
\hypertarget{EFC_8c_a25}{
\index{EFC.c@{EFC.c}!EFC_filter@{EFC\_\-filter}}
\index{EFC_filter@{EFC\_\-filter}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-filter]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-filter (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, unsigned int {\em pkt\-Bytes}, EBF\_\-pkt $\ast$ {\em pkt}, EBF\_\-siv {\em siv}, EDS\_\-fw\-Ixb $\ast$ {\em ixb}, int {\em id})}}
\label{EFC_8c_a25}


Calls the filter function for each of the specified events. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The event filter control structure \item[{\em pkt\-Bytes}]The number bytes in this packet \item[{\em pkt}]The event packet \item[{\em siv}]The state information vector \item[{\em ixb}]The Information Exchange Block \item[{\em id}]The identification of this handler\end{description}
\end{Desc}
\begin{Desc}
\item[]The user will likely not call this routine directly, but use it as the EDS\_\-fw callback routine. The parameter will be the EFC control structure.\end{Desc}
\hypertarget{EFC_8c_a12}{
\index{EFC.c@{EFC.c}!efc_flush@{efc\_\-flush}}
\index{efc_flush@{efc\_\-flush}!EFC.c@{EFC.c}}
\subsubsection[efc\_\-flush]{\setlength{\rightskip}{0pt plus 5cm}static int efc\_\-flush (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, int {\em reason})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a12}


Currently just a call-through to EFA\_\-flush. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter Control block \item[{\em reason}]The flush reason\end{description}
\end{Desc}
\hypertarget{EFC_8c_a16}{
\index{EFC.c@{EFC.c}!EFC_get@{EFC\_\-get}}
\index{EFC_get@{EFC\_\-get}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-get]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ EFC\_\-get (const \hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, \hyperlink{EFC_8h_a9}{EFC\_\-OBJECT\_\-K} {\em object})}}
\label{EFC_8c_a16}


Returns a pointer to named object. 

\begin{Desc}
\item[Returns:]Pointer to the named object, or NULL if the object is non-existent\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter handle \item[{\em object}]The object to get. This is one of the following set\begin{itemize}
\item EFC\_\-OBJECT\_\-K\_\-MODE\item EFC\_\-OBJECT\_\-K\_\-FILTER\_\-RTN\item EFC\_\-OBJECT\_\-K\_\-FILTER\_\-PRM\item EFC\_\-OBJECT\_\-K\_\-CFGSET\_\-RTN\item EFC\_\-OBJECT\_\-K\_\-REPORT\_\-RTN\item EFC\_\-OBJECT\_\-K\_\-SAMPLER\item EFC\_\-OBJECT\_\-K\_\-EFA\item EFC\_\-OBJECT\_\-K\_\-ID\end{itemize}
\end{description}
\end{Desc}
\hypertarget{EFC_8c_a14}{
\index{EFC.c@{EFC.c}!EFC_lookup@{EFC\_\-lookup}}
\index{EFC_lookup@{EFC\_\-lookup}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-lookup]{\setlength{\rightskip}{0pt plus 5cm}const EFC\_\-DB\_\-Schema$\ast$ EFC\_\-lookup (unsigned short int {\em schema\_\-id}, unsigned short int {\em instance\_\-id})}}
\label{EFC_8c_a14}


Looks up the CDM database associated with the specified {\em schema\_\-id\/} and {\em instance\_\-id\/}. 

\begin{Desc}
\item[Returns:]A pointer to the filter schema. If not found NULL.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em schema\_\-id}]The schema id of the filter's configuration database \item[{\em instance\_\-id}]The instance id of the filter's configuratin database\end{description}
\end{Desc}
\hypertarget{EFC_8c_a20}{
\index{EFC.c@{EFC.c}!EFC_modeAssociate@{EFC\_\-modeAssociate}}
\index{EFC_modeAssociate@{EFC\_\-modeAssociate}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-modeAssociate]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-mode\-Associate (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, int {\em mode}, int {\em configuration})}}
\label{EFC_8c_a20}


Establish a new configuration to be associated with the indicated mode. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]old association\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The EFC control context \item[{\em mode}]The mode, must be 0-7 \item[{\em configuration}]One of the active configurations. This number is the index that the configurations where defined\end{description}
\end{Desc}
\begin{Desc}
\item[]Because this command is not given during data-taking, ff the mode being specified is the current mode, this routine does not change the current operating configuration.\end{Desc}
\hypertarget{EFC_8c_a21}{
\index{EFC.c@{EFC.c}!EFC_modeSelect@{EFC\_\-modeSelect}}
\index{EFC_modeSelect@{EFC\_\-modeSelect}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-modeSelect]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-mode\-Select (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, int {\em mode}, EDS\_\-cfg\-Info $\ast$ {\em info})}}
\label{EFC_8c_a21}


Selects the operating environment according to the specified mode. 

\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 efc}]The EFC control context \item[{\em mode}]The new mode, must be 0-7 \item[{\em info}]Returned with information about the newly selected configuration\end{description}
\end{Desc}
\hypertarget{EFC_8c_a19}{
\index{EFC.c@{EFC.c}!EFC_needsGet@{EFC\_\-needsGet}}
\index{EFC_needsGet@{EFC\_\-needsGet}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-needsGet]{\setlength{\rightskip}{0pt plus 5cm}unsigned int EFC\_\-needs\-Get (const \hyperlink{struct__EFC}{EFC} $\ast$ {\em efc})}}
\label{EFC_8c_a19}


Returns the list of EDS framework needs for this filter. 

\begin{Desc}
\item[Returns:]The list of EDS framework needs for this filter\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The EFC control context\end{description}
\end{Desc}
\hypertarget{EFC_8c_a18}{
\index{EFC.c@{EFC.c}!EFC_objectsGet@{EFC\_\-objectsGet}}
\index{EFC_objectsGet@{EFC\_\-objectsGet}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-objectsGet]{\setlength{\rightskip}{0pt plus 5cm}unsigned int EFC\_\-objects\-Get (const \hyperlink{struct__EFC}{EFC} $\ast$ {\em efc})}}
\label{EFC_8c_a18}


Returns the list of EDS framework objects needed by this filter. 

\begin{Desc}
\item[Returns:]The list of EDS framework objects needed by this filter\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The EFC control context\end{description}
\end{Desc}
\hypertarget{EFC_8c_a24}{
\index{EFC.c@{EFC.c}!EFC_report@{EFC\_\-report}}
\index{EFC_report@{EFC\_\-report}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-report]{\setlength{\rightskip}{0pt plus 5cm}void EFC\_\-report (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, unsigned int {\em list})}}
\label{EFC_8c_a24}


Calls back the user to report on the configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter Control Block \item[{\em list}]The bit list of which ones to report on. If 0, then report only on the current one\end{description}
\end{Desc}
\hypertarget{EFC_8c_a13}{
\index{EFC.c@{EFC.c}!efc_result_sizeof@{efc\_\-result\_\-sizeof}}
\index{efc_result_sizeof@{efc\_\-result\_\-sizeof}!EFC.c@{EFC.c}}
\subsubsection[efc\_\-result\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}static int efc\_\-result\_\-sizeof (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a13}


Just a call-through to EFA\_\-result\-Sizeof. 

\begin{Desc}
\item[Returns:]The sizeof on result vector\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter Control block\end{description}
\end{Desc}
\hypertarget{EFC_8c_a17}{
\index{EFC.c@{EFC.c}!EFC_set@{EFC\_\-set}}
\index{EFC_set@{EFC\_\-set}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-set]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-set (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, \hyperlink{EFC_8h_a9}{EFC\_\-OBJECT\_\-K} {\em object}, void $\ast$ {\em value})}}
\label{EFC_8c_a17}


Sets the named object to the specified value. This is primarily used for backdoor debugging. 

\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0,Named}]object is settable \item[{\em -1,Named}]object is not setteable\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The Event Filter handle \item[{\em object}]The object to set. The following objects are supported EFC\_\-OBJECT\_\-K\_\-MODE EFC\_\-OBJECT\_\-K\_\-FILTER\_\-RTN EFC\_\-OBJECT\_\-K\_\-FILTER\_\-PRM EFC\_\-OBJECT\_\-K\_\-CFGSET\_\-RTN EFC\_\-OBJECT\_\-K\_\-REPORT\_\-RTN \item[{\em value}]The new value\end{description}
\end{Desc}
\hypertarget{EFC_8c_a23}{
\index{EFC.c@{EFC.c}!EFC_sizeof@{EFC\_\-sizeof}}
\index{EFC_sizeof@{EFC\_\-sizeof}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-sizeof]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-sizeof (const EFC\_\-DB\_\-Schema\-Filter $\ast$ {\em schema}, void $\ast$ {\em prm}, const \hyperlink{struct__EFC__sizes}{EFC\_\-sizes} $\ast$ {\em sizes})}}
\label{EFC_8c_a23}


Returns the size, in bytes, of the filter control structure and the associated configuration constants. 

\begin{Desc}
\item[Returns:]The size, in bytes, of the filter control structure and the associated configuration constants.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em schema}]Pointer to the schema of the filter configuration file \item[{\em prm}]An optional, modifying parameter \item[{\em sizes}]The sizes of the filter's various blocks\end{description}
\end{Desc}
\begin{Desc}
\item[Warning:]This is a usually a good sized object so use an appropriate allocator.\end{Desc}
\hypertarget{EFC_8c_a22}{
\index{EFC.c@{EFC.c}!EFC_start@{EFC\_\-start}}
\index{EFC_start@{EFC\_\-start}!EFC.c@{EFC.c}}
\subsubsection[EFC\_\-start]{\setlength{\rightskip}{0pt plus 5cm}int EFC\_\-start (\hyperlink{struct__EFC}{EFC} $\ast$ {\em efc}, unsigned int {\em reason}, unsigned int {\em run\_\-id}, unsigned int {\em start\_\-time}, unsigned int {\em mode})}}
\label{EFC_8c_a22}


EDS start run callback routine. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em efc}]The event filter control handle \item[{\em reason}]Suggested use is to indicate why the post stream is being started \item[{\em run\_\-id}]Suggested use is to identify the block of events between when EDS\_\-fw\-Start is called and EDS\_\-fw\-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. Note that a call to EDS\_\-select\-Mode still must be done.\end{description}
\end{Desc}
\hypertarget{EFC_8c_a6}{
\index{EFC.c@{EFC.c}!getActive@{getActive}}
\index{getActive@{getActive}!EFC.c@{EFC.c}}
\subsubsection[getActive]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int get\-Active (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$ {\em sampler})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a6}


Gets the active set of vetoes and passes bits for this event. 

\begin{Desc}
\item[Returns:]The active set of vetoes and passes bits for this event\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sampler}]The prescale/sampling structure\end{description}
\end{Desc}
\hypertarget{EFC_8c_a9}{
\index{EFC.c@{EFC.c}!if_would_have_been_vetoed@{if\_\-would\_\-have\_\-been\_\-vetoed}}
\index{if_would_have_been_vetoed@{if\_\-would\_\-have\_\-been\_\-vetoed}!EFC.c@{EFC.c}}
\subsubsection[if\_\-would\_\-have\_\-been\_\-vetoed]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline int if\_\-would\_\-have\_\-been\_\-vetoed (int {\em status}, const \hyperlink{struct__EFC__classes}{EFC\_\-classes} $\ast$ {\em enabled})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a9}


\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em ==0,if}]the status indicates the event normally would {\bf not} have been vetoed \item[{\em !=0,if}]the status indicates the event normally would have been vetoed\end{description}
\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]The filter status word \item[{\em enabled}]The enabled classes (vetoed, passes are all that is important.\end{description}
\end{Desc}
This function is called in the case when the active veto mask was set to 0. In this case, a filter will {\bf always} run to completion and the overall veto bit (the MSB) will be 0 in this case. However, in order to be consistent with other prescale leakage, the state of the overall veto bit must be determined as if the veto mask was its nominal value. This ensures that the status byte (state) of the event is properly recorded as LEAKED or PASSED.\hypertarget{EFC_8c_a7}{
\index{EFC.c@{EFC.c}!updateDisabledPasses@{updateDisabledPasses}}
\index{updateDisabledPasses@{updateDisabledPasses}!EFC.c@{EFC.c}}
\subsubsection[updateDisabledPasses]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int update\-Disabled\-Passes (\hyperlink{struct__EFC__sampler}{EFC\_\-sampler} $\ast$ {\em sampler}, unsigned int {\em disabled\_\-passes}, unsigned int {\em status})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{EFC_8c_a7}


Updates the list of disabled pass bits. 

\begin{Desc}
\item[Returns:]The updated list\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sampler}]The sampler \item[{\em disabled\_\-passes}]The list of currently disabled passes \item[{\em status}]The status bits\end{description}
\end{Desc}
\hypertarget{EFC_8c_a8}{
\index{EFC.c@{EFC.c}!updatePrescaler@{updatePrescaler}}
\index{updatePrescaler@{updatePrescaler}!EFC.c@{EFC.c}}
\subsubsection[updatePrescaler]{\setlength{\rightskip}{0pt plus 5cm}int update\-Prescaler (\hyperlink{struct__EFC__samplerPrescaleCounter}{EFC\_\-sampler\-Prescale\-Counter} $\ast$ {\em prescaler})}}
\label{EFC_8c_a8}


Updates the prescaler. 

\begin{Desc}
\item[Returns:]The current prescale count\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prescaler}]The prescaler to update\end{description}
\end{Desc}
