class TrigEnv Triggered data processing base class.
| | mIn Frame Input object |
| | getDacc (void) Get the data accessor. |
Introduction
The triggered data processing base class defines the basic routines necessary for processing data selected by a trigger table. Each trigger is passed to a user method for selection and detemination of the time epoch. The data from the specified epoch are then passed to a second user method containing the data processing code. The TrigEnv class provides an environment similar to that supplied by DatEnv. The functions provided by the TrigEnv are:
- Parse common command line arguments.
- read and parse a trigger table.
- Read frames selected by the triggers.
- Copy requested data into time series (TSeries) containers.
- Handling attention interrupts.
- Clean up on termination.
Writing a TrigEnv Monitor
The strategy for writing a monitor program is to create a class (MyClass) based on TrigEnv including a constructor, destructor and ProcessData method. An attention handler may also be provided if desired. The operations to be performed by each of these methods are:
Constructor (MyClass(int argc, const char* argv[]))
- Process user specific arguments
- Define parameters (see TrigPar class).
- Configure the process.
- Request data channels with Dacc::addChannel.
Destructor (~MyClass(void))
- Save modified parameters
- Print results and statistics.
Trigger processing (bool ProcessTrigger(const trig::TrigBase\& x))
- Interpret trigger data.
- Determine whether the triggered data are to be processed.
- Defined the trigger epoch.
Epoch processing (void ProcessData(void))
- Process data from one epoch.
- Generate trigger if necessary.
- Keep statistics.
Interrupt handler (void Attention(void))
- Monitor dependent interrupt processing.
The EXECDAT(myclass) macro is used to generate the main function. Definition and implementation templates are available from TrigTemplate.hh and TrigTemplate.cc.
The EXEROOT(myclass) macro is used to generate a main function with root graphics. Note that the "TROOT.h" and "TApplication.h" header files must be included in your monitor implementation file if EXEROOT is used.
Compiling the monitor
The monitor class can be compiled and linked using the default makefile which can be found in \$DMTHOME/\$DMTVERSION/doc/DMTBase/Makefile.defaultRunning the Monitor
The base class constructor recognizes the following command line arguments:If no input option is specified, the frames are read from the partition specified by the LIGOSMPART environment variable or, if this is not defined, from "LIGO_Online".
-debug <lvl> Set debug level to <lvl> -infile <file> Frame data files (names may contain '*'s). -inlist <list> Frame data files (names may contain '*'s). -stride Default stride time (in seconds). -toffset Start of epoch relative to trigger time. -tepoch Length of epoch (in seconds). -ttable Ligo_lw table containing triggers. When running under ROOT, the base class definition and implementation files must be loaded before the monitor can be run. If these files aren't provided automatically by the start-up script, they may be loaded with:
gROOT->LoadMacro("TrigEnv.hh");
gROOT->LoadMacro("TrigEnv.cc");
The monitor is run with the .x command or by loading it and calling it as a function. See the note entitled "Online monitoring of LIGO Data Using ROOT" for more details.
virtual ~TrigEnv(void)
void MainLoop(void)
virtual void ProcessData(void)
virtual bool ProcessTrigger(const trig::TrigBase& t)
virtual void Attention(void)
void finish(void)
int Debug(void) const
const Dacc& getDacc(void) const
const Interval getEpochLength(void) const
const Interval getEpochOffset(void) const
const Interval getStride(void) const
const trig::TrigBase& getTrigger(void) const
bool isTrigEnvArg(const char* arg) const
void setEpochLength(const Interval& t)
void setEpochOffset(const Interval& t)
void setStride(const Interval& t)
Dacc& getDacc(void)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++