GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-0 > iefc / rhel6-64
#include <EFC/EFA_def.h>
Typedefs | |
| typedef struct _EFA | EFA |
| typedef struct _EFA_hdr | EFA_hdr |
| typedef struct _EDS_cfgInfo | EDS_cfgInfo |
Functions | |
| int | EFA_construct (EFA *efa, void *pool, int enable, const EFA_services *services, void *ctx, unsigned int size, unsigned int postCnt, unsigned int recCnt) |
| Set up the internal data structures of the EFA control structure. | |
| int | EFA_flush (EFA *efa, int reason) |
| Forces a posting of the current results. | |
| int | EFA_notify (EFA *efa, int mode, const EDS_cfgInfo *cfg) |
| Callback signature to notify an analyis routine of a mode change. | |
| int | EFA_resultSizeof (const EFA *efa) |
| Returns the size, in bytes, of one result vector. | |
| int | EFA_sizeof (int result_size, int result_cnt) |
| Computes the size, in bytes, of the EFA control structure. | |
| int | EFA_enable (EFA *efa, int enable) |
| Enables/disables EFA. This can only be done outside the context of a run, i.e. the state must be STOPPED. | |
| int | EFA_start (EFA *efa, int reason, int run_id, int startTime, int mode) |
| Callback signature to start or prepare a posting stream to receive events. | |
| unsigned int | EFA_hdrCompose (EFA_hdr *hdr, unsigned int relative, unsigned long long seq, unsigned int gemClock, unsigned int gemStrobe) |
| Composes specified event header. | |
CVS $Id: EFA.h,v 1.2 2011/03/27 04:55:29 russell Exp $
| int EFA_construct | ( | EFA * | efa, | |
| void * | pool, | |||
| int | enable, | |||
| const EFA_services * | services, | |||
| void * | ctx, | |||
| unsigned int | size, | |||
| unsigned int | postCnt, | |||
| unsigned int | flushCnt | |||
| ) |
Set up the internal data structures of the EFA control structure.
| 0,Success |
| efa | The Event Filter Analysis control structure | |
| pool | The memory pool | |
| enable | 1 if start in the enabled state, else start in the disabled state | |
| services | The set of service routines | |
| ctx | Arbitrary user context parameter passed to the user callback routines | |
| size | The size of a result vector. This value should have been obtained by a call to EFA_resultSizeof This routine checks that this value matches that from EFA_resultSizeof. | |
| postCnt | The number of result vectors in a packet. This results in a process flush reason | |
| flushCnt | The number of result vectors before a flush is issued. This results in a process LSF_REASON_CLOSE_K_STOP_CNT flush reason. |
References _EFA::beg, _EFA::beg_evt_fill, _EFA::ctx, _EFA::cur, EFA_alloc(), EFA_STATE_K_DISABLED, EFA_STATE_K_STOPPED, _EFA::flushLeft, _EFA::flushLimit, _EFA::pool, _EFA::postLeft, _EFA::postLimit, _EFA::services, _EFA::size, and _EFA::state.
Referenced by EFC_stdConstruct().
| int EFA_enable | ( | EFA * | efa, | |
| int | enable | |||
| ) |
Enables/disables EFA. This can only be done outside the context of a run, i.e. the state must be STOPPED.
-1, on failure.
| efa | The Event Filter Analysis control handle | |
| enable | If non-zero, enable, if zero, disable |
References EFA_STATE_K_DISABLED, EFA_STATE_K_STOPPED, and _EFA::state.
| int EFA_flush | ( | EFA * | efa, | |
| int | reason | |||
| ) |
Forces a posting of the current results.
| efa | The event filter analysis control structure | |
| reason | The reason flush is being called. |
References efa_compose_end_hdr(), efa_flush(), EFA_FLUSH_REASON_K_RECORD_PROCESS, efa_get_new_packet(), EFA_STATE_K_PAUSED, EFA_STATE_K_STOPPED, PAUSED, _EFA::state, and STOPPED.
Referenced by EFA_notify(), EFA_postprocess(), and efc_flush().
| unsigned int EFA_hdrCompose | ( | EFA_hdr * | hdr, | |
| unsigned int | relative, | |||
| unsigned long long | seq, | |||
| unsigned int | gemClock, | |||
| unsigned int | gemStrobe | |||
| ) |
Composes specified event header.
| hdr | Pointer to the target EFA_hdr | |
| relative | The relative (to the beginning of the buffer) event number (1 = first event) | |
| seq | Extended seqence number of the event | |
| gemClock | Event clock register read from GEM contributor of event | |
| gemStrobe | Event PPS cock register read from GEM contributor of event |
References _EFA_hdrTimetones::cur, EFA__hdrSeqSet(), EFC__timetonesGet(), _EFA_hdrTimetone::flags, _EFA_hdr::gemClock, _EFA_hdrTimetone::gemStrobe, _EFA_hdrTimetones::prv, _EFA_hdr::relative, _EFA_hdrTimetone::secs, _EFA_hdr::seq, and _EFA_hdr::timetones.
Referenced by EFA__preprocess(), and efa_compose_end_hdr().
| int EFA_notify | ( | EFA * | efa, | |
| int | mode, | |||
| const EDS_cfgInfo * | cfg | |||
| ) |
Callback signature to notify an analyis routine of a mode change.
| efa | The Event Filter Analysis control handle | |
| mode | The new running mode. | |
| cfg | The new configuration information |
References _EFA_span::cfg_id, _EFA_span::cfg_key, EFA_flush(), _EFA::flushLeft, _EFA::flushLimit, _EFA_span::mode, _EFA::postLeft, _EFA::postLimit, and _EFA::span.
Referenced by EFC_modeSelect().
| int EFA_resultSizeof | ( | const EFA * | efa | ) |
Returns the size, in bytes, of one result vector.
| The | size, in bytes, of one result vector |
| efa | The Event Filter Analysis Control Block |
References _EFA::size.
Referenced by efc_result_sizeof().
| int EFA_sizeof | ( | int | result_size, | |
| int | result_cnt | |||
| ) |
Computes the size, in bytes, of the EFA control structure.
| result_size | The size, in bytes, of one result vector | |
| result_cnt | The number of result vectors in one packet |
References efa_apb_sizeof().
Referenced by EFC_stdSizeof().
| int EFA_start | ( | EFA * | efa, | |
| int | reason, | |||
| int | run_id, | |||
| int | startTime, | |||
| int | mode | |||
| ) |
Callback signature to start or prepare a posting stream to receive events.
| efa | The Event Filter Analysis control handle | |
| reason | The LSF_REASON_OPEN to indicate why the stream is being started | |
| run_id | Suggested use is to identify the block of events between when EDS_fwHandlerStart is called and EDS_fwHandlerFlush is called with a stop reason | |
| startTime | The run start time rounded to the nearest second | |
| mode | This must be the running mode. |
References _EFA::beg_evt_fill, _EFA::ctx, EFA_STATE_K_DISABLED, EFA_STATE_K_STARTED, EFA_STATE_K_STOPPED, _EFA::flushLeft, _EFA::flushLimit, _EFA::postLeft, _EFA::postLimit, _EFA::services, _EFA_services::start, and _EFA::state.
Referenced by EFC_start().
1.5.8