GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-1-0 > lci / rhel5-32
Routines to collect the event data. More...
#include <lci_p.h>
#include <LCI/LCI_msgs.h>
#include <LSEC/LSEC.h>
#include <LSEC/enums.h>
#include <LEM/list.h>
#include <LEM/defs.h>
#include <MSG/MSG_pubdefs.h>
#include <EDS/EBF_pkt.h>
#include <EDS/EBF_edw.h>
#include <LCBD/LCBD_evt.h>
#include <PBS/MBA.h>
#include <PBS/WCT.h>
#include <string.h>
#include <stdio.h>
Functions | |
void | LCI_collClearCounts (LCI_collection *cll) |
Clear collection counters. | |
void | LCI_collCounts (LCI_collection *cll, unsigned int *nWait, unsigned int *nSignal, unsigned int *nTimeout) |
Get collection counters. | |
LCI_collection * | LCI_collCreate (LSEC_control *lsec) |
Allocate and initialise a collection structure. | |
void | LCI_collDelete (LCI_collection *cll) |
Free a structure previously allocated using LCI_collCreate. | |
unsigned | LCI_collect (LCI_collection *cll, unsigned nev, unsigned period) |
Initiate the calibration triggers and wait for each event to be collected and constructed. | |
unsigned | LCI_collected (LCI_collection *cll) |
Get the number of events collected. | |
void | LCI_collRunInit (LCI_collection *cll, LCBD lcbd, LEM_micr *cr) |
Initialize for a new calibration run. | |
void | LCI_collRunTerm (LCI_collection *cll) |
Terminate a calibration run. | |
void | LCI_collTime (LCI_collection *cll, int clear, long long *ctime) |
Return accumulated collection time. |
Routines to collect the event data.
$Id: collect.c,v 1.14 2011/03/29 19:32:56 saxton Exp $
void LCI_collClearCounts | ( | LCI_collection * | cll | ) |
Clear collection counters.
This routine calls through to the cue counter clear routine.
cll | Pointer to an allocated and initialised collection structure that has been used to collect events |
References LCI_clearCueCounts().
Referenced by LCI_calibrate().
void LCI_collCounts | ( | LCI_collection * | cll, |
unsigned int * | nWait, | ||
unsigned int * | nSignal, | ||
unsigned int * | nTimeout | ||
) |
Get collection counters.
This routine calls through to the cue counters get routine, returning the counts accumulated since the last clear.
cll | Pointer to a collection structure. |
nWait | Address of an integer to receive the number of wait calls, or NULL if not needed. |
nSignal | Address of an integer to receive the number of signal calls, or NULL if not needed. |
nTimeout | Address of an integer to receive the number of timeouts, or NULL if not needed. |
References LCI_getCueCounts().
Referenced by LCI_terminate().
LCI_collection* LCI_collCreate | ( | LSEC_control * | lsec | ) |
Allocate and initialise a collection structure.
lsec | LSEC access handle. |
References LCI_collDelete(), and LCI_newCue().
Referenced by LCI_newController().
void LCI_collDelete | ( | LCI_collection * | cll | ) |
Free a structure previously allocated using LCI_collCreate.
cll | Pointer to an allocated and initialised LCI_collection structure |
References LCI_deleteCue().
Referenced by LCI_collCreate(), and LCI_deleteController().
unsigned LCI_collect | ( | LCI_collection * | cll, |
unsigned | nev, | ||
unsigned | period | ||
) |
Initiate the calibration triggers and wait for each event to be collected and constructed.
cll | Pointer to an intialised event collection structure |
nev | Number of events to be collected |
period | The period (in 50 ns ticks) between triggers |
LCI_SUCCESS | If all the expected events were successfully collected |
LCI_LOSTEVT | If some of the events were not collected |
References LCI_clearCue(), and LCI_waitCue().
unsigned LCI_collected | ( | LCI_collection * | cll | ) |
Get the number of events collected.
cll | Pointer to an allocated and initialised collection structure that has been used to collect events |
void LCI_collRunInit | ( | LCI_collection * | cll, |
LCBD | lcbd, | ||
LEM_micr * | cr | ||
) |
Initialize for a new calibration run.
This routine saves the lcbd and cr pointers and sets up the event callback routine.
cll | Pointer to a collection structure. |
lcbd | Pointer to the LCB control block, |
cr | Pointer to a multi-item command-response list. |
Referenced by LCI_calibrate().
void LCI_collRunTerm | ( | LCI_collection * | cll | ) |
Terminate a calibration run.
The event callback is set back to its original value.
cll | Pointer to a collection structure. |
Referenced by LCI_terminate().
void LCI_collTime | ( | LCI_collection * | cll, |
int | clear, | ||
long long * | ctime | ||
) |
Return accumulated collection time.
cll | Pointer to a collection structure. |
clear | If TRUE, clear the time after copying it. |
ctime | Address of a variable to receive the accumulated time taken to do collections, or NULL if no time wanted. |
Referenced by LCI_calibrate().