- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm5/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 7 2009/03/06 18:04:23 maireExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.9 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...... … … 37 37 38 38 #include "G4Event.hh" 39 #include "G4TrajectoryContainer.hh"40 #include "G4Trajectory.hh"41 #include "G4VVisManager.hh"42 39 43 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 76 73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 77 74 78 void EventAction::EndOfEventAction(const G4Event* evt)75 void EventAction::EndOfEventAction(const G4Event*) 79 76 { 80 77 runaction->AddEnergy(EnergyDeposit); … … 89 86 90 87 histoManager->FillHisto(1,EnergyDeposit); 91 92 if (G4VVisManager::GetConcreteInstance())93 {94 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();95 G4int n_trajectories = 0;96 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();97 for (G4int i=0; i<n_trajectories; i++)98 { G4Trajectory* trj = (G4Trajectory*)99 ((*(evt->GetTrajectoryContainer()))[i]);100 if (drawFlag == "all") trj->DrawTrajectory(1000);101 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))102 trj->DrawTrajectory(1000);103 else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))104 trj->DrawTrajectory(1000);105 106 }107 }108 88 } 109 89
Note: See TracChangeset
for help on using the changeset viewer.