Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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 <assert.h>
6
7
template
<
class
T >
8
class
EZMgrFL
9
{
10
public
:
11
12
typedef
std::vector<T>
VecType
;
13
typedef
typename
VecType::iterator
iterator
;
14
typedef
typename
VecType::const_iterator
const_iterator
;
15
typedef
typename
VecType::reference
reference
;
16
typedef
typename
VecType::const_reference
const_reference
;
17
typedef
typename
VecType::value_type
value_type
;
18
typedef
typename
VecType::size_type
size_type
;
19
20
EZMgrFL< T >
(
size_type
vecSize
,
21
size_type
subSize
) :
m_vecSize
(
vecSize
) ,
22
m_subSize
(
subSize
)
23
{
24
m_vec
.resize(0);
25
assert
(
subSize
> 0 ) ;
26
assert
(
vecSize
> 0 ) ;
27
assert
( 0 ==
m_vec
.capacity() ) ;
28
}
29
30
virtual
~
EZMgrFL< T >
() {}
31
32
iterator
reserve
() {
return
assign
() ; }
33
iterator
resize
() {
return
assign
() ; }
34
35
iterator
assign
(
const
T
&
t
=
T
() )
36
{
37
assert
( (
m_vec
.size() +
m_subSize
) <=
m_vecSize
) ;
38
if
( 0 ==
m_vec
.capacity() )
39
{
40
m_vec
.reserve(
m_vecSize
) ;
41
assert
(
m_vecSize
==
m_vec
.capacity() ) ;
42
}
43
for
(
size_type
i
( 0 ) ;
i
!=
m_subSize
; ++
i
)
44
{
45
m_vec
.push_back(
t
) ;
46
}
47
return
(
m_vec
.end() -
m_subSize
) ;
48
}
49
50
size_type
subSize
()
const
{
return
m_subSize
; }
51
size_type
size
()
const
{
return
m_vec
.size(); }
52
53
size_type
vecSize
()
const
{
return
m_vec
.size() ; }
54
55
private
:
56
57
EZMgrFL
() ;
//stop
58
EZMgrFL
(
const
EZMgrFL
& ) ;
//stop
59
EZMgrFL
&
operator=
(
const
EZMgrFL
& ) ;
//stop
60
61
const
size_type
m_vecSize
;
62
const
size_type
m_subSize
;
63
VecType
m_vec
;
64
};
65
66
#endif
EZMgrFL::const_reference
VecType::const_reference const_reference
Definition:
EZMgrFL.h:16
i
int i
Definition:
DBlmapReader.cc:9
EZMgrFL::size_type
VecType::size_type size_type
Definition:
EZMgrFL.h:18
lumiQTWidget.t
tuple t
Definition:
lumiQTWidget.py:50
assert
assert(m_qm.get())
EZMgrFL::value_type
VecType::value_type value_type
Definition:
EZMgrFL.h:17
trigger::size_type
uint16_t size_type
Definition:
TriggerTypeDefs.h:19
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
RecoTauValidation_cfi.reference
tuple reference
Definition:
RecoTauValidation_cfi.py:228
EZMgrFL::operator=
EZMgrFL & operator=(const EZMgrFL &)
EZMgrFL::vecSize
size_type vecSize() const
Definition:
EZMgrFL.h:53
EZMgrFL::EZMgrFL
EZMgrFL()
EZMgrFL::iterator
VecType::iterator iterator
Definition:
EZMgrFL.h:13
EZMgrFL::subSize
size_type subSize() const
Definition:
EZMgrFL.h:50
EZMgrFL
Definition:
EZMgrFL.h:8
EZMgrFL::m_subSize
const size_type m_subSize
Definition:
EZMgrFL.h:62
EZMgrFL::VecType
std::vector< T > VecType
Definition:
EZMgrFL.h:12
EZMgrFL::assign
iterator assign(const T &t=T())
Definition:
EZMgrFL.h:35
EZMgrFL::m_vecSize
const size_type m_vecSize
Definition:
EZMgrFL.h:61
EZMgrFL::m_vec
VecType m_vec
Definition:
EZMgrFL.h:63
EZMgrFL::reference
VecType::reference reference
Definition:
EZMgrFL.h:15
EZMgrFL::size
size_type size() const
Definition:
EZMgrFL.h:51
EZMgrFL::reserve
iterator reserve()
Definition:
EZMgrFL.h:32
EZMgrFL::const_iterator
VecType::const_iterator const_iterator
Definition:
EZMgrFL.h:14
T
long double T
Definition:
Basic3DVectorLD.h:57
EZMgrFL::resize
iterator resize()
Definition:
EZMgrFL.h:33
Generated for CMSSW Reference Manual by
1.8.5