Public Types | Public Member Functions | Private Attributes | List of all members
FclFloatArray Class Reference

#include <FclFloatArray.h>

Inheritance diagram for FclFloatArray:
FloatArrayTool

Public Types

using Name = std::string
 
- Public Types inherited from FloatArrayTool
using Index = unsigned int
 
using FloatVector = std::vector< float >
 

Public Member Functions

 FclFloatArray (fhicl::ParameterSet const &ps)
 
 ~FclFloatArray () override=default
 
Index offset () const override
 
std::string label () const override
 
Name unit () const override
 
const FloatVectorvalues () const override
 
float defaultValue () const override
 
- Public Member Functions inherited from FloatArrayTool
virtual ~FloatArrayTool ()=default
 
virtual Index size () const
 
virtual bool inRange (Index ival) const
 
virtual float value (Index ival) const
 
virtual float value (Index ival, float defval) const
 
virtual int fill (FloatVector &vals, float valdef) const
 

Private Attributes

Index m_LogLevel
 
float m_DefaultValue
 
Index m_Offset
 
Name m_Label
 
Name m_Unit
 
FloatVector m_Values
 

Detailed Description

Definition at line 26 of file FclFloatArray.h.

Member Typedef Documentation

Definition at line 30 of file FclFloatArray.h.

Constructor & Destructor Documentation

FclFloatArray::FclFloatArray ( fhicl::ParameterSet const &  ps)

Definition at line 16 of file FclFloatArray_tool.cc.

17 : m_LogLevel(ps.get<Index>("LogLevel")),
18  m_DefaultValue(ps.get<float>("DefaultValue")),
19  m_Offset(ps.get<Index>("Offset")),
20  m_Label(ps.get<Name>("Label")),
21  m_Unit(ps.get<Name>("Unit")),
22  m_Values(ps.get<FloatVector>("Values")) {
23  const Name myname = "FclFloatArray::ctor: ";
24  if ( m_LogLevel ) {
25  cout << myname << "Configuration:" << endl;
26  cout << myname << " LogLevel: " << m_LogLevel << endl;
27  cout << myname << " Offset: " << m_Offset << endl;
28  cout << myname << " DefaultValue: " << m_DefaultValue << endl;
29  cout << myname << " Label: " << m_Label << endl;
30  cout << myname << " Unit: " << m_Unit << endl;
31  cout << myname << " Size: " << size() << endl;
32  cout << myname << " Values: [";
33  if ( m_LogLevel == 1 || size() <= 10 ) {
34  Index nshow = size() <= 10 ? size() : 5;
35  for ( Index ival=0; ival<nshow; ++ival ) {
36  if ( ival ) cout << ", ";
37  cout << values()[ival];
38  }
39  if ( nshow < size() ) cout << ", ...";
40  cout << "]" << endl;
41  } else {
42  Index iwrd = 0;
43  string sgap = " ";
44  for ( Index ival=0; ival<size(); ++ival ) {
45  if ( ival ) cout << ",";
46  if ( ++iwrd == 10 ) {
47  cout << "\n" << myname << sgap << " ";
48  iwrd = 0;
49  }
50  cout << " " << setw(8) << values()[ival];
51  }
52  cout << "\n" << myname << sgap << "]" << endl;
53  }
54  }
55 }
float m_DefaultValue
Definition: FclFloatArray.h:57
ChannelGroupService::Name Name
unsigned int Index
static constexpr double ps
Definition: Units.h:99
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
FloatVector m_Values
Definition: FclFloatArray.h:61
const FloatVector & values() const override
Definition: FclFloatArray.h:48
virtual Index size() const
Dft::FloatVector FloatVector
QTextStream & endl(QTextStream &s)
FclFloatArray::~FclFloatArray ( )
overridedefault

Member Function Documentation

float FclFloatArray::defaultValue ( ) const
inlineoverridevirtual

Reimplemented from FloatArrayTool.

Definition at line 51 of file FclFloatArray.h.

51 { return m_DefaultValue; }
float m_DefaultValue
Definition: FclFloatArray.h:57
std::string FclFloatArray::label ( ) const
inlineoverridevirtual

Reimplemented from FloatArrayTool.

Definition at line 42 of file FclFloatArray.h.

42 { return m_Label; }
Index FclFloatArray::offset ( ) const
inlineoverridevirtual

Reimplemented from FloatArrayTool.

Definition at line 39 of file FclFloatArray.h.

39 { return m_Offset; }
Name FclFloatArray::unit ( ) const
inlineoverridevirtual

Reimplemented from FloatArrayTool.

Definition at line 45 of file FclFloatArray.h.

45 { return m_Unit; }
const FloatVector& FclFloatArray::values ( ) const
inlineoverridevirtual

Implements FloatArrayTool.

Definition at line 48 of file FclFloatArray.h.

48 { return m_Values; }
FloatVector m_Values
Definition: FclFloatArray.h:61

Member Data Documentation

float FclFloatArray::m_DefaultValue
private

Definition at line 57 of file FclFloatArray.h.

Name FclFloatArray::m_Label
private

Definition at line 59 of file FclFloatArray.h.

Index FclFloatArray::m_LogLevel
private

Definition at line 56 of file FclFloatArray.h.

Index FclFloatArray::m_Offset
private

Definition at line 58 of file FclFloatArray.h.

Name FclFloatArray::m_Unit
private

Definition at line 60 of file FclFloatArray.h.

FloatVector FclFloatArray::m_Values
private

Definition at line 61 of file FclFloatArray.h.


The documentation for this class was generated from the following files: