GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBP / V1-0-2 > grbp_epu / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

grbp_epu.c File Reference

Test environment for track finding Format file to stdout. More...

#include <GRBP/GRBP_server.h>
#include <GRBP/io/GRB_stream.h>
#include <GRBP_msgdef.h>
#include <GRBP_DB/GRBP_DB_serverSchema.h>
#include <GRBP_DB/GRBP_DB_print.h>
#include <GRB/GRB_epu.h>
#include <GRB/GRB_pktdef.h>
#include <EFC/EDM.h>
#include <EFC/TFC_prjFind.h>
#include <EFC/TFC_prjDef.h>
#include <EFC/TFC_geometry.h>
#include <EFC/TFC_tolerances.h>
#include <EFC/TFC_prjPrint.h>
#include <EDS/EBF_dir.h>
#include <EDS/EDR_calUnpack.h>
#include <EDS/EDR_tkrUnpack.h>
#include <EDS/EDS_fw.h>
#include <EDS/EBF_siv.h>
#include <EDS/EBF_mc.h>
#include <EDS/io/EBF_stream.h>
#include <EDS/io/LCBP.h>
#include <EDS/LCBV.h>
#include <GEO_DB/GEO_DB_schema.h>
#include <GEO_DB/GEO_DB_print.h>
#include <CDM/CDM_pubdefs.h>
#include <CMX/CMX_lookupPub.h>
#include <PBI/BSWP.ih>
#include <stdlib.h>
#include <stdio.h>
#include <GRBP_math.h>

Classes

struct  _Pkt
 A message packet. More...
struct  _Ctl
 Collections all the control parameters together. These are essentially the interpretted command line options. More...
struct  _MsgCtx
 Controls the allocation, management and writing of messages. More...
struct  _TkrCtx
 Static values needed to perform the projection finding. More...
struct  _Ctx
 The runtime context. More...

Defines

#define EDM_USE   1

Typedefs

typedef struct _EBF_dir EBF_dir
typedef struct _EDR_tkr EDR_tkr
typedef struct _Pkt Pkt
 Typedef for struct _Pkt.
typedef struct _Ctl Ctl
 Typedef for struct _Ctl.
typedef struct _MsgCtx MsgCtx
 Typedef for struct _MsgCtx.
typedef struct _TkrCtx TkrCtx
 Typedef for struct _TkrCtx.
typedef struct _Ctx Ctx
 Typedef for struct _Ctx.

Functions

static int fillCtl (Ctl *ctl, int argc, char *const argv[])
 Examines the command line parameters and fills the control structure.
static int loadLib (const char *library_name, int verbose)
 Dynamically loads the specified configuration library.
static GRBP_DB_serverSchemaAll * getSchema (int verbose)
 Returns the GRBP DB schema.
static void constructTkr (TkrCtx *tkr, int print)
 Constructs the static, configuration portion of the track-finding context.
static const TFC_DB_geometry * locateGeo (int print)
 Loads the TKR Filter Code Geometry.
static void reportUsage (void)
 Brief explanation on readtest usage.
static unsigned int find (Ctl *ctl)
 Finishes the platform common setup and initalization, starts the packet flow.
static unsigned int process (Ctx *ctx, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb)
 Process one event.
static void check_mc (const EBF_mc *mc, const GRB_msgHdr *msg_hdr)
static __inline void compute_energy (EDS_fwIxb *ixb)
 Unpack the CAL, all we are really looking for is the total energy.
static void find_projections (TkrCtx *tkr_ctx, EDS_fwIxb *ixb, int message_level)
int main (int argc, char *const argv[])
 Usual entry point for the readtest.

Variables

EDM_level TFC_PrjTowerFind_edm


Detailed Description

Test environment for track finding Format file to stdout.

Author:
JJRussell - russell@slac.stanford.edu
Usage
Example:

    $ tkr_find -n<# of events> -s<# to skip> -L geometry <file.ebf>
   

For a complete explanation type tkr_find with no arguments.
    CVS $Id: grbp_epu.c,v 1.4 2011/03/30 22:11:51 russell Exp $

Function Documentation

static __inline void compute_energy ( EDS_fwIxb *  ixb  )  [static]

Unpack the CAL, all we are really looking for is the total energy.

Parameters:
ixb The information exchange block

Referenced by process().

static void constructTkr ( TkrCtx tkr,
int  print 
) [static]

Constructs the static, configuration portion of the track-finding context.

Parameters:
tkr The track-finding context to fill in
print Print the tracker geometry

References _TkrCtx::geo, _TkrCtx::geoTkr, locateGeo(), _TkrCtx::tolerancesAll, and _TkrCtx::tolerancesCfg.

Referenced by find().

static int fillCtl ( Ctl ctl,
int  argc,
char *const   argv[] 
) [static]

Examines the command line parameters and fills the control structure.

Parameters:
ctl The parameter control block.
argc The number of command line parameters.
argv The array of pointers to the command line parameters.
Return values:
0,Everything is okay.
-1,Incorrect command usage. Usually this means that the input file name was absent.

References GRB_STREAM_TYPE_K_FILE, _Ctl::grbname, loadLib(), _Ctl::message_level, _Ctl::name, _Ctl::print_cfg, reportUsage(), _Ctl::stream, _Ctl::to_process, _Ctl::to_skip, _Ctl::type, and _Ctl::verbose.

Referenced by main().

static unsigned int find ( Ctl ctl  )  [static]

static GRBP_DB_serverSchemaAll * getSchema ( int  verbose  )  [static]

Returns the GRBP DB schema.

Returns:
The GRBP DB schema
Parameters:
verbose Flag indicating to print message about the origin either dynamically loaded CDM or default parameters

Referenced by find().

static int loadLib ( const char *  library_name,
int  verbose 
) [static]

Dynamically loads the specified configuration library.

Return values:
0,success 
-1,failure 
Parameters:
library_name The name of the library to load
verbose The verbosity level

Referenced by fillCtl().

static const TFC_DB_geometry * locateGeo ( int  print  )  [static]

Loads the TKR Filter Code Geometry.

Parameters:
print Print Options

Referenced by constructTkr().

int main ( int  argc,
char *const   argv[] 
)

Usual entry point for the readtest.

Parameters:
argc The number of arguments
argv The vector of arguments.
For usage type tkr_find with no arguments

References fillCtl(), find(), and _Ctl::message_level.

static unsigned int process ( Ctx ctx,
unsigned int  pktBytes,
EBF_pkt *  pkt,
EBF_siv  siv,
EDS_fwIxb *  ixb 
) [static]

Process one event.

Returns:
The EDSD_fw fate and needs status
Parameters:
ctx The control/context parameter
pktBytes The number of bytes in pkt, includes the packet header
pkt The event data packet
siv The packet's state information vector
ixb The framework's information exchange block
This is only called back on the last packet of an event.

References compute_energy(), _GRBP_msg::hdr, _Pkt::hdr, _MsgCtx::hdr, _MsgCtx::left, _Ctx::message_level, _Ctx::msg, _Pkt::msgs, _MsgCtx::pkt, _Ctx::server, _Ctx::services, _MsgCtx::stream, and _Ctx::tkr.

Referenced by find().


Generated on Tue Sep 27 19:15:17 2011 by  doxygen 1.5.8