1 | #include "ELYSE/TrackingActionMessenger.hh"
|
---|
2 |
|
---|
3 | //Geant4
|
---|
4 | #include "G4UIdirectory.hh"
|
---|
5 | #include "G4ios.hh"
|
---|
6 | #include "globals.hh"
|
---|
7 | #include "G4UIcmdWithABool.hh"
|
---|
8 |
|
---|
9 | //ELYSE
|
---|
10 | #include "ELYSE/TrackingAction.hh"
|
---|
11 |
|
---|
12 |
|
---|
13 | ELYSE::TrackingActionMessenger::TrackingActionMessenger(ELYSE::TrackingAction* ELYSETrackAction)
|
---|
14 | :ELYSETrackingAction(ELYSETrackAction) {
|
---|
15 |
|
---|
16 | ELYSEDir = new G4UIdirectory("/ELYSE/tracking/drawing/");
|
---|
17 | ELYSEDir->SetGuidance("Commands to define particle drawing option");
|
---|
18 |
|
---|
19 | drawOpticalPhotonCmd = new G4UIcmdWithABool("/ELYSE/tracking/drawing/optical",this);
|
---|
20 | drawOpticalPhotonCmd->SetGuidance("Available options: true false");
|
---|
21 | drawOpticalPhotonCmd->SetGuidance("Description:");
|
---|
22 | drawOpticalPhotonCmd->SetGuidance("true = optical photons are stored to be drawn");
|
---|
23 | drawOpticalPhotonCmd->SetGuidance("false = no optical photons stored");
|
---|
24 | drawOpticalPhotonCmd->SetParameterName("drawOpticalPhoton",true);
|
---|
25 | drawOpticalPhotonCmd->SetDefaultValue(false);
|
---|
26 | }//Ctor
|
---|
27 |
|
---|
28 | //---------------------------------------------------------------------------------
|
---|
29 |
|
---|
30 | ELYSE::TrackingActionMessenger::~TrackingActionMessenger() {
|
---|
31 | delete drawOpticalPhotonCmd;
|
---|
32 | delete ELYSEDir;
|
---|
33 | }//Dtor
|
---|
34 |
|
---|
35 | //---------------------------------------------------------------------------------
|
---|
36 |
|
---|
37 | void ELYSE::TrackingActionMessenger::SetNewValue(G4UIcommand* command, G4String newValue) {
|
---|
38 | if (command == drawOpticalPhotonCmd) {
|
---|
39 | G4cout << "(JEC) TrackingActionMessenger Draw Optical Photon" << G4endl;
|
---|
40 | ELYSETrackingAction->SetDrawOpticalPhoton(StoB(newValue));
|
---|
41 | }
|
---|
42 | }//SetNewValue
|
---|