Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
23
struct
Item
{
24
align::ID
m_rawId
;
25
int
m_parametrizationType
;
26
int
m_index
;
27
28
COND_SERIALIZABLE
;
29
};
30
31
typedef
std::vector<Item>
ItemVector
;
32
typedef
std::vector<align::Scalar>::const_iterator
ParametersConstIterator
;
33
typedef
std::pair<ParametersConstIterator,ParametersConstIterator>
ParametersConstIteratorPair
;
34
35
AlignmentSurfaceDeformations
() { }
36
virtual
~AlignmentSurfaceDeformations
() { }
37
39
inline
bool
empty
()
const
{
return
m_items
.empty(); }
40
42
bool
add
(
align::ID
rawId,
int
type
,
const
std::vector<align::Scalar> &
parameters
) {
43
44
Item
item;
45
item.
m_rawId
= rawId;
46
item.
m_parametrizationType
=
type
;
47
item.
m_index
=
m_parameters
.size();
48
m_items
.push_back(item);
49
50
m_parameters
.reserve(
m_parameters
.size() + parameters.size());
51
std::copy
(parameters.begin(), parameters.end(), std::back_inserter(
m_parameters
));
52
53
return
true
;
54
}
55
57
const
ItemVector
&
items
()
const
{
return
m_items
; }
58
61
ParametersConstIteratorPair
parameters
(
size_t
index
)
const
{
62
ParametersConstIteratorPair
pair;
63
pair.first =
m_parameters
.begin() +
m_items
[
index
].m_index;
64
if
(index<
m_items
.size()-1) {
65
pair.second =
m_parameters
.begin() +
m_items
[index+1].m_index;
66
}
else
{
67
pair.second =
m_parameters
.end();
68
}
69
return
pair;
70
}
71
72
private
:
73
74
std::vector<align::Scalar>
m_parameters
;
75
ItemVector
m_items
;
76
77
COND_SERIALIZABLE
;
78
};
79
80
#endif // AlignmentSurfaceDeformations_H
type
type
Definition:
HCALResponse.h:21
AlignmentSurfaceDeformations::empty
bool empty() const
Test of empty vector without having to look into internals:
Definition:
AlignmentSurfaceDeformations.h:39
align::ID
uint32_t ID
Definition:
Definitions.h:26
cmsHarvester.index
string index
Definition:
cmsHarvester.py:4378
AlignmentSurfaceDeformations::ParametersConstIteratorPair
std::pair< ParametersConstIterator, ParametersConstIterator > ParametersConstIteratorPair
Definition:
AlignmentSurfaceDeformations.h:33
AlignmentSurfaceDeformations::Item::m_parametrizationType
int m_parametrizationType
Definition:
AlignmentSurfaceDeformations.h:25
AlignmentSurfaceDeformations::AlignmentSurfaceDeformations
AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:35
AlignmentSurfaceDeformations::m_parameters
std::vector< align::Scalar > m_parameters
Definition:
AlignmentSurfaceDeformations.h:74
AlignmentSurfaceDeformations::parameters
ParametersConstIteratorPair parameters(size_t index) const
Definition:
AlignmentSurfaceDeformations.h:61
Definitions.h
AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations
virtual ~AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:36
AlignmentSurfaceDeformations::ItemVector
std::vector< Item > ItemVector
Definition:
AlignmentSurfaceDeformations.h:31
AlignmentSurfaceDeformations::Item::COND_SERIALIZABLE
COND_SERIALIZABLE
Definition:
AlignmentSurfaceDeformations.h:28
AlignmentSurfaceDeformations::items
const ItemVector & items() const
Get vector of all items.
Definition:
AlignmentSurfaceDeformations.h:57
filterCSVwithJSON.copy
tuple copy
Definition:
filterCSVwithJSON.py:35
AlignmentSurfaceDeformations::COND_SERIALIZABLE
COND_SERIALIZABLE
Definition:
AlignmentSurfaceDeformations.h:77
AlignmentSurfaceDeformations::add
bool add(align::ID rawId, int type, const std::vector< align::Scalar > ¶meters)
Add a new item.
Definition:
AlignmentSurfaceDeformations.h:42
AlignmentSurfaceDeformations::Item::m_index
int m_index
Definition:
AlignmentSurfaceDeformations.h:26
AlignmentSurfaceDeformations::ParametersConstIterator
std::vector< align::Scalar >::const_iterator ParametersConstIterator
Definition:
AlignmentSurfaceDeformations.h:32
AlignmentSurfaceDeformations::Item::m_rawId
align::ID m_rawId
Definition:
AlignmentSurfaceDeformations.h:24
AlignmentSurfaceDeformations
Definition:
AlignmentSurfaceDeformations.h:20
Serializable.h
AlignmentSurfaceDeformations::m_items
ItemVector m_items
Definition:
AlignmentSurfaceDeformations.h:75
AlignmentSurfaceDeformations::Item
Definition:
AlignmentSurfaceDeformations.h:23
Generated for CMSSW Reference Manual by
1.8.5