Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -34,29 +34,29 @@
|
||||
#ifndef G4RunManagerFactory_hh
|
||||
#define G4RunManagerFactory_hh 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MTRunManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4TaskRunManager.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VUserTaskQueue.hh"
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <regex>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
//============================================================================//
|
||||
|
||||
enum class G4RunManagerType : G4int
|
||||
{
|
||||
Serial = 0,
|
||||
SerialOnly = 1,
|
||||
MT = 2,
|
||||
MTOnly = 3,
|
||||
Tasking = 4,
|
||||
Serial = 0,
|
||||
SerialOnly = 1,
|
||||
MT = 2,
|
||||
MTOnly = 3,
|
||||
Tasking = 4,
|
||||
TaskingOnly = 5,
|
||||
TBB = 6,
|
||||
TBBOnly = 7,
|
||||
TBB = 6,
|
||||
TBBOnly = 7,
|
||||
Default
|
||||
};
|
||||
|
||||
@@ -64,42 +64,39 @@ enum class G4RunManagerType : G4int
|
||||
|
||||
class G4RunManagerFactory
|
||||
{
|
||||
public:
|
||||
static G4RunManager* CreateRunManager(
|
||||
G4RunManagerType _type = G4RunManagerType::Default,
|
||||
G4VUserTaskQueue* _queue = nullptr, G4bool fail_if_unavail = true,
|
||||
G4int nthreads = 0);
|
||||
public:
|
||||
static G4RunManager* CreateRunManager(G4RunManagerType _type = G4RunManagerType::Default,
|
||||
G4VUserTaskQueue* _queue = nullptr,
|
||||
G4bool fail_if_unavail = true, G4int nthreads = 0);
|
||||
|
||||
// provide a version which specifies to fail if unavailable
|
||||
static G4RunManager* CreateRunManager(G4RunManagerType _type,
|
||||
G4bool fail_if_unavail,
|
||||
G4int nthreads = 0,
|
||||
G4VUserTaskQueue* _queue = nullptr)
|
||||
{
|
||||
return CreateRunManager(_type, _queue, fail_if_unavail, nthreads);
|
||||
}
|
||||
// provide a version which specifies to fail if unavailable
|
||||
static G4RunManager* CreateRunManager(G4RunManagerType _type, G4bool fail_if_unavail,
|
||||
G4int nthreads = 0, G4VUserTaskQueue* _queue = nullptr)
|
||||
{
|
||||
return CreateRunManager(_type, _queue, fail_if_unavail, nthreads);
|
||||
}
|
||||
|
||||
static G4RunManager* CreateRunManager(G4RunManagerType _type, G4int nthreads,
|
||||
G4bool fail_if_unavail = true,
|
||||
G4VUserTaskQueue* _queue = nullptr)
|
||||
{
|
||||
return CreateRunManager(_type, _queue, fail_if_unavail, nthreads);
|
||||
}
|
||||
static G4RunManager* CreateRunManager(G4RunManagerType _type, G4int nthreads,
|
||||
G4bool fail_if_unavail = true,
|
||||
G4VUserTaskQueue* _queue = nullptr)
|
||||
{
|
||||
return CreateRunManager(_type, _queue, fail_if_unavail, nthreads);
|
||||
}
|
||||
|
||||
// provide string versions of above
|
||||
template <typename... Args>
|
||||
static G4RunManager* CreateRunManager(std::string type, Args&&... args)
|
||||
{
|
||||
return CreateRunManager(GetType(type), std::forward<Args>(args)...);
|
||||
}
|
||||
// provide string versions of above
|
||||
template<typename... Args>
|
||||
static G4RunManager* CreateRunManager(std::string type, Args&&... args)
|
||||
{
|
||||
return CreateRunManager(GetType(type), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
static std::string GetDefault();
|
||||
static std::string GetName(G4RunManagerType);
|
||||
static G4RunManagerType GetType(const std::string&);
|
||||
static std::set<std::string> GetOptions();
|
||||
static G4RunManager* GetMasterRunManager();
|
||||
static G4MTRunManager* GetMTMasterRunManager();
|
||||
static G4RunManagerKernel* GetMasterRunManagerKernel();
|
||||
static std::string GetDefault();
|
||||
static std::string GetName(G4RunManagerType);
|
||||
static G4RunManagerType GetType(const std::string&);
|
||||
static std::set<std::string> GetOptions();
|
||||
static G4RunManager* GetMasterRunManager();
|
||||
static G4MTRunManager* GetMTMasterRunManager();
|
||||
static G4RunManagerKernel* GetMasterRunManagerKernel();
|
||||
};
|
||||
|
||||
#endif // G4TaskRunManagerCreator_h
|
||||
|
||||
Reference in New Issue
Block a user