Decoder » History » Version 1
Ole Hansen, 03/30/2018 10:20 PM
1 | 1 | Ole Hansen | h1. Decoder |
---|---|---|---|
2 | |||
3 | This describes the decoding of raw data used by the Root/C++ analyzer as of version 1.6. |
||
4 | |||
5 | h2. For USERS |
||
6 | |||
7 | From a User perspective, the main thing to control the decoding is the @db_cratemap.dat@ file. This file should be set up by the DAQ expert and should contain the full list of modules deployed, whether they are used by detectors or not. The format of db_cratemap.dat is probably best learned by example, see below. Having a mistake in this file can lead to empty histograms or complaints from Podd. Podd will print out the cratemap, so you can confirm that you have the correct one. |
||
8 | |||
9 | |||
10 | <pre> |
||
11 | ==== Crate 4 type fastbus |
||
12 | # slot model clear header mask nchan ndata |
||
13 | 9 1877 1 0x0 0x0 96 672 |
||
14 | 13 1877 1 0x0 0x0 96 672 |
||
15 | 18 1875 1 0x0 0x0 64 512 |
||
16 | 21 1881 1 0x0 0x0 64 64 |
||
17 | |||
18 | ==== Crate 9 type vme Header Decoding |
||
19 | # slot model clear header mask nchan ndata |
||
20 | 10 250 1 0xfb0b0b0b 0xffffffff 16 10000 |
||
21 | |||
22 | ==== Crate 10 type vme Bank Decoding |
||
23 | # slot model bank |
||
24 | 3 250 3 |
||
25 | </pre> |
||
26 | |||
27 | In the above example there is a Fastbus crate number 4, and two VME crates, nums 9 and 10. A "crate number" is synonymous with a "CODA ROC number". In crate 4, there are 4 slots occupied with the models shown (1877, 1875, or 1881) and you can usually leave header and mask zero, but for VME modules they may be nonzero. For some DAQ systems the beginning of the slot is marked by a "header word", e.g. 0xfb0b0b0b for the module in slot 10 of crate 9. For other systems, all the data of a module is put into a "CODA bank", as in the decoding for crate 10 above. |
||
28 | |||
29 | h2. For PROGRAMMERS |
||
30 | |||
31 | If you find yourself needing to understand how the code works, here is a "Class diagram":http://hallaweb.jlab.org/podd/doc/decoder_class.pdf for the decoder. The main public interface is @THaEvData@. |
||
32 | |||
33 | Here is a cookbook list of things to do to [[Add VME Module|add a new module]]. |