CMS 3D CMS Logo

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