32#ifndef G4TNtupleDescription_h
33#define G4TNtupleDescription_h 1
38#include "tools/ntuple_booking"
42template <
typename NT,
typename FT>
47 : fNtupleBooking(g4NtupleBooking->fNtupleBooking),
48 fFileName(g4NtupleBooking->fFileName),
49 fActivation(g4NtupleBooking->fActivation)
55 if ( fIsNtupleOwner )
delete fNtuple;
77 std::shared_ptr<FT> fFile {
nullptr };
78 NT* fNtuple {
nullptr };
79 tools::ntuple_booking fNtupleBooking;
81 G4bool fActivation {
true };
82 G4bool fIsNtupleOwner {
true };
88template <
typename NT,
typename FT>
92template <
typename NT,
typename FT>
96template <
typename NT,
typename FT>
98{ fFileName = fileName; }
100template <
typename NT,
typename FT>
102{ fActivation = activation; }
104template <
typename NT,
typename FT>
106{ fIsNtupleOwner = isNtupleOwner; }
108template <
typename NT,
typename FT>
110{ fHasFill = hasFill; }
112template <
typename NT,
typename FT>
115 if (fIsNtupleOwner)
delete fNtuple;
119template <
typename NT,
typename FT>
123template <
typename NT,
typename FT>
127template <
typename NT,
typename FT>
128const tools::ntuple_booking&
130{
return fNtupleBooking; }
132template <
typename NT,
typename FT>
136template <
typename NT,
typename FT>
138{
return fActivation; }
140template <
typename NT,
typename FT>
142{
return fIsNtupleOwner; }
144template <
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)
G4bool GetHasFill() const
void SetFileName(const G4String &fileName)
G4TNtupleDescription()=delete
std::shared_ptr< FT > GetFile() const
G4String GetFileName() const
void SetHasFill(G4bool hasFill)