![]() |
ENSDF++ 1.1
An easy, fast and simple way to run querys towards the ENSDF database, written in C++.
|
Header file for the small program Unique, see Unique.cpp for more information. More...
#include <stdio.h>
#include <list>
#include <algorithm>
#include <string>
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
Main function in this short program. |
Header file for the small program Unique, see Unique.cpp for more information.
Definition in file Unique.h.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function in this short program.
argc | argc, standard. |
argv | argv, standard. |
Definition at line 4 of file Main.cpp.
References NULL, proceed_interact(), proceed_nointeract(), and CommandLineInterpreter::readFlaggedCommand().
{ list<CommandLineArgument> myArguments; myArguments.push_back(CommandLineArgument("file",1)); myArguments.push_back(CommandLineArgument("bLimits",2)); myArguments.push_back(CommandLineArgument("bBranch",1)); myArguments.push_back(CommandLineArgument("gBranch",1)); myArguments.push_back(CommandLineArgument("v",1)); //verbose. myArguments.push_back(CommandLineArgument("i",0)); myArguments.push_back(CommandLineArgument("gList",0)); myArguments.push_back(CommandLineArgument("iList",0)); myArguments.push_back(CommandLineArgument("cList",0)); myArguments.push_back(CommandLineArgument("texList",0)); myArguments.push_back(CommandLineArgument("t",1)); myArguments.push_back(CommandLineArgument("tLimits",2)); myArguments.push_back(CommandLineArgument("help",0)); CommandLineInterpreter * myInterpreter = new CommandLineInterpreter(argc, argv, myArguments); if(!myInterpreter->readFlaggedCommand("help").empty()) { printf("The following arguments are valid:\n"); printf(" -file <filename> Specifies output file.\n"); printf(" -bLimits <lower limit> <upper limit> Specifies limiting Beta decay times.\n"); printf(" -bBranch <branch strength> Specifies minimum branch strength for a beta decay branch.\n"); printf(" -gBranch <branch strength> Specifies minimum branch strength for a gamma decay.\n"); printf(" -v <verbose level> Specifies how verbose the output should be.\n The larger verbose level, the more information will be dumped to the terminal during execution.\n"); printf(" -i Interactive session.\n"); printf(" -gList Create a list of gamma energies instead of normal output.\n"); printf(" -iList Create a list of isomers instead of normal output.\n"); printf(" -cList Create a list of nuclides suitable for chart view.\n"); printf(" -texList Create a list of nuclides suitable for the report.\n"); printf(" -tLimits Time limits for the isomers in case of the iList parameter.\n"); printf(" -t <number of threads> specifies number of threads to use for loading data, default is 5."); printf(" -help Displays this help message.\n"); return 0; } if(argc<2 || !(myInterpreter->readFlaggedCommand("i").empty())) { int verbosityLevel = 0; if(myInterpreter->readFlaggedCommand("v").size()==1) verbosityLevel = atoi((myInterpreter->readFlaggedCommand("v").front()).c_str()); unsigned int nbrOfThreads = 5; if(myInterpreter->readFlaggedCommand("t").size()==1) nbrOfThreads = atoi((myInterpreter->readFlaggedCommand("t").front()).c_str()); int retval = proceed_interact(verbosityLevel, nbrOfThreads); delete myInterpreter; myInterpreter = NULL; return retval; } int retval = proceed_nointeract(myInterpreter); delete myInterpreter; myInterpreter = NULL; return retval; }