Loading...
Searching...
No Matches
Public Member Functions | List of all members
Par02RunAction Class Reference

Run action (before/after run processing). More...

#include <Doxymodules_parameterisations.h>

Inheritance diagram for Par02RunAction:
G4UserRunAction

Public Member Functions

 Par02RunAction (const G4String OutName="SimpleOutput")
 A default constructor.
 
virtual ~Par02RunAction ()
 
virtual void BeginOfRunAction (const G4Run *)
 Defines the actions at the beginning of the run.
 
virtual void EndOfRunAction (const G4Run *)
 Defines the actions at the end of the run.
 

Detailed Description

Run action (before/after run processing).

Defines the action at the beginning and at the end of each run. Content of G4Run cannot be changed. The class needs to be set in G4RunManager::SetUserAction().

Author
Anna Zaborowska

Definition at line 48 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ Par02RunAction()

Par02RunAction::Par02RunAction ( const G4String  OutName = "SimpleOutput")

A default constructor.

Parameters
OutNameThe output root file name (it will store all the events within one run).

Definition at line 38 of file Par02RunAction.cc.

38 :
41}
void SetFileName(G4String name)
Sets the file name of the output root file.
static Par02Output * Instance()
Allows the access to the unique Par02Output object.

◆ ~Par02RunAction()

Par02RunAction::~Par02RunAction ( )
virtual

Definition at line 45 of file Par02RunAction.cc.

45 {
46 #ifdef G4MULTITHREADED
47 if ( isMaster ) delete Par02Output::Instance();
48 #else
49 delete Par02Output::Instance();
50 #endif
51}

Member Function Documentation

◆ BeginOfRunAction()

void Par02RunAction::BeginOfRunAction ( const G4Run aRun)
virtual

Defines the actions at the beginning of the run.

It starts the analysis (create output root file) and create all the histograms defined in Par02Output singleton class.

Definition at line 55 of file Par02RunAction.cc.

55 {
56 Par02Output::Instance()->StartAnalysis( aRun->GetRunID() );
58}
void CreateHistograms()
Creates histograms to combine information from all the events in the run.
void StartAnalysis(G4int runID)
Calls the G4AnalysisManager::Instance().

◆ EndOfRunAction()

void Par02RunAction::EndOfRunAction ( const G4Run )
virtual

Defines the actions at the end of the run.

It ends the analysis (write and close output root file) via Par02Output singleton class.

Definition at line 62 of file Par02RunAction.cc.

62 {
64}
void EndAnalysis()
Calls the G4AnalysisManager::Instance().

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

Applications | User Support | Publications | Collaboration