GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > eds / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

EDR_cal.h File Reference

Defines the structure containing the unpacked the calorimeter record. More...


Classes

struct  _EDR_calTower
 Structure containing the unpacked CAL data for this tower. More...
struct  _EDR_cal
 Structure containing the unpacked CAL data for all towers. More...

Defines

#define EDR_CAL_TOWER_LAYERMAP_JUSTIFY(_layerMap)   ((_layerMap) << 16)
 Left justifies the layerMap field found in the EDR_calTower structure so that it can be used with the FFSL function.
#define EDR_CAL_TOWER_COLMAP_JUSTIFY(_colMap)   ((_colMap) << 16)
 Left justifies the colMap field found in the EDR_calTower structure so that it can be used with the FFSL function.
#define EDR_CAL_TWRMAP_JUSTIFY(_twrMap)   ((_twrMap))
 Left justifies the twrMap field found in the EDR_cal structure so that it can be used with the FFSL function.
#define EDR_CAL_TOWER_LAYERMAP_INIT   0x8000
 Initial of the layer map, i.e. position of LAYER 0 bit.
#define EDR_CAL_TOWER_COLMAP_INIT   0x8000
 Initial of the column map; i.e. position of COLUMN 0 bit.
#define EDR_CAL_TWRMAP_INIT   0x80000000
 Initial value of the tower map, i.e. for position of tower 0 bit.
#define EDR_CAL_TOWER_LAYERMAP(_layerNum)   (EDR_CAL_TOWER_LAYERMAP_INIT >> (_layerNum))
 Constructs the appropriate bit mask for the layerMap field in the EDR_calTower structure.
#define EDR_CAL_TOWER_COLMAP(_colNum)   (EDR_CAL_TOWER_COLMAP_INIT >> (_colNum))
 Constructs the appropriate bit mask for the colMap field in the EDR_calTower structure.
#define EDR_CAL_TWRMAP(_twrNum)   (EDR_CAL_TWRMAP_INIT >> (_twrNum))
 Constructs the appropriate bit mask for the twrMap field in the EDR_cal structure.
#define EDR_CAL_ENERGY_IS_VALID(_cal)   ((_cal)->valid & EDR_CAL_VALID_M_ENERGY)
 Returns a non zero value is the energies are valid.
#define EDR_CAL_MAP_IS_VALID(_cal)   ((_cal)->valid & EDR_CAL_VALID_M_MAP)
 Returns a non zero value is the address mapping is valid.
#define EDR_CAL_MAP_ENERGY_ARE_VALID(_cal)
 Returns a non zero value if the map and energies are both valid.

Typedefs

typedef unsigned short int EDR_calColumnMap
 Abstract typedef for a CAL column map.
typedef enum _EDR_CAL_VALID_V EDR_CAL_VALID_V
 Typedef for enum _EDR_CAL_VALID_V.
typedef enum _EDR_CAL_VALID_M EDR_CAL_VALID_M
 Typedef for enum _EDR_CAL_VALID_M.
typedef struct _EDR_calTower EDR_calTower
 Typedef for struct _EDR_calTower.
typedef struct _EDR_cal EDR_cal
 Typedef for struct _EDR_lat.

Enumerations

enum  _EDR_CAL_VALID_V {
  EDR_CAL_VALID_V_MAP = 0,
  EDR_CAL_VALID_V_ENERGY = 1
}
 CAL validity value, right justified bit offset. More...
enum  _EDR_CAL_VALID_M {
  EDR_CAL_VALID_M_MAP = (1 << EDR_CAL_VALID_V_MAP),
  EDR_CAL_VALID_M_ENERGY = (1 << EDR_CAL_VALID_V_ENERGY)
}
 CAL validity value, inplace masks. More...


Detailed Description

Defines the structure containing the unpacked the calorimeter record.

Author:
JJRussell - russell@slac.stanford.edu
  CVS $Id: EDR_cal.h,v 1.6 2011/03/25 22:16:54 russell Exp $

Define Documentation

#define EDR_CAL_ENERGY_IS_VALID ( _cal   )     ((_cal)->valid & EDR_CAL_VALID_M_ENERGY)

Returns a non zero value is the energies are valid.

Returns:
A non zero value if the energies are valid
Parameters:
_cal Pointer to an EDR_cal data structure

#define EDR_CAL_MAP_ENERGY_ARE_VALID ( _cal   ) 

Value:

Returns a non zero value if the map and energies are both valid.

Returns:
A non zero value if the map and energies are both valid
Parameters:
_cal Pointer to an EDR_cal data structure

Referenced by EDR_calUnpack().

#define EDR_CAL_MAP_IS_VALID ( _cal   )     ((_cal)->valid & EDR_CAL_VALID_M_MAP)

Returns a non zero value is the address mapping is valid.

Returns:
A non zero value is the address mapping is valid
Parameters:
_cal Pointer to an EDR_cal data structure

Referenced by EDR_calMapUnpack().

#define EDR_CAL_TOWER_COLMAP ( _colNum   )     (EDR_CAL_TOWER_COLMAP_INIT >> (_colNum))

Constructs the appropriate bit mask for the colMap field in the EDR_calTower structure.

Returns:
The bit mask the specified _colNum
Parameters:
_colNum The column number
This macro is used when constructing the colMap field in the EDR_calTower structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the colMap field.

Referenced by mapTower(), mapTower4(), unpackLayer4(), and unpackTower().

#define EDR_CAL_TOWER_COLMAP_INIT   0x8000

Initial of the column map; i.e. position of COLUMN 0 bit.

This parameter is used when constructing the colMap field in the EDR_calTower structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the colMap field. You get the different answers if the colMap field is 16 or 32 bits.
Warning:
This parameter is not for general consumption, but must be placed in the public interface since it is used by other public objects. See EDR_CAL_TOWER_COLMAP.

#define EDR_CAL_TOWER_COLMAP_JUSTIFY ( _colMap   )     ((_colMap) << 16)

Left justifies the colMap field found in the EDR_calTower structure so that it can be used with the FFSL function.

Returns:
The left justified column map
Parameters:
_colMap The column map to justify

#define EDR_CAL_TOWER_LAYERMAP ( _layerNum   )     (EDR_CAL_TOWER_LAYERMAP_INIT >> (_layerNum))

Constructs the appropriate bit mask for the layerMap field in the EDR_calTower structure.

Returns:
The bit mask the specified _layerNum
Parameters:
_layerNum The layer number
This macro is used when constructing the layerMap field in the EDR_calTower structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the layerMap field.

Referenced by unpackTower(), and unpackTower4().

#define EDR_CAL_TOWER_LAYERMAP_INIT   0x8000

Initial of the layer map, i.e. position of LAYER 0 bit.

This parameter is used when constructing the layerMap field in the EDR_calTower structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the layerMap field. You get the different answers if the layerMap field is 16 or 32 bits.
Warning:
This parameter is not for general consumption, but must be placed in the public interface since it is used by other public objects. See EDR_CAL_TOWER_LAYERMAP.

Referenced by mapTower(), and mapTower4().

#define EDR_CAL_TOWER_LAYERMAP_JUSTIFY ( _layerMap   )     ((_layerMap) << 16)

Left justifies the layerMap field found in the EDR_calTower structure so that it can be used with the FFSL function.

Returns:
The left justified layer map
Parameters:
_layerMap The layer map to justify

#define EDR_CAL_TWRMAP ( _twrNum   )     (EDR_CAL_TWRMAP_INIT >> (_twrNum))

Constructs the appropriate bit mask for the twrMap field in the EDR_cal structure.

Returns:
The bit mask the specified _twrNum
Parameters:
_twrNum The tower number
This macro is used when constructing the twrMap field in the EDR_cal structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the colMap field.

#define EDR_CAL_TWRMAP_INIT   0x80000000

Initial value of the tower map, i.e. for position of tower 0 bit.

This parameter is used when constructing the twrMap field in the EDR_cal structure. Use of the parameter will avoid mistakes caused by incorrectly assuming the size of the twrMap field. You get the different answers if the twrMap field is 16 or 32 bits.
Warning:
This parameter is not for general consumption, but must be placed in the public interface since it is used by other public objects. See EDR_CAL_TWRMAP.

#define EDR_CAL_TWRMAP_JUSTIFY ( _twrMap   )     ((_twrMap))

Left justifies the twrMap field found in the EDR_cal structure so that it can be used with the FFSL function.

Returns:
The left justified column map
Parameters:
_twrMap The tower map to justify


Typedef Documentation

Typedef for enum _EDR_CAL_VALID_M.

This enumerates which sections of the EDR_cal data are valid. An unpacker may, for efficiency reasons, chose to unpack only the portion of the data it needs at a given time. Any consumer of the data should either check that the data he is accessing is valid, or ask that it be unpacked. The unpacker is free to consult the validity word and, if the request has already been satisfied, merely return. This tactic allows multiple users to call the unpacker on the same event without the unpacker actually multiply unpacking the event

Typedef for enum _EDR_CAL_VALID_V.

This enumerates which sections of the EDR_cal data are valid. An unpacker may, for efficiency reasons, chose to unpack only the portion of the data it needs at a given time. Any consumer of the data should either check that the data he is accessing is valid, or ask that it be unpacked. The unpacker is free to consult the validity word and, if the request has already been satisfied, merely return. This tactic allows multiple users to call the unpacker on the same event without the unpacker actually multiply unpacking the event

Abstract typedef for a CAL column map.

This is done so that pointers to the CAL column map array will be declared in a uniform manner. If this typedef every changes, the code only needs to be recompiled, not changed.

Typedef for struct _EDR_calTower.

This record contains information needed to access the calorimeter information for this tower. To first order it is a copy of the raw calorimeter data record, but with the raw ADC readings transformed into calibrated energies.
It is augmented with the total energy in this tower along with the energy by layer. The column number for each layer is stored as a bit mask per layer.
All arrays below are densely packed. This means that one is not allowed to access the energy per layer or column maps without first consulting the layer map for the valid layers. It also means there is no random access by layer to these quantities; they must be sequentially decoded.
Programically the way to do this is
     const EDR_calColumnMap *colMapP = ctr->colMap;
     const int      *layerEnergyP = ctl->energy;
     while (layerMap)
     {
        layerNum = ffs (layerMap);
        colMap   = *colMapP++;
        while (colMap)
        {
           colNum = ffs (colMap);
           .
  


Enumeration Type Documentation

CAL validity value, inplace masks.

Enumerator:
EDR_CAL_VALID_M_MAP  The address maps have been populated
EDR_CAL_VALID_M_ENERGY  The energy portion has been populated

CAL validity value, right justified bit offset.

Enumerator:
EDR_CAL_VALID_V_MAP  The address maps have been populated
EDR_CAL_VALID_V_ENERGY  The energy portion has been populated


Generated on Thu Sep 27 13:49:05 2012 by  doxygen 1.5.8