GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-5 > tolerances / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

tolerances.c File Reference

Prints the energy and layer dependent tolerances. More...

#include <EFC/../src/TFC_tolerancesDef.h>
#include <PBI/FFS.ih>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <EFC/../src/TFC_tolerancesCfg.h>

Classes

struct  _TFC_toleranceModel
struct  _TFC_tolerancesCfg_xy
struct  _TFC_tolerancesCfg

Typedefs

typedef struct _TFC_toleranceModel TFC_toleranceModel
typedef struct
_TFC_tolerancesCfg_xy 
TFC_tolerancesCfg_xy
typedef struct _TFC_tolerancesCfg TFC_tolerancesCfg

Functions

static const TFC_tolerancesCfg * locate_cfg (void)
 Return a pointer to the tolerances configuration.
static void construct_all (TFC_tolerancesAll *all, const TFC_tolerancesCfg *cfg)
 Constructs the tolerances for all X and Y layers based on the specified model.
static const TFC_toleranceslocate_tolerances (const TFC_tolerancesAll *all, unsigned int energy_leu)
 Locates the set of tolerances to use for the specified energy.
static void construct_xy (TFC_tolerances_xy *tolerances, const TFC_tolerancesCfg_xy *cfg, unsigned int energy_leu)
 Construct/initializes the tolerances for either the X or Y layers.
static unsigned int get_tolerance (const TFC_toleranceModel *model, int layer, float energy)
 Computes the tolerance from the model parameters for the given layer.
static void writeChdr (const TFC_tolerancesAll *all)
static void writeChdr_energy (FILE *f, const TFC_tolerances_xy *xy)
static void writeChdr_tolH (FILE *f, char xy)
static void writeChdr_tol (FILE *f, int which, const unsigned char tols[18])
static void reportHdr (const char *title)
static void report (unsigned int mev, const unsigned char x[18], const unsigned char y[18])
int main (int argc, const char *const argv[])


Detailed Description

Prints the energy and layer dependent tolerances.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: tolerances.c,v 1.3 2011/03/31 21:54:24 russell Exp $

Function Documentation

static void construct_all ( TFC_tolerancesAll all,
const TFC_tolerancesCfg *  cfg 
) [static]

Constructs the tolerances for all X and Y layers based on the specified model.

Parameters:
all The tolerances to initialize
cfg The configuration parameters of the model

References construct_xy(), _TFC_tolerancesAll::energy, _TFC_tolerancesAll::max, and _TFC_tolerancesAll::min.

static void construct_xy ( TFC_tolerances_xy tolerances,
const TFC_tolerancesCfg_xy *  cfg,
unsigned int  energy_mev 
) [static]

Construct/initializes the tolerances for either the X or Y layers.

Parameters:
tolerances The set of tolerances to initialize
cfg The model parameters
energy_mev The energy of the event in Mev

References _TFC_tolerances_xy::extend1, _TFC_tolerances_xy::extend2, _TFC_tolerances_xy::find, and get_tolerance().

Referenced by construct_all().

static unsigned int get_tolerance ( const TFC_toleranceModel *  model,
int  layer,
float  energy 
) [static]

Computes the tolerance from the model parameters for the given layer.

Returns:
The tolerance, in whole units of strip widths
Parameters:
model The model parameters
layer The layer number
energy The energy in Mev

Referenced by construct_xy().

const TFC_tolerancesCfg * locate_cfg ( void   )  [static]

Return a pointer to the tolerances configuration.

Returns:
A readonly pointer to the tolerances configuration

static const TFC_tolerances * locate_tolerances ( const TFC_tolerancesAll all,
unsigned int  energy_leu 
) [static]

Locates the set of tolerances to use for the specified energy.

Returns:
A read-only pointer to the energies
Parameters:
all The set of all tolerances
energy_leu The energy in LEUs

References _TFC_tolerancesAll::energy, and _TFC_tolerancesAll::min.


Generated on Wed Jan 16 13:52:44 2013 by  doxygen 1.5.8