FclFileFloatArray.h
Go to the documentation of this file.
1 // FclFileFloatArray.h
2 //
3 // David Adams
4 // May 2018
5 //
6 // Fcl-based tool to give access to build a float array from an array of
7 // fcl files, each specifying a FloatArrayTool.
8 //
9 // Parameters:
10 // LogLevel - Message logging level (0=none, 1=ctor, 2=each call, ...)
11 // FileNames - Vector of file name patterns
12 // DefaultValue - Value assigned to values that are out of range
13 
14 #ifndef FclFileFloatArray_H
15 #define FclFileFloatArray_H
16 
18 #include "fhiclcpp/ParameterSet.h"
20 #include <vector>
21 
23 
24 public:
25 
26  using Name = std::string;
27  using NameVector = std::vector<Name>;
28 
29  // Ctor.
31 
32  // Dtor.
33  ~FclFileFloatArray() override =default;
34 
35  // Return the size.
36  Index size() const override { return m_vals.size(); }
37 
38  // Return the values.
39  const FloatVector& values() const override { return m_vals; }
40 
41  // Return the default value.
42  float defaultValue() const override { return m_DefaultValue; }
43 
44  // Return the units.
45  Name unit() const override { return m_unit; }
46 
47 private:
48 
49  // Parameters.
53 
56 
57  // Read the values.
58  void init();
59 
60 };
61 
62 
63 #endif
~FclFileFloatArray() override=default
Name unit() const override
std::string string
Definition: nybbler.cc:12
Index size() const override
std::vector< float > FloatVector
const FloatVector & values() const override
static constexpr double ps
Definition: Units.h:99
FclFileFloatArray(fhicl::ParameterSet const &ps)
float defaultValue() const override
std::vector< Name > NameVector
unsigned int Index