GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > ebfio / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

EBF_evts.c File Reference

EBF evts, Implementation. This provides an iterator like facility for a vector of events and some other assorted utilities. More...

#include <EDS/io/EBF_evt.ih>
#include <EDS/io/EBF_evts.h>

Functions

int EBF_evtsCount (EBF_evts evts)
 Counts the number of events.
EBF_evts EBF_evtsLimit (EBF_evts evts, int limit)
 Limits the events to the specified number of events.
EBF_evts EBF_evtsMcSeek (EBF_evts evts, unsigned int mcNumber)
 Advances the evts to the event with Monte Carlo number mcNumber.
EBF_evts EBF_evtsSeqSeek (EBF_evts evts, unsigned int seqNumber)
 Advances the evts to the event with trigger event sequence number seqNumber.
EBF_evts EBF_evtsSkip (EBF_evts evts, int skip)
 Returns an events vector with the specified number of events skipped.
EBF_evts EBF_evtsSetup (EBF_evts evts, int skip, int limit)
 Skips and limits the number of events.


Detailed Description

EBF evts, Implementation. This provides an iterator like facility for a vector of events and some other assorted utilities.

Author:
JJRussell - russell@slac.stanford.edu

    CVS $Id: EBF_evts.c,v 1.4 2011/08/04 19:46:12 russell Exp $

Function Documentation

int EBF_evtsCount ( EBF_evts  evts  ) 

Counts the number of events.

Returns:
The number of events in evts
Parameters:
evts The vector of events to count

References EBF__evtsNext(), _EBF_evts_u::es, and _EBF_evts_es::size.

int EBF_evtsLimit ( EBF_evts  evts,
int  limit 
)

Limits the events to the specified number of events.

Returns:
The number of events in evts
Parameters:
evts The vector of events to limit
limit The number of events to limit the vector of events to
This limits the events vector to the specified number of events. If nevts is specified as -1, this is taken as a flag to not limit the events vector and the events vector is returned as is.

References EBF__evtsNext(), _EBF_evts_u::es, and _EBF_evts_es::size.

Referenced by EBF_evtsSetup().

EBF_evts EBF_evtsMcSeek ( EBF_evts  evts,
unsigned int  mcNumber 
)

Advances the evts to the event with Monte Carlo number mcNumber.

Returns:
New event vector
Parameters:
evts The target vector of events
mcNumber The Monte Carlo event number to seek
This function advances the evts vector to the event with the requested Monte Carlo event number. If no such event exists, the empty event vector (no events left size == 0) is returned.

References EBF__evtsNext(), _EBF_evts_u::es, _EBF_evts_es::evt, _EBF_evt::hdr, _EBF_evts_es::size, and _EBF_pktHdr::undef.

EBF_evts EBF_evtsSeqSeek ( EBF_evts  evts,
unsigned int  seqNumber 
)

Advances the evts to the event with trigger event sequence number seqNumber.

Returns:
New event vector
Parameters:
evts The target vector of events
seqNumber The trigger event sequence number
This function advances the evts vector to the event with the requested event sequence number. If no such event exists, the empty event vector (no events left size == 0) is returned.
Warning:
Technically the trigger event sequence number is only 17 bits in length. If the events vector contains more than 2**17 events, this routine will manufacture the additional bits whenever the trigger event sequence number rolls-over. This is process is unique only if one always starts at the beginning of the events file. If it is started another place, such on a previously returned events vector, it will not be.

References _EBF_evt::ctb, EBF__evtsNext(), EBF_ESW_SEQ, _EBF_evts_u::es, _EBF_ctbHdr::esw, _EBF_evts_es::evt, _EBF_ctb::hdr, _EBF_evts_es::size, and _EBF_esw::ui.

EBF_evts EBF_evtsSetup ( EBF_evts  evts,
int  skip,
int  limit 
)

Skips and limits the number of events.

Returns:
New event vector
Parameters:
evts Pointer to the vector of events to be skipped and limited
skip The number of events to skip
limit The number of events to limit the vector of events to

References EBF_evtsLimit(), and EBF_evtsSkip().

Referenced by EBF_streamProcess().

EBF_evts EBF_evtsSkip ( EBF_evts  evts,
int  skip 
)

Returns an events vector with the specified number of events skipped.

Returns:
New event vector
Parameters:
evts The base vector of events
skip The number of events to skip

References EBF__evtsNext(), _EBF_evts_u::es, and _EBF_evts_es::size.

Referenced by EBF_evtsSetup().


Generated on Fri Dec 9 16:49:19 2011 by  doxygen 1.5.8