GGS(GenericGEANT4Simulation)Software
2.7.0
|
Singleton for handling plugin scoring classes. More...
#include <GGSScoringManager.h>
Public Member Functions | |
~GGSScoringManager () | |
Destructor. | |
void | RegisterSDClass (const G4String &className, G4VSensitiveDetector *(*sdBuilder)(G4String)) |
Class registration method (class factory approach). More... | |
void | AddSDToLogVol (const G4String &sdClassName, const G4String &logVolNameAndParams) |
Adds a sensitive detector to a logical volume (class factory approach). More... | |
void | AddSDToLogVol (G4VSensitiveDetector *sd, G4LogicalVolume *logVol) |
Adds a sensitive detector to a logical volume (user build approach). More... | |
GGSScoringManagerMessenger * | GetMessenger () |
Getter for messenger. | |
Static Public Member Functions | |
static GGSScoringManager & | GetInstance () |
Singleton getter. More... | |
Singleton for handling plugin scoring classes.
This singleton manages the assignment of multiple sensitive detectors to a logical volume. The sensitive detectors can be provided by the user (user build approach) or be built by the singleton itself (class factory approach) in a messenger-driven way.
Definition at line 26 of file GGSScoringManager.h.
void GGSScoringManager::AddSDToLogVol | ( | const G4String & | sdClassName, |
const G4String & | logVolNameAndParams | ||
) |
Adds a sensitive detector to a logical volume (class factory approach).
This method adds a new sensitive detector to a logical volume. It can be called multiple times for each logical volume to add more sd to the same volume. The logical volume is specified by a string containing its name plus an eventual additional trailing string separated by a space and containing the parameters to initialize the sensitive detector. The format and the handling of the parameters are defined by the given sensitive detector.
sdClassName | The name of the sd class. |
logVolNameAndParams | The name of the logical volume, eventually followed by parameters. |
Definition at line 48 of file GGSScoringManager.cpp.
void GGSScoringManager::AddSDToLogVol | ( | G4VSensitiveDetector * | sd, |
G4LogicalVolume * | logVol | ||
) |
Adds a sensitive detector to a logical volume (user build approach).
This method adds a new sensitive detector to a logical volume. It can be called multiple times for each logical volume to add more sd to the same volume.
sd | Pointer to the sensitive detector. |
logVol | Pointer to the logical volume. |
Definition at line 90 of file GGSScoringManager.cpp.
|
static |
Singleton getter.
Definition at line 22 of file GGSScoringManager.cpp.
void GGSScoringManager::RegisterSDClass | ( | const G4String & | className, |
G4VSensitiveDetector *(*)(G4String) | sdBuilder | ||
) |
Class registration method (class factory approach).
className | The name of the sd class to be registered. |
sdBuilder | Builder function for sd class. |
Definition at line 37 of file GGSScoringManager.cpp.