/////////////////////////////////////////////////////////////////////////////// // // // Interface Class to the Geant3.21 MonteCarlo // // Author : Rene Brun 08/12/98 // // // // A TPaveTree is a TPaveLabel specialized to draw Geant GDtree // // // // When a TPaveTree object is drawn in a canvas, one can: // // - double click to draw the spec // // - select pop-up item DrawTree to draw its tree // // - select pop-up item DrawTreeParent to draw its parent tree // // // //Begin_Html /* */ //End_Html // // /////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include "TPaveTree.h" #include "TGeant3.h" ClassImp(TPaveTree) //_____________________________________________________________________________ TPaveTree::TPaveTree(): TPaveLabel() { // // Default Constructor // } //_____________________________________________________________________________ TPaveTree::TPaveTree(Coord_t x1, Coord_t y1,Coord_t x2, Coord_t y2, const Text_t *label) :TPaveLabel(x1,y1,x2,y2,label,"br") { // // TPaveTree normal constructor // SetName(label); } //_____________________________________________________________________________ TPaveTree::~TPaveTree() { // // Standard Destructor // } //_____________________________________________________________________________ TPaveTree::TPaveTree(const TPaveTree &PaveTree) { // // Copy Constructor // ((TPaveTree&)PaveTree).Copy(*this); } //_____________________________________________________________________________ void TPaveTree::Copy(TObject &obj) { // // Copy this PaveTree to PaveTree // TPaveLabel::Copy(obj); } //_____________________________________________________________________________ void TPaveTree::DrawSpec() { // // Draw specs of the volume in this TPaveTree // AliMC* pMC = AliMC::GetMC(); pMC->DrawOneSpec(GetLabel()); } //_____________________________________________________________________________ void TPaveTree::DrawTree(Int_t levmax, Int_t isel) { // // Draw tree of the volume in this TPaveTree // TGeant3 *geant3=(TGeant3*)AliMC::GetMC(); geant3->Gdtree(GetLabel(),levmax,isel); } //_____________________________________________________________________________ void TPaveTree::DrawTreeParent(Int_t levmax, Int_t isel) { // // Draw parent tree of the volume in this TPaveTree // TGeant3 *geant3=(TGeant3*)AliMC::GetMC(); geant3->GdtreeParent(GetLabel(),levmax,isel); } //_____________________________________________________________________________ void TPaveTree::ExecuteEvent(Int_t event, Int_t px, Int_t py) { // // Process mouse events. // Invokes TPabeLabel::ExecuteEvent. In case of a double click // draw specs of volume corresponding to this TPaveTree // AliMC* pMC = AliMC::GetMC(); TPaveLabel::ExecuteEvent(event,px,py); if (event == kButton1Double) { //printf("TPaveTree::ExecuteEvent\n"); gPad->SetCursor(kWatch); pMC->DrawOneSpec(GetLabel()); } } //_____________________________________________________________________________ void TPaveTree::SavePrimitive(ofstream &out, Option_t *) { // // Save primitive as a C++ statement(s) on output stream out // char quote = '"'; out<<" "<ClassSaved(TPaveTree::Class())) { out<<" "; } else { out<<" TPaveTree *"; } out<<"pvar = new TPaveTree("<Draw();"<