- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/purging_magnet/src/PurgMagEventAction.cc
r1230 r1337 33 33 // ******************************** 34 34 // 35 // $Id: PurgMagEventAction.cc,v 1. 4 2006/06/29 16:06:13 gunterExp $36 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $35 // $Id: PurgMagEventAction.cc,v 1.6 2010/06/07 05:18:38 perl Exp $ 36 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 37 37 // 38 38 … … 45 45 #include "G4Event.hh" 46 46 #include "G4EventManager.hh" 47 #include "G4TrajectoryContainer.hh"48 #include "G4Trajectory.hh"49 #include "G4VVisManager.hh"50 #include "Randomize.hh"51 47 52 48 #ifdef G4ANALYSIS_USE … … 76 72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 77 73 78 void PurgMagEventAction::EndOfEventAction(const G4Event* evt)74 void PurgMagEventAction::EndOfEventAction(const G4Event*) 79 75 { 80 if (G4VVisManager::GetConcreteInstance())81 {82 G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();83 G4int n_trajectories = 0;84 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();85 86 for (G4int i=0; i<n_trajectories; i++)87 {88 //G4cout<< "Iteration" << i <<G4endl;89 G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);90 if (drawFlag == "all")91 {92 trj->DrawTrajectory(50);93 }94 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))95 {96 trj->DrawTrajectory(50);97 }98 }99 //save rndm status100 if (PurgMagRun->GetRndmFreq() == 2)101 {102 CLHEP::HepRandom::saveEngineStatus("endOfEvent.rndm");103 G4int evtNb = evt->GetEventID();104 if (evtNb%printModulo == 0)105 {106 G4cout << "\n---> End of Event: " << evtNb << G4endl;107 CLHEP::HepRandom::showEngineStatus();108 }109 }110 }111 76 } 112 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracChangeset
for help on using the changeset viewer.