45 #include "HistoMessenger.hh"
91 G4cout <<
"Histo::Book: ERROR open file <" << nam <<
">" <<
G4endl;
96 G4cout <<
"### Histo::Save: Opended file <" << nam <<
"> for "
105 G4cout <<
"Created histogram #" << i <<
" id= " <<
fHisto[i]
146 G4cout <<
"Histo::Save: FATAL ERROR writing ROOT file" <<
G4endl;
150 G4cout <<
"### Histo::Save: Histograms and Ntuples are saved" <<
G4endl;
165 G4cout <<
"Histo::Add1D: New histogram will be booked: #"
166 <<
id <<
" <" << name
167 <<
" " << nb <<
" " << x1 <<
" " << x2 <<
" " << u
188 if(i>=0 && i<fNHisto) {
190 G4cout <<
"Histo::SetHisto1D: #" << i
191 <<
" " << nb <<
" " << x1 <<
" " << x2 <<
" " << u
201 G4cout <<
"Histo::SetHisto1D: WARNING! wrong histogram index "
211 G4cout <<
"Histo::Activate: Histogram: #" << i <<
" "
214 if(i>=0 && i<fNHisto) {
226 G4cout <<
"Histo::Fill: Histogram: #" << i <<
" at x= " << x
230 if(i>=0 && i<fNHisto) {
233 G4cout <<
"Histo::Fill: WARNING! wrong histogram index "
244 G4cout <<
"Histo::Scale: Histogram: #" << i <<
" by factor "
247 if(i>=0 && i<fNHisto) {
250 G4cout <<
"Histo::Scale: WARNING! wrong histogram index "
295 if(i >= 0 && i < n) {
297 G4cout <<
"Histo::FillTupleI: i= " << i <<
" id= " <<
fTupleI[i]
302 G4cout <<
"Histo::FillTupleI: WARNING! wrong ntuple index "
313 if(i >= 0 && i < n) {
315 G4cout <<
"Histo::FillTupleF: i= " << i <<
" id= " <<
fTupleF[i]
320 G4cout <<
"Histo::FillTupleF: WARNING! wrong ntuple index "
331 if(i >= 0 && i < n) {
333 G4cout <<
"Histo::FillTupleD: i= " << i <<
" id= " <<
fTupleD[i]
338 G4cout <<
"Histo::FillTupleD: WARNING! wrong ntuple index "
363 if(nam ==
"root" || nam ==
"ROOT" ) { fHistType =
"root"; }
364 else if(nam ==
"xml" || nam ==
"XML") { fHistType =
"xml"; }
365 else if(nam ==
"ascii" || nam ==
"ASCII" ||
366 nam ==
"Csv" || nam ==
"csv" || nam ==
"CSV")
367 { fHistType =
"ascii"; }
void AddTupleD(const G4String &)
void AddTuple(const G4String &)
G4int CreateNtupleIColumn(const G4String &name)
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")
void AddTupleI(const G4String &)
std::vector< G4int > fTupleF
G4int CreateNtuple(const G4String &name, const G4String &title)
std::vector< G4int > fTupleD
std::vector< G4String > fNtupleI
void Activate(G4int, G4bool)
std::vector< G4bool > fActive
std::vector< G4String > fIds
std::vector< G4String > fTitles
G4bool FillNtupleFColumn(G4int id, G4float value)
void Fill(G4int, G4double, G4double)
std::vector< G4double > fXmin
void FillTupleF(G4int, G4float)
G4bool FillNtupleIColumn(G4int id, G4int value)
std::vector< G4String > fNtupleD
G4GLOB_DLL std::ostream G4cout
HistoMessenger * fMessenger
G4bool FillNtupleDColumn(G4int id, G4double value)
void ScaleH1(G4int, G4double)
void Add1D(const G4String &, const G4String &, G4int nb, G4double x1, G4double x2, G4double u=1.)
std::vector< G4int > fBins
std::vector< G4int > fTupleI
std::vector< G4String > fNtupleF
std::vector< G4double > fUnit
void AddTupleF(const G4String &)
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
void SetHisto1D(G4int, G4int, G4double, G4double, G4double)
void FillTupleD(G4int, G4double)
G4int CreateNtupleFColumn(const G4String &name)
static G4RootAnalysisManager * Instance()
G4int CreateNtupleDColumn(const G4String &name)
std::vector< G4int > fHisto
void SetFileType(const G4String &)
G4RootAnalysisManager * fManager
void FillTupleI(G4int, G4int)
tools::histo::h1d * GetH1(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
void SetFileName(const G4String &)
std::vector< G4double > fXmax