32#ifndef G4TNtupleDescription_h
33#define G4TNtupleDescription_h 1
40template <
typename NT,
typename FT>
45 : fG4NtupleBooking(g4NtupleBooking)
51 if ( fIsNtupleOwner )
delete fNtuple;
75 std::shared_ptr<FT> fFile {
nullptr };
76 NT* fNtuple {
nullptr };
78 G4bool fIsNtupleOwner {
true };
84template <
typename NT,
typename FT>
88template <
typename NT,
typename FT>
92template <
typename NT,
typename FT>
94{ fG4NtupleBooking->
fFileName = fileName; }
96template <
typename NT,
typename FT>
98{ fG4NtupleBooking->fActivation = activation; }
100template <
typename NT,
typename FT>
102{ fIsNtupleOwner = isNtupleOwner; }
104template <
typename NT,
typename FT>
106{ fHasFill = hasFill; }
108template <
typename NT,
typename FT>
111 if (fIsNtupleOwner)
delete fNtuple;
115template <
typename NT,
typename FT>
119template <
typename NT,
typename FT>
123template <
typename NT,
typename FT>
126{
return fG4NtupleBooking; }
128template <
typename NT,
typename FT>
129const tools::ntuple_booking&
133template <
typename NT,
typename FT>
135{
return fG4NtupleBooking->fFileName; }
137template <
typename NT,
typename FT>
139{
return fG4NtupleBooking->fActivation; }
141template <
typename NT,
typename FT>
143{
return fIsNtupleOwner; }
145template <
typename NT,
typename FT>
void SetFile(std::shared_ptr< FT > file)
const tools::ntuple_booking & GetNtupleBooking() const
G4TNtupleDescription(G4NtupleBooking *g4NtupleBooking)
void SetNtuple(NT *ntuple)
void SetIsNtupleOwner(G4bool isNtupleOwner)
G4bool GetIsNtupleOwner() const
G4bool GetActivation() const
void SetActivation(G4bool activation)
G4NtupleBooking * GetG4NtupleBooking() const
G4bool GetHasFill() const
void SetFileName(const G4String &fileName)
G4TNtupleDescription()=delete
std::shared_ptr< FT > GetFile() const
G4String GetFileName() const
void SetHasFill(G4bool hasFill)
tools::ntuple_booking fNtupleBooking