rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
ProjectionTreePlotter.hh
1// -*- C++ -*-
2#include "Rivet/Tools/Logging.hh"
3#include "Rivet/Analysis.hh"
4#include "Rivet/Tools/Logging.hh"
5#include "Rivet/AnalysisHandler.hh"
6#include "Rivet/ProjectionHandler.hh"
7
8#ifndef RIVET_RivetProjectionTree_HH
9#define RIVET_RivetProjectionTree_HH
10
11
12namespace Rivet{
13
16 private:
20 std::string _path;
21
22 //Title of digraph (by default the last bit of the name minus the '.gv')
23 std::string _title;
24
26 bool _treeGenerated;
27
28 //Tracks how many analyses are involved for the projection tree
29 size_t _nAnalyses;
31
35 std::vector<Rivet::ConstProjectionPtr> _projVector;
36
39 std::vector<std::pair<size_t, size_t>> _edgeVector;
40
42 std::vector<std::string> _nameVector; //Should be 1<->1 with _projVector;
44
45
46 public:
48 ProjectionTreeGenerator(const std::string& path);
49
52
54 void setPath(const std::string& path);
55
57 void setTitle(const std::string& title);
58
60 int generateProjTree(const std::vector<std::string>& analyses);
61
64
66 void writeProjTree() const;
67
70 inline const std::vector<string>& getProjNames() const{
71 return _nameVector;
72 }
73
75 inline const std::vector<std::pair<size_t, size_t>>& getEdges() const {
76 return _edgeVector;
77 }
78
80 Log& getLog() const;
81 };
82}
83
84#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
Class that deals with generating projection trees (for debugging etc.)
Definition ProjectionTreePlotter.hh:15
ProjectionTreeGenerator()
Standard constructor.
const std::vector< string > & getProjNames() const
Definition ProjectionTreePlotter.hh:70
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:75
ProjectionTreeGenerator(const std::string &path)
}
int getProjTree(const AnalysisHandler &ah)
Get a projection tree from the supplied analysishandler.
Definition MC_CENT_PPB_Projections.hh:10