-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//************************************************** | ||
// \file ATLLArBarrelRunAction.hh | ||
// \brief: definition of ATLLArBarrelRunAction class | ||
// \author: Lorenzo Pezzotti (CERN EP-SFT-sim) | ||
// @lopezzot | ||
// \start date: 31 October 2022 | ||
//************************************************** | ||
|
||
#ifndef ATLLArBarrelRunAction_h | ||
#define ATLLArBarrelRunAction_h 1 | ||
|
||
//Includers from Geant4 | ||
// | ||
#include "G4UserRunAction.hh" | ||
#include "G4Timer.hh" | ||
#include "G4Run.hh" | ||
|
||
class ATLLArBarrelRunAction : public G4UserRunAction { | ||
|
||
public: | ||
ATLLArBarrelRunAction(); | ||
~ATLLArBarrelRunAction(); | ||
|
||
void BeginOfRunAction(const G4Run*) override; | ||
void EndOfRunAction(const G4Run* aRun) override; | ||
|
||
private: | ||
G4Timer fTimer; | ||
}; | ||
|
||
#endif //ATLLArBarrelRunAction_h 1 | ||
|
||
//************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//************************************************** | ||
// \file ATLLArBarrelRunAction.cc | ||
// \brief: implementation of ATLLArBarrelRunAction | ||
// class | ||
// \author: Lorenzo Pezzotti (CERN EP-SFT-sim) | ||
// @lopezzot | ||
// \start date: 31 October 2022 | ||
//************************************************** | ||
|
||
//Includers from project files | ||
// | ||
#include "ATLLArBarrelRunAction.hh" | ||
|
||
ATLLArBarrelRunAction::ATLLArBarrelRunAction(){} | ||
|
||
ATLLArBarrelRunAction::~ATLLArBarrelRunAction(){} | ||
|
||
void ATLLArBarrelRunAction::BeginOfRunAction(const G4Run*){ | ||
fTimer.Start(); | ||
} | ||
|
||
void ATLLArBarrelRunAction::EndOfRunAction(const G4Run* aRun){ | ||
fTimer.Stop(); | ||
|
||
G4int events = aRun->GetNumberOfEvent(); | ||
G4cout << " ============================================================================== " << G4endl; | ||
G4cout << " Run terminated, " << events << " events transported" << G4endl; | ||
G4cout << " Time: " << fTimer << G4endl; | ||
G4cout << " ============================================================================== " << G4endl; | ||
} | ||
|
||
//************************************************** |