Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
CML2RunAction Class Reference

#include <ML2RunAction.hh>

Inheritance diagram for CML2RunAction:
G4UserRunAction

Public Member Functions

 CML2RunAction (CML2Convergence *convergence, G4int nBeam, G4bool bOnlyVisio)
 
 ~CML2RunAction (void)
 
void BeginOfRunAction (const G4Run *aRun)
 
void EndOfRunAction (const G4Run *aRun)
 
void setActualLoop (G4int nL)
 
- Public Member Functions inherited from G4UserRunAction
 G4UserRunAction ()
 
virtual ~G4UserRunAction ()
 
virtual G4RunGenerateRun ()
 
void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Additional Inherited Members

- Protected Attributes inherited from G4UserRunAction
G4bool isMaster
 

Detailed Description

Definition at line 52 of file ML2RunAction.hh.

Constructor & Destructor Documentation

CML2RunAction::CML2RunAction ( CML2Convergence convergence,
G4int  nBeam,
G4bool  bOnlyVisio 
)

Definition at line 46 of file ML2RunAction.cc.

47 {
48  bRotationTranslationFilesNames=true;
49  convergence=conv;
50  nBeam=nB;
51  bOnlyVisio=bOV;
52  nLoop=0;
53 }
CML2RunAction::~CML2RunAction ( void  )

Definition at line 55 of file ML2RunAction.cc.

56 {
57 }

Member Function Documentation

void CML2RunAction::BeginOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 58 of file ML2RunAction.cc.

References CML2AcceleratorConstruction::getCurrentRotationString(), CML2PhantomConstruction::getCurrentTranslationString(), CML2PhantomConstruction::GetInstance(), CML2AcceleratorConstruction::GetInstance(), CML2Convergence::getNMaxLoops(), CML2PhantomConstruction::setNewName(), G4Timer::Start(), CML2PhantomConstruction::writeInfo(), and CML2AcceleratorConstruction::writeInfo().

59 {
60  G4String fullName;
61  if (bRotationTranslationFilesNames)
64  else
65  {fullName="";}
67 
70 
71  std::cout<<"*********************************************"<<'\n';
72  if (convergence->getNMaxLoops()<0 || bOnlyVisio)
73  {
74  std::cout << "loop n. "<<++nLoop <<'\n';
75  }
76  else
77  {
78  std::cout << "loop n. "<<++nLoop<<"/" <<convergence->getNMaxLoops() <<'\n';
79  }
80  if (!bOnlyVisio)
81  {std::cout << "Launched "<< nBeam <<" random primary particles" << '\n';}
82  std::cout<<"*********************************************"<<'\n';
83  MyTime.Start();
84 }
static CML2AcceleratorConstruction * GetInstance(void)
void Start()
static CML2PhantomConstruction * GetInstance(void)
void CML2RunAction::EndOfRunAction ( const G4Run aRun)
virtual

Reimplemented from G4UserRunAction.

Definition at line 85 of file ML2RunAction.cc.

References CML2WorldConstruction::GetInstance(), G4Timer::GetUserElapsed(), CML2WorldConstruction::savePhantomData(), CML2WorldConstruction::savePhaseSpaceData(), CML2Convergence::saveResults(), and G4Timer::Stop().

86 {
89  convergence->saveResults();
90 
91  MyTime.Stop();
92  loopElapsedTime=MyTime.GetUserElapsed();
93  std::cout << "loop elapsed time [s] : "<< loopElapsedTime << '\n';
94  std::cout <<'\n';
95 }
static CML2WorldConstruction * GetInstance(void)
G4double GetUserElapsed() const
Definition: G4Timer.cc:130
void Stop()
void CML2RunAction::setActualLoop ( G4int  nL)
inline

Definition at line 59 of file ML2RunAction.hh.

59 {nLoop=nL;}

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