PdspOnlineChannel.h
Go to the documentation of this file.
1 // PdspOnlineChannel.h
2 //
3 // David Adams
4 // June 2018
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 = 2560*KAPA + 512*KWIB + 128*KCON + FCHAN
11 //
12 // Connector ordered:
13 // chanOn = 2560*KAPA + 640*KCON + 128*KWIB + FCHAN
14 //
15 // FEMB ordered:
16 // chanOn = 2560*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 // PdspChannelMapService is used to obtain these indices.
28 //
29 // Here KAPA follows the offline convention, i.e. viewed from above
30 // 1 3 5
31 // 0 2 4 beam --->
32 //
33 // FCHAN is the channel number in the FEMB (0-127) 16*ASIC = ASIC_channel
34 // assuming the mapping in DUNE DocDB 4064.
35 //
36 // It is expected that FEMB ordering will be used most often so that
37 // KAPA = chanOn/2560 identifies APAs (TPC sets) as indicated above
38 // FEMB = chanOn/128 is a global FEMB identifier
39 // KFMB = chanOn % 128 is the channel # in the FEMB
40 //
41 // Configuration parameters:
42 // LogLevel - 0=silent, 1=init messages, 2=message every call
43 // Ordering - String indicatin the ordering: WIB, connector or FEMB
44 
45 #ifndef PdspOnlineChannel_H
46 #define PdspOnlineChannel_H
47 
49 #include "fhiclcpp/ParameterSet.h"
51 
53 
54 public:
55 
56  using Name = std::string;
57 
59 
60  Index get(Index chanOff) const override;
61 
62 private:
63 
64  // Configuration parameters.
67 
68  // Derived from configuration.
72 
73 };
74 
75 
76 #endif
PdspOnlineChannel(const fhicl::ParameterSet &ps)
std::string string
Definition: nybbler.cc:12
static constexpr double ps
Definition: Units.h:99
unsigned int Index
Definition: IndexMapTool.h:16