Public Member Functions | Private Attributes | Static Private Attributes | List of all members
evdb::View3D Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/nuevdb/v1_00_02/source/nuevdb/EventDisplayBase/View3D.h"

Public Member Functions

 View3D ()
 
 ~View3D ()
 
void Draw ()
 
void Clear ()
 
TMarker3DBox & AddMarker3DBox (double x, double y, double z, double dx, double dy, double dz, double th=0.0, double ph=0.0)
 
TPolyMarker3D & AddPolyMarker3D (int n, int c, int st, double sz)
 
TPolyLine3D & AddPolyLine3D (int n, int c, int w, int s)
 
TText & AddText (double x, double y, const char *text)
 

Private Attributes

std::list< TMarker3DBox * > fMarker3DBoxL
 List of 3D marker boxes. More...
 
std::list< TPolyMarker3D * > fPolyMarker3DL
 List of poly markers. More...
 
std::list< TPolyLine3D * > fPolyLine3DL
 List of poly lines. More...
 
std::list< TText * > fText3DL
 List of texts. More...
 

Static Private Attributes

static std::list< TMarker3DBox * > fgMarker3DBoxL
 
static std::list< TPolyMarker3D * > fgPolyMarker3DL
 
static std::list< TPolyLine3D * > fgPolyLine3DL
 
static std::list< TText * > fgText3DL
 

Detailed Description

Definition at line 18 of file View3D.h.

Constructor & Destructor Documentation

evdb::View3D::View3D ( )

Definition at line 16 of file View3D.cxx.

17  {
18  }
evdb::View3D::~View3D ( )

Definition at line 22 of file View3D.cxx.

References Clear().

23  {
24  // Make sure to return all our objects to where they came from
25  Clear();
26  }
void Clear()
Definition: View3D.cxx:40

Member Function Documentation

TMarker3DBox & evdb::View3D::AddMarker3DBox ( double  x,
double  y,
double  z,
double  dx,
double  dy,
double  dz,
double  th = 0.0,
double  ph = 0.0 
)

Definition at line 51 of file View3D.cxx.

References fgMarker3DBoxL, fMarker3DBoxL, and m.

Referenced by evd::RawDataDrawer::Draw3DHitBoxes().

54  {
55  // See comment in View2D::AddMarker()
56  TMarker3DBox* m = 0;
57  if(fgMarker3DBoxL.empty()){
58  m = new TMarker3DBox(x,y,z,dx,dy,dz,th,ph);
59  m->SetBit(kCanDelete,kFALSE);
60  }
61  else {
62  m = fgMarker3DBoxL.back();
63  fgMarker3DBoxL.pop_back();
64 
65  m->SetPosition(x,y,z);
66  m->SetSize(dx,dy,dz);
67  }
68 
69  fMarker3DBoxL.push_back(m);
70  return *m;
71  }
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
std::list< TMarker3DBox * > fMarker3DBoxL
List of 3D marker boxes.
Definition: View3D.h:42
static std::list< TMarker3DBox * > fgMarker3DBoxL
Definition: View3D.h:37
z
Definition: test.py:28
TPolyLine3D & evdb::View3D::AddPolyLine3D ( int  n,
int  c,
int  w,
int  s 
)

Definition at line 105 of file View3D.cxx.

References fgPolyLine3DL, fPolyLine3DL, and std_candles::pl.

Referenced by evd::RecoBaseDrawer::CellHit3D(), evd::GeometryDrawer::DetOutline3D(), evd::HitTower::Draw(), evd::RecoBaseDrawer::DrawProng3D(), evd::RecoBaseDrawer::DrawTrack3D(), evd::SimulationDrawer::MCTruthTrajectoriesAnyD(), evd::SimulationDrawer::MCTruthVectors3D(), and evd::RawDataDrawer::StickFigure().

106  {
107  TPolyLine3D* pl = 0;
108  if(fgPolyLine3DL.empty()){
109  pl = new TPolyLine3D(n);
110  pl->SetBit(kCanDelete,kFALSE);
111  pl->SetLineColor(c);
112  pl->SetLineWidth(w);
113  pl->SetLineStyle(s);
114  }
115  else {
116  pl = fgPolyLine3DL.back();
117  fgPolyLine3DL.pop_back();
118 
119  // The first call to SetPolyMarker3D with the 0
120  // deletes the current set of points before trying
121  // to make a new set
122  pl->SetPolyLine(0,(double*)0,"");
123  pl->SetPolyLine(n,(double*)0,"");
124  pl->SetLineColor(c);
125  pl->SetLineWidth(w);
126  pl->SetLineStyle(s);
127  }
128 
129  fPolyLine3DL.push_back(pl);
130  return *pl;
131  }
static std::list< TPolyLine3D * > fgPolyLine3DL
Definition: View3D.h:39
const XML_Char * s
Definition: expat.h:262
std::list< TPolyLine3D * > fPolyLine3DL
List of poly lines.
Definition: View3D.h:44
Float_t w
Definition: plot.C:20
TPolyMarker3D & evdb::View3D::AddPolyMarker3D ( int  n,
int  c,
int  st,
double  sz 
)

Definition at line 75 of file View3D.cxx.

References fgPolyMarker3DL, and fPolyMarker3DL.

Referenced by evd::SimulationDrawer::FLSHit3D(), and evd::SimulationDrawer::MCTruthVertices3D().

76  {
77  TPolyMarker3D* pm = 0;
78  if(fgPolyMarker3DL.empty()){
79  pm = new TPolyMarker3D(n);
80  pm->SetBit(kCanDelete,kFALSE);
81  pm->SetMarkerColor(c);
82  pm->SetMarkerStyle(st);
83  pm->SetMarkerSize(sz);
84  }
85  else {
86  pm = fgPolyMarker3DL.back();
87  fgPolyMarker3DL.pop_back();
88 
89  // The first call to SetPolyMarker3D with the 0
90  // deletes the current set of points before trying
91  // to make a new set
92  pm->SetPolyMarker(0,(double*)0,1,"");
93  pm->SetPolyMarker(n,(double*)0,1,"");
94  pm->SetMarkerColor(c);
95  pm->SetMarkerStyle(st);
96  pm->SetMarkerSize(sz);
97  }
98 
99  fPolyMarker3DL.push_back(pm);
100  return *pm;
101  }
static std::list< TPolyMarker3D * > fgPolyMarker3DL
Definition: View3D.h:38
std::list< TPolyMarker3D * > fPolyMarker3DL
List of poly markers.
Definition: View3D.h:43
TText & evdb::View3D::AddText ( double  x,
double  y,
const char *  text 
)

Definition at line 135 of file View3D.cxx.

References fgText3DL, and fText3DL.

Referenced by evd::HeaderDrawer::Header().

136  {
137  TText* itxt = 0;
138  if(fgText3DL.empty()){
139  itxt = new TText(x,y,text);
140  itxt->SetBit(kCanDelete,kFALSE);
141  }
142  else {
143  itxt = fgText3DL.back();
144  fgText3DL.pop_back();
145 
146  itxt->SetText(x,y,text);
147  }
148 
149  fText3DL.push_back(itxt);
150  return *itxt;
151  }
std::list< TText * > fText3DL
List of texts.
Definition: View3D.h:45
static std::list< TText * > fgText3DL
Definition: View3D.h:40
void evdb::View3D::Clear ( void  )

Definition at line 40 of file View3D.cxx.

References fgMarker3DBoxL, fgPolyLine3DL, fgPolyMarker3DL, fgText3DL, fMarker3DBoxL, fPolyLine3DL, fPolyMarker3DL, and fText3DL.

Referenced by evd::Display3DPad::Draw(), and ~View3D().

41  {
42  // Empty each of our lists, appending them back onto the static ones
46  fgText3DL.splice(fgText3DL.end(), fText3DL);
47  }
static std::list< TPolyMarker3D * > fgPolyMarker3DL
Definition: View3D.h:38
std::list< TText * > fText3DL
List of texts.
Definition: View3D.h:45
static std::list< TPolyLine3D * > fgPolyLine3DL
Definition: View3D.h:39
static std::list< TText * > fgText3DL
Definition: View3D.h:40
std::list< TMarker3DBox * > fMarker3DBoxL
List of 3D marker boxes.
Definition: View3D.h:42
static std::list< TMarker3DBox * > fgMarker3DBoxL
Definition: View3D.h:37
std::list< TPolyLine3D * > fPolyLine3DL
List of poly lines.
Definition: View3D.h:44
std::list< TPolyMarker3D * > fPolyMarker3DL
List of poly markers.
Definition: View3D.h:43
void evdb::View3D::Draw ( )

Definition at line 30 of file View3D.cxx.

References fMarker3DBoxL, fPolyLine3DL, fPolyMarker3DL, and fText3DL.

Referenced by evd::Display3DPad::Draw().

31  {
32  for_each(fMarker3DBoxL.begin(), fMarker3DBoxL.end(), draw_tobject());
33  for_each(fPolyMarker3DL.begin(),fPolyMarker3DL.end(),draw_tobject());
34  for_each(fPolyLine3DL.begin(), fPolyLine3DL.end(), draw_tobject());
35  for_each(fText3DL.begin(), fText3DL.end(), draw_tobject());
36  }
std::list< TText * > fText3DL
List of texts.
Definition: View3D.h:45
std::list< TMarker3DBox * > fMarker3DBoxL
List of 3D marker boxes.
Definition: View3D.h:42
std::list< TPolyLine3D * > fPolyLine3DL
List of poly lines.
Definition: View3D.h:44
std::list< TPolyMarker3D * > fPolyMarker3DL
List of poly markers.
Definition: View3D.h:43

Member Data Documentation

std::list< TMarker3DBox * > evdb::View3D::fgMarker3DBoxL
staticprivate

Definition at line 37 of file View3D.h.

Referenced by AddMarker3DBox(), and Clear().

std::list< TPolyLine3D * > evdb::View3D::fgPolyLine3DL
staticprivate

Definition at line 39 of file View3D.h.

Referenced by AddPolyLine3D(), and Clear().

std::list< TPolyMarker3D * > evdb::View3D::fgPolyMarker3DL
staticprivate

Definition at line 38 of file View3D.h.

Referenced by AddPolyMarker3D(), and Clear().

std::list< TText * > evdb::View3D::fgText3DL
staticprivate

Definition at line 40 of file View3D.h.

Referenced by AddText(), and Clear().

std::list<TMarker3DBox*> evdb::View3D::fMarker3DBoxL
private

List of 3D marker boxes.

Definition at line 42 of file View3D.h.

Referenced by AddMarker3DBox(), Clear(), and Draw().

std::list<TPolyLine3D*> evdb::View3D::fPolyLine3DL
private

List of poly lines.

Definition at line 44 of file View3D.h.

Referenced by AddPolyLine3D(), Clear(), and Draw().

std::list<TPolyMarker3D*> evdb::View3D::fPolyMarker3DL
private

List of poly markers.

Definition at line 43 of file View3D.h.

Referenced by AddPolyMarker3D(), Clear(), and Draw().

std::list<TText*> evdb::View3D::fText3DL
private

List of texts.

Definition at line 45 of file View3D.h.

Referenced by AddText(), Clear(), and Draw().


The documentation for this class was generated from the following files: