forked from tlatorre-uchicago/disp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
81 lines (55 loc) · 1.78 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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