44 std::vector<G4RootRNtupleDescription*>::iterator it;
61 G4String inFunction =
"G4RootRNtupleManager::";
62 inFunction += functionName;
64 description <<
" " <<
"ntuple " <<
id <<
" does not exist.";
88 std::vector<G4RootRNtupleDescription*>::iterator it;
110 if ( ! rntupleDescription )
return 0;
112 return rntupleDescription->
fNtuple;
155 std::vector<G4int>& vector)
162 std::vector<G4float>& vector)
169 std::vector<G4double>& vector)
182 description <<
" ntupleId " << ntupleId <<
" " << columnName;
189 if ( ! ntupleDescription )
return false;
191 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
192 ntupleBinding->add_column(columnName, value);
197 description <<
" ntupleId " << ntupleId <<
" " << columnName;
213 description <<
" ntupleId " << ntupleId <<
" " << columnName;
220 if ( ! ntupleDescription )
return false;
222 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
223 ntupleBinding->add_column(columnName, value);
228 description <<
" ntupleId " << ntupleId <<
" " << columnName;
244 description <<
" ntupleId " << ntupleId <<
" " << columnName;
251 if ( ! ntupleDescription )
return false;
253 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
254 ntupleBinding->add_column(columnName, value);
259 description <<
" ntupleId " << ntupleId <<
" " << columnName;
275 description <<
" ntupleId " << ntupleId <<
" " << columnName;
282 if ( ! ntupleDescription )
return false;
284 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
285 ntupleBinding->add_column(columnName, value);
290 description <<
" ntupleId " << ntupleId <<
" " << columnName;
301 std::vector<G4int>& vector)
306 description <<
" ntupleId " << ntupleId <<
" " << columnName;
313 if ( ! ntupleDescription )
return false;
315 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
316 ntupleBinding->add_column(columnName, vector);
321 description <<
" ntupleId " << ntupleId <<
" " << columnName;
332 std::vector<G4float>& vector)
337 description <<
" ntupleId " << ntupleId <<
" " << columnName;
344 if ( ! ntupleDescription )
return false;
346 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
347 ntupleBinding->add_column(columnName, vector);
352 description <<
" ntupleId " << ntupleId <<
" " << columnName;
363 std::vector<G4double>& vector)
368 description <<
" ntupleId " << ntupleId <<
" " << columnName;
375 if ( ! ntupleDescription )
return false;
377 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
378 ntupleBinding->add_column(columnName, vector);
383 description <<
" ntupleId " << ntupleId <<
" " << columnName;
403 description <<
" ntupleId " << ntupleId;
410 if ( ! ntupleDescription )
return false;
412 tools::rroot::ntuple* ntuple = ntupleDescription->
fNtuple;
413 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
416 if ( ! isInitialized ) {
421 description <<
" ntupleId " << ntupleId;
425 if ( ! ntuple->initialize(
G4cout, *ntupleBinding) ) {
429 <<
"Ntuple initialization failed !!";
438 G4bool next = ntuple->next();
440 if ( ! ntuple->get_row() ) {
444 <<
"Ntuple get_row() failed !!";
454 description <<
" ntupleId " << ntupleId;
tools::rroot::ntuple * GetNtuple() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
virtual G4bool SetNtupleIColumn(const G4String &columnName, G4int &value)
std::ostringstream G4ExceptionDescription
G4RootRNtupleManager(const G4AnalysisManagerState &state)
virtual G4bool SetNtupleSColumn(const G4String &columnName, G4String &value)
G4RootRNtupleDescription * GetNtupleInFunction(G4int id, G4String function, G4bool warn=true) const
const G4AnalysisVerbose * GetVerboseL2() const
G4int SetNtuple(G4RootRNtupleDescription *rntupleDescription)
G4GLOB_DLL std::ostream G4cout
const G4AnalysisVerbose * GetVerboseL4() const
virtual G4bool SetNtupleDColumn(const G4String &columnName, G4double &value)
virtual G4bool GetNtupleRow()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual ~G4RootRNtupleManager()
tools::rroot::ntuple * fNtuple
std::vector< G4RootRNtupleDescription * > fNtupleVector
tools::ntuple_binding * fNtupleBinding
G4bool isInitialized()
Check if the generator is initialized.
const G4AnalysisManagerState & fState
virtual G4bool SetNtupleFColumn(const G4String &columnName, G4float &value)