GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-10-2 > edsprint / mv2304
#include <stdio.h>
#include "EDS/EDR_calPrint.h"
#include "EDS/EDR_cal.h"
#include "EDS/ECR_cal.h"
#include "EDS/EDA_cal.h"
#include "EDS/EBF_cal.h"
#include "EDS/EBF_cid.h"
#include "EDS/FFS.h"
Defines | |
#define | MEV(_energy) (_energy/ECR_CAL_K_LEU_PER_MEV) |
Picks off the whole number of MEVS. | |
#define | FRACTION(_energy) ((_energy & (ECR_CAL_K_LEU_PER_MEV - 1)) * (100/ECR_CAL_K_LEU_PER_MEV)) |
Picks off the fraction of MEVS (100rths). | |
Functions | |
static __inline int | getOffset (int fourRange, unsigned int layerCnts, int layer) |
Calculates the offset to the specified layer number. | |
static char | getDisplayChar (const unsigned int phas) |
Encodes the PHA values of both ends of the log into a single character based on their logarithms. | |
static void | printCalTowerRaw1 (const EDR_calTower *ctr) |
Prints an ASCII formatted dump of a CTR when the tower is single range readout. | |
static void | printCalTowerRaw4 (const EDR_calTower *ctr) |
Prints an ASCII formatted dump of a CTR when the tower is single range readout. | |
static void | printCalLayerRaw (const EBF_calLogData_cf *log, int colMap, int layer, int range) |
Prints the positive and negative PHAs for one layer. | |
static void | printCalRawMapLayer (int four_range, int layer, unsigned int layerCnts, const EDR_calColumnMap *colMapP, const unsigned int *data) |
Prints one row of one tower for the CAL Raw map print function. | |
static void | printEnergy (int energy) |
Prints the energy in units of Mev. | |
static __inline void | printEtot (int energy, const int *layerEnergies) |
Prints the total energy for each layer and the LAT. | |
void | EDR_calPrint (const EDR_cal *clr, unsigned int options) |
Produces an ASCII display of the CAL data. | |
void | EDR_calTowerPrint (const EDR_calTower *ctr) |
Prints an ASCII formatted dump of a CAL tower record. | |
void | EDR_calRawPrint (const EDR_cal *clr, unsigned int options) |
Produces an ASCII display of the CAL data. | |
void | EDR_calRawMapPrint (const EDR_cal *clr) |
Produces an ASCII display of the CAL data in the form of a map, giving one an geometrical idea of where the energy is deposited. | |
void | EDR_calTowerRawPrint (const EDR_calTower *ctr) |
Prints an ASCII formatted dump of a CTR. |
CVS $Id: EDR_calPrint.c,v 1.5 2006/09/13 00:51:28 russell Exp $
#define FRACTION | ( | _energy | ) | ((_energy & (ECR_CAL_K_LEU_PER_MEV - 1)) * (100/ECR_CAL_K_LEU_PER_MEV)) |
Picks off the fraction of MEVS (100rths).
The macros MEV and FRACTION are used to print a pseudo floating point representation of a CAL energy, i.e. something like EEE.ee
void EDR_calPrint | ( | const EDR_cal * | clr, | |
unsigned int | options | |||
) |
Produces an ASCII display of the CAL data.
clr | A previously unpacked CAL LAT Record. | |
options | An options mask. The top 16 bits are a mask of which towers to print (MSB = TOWER 0), the low bit indicates to print the summary |
void EDR_calRawMapPrint | ( | const EDR_cal * | clr | ) |
Produces an ASCII display of the CAL data in the form of a map, giving one an geometrical idea of where the energy is deposited.
clr | A previously unpacked CAL LAT Record. |
void EDR_calRawPrint | ( | const EDR_cal * | clr, | |
unsigned int | options | |||
) |
Produces an ASCII display of the CAL data.
clr | A previously unpacked CAL LAT Raw Record. | |
options | An options mask word. The upper 16 bits (i.e. a left justified value) is mask of which towers to print (MSB = TOWER 0) |
void EDR_calTowerPrint | ( | const EDR_calTower * | ctr | ) |
Prints an ASCII formatted dump of a CAL tower record.
ctr | The CAL tower to display |
void EDR_calTowerRawPrint | ( | const EDR_calTower * | ctr | ) |
Prints an ASCII formatted dump of a CTR.
ctr | The CTR to display |
static char getDisplayChar | ( | const unsigned int | phas | ) | [static] |
Encodes the PHA values of both ends of the log into a single character based on their logarithms.
phas | The array PHA values of the 2 ends. |
static __inline int getOffset | ( | int | fourRange, | |
unsigned int | layerCnts, | |||
int | layer | |||
) | [static] |
Calculates the offset to the specified layer number.
fourRange | Flag indicating 4-range readout (0=NO, 1=YES) | |
layerCnts | The layer counts word | |
layer | The layer to integrate to |
static void printCalLayerRaw | ( | const EBF_calLogData_cf * | log, | |
int | colMap, | |||
int | layer, | |||
int | range | |||
) | [static] |
Prints the positive and negative PHAs for one layer.
log | The logs in this layer | |
colMap | The left justified map of logs struck in this layer | |
layer | If >=0, then will be printed as the layer number | |
range | Currently unused |
static void printCalRawMapLayer | ( | int | fourRange, | |
int | layer, | |||
unsigned int | layerCnts, | |||
const EDR_calColumnMap * | colMapP, | |||
const unsigned int * | data | |||
) | [static] |
Prints one row of one tower for the CAL Raw map print function.
fourRange | Flag indicating 4-range readout (0=NO, 1=YES) | |
layer | The layer to print | |
colMapP | The column map array for this row | |
layerCnts | The layer counts for this tower | |
data | Pointer to the data for this tower |
static void printCalTowerRaw1 | ( | const EDR_calTower * | ctr | ) | [static] |
Prints an ASCII formatted dump of a CTR when the tower is single range readout.
ctr | The CAL tower to display |
static void printCalTowerRaw4 | ( | const EDR_calTower * | ctr | ) | [static] |
Prints an ASCII formatted dump of a CTR when the tower is single range readout.
ctr | The CTR to display |
static void printEnergy | ( | int | energy | ) | [static] |
Prints the energy in units of Mev.
energy | The energy to print |
static __inline void printEtot | ( | int | energy, | |
const int * | layerEnergies | |||
) | [static] |
Prints the total energy for each layer and the LAT.
energy | The total energy in the CAL | |
layerEnergies | The energy in each of the layers across all towers |