CMS 3D CMS Logo

SurveyError.h
Go to the documentation of this file.
1 #ifndef CondFormats_Alignment_SurveyError_H
2 #define CondFormats_Alignment_SurveyError_H
3 
20 
22 
23 class SurveyError {
26 
27 public:
28  inline SurveyError(uint8_t structureType = 0, // default unknown
29  align::ID rawId = 0, // default unknown
30  const ErrorMatrix& = ErrorMatrix() // default 0
31  );
32 
33  inline uint8_t structureType() const;
34 
35  inline align::ID rawId() const;
36 
37  inline ErrorMatrix matrix() const;
38 
39 private:
40  static const unsigned int nPar_ = ErrorMatrix::kRows;
41  static const unsigned int size_ = nPar_ * (nPar_ + 1) / 2;
42 
43  uint8_t m_structureType;
45 
46  Scalar m_errors[size_];
47 
49 };
50 
51 SurveyError::SurveyError(uint8_t structureType, align::ID rawId, const ErrorMatrix& cov)
52  : m_structureType(structureType), m_rawId(rawId) {
53  const Scalar* data = cov.Array(); // lower triangular of cov
54 
55  for (unsigned int i = 0; i < size_; ++i)
56  m_errors[i] = data[i];
57 }
58 
59 uint8_t SurveyError::structureType() const { return m_structureType; }
60 
62 
64 
65 #endif
static const unsigned int nPar_
Definition: SurveyError.h:40
ErrorMatrix matrix() const
Definition: SurveyError.h:63
uint32_t ID
Definition: Definitions.h:24
uint8_t m_structureType
Definition: SurveyError.h:43
Scalar m_errors[size_]
Definition: SurveyError.h:46
uint8_t structureType() const
Definition: SurveyError.h:59
align::ID rawId() const
Definition: SurveyError.h:61
align::ID m_rawId
Definition: SurveyError.h:44
ErrorMatrix::value_type Scalar
Definition: SurveyError.h:25
SurveyError(uint8_t structureType=0, align::ID rawId=0, const ErrorMatrix &=ErrorMatrix())
Definition: SurveyError.h:51
#define COND_SERIALIZABLE
Definition: Serializable.h:38
static const unsigned int size_
Definition: SurveyError.h:41
align::ErrorMatrix ErrorMatrix
Definition: SurveyError.h:24
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
math::Error< 6 >::type ErrorMatrix
Definition: Definitions.h:37