Jpp master_rocky-44-g75b7c4f75
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 40 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 51 of file JDrawModule3D.cc.

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

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 65 of file JDrawModule3D.cc.

66 {
67 if (event == kMouseEnter) {
68
69 for (std::vector<std::string>::const_iterator i = buffer.begin(); i != buffer.end(); ++i)
70 p1->AddText(i->c_str());
71
72 p1->Draw();
73 c1->Update();
74
75 } else if (event == kMouseLeave) {
76
77 p1->Clear();
78 p1->Draw();
79 c1->Update();
80
81 } else {
82
83 TGeoVolume::ExecuteEvent(event, px, py);
84 }
85 }
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 93 of file JDrawModule3D.cc.

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

Member Data Documentation

◆ buffer

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

Definition at line 99 of file JDrawModule3D.cc.


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