GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GRBP / V1-0-0
Constituent: grbpsiu     Tag: mv2304
#include "GRBP_window.h"
#include "GRBP_locate.h"
#include "GRBP_gammaList.h"
#include "GRBP_messageSchedule.h"
#include "GRBP_locationSchedule.h"
#include "GRBP_cache.h"
#include "GRBP_cluster.h"
#include "GRBP_probCalculate.h"
#include "wrap.h"
#include "GRBP_DB/GRBP_DB_window.h"
#include <math.h>
Include dependency graph for GRBP_window.c:
Defines | |
#define | NULL ((void *)0) |
#define | NO_GUESS NULL |
#define | report_prms(_min_idx,_max_idx,_cnt,_hi_cnt,_lo_cnt,_pdists,_hi_pdists, _lo_pdists, _pdts,_hi_pdts,_lo_pdts) |
#define | report_masks(_title, _masks, _nmasks) |
#define | report_window_range(_min_idx, _max_idx, _nrange) |
#define | report_window_parameters(_nrange, _contrast, _threshold) |
Functions | |
static __inline int | windowTier1Sizeof (const GRBP_DB_windowTier1 *cfg) |
Returns the size, in bytes, of the GRBP_windowTier1 data structure of the specified configuration. | |
static __inline unsigned char * | windowTier1Construct (GRBP_windowTier1 *tier1, const GRBP_DB_windowTier1 *cfg, unsigned char *ptr) |
Constructs the data structures used to control tier1 window stage. | |
static void __inline | windowTier1Reset (GRBP_windowTier1 *tier1) |
Resets the tier 1 window structure. | |
static __inline int | windowTier2Sizeof (const GRBP_DB_windowTier2 *cfg) |
Returns the size, in bytes, of the GRBP_windowTier2 data structure of the specified configuration. | |
static __inline unsigned char * | windowTier2Construct (GRBP_windowTier2 *tier2, const GRBP_DB_windowTier2 *cfg, unsigned char *ptr) |
Constructs the data structures used to control admittance to the GRB window stage. | |
static __inline GRBP_windowState | windowTier2Seed (GRBP_window *window, const GRBP_cache *cache, double dx0, double dy0, double dz0, double time) |
Seeds the tier2 list of gammas from from the cache of input photons. | |
static void __inline | windowTier2Reset (GRBP_windowTier2 *tier2) |
Resets the tier 2 window structure. | |
static __inline int | windowGrbSizeof (const GRBP_DB_windowGrb *cfg) |
Returns the size, in bytes, of the GRBP_windowGrb data structure of the specified configuration. | |
static __inline unsigned char * | windowGrbConstruct (GRBP_windowGrb *grb, const GRBP_DB_windowGrb *cfg, unsigned char *ptr) |
Constructs the data structures used to control admittance to the GRB gamma list after a GRB has been detected. | |
static void __inline | windowGrbReset (GRBP_windowGrb *grb) |
Resets the GRB window structure. | |
static __inline GRBP_windowState | windowStateCheck (GRBP_window *window) |
Checks if one should declare a GRB. | |
int | GRBP_windowSizeof (const GRBP_DB_window *cfg) |
Computes the number of bytes needed for a window list of cnt elements. | |
unsigned char * | GRBP_windowConstruct (GRBP_window *window, const GRBP_DB_window *cfg) |
Constructs the list used in the localization process. | |
GRBP_windowState | GRBP_windowTier1LatUpdate (GRBP_window *window, GRBP_cache *cache) |
Adds any new photons that are in clusters that pass the selection criteria, merges them onto the list maintained by this window and, if necessary, performs a localization on these photons. | |
GRBP_windowState | GRBP_windowTier2GbmSeed (GRBP_window *window, const GRBP_cache *cache, double dx0, double dy0, double dz0, double time) |
Based on the location from the GBM, this seeds the tier 2 list of gammas from the input photon cache. | |
GRBP_windowState | GRBP_windowTier2Update (GRBP_window *window, GRBP_cache *cache) |
Check to see if the newest photon in the cache of input photons should be added to this tier 2 window. | |
void | GRBP_windowReset (GRBP_window *window) |
Resets the window context. | |
void | GRBP_windowCheck (const GRBP_window *window, const GRBP_cache *cache) |
Performs a diagnostic check of the clusters associated with this window. Specifically it checks whether the more sophisticated update method agrees with the much simpler straigthforward method. This code should never be included in production builds. |
CVS $Id: GRBP_window.c,v 1.6 2007/08/10 20:47:54 russell Exp $
|
Performs a diagnostic check of the clusters associated with this window. Specifically it checks whether the more sophisticated update method agrees with the much simpler straigthforward method. This code should never be included in production builds.
|
|
Constructs the list used in the localization process.
|
|
Resets the window context.
|
|
Computes the number of bytes needed for a window list of cnt elements.
|
|
Adds any new photons that are in clusters that pass the selection criteria, merges them onto the list maintained by this window and, if necessary, performs a localization on these photons.
|
|
Based on the location from the GBM, this seeds the tier 2 list of gammas from the input photon cache.
|
|
Check to see if the newest photon in the cache of input photons should be added to this tier 2 window.
|
|
Constructs the data structures used to control admittance to the GRB gamma list after a GRB has been detected.
|
|
Resets the GRB window structure.
|
|
Returns the size, in bytes, of the GRBP_windowGrb data structure of the specified configuration.
|
|
Checks if one should declare a GRB.
|
|
Constructs the data structures used to control tier1 window stage.
|
|
Resets the tier 1 window structure.
|
|
Returns the size, in bytes, of the GRBP_windowTier1 data structure of the specified configuration.
The array of bits is carved from the most recent window width bits of the cluster bit array. There is certainly no guarantee that this collection of bits is aligned on a 32-bit boundary, so the trick is to calculate how many extra words these misaligned bits can absorb. Take a simple example of a window width of 20. These 20 bits can span 1 or 2 32-bit words. But, as they say on TV, wait there is more. There is no guarantee that the last word of the cluster array contains a full 32-bits. Worst case, the cluster array only uses 1 bit in the last 32-bit word. Therefore, even with a window of 20 bits, there could be 18 bits in the next to the last cluster array word, 1 bit in the last cluster array word and 1 bit in the first cluster array word. Effectively this means that one must always reserve 2 32-bit words for this worst case scenerio. (If one had the cluster width available, a more precise calcuation could save 1 32-bit word in certain circumstances, but it is not worth it.) |
|
Constructs the data structures used to control admittance to the GRB window stage.
|
|
Resets the tier 2 window structure.
|
|
Seeds the tier2 list of gammas from from the cache of input photons.
|
|
Returns the size, in bytes, of the GRBP_windowTier2 data structure of the specified configuration.
|