- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm2/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 3 2006/06/29 16:50:24 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.5 2010/06/07 05:40:46 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 35 35 #include "RunAction.hh" 36 36 #include "G4Event.hh" 37 #include "G4TrajectoryContainer.hh"38 #include "G4Trajectory.hh"39 #include "G4VVisManager.hh"40 37 #include "G4UnitsTable.hh" 41 38 … … 71 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 72 69 73 void EventAction::EndOfEventAction(const G4Event* evt)70 void EventAction::EndOfEventAction(const G4Event*) 74 71 { 75 72 Run->fillPerEvent(); 76 77 if (G4VVisManager::GetConcreteInstance())78 {79 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();80 G4int n_trajectories = 0;81 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();82 for (G4int i=0; i<n_trajectories; i++)83 { G4Trajectory* trj = (G4Trajectory *)84 ((*(evt->GetTrajectoryContainer()))[i]);85 if (drawFlag == "all") trj->DrawTrajectory(50);86 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))87 trj->DrawTrajectory(50);88 }89 }90 73 } 91 74
Note: See TracChangeset
for help on using the changeset viewer.