SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_UserActionManager.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 
27 #ifndef SToGS_UserActionManager_h
28 #define SToGS_UserActionManager_h 1
29 
31 
32 class G4VUserDetectorConstruction;
33 class G4VUserPhysicsList;
34 
36 namespace SToGS {
38 
43  {
44  private:
45  SToGS::UserActionInitialization *fImplementation;
46 
47  protected:
49 
52  std::pair < G4String, G4String > fWhichGenerator;
53  std::pair < G4String, G4String > fWhichGeometry;
54  std::pair < G4String, G4String > fWhichPhysics;
55 
57  std::pair < G4String, G4String > fWhichActionManager;
58 
59  protected:
60  G4int fNbThreads;
61 
62  protected:
65 
66  public:
67  UserActionManager(G4String configurationfile = "");
69  {;}
70  public:
72  G4int GetNbThread() const
73  {
74  return fNbThreads;
75  }
77  virtual G4VUserDetectorConstruction *GetDetectorConstruction() const;
79  virtual G4VUserPhysicsList *GetPhysicsList() const;
82  {
83  return fImplementation;
84  }
85  };
86 } // SToGS Namespace
87 
88 #endif
89 
90 
SToGS::UserActionInitialization * ProvideUserActionInitialization()
depending of the configuration file, it returns the adapted UserActionInitialization ...
UserActionManager(G4String configurationfile="")
G4int GetNbThread() const
allows the user to specify the number of threads
std::pair< G4String, G4String > fWhichGenerator
In principle in Geant4.10, geometry and physics are golbal so they are not provided by G4VUserActionI...
virtual G4VUserPhysicsList * GetPhysicsList() const
Return the physics list depending of the configuration file.
Manager which, based on a configuration file, manages user's actions + selection of the geometry and ...
virtual UserActionInitialization * GetUserActionInitialization()
Return the UserActionInitialisation.
std::pair< G4String, G4String > fWhichGeometry
Base class to manage SToGS user's hooks + the generator.
std::pair< G4String, G4String > fWhichActionManager
Real stuff the G4VUserActionInitialization should deal with.
virtual G4VUserDetectorConstruction * GetDetectorConstruction() const
Return the detector depending of the configuration file.
std::pair< G4String, G4String > fWhichPhysics