GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EMP / V1-4-1 > ascprint / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

ASC_dgmPrint.c File Reference

Dump routine for the ASC LSF datagram. More...

#include <EMP/ASC_dgmPrint.h>
#include <EMP/ASC.h>
#include <EMP/ASC_ids.h>
#include <EMP/ASC_ascCtb.h>
#include <EMP/ASC_pubdefs.h>
#include <EMP/ASC_statsdefs.h>
#include <EMP/EMP_hdrdefs.h>
#include <ZLIB/zlib.h>
#include <LSF/LSF.h>
#include <PBS/TMR.h>
#include <PBS/MBA.h>
#include <PBS/BSWP.h>
#include <stdio.h>
#include <string.h>

Functions

static void printHdr (const EMP_hdr *hdr)
 Prints info in the EMP_hdr.
static void printHdrEvt (const EMP_hdrEvt *evt, const char *which)
 Prints the statistics information for the first or last event in the sample.
static void printStats (const ASC_stats *stats, unsigned int nsampled)
 Prints the accumulation (mainly timing) statistics.
static int DoInflate (void *source, const unsigned long sourceSize, void *dest, const unsigned long destSize)
 Decompress buff.
void ASC_dgmPrint (const LSF_datagram *dgm, unsigned int options)
 Print the LSF datagram containing EMP/ASC data.


Detailed Description

Dump routine for the ASC LSF datagram.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: ASC_dgmPrint.c,v 1.3 2011/03/26 20:07:42 russell Exp $

Function Documentation

void ASC_dgmPrint ( const LSF_datagram *  dgm,
unsigned int  options 
)

Print the LSF datagram containing EMP/ASC data.

Parameters:
dgm Pointer to the LSF datagram
options Bit mask of optoins, see ASC_PRINT_M in ASC_dgmPrint.h Specifying as -1 prints everything

References ASC_DGMPRINT_M_HEADER, ASC_DGMPRINT_M_STATS, ASC_print(), _ASC_ascBdy_Gzip0::buf, _ASC_ascBdy_Raw0::counters, DoInflate(), _ASC_ascBdy_Gzip0::hdr, _ASC_ascBdy_Raw0::hdr, _ASC_ascBdy_Gzip0::len, _EMP_hdr::nsampled, printHdr(), printStats(), _ASC_ascBdy_Gzip0::stats, and _ASC_ascBdy_Raw0::stats.

static int DoInflate ( void *  source,
const unsigned long  sourceSize,
void *  dest,
const unsigned long  destSize 
) [static]

Decompress buff.

Return values:
0,Success 
-1,inflate failure
-2,inflateInit failure
Parameters:
source Buffer of the compressed data
sourceSize Size, in bytes, of the compressed data
dest Buffer for decompressed data
destSize Maximum size, in bytes of dest buffer

Referenced by ASC_dgmPrint().

static void printHdr ( const EMP_hdr hdr  )  [static]

Prints info in the EMP_hdr.

Parameters:
hdr Pointer to the EMP_hdr

References _EMP_hdrEvtSpan::beg, _EMP_hdrEvtSpan::end, _EMP_hdr::nsampled, printHdrEvt(), and _EMP_hdr::span.

static void printHdrEvt ( const EMP_hdrEvt evt,
const char *  which 
) [static]

Prints the statistics information for the first or last event in the sample.

Parameters:
evt The statistics information to print
which A character string indicating which statistics (first or last is being printed.

References _EMP_hdrTimetones::cur, EMP__hdrEvtSeqGet(), _EMP_hdrTimetone::flags, _EMP_hdrEvt::gemClock, _EMP_hdrTimetone::gemStrobe, _EMP_hdrTimetones::prv, _EMP_hdrEvt::relative, _EMP_hdrTimetone::secs, _EMP_hdrEvt::seq, and _EMP_hdrEvt::timetones.

Referenced by printHdr().

static void printStats ( const ASC_stats stats,
unsigned int  nsampled 
) [static]

Prints the accumulation (mainly timing) statistics.

Parameters:
stats The statistics information to print
nsampled The number of events sampled in compiling these statistics

References _ASC_stats::eacc, _ASC_stats::ecompress, _ASC_stats::edir, _ASC_stats::etotal, _ASC_stats::eunpack, _ASC_stats::nmissed, and _ASC_stats::nused.

Referenced by ASC_dgmPrint().


Generated on Tue Nov 29 18:12:54 2011 by  doxygen 1.5.8