Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
FWCore
Utilities
interface
IndexSet.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_IndexSet_h
2
#define FWCore_Utilities_IndexSet_h
3
4
#include <vector>
5
6
namespace
edm
{
22
class
IndexSet
{
23
public
:
25
IndexSet
() :
numTrueElements_
(0) {}
26
28
bool
empty
()
const
{
return
numTrueElements_
== 0; }
29
31
unsigned
int
size
()
const
{
return
numTrueElements_
; }
32
34
void
reserve
(
unsigned
int
size
) {
35
if
(
size
>=
content_
.size()) {
36
content_
.resize(
size
,
false
);
37
}
38
}
39
41
void
clear
() {
42
std::fill
(begin(
content_
),
end
(
content_
),
false
);
43
numTrueElements_
= 0;
44
}
45
47
void
insert
(
unsigned
int
index
) {
48
reserve
(
index
+ 1);
49
numTrueElements_
+= !
content_
[
index
];
// count increases if value was false
50
content_
[
index
] =
true
;
51
}
52
54
bool
has
(
unsigned
int
index
)
const
{
return
index
<
content_
.size() &&
content_
[
index
]; }
55
56
private
:
57
std::vector<bool>
58
content_
;
59
unsigned
int
numTrueElements_
;
60
};
61
}
// namespace edm
62
63
#endif
edm::IndexSet::content_
std::vector< bool > content_
Definition:
IndexSet.h:58
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::IndexSet::reserve
void reserve(unsigned int size)
Reserve memory for the set.
Definition:
IndexSet.h:34
edm::IndexSet::has
bool has(unsigned int index) const
Check if an element (=index) is in the set.
Definition:
IndexSet.h:54
mps_fire.end
end
Definition:
mps_fire.py:242
ntuplemaker.fill
fill
Definition:
ntuplemaker.py:304
edm::IndexSet
Definition:
IndexSet.h:22
edm::IndexSet::insert
void insert(unsigned int index)
Insert an element (=index) to the set.
Definition:
IndexSet.h:47
edm::IndexSet::IndexSet
IndexSet()
Construct empty set.
Definition:
IndexSet.h:25
edm::IndexSet::size
unsigned int size() const
Number of elements in the set.
Definition:
IndexSet.h:31
edm::IndexSet::numTrueElements_
unsigned int numTrueElements_
Each possible element of the set corresponds an index in this vector. The value of an element tells i...
Definition:
IndexSet.h:59
AlignmentPI::index
index
Definition:
AlignmentPayloadInspectorHelper.h:46
edm::IndexSet::empty
bool empty() const
Check if the set is empty.
Definition:
IndexSet.h:28
edm::IndexSet::clear
void clear()
Clear the set.
Definition:
IndexSet.h:41
Generated for CMSSW Reference Manual by
1.8.16