Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
Services
src
VertexTracker.h
Go to the documentation of this file.
1
#ifndef FWCore_Services_Vertex_Tracker_h
2
#define FWCore_Services_Vertex_Tracker_h
3
4
#include <atomic>
5
#include <iosfwd>
6
#include <string>
7
8
#include "
Sym.h
"
9
#include "
ProfParseTypedefs.h
"
10
11
// ------------------- Vertex Tracker class ----------------
12
struct
VertexTracker
13
{
14
typedef
void
*
address_type
;
15
VertexTracker
():
16
name_
(),
17
library_
(),
18
addr_
(),
19
id_
(),
20
total_as_leaf_
(),
21
total_seen_
(),
22
in_path_
(),
23
//size_(),
24
percent_leaf_
(0.0),
25
percent_path_
(0.0)
26
{ }
27
28
explicit
VertexTracker
(
unsigned
int
id
):
29
name_
(),
30
library_
(),
31
addr_
(),
32
id_
(id),
33
total_as_leaf_
(),
34
total_seen_
(),
35
in_path_
(),
36
//size_(),
37
percent_leaf_
(0.0),
38
percent_path_
(0.0)
39
{ }
40
41
VertexTracker
(
address_type
addr,
const
std::string
&
name
):
42
name_
(name),
43
library_
(),
44
addr_
(addr),
45
id_
(),
46
total_as_leaf_
(),
47
total_seen_
(),
48
in_path_
(),
49
//size_(),
50
percent_leaf_
(0.0),
51
percent_path_
(0.0)
52
{ }
53
54
explicit
VertexTracker
(
const
Sym
& sym) :
55
name_
(sym.
name_
),
56
library_
(sym.
library_
),
57
addr_
(sym.
addr_
),
58
id_
(),
59
total_as_leaf_
(),
60
total_seen_
(),
61
in_path_
(),
62
//size_(sym.size_),
63
percent_leaf_
(0.0),
64
percent_path_
(0.0)
65
{ }
66
67
bool
68
operator<
(
const
VertexTracker
&
a
)
const
69
{
return
addr_
<a.
addr_
; }
70
71
bool
72
operator<
(
unsigned
int
id
)
const
73
{
return
id_
<id; }
74
75
void
76
incLeaf
()
const
77
{ ++
total_as_leaf_
; }
78
79
void
80
incTotal
()
const
81
{ ++
total_seen_
; }
82
83
void
84
incPath
(
int
by)
const
85
{
in_path_
+=by; }
86
87
void
88
setID
()
const
89
{
id_
=
next_id_
++; }
90
91
std::string
name_
;
92
std::string
library_
;
93
address_type
addr_
;
94
mutable
unsigned
int
id_
;
95
mutable
unsigned
int
total_as_leaf_
;
96
mutable
unsigned
int
total_seen_
;
97
mutable
unsigned
int
in_path_
;
98
mutable
EdgeMap
edges_
;
99
//mutable int size_;
100
mutable
float
percent_leaf_
;
101
mutable
float
percent_path_
;
102
103
static
std::atomic<unsigned int>
next_id_
;
104
};
105
106
std::ostream&
107
operator<<
(std::ostream& os,
VertexTracker
const
& vt);
108
109
#endif
Sym
Definition:
Sym.h:10
VertexTracker::VertexTracker
VertexTracker(address_type addr, const std::string &name)
Definition:
VertexTracker.h:41
VertexTracker::library_
std::string library_
Definition:
VertexTracker.h:92
VertexTracker::VertexTracker
VertexTracker()
Definition:
VertexTracker.h:15
VertexTracker::name_
std::string name_
Definition:
VertexTracker.h:91
VertexTracker::edges_
EdgeMap edges_
Definition:
VertexTracker.h:98
VertexTracker::percent_path_
float percent_path_
Definition:
VertexTracker.h:101
ProfParseTypedefs.h
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:187
VertexTracker::incLeaf
void incLeaf() const
Definition:
VertexTracker.h:76
VertexTracker::operator<
bool operator<(const VertexTracker &a) const
Definition:
VertexTracker.h:68
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
VertexTracker::addr_
address_type addr_
Definition:
VertexTracker.h:93
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
VertexTracker::VertexTracker
VertexTracker(unsigned int id)
Definition:
VertexTracker.h:28
VertexTracker::total_as_leaf_
unsigned int total_as_leaf_
Definition:
VertexTracker.h:95
VertexTracker::percent_leaf_
float percent_leaf_
Definition:
VertexTracker.h:100
VertexTracker::in_path_
unsigned int in_path_
Definition:
VertexTracker.h:97
VertexTracker::next_id_
static std::atomic< unsigned int > next_id_
Definition:
VertexTracker.h:103
VertexTracker::VertexTracker
VertexTracker(const Sym &sym)
Definition:
VertexTracker.h:54
VertexTracker::incPath
void incPath(int by) const
Definition:
VertexTracker.h:84
VertexTracker::address_type
void * address_type
Definition:
VertexTracker.h:14
VertexTracker::setID
void setID() const
Definition:
VertexTracker.h:88
VertexTracker
Definition:
VertexTracker.h:12
VertexTracker::total_seen_
unsigned int total_seen_
Definition:
VertexTracker.h:96
a
double a
Definition:
hdecay.h:121
Sym.h
EdgeMap
std::map< unsigned int, int > EdgeMap
Definition:
ProfParseTypedefs.h:13
VertexTracker::id_
unsigned int id_
Definition:
VertexTracker.h:94
VertexTracker::incTotal
void incTotal() const
Definition:
VertexTracker.h:80
Generated for CMSSW Reference Manual by
1.8.5