Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -25,47 +25,47 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4GlobalFastSimulationManager.hh
|
||||
//
|
||||
// Description:
|
||||
// A singleton class which manages the Fast Simulation managers
|
||||
// A singleton class which manages the Fast Simulation managers
|
||||
// attached to envelopes.
|
||||
//
|
||||
// History:
|
||||
// June 98: Verderi && MoraDeFreitas - "G4ParallelWorld" becomes
|
||||
// "G4FlavoredParallelWorld"; some method name changes;
|
||||
// GetFlavoredWorldForThis now returns a
|
||||
// GetFlavoredWorldForThis now returns a
|
||||
// G4FlavoredParallelWorld pointer.
|
||||
// Feb 98: Verderi && MoraDeFreitas - First Implementation.
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#ifndef G4GlobalFastSimulationManager_hh
|
||||
#define G4GlobalFastSimulationManager_hh
|
||||
#ifndef G4GLOBALFASTSIMULATIONMANAGER_HH
|
||||
#define G4GLOBALFASTSIMULATIONMANAGER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4FastSimulationVector.hh"
|
||||
|
||||
#include "G4VGlobalFastSimulationManager.hh"
|
||||
#include "G4FastSimulationManager.hh"
|
||||
#include "G4FastSimulationManagerProcess.hh"
|
||||
|
||||
#include "G4FastSimulationVector.hh"
|
||||
#include "G4VGlobalFastSimulationManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4FastSimulationMessenger;
|
||||
template <class T>
|
||||
class G4ThreadLocalSingleton;
|
||||
|
||||
enum listType {
|
||||
enum listType
|
||||
{
|
||||
NAMES_ONLY,
|
||||
MODELS,
|
||||
ISAPPLICABLE
|
||||
};
|
||||
|
||||
|
||||
// Class Description:
|
||||
// This a singleton class which provides the management of the G4FastSimulationManager
|
||||
// objects and some ghost facilities.
|
||||
// objects and some ghost facilities.
|
||||
//
|
||||
// You can get access to it by:
|
||||
//
|
||||
@@ -76,91 +76,81 @@ enum listType {
|
||||
// globalFSM = G4GlobalFastSimulationManager::getGlobalFastSimulationManager();
|
||||
// ...
|
||||
// ...
|
||||
//
|
||||
// Presently, you will mainly need to use the GlobalFastSimulationManager if you use ghost
|
||||
//
|
||||
// Presently, you will mainly need to use the GlobalFastSimulationManager if you use ghost
|
||||
// geometries.
|
||||
//
|
||||
|
||||
class G4GlobalFastSimulationManager
|
||||
{
|
||||
friend class G4ThreadLocalSingleton<G4GlobalFastSimulationManager>;
|
||||
|
||||
public: // With description
|
||||
public:
|
||||
// Destructor
|
||||
~G4GlobalFastSimulationManager();
|
||||
|
||||
static G4GlobalFastSimulationManager* GetGlobalFastSimulationManager();
|
||||
// Provides a global access to the GlobalFastSimulationManager
|
||||
static G4GlobalFastSimulationManager* GetInstance();
|
||||
// Same as GetGlobalFastSimulationManager()
|
||||
|
||||
G4VFastSimulationModel* GetFastSimulationModel(const G4String& modelName,
|
||||
const G4VFastSimulationModel* previousFound = 0) const;
|
||||
// Iterative fetch of G4VFastSimulationModel objects by name:
|
||||
// o returns the G4VFastSimulationModel* of model with name modelName;
|
||||
// o returns 0 if no model found;
|
||||
// o usage:
|
||||
// myModel = gblManager->GetFastSimulationModel("MyModel");
|
||||
// o note for the case of several models having the same name:
|
||||
// - to get the first "MyModel" model:
|
||||
// myModel1 = gblManager->GetFastSimulationModel("MyModel", 0);
|
||||
// - to get the next one:
|
||||
// myModel2 = gblManager->GetFastSimulationModel("MyModel", myModel1);
|
||||
// - and so on.
|
||||
// - When gblManager->GetFastSimulationModel("MyModel", myModel_n)
|
||||
// returns a null pointer, no extra model with name "MyModel" exist.
|
||||
// Provides a global access to the GlobalFastSimulationManager
|
||||
static G4GlobalFastSimulationManager* GetGlobalFastSimulationManager();
|
||||
|
||||
|
||||
public: // Without description
|
||||
// Same as GetGlobalFastSimulationManager()
|
||||
static G4GlobalFastSimulationManager* GetInstance();
|
||||
|
||||
// Destructor
|
||||
~G4GlobalFastSimulationManager();
|
||||
// Iterative fetch of G4VFastSimulationModel objects by name:
|
||||
// o returns the G4VFastSimulationModel* of model with name modelName;
|
||||
// o returns 0 if no model found;
|
||||
// o usage:
|
||||
// myModel = gblManager->GetFastSimulationModel("MyModel");
|
||||
// o note for the case of several models having the same name:
|
||||
// - to get the first "MyModel" model:
|
||||
// myModel1 = gblManager->GetFastSimulationModel("MyModel", 0);
|
||||
// - to get the next one:
|
||||
// myModel2 = gblManager->GetFastSimulationModel("MyModel", myModel1);
|
||||
// - and so on.
|
||||
// - When gblManager->GetFastSimulationModel("MyModel", myModel_n)
|
||||
// returns a null pointer, no extra model with name "MyModel" exist.
|
||||
G4VFastSimulationModel*
|
||||
GetFastSimulationModel(const G4String& modelName,
|
||||
const G4VFastSimulationModel* previousFound = nullptr) const;
|
||||
|
||||
//
|
||||
// G4FastSimulationManager(Process)'s management, no intended for general use.
|
||||
//
|
||||
// Methods for a G4FastSimulationManager to register itself
|
||||
//
|
||||
void AddFastSimulationManager(G4FastSimulationManager*);
|
||||
void RemoveFastSimulationManager(G4FastSimulationManager*);
|
||||
//
|
||||
// G4FastSimulationManagerProcess bookeeping:
|
||||
//
|
||||
void AddFSMP(G4FastSimulationManagerProcess*);
|
||||
void RemoveFSMP(G4FastSimulationManagerProcess*);
|
||||
//
|
||||
// G4FastSimulationManager(Process)'s management, no intended for general use.
|
||||
//
|
||||
// Methods for a G4FastSimulationManager to register itself
|
||||
//
|
||||
void AddFastSimulationManager(G4FastSimulationManager*);
|
||||
void RemoveFastSimulationManager(G4FastSimulationManager*);
|
||||
//
|
||||
// G4FastSimulationManagerProcess bookeeping:
|
||||
//
|
||||
void AddFSMP(G4FastSimulationManagerProcess*);
|
||||
void RemoveFSMP(G4FastSimulationManagerProcess*);
|
||||
|
||||
// Flag that the Parameterisation must be closed.
|
||||
void FastSimulationNeedsToBeClosed();
|
||||
|
||||
// Flag that the Parameterisation must be closed.
|
||||
void FastSimulationNeedsToBeClosed();
|
||||
// Show the fast simulation setup : world(s), region(s), model(s) and links between them.
|
||||
// Requires the geometry to be closed.
|
||||
void ShowSetup();
|
||||
|
||||
void ListEnvelopes(const G4String& aName = "all", listType aListType = NAMES_ONLY);
|
||||
void ListEnvelopes(const G4ParticleDefinition*);
|
||||
|
||||
public: // With description
|
||||
void ShowSetup();
|
||||
// Show the fast simulation setup : world(s), region(s), model(s) and links between them.
|
||||
// Requires the geometry to be closed.
|
||||
void ActivateFastSimulationModel(const G4String&);
|
||||
void InActivateFastSimulationModel(const G4String&);
|
||||
|
||||
void Flush();
|
||||
|
||||
public: // Without description
|
||||
private:
|
||||
// Private construtor insures singleton class
|
||||
G4GlobalFastSimulationManager();
|
||||
|
||||
void ListEnvelopes(const G4String& aName = "all",
|
||||
listType aListType = NAMES_ONLY);
|
||||
void ListEnvelopes(const G4ParticleDefinition* );
|
||||
|
||||
void ActivateFastSimulationModel(const G4String&);
|
||||
void InActivateFastSimulationModel(const G4String&);
|
||||
// recursive display of regions, models, etc...
|
||||
void DisplayRegion(G4Region* motherRegion, G4int depth,
|
||||
std::vector<G4ParticleDefinition*>& particles) const;
|
||||
|
||||
void Flush();
|
||||
|
||||
private:
|
||||
// Private construtor insures singleton class
|
||||
G4GlobalFastSimulationManager();
|
||||
|
||||
// recursive display of regions, models, etc...
|
||||
void DisplayRegion(G4Region* motherRegion, G4int depth, std::vector<G4ParticleDefinition*>& particles) const;
|
||||
|
||||
// The single instance.
|
||||
static G4ThreadLocal G4GlobalFastSimulationManager* fGlobalFastSimulationManager;
|
||||
G4FastSimulationMessenger* fTheFastSimulationMessenger;
|
||||
G4FastSimulationVector <G4FastSimulationManager> ManagedManagers;
|
||||
G4FastSimulationVector <G4FastSimulationManagerProcess> fFSMPVector;
|
||||
G4FastSimulationMessenger* fTheFastSimulationMessenger;
|
||||
G4FastSimulationVector<G4FastSimulationManager> ManagedManagers;
|
||||
G4FastSimulationVector<G4FastSimulationManagerProcess> fFSMPVector;
|
||||
};
|
||||
|
||||
#endif
|
||||
// end of #ifndef G4GlobalFastSimulationManager_hh
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user