GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> TCC_DB / V0-0-1 > tcc_db_test / rhel6-64
Classes | |
struct | _TCC_DB_schema |
The Tracker Configuration Schema databases. More... | |
Typedefs | |
typedef struct _TCC_DB_schema | TCC_DB_schema |
Typedef of struct _TCC_DB_schema. | |
typedef enum _TCC_DB_K | TCC_DB_K |
Typedef for enum _TCC_DB_K. | |
typedef enum _TCC_DB_TYPE_K | TCC_DB_TYPE_K |
Typedef for enum _TCC_DB_TYPE_K. | |
typedef enum _TCC_DB_TARGET_K | TCC_DB_TARGET_K |
Typedef for enum _TCC_DB_TARGET_K. | |
typedef enum _TCC_DB_SUBSYSTEM_K | TCC_DB_SUBSYSTEM_K |
Typedef for enum _TCC_DB_SUBSYSTEM_K. | |
typedef int(* | TCC_DB_fill_splits_cb )(void *prm, int twr, int lyr, int lo, int hi) |
typedef int(* | TCC_DB_fill_dead_data_cb )(void *prm, int twr, int lyr, int strip, int cnt) |
typedef int(* | TCC_DB_fill_dead_trigger_cb )(void *prm, int twr, int lyr, int strip, int cnt) |
typedef int(* | TCC_DB_fill_generic_cb )(void *prm,...) |
Generic fill callback routine. The user should never reference this object. It is here for internal use only. | |
typedef int(* | TCC_DB_construct_rtn )(const TCC_DB_schema *schema, void *prm) |
One time construction/initialization routine,. | |
typedef unsigned int(* | TCC_DB_checksum_rtn )(const TCC_DB_schema *schema) |
Retrieves the checksum. This routine should not be called until after TCC_DB_construct has been called. | |
typedef int(* | TCC_DB_fill_rtn )(const TCC_DB_schema *schema, TCC_DB_TYPE_K type, TCC_DB_fill_generic_cb fill_rtn, void *fill_prm) |
Template of the function used to call the user's fill callback routine. | |
Enumerations | |
enum | _TCC_DB_K { TCC_DB_K_SCHEMA = 0xaf, TCC_DB_K_VERSION = 0 } |
The CDM schema and version number for TCC_DB databases. More... | |
enum | _TCC_DB_TYPE_K { TCC_DB_TYPE_K_SPLITS = 0, TCC_DB_TYPE_K_DEAD_DATA = 1, TCC_DB_TYPE_K_DEAD_TRIGGER = 2 } |
Enumerates the data types. More... | |
enum | _TCC_DB_TARGET_K { TCC_DB_TARGET_K_ON_ORBIT = 0, TCC_DB_TARGET_K_GLEAM = 1, TCC_DB_TARGET_K_PRELAUNCH = 2 } |
Enumerates the target system. More... | |
enum | _TCC_DB_SUBSYSTEM_K { TCC_DB_SUBSYSTEM_K_UNDEFINED = 0, TCC_DB_SUBSYSTEM_K_ACD = 1, TCC_DB_SUBSYSTEM_K_CAL = 2, TCC_DB_SUBSYSTEM_K_TKR = 3 } |
Enumerates the subsystem of database (i.e. ACD, CAL, TKR). More... | |
Functions | |
static __inline int | TCC_DB_construct (const TCC_DB_schema *schema, void *prm) |
One time construction/initialization routine. | |
static __inline unsigned int | TCC_DB_checksum (const TCC_DB_schema *schema) |
Returns the TCC_DB checksum value. This is not valid until TCC_DB_construct has been called. | |
static __inline TCC_DB_SUBSYSTEM_K | TCC_DB_subsystem (const TCC_DB_schema *schema) |
Returns the subsystem. For TCC_DB's this is always TCC_DB_SUBSYSTEM_K_TKR. | |
static __inline TCC_DB_TARGET_K | TCC_DB_target (const TCC_DB_schema *schema) |
Returns the instrument target type. This is one of the enums TCC_DB_TARGET. | |
static __inline int | TCC_DB_fill_splits (const TCC_DB_schema *schema, TCC_DB_fill_splits_cb fill_rtn, void *fill_prm) |
Routine to drive the user fill splits call back routine. | |
static __inline int | TCC_DB_fill_dead_data (const TCC_DB_schema *schema, TCC_DB_fill_dead_data_cb fill_rtn, void *fill_prm) |
Routine to drive the user fill dead data channel callback routine. | |
static __inline int | TCC_DB_fill_dead_trigger (const TCC_DB_schema *schema, TCC_DB_fill_dead_trigger_cb fill_rtn, void *fill_prm) |
Routine to drive the user fill dead trigger channel callback routine. |
CVS $Id: TCC_DB_schema.h,v 1.1.1.1 2007/02/13 20:53:39 russell Exp $
This package does not in of itself produce any binary code. It is simply a place where definitions common to each instance of tracker configuration database live.
The information contained in here must mirror that of the LATC tracker configuration. If, in the future, it is possible to extract this information directly from the LATC files, then part of the reason for the existence of this package and its children will go away. The reason for the hedge-word part is because the information in this file also supports GLEAM configurations. It is very unlikely that there will every be the equivalent of LATC files for GLEAM, so while the need for this package may diminish, it may be that it never disappears entirely.
Access to the schema should be done solely through the list of the functions provided. The user is discouraged from directly accessing field members. Compliance will at least ensure compile-time compatibility and, in many cases, run-time compatibilty as the database evolves in time. See the Prototypes section for a list of the interface functions.
unsigned int(* TCC_DB_checksum_rtn)(const TCC_DB_schema *schema) |
Retrieves the checksum. This routine should not be called until after TCC_DB_construct has been called.
schema | The TCC_DB schema. |
int(* TCC_DB_construct_rtn)(const TCC_DB_schema *schema, void *prm) |
One time construction/initialization routine,.
==0,if | successful | |
!=0,if | failed |
schema | The TCC_DB schema | |
prm | This is currently unused and should be specified as NULL It is meant to be a placeholder if, in the future, a need for some sort of construction option should be necessary. |
typedef int(* TCC_DB_fill_dead_data_cb)(void *prm, int twr, int lyr, int strip, int cnt) |
==0,continue | calling the user back | |
!=0,stop | calling the user back. |
prm | User provide context structure. Most likely this is the structure used to receive the dead channel information from the database. | |
twr | The tower number (0-15) of the dead data channel | |
lyr | The layer number (0-35) of the dead data channel | |
strip | The beginning dead strip number. | |
cnt | The number of dead strips beginning at strip. |
typedef int(* TCC_DB_fill_dead_trigger_cb)(void *prm, int twr, int lyr, int strip, int cnt) |
==0,continue | calling the user back | |
!=0,stop | calling the user back. |
prm | User provide context structure. Most likely this is the structure used to receive the dead channel information from the database. | |
twr | The tower number (0-15) of the dead trigger channel | |
lyr | The layer number (0-35) of the dead trigger channel | |
strip | The beginning dead strip number. | |
cnt | The number of dead strips beginning at strip. |
int(* TCC_DB_fill_generic_cb)(void *prm,...) |
Generic fill callback routine. The user should never reference this object. It is here for internal use only.
==0,continue | calling the user back | |
!=0,stop | calling the user back. |
prm | Arbitrary user parameter followed by fill specific arguments |
typedef int(* TCC_DB_fill_rtn)(TCC_DB_schema *schema, TCC_DB_OBJ_TYPE_K type, TCC_DB_fill fill_rtn, void *fill_prm) |
Template of the function used to call the user's fill callback routine.
schema | The TCC_DB schema | |
type | The type of fill routine to callback | |
user_fill | The user's fill callback routine | |
user_prm | The user's fill callback routine's parameter |
typedef int(* TCC_DB_fill_splits_cb)(void *prm, int twr, int lyr, int lo, int hi) |
==0,continue | calling the user back | |
!=0,stop | calling the user back. |
prm | User provide context structure. Most likely this is the structure used to receive the split point information from the database. | |
twr | The tower number (0-15) of the split point | |
lyr | The layer number (0-35) of the split point | |
lo | The number of GTFEs readout by the low-side controller | |
hi | The number of GTFEs readout by the high-side controller |
Typedef for enum _TCC_DB_K.
Typedef of struct _TCC_DB_schema.
The information exposed here is kept to the bare minimum. In order to maintain flexibility on how the data is organized and stored, access to the information is only via the fill callback routine. The user's interface for any given type of data is fixed. It is the responsibility of this database schema to implement this routine so obey that interface, independent of how the data is internally organized.
This is not meant to be a particularly efficient interface, but it should provide good insulation against change.
In order to shield the user from the small remaining details, access routines are provided these are
These routines are exported as inlines, keeping in the philosophy that TCC_DB exports no compiled object code. The routines themselves are quite simple, but insulate the user from directly accessing field members of the schema and containing various ugly casts in this code rather than in user code.
Typedef for enum _TCC_DB_SUBSYSTEM_K.
Typedef for enum _TCC_DB_TARGET_K.
In general, different Track Configuration data bases should be kept in different packages. The reasoning is, simple, the configuration is unique to that target.
Typedef for enum _TCC_DB_TYPE_K.
Currently there are three types of data blocks.
enum _TCC_DB_K |
enum _TCC_DB_SUBSYSTEM_K |
enum _TCC_DB_TARGET_K |
enum _TCC_DB_TYPE_K |
static __inline unsigned int TCC_DB_checksum | ( | const TCC_DB_schema * | schema | ) | [static] |
Returns the TCC_DB checksum value. This is not valid until TCC_DB_construct has been called.
schema | The TCC_DB schema |
References _TCC_DB_schema::checksum.
static __inline int TCC_DB_construct | ( | const TCC_DB_schema * | schema, | |
void * | prm | |||
) | [static] |
One time construction/initialization routine.
==0,if | successful | |
!=0,if | failed |
schema | The TCC_DB schema | |
prm | This is currently unused and should be specified as NULL It is meant to be a placeholder if, in the future, a need for some sort of construction option should be necessary. |
References _TCC_DB_schema::construct.
static __inline int TCC_DB_fill_dead_data | ( | const TCC_DB_schema * | schema, | |
TCC_DB_fill_dead_data_cb | fill_rtn, | |||
void * | fill_prm | |||
) | [static] |
Routine to drive the user fill dead data channel callback routine.
schema | The database schema | |
fill_rtn | The user provided dead data channel fill callback routine | |
fill_prm | Arbitrary parameter passed to the fill_rtn |
References _TCC_DB_schema::fill, and TCC_DB_TYPE_K_DEAD_DATA.
static __inline int TCC_DB_fill_dead_trigger | ( | const TCC_DB_schema * | schema, | |
TCC_DB_fill_dead_trigger_cb | fill_rtn, | |||
void * | fill_prm | |||
) | [static] |
Routine to drive the user fill dead trigger channel callback routine.
schema | The database schema | |
fill_rtn | The user provided dead trigger channel fill callback routine | |
fill_prm | Arbitrary parameter passed to the fill_rtn |
References _TCC_DB_schema::fill, and TCC_DB_TYPE_K_DEAD_TRIGGER.
static __inline int TCC_DB_fill_splits | ( | const TCC_DB_schema * | schema, | |
TCC_DB_fill_splits_cb | fill_rtn, | |||
void * | fill_prm | |||
) | [static] |
Routine to drive the user fill splits call back routine.
schema | The database schema | |
fill_rtn | The user provided split fill callback routine | |
fill_prm | Arbitrary parameter passed to the fill_rtn |
References _TCC_DB_schema::fill, and TCC_DB_TYPE_K_SPLITS.
static __inline TCC_DB_SUBSYSTEM_K TCC_DB_subsystem | ( | const TCC_DB_schema * | schema | ) | [static] |
Returns the subsystem. For TCC_DB's this is always TCC_DB_SUBSYSTEM_K_TKR.
schema | The TCC_DB schema |
The user is encourage to use this function rather than directly accessing the database.
References _TCC_DB_schema::subsystem.
static __inline TCC_DB_TARGET_K TCC_DB_target | ( | const TCC_DB_schema * | schema | ) | [static] |
Returns the instrument target type. This is one of the enums TCC_DB_TARGET.
schema | The TCC_DB schema |
References _TCC_DB_schema::target.