Skip to content

snoplus/disp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNO+ Dispatcher
===============

Installation
------------

To install the dispatcher library::

    $ git clone [email protected]:snoplus/disp.git
    $ cd disp
    $ make
    $ source env.sh

Running the Dispatcher
----------------------

To run the dispatcher, simply run::

    $ dispatch

To run the dispatcher as a daemon::

    $ nohup dispatch &>[path/to/logfile] &

Troubleshooting
---------------

"Cannot create shared memory segment: No such file or directory"

    Specify the dispatcher directory when running. ie)

    $ ./dispatch

"Cannot create shared memory segment: Invalid argument"

    Make sure you are running version 1.2.4 or later

"Cannot create shared memory segment: Cannot allocate memory"

    1. Run "ipcs -a" to list all used shared memory segments
    2. Run "ipcrm -m <id>" to free to shared memory segment with ID <id>

Reading from the Dispatcher
---------------------------

You can read events from the dispatch stream
using the python module dispatch::

    >>> from dispatch import *
    >>> d = Dispatch('localhost')
    >>> record = d.recv()
    >>> id, record = unpack_header(record)
    >>> id == RECORD_IDS['PMT_RECORD']
    True
    >>> pmt_record_gen = unpack_pmt_record(record)
    >>> pmt_event_record = next(pmt_record_gen)
    >>> pmt_event_record.NPmtHit
    20
    >>> for uncal_pmt in pmt_record_gen:
    ...     print uncal_pmt.BoardID
    ... 
    11
    3

Tagging a Release
=================

First, make sure to set the version number in the Makefile and in
python/setup.py!

Then, make sure to edit the RELEASE_NOTES and make a note of any changes from
the previous release.

Finally, commit the changes and then tag the release:

    $ git commit
    $ git tag -a v1.2

You can push the tags to the remote server with the command:

    $ git push origin --tags

Packages

No packages published

Languages

  • C 85.2%
  • C++ 5.6%
  • Python 4.5%
  • Fortran 2.4%
  • DIGITAL Command Language 1.0%
  • Shell 1.0%
  • Makefile 0.3%