src
CondFormats
Alignment
interface
AlignmentSurfaceDeformations.h
Go to the documentation of this file.
1
#ifndef AlignmentSurfaceDeformations_H
2
#define AlignmentSurfaceDeformations_H
3
4
#include "
CondFormats/Serialization/interface/Serializable.h
"
5
6
#include <vector>
7
8
#include "
CondFormats/Alignment/interface/Definitions.h
"
9
19
20
class
AlignmentSurfaceDeformations
{
21
public
:
22
struct
Item
{
23
align::ID
m_rawId
;
24
int
m_parametrizationType
;
25
int
m_index
;
26
27
COND_SERIALIZABLE
;
28
};
29
30
typedef
std::vector<Item>
ItemVector
;
31
typedef
std::vector<align::Scalar>::const_iterator
ParametersConstIterator
;
32
typedef
std::pair<ParametersConstIterator, ParametersConstIterator>
ParametersConstIteratorPair
;
33
34
AlignmentSurfaceDeformations
() {}
35
virtual
~AlignmentSurfaceDeformations
() {}
36
38
inline
bool
empty
()
const
{
return
m_items
.empty(); }
39
41
bool
add
(
align::ID
rawId
,
int
type
,
const
std::vector<align::Scalar>&
parameters
) {
42
Item
item
;
43
item
.m_rawId =
rawId
;
44
item
.m_parametrizationType =
type
;
45
item
.m_index =
m_parameters
.size();
46
m_items
.push_back(
item
);
47
48
m_parameters
.reserve(
m_parameters
.size() +
parameters
.size());
49
std::copy
(
parameters
.begin(),
parameters
.end(), std::back_inserter(
m_parameters
));
50
51
return
true
;
52
}
53
55
const
ItemVector
&
items
()
const
{
return
m_items
; }
56
59
ParametersConstIteratorPair
parameters
(
size_t
index
)
const
{
60
ParametersConstIteratorPair
pair;
61
pair.first =
m_parameters
.begin() +
m_items
[
index
].m_index;
62
if
(
index
<
m_items
.size() - 1) {
63
pair.second =
m_parameters
.begin() +
m_items
[
index
+ 1].m_index;
64
}
else
{
65
pair.second =
m_parameters
.end();
66
}
67
return
pair;
68
}
69
70
private
:
71
std::vector<align::Scalar>
m_parameters
;
72
ItemVector
m_items
;
73
74
COND_SERIALIZABLE
;
75
};
76
77
#endif // AlignmentSurfaceDeformations_H
nano_mu_digi_cff.rawId
rawId
Definition:
nano_mu_digi_cff.py:56
align::ID
uint32_t ID
Definition:
Definitions.h:24
AlignmentSurfaceDeformations::parameters
ParametersConstIteratorPair parameters(size_t index) const
Definition:
AlignmentSurfaceDeformations.h:59
AlignmentSurfaceDeformations::empty
bool empty() const
Test of empty vector without having to look into internals:
Definition:
AlignmentSurfaceDeformations.h:38
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:39
B2GTnPMonitor_cfi.item
item
Definition:
B2GTnPMonitor_cfi.py:148
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:93
gainCalibHelper::gainCalibPI::type
type
Definition:
SiPixelGainCalibHelper.h:40
AlignmentSurfaceDeformations::Item::m_parametrizationType
int m_parametrizationType
Definition:
AlignmentSurfaceDeformations.h:24
AlignmentSurfaceDeformations::AlignmentSurfaceDeformations
AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:34
AlignmentSurfaceDeformations::m_parameters
std::vector< align::Scalar > m_parameters
Definition:
AlignmentSurfaceDeformations.h:71
AlignmentSurfaceDeformations::ParametersConstIteratorPair
std::pair< ParametersConstIterator, ParametersConstIterator > ParametersConstIteratorPair
Definition:
AlignmentSurfaceDeformations.h:32
Definitions.h
AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations
virtual ~AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:35
filterCSVwithJSON.copy
copy
Definition:
filterCSVwithJSON.py:35
AlignmentSurfaceDeformations::ItemVector
std::vector< Item > ItemVector
Definition:
AlignmentSurfaceDeformations.h:30
AlignmentSurfaceDeformations::add
bool add(align::ID rawId, int type, const std::vector< align::Scalar > ¶meters)
Add a new item.
Definition:
AlignmentSurfaceDeformations.h:41
AlignmentSurfaceDeformations::Item::m_index
int m_index
Definition:
AlignmentSurfaceDeformations.h:25
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition:
Serializable.h:39
AlignmentSurfaceDeformations::ParametersConstIterator
std::vector< align::Scalar >::const_iterator ParametersConstIterator
Definition:
AlignmentSurfaceDeformations.h:31
AlignmentSurfaceDeformations::Item::m_rawId
align::ID m_rawId
Definition:
AlignmentSurfaceDeformations.h:23
AlignmentSurfaceDeformations
Definition:
AlignmentSurfaceDeformations.h:20
Serializable.h
AlignmentSurfaceDeformations::m_items
ItemVector m_items
Definition:
AlignmentSurfaceDeformations.h:72
AlignmentSurfaceDeformations::items
const ItemVector & items() const
Get vector of all items.
Definition:
AlignmentSurfaceDeformations.h:55
AlignmentSurfaceDeformations::Item
Definition:
AlignmentSurfaceDeformations.h:22
Generated for CMSSW Reference Manual by
1.8.14