Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -32,32 +32,37 @@
|
||||
#ifndef G4TNtupleDescription_h
|
||||
#define G4TNtupleDescription_h 1
|
||||
|
||||
#include "G4NtupleBookingManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/ntuple_booking"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
template <typename TNTUPLE>
|
||||
template <typename TN, typename TF>
|
||||
struct G4TNtupleDescription
|
||||
{
|
||||
G4TNtupleDescription()
|
||||
G4TNtupleDescription(G4NtupleBooking* g4NtupleBooking)
|
||||
: fFile(nullptr),
|
||||
fNtuple(nullptr),
|
||||
fNtupleBooking(),
|
||||
fActivation(true),
|
||||
fIsNtupleOwner(true) {}
|
||||
fNtupleBooking(g4NtupleBooking->fNtupleBooking),
|
||||
fFileName(g4NtupleBooking->fFileName),
|
||||
fActivation(g4NtupleBooking->fActivation),
|
||||
fIsNtupleOwner(true),
|
||||
fHasFill(false) {}
|
||||
|
||||
~G4TNtupleDescription()
|
||||
{ delete fFile;
|
||||
if ( fIsNtupleOwner ) delete fNtuple;
|
||||
{
|
||||
if ( fIsNtupleOwner ) delete fNtuple;
|
||||
}
|
||||
|
||||
std::ofstream* fFile;
|
||||
TNTUPLE* fNtuple;
|
||||
std::shared_ptr<TF> fFile;
|
||||
TN* fNtuple;
|
||||
tools::ntuple_booking fNtupleBooking;
|
||||
G4String fFileName;
|
||||
G4bool fActivation;
|
||||
G4bool fIsNtupleOwner;
|
||||
G4bool fHasFill;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user