35 #include "HistoMessenger.hh"
49 fHistoDir(0), fFactoryCmd(0), fFileCmd(0), fHistoCmd(0)
55 fFactoryCmd->
SetGuidance(
"set name for the histograms file");
58 fFileCmd->
SetGuidance(
"set type (hbook, XML) for the histograms file");
60 fHistoCmd =
new G4UIcommand(
"/testhadr/histo/setHisto",
this);
61 fHistoCmd->
SetGuidance(
"Set bining of the histo number ih :");
62 fHistoCmd->
SetGuidance(
" nbBins; valMin; valMax; unit (of vmin and vmax)");
65 ih->
SetGuidance(
"histo number : from 0 to MaxHisto-1");
82 unit->
SetGuidance(
"if omitted, vmin and vmax are assumed dimensionless");
102 if (command == fFactoryCmd) { fHisto->
SetFileName(newValues); }
104 if (command == fFileCmd) { fHisto->
SetFileType(newValues); }
106 if (command == fHistoCmd) {
109 std::istringstream is(newValues);
111 is >> ih >> nbBins >> vmin >> vmax >> unts;
115 if(vUnit <= 0.0) { vUnit = 1.; }
116 fHisto->
SetHisto1D(ih,nbBins,vmin,vmax,vUnit);
void SetParameter(G4UIparameter *const newParameter)
virtual void SetNewValue(G4UIcommand *, G4String)
void SetParameterRange(const char *theRange)
void SetDefaultValue(const char *theDefaultValue)
HistoMessenger(HistoManager *)
void SetGuidance(const char *aGuidance)
static G4double ValueOf(const char *unitName)
void SetHisto1D(G4int, G4int, G4double, G4double, G4double)
void SetFileType(const G4String &)
void SetGuidance(const char *theGuidance)
void SetFileName(const G4String &)