GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSSP / V1-0-2

Constituent: qstd_print     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSTD_labels.h File Reference

Defines the ASCII labels for the Science Statistics Physics entries. More...

This graph shows which files directly or indirectly include this file:


Typedefs

typedef _QSTD_labels QSTD_labels
typedef _QSTD_labelsHandlers QSTD_labelsHandlers
typedef _QSTD_labelsVersions QSTD_labelsVersions

Functions

const QSTD_labels * QSTD_labelsHandlersResolveFull (const QSTD_labelsHandlers *handlers, unsigned int handlerId, unsigned int version)
const QSTD_labelsVersions * QSTD_labelsHandlersResolve (const QSTD_labelsHandlers *handlers, unsigned int handleId)
const QSTD_labels * QSTD_labelsVersionsResolve (const QSTD_labelsVersions *versions, unsigned int version)
const char * QSTD_labelsHandlerGet (const QSTD_labels *labels)
const char * QSTD_labelsConditionGet (const QSTD_labels *labels, unsigned int conditionId)

Detailed Description

Defines the ASCII labels for the Science Statistics Physics entries.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: QSTD_labels.h,v 1.1 2008/06/10 22:25:45 russell Exp $

Overview
The label facility recognizes that a handler's standard statistics not only has its own set of strings for labeling the handler itself and the 32 condition counters, but also accommodates the notion that these labels may change as the statistics evolves in times. Therefore, the label facitily is laid out in hierarchy that is three deep

Implementation Explanation
Note that this defines an interface, but not an implementation. There is a default implementation in the QSSP source directory based on static strings. This is not ideal, because it binds all this information in one place when, in fact, this information should be sourced from the packages that define the standard statistics for each handler. This, however, is a logistics nightmare at this point because that would require modifying packages that live on the embedded side of the great divide, something that is a administrative no-no. So, one is left with this rather unsatistfying solution for the time-being.
Typical usage
Assuming one has
the code to find the labels for this version of the handler statistics would be

        QSTD_labelsVersions *versions;
        QSTD_labels           *labels;
        const char      *handler_name;
        const char    *condition_name;

        / * 
          |    Fetch the versions for this handler, 
          |    then  the labels   for this version
          |
          |    One could also use the convenience routine
          |
          |     labels = QSTD_labelsHandlersResolveFull (handlers,
          |                                              handler,
          |                                              version);
 /
        versions = QSTD_labelsHandlersResolve (handlers, handler);
        labels   = QSTD_labelsVersionsResolve (versions, version);

        handler_name       = QSTD_labelsHandlerGet (labels);
        printf ("Handler: %s\n", handler_name);
        for (idx = 0; idx < 32; idx++)
        {
             condition_name = QSTD_labelsConditionGet (labels, idx);
             printf ("%s %u\n", condition_name, condition_counters[idx]);
        }

Additional Notes
The routines are set-up such that every handler/version will resolve to some QSTD_label structure, even if it is a default structure that only yields generic labels.

Generated on Tue Aug 26 01:24:43 2008 by  doxygen 1.4.4