|
1 | | -DAX |
2 | | ------- |
| 1 | +# DAX |
| 2 | +D. Coderre, 2018. See license in LISCENSE file. |
3 | 3 |
|
4 | | -Prerequisites |
5 | | -------------- |
| 4 | +## Prerequisites |
6 | 5 |
|
7 | 6 | mongodb cxx driver |
8 | 7 | CAENVMElib v2.5+ |
| 8 | +Driver for your CAEN PCI card |
| 9 | +A DAQ hardware setup |
| 10 | +A MongoDB deployment |
9 | 11 |
|
10 | | -Install |
11 | | -------- |
| 12 | +## Install |
12 | 13 |
|
13 | 14 | make |
14 | | -./main |
15 | 15 |
|
| 16 | +## Usage |
16 | 17 |
|
| 18 | +./main mongodb://localhost:27017/database |
| 19 | + |
| 20 | +The argument is the connection string to the dax database. |
| 21 | +This database has to be configured as described in the |
| 22 | +section 'database'. You may include a username and password |
| 23 | +as well as any other syntax allowed by a MongoDB URI (it is |
| 24 | +parsed by the driver as a URI). |
| 25 | + |
| 26 | +There is an optional third argument, which is an integer or |
| 27 | +string. In case you run a single node per host the node will |
| 28 | +identify itself by its hostname. But if you run two nodes on |
| 29 | +one host the hostname is no longer unique. The argument is appended |
| 30 | +to the hostname (connected with an underscore '_') in order to |
| 31 | +allow definition of unique hosts. |
| 32 | + |
| 33 | +For example, if you run on host **daq00** |
| 34 | + |
| 35 | +**One node:** |
| 36 | + |
| 37 | +./main {MONGO_URI} |
| 38 | + |
| 39 | +Here we put no argument. This instance will be addressed by |
| 40 | +hostname "daq00". |
| 41 | + |
| 42 | +**Two nodes one host:** |
| 43 | + |
| 44 | +./main {MONGO_URI} 0 |
| 45 | +./main {MONGO_URI} 1 |
| 46 | + |
| 47 | +Here we start two instances with two arguments. One instance |
| 48 | +will be addressed as "daq00_0" and the other as "daq00_1". |
| 49 | + |
| 50 | +Easy peasy. |
| 51 | + |
| 52 | +## Database Setup |
| 53 | + |
| 54 | +You need to provide connectivity to a mongodb database using the URI. |
| 55 | +This database should have the following collections. |
| 56 | + |
| 57 | +**control:** is where commands go. The storage requirements are basically |
| 58 | +zero since commands are deleted after all addressees have acknowledged |
| 59 | +them. |
| 60 | + |
| 61 | +**status:** should be configured as a capped collection. Each readout |
| 62 | +node will write it's status here every second or so. |
| 63 | + |
| 64 | +**options:** is where settings docs go. When sending the 'arm' command |
| 65 | +the name of the options file should be embedded in the command doc. |
| 66 | +If the reader can't find an options doc with that name it won't be |
| 67 | +able to arm the DAQ. |
17 | 68 |
|
0 commit comments