Geant4-11
G4VNtupleFileManager.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26
27// Author: Ivana Hrivnacova, 15/09/2020 (ivana@ipno.in2p3.fr)
28
31#include "globals.hh"
32
33using namespace G4Analysis;
34
35namespace {
36
37//_____________________________________________________________________________
38void NtupleMergingWarning(std::string_view className,
39 std::string_view functionName,
40 const G4String& outputType)
41{
42 Warn("Ntuple merging is not available with " + outputType + " output.\n" +
43 "Setting is ignored.", className, functionName);
44}
45
46}
47
48//_____________________________________________________________________________
50 const G4String& fileType)
51 : fState(state),
52 fFileType(fileType)
53{}
54
57 G4int /*nofReducedNtupleFiles*/)
58{
59// The function is overridden in the managers which supports ntuple merging
60// Here we give just a warning that the feature is not available.
61
62 NtupleMergingWarning(fkClass, "SetNtupleMerging", fFileType);
63}
64
65//_____________________________________________________________________________
67 G4bool /*rowMode*/)
68{
69// The function is overridden in the managers which supports ntuple merging
70// Here we give just a warning that the feature is not available.
71
72 NtupleMergingWarning(fkClass, "SetNtupleRowWise", fFileType);
73}
74
75//_____________________________________________________________________________
76void G4VNtupleFileManager::SetBasketSize(unsigned int /*basketSize*/)
77{
78// The function is overridden in the managers which supports ntuple merging
79// Here we give just a warning that the feature is not available.
80
81 NtupleMergingWarning(fkClass, "SetBasketSize", fFileType);
82}
83
84//_____________________________________________________________________________
85void G4VNtupleFileManager::SetBasketEntries(unsigned int /*basketEntries*/)
86{
87// The function is overridden in the managers which supports ntuple merging
88// Here we give just a warning that the feature is not available.
89
90 NtupleMergingWarning(fkClass, "SetBasketEntries", fFileType);
91}
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
static char className[]
Definition: G4Win32.cc:36
virtual void SetNtupleMerging(G4bool mergeNtuples, G4int nofReducedNtupleFiles=0)
virtual void SetNtupleRowWise(G4bool rowWise, G4bool rowMode=true)
virtual void SetBasketSize(unsigned int basketSize)
virtual void SetBasketEntries(unsigned int basketEntries)
static constexpr std::string_view fkClass
G4VNtupleFileManager()=delete
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)
void NtupleMergingWarning(std::string_view className, std::string_view functionName, const G4String &outputType)