Geant4-11
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4H1Messenger Class Reference

#include <G4H1Messenger.hh>

Inheritance diagram for G4H1Messenger:
G4UImessenger

Public Member Functions

G4bool CommandsShouldBeInMaster () const
 
 G4H1Messenger ()=delete
 
 G4H1Messenger (G4VAnalysisManager *manager)
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool operator== (const G4UImessenger &messenger) const
 
virtual void SetNewValue (G4UIcommand *command, G4String value) final
 
virtual ~G4H1Messenger ()
 

Protected Member Functions

void AddUIcommand (G4UIcommand *newCommand)
 
G4String BtoS (G4bool b)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
G4String DtoS (G4double a)
 
G4String ItoS (G4int i)
 
G4bool StoB (G4String s)
 
G4double StoD (G4String s)
 
G4int StoI (G4String s)
 
G4long StoL (G4String s)
 

Protected Attributes

G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Private Member Functions

void CreateH1Cmd ()
 
void SetH1Cmd ()
 

Private Attributes

std::unique_ptr< G4UIcommandfCreateH1Cmd
 
std::unique_ptr< G4UIdirectoryfDirectory
 
std::unique_ptr< G4AnalysisMessengerHelperfHelper
 
G4VAnalysisManagerfManager { nullptr }
 Associated class. More...
 
std::unique_ptr< G4UIcommandfSetH1Cmd
 
std::unique_ptr< G4UIcommandfSetH1TitleCmd
 
std::unique_ptr< G4UIcommandfSetH1XAxisCmd
 
std::unique_ptr< G4UIcommandfSetH1XAxisLogCmd
 
std::unique_ptr< G4UIcommandfSetH1XCmd
 
std::unique_ptr< G4UIcommandfSetH1YAxisCmd
 
std::unique_ptr< G4UIcommandfSetH1YAxisLogCmd
 

Detailed Description

Definition at line 49 of file G4H1Messenger.hh.

Constructor & Destructor Documentation

◆ G4H1Messenger() [1/2]

G4H1Messenger::G4H1Messenger ( G4VAnalysisManager manager)
explicit

Definition at line 48 of file G4H1Messenger.cc.

49 : G4UImessenger(),
50 fManager(manager)
51{
52 fHelper = std::make_unique<G4AnalysisMessengerHelper>("h1");
53
54 fDirectory = fHelper->CreateHnDirectory();
55
57
58 SetH1Cmd();
59 fSetH1XCmd = fHelper->CreateSetBinsCommand("x", this);
60
61
62 fSetH1TitleCmd = fHelper->CreateSetTitleCommand(this);
63 fSetH1XAxisCmd = fHelper->CreateSetAxisCommand("x", this);
64 fSetH1YAxisCmd = fHelper->CreateSetAxisCommand("y", this);
65 fSetH1XAxisLogCmd = fHelper->CreateSetAxisLogCommand("x", this);
66 fSetH1YAxisLogCmd = fHelper->CreateSetAxisLogCommand("y", this);
67}
std::unique_ptr< G4UIdirectory > fDirectory
std::unique_ptr< G4UIcommand > fSetH1TitleCmd
std::unique_ptr< G4UIcommand > fSetH1YAxisCmd
std::unique_ptr< G4UIcommand > fSetH1YAxisLogCmd
void CreateH1Cmd()
G4VAnalysisManager * fManager
Associated class.
std::unique_ptr< G4AnalysisMessengerHelper > fHelper
std::unique_ptr< G4UIcommand > fSetH1XCmd
std::unique_ptr< G4UIcommand > fSetH1XAxisLogCmd
std::unique_ptr< G4UIcommand > fSetH1XAxisCmd

References CreateH1Cmd(), fDirectory, fHelper, fSetH1TitleCmd, fSetH1XAxisCmd, fSetH1XAxisLogCmd, fSetH1XCmd, fSetH1YAxisCmd, fSetH1YAxisLogCmd, and SetH1Cmd().

◆ G4H1Messenger() [2/2]

G4H1Messenger::G4H1Messenger ( )
delete

◆ ~G4H1Messenger()

G4H1Messenger::~G4H1Messenger ( )
virtualdefault

Member Function Documentation

◆ AddUIcommand()

void G4UImessenger::AddUIcommand ( G4UIcommand newCommand)
protectedinherited

Definition at line 149 of file G4UImessenger.cc.

150{
151 G4cerr << "Warning : Old style definition of G4UIcommand <"
152 << newCommand->GetCommandPath() << ">." << G4endl;
153}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136

References G4cerr, G4endl, and G4UIcommand::GetCommandPath().

◆ BtoS()

G4String G4UImessenger::BtoS ( G4bool  b)
protectedinherited

Definition at line 98 of file G4UImessenger.cc.

99{
100 G4String vl = "0";
101 if(b)
102 vl = "true";
103 return vl;
104}

◆ CommandsShouldBeInMaster()

G4bool G4UImessenger::CommandsShouldBeInMaster ( ) const
inlineinherited

Definition at line 77 of file G4UImessenger.hh.

78 {
80 }
G4bool commandsShouldBeInMaster

References G4UImessenger::commandsShouldBeInMaster.

Referenced by G4UIcommand::G4UIcommandCommonConstructorCode().

◆ CreateCommand()

template<typename T >
T * G4UImessenger::CreateCommand ( const G4String cname,
const G4String dsc 
)
protectedinherited

Definition at line 110 of file G4UImessenger.hh.

111{
112 G4String path;
113 if(cname[0] != '/')
114 {
115 path = baseDirName + cname;
116 if(path[0] != '/')
117 path = "/" + path;
118 }
119
120 T* command = new T(path.c_str(), this);
121 command->SetGuidance(dsc.c_str());
122
123 return command;
124}
G4String baseDirName

References G4UImessenger::baseDirName.

◆ CreateDirectory()

void G4UImessenger::CreateDirectory ( const G4String path,
const G4String dsc,
G4bool  commandsToBeBroadcasted = true 
)
protectedinherited

Definition at line 156 of file G4UImessenger.cc.

158{
160
161 G4String fullpath = path;
162 if(fullpath.back() != '/')
163 fullpath.append("/");
164
165 G4UIcommandTree* tree = ui->GetTree()->FindCommandTree(fullpath.c_str());
166 if(tree != nullptr)
167 {
168 baseDirName = tree->GetPathName();
169 }
170 else
171 {
172 baseDir = new G4UIdirectory(fullpath.c_str(), commandsToBeBroadcasted);
173 baseDirName = fullpath;
174 baseDir->SetGuidance(dsc.c_str());
175 }
176}
const G4String & GetPathName() const
G4UIcommandTree * FindCommandTree(const char *commandPath)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
G4UIcommandTree * GetTree() const
Definition: G4UImanager.hh:186
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
G4UIdirectory * baseDir

References G4UImessenger::baseDir, G4UImessenger::baseDirName, G4UIcommandTree::FindCommandTree(), G4UIcommandTree::GetPathName(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), and G4UIcommand::SetGuidance().

Referenced by G4MoleculeShootMessenger::G4MoleculeShootMessenger(), and G4UImessenger::G4UImessenger().

◆ CreateH1Cmd()

void G4H1Messenger::CreateH1Cmd ( )
private

Definition at line 77 of file G4H1Messenger.cc.

78{
79 auto h1Name = new G4UIparameter("name", 's', false);
80 h1Name->SetGuidance("Histogram name (label)");
81
82 auto h1Title = new G4UIparameter("title", 's', false);
83 h1Title->SetGuidance("Histogram title");
84
85 auto h1Nbins0 = new G4UIparameter("nbins0", 'i', true);
86 h1Nbins0->SetGuidance("Number of bins (default = 100)");
87 h1Nbins0->SetGuidance("Can be reset with /analysis/h1/set command");
88 h1Nbins0->SetDefaultValue(100);
89
90 auto h1ValMin0 = new G4UIparameter("valMin0", 'd', true);
91 h1ValMin0->SetGuidance("Minimum value, expressed in unit (default = 0.)");
92 h1ValMin0->SetGuidance("Can be reset with /analysis/h1/set command");
93 h1ValMin0->SetDefaultValue(0.);
94
95 auto h1ValMax0 = new G4UIparameter("valMax0", 'd', true);
96 h1ValMax0->SetGuidance("Maximum value, expressed in unit (default = 1.)");
97 h1ValMax0->SetGuidance("Can be reset with /analysis/h1/set command");
98 h1ValMax0->SetDefaultValue(1.);
99
100 auto h1ValUnit0 = new G4UIparameter("valUnit0", 's', true);
101 h1ValUnit0->SetGuidance("The unit applied to filled values and valMin0, valMax0");
102 h1ValUnit0->SetDefaultValue("none");
103
104 auto h1ValFcn0 = new G4UIparameter("valFcn0", 's', true);
105 G4String fcnGuidance = "The function applied to filled values (log, log10, exp).\n";
106 fcnGuidance += "Note that the unit parameter cannot be omitted in this case,\n";
107 fcnGuidance += "but none value should be used instead.";
108 h1ValFcn0->SetGuidance(fcnGuidance);
109 h1ValFcn0->SetParameterCandidates("log log10 exp none");
110 h1ValFcn0->SetDefaultValue("none");
111
112 auto h1ValBinScheme0 = new G4UIparameter("valBinScheme0", 's', true);
113 G4String binSchemeGuidance = "The binning scheme (linear, log).\n";
114 h1ValBinScheme0->SetParameterCandidates("linear log");
115 binSchemeGuidance
116 += "Note that the unit and fcn parameters cannot be omitted in this case,\n";
117 binSchemeGuidance += "but none value should be used instead.";
118 h1ValBinScheme0->SetGuidance(binSchemeGuidance);
119 h1ValBinScheme0->SetDefaultValue("linear");
120
121 fCreateH1Cmd = std::make_unique<G4UIcommand>("/analysis/h1/create", this);
122 fCreateH1Cmd->SetGuidance("Create 1D histogram");
123 fCreateH1Cmd->SetParameter(h1Name);
124 fCreateH1Cmd->SetParameter(h1Title);
125 fCreateH1Cmd->SetParameter(h1Nbins0);
126 fCreateH1Cmd->SetParameter(h1ValMin0);
127 fCreateH1Cmd->SetParameter(h1ValMax0);
128 fCreateH1Cmd->SetParameter(h1ValUnit0);
129 fCreateH1Cmd->SetParameter(h1ValFcn0);
130 fCreateH1Cmd->SetParameter(h1ValBinScheme0);
131 fCreateH1Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
132}
@ G4State_Idle
@ G4State_PreInit
std::unique_ptr< G4UIcommand > fCreateH1Cmd

References fCreateH1Cmd, G4State_Idle, and G4State_PreInit.

Referenced by G4H1Messenger().

◆ DtoS()

G4String G4UImessenger::DtoS ( G4double  a)
protectedinherited

Definition at line 90 of file G4UImessenger.cc.

91{
92 std::ostringstream os;
93 os << a;
94 return G4String(os.str());
95}

Referenced by G4ScoreQuantityMessenger::FilterCommands(), and G4UIcontrolMessenger::SetNewValue().

◆ GetCurrentValue()

G4String G4UImessenger::GetCurrentValue ( G4UIcommand command)
virtualinherited

Reimplemented in G4ScoreQuantityMessenger, G4VisCommandModelCreate< Factory >, G4VisCommandListManagerList< Manager >, G4VisCommandListManagerSelect< Manager >, G4VisCommandManagerMode< Manager >, G4ToolsAnalysisMessenger, G4ScoringMessenger, G4EvManMessenger, G4GeneralParticleSourceMessenger, G4ParticleGunMessenger, G4GeometryMessenger, G4GenericMessenger, G4UIcontrolMessenger, GFlashShowerModelMessenger, G4DecayTableMessenger, G4ParticleMessenger, G4ParticlePropertyMessenger, G4tgrMessenger, G4PersistencyCenterMessenger, G4ProductionCutsTableMessenger, G4SchedulerMessenger, G4VITSteppingVerbose, G4MoleculeShootMessenger, G4MoleculeGunMessenger, G4ProcessManagerMessenger, G4ProcessTableMessenger, G4MatScanMessenger, G4RunMessenger, G4UserPhysicsListMessenger, G4TrackingMessenger, G4GMocrenMessenger, G4HepRepMessenger, G4VisCommandAbortReviewKeptEvents, G4VisCommandDrawOnlyToBeKeptEvents, G4VisCommandEnable, G4VisCommandList, G4VisCommandReviewKeptEvents, G4VisCommandVerbose, G4VisCommandGeometryList, G4VisCommandGeometryRestore, G4VisCommandGeometrySetColour, G4VisCommandGeometrySetDaughtersInvisible, G4VisCommandGeometrySetForceAuxEdgeVisible, G4VisCommandGeometrySetForceCloud, G4VisCommandGeometrySetForceSolid, G4VisCommandGeometrySetForceLineSegmentsPerCircle, G4VisCommandGeometrySetForceWireframe, G4VisCommandGeometrySetLineStyle, G4VisCommandGeometrySetLineWidth, G4VisCommandGeometrySetVisibility, G4VisCommandSceneActivateModel, G4VisCommandSceneCreate, G4VisCommandSceneEndOfEventAction, G4VisCommandSceneEndOfRunAction, G4VisCommandSceneList, G4VisCommandSceneNotifyHandlers, G4VisCommandSceneRemoveModel, G4VisCommandSceneSelect, G4VisCommandSceneShowExtents, G4VisCommandSceneAddArrow, G4VisCommandSceneAddArrow2D, G4VisCommandSceneAddAxes, G4VisCommandSceneAddDate, G4VisCommandSceneAddDigis, G4VisCommandSceneAddEventID, G4VisCommandSceneAddExtent, G4VisCommandSceneAddElectricField, G4VisCommandSceneAddFrame, G4VisCommandSceneAddGPS, G4VisCommandSceneAddGhosts, G4VisCommandSceneAddHits, G4VisCommandSceneAddLine, G4VisCommandSceneAddLine2D, G4VisCommandSceneAddLocalAxes, G4VisCommandSceneAddLogicalVolume, G4VisCommandSceneAddLogo, G4VisCommandSceneAddLogo2D, G4VisCommandSceneAddMagneticField, G4VisCommandSceneAddPSHits, G4VisCommandSceneAddScale, G4VisCommandSceneAddText, G4VisCommandSceneAddText2D, G4VisCommandSceneAddTrajectories, G4VisCommandSceneAddUserAction, G4VisCommandSceneAddVolume, G4VisCommandSceneAddPlotter, G4VisCommandSceneHandlerAttach, G4VisCommandSceneHandlerCreate, G4VisCommandSceneHandlerList, G4VisCommandSceneHandlerSelect, G4VisCommandSetArrow3DLineSegmentsPerCircle, G4VisCommandSetColour, G4VisCommandSetExtentForField, G4VisCommandSetLineWidth, G4VisCommandSetTextColour, G4VisCommandSetTextLayout, G4VisCommandSetTextSize, G4VisCommandSetTouchable, G4VisCommandSetVolumeForField, G4VisCommandsTouchable, G4VisCommandsTouchableSet, G4VisCommandViewerAddCutawayPlane, G4VisCommandViewerCentreOn, G4VisCommandViewerChangeCutawayPlane, G4VisCommandViewerClear, G4VisCommandViewerClearCutawayPlanes, G4VisCommandViewerClearTransients, G4VisCommandViewerClearVisAttributesModifiers, G4VisCommandViewerClone, G4VisCommandViewerColourByDensity, G4VisCommandViewerCopyViewFrom, G4VisCommandViewerCreate, G4VisCommandViewerDolly, G4VisCommandViewerFlush, G4VisCommandViewerInterpolate, G4VisCommandViewerList, G4VisCommandViewerPan, G4VisCommandViewerReset, G4VisCommandViewerRefresh, G4VisCommandViewerRebuild, G4VisCommandViewerSave, G4VisCommandViewerScale, G4VisCommandViewerSelect, G4VisCommandViewerUpdate, G4VisCommandViewerZoom, G4VisCommandViewerDefaultHiddenEdge, G4VisCommandViewerDefaultStyle, G4VisCommandsViewerSet, G4VModelCommand< T >, G4VModelCommand< M >, G4RTMessenger, G4ASCIITreeMessenger, G4VtkMessenger, G4PolarizationMessenger, and G4DNAChemistryManager.

Definition at line 58 of file G4UImessenger.cc.

59{
60 G4String nullString;
61 return nullString;
62}

Referenced by G4UIcommand::DoIt(), and G4UIcommand::GetCurrentValue().

◆ ItoS()

G4String G4UImessenger::ItoS ( G4int  i)
protectedinherited

Definition at line 82 of file G4UImessenger.cc.

83{
84 std::ostringstream os;
85 os << i;
86 return G4String(os.str());
87}

Referenced by G4GenericMessenger::DeclareMethod(), and G4ParticleGunMessenger::GetCurrentValue().

◆ operator!=()

G4bool G4UImessenger::operator!= ( const G4UImessenger messenger) const
inherited

Definition at line 76 of file G4UImessenger.cc.

77{
78 return this != &messenger;
79}

◆ operator==()

G4bool G4UImessenger::operator== ( const G4UImessenger messenger) const
inherited

Definition at line 70 of file G4UImessenger.cc.

71{
72 return this == &messenger;
73}

◆ SetH1Cmd()

void G4H1Messenger::SetH1Cmd ( )
private

Definition at line 136 of file G4H1Messenger.cc.

137{
138 auto h1Id = new G4UIparameter("id", 'i', false);
139 h1Id->SetGuidance("Histogram id");
140 h1Id->SetParameterRange("id>=0");
141
142 auto h1Nbins = new G4UIparameter("nbins", 'i', false);
143 h1Nbins->SetGuidance("Number of bins");
144
145 auto h1ValMin = new G4UIparameter("valMin", 'd', false);
146 h1ValMin->SetGuidance("Minimum value, expressed in unit");
147
148 auto h1ValMax = new G4UIparameter("valMax", 'd', false);
149 h1ValMax->SetGuidance("Maximum value, expressed in unit");
150
151 auto h1ValUnit = new G4UIparameter("valUnit", 's', true);
152 h1ValUnit->SetGuidance("The unit applied to filled values and valMin, valMax");
153 h1ValUnit->SetDefaultValue("none");
154
155 auto h1ValFcn = new G4UIparameter("valFcn", 's', true);
156 h1ValFcn->SetParameterCandidates("log log10 exp none");
157 G4String fcnGuidance = "The function applied to filled values (log, log10, exp, none).\n";
158 fcnGuidance += "Note that the unit parameter cannot be omitted in this case,\n";
159 fcnGuidance += "but none value should be used instead.";
160 h1ValFcn->SetGuidance(fcnGuidance);
161 h1ValFcn->SetDefaultValue("none");
162
163 auto h1ValBinScheme = new G4UIparameter("valBinScheme", 's', true);
164 h1ValBinScheme->SetParameterCandidates("linear log");
165 G4String binSchemeGuidance = "The binning scheme (linear, log).\n";
166 binSchemeGuidance
167 += "Note that the unit and fcn parameters cannot be omitted in this case,\n";
168 binSchemeGuidance += "but none value should be used instead.";
169 h1ValBinScheme->SetGuidance(binSchemeGuidance);
170 h1ValBinScheme->SetDefaultValue("linear");
171
172 fSetH1Cmd = std::make_unique<G4UIcommand>("/analysis/h1/set", this);
173 fSetH1Cmd->SetGuidance("Set parameters for the 1D histogram of given id:");
174 fSetH1Cmd->SetGuidance(" nbins; valMin; valMax; unit; function; binScheme");
175 fSetH1Cmd->SetParameter(h1Id);
176 fSetH1Cmd->SetParameter(h1Nbins);
177 fSetH1Cmd->SetParameter(h1ValMin);
178 fSetH1Cmd->SetParameter(h1ValMax);
179 fSetH1Cmd->SetParameter(h1ValUnit);
180 fSetH1Cmd->SetParameter(h1ValFcn);
181 fSetH1Cmd->SetParameter(h1ValBinScheme);
182 fSetH1Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
183}
std::unique_ptr< G4UIcommand > fSetH1Cmd

References fSetH1Cmd, G4State_Idle, and G4State_PreInit.

Referenced by G4H1Messenger().

◆ SetNewValue()

void G4H1Messenger::SetNewValue ( G4UIcommand command,
G4String  value 
)
finalvirtual

Reimplemented from G4UImessenger.

Definition at line 190 of file G4H1Messenger.cc.

191{
192 // tokenize parameters in a vector
193 std::vector<G4String> parameters;
194 G4Analysis::Tokenize(newValues, parameters);
195 // check consistency
196 if ( parameters.size() != command->GetParameterEntries() ) {
197 // Should never happen but let's check anyway for consistency
198 fHelper->WarnAboutParameters(command, parameters.size());
199 return;
200 }
201
202 if ( command == fCreateH1Cmd.get() ) {
203 auto counter = 0;
204 auto name = parameters[counter++];
205 auto title = parameters[counter++];
207 fHelper->GetBinData(xdata, parameters, counter);
208 auto unit = GetUnitValue(xdata.fSunit);
209 fManager->CreateH1(name, title,
210 xdata.fNbins, xdata.fVmin*unit, xdata.fVmax*unit,
211 xdata.fSunit, xdata.fSfcn, xdata.fSbinScheme);
212 }
213 else if ( command == fSetH1Cmd.get() ) {
214 auto counter = 0;
215 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
217 fHelper->GetBinData(xdata, parameters, counter);
218 auto unit = GetUnitValue(xdata.fSunit);
219 fManager->SetH1(id,
220 xdata.fNbins, xdata.fVmin*unit, xdata.fVmax*unit,
221 xdata.fSunit, xdata.fSfcn, xdata.fSbinScheme);
222 }
223 else if ( command == fSetH1XCmd.get() ) {
224 auto counter = 0;
225 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
227 fHelper->GetBinData(xdata, parameters, counter);
228 auto unit = GetUnitValue(xdata.fSunit);
229 fManager->SetH1(id,
230 xdata.fNbins, xdata.fVmin*unit, xdata.fVmax*unit,
231 xdata.fSunit, xdata.fSfcn, xdata.fSbinScheme);
232 }
233 else if ( command == fSetH1TitleCmd.get() ) {
234 auto counter = 0;
235 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
236 auto title = parameters[counter++];
237 fManager->SetH1Title(id, title);
238 }
239 else if ( command == fSetH1XAxisCmd.get() ) {
240 auto counter = 0;
241 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
242 auto xaxis = parameters[counter++];
243 fManager->SetH1XAxisTitle(id, xaxis);
244 }
245 else if ( command == fSetH1YAxisCmd.get() ) {
246 auto counter = 0;
247 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
248 auto yaxis = parameters[counter++];
249 fManager->SetH1YAxisTitle(id, yaxis);
250 }
251 else if ( command == fSetH1XAxisLogCmd.get() ) {
252 auto counter = 0;
253 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
254 auto xaxisLog = G4UIcommand::ConvertToBool(parameters[counter++]);
255 fManager->SetH1XAxisIsLog(id, xaxisLog);
256 }
257 else if ( command == fSetH1YAxisLogCmd.get() ) {
258 auto counter = 0;
259 auto id = G4UIcommand::ConvertToInt(parameters[counter++]);
260 auto yaxisLog = G4UIcommand::ConvertToBool(parameters[counter++]);
261 fManager->SetH1YAxisIsLog(id, yaxisLog);
262 }
263}
std::size_t GetParameterEntries() const
Definition: G4UIcommand.hh:138
static G4int ConvertToInt(const char *st)
Definition: G4UIcommand.cc:557
static G4bool ConvertToBool(const char *st)
Definition: G4UIcommand.cc:545
G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4bool SetH1YAxisIsLog(G4int id, G4bool isLog)
G4bool SetH1Title(G4int id, const G4String &title)
G4bool SetH1XAxisTitle(G4int id, const G4String &title)
G4bool SetH1XAxisIsLog(G4int id, G4bool isLog)
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4bool SetH1YAxisTitle(G4int id, const G4String &title)
void Tokenize(const G4String &line, std::vector< G4String > &tokens)
G4double GetUnitValue(const G4String &unit)
const char * name(G4int ptype)

References G4UIcommand::ConvertToBool(), G4UIcommand::ConvertToInt(), G4VAnalysisManager::CreateH1(), fCreateH1Cmd, fHelper, fManager, G4AnalysisMessengerHelper::BinData::fNbins, G4AnalysisMessengerHelper::BinData::fSbinScheme, fSetH1Cmd, fSetH1TitleCmd, fSetH1XAxisCmd, fSetH1XAxisLogCmd, fSetH1XCmd, fSetH1YAxisCmd, fSetH1YAxisLogCmd, G4AnalysisMessengerHelper::BinData::fSfcn, G4AnalysisMessengerHelper::BinData::fSunit, G4AnalysisMessengerHelper::BinData::fVmax, G4AnalysisMessengerHelper::BinData::fVmin, G4UIcommand::GetParameterEntries(), G4Analysis::GetUnitValue(), G4InuclParticleNames::name(), G4VAnalysisManager::SetH1(), G4VAnalysisManager::SetH1Title(), G4VAnalysisManager::SetH1XAxisIsLog(), G4VAnalysisManager::SetH1XAxisTitle(), G4VAnalysisManager::SetH1YAxisIsLog(), G4VAnalysisManager::SetH1YAxisTitle(), and G4Analysis::Tokenize().

◆ StoB()

G4bool G4UImessenger::StoB ( G4String  s)
protectedinherited

Definition at line 137 of file G4UImessenger.cc.

138{
140 G4bool vl = false;
141 if(v == "Y" || v == "YES" || v == "1" || v == "T" || v == "TRUE")
142 {
143 vl = true;
144 }
145 return vl;
146}
bool G4bool
Definition: G4Types.hh:86
G4String to_upper_copy(G4String str)
Return uppercase copy of string.

References G4StrUtil::to_upper_copy().

Referenced by G4LocalThreadCoutMessenger::SetNewValue(), G4CascadeParamMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().

◆ StoD()

G4double G4UImessenger::StoD ( G4String  s)
protectedinherited

◆ StoI()

G4int G4UImessenger::StoI ( G4String  s)
protectedinherited

◆ StoL()

G4long G4UImessenger::StoL ( G4String  s)
protectedinherited

Definition at line 117 of file G4UImessenger.cc.

118{
119 G4long vl;
120 const char* t = str;
121 std::istringstream is(t);
122 is >> vl;
123 return vl;
124}
long G4long
Definition: G4Types.hh:87

Referenced by G4RunMessenger::SetNewValue().

Field Documentation

◆ baseDir

G4UIdirectory* G4UImessenger::baseDir = nullptr
protectedinherited

◆ baseDirName

G4String G4UImessenger::baseDirName = ""
protectedinherited

◆ commandsShouldBeInMaster

G4bool G4UImessenger::commandsShouldBeInMaster = false
protectedinherited

◆ fCreateH1Cmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fCreateH1Cmd
private

Definition at line 67 of file G4H1Messenger.hh.

Referenced by CreateH1Cmd(), and SetNewValue().

◆ fDirectory

std::unique_ptr<G4UIdirectory> G4H1Messenger::fDirectory
private

Definition at line 65 of file G4H1Messenger.hh.

Referenced by G4H1Messenger().

◆ fHelper

std::unique_ptr<G4AnalysisMessengerHelper> G4H1Messenger::fHelper
private

Definition at line 64 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fManager

G4VAnalysisManager* G4H1Messenger::fManager { nullptr }
private

Associated class.

Definition at line 63 of file G4H1Messenger.hh.

Referenced by SetNewValue().

◆ fSetH1Cmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1Cmd
private

Definition at line 68 of file G4H1Messenger.hh.

Referenced by SetH1Cmd(), and SetNewValue().

◆ fSetH1TitleCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1TitleCmd
private

Definition at line 70 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fSetH1XAxisCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1XAxisCmd
private

Definition at line 71 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fSetH1XAxisLogCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1XAxisLogCmd
private

Definition at line 73 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fSetH1XCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1XCmd
private

Definition at line 69 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fSetH1YAxisCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1YAxisCmd
private

Definition at line 72 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().

◆ fSetH1YAxisLogCmd

std::unique_ptr<G4UIcommand> G4H1Messenger::fSetH1YAxisLogCmd
private

Definition at line 74 of file G4H1Messenger.hh.

Referenced by G4H1Messenger(), and SetNewValue().


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