Geant4  10.02.p03
HistoManagerMessenger Class Reference

#include <HistoManagerMessenger.hh>

Inheritance diagram for HistoManagerMessenger:
Collaboration diagram for HistoManagerMessenger:

Public Member Functions

 HistoManagerMessenger (HistoManager *)
 
virtual ~HistoManagerMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
 HistoManagerMessenger (HistoManager *)
 
virtual ~HistoManagerMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

HistoManagerfHisto
 
G4UIcmdWithAnIntegerfbinCmd
 
G4UIcmdWithAnIntegerfnOfAbsCmd
 
G4UIcmdWithAnIntegerfverbCmd
 
G4UIcmdWithAStringfcsCmd
 
G4UIcmdWithAStringfpartCmd
 
G4UIcmdWithADoubleAndUnitfe1Cmd
 
G4UIcmdWithADoubleAndUnitfe2Cmd
 
G4UIcmdWithADoubleAndUnitfp1Cmd
 
G4UIcmdWithADoubleAndUnitfp2Cmd
 
G4UIcmdWithAStringfFCmd
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 59 of file Hadr00/include/HistoManagerMessenger.hh.

Constructor & Destructor Documentation

◆ HistoManagerMessenger() [1/2]

HistoManagerMessenger::HistoManagerMessenger ( HistoManager p)

Definition at line 58 of file Hadr00/src/HistoManagerMessenger.cc.

59 :G4UImessenger(), fHisto(p)
60 {
61  fbinCmd = new G4UIcmdWithAnInteger("/testhadr/nBinsE",this);
62  fbinCmd->SetGuidance("Set number of bins for energy");
63  fbinCmd->SetParameterName("NEbins",false);
65 
66  fnOfAbsCmd = new G4UIcmdWithAnInteger("/testhadr/nBinsP",this);
67  fnOfAbsCmd->SetGuidance("Set number of bins for momentum");
68  fnOfAbsCmd->SetParameterName("NPbins",false);
70 
71  fpartCmd = new G4UIcmdWithAString("/testhadr/particle",this);
72  fpartCmd->SetGuidance("Set particle name");
73  fpartCmd->SetParameterName("Particle",false);
75 
76  fcsCmd = new G4UIcmdWithAString("/testhadr/targetElm",this);
77  fcsCmd->SetGuidance("Set element name");
78  fcsCmd->SetParameterName("Elm",false);
80 
81  fe1Cmd = new G4UIcmdWithADoubleAndUnit("/testhadr/minEnergy",this);
82  fe1Cmd->SetGuidance("Set min kinetic energy");
83  fe1Cmd->SetParameterName("eMin",false);
84  fe1Cmd->SetUnitCategory("Energy");
86 
87  fe2Cmd = new G4UIcmdWithADoubleAndUnit("/testhadr/maxEnergy",this);
88  fe2Cmd->SetGuidance("Set max kinetic energy");
89  fe2Cmd->SetParameterName("eMax",false);
90  fe2Cmd->SetUnitCategory("Energy");
92 
93  fp1Cmd = new G4UIcmdWithADoubleAndUnit("/testhadr/minMomentum",this);
94  fp1Cmd->SetGuidance("Set min momentum");
95  fp1Cmd->SetParameterName("pMin",false);
96  fp1Cmd->SetUnitCategory("Energy");
98 
99  fp2Cmd = new G4UIcmdWithADoubleAndUnit("/testhadr/maxMomentum",this);
100  fp2Cmd->SetGuidance("Set max momentum");
101  fp2Cmd->SetParameterName("pMax",false);
102  fp2Cmd->SetUnitCategory("Energy");
104 
105  fverbCmd = new G4UIcmdWithAnInteger("/testhadr/verbose",this);
106  fverbCmd->SetGuidance("Set verbose for ");
107  fverbCmd->SetParameterName("verb",false);
109 
110  fFCmd = new G4UIcmdWithAString("/testhadr/fileName",this);
111  fFCmd->SetGuidance("set name for the histograms file");
112 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCategory(const char *unitCategory)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
Here is the call graph for this function:

◆ ~HistoManagerMessenger() [1/2]

HistoManagerMessenger::~HistoManagerMessenger ( )
virtual

Definition at line 116 of file Hadr00/src/HistoManagerMessenger.cc.

117 {
118  delete fnOfAbsCmd;
119  delete fpartCmd;
120  delete fcsCmd;
121  delete fe1Cmd;
122  delete fe2Cmd;
123  delete fp1Cmd;
124  delete fp2Cmd;
125  delete fverbCmd;
126  delete fFCmd;
127 }

◆ HistoManagerMessenger() [2/2]

HistoManagerMessenger::HistoManagerMessenger ( HistoManager )

◆ ~HistoManagerMessenger() [2/2]

virtual HistoManagerMessenger::~HistoManagerMessenger ( )
virtual

Member Function Documentation

◆ SetNewValue() [1/2]

void HistoManagerMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 131 of file Hadr00/src/HistoManagerMessenger.cc.

132 {
133  if( command == fbinCmd ) {
135  } else if( command == fnOfAbsCmd ) {
137  } else if( command == fverbCmd ) {
139  } else if( command == fpartCmd ) {
140  fHisto->SetParticleName(newValue);
141  } else if( command == fcsCmd ) {
142  fHisto->SetElementName(newValue);
143  } else if( command == fe1Cmd ) {
145  } else if( command == fe2Cmd ) {
147  } else if( command == fp1Cmd ) {
149  } else if( command == fp2Cmd ) {
151  } else if( command == fFCmd ) {
152  fHisto->SetHistoName(newValue);
153  }
154 }
static G4int GetNewIntValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
Here is the call graph for this function:

◆ SetNewValue() [2/2]

virtual void HistoManagerMessenger::SetNewValue ( G4UIcommand ,
G4String   
)
virtual

Reimplemented from G4UImessenger.

Member Data Documentation

◆ fbinCmd

G4UIcmdWithAnInteger * HistoManagerMessenger::fbinCmd
private

Definition at line 72 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fcsCmd

G4UIcmdWithAString * HistoManagerMessenger::fcsCmd
private

Definition at line 75 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fe1Cmd

G4UIcmdWithADoubleAndUnit * HistoManagerMessenger::fe1Cmd
private

Definition at line 77 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fe2Cmd

G4UIcmdWithADoubleAndUnit * HistoManagerMessenger::fe2Cmd
private

Definition at line 78 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fFCmd

G4UIcmdWithAString * HistoManagerMessenger::fFCmd
private

Definition at line 81 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fHisto

HistoManager * HistoManagerMessenger::fHisto
private

Definition at line 70 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fnOfAbsCmd

G4UIcmdWithAnInteger * HistoManagerMessenger::fnOfAbsCmd
private

Definition at line 73 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fp1Cmd

G4UIcmdWithADoubleAndUnit * HistoManagerMessenger::fp1Cmd
private

Definition at line 79 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fp2Cmd

G4UIcmdWithADoubleAndUnit * HistoManagerMessenger::fp2Cmd
private

Definition at line 80 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fpartCmd

G4UIcmdWithAString * HistoManagerMessenger::fpartCmd
private

Definition at line 76 of file Hadr00/include/HistoManagerMessenger.hh.

◆ fverbCmd

G4UIcmdWithAnInteger * HistoManagerMessenger::fverbCmd
private

Definition at line 74 of file Hadr00/include/HistoManagerMessenger.hh.


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