GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > esu / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

ESS.h File Reference

Interface to the Event Simple Selection utility. More...


Typedefs

typedef struct _ESS_ctl ESS_ctl
typedef struct _EBF_dir EBF_dir
typedef struct _EDS_fwIxb EDS_fwIxb
typedef enum _ESS_logic ESS_logic
 Typedef for enum _ESS_logic.

Enumerations

enum  _ESS_logic {
  ESS_LOGIC_K_OR = 0,
  ESS_LOGIC_K_AND = 1
}
 Identifies the logic used when using multiple selectors as either OR (the default) or AND. More...

Functions

int ESS_sizeof (void)
 Returns the size, in bytes, of the ESS control structure.
void ESS_construct (ESS_ctl *ess)
 Constructs (initializes) the ESS control structure.
int ESS_parse_cond (ESS_ctl *ess, const char *s)
 Parses the string for the trigger condition specification.
int ESS_parse_dgn (ESS_ctl *ess, const char *s)
 Parses the specified input string s, for a diagnostic selection.
int ESS_parse_err (ESS_ctl *ess, const char *s)
 Parses the specified input string s, for an error selection.
int ESS_parse_pkt (ESS_ctl *ess, const char *s)
 Parses the specified input string s, for a packet range.
int ESS_parse_readout (ESS_ctl *ess, const char *s)
 Parses the input string, extracting a readout mask.
int ESS_parse_size (ESS_ctl *ess, const char *s)
 Parses the specified input string s, for a packet range.
int ESS_set_logic (ESS_ctl *ess, ESS_logic logic)
 Currently just sets the evaluation condition to the 'AND'.
int ESS_select (ESS_ctl *ess, const EBF_dir *dir, unsigned int npkts, unsigned int nbytes)
 Evaluates to the filter status.

Variables

const char ESS_usage_cond []
 String for defining a GEM Pattern Condition specifier. This is meant to be used when reporting the usage of this specifier.
const char ESS_usage_range []
 String for defining a range specifier. This is meant to be used when reporting the usage of this specifier.


Detailed Description

Interface to the Event Simple Selection utility.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: ESS.h,v 1.1 2007/02/14 01:06:38 russell Exp $

This provides a utility to setup and use a simple event selector. The selection criteria are base on very simple quantities that available once an event directory has been formed. These include things like selection on

  1. The number of packets in an event
  2. The size of an event
  3. The readout mode (single/four-range, zero/non-zero suppressed)
  4. The GEM trigger conditions
  5. The presence of diagnostic or error blocks

Enumeration Type Documentation

enum _ESS_logic

Identifies the logic used when using multiple selectors as either OR (the default) or AND.

Enumerator:
ESS_LOGIC_K_OR  Use the OR of the select criteria, ie. any
ESS_LOGIC_K_AND  Use the AND of the select criteria, ie. all


Function Documentation

void ESS_construct ( ESS_ctl *  ess  ) 

Constructs (initializes) the ESS control structure.

Parameters:
ess The control structure to initialize

References ESS_LOGIC_K_OR.

int ESS_parse_cond ( ESS_ctl *  ess,
const char *  s 
)

Parses the string for the trigger condition specification.

Returns:
The trigger condition filter word
Parameters:
ess The control structure to fill
s The string to parse.
Syntax of the string
A form of a string is <logic_specifier><list of trigger condition specifiers>
List of trigger condition specifiers
The trigger condition specifiers are
  • r Region of interest (throttle tracker trigger)
  • t 3-in-a-row
  • l CAL lo
  • h CAL hi
  • c CNO
  • p Periodic
  • s Solicited
  • e External
The specifiers may be specified in the positive (must be present) or negative (must be absent) sense. A string of positive specifiers is introduced by a + and a string of negative specifiers is introduced by a -. By default, the initial string starts as a string of positive identifiers.
Logic
If the string begins with
List of trigger condition specifiers
This string to parse comes in in three forms
  • :, True if the AND of the condition specifiers and the actual trigger conditions matches the comparison set. This effectively treats the specifiers not mentioned as don't care.
  • =, True if the list of the specified trigger conditions and the actual trigger conditions are an exact match. In this case the default comparison set is the complete set.
  • otherwise, True if the OR of the specified conditions specifiers and the actual trigger conditions is non-zero. In this case the concept of a comparison set is unnecessary

Limitations
In order to keep the interface simply, arbitrary combinations cannot be specified with the syntax above.
Examples
  1. Clh
    Allow any event with either CAL LO or CAL HI present
  1. Cl-h
    Allow any event with either CAL LO present or CAL HI absent

  1. C:lh
    Allow any event with both CAL LO and CAL HI present

  1. C=lh
    Allow any event with only CAL LO and CAL HI present

References OPT_M_COND.

int ESS_parse_dgn ( ESS_ctl *  ess,
const char *  s 
)

Parses the specified input string s, for a diagnostic selection.

Returns:
Parsing status, 0 if succesful
Parameters:
ess The control structure to fill
s The string to parse. If NULL, the diagnostic selection defaults to any contributor

References OPT_M_DGN.

int ESS_parse_err ( ESS_ctl *  ess,
const char *  s 
)

Parses the specified input string s, for an error selection.

Returns:
Parsing status, 0 if succesful
Parameters:
ess The control structure to fill
s The string to parse. If NULL, the error selection defaults to any contributor

References OPT_M_ERR.

int ESS_parse_pkt ( ESS_ctl *  ess,
const char *  s 
)

Parses the specified input string s, for a packet range.

Returns:
Parsing status, 0 if succesful
Parameters:
ess The control structure to fill, see the documentation for get_range on the allowed syntax of s.
s The string to parse

References get_range(), and OPT_M_PKT.

int ESS_parse_readout ( ESS_ctl *  ess,
const char *  s 
)

Parses the input string, extracting a readout mask.

Returns:
The readout mask
Parameters:
ess The control structure to fill, see the documentation for get_range on the allowed syntax of s.
s The input string, consisting of up to 4 characters
  • z permit events with zero-suppression enabled
  • n permit events with zero-suppression disabled
  • 4 permit events in four range readout mode
  • 1 permit events in single range readout mode
If neither z or n are specified, it is as if both are specified If neither 4 or 1 are specified, it is as if both are specified

References ALLOW_M_1, ALLOW_M_4, ALLOW_M_N, ALLOW_M_Z, OPT_M_READOUT, RO_M_ALL, RO_M_FOUR, RO_M_NS, RO_M_NS_FOUR, RO_M_NS_SINGLE, RO_M_SINGLE, RO_M_ZS, RO_M_ZS_FOUR, and RO_M_ZS_SINGLE.

int ESS_parse_size ( ESS_ctl *  ess,
const char *  s 
)

Parses the specified input string s, for a packet range.

Returns:
Parsing status, 0 if succesful
Parameters:
ess The control structure to fill, see the documentation for get_range on the allowed syntax of s.
s The string to parse

References get_range(), and OPT_M_SIZE.

int ESS_select ( ESS_ctl *  ess,
const EBF_dir dir,
unsigned int  npkts,
unsigned int  nbytes 
)

Evaluates to the filter status.

Return values:
0,does not pass
1,passes 
Parameters:
ess The selection parameters
dir The EBF directory structure
npkts The number of packets in this event. This is relevant if and only if the OPT_M_PKT selection option is active.
nbytes The number of bytes in this event. This is relevant if and only if the OPT_M_SIZE selection option is active.

References _EBF_gem::condsumCno, _EBF_dirRedux::dgn_ids, EBF__gemLocate(), EBF_GEM_DEADCONDCNO_EXTRACT, _EBF_dirRedux::err_ids, ESS_LOGIC_K_OR, _EBF_dir::evt, _EBF_dirRedux::nosup_ids, OPT_M_COND, OPT_M_DGN, OPT_M_ERR, OPT_M_FILTER, OPT_M_PKT, OPT_M_READOUT, OPT_M_SIZE, _EBF_dir::redux, and _EBF_dirRedux::rng_ids.

int ESS_set_logic ( ESS_ctl *  ess,
ESS_logic  logic 
)

Currently just sets the evaluation condition to the 'AND'.

Returns:
Parsing status, 0 if succesful
Parameters:
ess The control structure to fill
logic The string to parse. Currently unused, should be specified as NULL

int ESS_sizeof ( void   ) 

Returns the size, in bytes, of the ESS control structure.

Returns:
The size, in bytes, of the ESS control structure.


Generated on Fri Dec 9 16:40:27 2011 by  doxygen 1.5.8