GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > ebfio / rhel6-32
#include <EDS/EBF_dir.h>
#include <EDS/io/ESX.h>
#include <EDS/io/EBF_stream.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
Classes | |
struct | _ESX_ctl |
Output file context. More... | |
Typedefs | |
typedef struct _ESX_ctl | ESX_ctl |
Functions | |
static unsigned int | get_number (const char *s) |
Parses the input string, returning the integer equivalent. | |
unsigned int | ESX_sizeof (void) |
void | ESX_construct (ESX_ctl *esx) |
unsigned int | ESX_set_verbose (ESX_ctl *esx, unsigned int verbose) |
void | ESX_parse_oname (ESX_ctl *esx, const char *oname) |
void | ESX_parse_ochunk (ESX_ctl *esx, const char *s) |
void | ESX_parse_ichunk (ESX_ctl *esx, const char *s) |
void | ESX_parse_bsize (ESX_ctl *esx, const char *s) |
void | ESX_parse_osize (ESX_ctl *esx, const char *s) |
int | ESX_update_osize (ESX_ctl *esx, unsigned int size) |
void | ESX_close (ESX_ctl *esx) |
Closes the output stream. | |
unsigned int | ESX_establish (ESX_ctl *esx) |
int | ESX_change (ESX_ctl *esx) |
Creates a new output file. | |
int __inline | ESX_evt_declare (ESX_ctl *esx) |
Declares an input event has been seen. This information is used to determine whether to trigger the creation of a new output file. | |
int | ESX_dir_write (ESX_ctl *esx, EBF_dir *dir) |
Writes the event. |
CVS $Id: ESX.c,v 1.5 2011/03/25 22:16:57 russell Exp $
int EBF_stream ESX_change | ( | ESX_ctl * | esx | ) |
Creates a new output file.
esx | The control structure |
References _ESX_ctl::base, EBF_streamChange(), _ESX_ctl::ichunk, _ESX_ctl::jevents, _ESX_ctl::jobytes, _ESX_ctl::last_size, _ESX_ctl::nam, _ESX_ctl::nevents, _ESX_ctl::new, _ESX_ctl::nobytes, _ESX_ctl::stream, and _ESX_ctl::verbose.
Referenced by ESX_dir_write().
void ESX_close | ( | ESX_ctl * | esx | ) |
Closes the output stream.
esx | The control block |
References EBF_streamClose(), EBF_streamFree(), and _ESX_ctl::stream.
Writes the event.
esx | The control structure | |
dir | The directory of the event to write out |
References _ESX_ctl::bsize, EBF_streamDirCopy(), EBF_streamDirCopySize(), EBF_streamDirWrite(), EBF_streamDirWriteSize(), EBF_streamPktSizeFind(), ESX_change(), ESX_evt_declare(), _EBF_dirRedux::evt_len, _ESX_ctl::jevents, _ESX_ctl::new, _EBF_dir::redux, and _ESX_ctl::stream.
int __inline ESX_evt_declare | ( | ESX_ctl * | esx | ) |
Declares an input event has been seen. This information is used to determine whether to trigger the creation of a new output file.
esx | The control structure |
References _ESX_ctl::jevents, and _ESX_ctl::new.
Referenced by ESX_dir_write().
static unsigned int get_number | ( | const char * | s | ) | [static] |
Parses the input string, returning the integer equivalent.
s | The string to parse |
-K Hexadecimal kilobytes (scale by 1024) -M Hexadecimal megabytes (scale by 1024 * 1024) -B LCB blocks (scale by 128, max of 31) Examples
s result
"100" 100
"100K" 100*1024
"100M" 100*1024*124
"31C 31*128