GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSE_ecalFill.c File Reference

Utilities for the CAL energies. More...

#include "QSE/QSE_ecal.h"
#include "QSE/QSE_ecalFill.h"
#include "QSE/QSE_cal.h"
#include "EDS/ECR_cal.h"
#include "EDS/EDA_cal.h"
#include <string.h>

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 * fill_tower (QSE_ecalTwr *etwr, QSE_ecalGbl *egbl, int *elogs, const QSE_calTwr *twr, const ECR_calTower *ctwr)
 Prints an ASCII formatted dump of a CAL tower record.
int QSE_ecalSizeof (void)
 Returns the size, in bytes, of a QSE_ecal structure.
void QSE_ecalConstruct (QSE_ecal *ecal)
 Does the intial construction of an QSE_ecal structure.
void QSE_ecalFill (QSE_ecal *ecal, const QSE_cal *cal, const ECR_cal *clb, unsigned int options)
 Produces an ASCII display of the CAL data.


Detailed Description

Utilities for the CAL energies.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: QSE_ecalFill.c,v 1.1 2008/09/19 22:02:55 russell Exp $

Function Documentation

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.

Returns:
The energy, in LEUs.
Parameters:
val The ADC value to convert
cal The calibration values for one log end
A simple linear conversion is used and a scaling factor is applied to convert an ADC value to an energy in LEUs (at one time 1 LEU = 1/4 MEV).

static __inline int * fill_tower ( QSE_ecalTwr etwr,
QSE_ecalGbl egbl,
int *  elogs,
const QSE_calTwr twr,
const ECR_calTower *  ctwr 
) [static]

Prints an ASCII formatted dump of a CAL tower record.

Parameters:
etwr The QSE_ecalTwr structure to fill
egbl The QSE_ecal structure to update with total energies
*elogs The pointer to arrary of log energies to fill
twr The unpacked CAL data for the tower
ctwr The calibration constants for this tower

void QSE_ecalConstruct ( QSE_ecal ecal  ) 

Does the intial construction of an QSE_ecal structure.

Parameters:
ecal The QSE_ecal structure to construct

void QSE_ecalFill ( QSE_ecal ecal,
const QSE_cal cal,
const ECR_cal *  clb,
unsigned int  options 
)

Produces an ASCII display of the CAL data.

Parameters:
ecal The QSE_ecal structure to fill
cal A previously unpacked CAL LAT Record.
clb The CAL calibration constants
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

int QSE_ecalSizeof ( void   ) 

Returns the size, in bytes, of a QSE_ecal structure.

Returns:
The size, in bytes, of a QSE_ecal structure


Generated on Thu Sep 2 14:54:58 2010 by  doxygen 1.5.3