\hypertarget{ESX_8c}{
\section{ESX.c File Reference}
\label{ESX_8c}\index{ESX.c@{ESX.c}}
}
EBF Selection and Extract utilities. 

{\tt \#include \char`\"{}EDS/EBF\_\-dir.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/io/ESX.h\char`\"{}}\par
{\tt \#include \char`\"{}EDS/io/EBF\_\-stream.h\char`\"{}}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par


Include dependency graph for ESX.c:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=258pt]{ESX_8c__incl}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__ESX__ctl}{\_\-ESX\_\-ctl}
\begin{CompactList}\small\item\em Output file context. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{ESX_8c_c97fdac22eba2cb635d52b4f27ff899a}{
typedef struct \hyperlink{struct__ESX__ctl}{\_\-ESX\_\-ctl} \textbf{ESX\_\-ctl}}
\label{ESX_8c_c97fdac22eba2cb635d52b4f27ff899a}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static unsigned int \hyperlink{ESX_8c_fc6e527c8a730d4ce5c555de6b81c874}{get\_\-number} (const char $\ast$s)
\begin{CompactList}\small\item\em Parses the input string, returning the integer equivalent. \item\end{CompactList}\item 
\hypertarget{ESX_8c_8011afbe8567295db13fb705fc9ce721}{
unsigned int \textbf{ESX\_\-sizeof} (void)}
\label{ESX_8c_8011afbe8567295db13fb705fc9ce721}

\item 
\hypertarget{ESX_8c_f16a1b732de23cf377a3176ee969653c}{
void \textbf{ESX\_\-construct} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx)}
\label{ESX_8c_f16a1b732de23cf377a3176ee969653c}

\item 
\hypertarget{ESX_8c_db771e4c6f33f17f74bd60e3a163d77a}{
unsigned int \textbf{ESX\_\-set\_\-verbose} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, unsigned int verbose)}
\label{ESX_8c_db771e4c6f33f17f74bd60e3a163d77a}

\item 
\hypertarget{ESX_8c_fa94f82a16bb0fc9624ddc7647c3a13a}{
void \textbf{ESX\_\-parse\_\-oname} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, const char $\ast$oname)}
\label{ESX_8c_fa94f82a16bb0fc9624ddc7647c3a13a}

\item 
\hypertarget{ESX_8c_7a4838fc6580028a43c6e727ab5a69eb}{
void \textbf{ESX\_\-parse\_\-ochunk} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, const char $\ast$s)}
\label{ESX_8c_7a4838fc6580028a43c6e727ab5a69eb}

\item 
\hypertarget{ESX_8c_2aaa3e38493e20e03b881f96a0ab387f}{
void \textbf{ESX\_\-parse\_\-ichunk} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, const char $\ast$s)}
\label{ESX_8c_2aaa3e38493e20e03b881f96a0ab387f}

\item 
\hypertarget{ESX_8c_8309bd6a77211c4d5b7812f3cb2daaf6}{
void \textbf{ESX\_\-parse\_\-bsize} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, const char $\ast$s)}
\label{ESX_8c_8309bd6a77211c4d5b7812f3cb2daaf6}

\item 
\hypertarget{ESX_8c_7e3ac44220f1485aa74dd80972ca1aa7}{
void \textbf{ESX\_\-parse\_\-osize} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, const char $\ast$s)}
\label{ESX_8c_7e3ac44220f1485aa74dd80972ca1aa7}

\item 
\hypertarget{ESX_8c_5b5e512556632a49b719d66fe52175d0}{
int \textbf{ESX\_\-update\_\-osize} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, unsigned int size)}
\label{ESX_8c_5b5e512556632a49b719d66fe52175d0}

\item 
void \hyperlink{ESX_8c_97cc34bdc2c9b737f7f7e07d43b68dbb}{ESX\_\-close} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx)
\begin{CompactList}\small\item\em Closes the output stream. \item\end{CompactList}\item 
\hypertarget{ESX_8c_d2d09419094c8f659ac397109a651e26}{
unsigned int \textbf{ESX\_\-establish} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx)}
\label{ESX_8c_d2d09419094c8f659ac397109a651e26}

\item 
int \hyperlink{ESX_8c_6980c668f75f013fac1d811f3f0ecda5}{ESX\_\-change} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx)
\begin{CompactList}\small\item\em Creates a new output file. \item\end{CompactList}\item 
int \_\-\_\-inline \hyperlink{ESX_8c_110953cc095393636088219fcee19e7b}{ESX\_\-evt\_\-declare} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx)
\begin{CompactList}\small\item\em Declares an input event has been seen. This information is used to determine whether to trigger the creation of a new output file. \item\end{CompactList}\item 
int \hyperlink{ESX_8c_564d94b14c93f7696282391f5de3afbe}{ESX\_\-dir\_\-write} (\hyperlink{struct__ESX__ctl}{ESX\_\-ctl} $\ast$esx, \hyperlink{struct__EBF__dir}{EBF\_\-dir} $\ast$dir)
\begin{CompactList}\small\item\em Writes the event. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
EBF Selection and Extract utilities. 

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


\footnotesize\begin{verbatim}

   CVS $Id: ESX.c,v 1.4 2009/04/29 20:10:16 russell Exp $
\end{verbatim}
\normalsize
 

\subsection{Function Documentation}
\hypertarget{ESX_8c_6980c668f75f013fac1d811f3f0ecda5}{
\index{ESX.c@{ESX.c}!ESX_change@{ESX\_\-change}}
\index{ESX_change@{ESX\_\-change}!ESX.c@{ESX.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf EBF\_\-stream} ESX\_\-change ({\bf ESX\_\-ctl} $\ast$ {\em esx})}}
\label{ESX_8c_6980c668f75f013fac1d811f3f0ecda5}


Creates a new output file. 

\begin{Desc}
\item[Returns:]A pointer to the stream\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em esx}]The control structure \end{description}
\end{Desc}
\hypertarget{ESX_8c_97cc34bdc2c9b737f7f7e07d43b68dbb}{
\index{ESX.c@{ESX.c}!ESX_close@{ESX\_\-close}}
\index{ESX_close@{ESX\_\-close}!ESX.c@{ESX.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ESX\_\-close ({\bf ESX\_\-ctl} $\ast$ {\em esx})}}
\label{ESX_8c_97cc34bdc2c9b737f7f7e07d43b68dbb}


Closes the output stream. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em esx}]The control block \end{description}
\end{Desc}
\hypertarget{ESX_8c_564d94b14c93f7696282391f5de3afbe}{
\index{ESX.c@{ESX.c}!ESX_dir_write@{ESX\_\-dir\_\-write}}
\index{ESX_dir_write@{ESX\_\-dir\_\-write}!ESX.c@{ESX.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ESX\_\-dir\_\-write ({\bf ESX\_\-ctl} $\ast$ {\em esx}, {\bf EBF\_\-dir} $\ast$ {\em dir})}}
\label{ESX_8c_564d94b14c93f7696282391f5de3afbe}


Writes the event. 

\begin{Desc}
\item[Returns:]Status\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em esx}]The control structure \item[{\em dir}]The directory of the event to write out \end{description}
\end{Desc}
\hypertarget{ESX_8c_110953cc095393636088219fcee19e7b}{
\index{ESX.c@{ESX.c}!ESX_evt_declare@{ESX\_\-evt\_\-declare}}
\index{ESX_evt_declare@{ESX\_\-evt\_\-declare}!ESX.c@{ESX.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int \_\-\_\-inline ESX\_\-evt\_\-declare ({\bf ESX\_\-ctl} $\ast$ {\em esx})}}
\label{ESX_8c_110953cc095393636088219fcee19e7b}


Declares an input event has been seen. This information is used to determine whether to trigger the creation of a new output file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em esx}]The control structure \end{description}
\end{Desc}
\hypertarget{ESX_8c_fc6e527c8a730d4ce5c555de6b81c874}{
\index{ESX.c@{ESX.c}!get_number@{get\_\-number}}
\index{get_number@{get\_\-number}!ESX.c@{ESX.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static unsigned int get\_\-number (const char $\ast$ {\em s})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{ESX_8c_fc6e527c8a730d4ce5c555de6b81c874}


Parses the input string, returning the integer equivalent. 

\begin{Desc}
\item[Returns:]The integer equivalent\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s}]The string to parse\end{description}
\end{Desc}
The string must be in the form of a conventionally specified C integer and may optionally be followed by the suffix K, M, C. These give the scaling or units

-K Hexadecimal kilobytes (scale by 1024) -M Hexadecimal megabytes (scale by 1024 $\ast$ 1024) -B LCB blocks (scale by 128, max of 31) Examples\par
 s result\par
 \char`\"{}100\char`\"{} 100\par
 \char`\"{}100K\char`\"{} 100$\ast$1024\par
 \char`\"{}100M\char`\"{} 100$\ast$1024$\ast$124\par
 \char`\"{}31C 31$\ast$128\par
 