GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / dev > gdfilter / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

filter_rto.h File Reference

Utility routines to parse the command line parameters and fill in the run time filter options, interface. More...

#include <EFC/EDM.h>
#include <EDS/io/EBF_stream.h>

Classes

struct  _FilterRto
 Collections all the runtime options together. These are essentially the interpretted command line options. More...

Defines

#define FLT_M_PRJS   (1<<31)
 Print mask to request projection dump.
#define FLT_M_GEO   (1<<30)
 Print mask to request geometry dump;.

Typedefs

typedef enum _FLT_RESULT_ENERGY_K FLT_RESULT_ENERGY_K
 Typedef for struct _FLT_RESULT_ENERGY_K.
typedef enum _FLT_STATS_EBIN_V FLT_STATS_EBIN_V
 Typedef for enum _FLT_STATS_EBIN_V.
typedef enum _FLT_STATS_EBIN_M FLT_STATS_EBIN_M
 Typedef for enum _FLT_STATS_EBIN_M.
typedef enum _OutputFileType_k OutputFileType_k
 The output file type.
typedef struct _FilterRto FilterRto
 Typedef for struct _FilterRto.

Enumerations

enum  _FLT_RESULT_ENERGY_K {
  FLT_RESULT_ENERGY_K_CALCULATED = 0,
  FLT_RESULT_ENERGY_K_GENERATED = 1,
  FLT_RESULT_ENERGY_K_OBSERVED = 2
}
 Indicates which energy is used to classified the event. More...
enum  _FLT_STATS_EBIN_V {
  FLT_STATS_EBIN_V_DEF = 0,
  FLT_STATS_EBIN_V_ALT = 1
}
 Determines how the energy binning of the statistics display, as bit offsets. More...
enum  _FLT_STATS_EBIN_M {
  FLT_STATS_EBIN_M_DEF = (1 << FLT_STATS_EBIN_V_DEF),
  FLT_STATS_EBIN_M_ALT = (1 << FLT_STATS_EBIN_V_ALT)
}
 Determines how the energy binning of the statistics display as in-place bit masks. More...
enum  _OutputFileType_k {
  OUTPUT_FILE_TYPE_K_NONE = 0,
  OUTPUT_FILE_TYPE_K_EBF = 1,
  OUTPUT_FILE_TYPE_K_PKT = 2
}
 The output file type (if any).

Functions

int filter_rtoFill (FilterRto *rto, int argc, char *argv[])
 Examines the command line parameters and fills the print control structure.
void filter_rtoUsageReport (void)
 Describes the command line parameters for daqeb_print.
void filter_rtoPrint (const FilterRto *rto)
 Prints the contents of the print control context.


Detailed Description

Utility routines to parse the command line parameters and fill in the run time filter options, interface.

Author:
JJRussell - russell@slac.stanford.edu

  CVS $Id

There is really no good reason why this code is not included directly in the filter.c code other than it was getting unwieldy large.

Typedef Documentation

Typedef for struct _FLT_RESULT_ENERGY_K.

The result vector records the energy of the event for classification purposes. This value determines the source of that energy. The first is just the energy as calculated from the CAL data. The last two are based on the Monte Carlo truth values. Naturally these last two are available only if these vaues are included in the input data sample. For example, they are not available in data sourced from the FES


Enumeration Type Documentation

Indicates which energy is used to classified the event.

Enumerator:
FLT_RESULT_ENERGY_K_CALCULATED  Use energy calculated from the CAL data
FLT_RESULT_ENERGY_K_GENERATED  Use the GLEAM Monte Carlo generated energy
FLT_RESULT_ENERGY_K_OBSERVED  Use the GLEAM Monte Carlo observed energy

Determines how the energy binning of the statistics display as in-place bit masks.

Enumerator:
FLT_STATS_EBIN_M_DEF  Use the default energy binning
FLT_STATS_EBIN_M_ALT  Use the alternate energy binning

Determines how the energy binning of the statistics display, as bit offsets.

Enumerator:
FLT_STATS_EBIN_V_DEF  Use the default energy binning
FLT_STATS_EBIN_V_ALT  Use the alternate energy binning


Function Documentation

int filter_rtoFill ( FilterRto rto,
int  argc,
char *  argv[] 
)

Examines the command line parameters and fills the print control structure.

Return values:
0 Everything is okay.
-1 Incorrect command usage. Usually this means that the input file name was absent.
Parameters:
rto The runtime options structure to fill.
argc The number of command line parameters.
argv The array of pointers to the command line parameters.
Usage and Warnings
This routine uses 'getopt' to process the command line parameters. This is routine does not provide for lot of flexibility. It rigidly demands that all optional arguments, i.e. the -x type must precede the command line parameters (here the input file name). Getopt provides no positive binding, so all command line options which can accept an option must be provided with one. For instance
      $> filter -n10 -s -PACG my_file

The -s parameter is without a value, well kind of. Its, value, whether intentional or not, is my_file. This behaviour makes providing different defaults whether the option is specified or not specified, impossible. (Here a reasonable interpretation is to set the skip count to 1, rather than 0 if it wasn't specified.)

List options
In order to make the best use of the limited number of available options ([a-zA-Z0-9], some options introduce a list. What follows the list is another set of single character options, but these options are interpreted in the context of that list. This allows characters to be reused.

The current set of lists are

  • M = Message Level List
  • P = Print List
  • S = Summary List
  • E = Which energy to use

Message Level List
A message level list -M options is followed by one or more characters from one of the two sets. The first set establishes the current message level, the second character or characters identifies a target that participates in the message services. The current message level is applied to any and all targets that follow, until a new current message level is establish. The message levels are:
  • D = DEBUG
  • I = INFO
  • W = WARNING
  • E = ERROR
  • F = FATAL

The list of targets is

  • x = all
  • d = EFC_filter, driver routine
  • p = TFC projection tower find
  • s = TFC skirt, track skirt projections
  • f = filter
  • v = TFC_acd, track/acd match

Example

        -MDpsIfv

This indicates the TFC projection tower finding and the TFC skirt matching routines should issue messages at the DEBUG level or higher and that the filter and TFC ACD matching routines should issue messages at the INFO level or higher. Hey, it ain't pretty, but what you gonna do with such a brain-dead facility?

Print List Options
The Print list options are
  • X = all
  • A = Acd
  • C = Cal
  • G = Gem
  • T = Tkr
  • P = Projections
  • g = geometry

Example

        -PACPg

This displays information about the ACD, CAL and found Projections along with a dump of the geometry.

Summary List Options
The summary list options are

  • e = short event summary
  • E = Event-by-Event summary
  • M = use the MC actual (generated) energy as the classifier

       -Se

This requests a short event summary

Energy List
This selects which energy to use in the result vector
  • C = use calculated energy for the CAL
  • O = use MC observed energy
  • G = use MC generated energy

The last two are available iff the input sample is a GLEAM Monte Carlo sample with these values included in the event header.

References _FilterRto::allRead, _FilterRto::clevel, _FilterRto::config, _FilterRto::energy, _FilterRto::esummary, FLT_M_GEO, FLT_RESULT_ENERGY_K_CALCULATED, FLT_STATS_EBIN_M_DEF, _FilterRto::geometry, getEnergyOpt(), getPrintOpts(), getSummaryOpts(), _FilterRto::grbfile, _FilterRto::list, loadLib(), _FilterRto::name, _FilterRto::ofile, _FilterRto::otype, _FilterRto::quiet, _FilterRto::resultCnt, _FilterRto::segSize, _FilterRto::ss_to_print, _FilterRto::statsfile, _FilterRto::to_print, _FilterRto::to_process, _FilterRto::to_skip, _FilterRto::type, and _FilterRto::vetoes.

Referenced by main().

void filter_rtoPrint ( const FilterRto rto  ) 

Prints the contents of the print control context.

Parameters:
rto Pointer to the print control context block.

References _FilterRto::allRead, _FilterRto::clevel, _FilterRto::energy, _FilterRto::name, _FilterRto::ofile, _FilterRto::otype, _FilterRto::segSize, _FilterRto::statsfile, _FilterRto::to_print, _FilterRto::to_process, and _FilterRto::to_skip.

Referenced by doFilter().


Generated on Wed Jan 16 13:35:25 2013 by  doxygen 1.5.8