Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JGeoVolume Class Reference
Inheritance diagram for JGeoVolume:

Public Member Functions

 JGeoVolume (const char *name, const TGeoShape *shape, const TGeoMedium *med=0)
 Constructor.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Mouse events.
 
void AddText (const std::string &text)
 Add text to buffer.
 

Protected Attributes

std::vector< std::string > buffer
 

Detailed Description

Definition at line 41 of file JDrawModule3D.cc.

Constructor & Destructor Documentation

◆ JGeoVolume()

JGeoVolume::JGeoVolume ( const char * name,
const TGeoShape * shape,
const TGeoMedium * med = 0 )
inline

Constructor.

Parameters
namename
shapeshape
medmedium

Definition at line 52 of file JDrawModule3D.cc.

54 :
55 TGeoVolume(name, shape, med)
56 {}

Member Function Documentation

◆ ExecuteEvent()

virtual void JGeoVolume::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
inlinevirtual

Mouse events.

Parameters
eventevent
pxx-position of mouse
pyy-position of mouse

Definition at line 66 of file JDrawModule3D.cc.

67 {
68 if (event == kMouseEnter) {
69
70 for (std::vector<std::string>::const_iterator i = buffer.begin(); i != buffer.end(); ++i)
71 p1->AddText(i->c_str());
72
73 p1->Draw();
74 c1->Update();
75
76 } else if (event == kMouseLeave) {
77
78 p1->Clear();
79 p1->Draw();
80 c1->Update();
81
82 } else {
83
84 TGeoVolume::ExecuteEvent(event, px, py);
85 }
86 }
TCanvas * c1
Global variables to handle mouse events.
TPaveText * p1
std::vector< std::string > buffer

◆ AddText()

void JGeoVolume::AddText ( const std::string & text)
inline

Add text to buffer.

Parameters
texttext

Definition at line 94 of file JDrawModule3D.cc.

95 {
96 buffer.push_back(text);
97 }
char text[TEXT_SIZE]
Definition elog.cc:72

Member Data Documentation

◆ buffer

std::vector<std::string> JGeoVolume::buffer
protected

Definition at line 100 of file JDrawModule3D.cc.


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