CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SurveyError.h
Go to the documentation of this file.
1 #ifndef CondFormats_Alignment_SurveyError_H
2 #define CondFormats_Alignment_SurveyError_H
3 
20 
22 {
25 
26  public:
27 
28  inline SurveyError(
29  uint8_t structureType = 0, // default unknown
30  align::ID rawId = 0, // default unknown
31  const ErrorMatrix& = ErrorMatrix() // default 0
32  );
33 
34  inline uint8_t structureType() const;
35 
36  inline align::ID rawId() const;
37 
38  inline ErrorMatrix matrix() const;
39 
40 private:
41 
42  static const unsigned int nPar_ = ErrorMatrix::kRows;
43  static const unsigned int size_ = nPar_ * (nPar_ + 1) / 2;
44 
45  uint8_t m_structureType;
47 
49 };
50 
51 SurveyError::SurveyError(uint8_t structureType,
52  align::ID rawId,
53  const ErrorMatrix& cov):
54  m_structureType(structureType),
55  m_rawId(rawId)
56 {
57  const Scalar* data = cov.Array(); // lower triangular of cov
58 
59  for (unsigned int i = 0; i < size_; ++i) m_errors[i] = data[i];
60 }
61 
63 {
64  return m_structureType;
65 }
66 
68 {
69  return m_rawId;
70 }
71 
73 {
75 }
76 
77 #endif
static const unsigned int nPar_
Definition: SurveyError.h:42
int i
Definition: DBlmapReader.cc:9
ErrorMatrix matrix() const
Definition: SurveyError.h:72
uint32_t ID
Definition: Definitions.h:26
Container::value_type value_type
uint8_t m_structureType
Definition: SurveyError.h:45
Scalar m_errors[size_]
Definition: SurveyError.h:48
uint8_t structureType() const
Definition: SurveyError.h:62
align::ID rawId() const
Definition: SurveyError.h:67
align::ID m_rawId
Definition: SurveyError.h:46
ErrorMatrix::value_type Scalar
Definition: SurveyError.h:24
SurveyError(uint8_t structureType=0, align::ID rawId=0, const ErrorMatrix &=ErrorMatrix())
Definition: SurveyError.h:51
static const unsigned int size_
Definition: SurveyError.h:43
align::ErrorMatrix ErrorMatrix
Definition: SurveyError.h:23
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:39