BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
GoofyMessenger Class Reference

#include <GoofyMessenger.h>

+ Inheritance diagram for GoofyMessenger:

Public Member Functions

 GoofyMessenger (Goofy *v)
 
 ~GoofyMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
G4String GetCurrentValue (G4UIcommand *command)
 

Detailed Description

Definition at line 10 of file GoofyMessenger.h.

Constructor & Destructor Documentation

◆ GoofyMessenger()

GoofyMessenger::GoofyMessenger ( Goofy v)

Definition at line 9 of file GoofyMessenger.cpp.

10{
11 rm=v;
12
13 shell=new G4UIcommand("/shell",this);
14 shell->SetGuidance("Invokes a shell command");
15 G4UIparameter* parameter;
16 G4bool omitable;
17 parameter = new G4UIparameter ("Command", 's', omitable = false);
18 shell->SetParameter(parameter);
19
20 echo=new G4UIcommand("/echo",this);
21 echo->SetGuidance("Echoes a string");
22 echo->SetParameter(parameter);
23
24 edit=new G4UIcommand("/edit",this);
25 edit->SetGuidance("Invokes the chosen editor");
26 parameter = new G4UIparameter ("File to be edited", 's', omitable = false);
27 edit->SetParameter(parameter);
28
29 quit=new G4UIcommand("/quit",this);
30 quit->SetGuidance("quits the application");
31
32 load=new G4UIcommand("/load",this);
33 load->SetGuidance("Dynamically loads a shared library");
34 parameter = new G4UIparameter ("Library to be loaded", 's', omitable = false);
35 load->SetParameter(parameter);
36
37 unload=new G4UIcommand("/unload",this);
38 unload->SetGuidance("Drops a shared library");
39 parameter = new G4UIparameter ("Library to be dropped", 's', omitable = false);
40 unload->SetParameter(parameter);
41}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
double precision pisqo6 parameter(pi=3.14159265358979d0, pisq=pi *pi, pisqo6=pisq/6d0) double precision zip

◆ ~GoofyMessenger()

GoofyMessenger::~GoofyMessenger ( )

Definition at line 43 of file GoofyMessenger.cpp.

44{
45 delete shell;
46 delete echo;
47 delete edit;
48 delete load;
49 delete unload;
50 delete quit;
51}

Member Function Documentation

◆ GetCurrentValue()

G4String GoofyMessenger::GetCurrentValue ( G4UIcommand *  command)

Definition at line 101 of file GoofyMessenger.cpp.

102{
103 G4String s="Undefined";
104 return s;
105}
XmlRpcServer s
Definition: HelloServer.cpp:11

◆ SetNewValue()

void GoofyMessenger::SetNewValue ( G4UIcommand *  command,
G4String  newValues 
)

Definition at line 53 of file GoofyMessenger.cpp.

54{
55 if (command==shell)
56 {
57 std::string temp(newValues);
58 unsigned int i=temp.find_first_not_of ('"');
59 if (i != std::string::npos)
60 {
61 if (i>0) temp = temp.substr (i);
62 i = temp.find_last_not_of ('"');
63 if (i < temp.size ()) temp = temp.substr (0, i + 1);
64 }
65 i=Goofy::Shell(temp);
66 }
67 else if (command==echo)
68 {
69 std::string temp(newValues);
70 unsigned int i=temp.find_first_not_of ('"');
71 if (i != std::string::npos)
72 {
73 if (i>0) temp = temp.substr (i);
74 i = temp.find_last_not_of ('"');
75 if (i < temp.size ()) temp = temp.substr (0, i + 1);
76 }
77 i=Goofy::Shell("echo "+temp);
78 }
79 else if (command==quit)
80 {
81 G4UImanager *man=G4UImanager::GetUIpointer();
82 man->ApplyCommand("/exit");
83 }
84 else if (command==edit)
85 {
86 std::string s="$GOOFY_EDITOR "+newValues+" &";
88 }
89 else if (command==load)
90 {
91 PackageLoader a(newValues.c_str());
92 }
93 else if (command==unload)
94 {
95 bool test;
96 PackageLoader a;
97 test=a.unload(newValues);
98 }
99}
std::string test
Definition: CalibModel.cxx:43
static int Shell(std::string s)
Definition: Goofy.cpp:62

The documentation for this class was generated from the following files: