Last change
on this file since 583 was
286,
checked in by campagne, 18 years ago
|
ELYSE sauvegarde provisoire (JEC)
|
File size:
998 bytes
|
Line | |
---|
1 | #include "ELYSE/RunAction.hh" |
---|
2 | |
---|
3 | //Geant4 |
---|
4 | #include "G4Run.hh" |
---|
5 | #include "G4Timer.hh" |
---|
6 | #include "G4ios.hh" |
---|
7 | |
---|
8 | //ELYSE |
---|
9 | #include "ELYSE/RunActionMessenger.hh" |
---|
10 | |
---|
11 | ELYSE::RunAction::RunAction() { |
---|
12 | // Messenger to allow IO options |
---|
13 | messenger = new RunActionMessenger(this); |
---|
14 | |
---|
15 | //Timer |
---|
16 | timer = new G4Timer(); |
---|
17 | |
---|
18 | }//Ctor |
---|
19 | |
---|
20 | //---------------------------------------------------------------------------------- |
---|
21 | |
---|
22 | ELYSE::RunAction::~RunAction() { |
---|
23 | delete timer; |
---|
24 | |
---|
25 | }//Dtor |
---|
26 | |
---|
27 | //---------------------------------------------------------------------------------- |
---|
28 | void ELYSE::RunAction::BeginOfRunAction(const G4Run* aRun) { |
---|
29 | G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl; |
---|
30 | timer->Start(); |
---|
31 | }//BeginOfRunAction |
---|
32 | |
---|
33 | //---------------------------------------------------------------------------------- |
---|
34 | |
---|
35 | void ELYSE::RunAction::EndOfRunAction(const G4Run* aRun) { |
---|
36 | timer->Stop(); |
---|
37 | G4cout << "Total number of events = " << aRun->GetNumberOfEvent() |
---|
38 | << " " << *timer << G4endl; |
---|
39 | }//EndOfRunAction |
---|
40 | |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.