Rivet API documentation

Rivet 4.1.3
ProjectionTreePlotter.hh
1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/AnalysisHandler.hh"
4#include "Rivet/ProjectionHandler.hh"
5#include "Rivet/Tools/Logging.hh"
6
7#ifndef RIVET_RivetProjectionTree_HH
8 #define RIVET_RivetProjectionTree_HH
9
10
11namespace Rivet {
12
15 private:
16
19
21 std::string _path;
22
23 //Title of digraph (by default the last bit of the name minus the '.gv')
24 std::string _title;
25
27 bool _treeGenerated;
28
29 //Tracks how many analyses are involved for the projection tree
30 size_t _nAnalyses;
31
33
36
38 std::vector<Rivet::ConstProjectionPtr> _projVector;
39
42 std::vector<std::pair<size_t, size_t>> _edgeVector;
43
45 std::vector<std::string> _nameVector; //Should be 1<->1 with _projVector;
46
48
49
50 public:
51
53 ProjectionTreeGenerator(const std::string& path);
54
57
59 void setPath(const std::string& path);
60
62 void setTitle(const std::string& title);
63
65 int generateProjTree(const std::vector<std::string>& analyses);
66
69
71 void writeProjTree() const;
72
75 inline const std::vector<string>& getProjNames() const {
76 return _nameVector;
77 }
78
80 inline const std::vector<std::pair<size_t, size_t>>& getEdges() const {
81 return _edgeVector;
82 }
83
85 Log& getLog() const;
86 };
87}
88
89#endif
The key class for coordination of Analysis objects and the event loop.
Definition AnalysisHandler.hh:29
Logging system for controlled & formatted writing to stdout.
Definition Logging.hh:10
ProjectionTreeGenerator()
Standard constructor.
const std::vector< string > & getProjNames() const
Definition ProjectionTreePlotter.hh:75
Log & getLog() const
Get a logger object.
int generateProjTree(const std::vector< std::string > &analyses)
Generate the projection tree for the supplied analyses (constructs dummy analysisHandler for you).
void setPath(const std::string &path)
Set the path.
void setTitle(const std::string &title)
Set the title (defaults to last bit of path without '.gv').
void writeProjTree() const
Save the projection tree to the path specifed by _path.
const std::vector< std::pair< size_t, size_t > > & getEdges() const
Get the vector of edges - format pair<size_t,size_t>(start-index,end-index).
Definition ProjectionTreePlotter.hh:80
ProjectionTreeGenerator(const std::string &path)
Standard constructor with name of gv pre-supplied.
int getProjTree(const AnalysisHandler &ah)
Get a projection tree from the supplied analysishandler.
Definition LHCbCommon.hh:9