#include <G4RootFileManager.hh>
Definition at line 48 of file G4RootFileManager.hh.
Definition at line 43 of file G4RootFileManager.cc.
46 fHistoDirectory(
nullptr),
47 fNtupleDirectory(
nullptr),
50 fMainNtupleDirectories(),
G4VFileManager(const G4AnalysisManagerState &state)
G4RootFileManager::~G4RootFileManager |
( |
| ) |
|
|
virtual |
G4bool G4RootFileManager::CloseFile |
( |
| ) |
|
|
finalvirtual |
Implements G4VFileManager.
Definition at line 226 of file G4RootFileManager.cc.
228 auto finalResult =
true;
231 finalResult = finalResult &&
result;
234 for (
auto ntupleFile : fNtupleFiles ) {
236 finalResult = finalResult &&
result;
G4double G4ParticleHPJENDLHEData::G4double result
G4String GetNtupleFileName(const G4String &ntupleName) const
virtual G4bool CloseFile() final
G4String GetFullFileName(const G4String &baseFileName="", G4bool isPerThread=true) const
G4bool G4RootFileManager::CreateHistoDirectory |
( |
| ) |
|
Definition at line 246 of file G4RootFileManager.cc.
250 fHistoDirectory = &(fFile->dir());
261 if ( ! fHistoDirectory ) {
265 G4Exception(
"G4RootFileManager::CreateHistoDirectory()",
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
const G4AnalysisManagerState & fState
std::ostringstream G4ExceptionDescription
G4String fHistoDirectoryName
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool G4RootFileManager::CreateNtupleDirectory |
( |
| ) |
|
Definition at line 280 of file G4RootFileManager.cc.
284 fNtupleDirectory = &(fFile->dir());
295 if ( ! fNtupleDirectory ) {
299 G4Exception(
"G4RootFileManager::CreateNtupleDirectory()",
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
const G4AnalysisManagerState & fState
G4String fNtupleDirectoryName
std::ostringstream G4ExceptionDescription
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
unsigned int G4RootFileManager::GetBasketSize |
( |
| ) |
const |
|
inline |
tools::wroot::directory * G4RootFileManager::GetHistoDirectory |
( |
| ) |
const |
|
inline |
tools::wroot::directory * G4RootFileManager::GetMainNtupleDirectory |
( |
G4int |
index | ) |
const |
Definition at line 332 of file G4RootFileManager.cc.
334 if ( index==0 && ( ! fMainNtupleDirectories.size() ) )
return fNtupleDirectory;
336 if ( index < 0 || index >=
G4int(fMainNtupleDirectories.size()) ) {
337 G4String inFunction =
"G4RootFileManager::GetMainNtupleDirectory()";
339 description <<
" " <<
"main ntuple directory " << index <<
" does not exist.";
344 return fMainNtupleDirectories[index];
std::ostringstream G4ExceptionDescription
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
tools::wroot::directory * G4RootFileManager::GetNtupleDirectory |
( |
| ) |
const |
|
inline |
std::shared_ptr< tools::wroot::file > G4RootFileManager::GetNtupleFile |
( |
G4int |
index | ) |
const |
Definition at line 315 of file G4RootFileManager.cc.
317 if ( index==0 && ( ! fNtupleFiles.size() ) )
return fFile;
319 if ( index < 0 || index >=
G4int(fNtupleFiles.size()) ) {
320 G4String inFunction =
"G4RootFileManager::GetNtupleFile()";
322 description <<
" " <<
"ntuple file " << index <<
" does not exist.";
327 return fNtupleFiles[index];
std::ostringstream G4ExceptionDescription
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Implements G4VFileManager.
Definition at line 171 of file G4RootFileManager.cc.
181 fFile = std::make_shared<tools::wroot::file>(
G4cout,
name);
182 fFile->add_ziper(
'Z',tools::compress_buffer);
185 if ( ! fFile->is_open() ) {
187 description <<
" " <<
"Cannot open file " << fileName;
G4bool CreateNtupleDirectory()
const G4AnalysisManagerState & fState
G4bool fLockHistoDirectoryName
G4int GetCompressionLevel() const
std::ostringstream G4ExceptionDescription
G4bool CreateHistoDirectory()
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4bool fLockNtupleDirectoryName
G4String GetFullFileName(const G4String &baseFileName="", G4bool isPerThread=true) const
void G4RootFileManager::SetBasketSize |
( |
unsigned int |
basketSize | ) |
|
|
inline |
void G4RootFileManager::SetNofNtupleFiles |
( |
G4int |
nofFiles | ) |
|
|
inline |
G4bool G4RootFileManager::WriteFile |
( |
| ) |
|
|
finalvirtual |
Implements G4VFileManager.
Definition at line 210 of file G4RootFileManager.cc.
212 auto finalResult =
true;
215 finalResult = finalResult &&
result;
218 for (
auto ntupleFile : fNtupleFiles ) {
220 finalResult = finalResult &&
result;
G4double G4ParticleHPJENDLHEData::G4double result
G4String GetNtupleFileName(const G4String &ntupleName) const
virtual G4bool WriteFile() final
G4String GetFullFileName(const G4String &baseFileName="", G4bool isPerThread=true) const
The documentation for this class was generated from the following files: