Import Geant4 11.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2022-12-09 14:43:28 +01:00
parent c07cea1fe0
commit 9f34590941
3810 changed files with 200490 additions and 182326 deletions
@@ -54,10 +54,10 @@ void G4CsvNtupleManager::CreateTNtupleFromBooking(
if ( ! fFileManager->CreateNtupleFile(ntupleDescription) ) return;
// create ntuple
ntupleDescription->fNtuple
= new tools::wcsv::ntuple(
*(ntupleDescription->fFile), G4cerr, ntupleDescription->fNtupleBooking);
fNtupleVector.push_back(ntupleDescription->fNtuple);
ntupleDescription->SetNtuple(
new tools::wcsv::ntuple(
*(ntupleDescription->GetFile()), G4cerr, ntupleDescription->GetNtupleBooking()));
fNtupleVector.push_back(ntupleDescription->GetNtuple());
}
//_____________________________________________________________________________
@@ -67,22 +67,21 @@ void G4CsvNtupleManager::FinishTNtuple(
{
// Do nothing if the base file name was not yet defined
if ( ! fFileManager->GetFileName().size() ) return;
if (fFileManager->GetFileName().size() == 0u) return;
// Create ntuple from booking
if ( ! ntupleDescription->fNtuple ) {
if (ntupleDescription->GetNtuple() == nullptr) {
CreateTNtupleFromBooking(ntupleDescription);
}
// Return if creating ntuple failed
if ( ! ntupleDescription->fNtuple ) {
if (ntupleDescription->GetNtuple() == nullptr) {
Warn("Creating ntuple has failed.", fkClass, "FinishTNtuple");
return;
}
// Write header if ntuple already exists
if ( ! WriteHeader(ntupleDescription->fNtuple) ) {
if ( ! WriteHeader(ntupleDescription->GetNtuple()) ) {
Warn("Writing ntuple header has failed.", fkClass, "FinishTNtuple");
}
}