Belle II Software  release-05-02-19
DisplayData.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Pulvermacher *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <TObject.h>
13 
14 //for dictionaries
15 #include <TH1.h>
16 #include <TVector3.h>
17 
18 #include <vector>
19 #include <map>
20 #include <string>
21 #include <utility>
22 
23 
24 namespace Belle2 {
57  class DisplayData : public TObject {
58  public:
59 
61  DisplayData() {}
62 
64  ~DisplayData();
65 
73  void addArrow(const std::string& name, const TVector3& start, const TVector3& end, int color = -1);
74 
79  void addHistogram(const std::string& name, const TH1* hist);
80 
82  void addLabel(const std::string& text, const TVector3& pos);
83 
84 
89  void addPoint(const std::string& name, const TVector3& pos);
90 
91 
99  void select(const TObject* object);
100 
102  struct Arrow {
103  std::string name;
104  TVector3 start;
105  TVector3 end;
106  int color;
107  };
108  private:
109 
110  std::map<std::string, std::vector<TVector3> > m_pointSets;
111  std::vector<std::pair<std::string, TVector3> > m_labels;
113  std::vector<TH1*> m_histograms; //->
114 
115  std::vector<std::pair<std::string, unsigned int> > m_selectedObjects;
116  std::vector<Arrow> m_arrows;
120  friend class DisplayUI;
121  friend class EVEVisualization;
122 
123  }; //class
125 } // namespace Belle2
Belle2::DisplayData::Arrow
Stores data associated with an arrow.
Definition: DisplayData.h:110
Belle2::DisplayData::m_labels
std::vector< std::pair< std::string, TVector3 > > m_labels
text labels (to be shown at a given position).
Definition: DisplayData.h:119
Belle2::DisplayData::m_histograms
std::vector< TH1 * > m_histograms
Histograms to be shown in Eve.
Definition: DisplayData.h:121
Belle2::DisplayUI
Control TEve browser user interface.
Definition: DisplayUI.h:44
Belle2::DisplayData::addHistogram
void addHistogram(const std::string &name, const TH1 *hist)
Add histogram with the given name.
Definition: DisplayData.cc:41
Belle2::DisplayData::addLabel
void addLabel(const std::string &text, const TVector3 &pos)
Add a text label at the given position.
Definition: DisplayData.cc:36
Belle2::DisplayData::addArrow
void addArrow(const std::string &name, const TVector3 &start, const TVector3 &end, int color=-1)
Add an arrow in the display (for axes, to point out some specific location).
Definition: DisplayData.cc:26
Belle2::DisplayData::Arrow::end
TVector3 end
and ends here.
Definition: DisplayData.h:113
Belle2::DisplayData::Arrow::color
int color
Color_t, e.g.
Definition: DisplayData.h:114
Belle2::EVEVisualization
Produces visualisation for MCParticles, simhits, genfit::Tracks, geometry and other things.
Definition: EVEVisualization.h:59
Belle2::DisplayData::Arrow::start
TVector3 start
arrow starts here.
Definition: DisplayData.h:112
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DisplayData::m_arrows
std::vector< Arrow > m_arrows
List of arrows.
Definition: DisplayData.h:124
Belle2::DisplayData::ClassDef
ClassDef(DisplayData, 4)
Add custom information to the display.
Belle2::DisplayData::m_pointSets
std::map< std::string, std::vector< TVector3 > > m_pointSets
name -> points map
Definition: DisplayData.h:118
Belle2::DisplayData::addPoint
void addPoint(const std::string &name, const TVector3 &pos)
Add a point at the given position, as part of a collection specified by name.
Definition: DisplayData.cc:31
Belle2::DisplayData::select
void select(const TObject *object)
Select the given object in the display.
Definition: DisplayData.cc:48
Belle2::DisplayData::Arrow::name
std::string name
label.
Definition: DisplayData.h:111
Belle2::DisplayData
Add custom information to the display.
Definition: DisplayData.h:65
Belle2::DisplayData::DisplayData
DisplayData()
Constructor.
Definition: DisplayData.h:69
Belle2::DisplayData::m_selectedObjects
std::vector< std::pair< std::string, unsigned int > > m_selectedObjects
List of selected objects (array name, index).
Definition: DisplayData.h:123
Belle2::DisplayData::~DisplayData
~DisplayData()
Destructor.
Definition: DisplayData.cc:17