BOSS 8.0.0
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.

9 {
10 rm = v;
11
12 shell = new G4UIcommand( "/shell", this );
13 shell->SetGuidance( "Invokes a shell command" );
14 G4UIparameter* parameter;
15 G4bool omitable;
16 parameter = new G4UIparameter( "Command", 's', omitable = false );
17 shell->SetParameter( parameter );
18
19 echo = new G4UIcommand( "/echo", this );
20 echo->SetGuidance( "Echoes a string" );
21 echo->SetParameter( parameter );
22
23 edit = new G4UIcommand( "/edit", this );
24 edit->SetGuidance( "Invokes the chosen editor" );
25 parameter = new G4UIparameter( "File to be edited", 's', omitable = false );
26 edit->SetParameter( parameter );
27
28 quit = new G4UIcommand( "/quit", this );
29 quit->SetGuidance( "quits the application" );
30
31 load = new G4UIcommand( "/load", this );
32 load->SetGuidance( "Dynamically loads a shared library" );
33 parameter = new G4UIparameter( "Library to be loaded", 's', omitable = false );
34 load->SetParameter( parameter );
35
36 unload = new G4UIcommand( "/unload", this );
37 unload->SetGuidance( "Drops a shared library" );
38 parameter = new G4UIparameter( "Library to be dropped", 's', omitable = false );
39 unload->SetParameter( parameter );
40}
**********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

◆ ~GoofyMessenger()

GoofyMessenger::~GoofyMessenger ( )

Definition at line 42 of file GoofyMessenger.cpp.

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

Member Function Documentation

◆ GetCurrentValue()

G4String GoofyMessenger::GetCurrentValue ( G4UIcommand * command)

Definition at line 95 of file GoofyMessenger.cpp.

95 {
96 G4String s = "Undefined";
97 return s;
98}
XmlRpcServer s

◆ SetNewValue()

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

Definition at line 51 of file GoofyMessenger.cpp.

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

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