class DatEnv Data processing monitor base class.
| | mIn Frame Input object |
| | mRawID Raw trigger data identifier for current epoch. |
| | getDacc (void) Get the data accessor. |
Introduction
The data processing base class defines the basic routines necessary for a data processing application. The DatEnv class is designed to provide a similar environment whether running in the foreground (i.e. under root) or in the background. The functions provided by the environment are:
- Parse common command line arguments.
- Read frames.
- Copy requested data into time series (TSeries) containers.
- Handling attention interrupts.
- Clean up on termination.
Writing a DatEnv Monitor
The strategy for writing a monitor program is to create a class (MyClass) based on DatEnv 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.
Epoch processing (void ProcessData(void))
- Process data from one epoch.
- Generate trigger is 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 DatTemplate.hh and DatTemplate.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.
Running 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> Read frames from <file> -inlist <list> Read frames from files listed in <list> -maxframes <nFr> Stop after reading <nFr> frames -partition <part> Read from shared memory partition <part>. 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("DatEnv.hh");
gROOT->LoadMacro("DatEnv.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 ~DatEnv()
void MainLoop(void)
virtual void ProcessData(void)
virtual void Attention(void)
void finish(void)
int Debug(void) const
const Dacc& getDacc(void) const
bool isDatEnvArg(const char* arg) const
void setStrideAlignment(unsigned long mult, double off)
off - boundary offset
bool testAttnSignal(int sig) const
Dacc& getDacc(void)
Dacc mIn
trig::TrigRaw mRawID
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++