From: ivana Date: Tue, 13 Feb 2001 14:19:17 +0000 (+0000) Subject: merged to TG4Messenger X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=9db1a0d3c06532cfbd6df41d00400d7b0853e493 merged to TG4Messenger --- diff --git a/TGeant4/TG4PhysicsListMessenger.cxx b/TGeant4/TG4PhysicsListMessenger.cxx deleted file mode 100644 index 186adfd6feb..00000000000 --- a/TGeant4/TG4PhysicsListMessenger.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// $Id$ -// Category: physics -// -// See the class description in the header file. - -#include "TG4PhysicsListMessenger.h" -#include "TG4PhysicsList.h" -#include "TG4Globals.h" - -#include - -TG4PhysicsListMessenger::TG4PhysicsListMessenger(TG4PhysicsList* physicsList) - : fPhysicsList(physicsList) -{ -// - fSetOpticalCmd - = new G4UIcmdWithABool("/g4mc/setOptical", this); - fSetOpticalCmd->SetGuidance("Set Cerenkov and optical processes."); - fSetOpticalCmd->SetParameterName("OpticalControl", false); - fSetOpticalCmd->AvailableForStates(PreInit); - - fSetHadronCmd - = new G4UIcmdWithABool("/g4mc/setHadron", this); - fSetHadronCmd->SetGuidance("Set hadron processes."); - fSetHadronCmd->SetParameterName("HadronControl", false); - fSetHadronCmd->AvailableForStates(PreInit); - - fSetSpecialCutsCmd - = new G4UIcmdWithABool("/g4mc/setSpecialCuts", this); - fSetSpecialCutsCmd->SetGuidance("Set special cuts process."); - fSetSpecialCutsCmd - ->SetGuidance("!! Support for this option is under development."); - fSetSpecialCutsCmd->SetParameterName("SpecialCutsControl", false); - fSetSpecialCutsCmd->AvailableForStates(PreInit); - - fSetSpecialFlagsCmd - = new G4UIcmdWithABool("/g4mc/setSpecialFlags", this); - fSetSpecialFlagsCmd->SetGuidance("Set special flags process."); - fSetSpecialFlagsCmd - ->SetGuidance("!! Support for this option is under development."); - fSetSpecialFlagsCmd->SetParameterName("SpecialFlagsControl", false); - fSetSpecialFlagsCmd->AvailableForStates(PreInit); -} - -TG4PhysicsListMessenger::TG4PhysicsListMessenger( - const TG4PhysicsListMessenger& right) { -// - TG4Globals::Exception( - "TG4PhysicsListMessenger is protected from copying."); -} - -TG4PhysicsListMessenger::~TG4PhysicsListMessenger() { -// - delete fSetOpticalCmd; - delete fSetHadronCmd; - delete fSetSpecialCutsCmd; - delete fSetSpecialFlagsCmd; -} - -// operators - -TG4PhysicsListMessenger& -TG4PhysicsListMessenger::operator=(const TG4PhysicsListMessenger& right) -{ - // check assignement to self - if (this == &right) return *this; - - TG4Globals::Exception( - "TG4PhysicsListMessenger is protected from assigning."); - - return *this; -} - -// public methods - -void TG4PhysicsListMessenger::SetNewValue(G4UIcommand* command, - G4String newValues) -{ -// Applies command to the associated object. -// --- - - if (command == fSetOpticalCmd) { - fPhysicsList - ->SetOptical(fSetOpticalCmd->GetNewBoolValue(newValues)); - } - else if (command == fSetHadronCmd) { - fPhysicsList - ->SetHadron(fSetHadronCmd->GetNewBoolValue(newValues)); - } - else if (command == fSetSpecialCutsCmd) { - fPhysicsList - ->SetSpecialCuts(fSetSpecialCutsCmd->GetNewBoolValue(newValues)); - } - else if (command == fSetSpecialFlagsCmd) { - fPhysicsList - ->SetSpecialFlags(fSetSpecialFlagsCmd->GetNewBoolValue(newValues)); - } -} diff --git a/TGeant4/TG4PhysicsListMessenger.h b/TGeant4/TG4PhysicsListMessenger.h deleted file mode 100644 index a07f3072a85..00000000000 --- a/TGeant4/TG4PhysicsListMessenger.h +++ /dev/null @@ -1,43 +0,0 @@ -// $Id$ -// Category: physics -// -// Messenger class that defines commands for TG4PhysicsList - -#ifndef TG4_PHYSICS_LIST_MESSENGER_H -#define TG4_PHYSICS_LIST_MESSENGER_H - -#include -#include - -class TG4PhysicsList; - -class G4UIcmdWithABool; - -class TG4PhysicsListMessenger: public G4UImessenger -{ - public: - TG4PhysicsListMessenger(TG4PhysicsList* physicsList); - // --> protected - // TG4PhysicsListMessenger(const TG4PhysicsListMessenger& right); - virtual ~TG4PhysicsListMessenger(); - - // methods - virtual void SetNewValue(G4UIcommand* command, G4String string); - - protected: - TG4PhysicsListMessenger(const TG4PhysicsListMessenger& right); - - // operators - TG4PhysicsListMessenger& operator=( - const TG4PhysicsListMessenger& right); - - private: - // data members - TG4PhysicsList* fPhysicsList; //associated class - G4UIcmdWithABool* fSetOpticalCmd; //setCerenkov command - G4UIcmdWithABool* fSetHadronCmd; //setHadron command - G4UIcmdWithABool* fSetSpecialCutsCmd; //setSpecialCuts command - G4UIcmdWithABool* fSetSpecialFlagsCmd; //setSpecialFlags command -}; - -#endif //TG4_PHYSICS_LIST_MESSENGER_H