ATLAS Offline Software
SCT_CondParameterData.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
14 #ifndef SCT_CONDPARAMETERDATA_H
15 #define SCT_CONDPARAMETERDATA_H
16 
17 // Definition of the number of elements
19 
20 // Athena includes
22 
23 // STL include
24 #include <array>
25 #include <vector>
26 
33 public:
36 
39 
41  virtual ~SCT_CondParameterData() = default;
42  //@name main methods
44  float getValue(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam) const;
47  void getValues(std::vector<float>& userVector, const SCT_CondParameterData::ParameterIndex iparam) const;
49  void setValue(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam, const float value);
51  bool insert(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam, const float value);
53  static bool isValid(const float parameterValue, const SCT_CondParameterData::ParameterIndex iparam) ;
55  static float invalid(const unsigned int iparam) ;
57  float max(const SCT_CondParameterData::ParameterIndex iparam) const;
59  float min(const SCT_CondParameterData::ParameterIndex iparam) const;
61  float avg(const SCT_CondParameterData::ParameterIndex iparam) const;
63  float sd(const SCT_CondParameterData::ParameterIndex iparam) const;
65  unsigned int n(const SCT_CondParameterData::ParameterIndex iparam) const;
67  void clear();
69 
70 private:
71  std::array<std::array<float, N_PARAMETERS>, SCT_ConditionsData::NUMBER_OF_WAFERS> m_values{};
72 
73  float m_min[N_PARAMETERS]{};
74  float m_max[N_PARAMETERS]{};
75  unsigned int m_n[N_PARAMETERS]{};
76  float m_sum[N_PARAMETERS]{};
78 };
79 
80 // Class definition for StoreGate
81 #include "AthenaKernel/CLASS_DEF.h"
82 CLASS_DEF( SCT_CondParameterData , 34383719 , 1 )
83 
84 // Condition container definition for CondInputLoader
85 #include "AthenaKernel/CondCont.h"
87 
88 #endif // SCT_CONDPARAMETERDATA_H
SCT_CondParameterData::m_sum
float m_sum[N_PARAMETERS]
Definition: SCT_CondParameterData.h:76
SCT_CondParameterData::m_max
float m_max[N_PARAMETERS]
Definition: SCT_CondParameterData.h:74
SCT_CondParameterData
Data object for SCT_ConditionsParameterTool and SCT_ConditionsParameterCondAlg.
Definition: SCT_CondParameterData.h:32
SCT_CondParameterData::ParameterIndex
ParameterIndex
Parameters.
Definition: SCT_CondParameterData.h:35
athena.value
value
Definition: athena.py:124
SCT_CondParameterData::m_sumsq
float m_sumsq[N_PARAMETERS]
Definition: SCT_CondParameterData.h:77
SCT_CondParameterData::clear
void clear()
Clear all data members.
Definition: SCT_CondParameterData.cxx:94
SCT_ConditionsParameters.h
header file containing the number of elements and enumerated type of parameters which may be retrieve...
SCT_CondParameterData::~SCT_CondParameterData
virtual ~SCT_CondParameterData()=default
Destructor.
CONDCONT_DEF
CONDCONT_DEF(SCT_CondParameterData, 3856939)
SCT_CondParameterData::invalid
static float invalid(const unsigned int iparam)
What is the default error value for this parameter?
Definition: SCT_CondParameterData.cxx:59
SCT_ConditionsData::NUMBER_OF_WAFERS
@ NUMBER_OF_WAFERS
Definition: SCT_ConditionsParameters.h:19
SCT_CondParameterData::getValue
float getValue(const IdentifierHash &idHash, const SCT_CondParameterData::ParameterIndex iparam) const
Get the indicated value for a module identifier hash.
Definition: SCT_CondParameterData.cxx:16
SCT_CondParameterData::getValues
void getValues(std::vector< float > &userVector, const SCT_CondParameterData::ParameterIndex iparam) const
Fill a user-provided vector with the values.
Definition: SCT_CondParameterData.cxx:21
SCT_CondParameterData::m_n
unsigned int m_n[N_PARAMETERS]
Definition: SCT_CondParameterData.h:75
SCT_CondParameterData::max
float max(const SCT_CondParameterData::ParameterIndex iparam) const
Get maximum value.
Definition: SCT_CondParameterData.cxx:68
SCT_CondParameterData::N_PARAMETERS
@ N_PARAMETERS
Definition: SCT_CondParameterData.h:35
SCT_CondParameterData::n
unsigned int n(const SCT_CondParameterData::ParameterIndex iparam) const
Get the number of values.
Definition: SCT_CondParameterData.cxx:89
SCT_CondParameterData::INVALID_PARAMETER
@ INVALID_PARAMETER
Definition: SCT_CondParameterData.h:35
IdentifierHash.h
SCT_CondParameterData::avg
float avg(const SCT_CondParameterData::ParameterIndex iparam) const
Get average value.
Definition: SCT_CondParameterData.cxx:78
SCT_CondParameterData::m_values
std::array< std::array< float, N_PARAMETERS >, SCT_ConditionsData::NUMBER_OF_WAFERS > m_values
Definition: SCT_CondParameterData.h:71
SCT_CondParameterData::insert
bool insert(const IdentifierHash &idHash, const SCT_CondParameterData::ParameterIndex iparam, const float value)
Extended methods for data structure insertion.
Definition: SCT_CondParameterData.cxx:39
SCT_CondParameterData::AVG_THRESHOLD
@ AVG_THRESHOLD
Definition: SCT_CondParameterData.h:35
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
SCT_CondParameterData::SCT_CondParameterData
SCT_CondParameterData()
Constructor.
Definition: SCT_CondParameterData.cxx:11
SCT_CondParameterData::m_min
float m_min[N_PARAMETERS]
Definition: SCT_CondParameterData.h:73
SCT_CondParameterData::sd
float sd(const SCT_CondParameterData::ParameterIndex iparam) const
Get standard deviation.
Definition: SCT_CondParameterData.cxx:83
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
SCT_CondParameterData::isValid
static bool isValid(const float parameterValue, const SCT_CondParameterData::ParameterIndex iparam)
Is a given value within acceptable limits?
Definition: SCT_CondParameterData.cxx:53
CLASS_DEF.h
macros to associate a CLID to a type
SCT_CondParameterData::setValue
void setValue(const IdentifierHash &idHash, const SCT_CondParameterData::ParameterIndex iparam, const float value)
Get the indicated value for a module identifier hash.
Definition: SCT_CondParameterData.cxx:28
SCT_CondParameterData::min
float min(const SCT_CondParameterData::ParameterIndex iparam) const
Get minimum value.
Definition: SCT_CondParameterData.cxx:73