Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: ExN06RunAction.cc,v 1.8 2003/01/23 15:34:32 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// Make this appear first!
|
||||
#include "G4Timer.hh"
|
||||
@@ -30,30 +35,47 @@
|
||||
#include "G4ios.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ExN06RunAction::ExN06RunAction()
|
||||
{
|
||||
timer = new G4Timer;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ExN06RunAction::~ExN06RunAction()
|
||||
{
|
||||
delete timer;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ExN06RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
UI->ApplyCommand("/event/verbose 1");
|
||||
//UI->ApplyCommand("/tracking/verbose 1");
|
||||
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
timer->Start();
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ExN06RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
|
||||
}
|
||||
|
||||
timer->Stop();
|
||||
G4cout << "number of event = " << aRun->GetNumberOfEvent()
|
||||
<< " " << *timer << G4endl;
|
||||
<< " " << *timer << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user