00001 #include "FitterInterface.hh" 00002 #include "FitterArguments.h" 00003 00004 namespace SctFitter { 00005 using std::string; 00006 using std::list; 00007 using std::endl; 00008 00009 FitterArguments::FitterArguments(int argc, char** argv) : 00010 Arguments(argc, argv), m_strategy("NagFitStrategy"), m_options("NQR") 00011 { 00012 parse(); 00013 } 00014 void FitterArguments::parse(){ 00015 Arguments::parse(); 00016 for (list<string>::iterator i=m_list.begin(); i!=m_list.end(); ++i){ 00017 if (*i == "-options"){ 00018 m_options=next(i); 00019 } else if (*i == "-strategy"){ 00020 m_strategy=next(i); 00021 } 00022 } 00023 if (instanceName()=="") setInstanceName(FitterI::FitterInterface::instanceName); 00024 } 00025 void FitterArguments::printHelp(std::ostream& oss) const{ 00026 oss << "FitterArguments:" << endl 00027 << " -strategy <strategy name> : set fit stragety to e.g. RootFitStrategy or NagFitStrategy" <<endl 00028 << " -options <options> : set fit options e.g. NQR" <<endl; 00029 Arguments::printHelp(oss); 00030 } 00031 00032 std::string FitterArguments::getStrategyName() const{ 00033 return m_strategy; 00034 } 00035 00036 std::string FitterArguments::getFitOptions() const{ 00037 return m_options; 00038 } 00039 00040 }