UnpackFragment.h
Go to the documentation of this file.
1 #ifndef UnpackFragment_h
2 #define UnpackFragment_h
3 
4 #include "artdaq-core/Data/Fragment.hh"
5 
6 /*
7 
8  Utility functions for getting information out of the online data format
9 
10  Currently assumed:
11  16 RCEs (Reconfigurable Cluster Elements) running board readers
12  1 ART-DAQ Fragment per RCE
13  Each RCE sends fragments that are milli-slices for 128 channels (i.e. 1 FEB [Front End Board])
14  A milli-slice is some integer multiple, N, of drift times long
15  A milli-slice contains N micro-slices, each 1 drift time long
16  A micro-slice contains M nano-slices, where M is the number of TDCs in a drift window
17  A nano-slice is 1 time tick for 128 channels (i.e. has 128 ADC values, corresponding to ADC at that TDC)
18 
19  Future plans:
20  -Probably want to read in the geometry upon intialisation from a text file or database
21 
22 */
23 
24 
25 
26 namespace UnpackFragment{
27 
28  //Each channel's ADC values can be uniquely addressed by: [FragmentID, nSlice Sample]
29 
30  //Which FragmentID would contain this channel
31  unsigned int getFragIDForChan(unsigned int channel);
32 
33  //Which Nano-slice sample number would contain this channel
34  unsigned int getNanoSliceSampleForChan(unsigned int channel);
35 
36 }
37 
38 
39 
40 #endif //UnpackFragment_h
unsigned int getNanoSliceSampleForChan(unsigned int channel)
unsigned int getFragIDForChan(unsigned int channel)