Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
GlobalVertexMapv1.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file GlobalVertexMapv1.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef G4VERTEX_GLOBALVERTEXMAPV1_H
4
#define G4VERTEX_GLOBALVERTEXMAPV1_H
5
6
#include "
GlobalVertexMap.h
"
7
8
#include "
GlobalVertex.h
"
9
10
#include <cstddef>
// for size_t
11
#include <iostream>
12
#include <map>
13
14
class
GlobalVertexMapv1
:
public
GlobalVertexMap
15
{
16
public
:
17
GlobalVertexMapv1
() =
default
;
18
~GlobalVertexMapv1
()
override
;
19
20
void
identify
(std::ostream&
os
= std::cout)
const override
;
21
void
Reset
()
override
{
clear
(); }
22
int
isValid
()
const override
{
return
1; }
23
24
bool
empty
()
const override
{
return
_map
.empty(); }
25
size_t
size
()
const override
{
return
_map
.size(); }
26
size_t
count
(
unsigned
int
idkey)
const override
{
return
_map
.count(idkey); }
27
// cppcheck-suppress virtualCallInConstructor
28
void
clear
()
override
;
29
30
const
GlobalVertex
*
get
(
unsigned
int
idkey)
const
override
;
31
GlobalVertex
*
get
(
unsigned
int
idkey)
override
;
32
GlobalVertex
*
insert
(
GlobalVertex
*
vertex
)
override
;
33
size_t
erase
(
unsigned
int
idkey)
override
34
{
35
delete
_map
[idkey];
36
return
_map
.erase(idkey);
37
}
38
39
ConstIter
begin
()
const override
{
return
_map
.begin(); }
40
ConstIter
find
(
unsigned
int
idkey)
const override
{
return
_map
.find(idkey); }
41
ConstIter
end
()
const override
{
return
_map
.end(); }
42
43
Iter
begin
()
override
{
return
_map
.begin(); }
44
Iter
find
(
unsigned
int
idkey)
override
{
return
_map
.find(idkey); }
45
Iter
end
()
override
{
return
_map
.end(); }
46
47
private
:
48
std::map<unsigned int, GlobalVertex*>
_map
;
49
50
ClassDefOverride
(
GlobalVertexMapv1
, 1);
51
};
52
53
#endif // G4VERTEX_GLOBALVERTEXMAPv1_H
coresoftware
blob
master
offline
packages
globalvertex
GlobalVertexMapv1.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration