EIC Software
Reference for
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
BbcVertexMapv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file BbcVertexMapv1.cc
1
#include "
BbcVertexMapv1.h
"
2
3
#include "
BbcVertex.h
"
4
#include "
BbcVertexMap.h
"
5
6
#include <iterator>
// for reverse_iterator
7
#include <utility>
// for pair, make_pair
8
9
using namespace
std;
10
11
BbcVertexMapv1::BbcVertexMapv1
()
12
: _map()
13
{
14
}
15
16
BbcVertexMapv1::~BbcVertexMapv1
()
17
{
18
clear
();
19
}
20
21
void
BbcVertexMapv1::identify
(ostream& os)
const
22
{
23
os <<
"BbcVertexMapv1: size = "
<<
_map
.size() << endl;
24
return
;
25
}
26
27
void
BbcVertexMapv1::clear
()
28
{
29
for
(
Iter
iter =
_map
.begin();
30
iter !=
_map
.end();
31
++iter)
32
{
33
delete
iter->second;
34
}
35
_map
.clear();
36
return
;
37
}
38
39
const
BbcVertex
*
BbcVertexMapv1::get
(
unsigned
int
id
)
const
40
{
41
ConstIter
iter =
_map
.find(
id
);
42
if
(iter ==
_map
.end())
return
NULL;
43
return
iter->second;
44
}
45
46
BbcVertex
*
BbcVertexMapv1::get
(
unsigned
int
id
)
47
{
48
Iter
iter =
_map
.find(
id
);
49
if
(iter ==
_map
.end())
return
NULL;
50
return
iter->second;
51
}
52
53
BbcVertex
*
BbcVertexMapv1::insert
(
BbcVertex
* clus)
54
{
55
unsigned
int
index = 0;
56
if
(!
_map
.empty()) index =
_map
.rbegin()->first + 1;
57
_map
.insert(make_pair(index, clus));
58
_map
[index]->set_id(index);
59
return
_map
[index];
60
}
fun4all_coresoftware
blob
master
simulation
g4simulation
g4bbc
BbcVertexMapv1.cc
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:47
using
1.8.2 with
EIC GitHub integration