/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Log$ Revision 1.5 1999/09/29 09:24:31 fca Introduction of the Copyright and cvs Log */ /////////////////////////////////////////////////////////////////////////////// // // // 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 // } //_____________________________________________________________________________ void TPaveTree::DrawSpec() { // // Draw specs of the volume in this TPaveTree // gMC->DrawOneSpec(GetLabel()); } //_____________________________________________________________________________ void TPaveTree::DrawTree(Int_t levmax, Int_t isel) { // // Draw tree of the volume in this TPaveTree // ((TGeant3*)gMC)->Gdtree(GetLabel(),levmax,isel); } //_____________________________________________________________________________ void TPaveTree::DrawTreeParent(Int_t levmax, Int_t isel) { // // Draw parent tree of the volume in this TPaveTree // ((TGeant3*)gMC)->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 // TPaveLabel::ExecuteEvent(event,px,py); if (event == kButton1Double) { //printf("TPaveTree::ExecuteEvent\n"); gPad->SetCursor(kWatch); gMC->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();"<