Geant4 10.7.0
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 ()
 
virtual void RecordEvent (const G4Event *)
 
virtual void Merge (const G4Run *)
 
G4int GetRunID () const
 
G4int GetNumberOfEvent () const
 
G4int GetNumberOfEventToBeProcessed () const
 
const G4HCtableGetHCtable () const
 
const G4DCtableGetDCtable () const
 
const G4StringGetRandomNumberStatus () const
 
void SetRunID (G4int id)
 
void SetNumberOfEventToBeProcessed (G4int n_ev)
 
void SetHCtable (G4HCtable *HCtbl)
 
void SetDCtable (G4DCtable *DCtbl)
 
void SetRandomNumberStatus (G4String &st)
 
void StoreEvent (G4Event *evt)
 
const std::vector< const G4Event * > * GetEventVector () const
 

Protected Attributes

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

Detailed Description

Definition at line 48 of file G4Run.hh.

Member Typedef Documentation

◆ ProfilerConfig

Constructor & Destructor Documentation

◆ G4Run()

G4Run::G4Run ( )

Definition at line 34 of file G4Run.cc.

35 : runID(0)
36 , numberOfEvent(0)
38 , HCtable(0)
39 , DCtable(0)
40{
41 eventVector = new std::vector<const G4Event*>;
42 // this is for FOM in G4StatAnalysis
44}
std::vector< const G4Event * > * eventVector
Definition: G4Run.hh:69
G4int numberOfEvent
Definition: G4Run.hh:64
G4DCtable * DCtable
Definition: G4Run.hh:67
G4HCtable * HCtable
Definition: G4Run.hh:66
G4int runID
Definition: G4Run.hh:63
G4int numberOfEventToBeProcessed
Definition: G4Run.hh:65
static void ResetCpuClock()

◆ ~G4Run()

G4Run::~G4Run ( )
virtual

Definition at line 46 of file G4Run.cc.

47{
48 // Objects made by local thread should not be deleted by the master thread
51 if(rmType != G4RunManager::masterRM)
52 {
53 std::vector<const G4Event*>::iterator itr = eventVector->begin();
54 for(; itr != eventVector->end(); itr++)
55 {
56 delete *itr;
57 }
58 }
59 delete eventVector;
60}
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:84
RMType GetRunManagerType() const

Member Function Documentation

◆ GetDCtable()

const G4DCtable * G4Run::GetDCtable ( ) const
inline

Definition at line 93 of file G4Run.hh.

93{ return DCtable; }

◆ GetEventVector()

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

◆ GetHCtable()

const G4HCtable * G4Run::GetHCtable ( ) const
inline

Definition at line 91 of file G4Run.hh.

91{ return HCtable; }

◆ GetNumberOfEvent()

G4int G4Run::GetNumberOfEvent ( ) const
inline

Definition at line 84 of file G4Run.hh.

84{ return numberOfEvent; }

◆ GetNumberOfEventToBeProcessed()

G4int G4Run::GetNumberOfEventToBeProcessed ( ) const
inline

Definition at line 87 of file G4Run.hh.

88 {
90 }

◆ GetRandomNumberStatus()

const G4String & G4Run::GetRandomNumberStatus ( ) const
inline

Definition at line 95 of file G4Run.hh.

96 {
97 return randomNumberStatus;
98 }
G4String randomNumberStatus
Definition: G4Run.hh:68

◆ GetRunID()

◆ Merge()

void G4Run::Merge ( const G4Run right)
virtual

Reimplemented in G4RTRun.

Definition at line 64 of file G4Run.cc.

65{
67 std::vector<const G4Event*>::iterator itr = right->eventVector->begin();
68 for(; itr != right->eventVector->end(); itr++)
69 {
70 eventVector->push_back(*itr);
71 }
72}

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

◆ RecordEvent()

void G4Run::RecordEvent ( const G4Event )
virtual

Reimplemented in G4RTRun.

Definition at line 62 of file G4Run.cc.

62{ numberOfEvent++; }

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

74{ eventVector->push_back(evt); }

Referenced by G4RunManager::StackPreviousEvent().

Member Data Documentation

◆ DCtable

G4DCtable* G4Run::DCtable
protected

Definition at line 67 of file G4Run.hh.

Referenced by GetDCtable(), and SetDCtable().

◆ eventVector

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

Definition at line 69 of file G4Run.hh.

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

◆ HCtable

G4HCtable* G4Run::HCtable
protected

Definition at line 66 of file G4Run.hh.

Referenced by GetHCtable(), and SetHCtable().

◆ numberOfEvent

G4int G4Run::numberOfEvent
protected

Definition at line 64 of file G4Run.hh.

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

◆ numberOfEventToBeProcessed

G4int G4Run::numberOfEventToBeProcessed
protected

Definition at line 65 of file G4Run.hh.

Referenced by GetNumberOfEventToBeProcessed(), and SetNumberOfEventToBeProcessed().

◆ randomNumberStatus

G4String G4Run::randomNumberStatus
protected

Definition at line 68 of file G4Run.hh.

Referenced by GetRandomNumberStatus(), and SetRandomNumberStatus().

◆ runID

G4int G4Run::runID
protected

Definition at line 63 of file G4Run.hh.

Referenced by GetRunID(), and SetRunID().


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