Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
PicTree.h
1/*
2 * PicTree.h
3 *
4 * Created on: 4 lip 2024
5 * Author: daniel
6 */
7
8#ifndef HAL_FEATURES_IO_HTML_PICTREE_H_
9#define HAL_FEATURES_IO_HTML_PICTREE_H_
10
11#include "Object.h"
12
16namespace Hal {
17
18 class PicTree : public Object {
19 struct circle {
20 Int_t sDepth;
21 Int_t sNumber;
22 Int_t sStyles;
23 Double_t sRatio;
24 circle(Int_t depth, Int_t number, Int_t style, Double_t ratio) :
25 sDepth(depth), sNumber(number), sStyles(style), sRatio(ratio) {}
26 void Draw(const PicTree& tree);
27 };
28 struct link {
29 Int_t sFromNumber;
30 Int_t sToNumber;
31 Int_t sFromDepth;
32 Int_t sToDepth;
33 Int_t sStyles;
34 link(std::initializer_list<Int_t> depths, std::initializer_list<Int_t> ids, Int_t style);
35 void Draw(const PicTree& tree);
36 };
37 std::vector<std::vector<std::pair<double, double>>> fPoints;
38
39 std::vector<circle> fCircles;
40 std::vector<link> fLinks;
41 const Int_t fMaxExpDepth = {10};
42 Int_t fDepthMax = {1};
43 Double_t fBasicRadius = {20}, fWindowWidth = {800}, fWindowHeight = {800};
44
45 Double_t GetDepth() const { return fDepthMax; }
46
47 public:
48 PicTree();
56 void AddPoint(Int_t depth, Int_t number, Int_t style, Double_t ratio);
63 void AddLink(std::initializer_list<Int_t> depths, std::initializer_list<Int_t> ids, Int_t style);
68 void SaveAs(TString path);
73 Double_t GetWidth() const { return fWindowWidth; }
78 Double_t GetHeight() const { return fWindowHeight; }
83 std::vector<std::vector<std::pair<double, double>>> GetCoords() const { return fPoints; };
84 virtual ~PicTree() {};
85 ClassDef(PicTree, 0)
86 };
87
88} /* namespace Hal */
89
90#endif /* HAL_FEATURES_IO_HTML_PICTREE_H_ */
void AddPoint(Int_t depth, Int_t number, Int_t style, Double_t ratio)
Definition PicTree.cxx:35
void AddLink(std::initializer_list< Int_t > depths, std::initializer_list< Int_t > ids, Int_t style)
Definition PicTree.cxx:32
void SaveAs(TString path)
Definition PicTree.cxx:39
Double_t GetWidth() const
Definition PicTree.h:73
std::vector< std::vector< std::pair< double, double > > > GetCoords() const
Definition PicTree.h:83
Double_t GetHeight() const
Definition PicTree.h:78