44 std::vector<G4CsvRNtupleDescription*>::iterator it;
61 G4String inFunction =
"G4CsvRNtupleManager::";
62 inFunction += functionName;
64 description <<
" " <<
"ntuple " <<
id <<
" does not exist.";
88 std::vector<G4CsvRNtupleDescription*>::iterator it;
110 if ( ! rntupleDescription )
return 0;
112 return rntupleDescription->
fNtuple;
148 std::vector<G4int>& vector)
155 std::vector<G4float>& vector)
162 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;
270 std::vector<G4int>& vector)
275 description <<
" ntupleId " << ntupleId <<
" " << columnName;
282 if ( ! ntupleDescription )
return false;
284 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
285 ntupleBinding->add_column(columnName, vector);
290 description <<
" ntupleId " << ntupleId <<
" " << columnName;
301 std::vector<G4float>& 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<G4double>& 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;
368 description <<
" ntupleId " << ntupleId <<
" " << columnName;
375 if ( ! ntupleDescription )
return false;
377 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
378 ntupleBinding->add_column(columnName, value);
383 description <<
" ntupleId " << ntupleId <<
" " << columnName;
404 description <<
" ntupleId " << ntupleId;
411 if ( ! ntupleDescription )
return false;
413 tools::rcsv::ntuple* ntuple = ntupleDescription->
fNtuple;
416 if ( ! isInitialized ) {
417 tools::ntuple_binding* ntupleBinding = ntupleDescription->
fNtupleBinding;
418 if ( ! ntuple->initialize(
G4cout, *ntupleBinding) ) {
422 <<
"Ntuple initialization failed !!";
431 G4bool next = ntuple->next();
433 if ( ! ntuple->get_row() ) {
437 <<
"Ntuple get_row() failed !!";
447 description <<
" ntupleId " << ntupleId;
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
G4CsvRNtupleManager(const G4AnalysisManagerState &state)
tools::ntuple_binding * fNtupleBinding
virtual G4bool SetNtupleSColumn(const G4String &columnName, G4String &value)
virtual G4bool SetNtupleFColumn(const G4String &columnName, G4float &value)
const G4AnalysisVerbose * GetVerboseL2() const
virtual G4bool GetNtupleRow()
G4GLOB_DLL std::ostream G4cout
const G4AnalysisVerbose * GetVerboseL4() const
virtual ~G4CsvRNtupleManager()
tools::rcsv::ntuple * fNtuple
tools::rcsv::ntuple * GetNtuple() const
G4int SetNtuple(G4CsvRNtupleDescription *rntupleDescription)
std::vector< G4CsvRNtupleDescription * > fNtupleVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool SetNtupleIColumn(const G4String &columnName, G4int &value)
G4CsvRNtupleDescription * GetNtupleInFunction(G4int id, G4String function, G4bool warn=true) const
virtual G4bool SetNtupleDColumn(const G4String &columnName, G4double &value)
G4bool isInitialized()
Check if the generator is initialized.
const G4AnalysisManagerState & fState