]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
TG4Messenger replaced with TG4PhysicsMessenger
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2001 16:54:36 +0000 (16:54 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Nov 2001 16:54:36 +0000 (16:54 +0000)
TGeant4/TG4PhysicsMessenger.cxx [moved from TGeant4/TG4Messenger.cxx with 76% similarity]
TGeant4/TG4PhysicsMessenger.h [moved from TGeant4/TG4Messenger.h with 65% similarity]

similarity index 76%
rename from TGeant4/TG4Messenger.cxx
rename to TGeant4/TG4PhysicsMessenger.cxx
index 63b82c6d46800f5e6263d65c91a2bc053d8bb018..0225b465b28d904258bf01dff4abcc9df4236b52 100644 (file)
@@ -1,16 +1,14 @@
 // $Id$
-// Category: run
+// Category: physics
 //
 // Author: I. Hrivnacova
 //
-// Class TG4Messenger
-// ------------------
+// Class TG4PhysicsMessenger
+// -------------------------
 // See the class description in the header file.
 
-#include "TG4Messenger.h"
-#include "TG4GeometryManager.h"
+#include "TG4PhysicsMessenger.h"
 #include "TG4GeometryServices.h"
-#include "TG4StepManager.h"
 #include "TG4PhysicsManager.h"
 #include "TG4G3PhysicsManager.h"
 #include "TG4G3CutVector.h"
 #include "TG4ProcessControlMap.h"
 #include "TG4ProcessMCMap.h"
 
+#include <G4UIdirectory.hh>
 #include <G4UIcmdWithoutParameter.hh>
 #include <G4UIcmdWithABool.hh>
 #include <G4UIcmdWithAString.hh>
 
 //_____________________________________________________________________________
-TG4Messenger::TG4Messenger(TG4GeometryManager* geometryManager, 
-                           TG4PhysicsManager* physicsManager, 
-                          TG4StepManager* stepManager)
-  : fGeometryManager(geometryManager),
-    fPhysicsManager(physicsManager),
-    fStepManager(stepManager)
+TG4PhysicsMessenger::TG4PhysicsMessenger(TG4PhysicsManager* physicsManager)
+  : fPhysicsManager(physicsManager)
 { 
 //
+  fDirectory = new G4UIdirectory("/tg4Physics/");
+  fDirectory->SetGuidance("TGeant4 physics control commands.");
+
   fSetEMCmd
-     = new G4UIcmdWithABool("/g4mc/setEM", this);
+     = new G4UIcmdWithABool("/tg4Physics/setEM", this);
   fSetEMCmd->SetGuidance("Set electromagnetic physics.");
   fSetEMCmd->SetParameterName("EMControl", false);
   fSetEMCmd->AvailableForStates(PreInit);
 
   fSetMuonCmd
-     = new G4UIcmdWithABool("/g4mc/setMuon", this);
+     = new G4UIcmdWithABool("/tg4Physics/setMuon", this);
   fSetMuonCmd->SetGuidance("Set muon physics.");
   fSetMuonCmd->SetParameterName("EMControl", false);
   fSetMuonCmd->AvailableForStates(PreInit);
 
   fSetHadronCmd
-     = new G4UIcmdWithABool("/g4mc/setHadron", this);
+     = new G4UIcmdWithABool("/tg4Physics/setHadron", this);
   fSetHadronCmd->SetGuidance("Set hadron physics.");
   fSetHadronCmd->SetParameterName("HadronControl", false);
   fSetHadronCmd->AvailableForStates(PreInit);
 
   fSetOpticalCmd
-     = new G4UIcmdWithABool("/g4mc/setOptical", this);
+     = new G4UIcmdWithABool("/tg4Physics/setOptical", this);
   fSetOpticalCmd->SetGuidance("Set Cerenkov and optical physics.");
   fSetOpticalCmd->SetParameterName("OpticalControl", false);
   fSetOpticalCmd->AvailableForStates(PreInit);
 
   fSetSpecialCutsCmd
-     = new G4UIcmdWithABool("/g4mc/setSpecialCuts", this);
+     = new G4UIcmdWithABool("/tg4Physics/setSpecialCuts", this);
   fSetSpecialCutsCmd->SetGuidance("Set special cuts process.");
   fSetSpecialCutsCmd
     ->SetGuidance("!! Support for this option is under development.");
@@ -64,7 +62,7 @@ TG4Messenger::TG4Messenger(TG4GeometryManager* geometryManager,
   fSetSpecialCutsCmd->AvailableForStates(PreInit);
 
   fSetSpecialControlsCmd
-     = new G4UIcmdWithABool("/g4mc/setSpecialControls", this);
+     = new G4UIcmdWithABool("/tg4Physics/setSpecialControls", this);
   fSetSpecialControlsCmd->SetGuidance("Set special controls process.");
   fSetSpecialControlsCmd
     ->SetGuidance("!! Support for this option is under development.");
@@ -72,56 +70,58 @@ TG4Messenger::TG4Messenger(TG4GeometryManager* geometryManager,
   fSetSpecialControlsCmd->AvailableForStates(PreInit);
 
   fProcessActivationCmd
-     = new G4UIcmdWithoutParameter("/g4mc/setProcessActivation", this);
+     = new G4UIcmdWithoutParameter("/tg4Physics/setProcessActivation", this);
   fProcessActivationCmd->SetGuidance("Activate/inactivate physics processes.");
   fProcessActivationCmd->AvailableForStates(Idle);
 
   fPrintProcessMCMapCmd
-     = new G4UIcmdWithoutParameter("/g4mc/printProcessMCMap", this);
+     = new G4UIcmdWithoutParameter("/tg4Physics/printProcessMCMap", this);
   fPrintProcessMCMapCmd
     ->SetGuidance("Prints mapping of G4 processes to G3 controls.");
   fPrintProcessMCMapCmd->AvailableForStates(Idle);
 
   fPrintProcessControlMapCmd
-     = new G4UIcmdWithoutParameter("/g4mc/printProcessControlMap", this);
+     = new G4UIcmdWithoutParameter("/tg4Physics/printProcessControlMap", this);
   fPrintProcessControlMapCmd
     ->SetGuidance("Prints mapping of G4 processes to G3 controls.");
   fPrintProcessControlMapCmd->AvailableForStates(Idle);
 
   fPrintVolumeLimitsCmd
-     = new G4UIcmdWithAString("/g4mc/printVolumeLimits", this);
+     = new G4UIcmdWithAString("/tg4Physics/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);
+     = new G4UIcmdWithoutParameter("/tg4Physics/printGeneralCuts", this);
   fPrintGeneralCutsCmd
     ->SetGuidance("Prints the general G3 cuts.");
   fPrintGeneralCutsCmd->AvailableForStates(Idle);
 
   fPrintGeneralControlsCmd
-     = new G4UIcmdWithoutParameter("/g4mc/printGeneralControls", this);
+     = new G4UIcmdWithoutParameter("/tg4Physics/printGeneralControls", this);
   fPrintGeneralControlsCmd
     ->SetGuidance("Prints the general G3 process controls.");
   fPrintGeneralControlsCmd->AvailableForStates(Idle);
 }
 
 //_____________________________________________________________________________
-TG4Messenger::TG4Messenger(){
+TG4PhysicsMessenger::TG4PhysicsMessenger(){
 //
 } 
 
 //_____________________________________________________________________________
-TG4Messenger::TG4Messenger(const TG4Messenger& right) {
+TG4PhysicsMessenger::TG4PhysicsMessenger(const TG4PhysicsMessenger& right) {
 // 
-  TG4Globals::Exception("TG4Messenger is protected from copying.");
+  TG4Globals::Exception("TG4PhysicsMessenger is protected from copying.");
 }
 
 //_____________________________________________________________________________
-TG4Messenger::~TG4Messenger() {
+TG4PhysicsMessenger::~TG4PhysicsMessenger() {
 //
+
+  delete fDirectory;
   delete fSetEMCmd;
   delete fSetMuonCmd;
   delete fSetHadronCmd;
@@ -139,12 +139,12 @@ TG4Messenger::~TG4Messenger() {
 // operators
 
 //_____________________________________________________________________________
-TG4Messenger& TG4Messenger::operator=(const TG4Messenger& right)
+TG4PhysicsMessenger& TG4PhysicsMessenger::operator=(const TG4PhysicsMessenger& right)
 {
   // check assignement to self
   if (this == &right) return *this;
 
-  TG4Globals::Exception("TG4Messenger is protected from assigning.");
+  TG4Globals::Exception("TG4PhysicsMessenger is protected from assigning.");
     
   return *this;  
 }    
@@ -152,7 +152,7 @@ TG4Messenger& TG4Messenger::operator=(const TG4Messenger& right)
 // public methods
 
 //_____________________________________________________________________________
-void TG4Messenger::SetNewValue(G4UIcommand* command, G4String newValue)
+void TG4PhysicsMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
 { 
 // Applies command to the associated object.
 // ---
similarity index 65%
rename from TGeant4/TG4Messenger.h
rename to TGeant4/TG4PhysicsMessenger.h
index 37110b242f9f8e03000b268116a4a7675b8df8b1..18048df40df1231cd7edada638b1daac7ce4b4f7 100644 (file)
@@ -1,53 +1,48 @@
 // $Id$
-// Category: run
+// Category: physics
 //
 // Author: I. Hrivnacova
 //
-// Class TG4Messenger
-// ------------------
-// Messenger class that defines commands for 
-// geometry, physics and step managers.
+// Class TG4PhysicsMessenger
+// -------------------------
+// Messenger class that defines commands for the physics manager.
 
-#ifndef TG4_MESSENGER_H
-#define TG4_MESSENGER_H 
+#ifndef TG4_PHYSICS_MESSENGER_H
+#define TG4_PHYSICS_MESSENGER_H 
 
 #include <G4UImessenger.hh>
 #include <globals.hh>
 
-class TG4GeometryManager;
 class TG4PhysicsManager;
-class TG4StepManager;
 
+class G4UIdirectory;
 class G4UIcmdWithoutParameter;
 class G4UIcmdWithABool;
 class G4UIcmdWithAString;
 
-class TG4Messenger: public G4UImessenger
+class TG4PhysicsMessenger: public G4UImessenger
 {
   public:
-    TG4Messenger(TG4GeometryManager* geometryManager, 
-                 TG4PhysicsManager* physicsManager, 
-                TG4StepManager* stepManager);
+    TG4PhysicsMessenger(TG4PhysicsManager* physicsManager); 
     // --> protected   
-    // TG4Messenger();
-    // TG4Messenger(const TG4Messenger& right);
-    virtual ~TG4Messenger();
+    // TG4PhysicsMessenger();
+    // TG4PhysicsMessenger(const TG4PhysicsMessenger& right);
+    virtual ~TG4PhysicsMessenger();
    
     // methods 
     virtual void SetNewValue(G4UIcommand* command, G4String string);
     
   protected:
-    TG4Messenger();  
-    TG4Messenger(const TG4Messenger& right);
+    TG4PhysicsMessenger();  
+    TG4PhysicsMessenger(const TG4PhysicsMessenger& right);
 
     // operators
-    TG4Messenger& operator=(const TG4Messenger& right);
+    TG4PhysicsMessenger& operator=(const TG4PhysicsMessenger& right);
 
   private:
     // data members
-    TG4GeometryManager*       fGeometryManager; //geometry manager
-    TG4PhysicsManager*        fPhysicsManager;  //physics manager
-    TG4StepManager*           fStepManager;     //step manager
+    TG4PhysicsManager* fPhysicsManager;       //associated class
+    G4UIdirectory*     fDirectory;            //command directory
     
     G4UIcmdWithABool*  fSetEMCmd;             //setEM command   
     G4UIcmdWithABool*  fSetMuonCmd;           //setMuon command   
@@ -69,4 +64,4 @@ class TG4Messenger: public G4UImessenger
                                               //printGeneralControls command
 };
 
-#endif //TG4_MESSENGER_H
+#endif //TG4_PHYSICS_MESSENGER_H