GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / dev > edsprint / linux-gcc
#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 <PBI/FFS.ih>
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.6 2011/03/25 22:16:56 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
Referenced by printEnergy(), and printEtot().
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 |
References EBF_CID_M_TEMS, EDR_CALPRINT_OPTS_M_SUMMARY, EDR_CALPRINT_OPTS_M_TOWERS, EDR_calTowerPrint(), and printEtot().
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. |
References printCalRawMapLayer().
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) |
References EDR_calTowerRawPrint().
void EDR_calTowerPrint | ( | const EDR_calTower * | ctr | ) |
Prints an ASCII formatted dump of a CAL tower record.
ctr | The CAL tower to display |
References printEnergy().
Referenced by EDR_calPrint().
void EDR_calTowerRawPrint | ( | const EDR_calTower * | ctr | ) |
Prints an ASCII formatted dump of a CTR.
ctr | The CTR to display |
References printCalTowerRaw1(), and printCalTowerRaw4().
Referenced by EDR_calRawPrint().
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. |
References _EBF_calLogData::cf, _EBF_calLogData_cf::phaN, _EBF_calLogData_cf::phaP, and _EBF_calLogData::ui.
Referenced by printCalRawMapLayer().
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 |
Referenced by printCalRawMapLayer().
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 |
References _EBF_calLogData_cf::phaN, and _EBF_calLogData_cf::phaP.
Referenced by printCalTowerRaw1(), and printCalTowerRaw4().
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 |
References EDA_CAL_K_LOGS_PER_LAYER, getDisplayChar(), and getOffset().
Referenced by EDR_calRawMapPrint().
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 |
References printCalLayerRaw().
Referenced by EDR_calTowerRawPrint().
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 |
References printCalLayerRaw().
Referenced by EDR_calTowerRawPrint().
static void printEnergy | ( | int | energy | ) | [static] |
Prints the energy in units of Mev.
energy | The energy to print |
Referenced by EDR_calTowerPrint().
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 |
References EDA_CAL_K_LAYERS_PER_LAT, FRACTION, and MEV.
Referenced by EDR_calPrint().