Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The core online monitoring can be specialized by supplying a plug-in module modules containing user code. Two types of modules can be added - either analysis modules for generating additional plots or filter modules for selecting a subset of events to be used by the monitoring.  The steps are:

  1. Copy /reg/g/pcds/package/amiuser to your area
    Code Block
     cp -rf /reg/g/pcds/package/amiuser ~/.
    

  2. Edit the ExampleAnalysis.{hh,cc} files or ExampleFilter.{hh,cc} files
    Code Block
     cd ~/amiuser; gedit ExampleAnalysis.cc
    

  3. Build the libamiuser.so library and libamiuser_filter.so libraries
    Code Block
     make all
    

  4. Copy the libamiuser.so and libamiuser_filter.so to your experiment's home area
    Code Block
     cp libamiuser.so ~amoopr/.
     cp libamiuser_filter.so ~amoopr/.
    
    \\\\

The "~amoopr/libamiuser.so" plug-in module is specified explicitly in the "-L" command-line option for the monitoring executable that appears in /reg/g/pcds/dist/pds/amo/scripts/amo.cnf, for example.  It is possible to specify a comma separated list of libraries in the "-L" option to include more than one plug-in module. Similarly, the "~amoopr/libamiuser_filter.so" plug-in module is specified in the "-F" command-line option.

The plug-in modules will be picked up the next time the DAQ system is restarted. The new plots will appear in the "User" selection.
These instructions also appear in the amiuser/README file.

...

The new plots will appear in the 'User' section of the online monitoring with a separate tab for each added plot. Multiple plots may appear in the same tab if their titles end in the same string - '#' followed by a page title; for example, two plots titled 'First energy plot#Energy' and 'Second energy plot#Energy' will appear on a page titled 'Energy' with the individual titles 'First energy plot' and 'Second energy plot'. This should allow users to add a few additional plots using operations not supported by the generic monitoring.

The ExampleFilter class contains several member functions that must be implemented:

  • name() - return a string name for the module
  • clock(timestamp) - called once for each event or configuration
  • configure(detectorid, datatype, data*) - called for each detector datum in the configuration
  • event(detectorid, datatype, data*) - called for each detector datum in the event
  • accept() - return a filter decision

The filter module names will appear in the 'Event Filters' section of the online monitoring for selection as global filters, and the names will also appear in the 'Env' section of the monitoring for use as filters on individual plots. This should allow users to improve the generic monitoring for infrequent or specially classified events. It is also a testbed for how users may be able to reduce recorded data volumes, if so desired.

Anchor
Writing a user application
Writing a user application

...