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