#include <BesMarker2D.h>
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 |
Private Attributes | |
TString | fName |
TString | fTitle |
Float_t | fWCX |
Float_t | fWCY |
Float_t | fWCZ |
Int_t | fSizeMultiple |
Definition at line 13 of file BesMarker2D.h.
BesMarker2D::BesMarker2D | ( | ) |
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.
References fName, fTitle, fWCX, fWCY, fWCZ, SetMarkerSize(), and SetMarkerSizeMultiple().
00028 : TMarker(0,0,3) { 00029 // 00030 // BesMarker2D normal constructor 00031 if ( gDebug ) cout << "BesMarker2D normal ctor called" << endl; 00032 fName = name; 00033 fTitle = title; 00034 fWCX = x; 00035 fWCY = y; 00036 fWCZ = z; 00037 this->SetMarkerColor(kGreen); 00038 this->SetMarkerSize(1); 00039 this->SetMarkerSizeMultiple(4); 00040 TAttMarker::Modify(); 00041 00042 }
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.
References fName, fTitle, fWCX, fWCY, fWCZ, SetMarkerSize(), and SetMarkerSizeMultiple().
00046 : TMarker(0,0,3) { 00047 // 00048 // BesMarker2D normal constructor 00049 if ( gDebug ) cout << "BesMarker2D normal ctor called" << endl; 00050 fName = name; 00051 fTitle = title; 00052 fWCX = (Float_t)x; 00053 fWCY = (Float_t)y; 00054 fWCZ = (Float_t)z; 00055 this->SetMarkerColor(kGreen); 00056 this->SetMarkerSize(1); 00057 this->SetMarkerSizeMultiple(4); // default 00058 TAttMarker::Modify(); 00059 00060 }
BesMarker2D::~BesMarker2D | ( | ) | [virtual] |
Definition at line 130 of file BesMarker2D.cxx.
00130 { 00131 // 00132 // BesMarker2D default destructor 00133 if ( gDebug ) cout << "BesMarker2D default dtor called" << endl; 00134 }
void BesMarker2D::Draw | ( | Option_t * | option = "" |
) | [virtual] |
void BesMarker2D::GetCenterPixel | ( | Int_t & | px, | |
Int_t & | py | |||
) | [inline, virtual] |
Definition at line 81 of file BesMarker2D.cxx.
Referenced by BesGeoTrack::DistancetoPrimitive().
00081 { 00082 00083 if (TestBit(kMarkerNDC)) { 00084 px = gPad->UtoPixel(fX); 00085 py = gPad->VtoPixel(fY); 00086 } else { 00087 px = gPad->XtoAbsPixel(gPad->XtoPad(fX)); 00088 py = gPad->YtoAbsPixel(gPad->YtoPad(fY)); 00089 } 00090 }
virtual Int_t BesMarker2D::GetMarkerSizeMultiple | ( | ) | [inline, virtual] |
Definition at line 35 of file BesMarker2D.h.
References fSizeMultiple.
Referenced by Paint().
00035 { return fSizeMultiple; }
virtual const char* BesMarker2D::GetName | ( | ) | const [inline, virtual] |
char * BesMarker2D::GetObjectInfo | ( | Int_t | px, | |
Int_t | py | |||
) | const [virtual] |
Definition at line 138 of file BesMarker2D.cxx.
References BesView::GetObjectInfo().
00138 { 00139 00140 BesView *view = (BesView*)gPad->GetView(); 00141 if (view) return view->GetObjectInfo(px, py); 00142 else return TObject::GetObjectInfo(px, py); 00143 00144 /* // 00145 // Returns string containing info about the object at position (px,py). 00146 TString info("Info: x="); 00147 info += px; 00148 info += (", y="); 00149 info += py; 00150 return (char*)(info.Data()); 00151 */ 00152 }
virtual const char* BesMarker2D::GetTitle | ( | ) | const [inline, virtual] |
virtual Float_t BesMarker2D::GetWCX | ( | ) | [inline, virtual] |
virtual Float_t BesMarker2D::GetWCY | ( | ) | [inline, virtual] |
virtual Float_t BesMarker2D::GetWCZ | ( | ) | [inline, virtual] |
void BesMarker2D::Paint | ( | Option_t * | option = "" |
) | [virtual] |
Definition at line 102 of file BesMarker2D.cxx.
References fWCX, fWCY, fWCZ, BesView::GetMarkerSize(), GetMarkerSizeMultiple(), SetMarkerSize(), and BesView::WCtoNDC().
Referenced by Mdc2DWire::Paint(), and BesGeoTrack::Paint().
00102 { 00103 // 00104 // BesMarker2D paint function 00105 00106 // get View 00107 BesView *view = (BesView*)gPad->GetView(); 00108 00109 // get Marker Size from ZView 00110 this->SetMarkerSize(view->GetMarkerSize() * this->GetMarkerSizeMultiple()); 00111 //TAttMarker::Modify(); 00112 00113 // transform to NDC 00114 Float_t WC[3],NDC[3]; 00115 WC[0]=fWCX; 00116 WC[1]=fWCY; 00117 WC[2]=fWCZ; 00118 view->WCtoNDC(WC,NDC); 00119 this->SetX(NDC[0]); 00120 this->SetY(NDC[1]); 00121 00122 // call TMarker::Paint 00123 00124 TMarker::Paint(option); 00125 00126 }
virtual void BesMarker2D::SetMarkerSizeMultiple | ( | Int_t | input | ) | [inline, virtual] |
Definition at line 34 of file BesMarker2D.h.
References fSizeMultiple.
Referenced by BesMarker2D(), Mdc2DWire::Paint(), and BesGeoTrack::SetMarker().
00034 { fSizeMultiple = input; }
void BesMarker2D::SetParameter | ( | const char * | name, | |
const char * | title, | |||
Float_t | x, | |||
Float_t | y, | |||
Float_t | z | |||
) | [virtual] |
virtual void BesMarker2D::SetWCX | ( | Float_t | input | ) | [inline, virtual] |
virtual void BesMarker2D::SetWCY | ( | Float_t | input | ) | [inline, virtual] |
virtual void BesMarker2D::SetWCZ | ( | Float_t | input | ) | [inline, virtual] |
TString BesMarker2D::fName [private] |
Definition at line 16 of file BesMarker2D.h.
Referenced by BesMarker2D(), GetName(), and SetParameter().
Int_t BesMarker2D::fSizeMultiple [private] |
Definition at line 21 of file BesMarker2D.h.
Referenced by GetMarkerSizeMultiple(), and SetMarkerSizeMultiple().
TString BesMarker2D::fTitle [private] |
Definition at line 17 of file BesMarker2D.h.
Referenced by BesMarker2D(), GetTitle(), and SetParameter().
Float_t BesMarker2D::fWCX [private] |
Definition at line 18 of file BesMarker2D.h.
Referenced by BesMarker2D(), GetWCX(), Paint(), SetParameter(), and SetWCX().
Float_t BesMarker2D::fWCY [private] |
Definition at line 19 of file BesMarker2D.h.
Referenced by BesMarker2D(), GetWCY(), Paint(), SetParameter(), and SetWCY().
Float_t BesMarker2D::fWCZ [private] |
Definition at line 20 of file BesMarker2D.h.
Referenced by BesMarker2D(), GetWCZ(), Paint(), SetParameter(), and SetWCZ().