Geant4 11.2.2
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 *)
 
virtual void MergeSubEvent (G4Event *masterEv, const G4Event *subEv)
 
void StoreEvent (G4Event *evt)
 
G4int GetRunID () const
 
G4int GetNumberOfEvent () const
 
G4int GetNumberOfEventToBeProcessed () const
 
const G4HCtableGetHCtable () const
 
const G4DCtableGetDCtable () const
 
const G4StringGetRandomNumberStatus () 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 38 of file G4Run.cc.

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

◆ ~G4Run()

G4Run::~G4Run ( )
virtual

Definition at line 45 of file G4Run.cc.

46{
47 // Objects made by local thread should not be deleted by the master thread
50 if(rmType != G4RunManager::masterRM)
51 {
52 for(auto& itr : *eventVector)
53 { delete itr; }
54 }
55 delete eventVector;
56}
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 98 of file G4Run.hh.

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

◆ GetEventVector()

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

◆ GetHCtable()

const G4HCtable * G4Run::GetHCtable ( ) const
inline

Definition at line 95 of file G4Run.hh.

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

◆ GetNumberOfEvent()

G4int G4Run::GetNumberOfEvent ( ) const
inline

Definition at line 90 of file G4Run.hh.

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

◆ GetNumberOfEventToBeProcessed()

G4int G4Run::GetNumberOfEventToBeProcessed ( ) const
inline

Definition at line 92 of file G4Run.hh.

G4int numberOfEventToBeProcessed
Definition G4Run.hh:115

◆ GetRandomNumberStatus()

const G4String & G4Run::GetRandomNumberStatus ( ) const
inline

Definition at line 101 of file G4Run.hh.

101{ return randomNumberStatus; }
G4String randomNumberStatus
Definition G4Run.hh:118

◆ GetRunID()

◆ Merge()

void G4Run::Merge ( const G4Run * right)
virtual

Reimplemented in G4RTRun.

Definition at line 65 of file G4Run.cc.

66{
68 for(auto& itr : *(right->eventVector))
69 { eventVector->push_back(itr); }
70}

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

◆ MergeSubEvent()

void G4Run::MergeSubEvent ( G4Event * masterEv,
const G4Event * subEv )
virtual

Definition at line 79 of file G4Run.cc.

80{
81 // trajectories are merged here.......
82 ;
83}

◆ operator=()

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

◆ RecordEvent()

void G4Run::RecordEvent ( const G4Event * )
virtual

Reimplemented in G4RTRun.

Definition at line 59 of file G4Run.cc.

60{
62}

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 73 of file G4Run.cc.

74{
75 eventVector->push_back(evt);
76}

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: