DMT Triggers

DMT Trigger generation classes

Segment
Trigger result base class.
TrigDisp
Trigger disposition codes
TrigPrio
Trigger priority enumeration
TrigBase
Trigger result base class.
TrigProc
Trigger process class.
TrigRaw
Trigger raw data descriptor class
TrigRslt
Trigger result class.
Introduction
Triggers and Segments are data which are recorded in LDAS meta-Data data base tables for use in later analysis of interferometer data. Triggers provide a means by which the monitor can record unusual effects discovered in the data or in the interferometer operating state. Triggers may represent anything from a purely informational annotation to a severe error (e.g. DAQ hardware failure). Four severity levels have been enumerated to describe the
Trigger Priority.

Segments define time spans during which the interferometer data exhibit some common property. The most obvious property to be logged in segment tables is whether the interferometer is locked. Any other property (e.g. noise levels below a given threshold) or combination of properties that are meaningful in selecting data for analysis may be saved as segments.

The DMT trigger classes are used to describe triggers, segments and related data. These include:

The trigger classes are based on the tables LDAS meta-data tables defined in "Table Definitions for LDAS Metadata / Event Database" (LIGO-T990101-02-E).

The Trigger Client API
Triggers and segments are generated by constructing an object from the appropriate class, i.e. a Segment or a class based on the TrigBase class, and sending the result to the Trigger Manager using the Trigger Client API.

Two modifications must be made to a monitor to allow it to communicate with the Trigger Manager. First, any monitor process that will generate triggers must identify itself by creating a Trigger Process Identifier (see TrigProc class) when the process starts. The process identification is registered with the trigger manager when the trigger client channel is opened (see below). This is automated by The ProcIdent.hh header file. The monitor author needs only to include the following lines in the implementation (<monitor>.cc) file:

        #define PIDCVSHDR "'$'Header'$'"
        #define PIDTITLE  "Monitor Title"
        #include "ProcIdent.hh"
     
Note: the string "'$'" should be replaced by "$", but is not shown as such to circumvent CVS symbol substitution.

The second step is to construct a trigger client. The Trigger Client can be added to the monitor as a base class. For example, when writing a DatEnv monitor, you would define your monitor class as follows:

     #include "DatEnv.hh"
     #include "TrigClient.hh"
        class MyMonitor : public DatEnv, TrigClient {
        public:
	    MyMonitor(int argc, const char* argv[]);
	    ~MyMonitor(void);
	    void ProcessData(void);
	    ...
	private:
	    ...
        }
     
You would of course add all the data members and methods specific to your monitor to the class. In the class implementation you need only to construct a Trigger and send it to the Trigger manager, as follows:
#include "TrigBase.cc"
#include "MyMonitor.hh"
#define PIDCVSHDR "'$'Header'$'"
#define PIDTITLE  "My Monitor with trigger generation"
#include "ProcIdent.hh"

EXECDAT(MyMonitor)   //  construct a main function

MyMonitor::MyMonitor(int argc, const char* argv[]) 
  : DatEnv(argc, argv) 
{
  ...  // Monitor dependent construction
}

MyMonitor::~MyMonitor(void) {
  ...  // Monitor dependent destruction
}

void MyMonitor::ProcessData(void) {
    ...
  trig::TrigBase trigData("Trigger ID", "Sub ID");
  trigData.setTime(Now());               // Set trigger time
  trigData.setDuration(Interval(1.0));   // Set trigger duration
  trigData.setPriority(trig::p_warn);    // Set severity level
  trigData.setDispose(trig::d_metaDB |   // Route to meta-data
		      trig::d_alarm);    // and Epics alarm system
  int rc = sendTrigger(trigData);        // send to Trigger Manager
  if (!rc) cout << "error sending trigger" << endl;
    ...
}

Segments are handled identically except that the Segment class object must be constructed and sent to the trigger manager with the TrigClient::sendSegment(const trig::Segment& s) method.

Author:
J. Zweizig
Version:
1.3; Modified: August 29, 2001

alphabetic index hierarchy of classes


generated by doc++