46 #include "G4RootAnalysisManager.hh"
82 fManager = G4RootAnalysisManager::Instance();
89 G4cout <<
"Histo::Book: ERROR open file <" << nam <<
">" << G4endl;
94 G4cout <<
"### Histo::Save: Opended file <" << nam <<
"> for "
95 <<
fNHisto <<
" histograms " << G4endl;
98 for(G4int i=0; i<
fNHisto; ++i) {
100 G4String ss =
"h" +
fIds[i];
103 G4cout <<
"Created histogram #" << i <<
" id= " <<
fHisto[i]
104 <<
" " << ss <<
" " <<
fTitles[i] << G4endl;
138 G4cout <<
"Histo::Save: FATAL ERROR writing ROOT file" << G4endl;
142 G4cout <<
"### Histo::Save: Histograms and Ntuples are saved" << G4endl;
145 G4cout <<
" File is closed" << G4endl;
147 delete G4RootAnalysisManager::Instance();
154 G4double x1, G4double x2, G4double u)
157 G4cout <<
"Histo::Add1D: New histogram will be booked: #" <<
id <<
" <" << name
158 <<
" " << nb <<
" " << x1 <<
" " << x2 <<
" " << u
180 G4cout <<
"Histo::SetHisto1D: #" << i
181 <<
" " << nb <<
" " << x1 <<
" " << x2 <<
" " << u
191 G4cout <<
"Histo::SetHisto1D: WARNING! wrong histogram index " << i << G4endl;
200 G4cout <<
"Histo::Activate: Histogram: #" << i <<
" "
215 G4cout <<
"Histo::Fill: Histogram: #" << i <<
" at x= " << x
222 G4cout <<
"Histo::Fill: WARNING! wrong histogram index " << i << G4endl;
232 G4cout <<
"Histo::Scale: Histogram: #" << i <<
" by factor " << x << G4endl;
237 G4cout <<
"Histo::Scale: WARNING! wrong histogram index " << i << G4endl;
281 if(i >= 0 && i < n) {
283 G4cout <<
"Histo::FillTupleI: i= " << i <<
" id= " <<
fTupleI[i]
284 <<
" <" <<
fNtupleI[i] <<
"> = " << x << G4endl;
288 G4cout <<
"Histo::FillTupleI: WARNING! wrong ntuple index " << i << G4endl;
298 if(i >= 0 && i < n) {
300 G4cout <<
"Histo::FillTupleF: i= " << i <<
" id= " <<
fTupleF[i]
301 <<
" <" <<
fNtupleF[i] <<
"> = " << x << G4endl;
305 G4cout <<
"Histo::FillTupleF: WARNING! wrong ntuple index " << i << G4endl;
315 if(i >= 0 && i < n) {
317 G4cout <<
"Histo::FillTupleD: i= " << i <<
" id= " <<
fTupleD[i]
318 <<
" <" <<
fNtupleD[i] <<
"> = " << x << G4endl;
322 G4cout <<
"Histo::FillTupleD: WARNING! wrong ntuple index " << i << G4endl;
346 if(nam ==
"root" || nam ==
"ROOT" ) {
fHistType =
"root"; }
347 else if(nam ==
"xml" || nam ==
"XML") {
fHistType =
"xml"; }
348 else if(nam ==
"ascii" || nam ==
"ASCII" ||
349 nam ==
"Csv" || nam ==
"csv" || nam ==
"CSV") {
fHistType =
"ascii"; }
G4RootAnalysisManager * fManager
void AddTupleF(const G4String &)
std::vector< G4double > fXmin
std::vector< G4int > fTupleF
void AddTuple(const G4String &)
std::vector< G4double > fUnit
std::vector< G4String > fNtupleI
std::vector< G4int > fTupleD
void AddTupleI(const G4String &)
HistoMessenger * fMessenger
void Fill(G4int, G4double, G4double)
std::vector< G4bool > fActive
std::vector< G4int > fHisto
std::vector< G4double > fXmax
void SetFileType(const G4String &)
std::vector< G4int > fTupleI
std::vector< G4String > fTitles
void Activate(G4int, G4bool)
void FillTupleF(G4int, G4float)
std::vector< G4String > fIds
std::vector< G4String > fNtupleF
void Add1D(const G4String &, const G4String &, G4int nb, G4double x1, G4double x2, G4double u=1.)
void SetHisto1D(G4int, G4int, G4double, G4double, G4double)
std::vector< G4int > fBins
void AddTupleD(const G4String &)
std::vector< G4String > fNtupleD
void FillTupleD(G4int, G4double)
void SetFileName(const G4String &)
void FillTupleI(G4int, G4int)
void ScaleH1(G4int, G4double)