30 #include "HistoManager.hh"
34 #include "AIDA/AIDA.h"
40 :af(0),
tree(0),factoryOn(false)
44 af = AIDA_createAnalysisFactory();
46 G4cout <<
" HistoManager::HistoManager() :"
47 <<
" problem creating the AIDA analysis factory."
52 fileName[0] =
"nanobeam";
77 fileName[1] = fileName[0] +
"." + fileType;
80 AIDA::ITreeFactory* tf = af->createTreeFactory();
81 tree = tf->create(fileName[1], fileType, readOnly, createNew, fileOption);
84 G4cout <<
"HistoManager::book() :"
85 <<
" problem creating the AIDA tree with "
86 <<
" storeName = " << fileName[1]
87 <<
" storeType = " << fileType
88 <<
" readOnly = " << readOnly
89 <<
" createNew = " << createNew
90 <<
" options = " << fileOption
96 AIDA::IHistogramFactory*
hf = af->createHistogramFactory(*tree);
97 AIDA::ITupleFactory* ntf = af->createTupleFactory(*tree);
99 ntupl0 = ntf->create(
"ntuple0",
"Beam profile",
"double xIn, yIn, zIn");
100 ntupl1 = ntf->create(
"ntuple1",
"Grid",
"double xIn, yIn, e");
101 ntupl2 = ntf->create(
"ntuple2",
"Coef",
"double xIn, yIn, thetaIn, phiIn");
108 G4cout <<
"\n----> Histogram Tree is opened in " << fileName[1] <<
G4endl;
116 #ifdef G4ANALYSIS_USE
121 G4cout <<
"\n----> Histogram Tree is saved in " << fileName[1] <<
G4endl;
135 G4cout <<
"---> warning from HistoManager::FillNtuple() : Ntuple " << nt
136 <<
" does not exist " << column << value <<
G4endl;
139 #ifdef G4ANALYSIS_USE
140 if(nt==0) ntupl0->fill(column, value);
141 if(nt==1) ntupl1->fill(column, value);
142 if(nt==2) ntupl2->fill(column, value);
151 G4cout <<
"---> warning from HistoManager::AddRowNtuple() : Ntuple " << nt
152 <<
" do not exist" <<
G4endl;
155 #ifdef G4ANALYSIS_USE
156 if(nt==0) ntupl0->addRow();
157 if(nt==1) ntupl1->addRow();
158 if(nt==2) ntupl2->addRow();