GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> XFC / dev > dhfc / rhel4-32
#include <XFC/HFC.h>
#include <XFC/HFC_cfg.h>
#include <XFC/HFC_status.h>
#include <EFC/EDM.h>
#include <EFC/EFC_edsFw.h>
#include <EFC/EFC.h>
#include <HFC_def.h>
#include <HFC_resultDef.h>
#include <EDS/EDS_fw.h>
#include <EDS/EBF_gem.h>
#include <EDS/EBF_gemLocate.h>
#include <EDS/EBF_dir.h>
#include <EDS/ECR_cal.h>
#include <EDS/EDR_cal.h>
#include <EDS/EDR_calUnpack.h>
#include <CDM/CDM_pubdefs.h>
#include <PBI/FFS.ih>
#include <stdlib.h>
#include <string.h>
Defines | |
#define | _code EDM_CODE |
#define | _info(...) |
#define | _debug(...) |
#define | _display_logcnt(_ncol, _logcnt) |
#define | _display_failure(_ncol, _msg) |
#define | _display_tolerance(_ncol, tolerance) |
#define | _display_energies(_ncol, _ex0, _ey0, _ex1, _threshold) |
#define | _display_separator(_ncol, _nbeg, _code) |
#define | _display_values(_ncol, _nbeg, _cnt, _e, _threshold, _n) |
#define | _display_layer_title(_ncol, _nbeg, _cnt, _name) |
#define | _display_tower_title(_ncol, _nbeg, _itwr) |
#define | _display_layer_hits(_ncol, _nx0, _ny0, _nx1, _status) |
#define | _display_title_bar(_ixb) |
#define | _regenerate_title_bar() |
Functions | |
static __inline int | isVetoed (unsigned int status, unsigned int vetoes) |
Checks whether any of the veto bits are up. | |
static __inline int | hfcFilter (HFC *hfc, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb, unsigned int vetoes, HFC_result *result) |
Determines the fate of 1 event. | |
static int | compileCfgPrms (HfcCfgPrms *cfg, const HFC_DB_prms *prms) |
Compiles/commits the set of user defined parameters into the the configuration block. | |
int | HFC_sizeof (int cnt) |
Sizes the heavy ion filtering control structure. | |
int | HFC_cfgSizeof (void) |
Sizes the heavy ion filtering configuration as it is used in the actual filtering progam. | |
int | HFC_resultSizeof (const HFC *hfc) |
Returns the size, in bytes, of one result vector. | |
int | HFC_cfgCompile (HFC_cfg *cfg, const HFC_DB_prms *prms) |
Implements the transformation of the configuration parameters as specified by the user, cfg, into the internal form, ctlCfg. | |
HFC_cfg * | HFC_cfgSet (HFC *hfc, HFC_cfg *cfg) |
Makes the specified internal representation of the configuration parameters the current active one. | |
static int __inline | dir_check (int status, EBF_dir *dir, int dir_status) |
Check the directory status. | |
static __inline int | cal_check (const HfcCfgCal *cfg, const EDR_cal *cal, int status, int vetoes, HFC_result *result) |
Does the CAL based checking of the CNO filter. | |
int | HFC_filter (HFC *hfc, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb, unsigned int vetoes, HFC_result *result) |
Determines the fate of 1 event. | |
unsigned int | HFC_fwNeeds (void) |
Returns a bit mask of the EDS_fw needs. | |
unsigned int | HFC_fwObjects (void) |
Returns a bit mask of the EDS_fw objects used by the heavy ion filter. |
CVS $Id: HFC.c,v 1.6 2011/03/28 20:50:56 russell Exp $
static __inline int cal_check | ( | const HfcCfgCal * | cfg, | |
const EDR_cal * | cal, | |||
int | status, | |||
int | vetoes, | |||
HFC_result * | result | |||
) | [static] |
Does the CAL based checking of the CNO filter.
cfg | The CNO CAL configuration cuts | |
cal | The unpacked CAL data | |
status | The status of the CNO filter to this point | |
vetoes | The bit mask of active vetoes | |
result | The result vector to fill out |
References _HFC_result::energies, _HfcCfgCal::ethreshold, HFC_STATUS_M_LYR_COUNTS, HFC_STATUS_M_LYR_ENERGY, HFC_STATUS_M_STAGE_CAL_ECHK, HFC_STATUS_M_STAGE_CAL_LCHK, HFC_STATUS_M_VETOED, ievt_store, isVetoed(), _HFC_result::logcnt, _HFC_result::nl, _HfcCfgCal::nmaxlogs, and _HfcCfgCal::tolerance.
Referenced by hfcFilter().
static int compileCfgPrms | ( | HfcCfgPrms * | cfg, | |
const HFC_DB_prms * | prms | |||
) | [static] |
Compiles/commits the set of user defined parameters into the the configuration block.
cfg | The destination parameter configuration block | |
prms | The set of user configuration parameters |
References _HfcCfgPrms::acd, _HfcCfgPrms::cal, _HfcCfgCal::ethreshold, _HfcCfgCal::nmaxlogs, _HfcCfgTkr::placeholder, _HfcCfgAcd::placeholder, _HfcCfgPrms::tkr, and _HfcCfgCal::tolerance.
Referenced by HFC_cfgCompile().
static int __inline dir_check | ( | int | status, | |
EBF_dir * | dir, | |||
int | dir_status | |||
) | [static] |
Check the directory status.
status | The status | |
dir | The directory | |
dir_status | The directory status |
References HFC_STATUS_M_ERR_CTB, HFC_STATUS_M_ERR_DIR, and HFC_STATUS_M_VETOED.
Referenced by hfcFilter().
int HFC_cfgCompile | ( | HFC_cfg * | cfg, | |
const HFC_DB_prms * | prms | |||
) |
Implements the transformation of the configuration parameters as specified by the user, cfg, into the internal form, ctlCfg.
0 | Successful | |
-1 | Unrecognized or non-backwardly compatiable user configuration version number. |
cfg | Filled in with the internal form of the configuration parameters | |
prms | The user form of the configuration parameters |
References compileCfgPrms(), and _HFC_cfg::prms.
Makes the specified internal representation of the configuration parameters the current active one.
hfc | The heavy ion filter control structure | |
cfg | The internal representation of the configuration constants |
References _HFC::cfg.
int HFC_cfgSizeof | ( | void | ) |
Sizes the heavy ion filtering configuration as it is used in the actual filtering progam.
ctlCfg = malloc (HFC_cfgSizeof ()); status = HFC_cfgCompile (cfg, usrPrms); HFC_cfgSet (hfc, cfg);
int HFC_filter | ( | HFC * | hfc, | |
unsigned int | pktBytes, | |||
EBF_pkt * | pkt, | |||
EBF_siv | siv, | |||
EDS_fwIxb * | ixb, | |||
unsigned int | vetoes, | |||
HFC_result * | result | |||
) |
Determines the fate of 1 event.
< | 0, rejected | |
==0,undecided | ||
> | 0, accepted |
hfc | The heavy ion filter control structure | |
pktBytes | The number of bytes in pkt, includes the packet header | |
pkt | The event data packet | |
siv | The packet's state information vector | |
ixb | The information exchange block | |
vetoes | The active vetoes | |
result | The filter result vector |
References hfcFilter().
unsigned int HFC_fwNeeds | ( | void | ) |
Returns a bit mask of the EDS_fw needs.
Referenced by hfc_construct().
unsigned int HFC_fwObjects | ( | void | ) |
Returns a bit mask of the EDS_fw objects used by the heavy ion filter.
Referenced by hfc_construct().
int HFC_resultSizeof | ( | const HFC * | hfc | ) |
Returns the size, in bytes, of one result vector.
The | size, in bytes, of one result vector |
hfc | The configuration control structure |
int HFC_sizeof | ( | int | cnt | ) |
Sizes the heavy ion filtering control structure.
cnt | Number of configurations to accommodate |
static __inline int hfcFilter | ( | HFC * | hfc, | |
unsigned int | pktBytes, | |||
EBF_pkt * | pkt, | |||
EBF_siv | siv, | |||
EDS_fwIxb * | ixb, | |||
unsigned int | vetoes, | |||
HFC_result * | result | |||
) | [static] |
Determines the fate of 1 event.
hfc | The heavy ion filter control structure | |
pktBytes | The number of bytes in pkt, includes the packet header | |
pkt | The event data packet | |
siv | The packet's state information vector | |
ixb | The information exchange block | |
vetoes | The list of active vetoes | |
result | The filter result vector |
References _HFC_result::beg, _HfcCfgPrms::cal, _HFC_result::cal, cal_check(), _HFC::cfg, _HFC_result::chk, _HFC_result::dir, dir_check(), _HFC_result::evtNum, _HFC_result::gem, HFC_STATUS_M_ERR_CAL, HFC_STATUS_M_GEM_NOCALLO, HFC_STATUS_M_GEM_NOCNO, HFC_STATUS_M_GEM_NOTKR, HFC_STATUS_M_MULTI_PKT, HFC_STATUS_M_STAGE_CAL, HFC_STATUS_M_STAGE_DIR, HFC_STATUS_M_STAGE_GEM, HFC_STATUS_M_VETOED, ievt_store, isVetoed(), _HFC_cfg::prms, _HFC_result::status, and tmr_store.
Referenced by HFC_filter().
static __inline int isVetoed | ( | unsigned int | status, | |
unsigned int | vetoes | |||
) | [static] |
Checks whether any of the veto bits are up.
status | The current set of status bits | |
vetoes | The set of veto bits |
Referenced by cal_check(), and hfcFilter().