91 #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT) 97 #include "Framework/Conventions/GBuild.h" 111 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 118 using namespace genie;
120 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 148 LOG(
"gmkspl",
pFATAL) <<
" No TuneId in RunOption";
154 #if defined(HAVE_FENV_H) && defined(HAVE_FEENABLEEXCEPT) 155 feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
168 if(!neutrinos || neutrinos->
size() == 0 ) {
169 LOG(
"gmkspl",
pFATAL) <<
"Empty neutrino PDG code list";
173 if(!targets || targets->
size() == 0 ) {
174 LOG(
"gmkspl",
pFATAL) <<
"Empty target PDG code list";
179 LOG(
"gmkspl",
pINFO) <<
"Neutrinos: " << *neutrinos;
180 LOG(
"gmkspl",
pINFO) <<
"Targets: " << *targets;
188 for(nuiter = neutrinos->begin(); nuiter != neutrinos->end(); ++nuiter) {
189 for(tgtiter = targets->begin(); tgtiter != targets->end(); ++tgtiter) {
190 int nupdgc = *nuiter;
191 int tgtpdgc = *tgtiter;
213 LOG(
"gmkspl",
pINFO) <<
"Parsing command line arguments";
227 LOG(
"gmkspl",
pINFO) <<
"Reading output filename";
235 LOG(
"gmkspl",
pINFO) <<
"Unspecified filename - Using default";
241 LOG(
"gmkspl",
pINFO) <<
"Reading number of knots/spline";
245 <<
"Unspecified number of knots - Using default";
251 LOG(
"gmkspl",
pINFO) <<
"Reading maximum spline energy";
255 <<
"Unspecified maximum spline energy - Using default";
261 LOG(
"gmkspl",
pINFO) <<
"Not copying input splines to output";
267 LOG(
"gmkspl",
pINFO) <<
"Reading neutrino PDG codes";
271 <<
"Unspecified neutrino PDG code list - Exiting";
279 LOG(
"gmkspl",
pINFO) <<
"Reading target nuclei PDG codes";
282 LOG(
"gmkspl",
pINFO) <<
"No code list specified from the command line";
286 bool tgt_geom =
true;
288 LOG(
"gmkspl",
pINFO) <<
"Reading ROOT geometry filename";
291 LOG(
"gmkspl",
pINFO) <<
"No geometry file was specified";
295 bool both = tgt_geom && tgt_cmd;
296 bool none = !tgt_geom && !tgt_cmd;
299 <<
"No geom file or cmd line target list was specified - Exiting";
305 <<
"You specified both a geom file and a cmd line target list " 306 <<
"- Exiting confused";
313 LOG(
"gmkspl",
pINFO) <<
"Reading random number seed";
316 LOG(
"gmkspl",
pINFO) <<
"Unspecified random number seed - Using default";
322 LOG(
"gmkspl",
pINFO) <<
"Reading cross-section file";
325 LOG(
"gmkspl",
pINFO) <<
"Unspecified input cross-section file";
349 <<
"\n\n" <<
"Syntax:" <<
"\n" 350 <<
" gmkspl -p nupdg <-t tgtpdg, -f geomfile> " 351 <<
" <-o | --output-cross-section> xsec_xml_file_name" 352 <<
" [-n nknots] [-e max_energy] " 353 <<
" [--seed seed_number]" 354 <<
" [--input-cross-section xml_file]" 355 <<
" [--event-generator-list list_name]" 356 <<
" [--xml-path config_xml_dir]" 357 <<
" [--message-thresholds xml_file]\n\n";
368 for(iter = nuvec.begin(); iter != nuvec.end(); ++iter) {
386 for(iter = tgtvec.begin(); iter != tgtvec.end(); ++iter) {
392 if (from_geom_file) {
393 #ifdef __GENIE_GEOM_DRIVERS_ENABLED__ 395 LOG(
"gmkspl",
pINFO) <<
"Creating/configuring a ROOT geom. driver";
404 <<
"To read-in a ROOT geometry you need to enable the geometry drivers!";
void RandGen(long int seed)
PDGCodeList * GetTargetCodes(void)
void XSecTable(string inpfile, bool require_table)
PDGCodeList * GetNeutrinoCodes(void)
double ArgAsDouble(char opt)
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
void ReadFromCommandLine(int argc, char **argv)
static XSecSplineList * Instance()
virtual const PDGCodeList & ListOfTargetNuclei(void)
implement the GeomAnalyzerI interface
int main(int argc, char **argv)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void SetEventGeneratorList(string listname)
string gOptTgtPdgCodeList
A ROOT/GEANT4 geometry driver.
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
void BuildTune()
build tune and inform XSecSplineList
void SaveAsXml(const string &filename, bool save_init=true) const
static RunOpt * Instance(void)
vector< string > Split(string input, string delim)
void Configure(int nu_pdgc, int Z, int A)
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f='*')
A vector of EventGeneratorI objects.
void CreateSplines(int nknots=-1, double emax=-1, bool inLogE=true)
void GetCommandLineArgs(int argc, char **argv)
void MesgThresholds(string inpfile)
Command line argument parser.
List of cross section vs energy splines.
bool OptionExists(char opt)
was option set?
void EnableBareXSecPreCalc(bool flag)
void push_back(int pdg_code)
Initial State information.