Geant4  10.02.p03
CexmcRunManager Class Reference

#include <CexmcRunManager.hh>

Inheritance diagram for CexmcRunManager:
Collaboration diagram for CexmcRunManager:

Public Member Functions

 CexmcRunManager (const G4String &projectId="", const G4String &rProject="", G4bool overrideExistingProject=false)
 
virtual ~CexmcRunManager ()
 
void SetPhysicsManager (CexmcPhysicsManager *physicsManager_)
 
void SetProductionModelType (CexmcProductionModelType productionModelType_)
 
void SetGdmlFileName (const G4String &gdmlFileName_)
 
void SetGdmlFileValidation (G4bool on=true)
 
void SetGuiMacroName (const G4String &guiMacroName_)
 
void SetEventCountPolicy (CexmcEventCountPolicy value)
 
void SetEventDataVerboseLevel (CexmcEventDataVerboseLevel value)
 
void RegisterScenePrimitives (void)
 
void BeamParticleChangeHook (void)
 
void SetupConstructionHook (void)
 
CexmcPhysicsManagerGetPhysicsManager (void)
 
CexmcProductionModelType GetProductionModelType (void) const
 
G4String GetGdmlFileName (void) const
 
G4bool ShouldGdmlFileBeValidated (void) const
 
G4String GetGuiMacroName (void) const
 
G4bool ProjectIsSaved (void) const
 
G4bool ProjectIsRead (void) const
 
G4String GetProjectsDir (void) const
 
G4String GetProjectId (void) const
 
CexmcEventDataVerboseLevel GetEventDataVerboseLevel (void) const
 
- Public Member Functions inherited from G4RunManager
 G4RunManager ()
 
virtual ~G4RunManager ()
 
virtual void BeamOn (G4int n_event, const char *macroFile=0, G4int n_select=-1)
 
virtual void Initialize ()
 
virtual void DefineWorldVolume (G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
 
virtual void AbortRun (G4bool softAbort=false)
 
virtual void AbortEvent ()
 
virtual void InitializeGeometry ()
 
virtual void InitializePhysics ()
 
virtual G4bool ConfirmBeamOnCondition ()
 
virtual void RunInitialization ()
 
virtual void RunTermination ()
 
virtual void InitializeEventLoop (G4int n_event, const char *macroFile=0, G4int n_select=-1)
 
virtual void ProcessOneEvent (G4int i_event)
 
virtual void TerminateOneEvent ()
 
virtual void TerminateEventLoop ()
 
virtual G4EventGenerateEvent (G4int i_event)
 
virtual void AnalyzeEvent (G4Event *anEvent)
 
void DumpRegion (const G4String &rname) const
 
void DumpRegion (G4Region *region=0) const
 
virtual void rndmSaveThisRun ()
 
virtual void rndmSaveThisEvent ()
 
virtual void RestoreRandomNumberStatus (const G4String &fileN)
 
virtual void SetUserInitialization (G4VUserDetectorConstruction *userInit)
 
virtual void SetUserInitialization (G4VUserPhysicsList *userInit)
 
virtual void SetUserInitialization (G4VUserActionInitialization *userInit)
 
virtual void SetUserInitialization (G4UserWorkerInitialization *userInit)
 
virtual void SetUserInitialization (G4UserWorkerThreadInitialization *userInit)
 
virtual void SetUserAction (G4UserRunAction *userAction)
 
virtual void SetUserAction (G4VUserPrimaryGeneratorAction *userAction)
 
virtual void SetUserAction (G4UserEventAction *userAction)
 
virtual void SetUserAction (G4UserStackingAction *userAction)
 
virtual void SetUserAction (G4UserTrackingAction *userAction)
 
virtual void SetUserAction (G4UserSteppingAction *userAction)
 
const G4VUserDetectorConstructionGetUserDetectorConstruction () const
 
const G4VUserPhysicsListGetUserPhysicsList () const
 
const G4VUserActionInitializationGetUserActionInitialization () const
 
G4VUserActionInitializationGetNonConstUserActionInitialization () const
 
const G4UserWorkerInitializationGetUserWorkerInitialization () const
 
const G4UserWorkerThreadInitializationGetUserWorkerThreadInitialization () const
 
const G4UserRunActionGetUserRunAction () const
 
const G4VUserPrimaryGeneratorActionGetUserPrimaryGeneratorAction () const
 
const G4UserEventActionGetUserEventAction () const
 
const G4UserStackingActionGetUserStackingAction () const
 
const G4UserTrackingActionGetUserTrackingAction () const
 
const G4UserSteppingActionGetUserSteppingAction () const
 
void SetNumberOfAdditionalWaitingStacks (G4int iAdd)
 
const G4StringGetVersionString () const
 
void SetPrimaryTransformer (G4PrimaryTransformer *pt)
 
void StoreRandomNumberStatusToG4Event (G4int vl)
 
G4int GetFlagRandomNumberStatusToG4Event () const
 
void SetRandomNumberStore (G4bool flag)
 
G4bool GetRandomNumberStore () const
 
void SetRandomNumberStoreDir (const G4String &dir)
 
const G4StringGetRandomNumberStoreDir () const
 
const G4StringGetRandomNumberStatusForThisRun () const
 
const G4StringGetRandomNumberStatusForThisEvent () const
 
void SetRandomNumberStorePerEvent (G4bool flag)
 
G4bool GetRandomNumberStorePerEvent () const
 
void GeometryHasBeenModified (G4bool prop=true)
 
void ReinitializeGeometry (G4bool destroyFirst=false, G4bool prop=true)
 
void PhysicsHasBeenModified ()
 
void CutOffHasBeenModified ()
 
void ReOptimizeMotherOf (G4VPhysicalVolume *)
 
void ReOptimize (G4LogicalVolume *)
 
void SetVerboseLevel (G4int vl)
 
G4int GetVerboseLevel () const
 
G4int GetPrintProgress ()
 
void SetPrintProgress (G4int i)
 
void SetGeometryToBeOptimized (G4bool vl)
 
G4bool GetGeometryToBeOptimized ()
 
void SetNumberOfEventsToBeStored (G4int val)
 
const G4RunGetCurrentRun () const
 
G4RunGetNonConstCurrentRun () const
 
const G4EventGetCurrentEvent () const
 
const G4EventGetPreviousEvent (G4int i) const
 
void SetRunIDCounter (G4int i)
 
G4int GetNumberOfParallelWorld () const
 
void SetNumberOfEventsToBeProcessed (G4int val)
 
G4int GetNumberOfEventsToBeProcessed () const
 
G4int GetNumberOfSelectEvents () const
 
G4String GetSelectMacro () const
 
void SetDCtable (G4DCtable *DCtbl)
 
RMType GetRunManagerType () const
 
virtual void ConstructScoringWorlds ()
 
virtual void RestoreRndmEachEvent (G4bool)
 

Protected Member Functions

void DoEventLoop (G4int nEvent, const char *macroFile, G4int nSelect)
 
- Protected Member Functions inherited from G4RunManager
void CleanUpPreviousEvents ()
 
void CleanUpUnnecessaryEvents (G4int keepNEvents)
 
void StackPreviousEvent (G4Event *anEvent)
 
 G4RunManager (RMType rmType)
 
virtual void StoreRNGStatus (const G4String &filenamePrefix)
 
void UpdateScoring ()
 
virtual void DeleteUserInitializations ()
 

Private Member Functions

void DoCommonEventLoop (G4int nEvent, const G4String &cmd, G4int nSelect)
 
void ReadPreinitProjectData (void)
 

Private Attributes

CexmcBasePhysicsUsed basePhysicsUsed
 
CexmcProductionModelType productionModelType
 
G4String gdmlFileName
 
G4bool shouldGdmlFileBeValidated
 
G4bool zipGdmlFile
 
G4String projectsDir
 
G4String projectId
 
G4String rProject
 
G4String guiMacroName
 
G4String cfFileName
 
CexmcEventCountPolicy eventCountPolicy
 
G4bool skipInteractionsWithoutEDTonWrite
 
CexmcEventDataVerboseLevel evDataVerboseLevel
 
CexmcEventDataVerboseLevel rEvDataVerboseLevel
 
G4int numberOfEventsProcessed
 
G4int numberOfEventsProcessedEffective
 
G4int curEventRead
 
CexmcPhysicsManagerphysicsManager
 
CexmcRunManagerMessengermessenger
 

Additional Inherited Members

- Public Types inherited from G4RunManager
enum  RMType { sequentialRM, masterRM, workerRM }
 
- Static Public Member Functions inherited from G4RunManager
static G4RunManagerGetRunManager ()
 
static G4bool IfGeometryHasBeenDestroyed ()
 
- Protected Attributes inherited from G4RunManager
G4RunManagerKernelkernel
 
G4EventManagereventManager
 
G4VUserDetectorConstructionuserDetector
 
G4VUserPhysicsListphysicsList
 
G4VUserActionInitializationuserActionInitialization
 
G4UserWorkerInitializationuserWorkerInitialization
 
G4UserWorkerThreadInitializationuserWorkerThreadInitialization
 
G4UserRunActionuserRunAction
 
G4VUserPrimaryGeneratorActionuserPrimaryGeneratorAction
 
G4UserEventActionuserEventAction
 
G4UserStackingActionuserStackingAction
 
G4UserTrackingActionuserTrackingAction
 
G4UserSteppingActionuserSteppingAction
 
G4bool geometryInitialized
 
G4bool physicsInitialized
 
G4bool runAborted
 
G4bool initializedAtLeastOnce
 
G4bool geometryToBeOptimized
 
G4int runIDCounter
 
G4int verboseLevel
 
G4int printModulo
 
G4Timertimer
 
G4DCtableDCtable
 
G4RuncurrentRun
 
G4EventcurrentEvent
 
std::list< G4Event * > * previousEvents
 
G4int n_perviousEventsToBeStored
 
G4int numberOfEventToBeProcessed
 
G4bool storeRandomNumberStatus
 
G4int storeRandomNumberStatusToG4Event
 
G4String randomNumberStatusDir
 
G4String randomNumberStatusForThisRun
 
G4String randomNumberStatusForThisEvent
 
G4bool rngStatusEventsFlag
 
G4VPhysicalVolumecurrentWorld
 
G4int nParallelWorlds
 
G4String msgText
 
G4int n_select_msg
 
G4int numberOfEventProcessed
 
G4String selectMacro
 
G4bool fakeRun
 
RMType runManagerType
 
- Static Protected Attributes inherited from G4RunManager
static G4bool fGeometryHasBeenDestroyed = false
 

Detailed Description

Definition at line 68 of file CexmcRunManager.hh.

Constructor & Destructor Documentation

◆ CexmcRunManager()

CexmcRunManager::CexmcRunManager ( const G4String projectId = "",
const G4String rProject = "",
G4bool  overrideExistingProject = false 
)
explicit

Definition at line 105 of file CexmcRunManager.cc.

107  :
110  gdmlFileName( "default.gdml" ), shouldGdmlFileBeValidated( true ),
111  zipGdmlFile( false ), projectsDir( "." ), projectId( projectId ),
112  rProject( rProject ), guiMacroName( "" ), cfFileName( "" ),
118 #ifdef CEXMC_USE_PERSISTENCY
119  eventsArchive( NULL ), fastEventsArchive( NULL ),
120 #ifdef CEXMC_USE_CUSTOM_FILTER
121  customFilter( NULL ),
122 #endif
123 #endif
124  physicsManager( NULL ), messenger( NULL )
125 {
126  /* this exception must be caught before creating the object! */
127  if ( rProject != "" && rProject == projectId )
129 
130  const char * projectsDirEnv( getenv( "CEXMC_PROJECTS_DIR" ) );
131 
132  if ( projectsDirEnv )
133  projectsDir = projectsDirEnv;
134 
135  struct stat tmp;
136  if ( ProjectIsSaved() &&
137  stat( ( projectsDir + "/" + projectId + ".rdb" ).c_str(), &tmp ) == 0
138  && ! overrideExistingProject )
140 
141  messenger = new CexmcRunManagerMessenger( this );
142 
143 #ifdef CEXMC_USE_PERSISTENCY
144  if ( ProjectIsRead() )
146 #endif
147 }
Float_t tmp
G4bool ProjectIsRead(void) const
G4bool shouldGdmlFileBeValidated
void ReadPreinitProjectData(void)
G4bool ProjectIsSaved(void) const
CexmcProductionModelType productionModelType
CexmcEventDataVerboseLevel rEvDataVerboseLevel
CexmcEventCountPolicy eventCountPolicy
CexmcPhysicsManager * physicsManager
static CexmcBasePhysicsUsed GetBasePhysics(void)
CexmcEventDataVerboseLevel evDataVerboseLevel
G4bool skipInteractionsWithoutEDTonWrite
G4int numberOfEventsProcessedEffective
CexmcBasePhysicsUsed basePhysicsUsed
CexmcRunManagerMessenger * messenger
Here is the call graph for this function:

◆ ~CexmcRunManager()

CexmcRunManager::~CexmcRunManager ( )
virtual

Definition at line 150 of file CexmcRunManager.cc.

151 {
152 #ifdef CEXMC_USE_CUSTOM_FILTER
153  delete customFilter;
154 #endif
155  delete messenger;
156 }
CexmcRunManagerMessenger * messenger

Member Function Documentation

◆ BeamParticleChangeHook()

void CexmcRunManager::BeamParticleChangeHook ( void  )

Definition at line 1348 of file CexmcRunManager.cc.

1349 {
1350  const CexmcEventAction * eventAction(
1351  static_cast< const CexmcEventAction * >( userEventAction ) );
1352  if ( ! eventAction )
1354 
1355  CexmcEventAction * theEventAction( const_cast< CexmcEventAction * >(
1356  eventAction ) );
1357  theEventAction->BeamParticleChangeHook();
1358 }
G4UserEventAction * userEventAction
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoCommonEventLoop()

void CexmcRunManager::DoCommonEventLoop ( G4int  nEvent,
const G4String cmd,
G4int  nSelect 
)
private

Definition at line 462 of file CexmcRunManager.cc.

464 {
465  G4int iEvent( 0 );
466  G4int iEventEffective( 0 );
467 
468  for ( iEvent = 0; iEventEffective < nEvent; ++iEvent )
469  {
470  currentEvent = GenerateEvent( iEvent );
472  CexmcEventInfo * eventInfo( static_cast< CexmcEventInfo * >(
474  switch ( eventCountPolicy )
475  {
476  case CexmcCountAllEvents :
477  ++iEventEffective;
478  break;
480  if ( eventInfo->TpTriggerIsOk() )
481  ++iEventEffective;
482  break;
484  if ( eventInfo->EdTriggerIsOk() )
485  ++iEventEffective;
486  break;
487  default :
488  ++iEventEffective;
489  break;
490  }
492  UpdateScoring();
493  if ( iEvent < nSelect )
496  currentEvent = 0;
497  if ( runAborted )
498  break;
499  }
500 
501  numberOfEventsProcessed = iEvent;
502  numberOfEventsProcessedEffective = iEventEffective;
503 }
int G4int
Definition: G4Types.hh:78
G4bool runAborted
G4Event * currentEvent
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
virtual G4Event * GenerateEvent(G4int i_event)
G4VUserEventInformation * GetUserInformation() const
Definition: G4Event.hh:199
CexmcEventCountPolicy eventCountPolicy
virtual void AnalyzeEvent(G4Event *anEvent)
void StackPreviousEvent(G4Event *anEvent)
G4int numberOfEventsProcessedEffective
void ProcessOneEvent(G4Event *anEvent)
G4EventManager * eventManager
void UpdateScoring()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:446
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoEventLoop()

void CexmcRunManager::DoEventLoop ( G4int  nEvent,
const char *  macroFile,
G4int  nSelect 
)
protectedvirtual

Reimplemented from G4RunManager.

Definition at line 885 of file CexmcRunManager.cc.

887 {
888  if ( verboseLevel > 0 )
889  timer->Start();
890 
891  G4String cmd;
892  if ( macroFile != 0 )
893  {
894  if ( nSelect < 0 )
895  nSelect = nEvent;
896  cmd = "/control/execute ";
897  cmd += macroFile;
898  }
899  else
900  {
901  nSelect = -1;
902  }
903 
906 
907 #ifdef CEXMC_USE_PERSISTENCY
908  eventsArchive = NULL;
909  fastEventsArchive = NULL;
910  if ( ProjectIsRead() )
911  {
912  if ( ProjectIsSaved() )
913  {
914  std::ofstream eventsDataFile(
915  ( projectsDir + "/" + projectId + ".edb" ).c_str() );
916  boost::archive::binary_oarchive eventsArchive_( eventsDataFile );
917  std::ofstream fastEventsDataFile(
918  ( projectsDir + "/" + projectId + ".fdb" ).c_str() );
919  boost::archive::binary_oarchive fastEventsArchive_(
920  fastEventsDataFile );
921  eventsArchive = &eventsArchive_;
922  fastEventsArchive = &fastEventsArchive_;
923  DoReadEventLoop( nEvent );
924  }
925  else
926  {
927  DoReadEventLoop( nEvent );
928  }
929  }
930  else
931  {
932  if ( ProjectIsSaved() )
933  {
934  std::ofstream eventsDataFile(
935  ( projectsDir + "/" + projectId + ".edb" ).c_str() );
936  boost::archive::binary_oarchive eventsArchive_( eventsDataFile );
937  std::ofstream fastEventsDataFile(
938  ( projectsDir + "/" + projectId + ".fdb" ).c_str() );
939  boost::archive::binary_oarchive fastEventsArchive_(
940  fastEventsDataFile );
941  eventsArchive = &eventsArchive_;
942  fastEventsArchive = &fastEventsArchive_;
943  DoCommonEventLoop( nEvent, cmd, nSelect );
944  }
945  else
946  {
947  DoCommonEventLoop( nEvent, cmd, nSelect );
948  }
949  }
950  eventsArchive = NULL;
951  fastEventsArchive = NULL;
952 #else
953  DoCommonEventLoop( nEvent, cmd, nSelect );
954 #endif
955 
956  if ( verboseLevel > 0 )
957  {
958  timer->Stop();
959  G4cout << "Run terminated." << G4endl;
960  G4cout << "Run Summary" << G4endl;
961  if ( runAborted )
962  {
963  G4cout << " Run Aborted after " << numberOfEventsProcessed <<
964  " events processed." << G4endl;
965  }
966  else
967  {
968  G4cout << " Number of events processed : " <<
969  numberOfEventsProcessed << ", effectively: " <<
971  }
972  G4cout << " " << *timer << G4endl;
973  }
974 }
G4Timer * timer
G4bool ProjectIsRead(void) const
void DoCommonEventLoop(G4int nEvent, const G4String &cmd, G4int nSelect)
G4bool runAborted
G4bool ProjectIsSaved(void) const
G4GLOB_DLL std::ostream G4cout
void Stop()
#define G4endl
Definition: G4ios.hh:61
G4int numberOfEventsProcessedEffective
void Start()
G4int verboseLevel
Here is the call graph for this function:

◆ GetEventDataVerboseLevel()

CexmcEventDataVerboseLevel CexmcRunManager::GetEventDataVerboseLevel ( void  ) const
inline

Definition at line 382 of file CexmcRunManager.hh.

384 {
385  return evDataVerboseLevel;
386 }
CexmcEventDataVerboseLevel evDataVerboseLevel
Here is the caller graph for this function:

◆ GetGdmlFileName()

G4String CexmcRunManager::GetGdmlFileName ( void  ) const
inline

Definition at line 295 of file CexmcRunManager.hh.

296 {
297  return gdmlFileName;
298 }
Here is the caller graph for this function:

◆ GetGuiMacroName()

G4String CexmcRunManager::GetGuiMacroName ( void  ) const
inline

Definition at line 307 of file CexmcRunManager.hh.

308 {
309  return guiMacroName;
310 }
Here is the caller graph for this function:

◆ GetPhysicsManager()

CexmcPhysicsManager * CexmcRunManager::GetPhysicsManager ( void  )
inline

Definition at line 282 of file CexmcRunManager.hh.

283 {
284  return physicsManager;
285 }
CexmcPhysicsManager * physicsManager

◆ GetProductionModelType()

CexmcProductionModelType CexmcRunManager::GetProductionModelType ( void  ) const
inline

Definition at line 289 of file CexmcRunManager.hh.

290 {
291  return productionModelType;
292 }
CexmcProductionModelType productionModelType
Here is the caller graph for this function:

◆ GetProjectId()

G4String CexmcRunManager::GetProjectId ( void  ) const
inline

Definition at line 331 of file CexmcRunManager.hh.

332 {
333  return projectId;
334 }
Here is the call graph for this function:

◆ GetProjectsDir()

G4String CexmcRunManager::GetProjectsDir ( void  ) const
inline

Definition at line 325 of file CexmcRunManager.hh.

326 {
327  return projectsDir;
328 }

◆ ProjectIsRead()

G4bool CexmcRunManager::ProjectIsRead ( void  ) const
inline

Definition at line 319 of file CexmcRunManager.hh.

320 {
321  return rProject != "";
322 }
Here is the caller graph for this function:

◆ ProjectIsSaved()

G4bool CexmcRunManager::ProjectIsSaved ( void  ) const
inline

Definition at line 313 of file CexmcRunManager.hh.

314 {
315  return projectId != "";
316 }
Here is the caller graph for this function:

◆ ReadPreinitProjectData()

void CexmcRunManager::ReadPreinitProjectData ( void  )
private
Here is the caller graph for this function:

◆ RegisterScenePrimitives()

void CexmcRunManager::RegisterScenePrimitives ( void  )

Definition at line 1308 of file CexmcRunManager.cc.

1309 {
1310  G4VisManager * visManager( static_cast< G4VisManager * >(
1312  if ( ! visManager )
1313  return;
1314 
1315  G4Scene * curScene( visManager->GetCurrentScene() );
1316  if ( ! curScene )
1317  return;
1318 
1319  /* G4Scene declarations lack this kind of typedef */
1320 #if G4VERSION_NUMBER < 960
1321  typedef std::vector< G4VModel * > MList;
1322 #else
1323  typedef std::vector< G4Scene::Model > MList;
1324 #endif
1325  const MList & mList( curScene->GetRunDurationModelList() );
1326 
1327  for ( MList::const_iterator k( mList.begin() ); k != mList.end(); ++k )
1328  {
1329 #if G4VERSION_NUMBER < 960
1330  const G4String & modelDesc( ( *k )->GetGlobalDescription() );
1331 #else
1332  const G4String & modelDesc( k->fpModel->GetGlobalDescription() );
1333 #endif
1334  if ( modelDesc == CexmcScenePrimitivesDescription )
1335  return;
1336  }
1337 
1338  CexmcSetup * setup( static_cast< CexmcSetup * >( userDetector ) );
1339  if ( ! setup )
1341 
1342  /* BEWARE: looks like G4Scene won't delete models from its lists upon
1343  * termination! Hence destructor of the new model won't be called */
1344  curScene->AddRunDurationModel( new CexmcScenePrimitives( setup ) );
1345 }
const G4String CexmcScenePrimitivesDescription("CexmcScenePrimitives")
static G4VVisManager * GetConcreteInstance()
G4VUserDetectorConstruction * userDetector
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEventCountPolicy()

void CexmcRunManager::SetEventCountPolicy ( CexmcEventCountPolicy  value)
inline

Definition at line 262 of file CexmcRunManager.hh.

264 {
265  if ( ProjectIsRead() )
267 
268  eventCountPolicy = value;
269 }
G4bool ProjectIsRead(void) const
CexmcEventCountPolicy eventCountPolicy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEventDataVerboseLevel()

void CexmcRunManager::SetEventDataVerboseLevel ( CexmcEventDataVerboseLevel  value)
inline

Definition at line 272 of file CexmcRunManager.hh.

274 {
275  if ( ProjectIsRead() && value > rEvDataVerboseLevel )
277 
278  evDataVerboseLevel = value;
279 }
G4bool ProjectIsRead(void) const
CexmcEventDataVerboseLevel rEvDataVerboseLevel
CexmcEventDataVerboseLevel evDataVerboseLevel
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetGdmlFileName()

void CexmcRunManager::SetGdmlFileName ( const G4String gdmlFileName_)
inline

Definition at line 241 of file CexmcRunManager.hh.

242 {
243  if ( ProjectIsRead() )
245 
246  gdmlFileName = gdmlFileName_;
247 }
G4bool ProjectIsRead(void) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetGdmlFileValidation()

void CexmcRunManager::SetGdmlFileValidation ( G4bool  on = true)
inline

Definition at line 250 of file CexmcRunManager.hh.

251 {
253 }
G4bool shouldGdmlFileBeValidated
Here is the caller graph for this function:

◆ SetGuiMacroName()

void CexmcRunManager::SetGuiMacroName ( const G4String guiMacroName_)
inline

Definition at line 256 of file CexmcRunManager.hh.

257 {
258  guiMacroName = guiMacroName_;
259 }
Here is the caller graph for this function:

◆ SetPhysicsManager()

void CexmcRunManager::SetPhysicsManager ( CexmcPhysicsManager physicsManager_)
inline

Definition at line 224 of file CexmcRunManager.hh.

226 {
227  physicsManager = physicsManager_;
228 }
CexmcPhysicsManager * physicsManager
Here is the caller graph for this function:

◆ SetProductionModelType()

void CexmcRunManager::SetProductionModelType ( CexmcProductionModelType  productionModelType_)
inline

Definition at line 231 of file CexmcRunManager.hh.

233 {
234  if ( ProjectIsRead() )
236 
237  productionModelType = productionModelType_;
238 }
G4bool ProjectIsRead(void) const
CexmcProductionModelType productionModelType
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupConstructionHook()

void CexmcRunManager::SetupConstructionHook ( void  )

Definition at line 1361 of file CexmcRunManager.cc.

1362 {
1363 #ifdef CEXMC_USE_PERSISTENCY
1364  /* save gdml file */
1365  G4String cmd( "" );
1366  CexmcExceptionType exceptionType( CexmcSystemException );
1367 
1368  if ( zipGdmlFile )
1369  {
1370  if ( ProjectIsRead() )
1371  {
1372  cmd = G4String( "bzip2 " ) + projectsDir + "/" + rProject +
1373  gdmlFileExtension;
1374  }
1375  else
1376  {
1377  if ( ProjectIsSaved() )
1378  cmd = G4String( "bzip2 -c " ) + gdmlFileName + " > " +
1379  projectsDir + "/" + projectId + gdmlbz2FileExtension;
1380  }
1381  exceptionType = CexmcFileCompressException;
1382  }
1383  else
1384  {
1385  if ( ! ProjectIsRead() && ProjectIsSaved() )
1386  cmd = G4String( "cp " ) + gdmlFileName + " " + projectsDir + "/" +
1387  projectId + gdmlFileExtension;
1388  /* else already saved in ReadPreinitProjectData() */
1389  }
1390 
1391  if ( ! cmd.empty() && system( cmd ) != 0 )
1392  throw CexmcException( exceptionType );
1393 #endif
1394 }
G4bool ProjectIsRead(void) const
G4bool ProjectIsSaved(void) const
CexmcExceptionType
system("rm -rf microbeam.root")
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldGdmlFileBeValidated()

G4bool CexmcRunManager::ShouldGdmlFileBeValidated ( void  ) const
inline

Definition at line 301 of file CexmcRunManager.hh.

302 {
304 }
G4bool shouldGdmlFileBeValidated
Here is the caller graph for this function:

Member Data Documentation

◆ basePhysicsUsed

CexmcBasePhysicsUsed CexmcRunManager::basePhysicsUsed
private

Definition at line 168 of file CexmcRunManager.hh.

◆ cfFileName

G4String CexmcRunManager::cfFileName
private

Definition at line 186 of file CexmcRunManager.hh.

◆ curEventRead

G4int CexmcRunManager::curEventRead
private

Definition at line 201 of file CexmcRunManager.hh.

◆ evDataVerboseLevel

CexmcEventDataVerboseLevel CexmcRunManager::evDataVerboseLevel
private

Definition at line 192 of file CexmcRunManager.hh.

◆ eventCountPolicy

CexmcEventCountPolicy CexmcRunManager::eventCountPolicy
private

Definition at line 188 of file CexmcRunManager.hh.

◆ gdmlFileName

G4String CexmcRunManager::gdmlFileName
private

Definition at line 172 of file CexmcRunManager.hh.

◆ guiMacroName

G4String CexmcRunManager::guiMacroName
private

Definition at line 184 of file CexmcRunManager.hh.

◆ messenger

CexmcRunManagerMessenger* CexmcRunManager::messenger
private

Definition at line 220 of file CexmcRunManager.hh.

◆ numberOfEventsProcessed

G4int CexmcRunManager::numberOfEventsProcessed
private

Definition at line 197 of file CexmcRunManager.hh.

◆ numberOfEventsProcessedEffective

G4int CexmcRunManager::numberOfEventsProcessedEffective
private

Definition at line 199 of file CexmcRunManager.hh.

◆ physicsManager

CexmcPhysicsManager* CexmcRunManager::physicsManager
private

Definition at line 217 of file CexmcRunManager.hh.

◆ productionModelType

CexmcProductionModelType CexmcRunManager::productionModelType
private

Definition at line 170 of file CexmcRunManager.hh.

◆ projectId

G4String CexmcRunManager::projectId
private

Definition at line 180 of file CexmcRunManager.hh.

◆ projectsDir

G4String CexmcRunManager::projectsDir
private

Definition at line 178 of file CexmcRunManager.hh.

◆ rEvDataVerboseLevel

CexmcEventDataVerboseLevel CexmcRunManager::rEvDataVerboseLevel
private

Definition at line 194 of file CexmcRunManager.hh.

◆ rProject

G4String CexmcRunManager::rProject
private

Definition at line 182 of file CexmcRunManager.hh.

◆ shouldGdmlFileBeValidated

G4bool CexmcRunManager::shouldGdmlFileBeValidated
private

Definition at line 174 of file CexmcRunManager.hh.

◆ skipInteractionsWithoutEDTonWrite

G4bool CexmcRunManager::skipInteractionsWithoutEDTonWrite
private

Definition at line 190 of file CexmcRunManager.hh.

◆ zipGdmlFile

G4bool CexmcRunManager::zipGdmlFile
private

Definition at line 176 of file CexmcRunManager.hh.


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