18 #include "Geant4/G4Run.hh" 19 #include "Geant4/G4Timer.hh" 20 #include "Geant4/G4UImanager.hh" 28 ArtG4RunManager::ArtG4RunManager()
47 SetRunIDCounter(runNumber);
49 bool cond = ConfirmBeamOnCondition();
66 msg_ =
"/control/execute ";
72 numberOfEventToBeProcessed = 1;
73 ConstructScoringWorlds();
85 currentEvent = GenerateEvent(eventNumber);
86 eventManager->ProcessOneEvent(currentEvent);
87 AnalyzeEvent(currentEvent);
91 G4UImanager::GetUIpointer()->ApplyCommand(
msg_);
101 if (verboseLevel > 0) {
103 G4int oldPrecision = G4cout.precision(3);
104 std::ios::fmtflags oldFlags = G4cout.flags();
105 G4cout.setf(std::ios::fixed, std::ios::floatfield);
107 G4cout <<
"TimeEvent> " << eventNumber <<
" " 108 << G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID() <<
" " 109 << timer->GetRealElapsed() <<
" " 110 << timer->GetUserElapsed() + timer->GetSystemElapsed() <<
" " 113 G4cout.setf(oldFlags);
114 G4cout.precision(oldPrecision);
122 StackPreviousEvent(currentEvent);
134 if (verboseLevel > 0) {
136 G4cout <<
"G4Run terminated." << G4endl;
137 G4cout <<
"G4Run Summary" << G4endl;
139 G4cout <<
" G4Run Aborted after " <<
nProcessed_ <<
" events processed." << G4endl;
141 G4cout <<
" Number of events processed : " <<
nProcessed_ << G4endl;
146 G4int oldPrecision = G4cout.precision(3);
147 std::ios::fmtflags oldFlags = G4cout.flags();
148 G4cout.setf(std::ios::fixed, std::ios::floatfield);
150 G4cout <<
"TimeReport> Time report complete in ";
152 G4cout <<
" seconds" << G4endl;
154 G4cout.setf(oldFlags);
155 G4cout.precision(oldPrecision);
virtual void BeamOnDoOneEvent(int eventNumber)
virtual void BeamOnBeginRun(unsigned int runNumber, const char *macroFile=0, G4int n_select=-1)
virtual ~ArtG4RunManager()
virtual void BeamOnEndEvent()
virtual void BeamOnEndRun()