BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMarker2D Class Reference

#include <BesMarker2D.h>

+ Inheritance diagram for BesMarker2D:

Public Member Functions

 BesMarker2D ()
 
 BesMarker2D (const char *name, const char *title, Float_t x, Float_t y, Float_t z)
 
 BesMarker2D (const char *name, const char *title, Double_t x, Double_t y, Double_t z)
 
virtual ~BesMarker2D ()
 
virtual void Draw (Option_t *option="")
 
virtual void Paint (Option_t *option="")
 
virtual void GetCenterPixel (Int_t &px, Int_t &py)
 
virtual void SetMarkerSizeMultiple (Int_t input)
 
virtual Int_t GetMarkerSizeMultiple ()
 
virtual const char * GetName () const
 
virtual const char * GetTitle () const
 
virtual Float_t GetWCX ()
 
virtual Float_t GetWCY ()
 
virtual Float_t GetWCZ ()
 
virtual void SetWCX (Float_t input)
 
virtual void SetWCY (Float_t input)
 
virtual void SetWCZ (Float_t input)
 
virtual void SetParameter (const char *name, const char *title, Float_t x, Float_t y, Float_t z)
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
 BesMarker2D ()
 
 BesMarker2D (const char *name, const char *title, Float_t x, Float_t y, Float_t z)
 
 BesMarker2D (const char *name, const char *title, Double_t x, Double_t y, Double_t z)
 
virtual ~BesMarker2D ()
 
virtual void Draw (Option_t *option="")
 
virtual void Paint (Option_t *option="")
 
virtual void GetCenterPixel (Int_t &px, Int_t &py)
 
virtual void SetMarkerSizeMultiple (Int_t input)
 
virtual Int_t GetMarkerSizeMultiple ()
 
virtual const char * GetName () const
 
virtual const char * GetTitle () const
 
virtual Float_t GetWCX ()
 
virtual Float_t GetWCY ()
 
virtual Float_t GetWCZ ()
 
virtual void SetWCX (Float_t input)
 
virtual void SetWCY (Float_t input)
 
virtual void SetWCZ (Float_t input)
 
virtual void SetParameter (const char *name, const char *title, Float_t x, Float_t y, Float_t z)
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 

Detailed Description

Constructor & Destructor Documentation

◆ BesMarker2D() [1/6]

BesMarker2D::BesMarker2D ( )

◆ BesMarker2D() [2/6]

BesMarker2D::BesMarker2D ( const char *  name,
const char *  title,
Float_t  x,
Float_t  y,
Float_t  z 
)

Definition at line 28 of file BesMarker2D.cxx.

28 : TMarker(0,0,3) {
29 //
30 // BesMarker2D normal constructor
31 if ( gDebug ) cout << "BesMarker2D normal ctor called" << endl;
32 fName = name;
33 fTitle = title;
34 fWCX = x;
35 fWCY = y;
36 fWCZ = z;
37 this->SetMarkerColor(kGreen);
38 this->SetMarkerSize(1);
39 this->SetMarkerSizeMultiple(4);
40 TAttMarker::Modify();
41
42}
Double_t x[10]
titledef title[20]
gr1 SetMarkerColor(1)

◆ BesMarker2D() [3/6]

BesMarker2D::BesMarker2D ( const char *  name,
const char *  title,
Double_t  x,
Double_t  y,
Double_t  z 
)

Definition at line 46 of file BesMarker2D.cxx.

46 : TMarker(0,0,3) {
47 //
48 // BesMarker2D normal constructor
49 if ( gDebug ) cout << "BesMarker2D normal ctor called" << endl;
50 fName = name;
51 fTitle = title;
52 fWCX = (Float_t)x;
53 fWCY = (Float_t)y;
54 fWCZ = (Float_t)z;
55 this->SetMarkerColor(kGreen);
56 this->SetMarkerSize(1);
57 this->SetMarkerSizeMultiple(4); // default
58 TAttMarker::Modify();
59
60}

◆ ~BesMarker2D() [1/2]

BesMarker2D::~BesMarker2D ( )
virtual

Definition at line 130 of file BesMarker2D.cxx.

130 {
131 //
132 // BesMarker2D default destructor
133 if ( gDebug ) cout << "BesMarker2D default dtor called" << endl;
134}

◆ BesMarker2D() [4/6]

BesMarker2D::BesMarker2D ( )

◆ BesMarker2D() [5/6]

BesMarker2D::BesMarker2D ( const char *  name,
const char *  title,
Float_t  x,
Float_t  y,
Float_t  z 
)

◆ BesMarker2D() [6/6]

BesMarker2D::BesMarker2D ( const char *  name,
const char *  title,
Double_t  x,
Double_t  y,
Double_t  z 
)

◆ ~BesMarker2D() [2/2]

virtual BesMarker2D::~BesMarker2D ( )
virtual

Member Function Documentation

◆ Draw() [1/2]

void BesMarker2D::Draw ( Option_t *  option = "")
virtual

Definition at line 94 of file BesMarker2D.cxx.

94 {
95 //
96 // ZMarker3D draw function
97 AppendPad(option);
98}

◆ Draw() [2/2]

virtual void BesMarker2D::Draw ( Option_t *  option = "")
virtual

◆ GetCenterPixel() [1/2]

void BesMarker2D::GetCenterPixel ( Int_t &  px,
Int_t &  py 
)
inlinevirtual

Definition at line 81 of file BesMarker2D.cxx.

81 {
82
83 if (TestBit(kMarkerNDC)) {
84 px = gPad->UtoPixel(fX);
85 py = gPad->VtoPixel(fY);
86 } else {
87 px = gPad->XtoAbsPixel(gPad->XtoPad(fX));
88 py = gPad->YtoAbsPixel(gPad->YtoPad(fY));
89 }
90}

Referenced by BesGeoTrack::DistancetoPrimitive().

◆ GetCenterPixel() [2/2]

virtual void BesMarker2D::GetCenterPixel ( Int_t &  px,
Int_t &  py 
)
inlinevirtual

◆ GetMarkerSizeMultiple() [1/2]

virtual Int_t BesMarker2D::GetMarkerSizeMultiple ( )
inlinevirtual

Definition at line 35 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

35{ return fSizeMultiple; }

◆ GetMarkerSizeMultiple() [2/2]

virtual Int_t BesMarker2D::GetMarkerSizeMultiple ( )
inlinevirtual

Definition at line 35 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

35{ return fSizeMultiple; }

◆ GetName() [1/2]

virtual const char * BesMarker2D::GetName ( ) const
inlinevirtual

Definition at line 37 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

37{return fName.Data();}

◆ GetName() [2/2]

virtual const char * BesMarker2D::GetName ( ) const
inlinevirtual

Definition at line 37 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

37{return fName.Data();}

◆ GetObjectInfo() [1/2]

char * BesMarker2D::GetObjectInfo ( Int_t  px,
Int_t  py 
) const
virtual

Definition at line 138 of file BesMarker2D.cxx.

138 {
139
140 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
141 if (view) return view->GetObjectInfo(px, py);
142 else return TObject::GetObjectInfo(px, py);
143
144 /* //
145 // Returns string containing info about the object at position (px,py).
146 TString info("Info: x=");
147 info += px;
148 info += (", y=");
149 info += py;
150 return (char*)(info.Data());
151 */
152}
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Definition: BesView.cxx:869

◆ GetObjectInfo() [2/2]

virtual char * BesMarker2D::GetObjectInfo ( Int_t  px,
Int_t  py 
) const
virtual

◆ GetTitle() [1/2]

virtual const char * BesMarker2D::GetTitle ( ) const
inlinevirtual

Definition at line 38 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

38{return fTitle.Data();}

◆ GetTitle() [2/2]

virtual const char * BesMarker2D::GetTitle ( ) const
inlinevirtual

Definition at line 38 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

38{return fTitle.Data();}

◆ GetWCX() [1/2]

virtual Float_t BesMarker2D::GetWCX ( )
inlinevirtual

Definition at line 40 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

40{ return fWCX; }

◆ GetWCX() [2/2]

virtual Float_t BesMarker2D::GetWCX ( )
inlinevirtual

Definition at line 40 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

40{ return fWCX; }

◆ GetWCY() [1/2]

virtual Float_t BesMarker2D::GetWCY ( )
inlinevirtual

Definition at line 41 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

41{ return fWCY; }

◆ GetWCY() [2/2]

virtual Float_t BesMarker2D::GetWCY ( )
inlinevirtual

Definition at line 41 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

41{ return fWCY; }

◆ GetWCZ() [1/2]

virtual Float_t BesMarker2D::GetWCZ ( )
inlinevirtual

Definition at line 42 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

42{ return fWCZ; }

◆ GetWCZ() [2/2]

virtual Float_t BesMarker2D::GetWCZ ( )
inlinevirtual

Definition at line 42 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

42{ return fWCZ; }

◆ Paint() [1/2]

void BesMarker2D::Paint ( Option_t *  option = "")
virtual

Definition at line 102 of file BesMarker2D.cxx.

102 {
103 //
104 // BesMarker2D paint function
105
106 // get View
107 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
108
109 // get Marker Size from ZView
110 this->SetMarkerSize(view->GetMarkerSize() * this->GetMarkerSizeMultiple());
111 //TAttMarker::Modify();
112
113 // transform to NDC
114 Float_t WC[3],NDC[3];
115 WC[0]=fWCX;
116 WC[1]=fWCY;
117 WC[2]=fWCZ;
118 view->WCtoNDC(WC,NDC);
119 this->SetX(NDC[0]);
120 this->SetY(NDC[1]);
121
122 // call TMarker::Paint
123
124 TMarker::Paint(option);
125
126}
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)
Definition: BesView.cxx:728

Referenced by BesGeoTrack::Paint(), and Mdc2DWire::Paint().

◆ Paint() [2/2]

virtual void BesMarker2D::Paint ( Option_t *  option = "")
virtual

◆ SetMarkerSizeMultiple() [1/2]

virtual void BesMarker2D::SetMarkerSizeMultiple ( Int_t  input)
inlinevirtual

Definition at line 34 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

34{ fSizeMultiple = input; }

Referenced by BesMarker2D(), Mdc2DWire::Paint(), and BesGeoTrack::SetMarker().

◆ SetMarkerSizeMultiple() [2/2]

virtual void BesMarker2D::SetMarkerSizeMultiple ( Int_t  input)
inlinevirtual

Definition at line 34 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

34{ fSizeMultiple = input; }

◆ SetParameter() [1/2]

void BesMarker2D::SetParameter ( const char *  name,
const char *  title,
Float_t  x,
Float_t  y,
Float_t  z 
)
virtual

Definition at line 156 of file BesMarker2D.cxx.

156 {
157 //
158 // set parameters
159 fName = name;
160 fTitle = title;
161 fWCX = x;
162 fWCY = y;
163 fWCZ = z;
164}

◆ SetParameter() [2/2]

virtual void BesMarker2D::SetParameter ( const char *  name,
const char *  title,
Float_t  x,
Float_t  y,
Float_t  z 
)
virtual

◆ SetWCX() [1/2]

virtual void BesMarker2D::SetWCX ( Float_t  input)
inlinevirtual

Definition at line 44 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

44{ fWCX = input; }

Referenced by Mdc2DWire::Paint().

◆ SetWCX() [2/2]

virtual void BesMarker2D::SetWCX ( Float_t  input)
inlinevirtual

Definition at line 44 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

44{ fWCX = input; }

◆ SetWCY() [1/2]

virtual void BesMarker2D::SetWCY ( Float_t  input)
inlinevirtual

Definition at line 45 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

45{ fWCY = input; }

Referenced by Mdc2DWire::Paint().

◆ SetWCY() [2/2]

virtual void BesMarker2D::SetWCY ( Float_t  input)
inlinevirtual

Definition at line 45 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

45{ fWCY = input; }

◆ SetWCZ() [1/2]

virtual void BesMarker2D::SetWCZ ( Float_t  input)
inlinevirtual

Definition at line 46 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesMarker2D.h.

46{ fWCZ = input; }

Referenced by Mdc2DWire::Paint().

◆ SetWCZ() [2/2]

virtual void BesMarker2D::SetWCZ ( Float_t  input)
inlinevirtual

Definition at line 46 of file InstallArea/include/BesVisLib/BesVisLib/BesMarker2D.h.

46{ fWCZ = input; }

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