94#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
100#include "Framework/Conventions/GBuild.h"
114#ifdef __GENIE_GEOM_DRIVERS_ENABLED__
121using namespace genie;
123#ifdef __GENIE_GEOM_DRIVERS_ENABLED__
145int main(
int argc,
char ** argv)
151 LOG(
"gmkspl",
pFATAL) <<
" No TuneId in RunOption";
157#if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT)
158 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
171 if(!neutrinos || neutrinos->size() == 0 ) {
172 LOG(
"gmkspl",
pFATAL) <<
"Empty neutrino PDG code list";
176 if(!targets || targets->size() == 0 ) {
177 LOG(
"gmkspl",
pFATAL) <<
"Empty target PDG code list";
182 LOG(
"gmkspl",
pINFO) <<
"Neutrinos: " << *neutrinos;
183 LOG(
"gmkspl",
pINFO) <<
"Targets: " << *targets;
189 PDGCodeList::const_iterator nuiter;
190 PDGCodeList::const_iterator tgtiter;
191 for(nuiter = neutrinos->begin(); nuiter != neutrinos->end(); ++nuiter) {
192 for(tgtiter = targets->begin(); tgtiter != targets->end(); ++tgtiter) {
193 int nupdgc = *nuiter;
194 int tgtpdgc = *tgtiter;
216 LOG(
"gmkspl",
pINFO) <<
"Parsing command line arguments";
230 LOG(
"gmkspl",
pINFO) <<
"Reading output filename";
238 LOG(
"gmkspl",
pINFO) <<
"Unspecified filename - Using default";
244 LOG(
"gmkspl",
pINFO) <<
"Reading number of knots/spline";
248 <<
"Unspecified number of knots - Using default";
254 LOG(
"gmkspl",
pINFO) <<
"Reading maximum spline energy";
258 <<
"Unspecified maximum spline energy - Using default";
264 LOG(
"gmkspl",
pINFO) <<
"Not copying input splines to output";
270 LOG(
"gmkspl",
pINFO) <<
"Reading neutrino PDG codes";
274 <<
"Unspecified neutrino PDG code list - Exiting";
282 LOG(
"gmkspl",
pINFO) <<
"Reading target nuclei PDG codes";
285 LOG(
"gmkspl",
pINFO) <<
"No code list specified from the command line";
289 bool tgt_geom =
true;
291 LOG(
"gmkspl",
pINFO) <<
"Reading ROOT geometry filename";
294 LOG(
"gmkspl",
pINFO) <<
"No geometry file was specified";
298 bool both = tgt_geom && tgt_cmd;
299 bool none = !tgt_geom && !tgt_cmd;
302 <<
"No geom file or cmd line target list was specified - Exiting";
308 <<
"You specified both a geom file and a cmd line target list "
309 <<
"- Exiting confused";
316 LOG(
"gmkspl",
pINFO) <<
"Reading random number seed";
319 LOG(
"gmkspl",
pINFO) <<
"Unspecified random number seed - Using default";
325 LOG(
"gmkspl",
pINFO) <<
"Reading cross-section file";
328 LOG(
"gmkspl",
pINFO) <<
"Unspecified input cross-section file";
352 <<
"\n\n" <<
"Syntax:" <<
"\n"
353 <<
" gmkspl -p nupdg"
354 <<
"\n <-t tgtpdg, -f geomfile> "
355 <<
"\n <-o | --output-cross-sections> xsec_xml_file_name"
357 <<
"\n [-e max_energy]"
359 <<
"\n [--seed seed_number]"
360 <<
"\n [--input-cross-sections xml_file]"
373 vector<string>::const_iterator iter;
374 for(iter = nuvec.begin(); iter != nuvec.end(); ++iter) {
391 vector<string>::const_iterator iter;
392 for(iter = tgtvec.begin(); iter != tgtvec.end(); ++iter) {
398 if (from_geom_file) {
399#ifdef __GENIE_GEOM_DRIVERS_ENABLED__
401 LOG(
"gmkspl",
pINFO) <<
"Creating/configuring a ROOT geom. driver";
410 <<
"To read-in a ROOT geometry you need to enable the geometry drivers!";
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Command line argument parser.
string ArgAsString(char opt)
double ArgAsDouble(char opt)
bool OptionExists(char opt)
was option set?
A vector of EventGeneratorI objects.
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
void Configure(int nu_pdgc, int Z, int A)
void CreateSplines(int nknots=-1, double emax=-1, bool inLogE=true)
void SetEventGeneratorList(string listname)
Initial State information.
void push_back(int pdg_code)
void ReadFromCommandLine(int argc, char **argv)
static std::string RunOptSyntaxString(bool include_generator_specific)
void BuildTune()
build tune and inform XSecSplineList
void EnableBareXSecPreCalc(bool flag)
static RunOpt * Instance(void)
List of cross section vs energy splines.
void SaveAsXml(const string &filename, bool save_init=true) const
static XSecSplineList * Instance()
A ROOT/GEANT4 geometry driver.
PDGCodeList * GetTargetCodes(void)
string gOptTgtPdgCodeList
PDGCodeList * GetNeutrinoCodes(void)
void GetCommandLineArgs(int argc, char **argv)
void XSecTable(string inpfile, bool require_table)
void RandGen(long int seed)
void MesgThresholds(string inpfile)
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f=' *')
vector< string > Split(string input, string delim)
THE MAIN GENIE PROJECT NAMESPACE