GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDST / dev > ebf_fes / rhel4-32
#include <EDST/EDST_compareList.h>
#include <EDS/EDS_fw.h>
#include <EDS/EBF_dir.h>
#include <EDS/LCBV.h>
#include <EDS/io/EBF_stream.h>
#include <EDS/io/LCBP.h>
#include <PBI/FFS.ih>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Functions | |
static __inline void * | MBA_alloc (int size) |
static __inline void | MBA_free (void *p) |
unsigned int | EDST_compareInit (EBF_streamType type, const char *name, int firstEvtNum, unsigned int verbose) |
Reads in EBF file and preprocesses it into a structure of contigous events used in a compare test. | |
unsigned int | EDST_compareFind (int gemFileSeqNum, int *fileSeqNum, int *retMissingEvts, int *evtLen32, unsigned int **gemPtr32) |
Finds event with given fileSeqNum starting with last evt accessed, return info on it. | |
unsigned int | EDST_compareNextCtb (int numInt32, unsigned int **evtPtr32, int *evtLen32, int *contribOff32, int *contribId) |
find next contributor or partial contributor in compare list | |
unsigned int | EDST_compareCtbById (int id, unsigned int **evtPtr32, int *evtLen32) |
return next whole contributor by id | |
int | EDST_compareReady () |
indicated EDST_compareInit() has been run | |
void | EDST_compareClose () |
closes up compare structure and deallocates memory | |
int | EDST_expectedFileSeqNum () |
return the next fileSeqNum expeccted based on last evt accessed | |
int | EDST_reset () |
reset compare list to beginning |
unsigned int EDST_compareCtbById | ( | int | id, | |
unsigned int ** | evtPtr32, | |||
int * | evtLen32 | |||
) |
return next whole contributor by id
id | requested contrib id | |
evtPtr32 | pointer to contributor in compare list | |
evtLen32 | len of contributor in compare list |
References _EDST_CompareEvt::contribIds, _EDST_CompareEvt::contribLen32, and _EDST_CompareEvt::contribPtrs.
unsigned int EDST_compareFind | ( | int | gemFileSeqNum, | |
int * | fileSeqNum, | |||
int * | retMissingEvts, | |||
int * | evtLen32, | |||
unsigned int ** | gemPtr32 | |||
) |
Finds event with given fileSeqNum starting with last evt accessed, return info on it.
gemFileSeqNum | 11 bit tag from GEM to use to find evt in file | |
fileSeqNum | returns index of found event in the file | |
retMissingEvts | returns number of events skipped before found (indicates dead time), ret=-1 means cannot find,ret=0=found immediate,ret=N found after skip N evt | |
evtLen32 | returns length of found event in ints | |
gemPtr32 | returns ptr to found evt, the first contribution is always the gem |
The caller should get the fileSeqNum from the GEM header of its data. THis routine will return the matching evt from the EBF file which the caller will compare its evt data with.
References _EDST_CompareEvt::evtLen32, and _EDST_CompareEvt::evtPtr.
unsigned int EDST_compareInit | ( | EBF_streamType | type, | |
const char * | name, | |||
int | firstEvtNum, | |||
unsigned int | verbose | |||
) |
Reads in EBF file and preprocesses it into a structure of contigous events used in a compare test.
type | The type of stream to open 0=FILE, 1=DATA | |
name | The file name or address of the data section | |
firstEvtNum | number of evts in file to skip from beginning of file | |
verbose | Print lots of info |
References EDST_compareClose().
Referenced by main().
unsigned int EDST_compareNextCtb | ( | int | numInt32, | |
unsigned int ** | evtPtr32, | |||
int * | evtLen32, | |||
int * | contribOff32, | |||
int * | contribId | |||
) |
find next contributor or partial contributor in compare list
numInt32 | ints requested, this is length of buffer that caller has with data | |
evtPtr32 | returns pointer with data that caller compares his data with | |
evtLen32 | len of this segment, may be <= numInt32 requested | |
contribOff32 | offset of evtPtr32 into a contrbutor,0 indicates start | |
contribId | contrib ID of data pointer to by evtPtr32 THis routine is called a number of times after EDST_compareFind() to process thru the evt it finds.It is used to process that evt returning pointers to data to compare with. THe state of which evt and where within evt is stored internally. |
References _EDST_CompareEvt::contribIds, _EDST_CompareEvt::contribLen32, _EDST_CompareEvt::contribNum, and _EDST_CompareEvt::contribPtrs.
int EDST_expectedFileSeqNum | ( | ) |
return the next fileSeqNum expeccted based on last evt accessed
int EDST_reset | ( | ) |
reset compare list to beginning