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 <vector>
5
6
#include "
CondFormats/Alignment/interface/Definitions.h
"
7
17
18
class
AlignmentSurfaceDeformations
{
19
public
:
20
21
struct
Item
{
22
align::ID
m_rawId
;
23
int
m_parametrizationType
;
24
int
m_index
;
25
};
26
27
typedef
std::vector<Item>
ItemVector
;
28
typedef
std::vector<align::Scalar>::const_iterator
ParametersConstIterator
;
29
typedef
std::pair<ParametersConstIterator,ParametersConstIterator>
ParametersConstIteratorPair
;
30
31
AlignmentSurfaceDeformations
() { }
32
virtual
~AlignmentSurfaceDeformations
() { }
33
35
inline
bool
empty
()
const
{
return
m_items
.empty(); }
36
38
bool
add
(
align::ID
rawId,
int
type
,
const
std::vector<align::Scalar> &
parameters
) {
39
40
Item
item;
41
item.
m_rawId
= rawId;
42
item.
m_parametrizationType
=
type
;
43
item.
m_index
=
m_parameters
.size();
44
m_items
.push_back(item);
45
46
m_parameters
.reserve(
m_parameters
.size() + parameters.size());
47
std::copy
(parameters.begin(), parameters.end(), std::back_inserter(
m_parameters
));
48
49
return
true
;
50
}
51
53
const
ItemVector
&
items
()
const
{
return
m_items
; }
54
57
ParametersConstIteratorPair
parameters
(
size_t
index
)
const
{
58
ParametersConstIteratorPair
pair;
59
pair.first =
m_parameters
.begin() +
m_items
[
index
].m_index;
60
if
(index<
m_items
.size()-1) {
61
pair.second =
m_parameters
.begin() +
m_items
[index+1].m_index;
62
}
else
{
63
pair.second =
m_parameters
.end();
64
}
65
return
pair;
66
}
67
68
private
:
69
70
std::vector<align::Scalar>
m_parameters
;
71
ItemVector
m_items
;
72
};
73
74
#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:35
align::ID
uint32_t ID
Definition:
Definitions.h:26
getHLTprescales.index
tuple index
Definition:
getHLTprescales.py:79
AlignmentSurfaceDeformations::ParametersConstIteratorPair
std::pair< ParametersConstIterator, ParametersConstIterator > ParametersConstIteratorPair
Definition:
AlignmentSurfaceDeformations.h:29
AlignmentSurfaceDeformations::Item::m_parametrizationType
int m_parametrizationType
Definition:
AlignmentSurfaceDeformations.h:23
AlignmentSurfaceDeformations::AlignmentSurfaceDeformations
AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:31
AlignmentSurfaceDeformations::m_parameters
std::vector< align::Scalar > m_parameters
Definition:
AlignmentSurfaceDeformations.h:70
AlignmentSurfaceDeformations::parameters
ParametersConstIteratorPair parameters(size_t index) const
Definition:
AlignmentSurfaceDeformations.h:57
Definitions.h
AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations
virtual ~AlignmentSurfaceDeformations()
Definition:
AlignmentSurfaceDeformations.h:32
AlignmentSurfaceDeformations::ItemVector
std::vector< Item > ItemVector
Definition:
AlignmentSurfaceDeformations.h:27
AlignmentSurfaceDeformations::items
const ItemVector & items() const
Get vector of all items.
Definition:
AlignmentSurfaceDeformations.h:53
filterCSVwithJSON.copy
tuple copy
Definition:
filterCSVwithJSON.py:35
AlignmentSurfaceDeformations::add
bool add(align::ID rawId, int type, const std::vector< align::Scalar > ¶meters)
Add a new item.
Definition:
AlignmentSurfaceDeformations.h:38
AlignmentSurfaceDeformations::Item::m_index
int m_index
Definition:
AlignmentSurfaceDeformations.h:24
AlignmentSurfaceDeformations::ParametersConstIterator
std::vector< align::Scalar >::const_iterator ParametersConstIterator
Definition:
AlignmentSurfaceDeformations.h:28
AlignmentSurfaceDeformations::Item::m_rawId
align::ID m_rawId
Definition:
AlignmentSurfaceDeformations.h:22
AlignmentSurfaceDeformations
Definition:
AlignmentSurfaceDeformations.h:18
AlignmentSurfaceDeformations::m_items
ItemVector m_items
Definition:
AlignmentSurfaceDeformations.h:71
AlignmentSurfaceDeformations::Item
Definition:
AlignmentSurfaceDeformations.h:21
Generated for CMSSW Reference Manual by
1.8.5