ATLAS Offline Software
Loading...
Searching...
No Matches
DataPoint.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6// 07.06.2008, AUTHOR: OLIVER KORTNER
7//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8
9#ifndef MuonCalib_DataPointH
10#define MuonCalib_DataPointH
11
12//:::::::::::::::::::::
13//:: CLASS DataPoint ::
14//:::::::::::::::::::::
15
16/// \class DataPoint
17///
18/// This class defines a multidimensional data point.
19///
20/// \author Oliver.Kortner@CERN.CH
21///
22/// \date 07.06.2008
23
24//::::::::::::::::::
25//:: HEADER FILES ::
26//::::::::::::::::::
27
29#include "CLHEP/Matrix/Vector.h"
30namespace MuonCalib {
31
32class DataPoint {
33
34public:
35// Constructors //
36 DataPoint();
38
39 DataPoint(const unsigned int & length, const double fill);
40 ///< Constructor.
41 ///< \param length Length of the vector.
42 ///< \param fill Sets the value of the components of the vector to fill.
43
44 DataPoint(const Amg::VectorX & vec, const unsigned int ref_comp);
45
48
49 DataPoint(const CLHEP::HepVector & vec, const unsigned int ref_comp);
52 ///< \param ref_comp Component used for ordering and comparison (>=0).
53
54// Methods //
55// get-methods //
56 const Amg::VectorX & dataVector() const;
57
60 unsigned int referenceComponent() const;
62
63// set-methods //
64 void setReferenceComponent(const unsigned int & ref_comp);
67
68// operators (all operators are applied to the comparison component) //
69 inline bool operator < (const DataPoint & point) const;
70 inline bool operator > (const DataPoint & point) const;
71 inline bool operator <= (const DataPoint & point) const;
72 inline bool operator >= (const DataPoint & point) const;
73 inline bool operator == (const DataPoint & point) const;
74
75private:
76 Amg::VectorX m_vec; // data vector
77 unsigned int m_ref_comp; // component used for ordering and comparison
78
79};
80
82// INCLUDE HEADER FILES //
84
86
87}
88
89#endif
std::vector< size_t > vec
double length(const pvec &v)
Amg::VectorX m_vec
Definition DataPoint.h:76
void setReferenceComponent(const unsigned int &ref_comp)
set the ordering component to ref_comp (>=0)
bool operator>=(const DataPoint &point) const
Definition DataPoint.h:52
DataPoint()
Default constructor. Gives the vector of length 0.
Definition DataPoint.cxx:23
bool operator<(const DataPoint &point) const
Definition DataPoint.h:16
unsigned int m_ref_comp
Definition DataPoint.h:77
bool operator>(const DataPoint &point) const
Definition DataPoint.h:28
bool operator==(const DataPoint &point) const
Definition DataPoint.h:64
const Amg::VectorX & dataVector() const
get the data vector
Definition DataPoint.cxx:75
bool operator<=(const DataPoint &point) const
Definition DataPoint.h:40
unsigned int referenceComponent() const
get the ordering component (>=0)
Definition DataPoint.cxx:99
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
void fill(H5::Group &out_file, size_t iterations)