Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4RunAction.h
Go to the documentation of this file.
1#ifndef TG4_RUN_ACTION_H
2#define TG4_RUN_ACTION_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
20#include "TG4Verbose.h"
21
22#include <G4UserRunAction.hh>
23#include <globals.hh>
24
25class G4Timer;
26// in order to avoid the odd dependency for the
27// times system function this declaration must be the first
28class G4Run;
29
34
36{
37 public:
39 virtual ~TG4RunAction();
40
41 // methods
42 virtual void BeginOfRunAction(const G4Run* run);
43 virtual void EndOfRunAction(const G4Run* run);
44
45 // set methods
46 void SetSaveRandomStatus(G4bool saveRandomStatus);
47 void SetReadRandomStatus(G4bool readRandomStatus);
48 void SetRandomStatusFile(G4String RandomStatusFile);
49 void SetThresholdWarningEnergy(G4double value);
50 void SetThresholdImportantEnergy(G4double value);
51 void SetNumberOfThresholdTrials(G4int value);
52
53 private:
58
59 // methods
60 void ChangeLooperParameters(const G4ParticleDefinition* particleDefinition);
61 void PrintLooperParameters() const;
62
63 // static data members
65 static const G4String fgkDefaultRandomStatusFile;
66
67 // data members
70 G4Timer* fTimer;
71 G4int fRunID;
75
78
83
86};
87
88inline void TG4RunAction::SetSaveRandomStatus(G4bool saveRandomStatus)
89{
91 fSaveRandomStatus = saveRandomStatus;
92}
93
94inline void TG4RunAction::SetReadRandomStatus(G4bool readRandomStatus)
95{
97 fReadRandomStatus = readRandomStatus;
98}
99
100inline void TG4RunAction::SetRandomStatusFile(G4String RandomStatusFile)
101{
103 fRandomStatusFile = RandomStatusFile;
104}
105
107{
109}
110
112{
114}
115
117{
119}
120
121#endif // TG4_RUN_ACTION_H
Definition of the TG4CrossSectionManager class.
Definition of the TG4RunActionMessenger class.
Definition of the TG4Verbose class.
The manager class for accessing hadronic cross sections.
Messenger class that defines commands for TG4RunAction.
Actions at the beginning and the end of run.
virtual void BeginOfRunAction(const G4Run *run)
TG4RunAction & operator=(const TG4RunAction &right)
Not implemented.
G4String fRandomStatusFile
random engine status file name
void SetNumberOfThresholdTrials(G4int value)
G4bool fReadRandomStatus
control for reading random engine status
G4int fNumberOfThresholdTrials
Number of trials to propagate a looping track.
virtual ~TG4RunAction()
void SetThresholdWarningEnergy(G4double value)
TG4RunActionMessenger fMessenger
messenger
G4int fRunID
run ID
void SetReadRandomStatus(G4bool readRandomStatus)
TG4RunAction(const TG4RunAction &right)
Not implemented.
G4double fThresholdWarningEnergy
Energy threshold for warnings about killing looping tracks.
TG4CrossSectionManager fCrossSectionManager
cross section manager
void SetSaveRandomStatus(G4bool saveRandomStatus)
G4double fThresholdImportantEnergy
virtual void EndOfRunAction(const G4Run *run)
G4bool fSaveRandomStatus
control for saving random engine status
void SetThresholdImportantEnergy(G4double value)
void PrintLooperParameters() const
void SetRandomStatusFile(G4String RandomStatusFile)
void ChangeLooperParameters(const G4ParticleDefinition *particleDefinition)
G4Timer * fTimer
G4Timer.
static const G4String fgkDefaultRandomStatusFile
default name of the random engine status file to be read in
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36