31 #include "HistoMessenger.hh"
35 #include "HistoManager.hh"
45 :histoManager (manager)
51 factoryCmd->
SetGuidance(
"set name for the histograms file");
54 typeCmd->
SetGuidance(
"set histograms file type: hbook, root, XML");
58 optionCmd->
SetGuidance(
"set option for the histograms file");
60 histoCmd =
new G4UIcommand(
"/ams/histo/setHisto",
this);
61 histoCmd->
SetGuidance(
"Set bining of the histo number ih :");
62 histoCmd->
SetGuidance(
" nbBins; valMin; valMax; unit (of vmin and vmax)");
65 ih->
SetGuidance(
"histo number : from 1 to MaxHisto-1");
75 valMin->
SetGuidance(
"valMin, expressed in choosen unit");
79 valMax->
SetGuidance(
"valMax, expressed in choosen unit");
83 unit->
SetGuidance(
"if omitted, vmin and vmax are assumed dimensionless");
88 prhistoCmd->
SetGuidance(
"print histo #id on ascii file");
121 if (command == factoryCmd)
124 if (command == typeCmd)
127 if (command == optionCmd)
130 if (command == histoCmd)
132 std::istringstream is(newValues);
134 is >> ih >> nbBins >> vmin >> vmax >> unts;
138 histoManager->
SetHisto (ih,nbBins,vmin*vUnit,vmax*vUnit,unit);
141 if (command == prhistoCmd)
144 if (command == rmhistoCmd)
147 if (command == ntuplCmd)
void SetParameter(G4UIparameter *const newParameter)
void SetNewValue(G4UIcommand *, G4String)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetParameterRange(const char *theRange)
void SetDefaultValue(const char *theDefaultValue)
void SetFileType(const G4String &name)
HistoMessenger(HistoManager *)
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
void SetHisto(G4int, G4int, G4double, G4double, const G4String &unit="none")
static G4double ValueOf(const char *unitName)
void SetFileOption(const G4String &name)
void SetFileName(const G4String &name)
void SetCandidates(const char *candidateList)
void SetGuidance(const char *theGuidance)