Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunecore
dunecore
DuneCommon
Tool
ChannelStatusConfigTool.h
Go to the documentation of this file.
1
// ChannelStatusConfigTool.h
2
//
3
// David Adams
4
// April 2020
5
//
6
// Tool to return channel status from fcl configuration that
7
// is eaily copied from that used in the channel status service.
8
// Example configuration:
9
//
10
// cstool.IndexVectors: [
11
// [],
12
// @local::services.ChannelStatusService.BadChannels,
13
// @local::services.ChannelStatusService.NoisyChannels,
14
// myListOfOtherBadChannels
15
// ]
16
//
17
// Parameters:
18
// LogLevel - Message logging level:
19
// 0: none
20
// 1: show config
21
// 2: check for duplicates
22
// DefaultIndex - Index for values that appear in none of the index vector lists.
23
// IndexVectors - Vector of index vectors. Values for the ith entry
24
// are mapped to index i.
25
//
26
// A channel appearing in multiple lists is assigned to the first in which
27
// it appears.
28
29
#ifndef ChannelStatusConfigTool_H
30
#define ChannelStatusConfigTool_H
31
32
#include "
art/Utilities/ToolMacros.h
"
33
#include "
fhiclcpp/ParameterSet.h
"
34
#include "
dunecore/DuneInterface/Tool/IndexMapTool.h
"
35
#include <vector>
36
37
class
ChannelStatusConfigTool
:
public
IndexMapTool
{
38
39
public
:
40
41
using
Index
=
IndexMapTool::Index
;
42
using
IndexVector
= std::vector<Index>;
43
using
IndexVectorVector
= std::vector<IndexVector>;
44
45
// Ctor.
46
ChannelStatusConfigTool
(
fhicl::ParameterSet
const
&
ps
);
47
48
// Dtor.
49
~ChannelStatusConfigTool
()
override
=
default
;
50
51
// Return the channel status.
52
Index
get
(
Index
icha)
const
override
;
53
54
private
:
55
56
// Parameters.
57
Index
m_LogLevel
;
58
Index
m_DefaultIndex
;
59
IndexVectorVector
m_IndexVectors
;
60
61
// Derived from configuration.
62
IndexVector
m_vals
;
63
64
};
65
66
67
#endif
IndexMapTool
Definition:
IndexMapTool.h:12
ChannelStatusConfigTool::m_LogLevel
Index m_LogLevel
Definition:
ChannelStatusConfigTool.h:57
ChannelStatusConfigTool::IndexVectorVector
std::vector< IndexVector > IndexVectorVector
Definition:
ChannelStatusConfigTool.h:43
IndexMapTool.h
ChannelStatusConfigTool::Index
IndexMapTool::Index Index
Definition:
ChannelStatusConfigTool.h:41
ChannelStatusConfigTool
Definition:
ChannelStatusConfigTool.h:37
ChannelStatusConfigTool::m_vals
IndexVector m_vals
Definition:
ChannelStatusConfigTool.h:62
ParameterSet.h
ToolMacros.h
ChannelStatusConfigTool::m_DefaultIndex
Index m_DefaultIndex
Definition:
ChannelStatusConfigTool.h:58
ChannelStatusConfigTool::m_IndexVectors
IndexVectorVector m_IndexVectors
Definition:
ChannelStatusConfigTool.h:59
ChannelStatusConfigTool::ChannelStatusConfigTool
ChannelStatusConfigTool(fhicl::ParameterSet const &ps)
Definition:
ChannelStatusConfigTool_tool.cc:21
ChannelStatusConfigTool::~ChannelStatusConfigTool
~ChannelStatusConfigTool() override=default
genie::units::ps
static constexpr double ps
Definition:
Units.h:99
IndexMapTool::Index
unsigned int Index
Definition:
IndexMapTool.h:16
fhicl::ParameterSet
Definition:
ParameterSet.h:36
ChannelStatusConfigTool::IndexVector
std::vector< Index > IndexVector
Definition:
ChannelStatusConfigTool.h:42
Generated by
1.8.11