gstlal-inspiral  0.4.2
 All Classes Namespaces Files Functions Variables Pages
List of all members | Public Member Functions | Public Attributes
lloidparts.Handler Class Reference

A subclass of simplehandler.Handler to be used with e.g., gstlal_inspiral. More...

Public Member Functions

def __init__
def do_on_message
 Override the on_message method of simplehandler to handle additional message types, e.g., spectrum and checkpointing messages.
def close_segments
 Record stop times for all open segments and start new ones.
def checkpoint
 Checkpoint, e.g., flush segments and triggers to disk.
def flush_segments_to_disk
 Flush segments to disk, e.g., when checkpointing or shutting down an online pipeline.
def gatehandler
 A handler that intercepts gate state transitions.
def gen_segments_xmldoc
 A method to output the segment list in a valid ligolw xml format.
def web_get_segments_xml
 provide a bottle route to get segment information via a url
def gen_psd_xmldoc
def web_get_psd_xml

Public Attributes

 dataclass
 tag
 verbose
 seglistdicts
 current_segment_start
 psds

Detailed Description

A subclass of simplehandler.Handler to be used with e.g., gstlal_inspiral.

Implements additional message handling for dealing with spectrum messages and checkpoints for the online analysis including periodic dumps of segment information, trigger files and background distribution statistics.

Definition at line 199 of file lloidparts.py.

Constructor & Destructor Documentation

def lloidparts.Handler.__init__ (   self,
  mainloop,
  pipeline,
  dataclass,
  instruments,
  tag = "",
  seglistdict = None,
  verbose = False 
)
Parameters
mainloopThe main application's event loop
pipelineThe gstreamer pipeline that is being controlled by this handler
dataclassAn inspiral.Data class instance
tagThe tag to use for naming file snapshots, e.g. the description will be "%s_LLOID" % tag
verboseBe verbose

Definition at line 209 of file lloidparts.py.

Member Function Documentation

def lloidparts.Handler.checkpoint (   self,
  timestamp 
)

Checkpoint, e.g., flush segments and triggers to disk.

Parameters
timestampthe gstreamer timestamp in nanoseconds of the current buffer in order to close off open segment intervals before writing to disk

Definition at line 366 of file lloidparts.py.

def lloidparts.Handler.close_segments (   self,
  timestamp 
)

Record stop times for all open segments and start new ones.

Parameters
timestampthe time in nanoseconds at which to mark the boundary. If this preceeds and open segment's start time, that segment is not closed.

Definition at line 355 of file lloidparts.py.

def lloidparts.Handler.do_on_message (   self,
  bus,
  message 
)

Override the on_message method of simplehandler to handle additional message types, e.g., spectrum and checkpointing messages.

Parameters
busA reference to the pipeline's bus
messageA reference to the incoming message

Definition at line 297 of file lloidparts.py.

def lloidparts.Handler.flush_segments_to_disk (   self,
  timestamp 
)

Flush segments to disk, e.g., when checkpointing or shutting down an online pipeline.

Parameters
timestampthe gstreamer timestamp in nanoseconds of the current buffer in order to close off open segment intervals before writing to disk

Definition at line 378 of file lloidparts.py.

def lloidparts.Handler.gatehandler (   self,
  elem,
  timestamp,
  segtype,
  instrument,
  new_state 
)

A handler that intercepts gate state transitions.

This can set the "on" segments for each detector

Parameters
elemA reference to the lal_gate element or None (only used for verbosity)
timestampA gstreamer time stamp that marks the state transition (in nanoseconds)
segtypethe class of segments this gate is defining, e.g., "datasegments", etc..
instrumentthe instrument this state transtion is to be attributed to, e.g., "H1", etc..
new_statethe state transition, must be either "on" or "off"

Definition at line 433 of file lloidparts.py.

def lloidparts.Handler.gen_segments_xmldoc (   self)

A method to output the segment list in a valid ligolw xml format.

Definition at line 447 of file lloidparts.py.

def lloidparts.Handler.web_get_segments_xml (   self)

provide a bottle route to get segment information via a url

Definition at line 461 of file lloidparts.py.


The documentation for this class was generated from the following file: