GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / V1-0-4 > grbpsiu / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_windowList.c File Reference

Routines to managed a counted list of windows. More...

#include <GRBP_windowList.h>
#include <GRBP_window.h>
#include <GRBP_cache.h>
#include <GRBP_clusterList.h>
#include <GRBP_DB/GRBP_DB_window.h>
#include <GRBP_DB/GRBP_DB_windowList.h>
#include <PBI/FFS.ih>

Defines

#define NULL   ((void *)0)

Functions

static __inline GRBP_windowwindowListTier2Update (GRBP_windowList *windowList, GRBP_cache *cache)
 Updates the state of the tier 2 windows.
static __inline GRBP_windowwindowListTier1LatUpdate (GRBP_windowList *windowList, GRBP_cache *cache)
 Updates the state of the tier 1 LAT windows.
static void windowListReset (GRBP_windowList *windowList, unsigned int selected)
 Resets the selected collection of windows.
void GRBP_windowListReady (GRBP_windowList *windowList)
 Gets the window list ready on a start run.
void GRBP_windowListReset (GRBP_windowList *windowList)
 Resets the collection of windows.
int GRBP_windowListSizeof (const GRBP_DB_windowList *cfg)
 Determines the size of the array window contexts specified by cfgs.
unsigned char * GRBP_windowListConstruct (GRBP_windowList *windowList, const GRBP_DB_windowList *cfg, unsigned char *ptr)
 Builds a list windows using the configuration specified by cfg.
void GRBP_windowListGbmCloseout (GRBP_windowList *windowList)
 Actions necessary when a GBM closeout message is received.
GRBP_windowGRBP_windowListGbmSeed (GRBP_windowList *windowList, GRBP_cache *cache, double dx, double dy, double dz, double time)
GRBP_windowGRBP_windowListUpdate (GRBP_windowList *windowList, GRBP_cache *cache)
 Updates the state of all the tier 2 windows, then, if not GRB has been declared, updates the state of the tier1 LAT windows.


Detailed Description

Routines to managed a counted list of windows.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: GRBP_windowList.c,v 1.6 2011/03/30 22:11:51 russell Exp $

Function Documentation

unsigned char* GRBP_windowListConstruct ( GRBP_windowList windowList,
const GRBP_DB_windowList *  cfg,
unsigned char *  ptr 
)

Builds a list windows using the configuration specified by cfg.

Parameters:
windowList The list of windows to be constructed
cfg The configurations
ptr The memory block to use to construct the window contexts

References _GRBP_windowList::enabled, _GRBP_windowList::gbm, GRBP_WINDOW_TYPE_K_GBM, GRBP_WINDOW_TYPE_K_LAT, GRBP_windowConstruct(), _GRBP_windowList::lat, _GRBP_window::type, _GRBP_windowList::valid, and _GRBP_windowList::windows.

Referenced by GRBP_clientConstruct().

void GRBP_windowListGbmCloseout ( GRBP_windowList windowList  ) 

Actions necessary when a GBM closeout message is received.

Parameters:
windowList The window list

References _GRBP_windowList::tier1_gbm, and windowListReset().

Referenced by gbmCloseoutHandler().

void GRBP_windowListReady ( GRBP_windowList windowList  ) 

Gets the window list ready on a start run.

Parameters:
windowList The target window list
This function is generally called at start up time. It refreshes the the set of lists dividing the enabled lists into tier1 LAT and GBM lists and tier2 list to empty.

References _GRBP_windowList::enabled, _GRBP_windowList::gbm, _GRBP_windowList::lat, _GRBP_windowList::tier1_gbm, _GRBP_windowList::tier1_lat, and _GRBP_windowList::tier2.

Referenced by GRBP_windowListReset(), and start().

void GRBP_windowListReset ( GRBP_windowList windowList  ) 

Resets the collection of windows.

Parameters:
windowList The list of windows to be reset
This routine is generally called after a GRB has been declared over. It clears out any stale context, readying the windows for the next detection round.

References GRBP_windowListReady(), _GRBP_windowList::valid, and windowListReset().

Referenced by latReset().

int GRBP_windowListSizeof ( const GRBP_DB_windowList *  cfg  ) 

Determines the size of the array window contexts specified by cfgs.

Returns:
The size, in bytes, needed to hold all the window contexts
Parameters:
cfg The window list configurations

References GRBP_windowSizeof().

Referenced by GRBP_clientSizeof().

GRBP_window* GRBP_windowListUpdate ( GRBP_windowList windowList,
GRBP_cache cache 
)

Updates the state of all the tier 2 windows, then, if not GRB has been declared, updates the state of the tier1 LAT windows.

Returns:
If non-NULL, a pointer to the window declaring a GRB
Parameters:
windowList The window list
cache The cache of input photons

References windowListTier1LatUpdate(), and windowListTier2Update().

Referenced by GRBP_clientProcess().

static void windowListReset ( GRBP_windowList windowList,
unsigned int  selected 
) [static]

Resets the selected collection of windows.

Parameters:
windowList The list of windows
selected The selection list

References GRBP_windowReset(), and _GRBP_windowList::windows.

Referenced by GRBP_windowListGbmCloseout(), and GRBP_windowListReset().

static __inline GRBP_window * windowListTier1LatUpdate ( GRBP_windowList windowList,
GRBP_cache cache 
) [static]

Updates the state of the tier 1 LAT windows.

Return values:
A pointer to a window declaring a GRB or NULL if no GRB declared
Parameters:
windowList The window list
cache The cache of input photons
The list of windows in the seed list will be updated with the information about the most current photon. One of three things may happen on this update

  1. Nothing, the window did not change state
  2. Transferred, the window moves from the tier 1 LAT list to the tier 2 list.
  3. GRB declared, the window declared a GRB

References _GRBP_cache::clusterList, _GRBP_clusterUpdateList::cnt, GRBP__windowStateIsGrb(), GRBP__windowStateIsTier1(), GRBP_windowTier1LatUpdate(), _GRBP_windowList::tier1_lat, _GRBP_windowList::tier2, _GRBP_clusterList::upd, and _GRBP_windowList::windows.

Referenced by GRBP_windowListUpdate().

static __inline GRBP_window * windowListTier2Update ( GRBP_windowList windowList,
GRBP_cache cache 
) [static]

Updates the state of the tier 2 windows.

Return values:
A pointer to a window declaring a GRB or NULL if no GRB declared
Parameters:
windowList The window list
cache The cache of input photons
The list of tier2 windows will be updated with the information about the most current photon. One of three things may happen on this update

  1. Nothing, the window did not change state
  2. Transfer, the window failed to reach the GRB declaration state within the specified period. In this case this window will be transferred back to the tier 1 or LAT or GBM list depending on its window type.
  3. GRB declared, the window declared a GRB

References _GRBP_windowList::gbm, GRBP__windowStateIsGrb(), GRBP__windowStateIsTier2(), GRBP_windowTier2Update(), _GRBP_windowList::lat, _GRBP_windowList::tier1_gbm, _GRBP_windowList::tier1_lat, _GRBP_windowList::tier2, and _GRBP_windowList::windows.

Referenced by GRBP_windowListUpdate().


Generated on Tue Nov 29 17:29:17 2011 by  doxygen 1.5.8