72 using std::ostringstream;
74 using namespace genie;
96 for( ; file_iter != gAllFiles.end(); ++file_iter) {
106 <<
" ****** Saving all loaded splines into : " <<
gOutFile;
114 vector<string>
files;
120 file_iter = gInpFiles.begin();
121 for( ; file_iter != gInpFiles.end(); ++file_iter) {
123 files.push_back(filename);
127 dir_iter = gInpDirs.begin();
128 for( ; dir_iter != gInpDirs.end(); ++dir_iter) {
129 string path = *dir_iter;
133 file_iter = path_files.begin();
134 for( ; file_iter != path_files.end(); ++file_iter) {
136 files.push_back(filename);
145 LOG(
"gspladd",
pNOTICE) <<
"Parsing command line arguments";
155 LOG(
"gspladd",
pINFO) <<
"Reading input files";
157 if(inpfiles.find(
",") != string::npos) {
162 gInpFiles.push_back(inpfiles);
167 LOG(
"gspladd",
pINFO) <<
"Reading input directories";
169 if(inpdirs.find(
",") != string::npos) {
174 gInpDirs.push_back(inpdirs);
179 LOG(
"gspladd",
pINFO) <<
"Reading output file name";
182 LOG(
"gspladd",
pFATAL) <<
"You must specify an output file name";
188 if(gAllFiles.size() <= 1) {
189 LOG(
"gspladd",
pFATAL) <<
"There must be at least 2 input files";
198 <<
"\n\n" <<
"Syntax:" <<
"\n" 199 <<
" gspladd -f file_list -d directory_list -o output.xml\n" 200 <<
" [--message-thresholds xml_file]\n";
vector< string > gInpFiles
list of input XML files
vector< string > GetAllInputFiles(void)
vector< string > gAllFiles
list of all input files
string ArgAsString(char opt)
THE MAIN GENIE PROJECT NAMESPACE
void ReadFromCommandLine(int argc, char **argv)
vector< string > GetAllFilesInPath(string path, string extension="")
static XSecSplineList * Instance()
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
vector< string > gInpDirs
list of input dirs (to look for XML files)
int main(int argc, char **argv)
void GetCommandLineArgs(int argc, char **argv)
void SaveAsXml(const string &filename, bool save_init=true) const
static RunOpt * Instance(void)
vector< string > Split(string input, string delim)
void MesgThresholds(string inpfile)
Command line argument parser.
enum genie::EXmlParseStatus XmlParserStatus_t
List of cross section vs energy splines.
XmlParserStatus_t LoadFromXml(const string &filename, bool keep=false)
bool OptionExists(char opt)
was option set?
string gOutFile
output XML file