src
Geometry
CaloGeometry
interface
EZMgrFL.h
Go to the documentation of this file.
1
#ifndef GEOMETRY_CALOGEOMETRY_EZMGRFL_H
2
#define GEOMETRY_CALOGEOMETRY_EZMGRFL_H 1
3
4
#include <vector>
5
#include <cassert>
6
7
template
<
class
T>
8
class
EZMgrFL
{
9
public
:
10
typedef
std::vector<T>
VecType
;
11
typedef
typename
VecType::iterator
iterator
;
12
typedef
typename
VecType::const_iterator
const_iterator
;
13
typedef
typename
VecType::reference
reference
;
14
typedef
typename
VecType::const_reference
const_reference
;
15
typedef
typename
VecType::value_type
value_type
;
16
typedef
typename
VecType::size_type
size_type
;
17
18
EZMgrFL
(
size_type
vecSize
,
size_type
subSize
) :
m_vecSize
(
vecSize
),
m_subSize
(
subSize
) {
19
m_vec
.resize(0);
20
assert
(
subSize
> 0);
21
assert
(
vecSize
> 0);
22
assert
(0 ==
m_vec
.capacity());
23
}
24
25
iterator
reserve
() {
return
assign
(); }
26
iterator
resize
() {
return
assign
(); }
27
28
iterator
assign
(
const
T
&
t
=
T
()) {
29
assert
((
m_vec
.size() +
m_subSize
) <=
m_vecSize
);
30
if
(0 ==
m_vec
.capacity()) {
31
m_vec
.reserve(
m_vecSize
);
32
assert
(
m_vecSize
==
m_vec
.capacity());
33
}
34
for
(
size_type
i
(0);
i
!=
m_subSize
; ++
i
) {
35
m_vec
.emplace_back(
t
);
36
}
37
return
(
m_vec
.end() -
m_subSize
);
38
}
39
40
size_type
subSize
()
const
{
return
m_subSize
; }
41
size_type
size
()
const
{
return
m_vec
.size(); }
42
43
size_type
vecSize
()
const
{
return
m_vec
.size(); }
44
45
EZMgrFL
() =
delete
;
46
EZMgrFL
(
const
EZMgrFL
&) =
delete
;
47
EZMgrFL
&
operator=
(
const
EZMgrFL
&) =
delete
;
48
49
private
:
50
const
size_type
m_vecSize
;
51
const
size_type
m_subSize
;
52
VecType
m_vec
;
53
};
54
55
#endif
EZMgrFL::const_reference
VecType::const_reference const_reference
Definition:
EZMgrFL.h:14
EZMgrFL::subSize
size_type subSize() const
Definition:
EZMgrFL.h:40
mps_fire.i
i
Definition:
mps_fire.py:429
EZMgrFL::EZMgrFL
EZMgrFL(size_type vecSize, size_type subSize)
Definition:
EZMgrFL.h:18
EZMgrFL::size_type
VecType::size_type size_type
Definition:
EZMgrFL.h:16
dtT0AbsoluteReferenceCorrection_cfg.reference
reference
Definition:
dtT0AbsoluteReferenceCorrection_cfg.py:43
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:649
EZMgrFL::EZMgrFL
EZMgrFL()=delete
EZMgrFL::operator=
EZMgrFL & operator=(const EZMgrFL &)=delete
cms::cuda::assert
assert(be >=bs)
EZMgrFL::value_type
VecType::value_type value_type
Definition:
EZMgrFL.h:15
trigger::size_type
uint16_t size_type
Definition:
TriggerTypeDefs.h:18
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
EZMgrFL::size
size_type size() const
Definition:
EZMgrFL.h:41
EZMgrFL::iterator
VecType::iterator iterator
Definition:
EZMgrFL.h:11
EZMgrFL
Definition:
EZMgrFL.h:8
EZMgrFL::m_subSize
const size_type m_subSize
Definition:
EZMgrFL.h:51
EZMgrFL::VecType
std::vector< T > VecType
Definition:
EZMgrFL.h:10
EZMgrFL::assign
iterator assign(const T &t=T())
Definition:
EZMgrFL.h:28
EZMgrFL::m_vecSize
const size_type m_vecSize
Definition:
EZMgrFL.h:50
EZMgrFL::vecSize
size_type vecSize() const
Definition:
EZMgrFL.h:43
EZMgrFL::m_vec
VecType m_vec
Definition:
EZMgrFL.h:52
EZMgrFL::reference
VecType::reference reference
Definition:
EZMgrFL.h:13
EZMgrFL::reserve
iterator reserve()
Definition:
EZMgrFL.h:25
EZMgrFL::const_iterator
VecType::const_iterator const_iterator
Definition:
EZMgrFL.h:12
T
long double T
Definition:
Basic3DVectorLD.h:48
EZMgrFL::resize
iterator resize()
Definition:
EZMgrFL.h:26
Generated for CMSSW Reference Manual by
1.8.14