Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Run Class Reference

#include <G4Run.hh>

+ Inheritance diagram for G4Run:

Public Types

using ProfilerConfig = G4ProfilerConfig< G4ProfileType::Run >
 

Public Member Functions

 G4Run ()
 
virtual ~G4Run ()
 
 G4Run (const G4Run &)=delete
 
G4Runoperator= (const G4Run &)=delete
 
virtual void RecordEvent (const G4Event *)
 
virtual void Merge (const G4Run *)
 
void StoreEvent (G4Event *evt)
 
G4int GetRunID () const
 
G4int GetNumberOfEvent () const
 
G4int GetNumberOfEventToBeProcessed () const
 
const G4HCtableGetHCtable () const
 
const G4DCtableGetDCtable () const
 
const G4StringGetRandomNumberStatus () const
 
const std::vector< const G4Event * > * GetEventVector () const
 
void SetRunID (G4int id)
 
void SetNumberOfEventToBeProcessed (G4int n_ev)
 
void SetHCtable (G4HCtable *HCtbl)
 
void SetDCtable (G4DCtable *DCtbl)
 
void SetRandomNumberStatus (G4String &st)
 

Protected Attributes

G4int runID = 0
 
G4int numberOfEvent = 0
 
G4int numberOfEventToBeProcessed = 0
 
G4HCtableHCtable = nullptr
 
G4DCtableDCtable = nullptr
 
G4String randomNumberStatus = ""
 
std::vector< const G4Event * > * eventVector = nullptr
 

Detailed Description

Definition at line 48 of file G4Run.hh.

Member Typedef Documentation

◆ ProfilerConfig

Constructor & Destructor Documentation

◆ G4Run() [1/2]

G4Run::G4Run ( )

Definition at line 37 of file G4Run.cc.

38{
39 eventVector = new std::vector<const G4Event*>;
40 G4StatAnalysis::ResetCpuClock(); // this is for FOM in G4StatAnalysis
41}
std::vector< const G4Event * > * eventVector
Definition: G4Run.hh:119
static void ResetCpuClock()

◆ ~G4Run()

G4Run::~G4Run ( )
virtual

Definition at line 44 of file G4Run.cc.

45{
46 // Objects made by local thread should not be deleted by the master thread
49 if(rmType != G4RunManager::masterRM)
50 {
51 for(auto itr = eventVector->cbegin();
52 itr != eventVector->cend(); ++itr)
53 {
54 delete *itr;
55 }
56 }
57 delete eventVector;
58}
static G4RunManager * GetRunManager()
RMType GetRunManagerType() const

◆ G4Run() [2/2]

G4Run::G4Run ( const G4Run )
delete

Member Function Documentation

◆ GetDCtable()

const G4DCtable * G4Run::GetDCtable ( ) const
inline

Definition at line 89 of file G4Run.hh.

89{ return DCtable; }
G4DCtable * DCtable
Definition: G4Run.hh:117

◆ GetEventVector()

const std::vector< const G4Event * > * G4Run::GetEventVector ( ) const
inline

◆ GetHCtable()

const G4HCtable * G4Run::GetHCtable ( ) const
inline

Definition at line 87 of file G4Run.hh.

87{ return HCtable; }
G4HCtable * HCtable
Definition: G4Run.hh:116

◆ GetNumberOfEvent()

G4int G4Run::GetNumberOfEvent ( ) const
inline

Definition at line 80 of file G4Run.hh.

80{ return numberOfEvent; }
G4int numberOfEvent
Definition: G4Run.hh:114

◆ GetNumberOfEventToBeProcessed()

G4int G4Run::GetNumberOfEventToBeProcessed ( ) const
inline

Definition at line 83 of file G4Run.hh.

84 {
86 }
G4int numberOfEventToBeProcessed
Definition: G4Run.hh:115

◆ GetRandomNumberStatus()

const G4String & G4Run::GetRandomNumberStatus ( ) const
inline

Definition at line 91 of file G4Run.hh.

92 {
93 return randomNumberStatus;
94 }
G4String randomNumberStatus
Definition: G4Run.hh:118

◆ GetRunID()

◆ Merge()

void G4Run::Merge ( const G4Run right)
virtual

Reimplemented in G4RTRun.

Definition at line 67 of file G4Run.cc.

68{
70 for(auto itr = right->eventVector->cbegin();
71 itr != right->eventVector->cend(); ++itr)
72 {
73 eventVector->push_back(*itr);
74 }
75}

Referenced by G4RTRun::Merge(), G4MTRunManager::MergeRun(), and G4TaskRunManager::MergeRun().

◆ operator=()

G4Run & G4Run::operator= ( const G4Run )
delete

◆ RecordEvent()

void G4Run::RecordEvent ( const G4Event )
virtual

Reimplemented in G4RTRun.

Definition at line 61 of file G4Run.cc.

62{
64}

Referenced by G4RunManager::AnalyzeEvent().

◆ SetDCtable()

void G4Run::SetDCtable ( G4DCtable DCtbl)
inline

◆ SetHCtable()

void G4Run::SetHCtable ( G4HCtable HCtbl)
inline

◆ SetNumberOfEventToBeProcessed()

void G4Run::SetNumberOfEventToBeProcessed ( G4int  n_ev)
inline

◆ SetRandomNumberStatus()

void G4Run::SetRandomNumberStatus ( G4String st)
inline

◆ SetRunID()

void G4Run::SetRunID ( G4int  id)
inline

◆ StoreEvent()

void G4Run::StoreEvent ( G4Event evt)

Definition at line 78 of file G4Run.cc.

79{
80 eventVector->push_back(evt);
81}

Referenced by G4RunManager::StackPreviousEvent().

Member Data Documentation

◆ DCtable

G4DCtable* G4Run::DCtable = nullptr
protected

Definition at line 117 of file G4Run.hh.

Referenced by GetDCtable(), and SetDCtable().

◆ eventVector

std::vector<const G4Event*>* G4Run::eventVector = nullptr
protected

Definition at line 119 of file G4Run.hh.

Referenced by G4Run(), GetEventVector(), Merge(), StoreEvent(), and ~G4Run().

◆ HCtable

G4HCtable* G4Run::HCtable = nullptr
protected

Definition at line 116 of file G4Run.hh.

Referenced by GetHCtable(), and SetHCtable().

◆ numberOfEvent

G4int G4Run::numberOfEvent = 0
protected

Definition at line 114 of file G4Run.hh.

Referenced by GetNumberOfEvent(), Merge(), and RecordEvent().

◆ numberOfEventToBeProcessed

G4int G4Run::numberOfEventToBeProcessed = 0
protected

Definition at line 115 of file G4Run.hh.

Referenced by GetNumberOfEventToBeProcessed(), and SetNumberOfEventToBeProcessed().

◆ randomNumberStatus

G4String G4Run::randomNumberStatus = ""
protected

Definition at line 118 of file G4Run.hh.

Referenced by GetRandomNumberStatus(), and SetRandomNumberStatus().

◆ runID

G4int G4Run::runID = 0
protected

Definition at line 113 of file G4Run.hh.

Referenced by GetRunID(), and SetRunID().


The documentation for this class was generated from the following files: