Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
// Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
|
||||
|
||||
#include "G4GenericAnalysisManager.hh"
|
||||
#include "G4GenericAnalysisMessenger.hh"
|
||||
#include "G4GenericFileManager.hh"
|
||||
#include "G4AnalysisManagerState.hh"
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
@@ -71,8 +70,6 @@ G4bool G4GenericAnalysisManager::IsInstance()
|
||||
G4GenericAnalysisManager::G4GenericAnalysisManager()
|
||||
: G4ToolsAnalysisManager("")
|
||||
{
|
||||
fMessenger = std::make_unique<G4GenericAnalysisMessenger>(this);
|
||||
|
||||
if ( ! G4Threading::IsWorkerThread() ) fgMasterInstance = this;
|
||||
|
||||
// File manager
|
||||
@@ -179,6 +176,14 @@ G4bool G4GenericAnalysisManager::OpenFileImpl(const G4String& fileName)
|
||||
return result;
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
void G4GenericAnalysisManager::SetDefaultFileTypeImpl(const G4String& value)
|
||||
{
|
||||
G4VAnalysisManager::SetDefaultFileTypeImpl(value);
|
||||
|
||||
fFileManager->SetDefaultFileType(value);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4bool G4GenericAnalysisManager::WriteH1(G4int id, const G4String& fileName)
|
||||
{
|
||||
@@ -253,6 +258,7 @@ G4bool G4GenericAnalysisManager::WriteP1(G4int id, const G4String& fileName)
|
||||
auto p1Name = GetP1Name(id);
|
||||
return fFileManager->WriteTExtra<tools::histo::p1d>(fileName, p1d, p1Name);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4bool G4GenericAnalysisManager::WriteP2(G4int id, const G4String& fileName)
|
||||
{
|
||||
@@ -271,3 +277,17 @@ G4bool G4GenericAnalysisManager::WriteP2(G4int id, const G4String& fileName)
|
||||
auto p2Name = GetP2Name(id);
|
||||
return fFileManager->WriteTExtra<tools::histo::p2d>(fileName, p2d, p2Name);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
tools::ntuple_booking* G4GenericAnalysisManager::GetNtuple(
|
||||
G4bool warn, G4bool onlyIfActive) const
|
||||
{
|
||||
return fNtupleBookingManager->GetNtuple(warn, onlyIfActive);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
tools::ntuple_booking* G4GenericAnalysisManager::GetNtuple(
|
||||
G4int ntupleId, G4bool warn, G4bool onlyIfActive) const
|
||||
{
|
||||
return fNtupleBookingManager->GetNtuple(ntupleId, warn, onlyIfActive);
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// Author: Ivana Hrivnacova, 18/10/2022 (ivana@ipno.in2p3.fr)
|
||||
|
||||
#include "G4GenericAnalysisMessenger.hh"
|
||||
#include "G4GenericAnalysisManager.hh"
|
||||
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4GenericAnalysisMessenger::G4GenericAnalysisMessenger(G4GenericAnalysisManager* manager)
|
||||
: fManager(manager)
|
||||
{
|
||||
fSetDefaultFileTypeCmd = CreateCommand<G4UIcmdWithAString>(
|
||||
"setDefaultFileType", "Set default output file type", "DefaultFileType", false);
|
||||
#ifdef TOOLS_USE_HDF5
|
||||
fSetDefaultFileTypeCmd->SetCandidates("csv hdf5 root xml");
|
||||
#else
|
||||
fSetDefaultFileTypeCmd->SetCandidates("csv root xml");
|
||||
#endif
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4GenericAnalysisMessenger::~G4GenericAnalysisMessenger() = default;
|
||||
|
||||
//
|
||||
//
|
||||
// public functions
|
||||
//
|
||||
|
||||
//_____________________________________________________________________________
|
||||
void G4GenericAnalysisMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
|
||||
{
|
||||
if ( command == fSetDefaultFileTypeCmd.get() ) {
|
||||
fManager->SetDefaultFileType(newValues);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -289,6 +289,9 @@ G4bool G4GenericFileManager::DeleteEmptyFiles()
|
||||
result &= fileManager->DeleteEmptyFiles();
|
||||
}
|
||||
|
||||
// Clear all saved file names in base file manager
|
||||
G4BaseFileManager::ClearData();
|
||||
|
||||
Message(kVL3, "delete", "empty files", "", result);
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user