Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
duneprototypes
duneprototypes
Protodune
singlephase
Tool
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
44
#include "
art/Utilities/ToolMacros.h
"
45
#include "
fhiclcpp/ParameterSet.h
"
46
#include "
dunecore/DuneInterface/Tool/IndexMapTool.h
"
47
48
class
IcebergOnlineChannel
:
public
IndexMapTool
{
49
50
public
:
51
52
using
Name
=
std::string
;
53
54
IcebergOnlineChannel
(
const
fhicl::ParameterSet
&
ps
);
55
56
Index
get
(
Index
chanOff)
const
override
;
57
58
private
:
59
60
// Configuration parameters.
61
Index
m_LogLevel
;
62
Name
m_Ordering
;
63
64
// Derived from configuration.
65
bool
m_orderByWib
;
66
bool
m_orderByConnector
;
67
bool
m_orderByFemb
;
68
69
};
70
71
72
#endif
IcebergOnlineChannel::m_LogLevel
Index m_LogLevel
Definition:
IcebergOnlineChannel.h:61
IndexMapTool
Definition:
IndexMapTool.h:12
string
std::string string
Definition:
nybbler.cc:12
IcebergOnlineChannel::m_Ordering
Name m_Ordering
Definition:
IcebergOnlineChannel.h:62
IndexMapTool.h
IcebergOnlineChannel
Definition:
IcebergOnlineChannel.h:48
IcebergOnlineChannel::m_orderByConnector
bool m_orderByConnector
Definition:
IcebergOnlineChannel.h:66
ParameterSet.h
ToolMacros.h
IcebergOnlineChannel::Name
std::string Name
Definition:
IcebergOnlineChannel.h:52
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
IcebergOnlineChannel::m_orderByWib
bool m_orderByWib
Definition:
IcebergOnlineChannel.h:65
IndexMapTool::Index
unsigned int Index
Definition:
IndexMapTool.h:16
IcebergOnlineChannel::m_orderByFemb
bool m_orderByFemb
Definition:
IcebergOnlineChannel.h:67
IcebergOnlineChannel::IcebergOnlineChannel
IcebergOnlineChannel(const fhicl::ParameterSet &ps)
Definition:
IcebergOnlineChannel_tool.cc:15
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11