A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records. More...
#include <NtpWriter.h>
Public Member Functions | |
NtpWriter (NtpMCFormat_t fmt=kNFGHEP, Long_t runnu=0, Long_t runseed=-1) | |
~NtpWriter () | |
initialize the ntuple writer More... | |
void | Initialize (void) |
add event More... | |
void | AddEventRecord (int ievent, const EventRecord *ev_rec) |
save the event tree More... | |
void | Save (void) |
get the even tree More... | |
TTree * | EventTree (void) |
void | CustomizeFilename (string filename) |
void | CustomizeFilenamePrefix (string prefix) |
Private Member Functions | |
void | SetDefaultFilename (string filename_prefix="gntp") |
void | OpenFile (string filename) |
void | CreateTree (void) |
void | CreateTreeHeader (void) |
void | CreateEventBranch (void) |
void | CreateGHEPEventBranch (void) |
Private Attributes | |
NtpMCFormat_t | fNtpFormat |
enumeration of event formats More... | |
Long_t | fRunNu |
run nu More... | |
Long_t | fRunSeed |
run seed More... | |
string | fOutFilename |
output filename More... | |
TFile * | fOutFile |
output file More... | |
TTree * | fOutTree |
output tree More... | |
TBranch * | fEventBranch |
the generated event branch More... | |
NtpMCEventRecord * | fNtpMCEventRecord |
NtpMCTreeHeader * | fNtpMCTreeHeader |
A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records.
October 1, 2004
Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 39 of file NtpWriter.h.
NtpWriter::NtpWriter | ( | NtpMCFormat_t | fmt = kNFGHEP , |
Long_t | runnu = 0 , |
||
Long_t | runseed = -1 |
||
) |
Definition at line 35 of file NtpWriter.cxx.
NtpWriter::~NtpWriter | ( | ) |
void NtpWriter::AddEventRecord | ( | int | ievent, |
const EventRecord * | ev_rec | ||
) |
save the event tree
Definition at line 57 of file NtpWriter.cxx.
|
private |
Definition at line 175 of file NtpWriter.cxx.
|
private |
Definition at line 190 of file NtpWriter.cxx.
|
private |
Definition at line 161 of file NtpWriter.cxx.
|
private |
Definition at line 210 of file NtpWriter.cxx.
void NtpWriter::CustomizeFilename | ( | string | filename | ) |
Definition at line 128 of file NtpWriter.cxx.
void NtpWriter::CustomizeFilenamePrefix | ( | string | prefix | ) |
Definition at line 133 of file NtpWriter.cxx.
|
inline |
use before Initialize() only if you wish to override the default filename, or the default filename prefix
Definition at line 55 of file NtpWriter.h.
void NtpWriter::Initialize | ( | void | ) |
add event
Definition at line 83 of file NtpWriter.cxx.
|
private |
Definition at line 149 of file NtpWriter.cxx.
void NtpWriter::Save | ( | void | ) |
get the even tree
Definition at line 225 of file NtpWriter.cxx.
|
private |
Definition at line 138 of file NtpWriter.cxx.
|
private |
the generated event branch
Definition at line 77 of file NtpWriter.h.
|
private |
enumeration of event formats
Definition at line 71 of file NtpWriter.h.
|
private |
Definition at line 78 of file NtpWriter.h.
|
private |
Definition at line 79 of file NtpWriter.h.
|
private |
output file
Definition at line 75 of file NtpWriter.h.
|
private |
output filename
Definition at line 74 of file NtpWriter.h.
|
private |
output tree
Definition at line 76 of file NtpWriter.h.
|
private |
run nu
Definition at line 72 of file NtpWriter.h.
|
private |
run seed
Definition at line 73 of file NtpWriter.h.