LOGO

RestFrames  v1.0.1
RestFrames HEP Event Analysis Software Library
TreePlotLink.cc
Go to the documentation of this file.
1 // RestFrames: particle physics event analysis library
3 // --------------------------------------------------------------------
4 // Copyright (c) 2014-2016, Christopher Rogan
14 // This file is part of RestFrames.
15 //
16 // RestFrames is free software; you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation; either version 2 of the License, or
19 // (at your option) any later version.
20 //
21 // RestFrames is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with RestFrames. If not, see <http://www.gnu.org/licenses/>.
29 
31 #include "RestFrames/Jigsaw.hh"
32 
33 namespace RestFrames {
34 
35  TreePlotLink::TreePlotLink(TreePlotNode* Node1Ptr, TreePlotNode* Node2Ptr){
36  m_Node1Ptr = Node1Ptr;
37  m_Node2Ptr = Node2Ptr;
38  m_Wavy = false;
39  m_DoLabel = false;
40  m_Label = "";
41  m_JigsawPtr = nullptr;
42  }
43 
44  TreePlotLink::~TreePlotLink() {}
45 
46  void TreePlotLink::SetWavy(bool wavy){
47  m_Wavy = wavy;
48  }
49 
50  void TreePlotLink::SetLabel(const std::string& label){
51  m_Label = label;
52  m_DoLabel = true;
53  }
54 
55  void TreePlotLink::SetJigsaw(const Jigsaw& jigsaw){
56  m_JigsawPtr = &jigsaw;
57  }
58 
59  TreePlotNode* TreePlotLink::GetNode1() const {
60  return m_Node1Ptr;
61  }
62 
63  TreePlotNode* TreePlotLink::GetNode2() const {
64  return m_Node2Ptr;
65  }
66 
67  bool TreePlotLink::DoWavy() const {
68  return m_Wavy;
69  }
70 
71  std::string TreePlotLink::GetLabel() const {
72  return m_Label;
73  }
74 
75  bool TreePlotLink::DoLabel() const {
76  return m_DoLabel;
77  }
78 
79  Jigsaw const& TreePlotLink::GetJigsaw() const {
80  if(m_JigsawPtr)
81  return *m_JigsawPtr;
82  else
83  return Jigsaw::Empty();
84  }
85 
86 }
TreePlotLink.hh
Jigsaw.hh
RestFrames::Jigsaw::Empty
static Jigsaw & Empty()
Returns empty Jigsaw.
Definition: Jigsaw.cc:70