GGS(GenericGEANT4Simulation)Software  2.99.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Macros
Macros
GGSMCPluginMacros.h File Reference
#include "montecarlo/useractions/GGSUserAction.h"
#include "utils/GGSFactory.h"
#include "G4VUserPrimaryGeneratorAction.hh"
Include dependency graph for GGSMCPluginMacros.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PhysicsListPlugin(plClass)
 Macro for automatic definition of physics list builder function. More...
 
#define RegisterSD(sdClassName)
 Macro for registration of sensitive detector classes. More...
 
#define RegisterUA(uaClassName)
 Macro for registration of user actions classes.
 
#define RegisterGA(gaClassName, gaName)
 Macro for registration of user generator actions. More...
 

Detailed Description

Useful macros for MC plugin creation.

Definition in file GGSMCPluginMacros.h.

Macro Definition Documentation

#define PhysicsListPlugin (   plClass)
Value:
extern "C" G4VUserPhysicsList *PhysicsListBuilder() { return new plClass(); } \
extern "C" void PhysicsListDestroyer(plClass *p) { delete p; }

Macro for automatic definition of physics list builder function.

Definition at line 14 of file GGSMCPluginMacros.h.

#define RegisterGA (   gaClassName,
  gaName 
)
Value:
G4VUserPrimaryGeneratorAction *gaClassName##Builder() { return new gaClassName; } \
class gaClassName##Proxy { \
public: \
gaClassName##Proxy() { \
} \
}; \
gaClassName##Proxy proxyFor##gaClassName##Builder
static GGSFactory & GetInstance()
Getter method for singleton pointer.
Definition: GGSFactory.h:72
bool RegisterBuilder(const std::string &builderName, T *(*objectBuilder)(ConstructorArgs...))
Register a builder for a class.
Definition: GGSFactory.h:93

Macro for registration of user generator actions.

Definition at line 80 of file GGSMCPluginMacros.h.

#define RegisterSD (   sdClassName)
Value:
G4VSensitiveDetector *sdClassName##Builder(std::string name) { return new sdClassName(name); } \
void sdClassName##Destroyer(sdClassName *p) { delete p; } \
class sdClassName##Proxy { \
public: \
sdClassName##Proxy() { \
sdClassName##Builder); \
} \
}; \
sdClassName##Proxy proxyFor##sdClassName
static GGSFactory & GetInstance()
Getter method for singleton pointer.
Definition: GGSFactory.h:72
bool RegisterBuilder(const std::string &builderName, T *(*objectBuilder)(ConstructorArgs...))
Register a builder for a class.
Definition: GGSFactory.h:93

Macro for registration of sensitive detector classes.

Definition at line 19 of file GGSMCPluginMacros.h.