ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ParticleFlowElementContainer.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ParticleFlowElementContainer.cc
1
#include "
ParticleFlowElementContainer.h
"
2
3
#include "
ParticleFlowElement.h
"
4
5
#include <cstdlib>
6
#include <iostream>
7
#include <utility>
8
9
10
ParticleFlowElementContainer::ConstRange
11
ParticleFlowElementContainer::getParticleFlowElements
(
void
)
const
12
{
13
return
make_pair(
_pflowElementMap
.begin(),
_pflowElementMap
.end() );
14
}
15
16
ParticleFlowElementContainer::Range
17
ParticleFlowElementContainer::getParticleFlowElements
(
void
)
18
{
19
return
make_pair(
_pflowElementMap
.begin(),
_pflowElementMap
.end() );
20
}
21
22
void
23
ParticleFlowElementContainer::AddParticleFlowElement
(
int
index ,
ParticleFlowElement
*pflowElement )
24
{
25
26
_pflowElementMap
[index] = pflowElement;
27
28
}
29
30
ParticleFlowElement
*
31
ParticleFlowElementContainer::getParticleFlowElement
(
int
index )
32
{
33
ConstIterator
it
=
_pflowElementMap
.find( index );
34
if
(it !=
_pflowElementMap
.end())
35
{
36
return
it->second;
37
}
38
return
NULL;
39
}
40
41
const
ParticleFlowElement
*
42
ParticleFlowElementContainer::getParticleFlowElement
(
int
index )
const
43
{
44
ConstIterator
it
=
_pflowElementMap
.find( index );
45
if
(it !=
_pflowElementMap
.end())
46
{
47
return
it->second;
48
}
49
return
NULL;
50
}
51
52
int
ParticleFlowElementContainer::isValid
()
const
53
{
54
return
(!
_pflowElementMap
.empty());
55
}
56
57
void
ParticleFlowElementContainer::Reset
()
58
{
59
while
(
_pflowElementMap
.begin() !=
_pflowElementMap
.end())
60
{
61
delete
_pflowElementMap
.begin()->second;
62
_pflowElementMap
.erase(
_pflowElementMap
.begin());
63
}
64
}
65
66
void
ParticleFlowElementContainer::identify
(std::ostream &os)
const
67
{
68
os <<
"ParticleFlowElementContainer, number of elements: "
<<
size
() << std::endl;
69
}
70
coresoftware
blob
master
offline
packages
particleflow
ParticleFlowElementContainer.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:36
using
1.8.2 with
ECCE GitHub integration