GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / dev > grbpsiu / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_grb.c File Reference

Controls the context for entering and maintaining the description of a GRB. More...

#include <GRBP_grb.h>
#include <GRBP_locate.h>
#include <GRBP_location.h>
#include <GRBP_gammaList.h>
#include <GRBP_photonList.h>
#include <GRBP_window.h>
#include <GRBP_DB/GRBP_DB_grb.h>
#include <math.h>

Defines

#define NULL   ((void *)0)

Functions

int GRBP_grbSizeof (const GRBP_DB_grb *cfg)
 Returns the size, in bytes, of the specified gamma context.
unsigned char * GRBP_grbConstruct (GRBP_grb *grb, const GRBP_DB_grb *cfg, unsigned char *ptr)
 Constructs the specified GRB data structure.
int GRBP_grbAdd (GRBP_grb *grb, unsigned int lid, double time, double energy, double dx, double dy, double dz)
 If the photon passes the cuts, this photon is added to the list candidate GRB gammas.
void GRBP_grbMessageLocate (GRBP_grb *grb)
 Updates the GRB message location.
void GRBP_grbSeedLocate (GRBP_grb *grb)
 Updates the GRB seed location.
void GRBP_grbReset (GRBP_grb *grb)
 Resets the GRB context. This is normally called after a GRB has been declared over.
int GRBP_grbSeed (GRBP_grb *grb, GRBP_window *window)
 This function is used to seed the gamma list associated with the specified window with photons. It is really glorified copy.


Detailed Description

Controls the context for entering and maintaining the description of a GRB.

Author:
JJRussell - russell@slac.stanford.edu

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

Function Documentation

int GRBP_grbAdd ( GRBP_grb grb,
unsigned int  lid,
double  time,
double  energy,
double  dx,
double  dy,
double  dz 
)

If the photon passes the cuts, this photon is added to the list candidate GRB gammas.

Return values:
0,photon not added
1,photon added
Parameters:
grb The GRB handle
lid The photon's local index. This is the count of photons received
time The time associated with the photon
energy The energy, in Mev, of the photon
dx The x direction cosine
dy The y direction cosine
dz The y direction cosine

References _GRBP_gammaList::beg, _GRBP_gammaList::cnt, _GRBP_gamma::dx, _GRBP_location::dx0, _GRBP_gamma::dy, _GRBP_location::dy0, _GRBP_gamma::dz, _GRBP_location::dz0, _GRBP_gammaList::end, _GRBP_gammaAux::energy, _GRBP_gammaList::gammas, _GRBP_gammaList::gammas_aux, _GRBP_window::grb, _GRBP_grb::list, _GRBP_grb::loc_cnt, _GRBP_grb::loc_tail, _GRBP_grb::location, _GRBP_gammaList::max, _GRBP_gamma::nxt, _GRBP_windowGrb::prms, _GRBP_grbLocations::seed, _GRBP_gammaAux::time, _GRBP_grb::window, and wrap_hi().

Referenced by GRBP_clientProcess().

unsigned char* GRBP_grbConstruct ( GRBP_grb grb,
const GRBP_DB_grb *  cfg,
unsigned char *  ptr 
)

Constructs the specified GRB data structure.

Returns:
Pointer to the new available memory location
Parameters:
grb The GRB data structure to construct
cfg The GRB configuration
ptr Pointer to the memory used to allocate the variable piece of the structure from

References _GRBP_skew::dec, GRBP_gammaListConstruct(), _GRBP_grb::list, _GRBP_skew::ra, and _GRBP_grb::skew.

Referenced by GRBP_clientConstruct().

void GRBP_grbMessageLocate ( GRBP_grb grb  ) 

Updates the GRB message location.

Parameters:
grb The GRB data atructure

References GRBP__locate(), _GRBP_grbLocations::guess, _GRBP_grb::list, _GRBP_grb::loc_head, _GRBP_grb::location, _GRBP_grbLocations::message, and _GRBP_grbLocations::method.

Referenced by confirmCheck(), stop(), and updateCheck().

void GRBP_grbReset ( GRBP_grb grb  ) 

Resets the GRB context. This is normally called after a GRB has been declared over.

Parameters:
grb The GRB context to reset

References GRBP_gammaListReset(), _GRBP_grb::list, _GRBP_grb::loc_cnt, _GRBP_grb::loc_head, _GRBP_grb::loc_tail, and _GRBP_grb::window.

Referenced by latReset().

int GRBP_grbSeed ( GRBP_grb grb,
GRBP_window window 
)

void GRBP_grbSeedLocate ( GRBP_grb grb  ) 

Updates the GRB seed location.

Parameters:
grb The GRB data atructure

References GRBP__locate(), _GRBP_grbLocations::guess, _GRBP_grb::list, _GRBP_grb::loc_head, _GRBP_grb::location, and _GRBP_grbLocations::seed.

Referenced by GRBP_clientProcess().

int GRBP_grbSizeof ( const GRBP_DB_grb *  cfg  ) 

Returns the size, in bytes, of the specified gamma context.

Returns:
The size, in bytes, of the specified GRB data structure
Parameters:
cfg The configuration of the GRB data structure

References GRBP_gammaListSizeof().

Referenced by GRBP_clientSizeof().


Generated on Wed Sep 28 09:49:29 2011 by  doxygen 1.5.8