Updated class description: added class name title, author;
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Aug 2001 19:37:15 +0000 (19:37 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Aug 2001 19:37:15 +0000 (19:37 +0000)
added new commands:  /g4mc/printProcessMCMap, /g4mc/printProcessControlsMap,
/g4mc/printVolumeLimits, /g4mc/printGeneralCuts, /g4mc/printGeneralControls

TGeant4/TG4Messenger.cxx
TGeant4/TG4Messenger.h

index 818dfc0..a0fa078 100644 (file)
@@ -1,15 +1,26 @@
 // $Id$
 // Category: run
 //
+// Author: I. Hrivnacova
+//
+// Class TG4Messenger
+// ------------------
 // See the class description in the header file.
 
 #include "TG4Messenger.h"
 #include "TG4GeometryManager.h"
+#include "TG4GeometryServices.h"
 #include "TG4StepManager.h"
 #include "TG4PhysicsManager.h"
+#include "TG4G3PhysicsManager.h"
+#include "TG4G3CutVector.h"
+#include "TG4G3ControlVector.h"
+#include "TG4ProcessControlMap.h"
+#include "TG4ProcessMCMap.h"
 
 #include <G4UIcmdWithoutParameter.hh>
 #include <G4UIcmdWithABool.hh>
+#include <G4UIcmdWithAString.hh>
 
 //_____________________________________________________________________________
 TG4Messenger::TG4Messenger(TG4GeometryManager* geometryManager, 
@@ -58,6 +69,37 @@ TG4Messenger::TG4Messenger(TG4GeometryManager* geometryManager,
      = new G4UIcmdWithoutParameter("/g4mc/setProcessActivation", this);
   fProcessActivationCmd->SetGuidance("Activate/inactivate physics processes.");
   fProcessActivationCmd->AvailableForStates(Idle);
+
+  fPrintProcessMCMapCmd
+     = new G4UIcmdWithoutParameter("/g4mc/printProcessMCMap", this);
+  fPrintProcessMCMapCmd
+    ->SetGuidance("Prints mapping of G4 processes to G3 controls.");
+  fPrintProcessMCMapCmd->AvailableForStates(Idle);
+
+  fPrintProcessControlMapCmd
+     = new G4UIcmdWithoutParameter("/g4mc/printProcessControlMap", this);
+  fPrintProcessControlMapCmd
+    ->SetGuidance("Prints mapping of G4 processes to G3 controls.");
+  fPrintProcessControlMapCmd->AvailableForStates(Idle);
+
+  fPrintVolumeLimitsCmd
+     = new G4UIcmdWithAString("/g4mc/printVolumeLimits", this);
+  fPrintVolumeLimitsCmd
+    ->SetGuidance("Prints the limits set to the specified volume.");
+  fPrintVolumeLimitsCmd->SetParameterName("PrintVolumeLimits", false);
+  fPrintVolumeLimitsCmd->AvailableForStates(Idle);
+
+  fPrintGeneralCutsCmd
+     = new G4UIcmdWithoutParameter("/g4mc/printGeneralCuts", this);
+  fPrintGeneralCutsCmd
+    ->SetGuidance("Prints the general G3 cuts.");
+  fPrintGeneralCutsCmd->AvailableForStates(Idle);
+
+  fPrintGeneralControlsCmd
+     = new G4UIcmdWithoutParameter("/g4mc/printGeneralControls", this);
+  fPrintGeneralControlsCmd
+    ->SetGuidance("Prints the general G3 process controls.");
+  fPrintGeneralControlsCmd->AvailableForStates(Idle);
 }
 
 //_____________________________________________________________________________
@@ -80,6 +122,11 @@ TG4Messenger::~TG4Messenger() {
   delete fSetSpecialCutsCmd;
   delete fSetSpecialControlsCmd;
   delete fProcessActivationCmd;
+  delete fPrintProcessMCMapCmd;
+  delete fPrintProcessControlMapCmd;
+  delete fPrintVolumeLimitsCmd;
+  delete fPrintGeneralCutsCmd;
+  delete fPrintGeneralControlsCmd;
 }
 
 // operators
@@ -124,7 +171,22 @@ void TG4Messenger::SetNewValue(G4UIcommand* command, G4String newValue)
       ->SetSpecialControlsPhysics(
           fSetSpecialControlsCmd->GetNewBoolValue(newValue)); 
   }    
-  if (command == fProcessActivationCmd) {
+  else if (command == fProcessActivationCmd) {
     fPhysicsManager->SetProcessActivation();
   }  
+  else if (command == fPrintProcessMCMapCmd) {
+    TG4ProcessMCMap::Instance()->PrintAll();
+  }  
+  else if (command == fPrintProcessControlMapCmd) {
+    TG4ProcessControlMap::Instance()->PrintAll();
+  }  
+  else if (command == fPrintVolumeLimitsCmd) {
+    TG4GeometryServices::Instance()->PrintVolumeLimits(newValue);
+  }  
+  else if (command == fPrintGeneralCutsCmd) {
+    TG4G3PhysicsManager::Instance()->GetCutVector()->Print();
+  }  
+  else if (command == fPrintGeneralControlsCmd) {
+    TG4G3PhysicsManager::Instance()->GetControlVector()->Print();
+  }  
 }
index 6edba46..dca2163 100644 (file)
@@ -1,8 +1,12 @@
 // $Id$
 // Category: run
 //
+// Author: I. Hrivnacova
+//
+// Class TG4Messenger
+// ------------------
 // Messenger class that defines commands for 
-// geometry, physics and step managers
+// geometry, physics and step managers.
 
 #ifndef TG4_MESSENGER_H
 #define TG4_MESSENGER_H 
@@ -16,6 +20,7 @@ class TG4StepManager;
 
 class G4UIcmdWithoutParameter;
 class G4UIcmdWithABool;
+class G4UIcmdWithAString;
 
 class TG4Messenger: public G4UImessenger
 {
@@ -51,6 +56,16 @@ class TG4Messenger: public G4UImessenger
     G4UIcmdWithABool*  fSetSpecialControlsCmd;//setSpecialControls command   
     G4UIcmdWithoutParameter*  fProcessActivationCmd; //.
                                               //setProcessActivation command    
+    G4UIcmdWithoutParameter*  fPrintProcessMCMapCmd; //.
+                                              //printProcessMCMap command
+    G4UIcmdWithoutParameter*  fPrintProcessControlMapCmd; //.
+                                              //printProcessControlsMap command
+    G4UIcmdWithAString*       fPrintVolumeLimitsCmd; //.
+                                              //printVolumeLimits command
+    G4UIcmdWithoutParameter*  fPrintGeneralCutsCmd; //.
+                                              //printGeneralCuts command
+    G4UIcmdWithoutParameter*  fPrintGeneralControlsCmd; //.
+                                              //printGeneralControls command
 };
 
 #endif //TG4_MESSENGER_H