![]() |
![]() |
#include "VisGeant4/VisG4Transients/interface/VisG4TrajectoriesTwig.h"
#include "VisGeant4/VisG4Transients/interface/VisSoG4Trajectories.h"
#include "VisGeant4/VisG4Transients/interface/xtypeinfo.h"
#include "Iguana/GLModels/interface/IgCommon3DReps.h"
#include "Iguana/GLModels/interface/Ig3DModel.h"
#include "Iguana/GLModels/interface/Ig3DRep.h"
#include "Iguana/GLModels/interface/xtypeinfo.h"
#include "Iguana/Models/interface/IgTextModel.h"
#include "Iguana/Models/interface/IgSimpleTextRep.h"
#include "Iguana/Models/interface/xtypeinfo.h"
#include "Iguana/Framework/interface/IgRepContext.h"
#include "Iguana/Framework/interface/IgRepSet.h"
#include "Iguana/Framework/interface/IgBrowserMethods.h"
#include "Iguana/Framework/interface/xtypeinfo.h"
#include <G4RunManager.hh>
#include <G4Trajectory.hh>
#include <sstream>
Go to the source code of this file.
Functions | |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4TrajectoriesTwig *, IgTextRep *rep, unsigned)) | |
MMM_DEFUN_FUNC (void, IgBrowserMethods::, doUpdate,(VisG4TrajectoriesTwig *twig, Ig3DRep *rep, unsigned mask)) |
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4TrajectoriesTwig *, IgTextRep *rep, unsigned) | ||||
) |
Definition at line 88 of file VisG4TrajectoriesTwig.cc.
References event(), i, j, IgTextRep::setText(), and t.
00090 { 00091 // FIXME: This should be linked to some general notification 00092 // whenever trajectories list changes, and updated accordingly! 00093 std::ostringstream text; 00094 00095 text << "<table width='100%'><tr><td>Name</td><td>" 00096 << "Trajectories</td></tr>\n"; 00097 00098 if (G4RunManager *runManager = G4RunManager::GetRunManager ()) 00099 if (const G4Event *event = runManager->GetCurrentEvent ()) 00100 if (G4TrajectoryContainer *trajectories 00101 = event->GetTrajectoryContainer ()) 00102 { 00103 for (int i = 0; i < trajectories->entries (); ++i) 00104 { 00105 text << "<tr><td> Trajectory</td><td>#" 00106 << i << "</td></tr>\n"; 00107 00108 G4Trajectory *t = static_cast<G4Trajectory *> 00109 ((*trajectories) [i]); 00110 00111 for (int j = 0; j < t->GetPointEntries (); ++j) 00112 text << "<tr><td> Point #" 00113 << j << "</td><td>" 00114 << (static_cast<G4TrajectoryPoint *> 00115 (t->GetPoint (j))->GetPosition ()) 00116 << "</td></tr>\n"; 00117 } 00118 } 00119 else 00120 text << "<tr><td>(No trajectories)</td><td> </td></tr>"; 00121 else 00122 text << "<tr><td>(No event)</td><td> </td></tr>"; 00123 else 00124 text << "<tr><td>(No run manager)</td><td> </td></tr>"; 00125 00126 text << "</table>" << '\0'; 00127 00128 rep->setText (text.str ()); 00129 }
MMM_DEFUN_FUNC | ( | void | , | |
IgBrowserMethods:: | , | |||
doUpdate | , | |||
(VisG4TrajectoriesTwig *twig, Ig3DRep *rep, unsigned mask) | ||||
) |
Definition at line 76 of file VisG4TrajectoriesTwig.cc.
References VisSoG4Trajectories::ALL, VisSoG4Trajectories::flush, Ig3DBaseRep::node(), VisSoG4Trajectories::on, and IgTwig::visible().
00078 { 00079 // Let base class implementation handle the basics. 00080 mmm_doUpdate ((IgTwig *) twig, rep, mask); 00081 00082 VisSoG4Trajectories *repnode = new VisSoG4Trajectories; 00083 repnode->on = twig->visible (); 00084 repnode->flush = VisSoG4Trajectories::ALL; 00085 rep->node ()->addChild (repnode); 00086 }