52 #include "Framework/Conventions/GBuild.h" 62 #ifdef __GENIE_FLUX_DRIVERS_ENABLED__ 68 using namespace genie;
72 void GetEventRange (Long64_t nev, Long64_t & n1, Long64_t & n2);
96 dynamic_cast <TTree *> (
file.Get(
"gtree"));
103 Long64_t nev = ghep_tree->GetEntries();
105 <<
"Input GHEP event tree has " << nev
106 << ((nev==1) ?
" entry." :
" entries.");
111 <<
"Input tree header: " << *thdr;
119 ghep_tree->SetBranchAddress(
"gmcrec", &mcrec);
125 bool have_gevpick_branches =
false;
126 TObjString* orig_filename = 0;
127 Long64_t orig_evtnum;
128 TBranch * brOrigFilename = ghep_tree->GetBranch(
"orig_filename");
129 TBranch * brOrigEvtNum = ghep_tree->GetBranch(
"orig_evtnum");
130 if(brOrigFilename!=0 && brOrigEvtNum!=0) {
131 have_gevpick_branches =
true;
132 brOrigFilename->SetAddress(&orig_filename);
133 brOrigEvtNum ->SetAddress(&orig_evtnum);
139 #ifdef __GENIE_FLUX_DRIVERS_ENABLED__ 142 TBranch * brFluxInfo = ghep_tree->GetBranch(
"flux");
144 TObjArray * leafarr = brFluxInfo->GetListOfLeaves();
147 while((leaf = (TLeaf*)iter.Next())) {
148 string ltypename = leaf->GetTypeName();
149 if(ltypename ==
"genie::flux::GJPARCNuFluxPassThroughInfo") {
150 brFluxInfo->SetAddress(&jparc_flux_info);
152 <<
"Found JPARC neutrino flux pass-though info";
155 if(ltypename ==
"genie::flux::GNuMIFluxPassThroughInfo") {
156 brFluxInfo->SetAddress(&gnumi_flux_info);
158 <<
"Found NuMI neutrino flux pass-though info";
171 for(Long64_t i = n1; i <= n2; i++) {
172 ghep_tree->GetEntry(i);
178 <<
" ** Event: " << rec_header.
ievent 183 if(have_gevpick_branches) {
185 <<
"\n Above event was originally event: " << orig_evtnum
186 <<
"\n in event file: " << orig_filename->GetString().Data()
193 #ifdef __GENIE_FLUX_DRIVERS_ENABLED__ 194 if(jparc_flux_info) {
196 <<
"Associated JPARC flux pass-through info for above event:" 199 if(gnumi_flux_info) {
201 <<
"Associated NuMI flux pass-through info for above event:" 229 LOG(
"gevdump",
pFATAL) <<
"Invalid event range";
239 LOG(
"gevdump",
pINFO) <<
"*** Parsing command line arguments";
250 LOG(
"gevdump",
pINFO) <<
"Reading event sample filename";
254 <<
"Unspecified input filename - Exiting";
262 LOG(
"gevdump",
pINFO) <<
"Reading number of events to analyze";
264 if (nev.find(
",") != string::npos) {
267 LOG(
"gevdump",
pFATAL) <<
"Invalid syntax";
282 <<
"Unspecified number of events to analyze - Use all";
293 <<
"\n\n" <<
"Syntax:" <<
"\n" 294 <<
" gevdump -f sample.root [-n n1[,n2]] [--event-record-print-level]\n";
static void SetPrintLevel(int print_level)
NtpMCRecHeader hdr
record header
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
void AddDarkMatter(double mass, double med_ratio)
void GetCommandLineArgs(int argc, char **argv)
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
void ReadFromCommandLine(int argc, char **argv)
vector< long > ArgAsLongTokens(char opt, string delimeter)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void GetEventRange(Long64_t nev, Long64_t &n1, Long64_t &n2)
int main(int argc, char **argv)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
static PDGLibrary * Instance(void)
static RunOpt * Instance(void)
Command line argument parser.
void Clear(Option_t *opt="")
bool OptionExists(char opt)
was option set?