GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > GRBP / V1-0-0

Constituent: grbpsiu     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

GRBP_message.c File Reference

Utilize to handle the GRB alert messages. More...

#include "GRBP_message.h"
#include "GRBP_window.h"
#include "GRBP_grb.h"
#include "GRBP_gammaList.h"
#include "GRBP_math.h"
#include "PBI/Endianness.h"
#include "PBI/Check.h"

Include dependency graph for GRBP_message.c:


Defines

#define round(_x)   ceil(_x)
#define MAX_PROB   ((1<<16) - 1)
#define QSCALE   (1<<14)

Functions

 CHECK (CheckWindowType, GRBP_WINDOW_TYPE_K_LAT==GRB_LATALERTMSG_TRIGGERTYPE_LAT &&GRBP_WINDOW_TYPE_K_GBM==GRB_LATALERTMSG_TRIGGERTYPE_GBM)
static __inline void gam_cnts_clear (unsigned short int cnts[4])
 Clears the little 4 word 16-bit histogram.
static __inline void gam_cnts_update (unsigned short int cnts[4], const GRBP_gammaAux *gammas, int beg, int end, int max)
 Updates the little 4 bin histogram with energy of the gammas from index beg to end.
static __inline GRB_latAlertMsgTime to_time (double time)
 Converts time to seconds and microsecnds, i.e. a GRB_latAlerMsgTime.
static __inline unsigned int to_usecs (double fraction_of_seconds)
 Converts fractions of a second to micro seconds.
static __inline unsigned short to_arcmins (double radians)
 Converts radians to a arcmins, unsigned.
static __inline unsigned short to_probability (double log_probability)
 Converts the log of the spatial or temporal probability into format used in the alert message.
static __inline unsigned int format_class (GRB_latAlertMsgTriggerType type, GRB_latAlertMsgLocMethod method, unsigned short int window_size)
 Formats the burst classification word.
static __inline void format_quaternion (unsigned short int dst[4], const double src[4])
 Formats the quaternion for the alert message.
void GRBP_messageCapture (GRBP_message *msg, const GRBP_grb *grb, double current_time)
 Captures the set of parameters that are defined when the GRB suspect message is issued.
void GRBP_messageFormat (GRBP_message *msg, const GRBP_grb *grb)
 Formats the part of the alert message that gets continually updated.
void GRBP_messagePlogsFormat (GRBP_message *msg, const GRBP_probabilityLogs *plogs)
 Formats the specified logs of the spatial and temporal probabilities into the working copy of the message.
void GRBP_messageEarliestTimeFormat (GRBP_message *msg, double earliest_time)
 Sets the time of the earliest photon.

Detailed Description

Utilize to handle the GRB alert messages.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: GRBP_message.c,v 1.5 2007/08/02 17:25:00 russell Exp $

Function Documentation

static __inline unsigned int format_class GRB_latAlertMsgTriggerType  type,
GRB_latAlertMsgLocMethod  method,
unsigned short int  window_size
[static]
 

Formats the burst classification word.

Returns:
The formatted 32-bit burst classification word
Parameters:
type The GRB trigger type (LAT or GBM)
method The location method
window_size The size of the triggering window

static __inline void format_quaternion unsigned short int  dst[4],
const double  src[4]
[static]
 

Formats the quaternion for the alert message.

Parameters:
dst The destination quaternion
src The source quaternion

static __inline void gam_cnts_clear unsigned short int  gam_cnts[4]  )  [static]
 

Clears the little 4 word 16-bit histogram.

Parameters:
gam_cnts The storage to clear

static __inline void gam_cnts_update unsigned short int  cnts[4],
const GRBP_gammaAux gammas,
int  beg,
int  end,
int  max
[static]
 

Updates the little 4 bin histogram with energy of the gammas from index beg to end.

Parameters:
cnts The counts of the histogram to update
gammas The array of gammas to histogram
beg The index of the first gamma to use in the update
end The index of the last gamma to use in the update
max The maximum gamma index (the gammas are stored in wrap-around fashion in a circular list

void GRBP_messageCapture GRBP_message msg,
const GRBP_grb grb,
double  current_time
 

Captures the set of parameters that are defined when the GRB suspect message is issued.

Parameters:
msg The message context
grb The GRB context
current_time The time of the gamma entered which caused the the suspect message to be issued

void GRBP_messageEarliestTimeFormat GRBP_message msg,
double  earliest_time
 

Sets the time of the earliest photon.

Parameters:
msg The message context
earliest_time The earliest time
On the SUSPECT message the earliest time is defined as the time of the earliest photon in the cluster. On subsequent messages it is redefined to be the time of earliest photon in the tier 2 list This routine allows one to reset the earliest time.after the initial message

void GRBP_messageFormat GRBP_message msg,
const GRBP_grb grb
 

Formats the part of the alert message that gets continually updated.

Parameters:
msg The message context
grb The GRB context

void GRBP_messagePlogsFormat GRBP_message msg,
const GRBP_probabilityLogs plogs
 

Formats the specified logs of the spatial and temporal probabilities into the working copy of the message.

Parameters:
msg The message context
plogs The logs of the spatial and temporal probabilities

static __inline unsigned short int to_arcmins double  radians  )  [static]
 

Converts radians to a arcmins, unsigned.

Returns:
The equivalent value in arc minutes
Parameters:
radians The value to convert
Warning:
This function rounds properly only for positive values of radians

static __inline unsigned short to_probability double  log_probability  )  [static]
 

Converts the log of the spatial or temporal probability into format used in the alert message.

Returns:
The converted value.
Parameters:
log_probability The value to convert.

static __inline GRB_latAlertMsgTime to_time double  time  )  [static]
 

Converts time to seconds and microsecnds, i.e. a GRB_latAlerMsgTime.

Returns:
The converted time
Parameters:
time The time to convert

static __inline unsigned int to_usecs double  fraction_of_sec  )  [static]
 

Converts fractions of a second to micro seconds.

Returns:
The number of microseconds
Parameters:
fraction_of_sec The fraction of a second to convert. This value should be less than 1 second


Generated on Fri Dec 14 08:32:08 2007 by  doxygen 1.4.4