IcebergOnlineChannel.h
Go to the documentation of this file.
1 // IcebergOnlineChannel.h
2 //
3 // David Adams
4 // August 2020
5 //
6 // Tool that converts a protodune SP offline channel number
7 // to an online index following one of three conventions:
8 //
9 // WIB ordered:
10 // chanOn = 1280*KAPA + 512*KWIB + 128*KCON + FCHAN
11 //
12 // Connector ordered:
13 // chanOn = 1280*KAPA + 640*KCON + 128*KWIB + FCHAN
14 //
15 // FEMB ordered:
16 // chanOn = 1280*KAPA + 128*KFMB + FCHAN
17 //
18 // The conventions for KWIB, KCON and KFMB are those shown in the cabling
19 // figure at https://wiki.dunescience.org/wiki/ProtoDUNE_geometry except
20 // all are shifted by one to be zero based and the APA digit is dropped
21 // from the FEMB identifiers. I.e. if the labels in that figure are IWIB,
22 // ICON and IFMB, then the indices here may be expressed as
23 // KWIB = IWIB - 1
24 // KCON = ICON -1
25 // KFMB = (FMB%100) - 1
26 //
27 // IcebergChannelMapService is used to obtain these indices.
28 //
29 // FCHAN is the channel number in the FEMB (0-127) 16*ASIC = ASIC_channel
30 // assuming the mapping in DUNE DocDB 4064.
31 //
32 // It is expected that FEMB ordering will be used most often so that
33 // KAPA = chanOn/1280 identifies APAs (TPC sets) as indicated above
34 // FEMB = chanOn/128 is a global FEMB identifier
35 // KFMB = chanOn % 128 is the channel # in the FEMB
36 //
37 // Configuration parameters:
38 // LogLevel - 0=silent, 1=init messages, 2=message every call
39 // Ordering - String indicatin the ordering: WIB, connector or FEMB
40 
41 #ifndef IcebergOnlineChannel_H
42 #define IcebergOnlineChannel_H
43 
45 #include "fhiclcpp/ParameterSet.h"
47 
49 
50 public:
51 
52  using Name = std::string;
53 
55 
56  Index get(Index chanOff) const override;
57 
58 private:
59 
60  // Configuration parameters.
63 
64  // Derived from configuration.
68 
69 };
70 
71 
72 #endif
std::string string
Definition: nybbler.cc:12
static constexpr double ps
Definition: Units.h:99
unsigned int Index
Definition: IndexMapTool.h:16
IcebergOnlineChannel(const fhicl::ParameterSet &ps)