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


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_cache.h File Reference

Interface to the routines that maintain and access the photon cache. This cache batches photons from the input source and calculates neighboring distance, assigning a probability that a given group of neighbors for each input photon is not consistent with background. More...

#include <GRBP_photonList.h>
#include <GRBP_clusterList.h>
#include <GRBP_cluster.h>
#include <GRBP_DB/GRBP_DB_cache.h>

Classes

struct  _GRBP_cache
 Defines the data structure used for processing input photons. More...

Typedefs

typedef struct
_GRBP_probabilityPrms 
GRBP_probabilityPrms
typedef struct _GRBP_cache GRBP_cache

Functions

int GRBP_cacheSizeof (const GRBP_DB_cache *cfg)
 Determines the sizeof of a photon cache specified by cfg.
unsigned char * GRBP_cacheConstruct (GRBP_cache *cache, const GRBP_DB_cache *cfg, unsigned char *ptr)
 Constructs the input photon cache.
void GRBP_cacheReset (GRBP_cache *cache)
 Resets the photon cache. This routine is generally called after a GRB has been detected, clearing the cache and thus making it ready for a new round of detection.
void GRBP_cacheAdd (GRBP_cache *cache, unsigned int lid, double time, double energy, double dx, double dy, double dz)
 Adds the photon to the cache and updates all the data structures associated with adding this new photon and, potentially, retiring old photons.
static __inline int GRBP__photonListSizeGet (const GRBP_photonList *photonList)
 Returns the list size.


Detailed Description

Interface to the routines that maintain and access the photon cache. This cache batches photons from the input source and calculates neighboring distance, assigning a probability that a given group of neighbors for each input photon is not consistent with background.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: GRBP_cache.h,v 1.2 2011/03/30 22:11:50 russell Exp $

Function Documentation

static __inline int GRBP__photonListSizeGet ( const GRBP_photonList photonList  )  [static]

Returns the list size.

Returns:
The list size
Parameters:
photonList The target photon list

References _GRBP_photonList::max.

void GRBP_cacheAdd ( GRBP_cache cache,
unsigned int  lid,
double  time,
double  energy,
double  dx,
double  dy,
double  dz 
)

Adds the photon to the cache and updates all the data structures associated with adding this new photon and, potentially, retiring old photons.

Parameters:
cache The photon cache to add the new photon to
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_cache::clusterList, GRBP__photonListAdd(), GRBP_clusterListAdd(), _GRBP_cache::photonList, and _GRBP_cache::prms.

Referenced by GRBP_clientProcess().

unsigned char* GRBP_cacheConstruct ( GRBP_cache cache,
const GRBP_DB_cache *  cfg,
unsigned char *  ptr 
)

Constructs the input photon cache.

Returns:
Pointer to the next available memory address
Parameters:
cache The photon cache to construct
cfg The photon cache configuration
ptr The pointer to the memory to carve the dynamically allcated arrays from.

References _GRBP_cache::clusterList, clusterPrmsPrepare(), GRBP_clusterListConstruct(), GRBP_photonListConstruct(), _GRBP_cache::photonList, and _GRBP_cache::prms.

Referenced by GRBP_clientConstruct().

void GRBP_cacheReset ( GRBP_cache cache  ) 

Resets the photon cache. This routine is generally called after a GRB has been detected, clearing the cache and thus making it ready for a new round of detection.

Parameters:
cache The photon cache to reset

References _GRBP_cache::clusterList, GRBP_clusterListReset(), GRBP_photonListReset(), and _GRBP_cache::photonList.

Referenced by latReset().

int GRBP_cacheSizeof ( const GRBP_DB_cache *  cfg  ) 

Determines the sizeof of a photon cache specified by cfg.

Returns:
The size, in bytes, of the photon cache specified by cfg
Parameters:
cfg The photon cache configuration

References GRBP_clusterListSizeof(), and GRBP_photonListSizeof().

Referenced by GRBP_clientSizeof().


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