38 namespace RestFrames {
40 class ReconstructionFrame;
48 enum TreeType { kVanillaTree, kFrameTree, kGroupTree };
57 TreePlot(
const std::string& sname,
const std::string& stitle);
94 void Draw(
const std::string& name =
"",
95 const std::string& title =
"",
96 bool invert_colors =
false,
97 bool invert_node_colors =
false);
103 std::vector<int> m_Ncol;
106 bool m_SelfAssembling;
107 std::map<const Jigsaw*,int> m_JigsawColorMap;
108 std::map<FrameType,int> m_FrameColorMap;
112 const Group* m_GroupPtr;
114 int m_color_Node_text[4];
115 int m_color_Node_line[4];
116 int m_color_Node_fill[4];
117 int m_color_Default_text;
118 int m_color_Default_line;
119 int m_color_Default_fill;
122 std::vector<int> m_color_Leaf;
130 std::string GetStateTitle(
const State& state);
131 std::string GetSetTitle(
const std::string& set,
132 const std::string& index);
135 void FillFrameTree(
const RestFrame& frame);
136 void FillFrameTreeMap(
int irow,
const RestFrame& frame);
138 void FillGroupTree(
const Group& group);
139 void FillJigsawTree(
const Jigsaw& jigsaw);
140 void FillStateTreeMap(
int irow,
const State& state);
141 void FillJigsawLink(
const Jigsaw& jigsaw);
143 void SetColors(
bool invert_bkg_color,
144 bool invert_node_color);
146 std::vector<TreePlotNode*> m_TreeNodes;
147 std::vector<TreePlotLink*> m_TreeLinks;
148 void DrawTreeLinks();
149 void DrawTreeNodes(
bool with_rings =
false);
151 std::vector<TreePlotLink*> m_LeafLinks;
152 void DrawLeafLinks();
155 void DrawNode(
TreePlotNode* nodePtr,
bool with_rings =
false);
157 void DrawFrameTypeLegend();
158 void DrawTitle(
const std::string& title);
159 void DrawJigsawLegend();
161 void ConvertNodeCoordinates(std::vector<TreePlotNode*>& nodesPtr);
163 int GetJigsawPriority(
int Nout,
int Ndep)
const;
164 TCanvas* GetNewCanvas(
const std::string& name,
165 const std::string& title);