GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EDS / V2-10-0
Constituent: eds     Tag: mv2304
#include <string.h>
#include "EDS/EBF_dir.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_cal.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EDR_calUnpack.h"
#include "EDS/EDA_cal.h"
#include "EDS/EDR_cal.h"
#include "EDS/ECR_cal.h"
#include "EDS/FFS.h"
Defines | |
#define | SATURATION (7 * (1 << 12)/8) |
This defines the saturation point of an ADC as anything over 7/8 of full range. | |
Functions | |
static __inline int | convert (int val, const ECR_calLogEnd *cal) |
Converts ADC value into standard units (Log Energy Units). LEUs are the standard unit internally used by the filter code. | |
static __inline int * | unpackTower (EDR_cal *clr, EDR_calTower *ctr, int tower, int *dst, const EBF_dirCtbDsc *contributor, const ECR_calTower *calTower) |
Unpacks the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes auto (single) range readout. | |
static __inline int | mapTower (EDR_calTower *ctr, int tower, const EBF_dirCtbDsc *contributor) |
Creates the address map for the specified tower. | |
static __inline int | unpackLayer4 (int *dst, EDR_calColumnMap *colMapP, int nlogs, const unsigned int *data, int increment, const ECR_calTower *calTower, int layer) |
Handles the decoding/autoranging of 1 layer. | |
static __inline int | mapTower4 (EDR_calTower *ctr, int tower, const EBF_dirCtbDsc *contributor) |
Maps the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes 4 range readout. | |
static __inline int * | unpackTower4 (EDR_cal *clr, EDR_calTower *ctr, int tower, int *dst, const EBF_dirCtbDsc *contributor, const ECR_calTower *calTower) |
Unpacks the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes 4 range readout. | |
int | EDR_calUnpack (EDR_cal *clr, const EBF_dir *dir, const ECR_cal *constants) |
Unpacks the CAL data for the whole LAT. | |
int | EDR_calMapUnpack (EDR_cal *clr, const EBF_dir *dir) |
Unpacks the CAL data for the whole LAT. | |
int | EDR_calUnpackInit (EDR_cal *cal) |
One-time initialization an EDR_cal structure. | |
void | EDR_calUnpackReset (EDR_cal *cal) |
Resets the EDR_cal structure, preparing it for a new event. | |
int | EDR_calUnpackSizeof (void) |
Returns the size, in bytes, of a CAL LAT record. |
CVS $Id: EDR_calUnpack.c,v 1.5 2006/09/13 00:51:28 russell Exp $
static __inline int convert | ( | int | val, | |
const ECR_calLogEnd * | cal | |||
) | [static] |
Converts ADC value into standard units (Log Energy Units). LEUs are the standard unit internally used by the filter code.
val | The ADC value to convert | |
cal | The calibration values for one log end |
Unpacks the CAL data for the whole LAT.
clr | The CAL LAT Record data structure to fill | |
dir | The directory structure for this event; used to locate the CAL data. |
Unpacks the CAL data for the whole LAT.
clr | The CAL LAT Record data structure to fill | |
dir | The directory structure for this event; used to locate the CAL data. | |
constants | The CAL calibration constants (gains/pedestals) for this tower |
int EDR_calUnpackInit | ( | EDR_cal * | cal | ) |
One-time initialization an EDR_cal structure.
cal | The EDR_cal structure to initialize |
void EDR_calUnpackReset | ( | EDR_cal * | cal | ) |
Resets the EDR_cal structure, preparing it for a new event.
cal | The EDR_cal structure to reset |
int EDR_calUnpackSizeof | ( | void | ) |
Returns the size, in bytes, of a CAL LAT record.
After allocating an EDR_tkr structure, the structure should be initialized using EDR_calUnpackInit().
int mapTower | ( | EDR_calTower * | ctr, | |
int | tower, | |||
const EBF_dirCtbDsc * | contributor | |||
) | [static] |
Creates the address map for the specified tower.
ctr | The CTR data structure to fill | |
tower | The tower number | |
contributor | The CAL contributor descriptor |
int mapTower4 | ( | EDR_calTower * | ctr, | |
int | tower, | |||
const EBF_dirCtbDsc * | contributor | |||
) | [static] |
Maps the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes 4 range readout.
ctr | The CAL tower data structure to fill | |
tower | The tower number | |
contributor | The CAL contributor descriptor |
static __inline int unpackLayer4 | ( | int * | dst, | |
EDR_calColumnMap * | colMapP, | |||
int | nlogs, | |||
const unsigned int * | data, | |||
int | increment, | |||
const ECR_calTower * | calTower, | |||
int | layer | |||
) | [static] |
Handles the decoding/autoranging of 1 layer.
dst | The energy destination array. This is where the energy of each log end is stored | |
colMapP | Pointer to the column map for this layer | |
nlogs | The number logs in this layer | |
data | Pointer to the first data word | |
increment | The number of 32-words needed to advance from 1 range to the next | |
calTower | The calibration constants for this tower | |
layer | The target |
int * unpackTower | ( | EDR_cal * | clr, | |
EDR_calTower * | ctr, | |||
int | tower, | |||
int * | dst, | |||
const EBF_dirCtbDsc * | contributor, | |||
const ECR_calTower * | calTower | |||
) | [static] |
Unpacks the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes auto (single) range readout.
clr | The CAL LAT data structure to fill | |
ctr | The CAL tower data structure to fill | |
tower | The tower number | |
dst | The destination array for the CAL energies | |
contributor | The CAL contributor descriptor | |
calTower | The CAL calibration constants for this tower |
int * unpackTower4 | ( | EDR_cal * | clr, | |
EDR_calTower * | ctr, | |||
int | tower, | |||
int * | dst, | |||
const EBF_dirCtbDsc * | contributor, | |||
const ECR_calTower * | constants | |||
) | [static] |
Unpacks the CAL data from 1 tower into a Cal Tower Record (ctr) This routine assumes 4 range readout.
clr | The CAL LAT data structure to fill | |
ctr | The CAL tower data structure to fill | |
tower | The tower number | |
dst | The destination array for the CAL energies | |
contributor | The CAL contributor descriptor | |
constants | The CAL calibration constants for this tower |