FclFloatArray.h
Go to the documentation of this file.
1 // FclFloatArray.h
2 //
3 // David Adams
4 // January 2019
5 //
6 // Tool that returns a float array stored as fcl.
7 //
8 // Parameters:
9 // LogLevel - Message logging level:
10 // 0: No messages
11 // 1: Show config in ctor with a few values
12 // 2: Show config in ctor with all values
13 // DefaultValue - Value to return when an index is out of range.
14 // Offset - Index of the first value
15 // Label - string label
16 // Values - Array values.
17 
18 #ifndef FclFloatArray_H
19 #define FclFloatArray_H
20 
22 #include "fhiclcpp/ParameterSet.h"
24 #include <vector>
25 
26 class FclFloatArray : public FloatArrayTool {
27 
28 public:
29 
30  using Name = std::string;
31 
32  // Ctor.
34 
35  // Dtor.
36  ~FclFloatArray() override =default;
37 
38  // Return the offset.
39  Index offset() const override { return m_Offset; }
40 
41  // Return the label.
42  std::string label() const override { return m_Label; }
43 
44  // Return the units.
45  Name unit() const override { return m_Unit; }
46 
47  // Return the values without offset.
48  const FloatVector& values() const override { return m_Values; }
49 
50  // Retrurn the default value.
51  float defaultValue() const override { return m_DefaultValue; }
52 
53 private:
54 
55  // Parameters.
62 
63 
64 };
65 
66 
67 #endif
std::string label() const override
Definition: FclFloatArray.h:42
float m_DefaultValue
Definition: FclFloatArray.h:57
float defaultValue() const override
Definition: FclFloatArray.h:51
std::string string
Definition: nybbler.cc:12
std::string Name
Definition: FclFloatArray.h:30
std::vector< float > FloatVector
Index offset() const override
Definition: FclFloatArray.h:39
~FclFloatArray() override=default
static constexpr double ps
Definition: Units.h:99
FloatVector m_Values
Definition: FclFloatArray.h:61
Name unit() const override
Definition: FclFloatArray.h:45
const FloatVector & values() const override
Definition: FclFloatArray.h:48
FclFloatArray(fhicl::ParameterSet const &ps)
unsigned int Index