27int main(
int argc, 
char **argv)
 
   42    JParser<> zap(
"Auxiliary program to test ROOT fit results.");
 
   44    zap[
'f'] = 
make_field(inputFile,  
"histogram, e.g: <file name>:<object name>");
 
   45    zap[
'='] = 
make_field(fcn,        
"function name")           = 
".*";
 
   46    zap[
'@'] = 
make_field(test,       
"<parameter> <min> <max>");
 
   51  catch(
const exception &error) {
 
   52    FATAL(error.what() << endl);
 
   56  TObject* p = getObject(inputFile);
 
   59    FATAL(
"No object at " << inputFile << endl);
 
   64  if (f1 == NULL && 
dynamic_cast<TF1*
>     (p) != NULL) { f1 = 
dynamic_cast<TF1*
>(p); }
 
   65  if (f1 == NULL && 
dynamic_cast<TH1*
>     (p) != NULL) { f1 = getFunction(
dynamic_cast<TH1*
>     (p), fcn.c_str()); };
 
   66  if (f1 == NULL && 
dynamic_cast<TGraph*
>  (p) != NULL) { f1 = getFunction(
dynamic_cast<TGraph*
>  (p), fcn.c_str()); };
 
   67  if (f1 == NULL && 
dynamic_cast<TGraph2D*
>(p) != NULL) { f1 = getFunction(
dynamic_cast<TGraph2D*
>(p), fcn.c_str()); };
 
   70    FATAL(
"No function at " << inputFile << 
" " << fcn << endl);
 
   74  for (
int i = 0; i != f1->GetNpar(); ++i) {
 
   76    DEBUG(left << setw(12) << f1->GetParName(i) << 
' ');
 
   79    JTest_t::const_iterator p = test.find(f1->GetParName(i));
 
   81    if (p != test.end()) {
 
   83      DEBUG(
" [" << 
SCIENTIFIC(12,5) << p->second.getLowerLimit() << 
"," << 
SCIENTIFIC(12,5) << p->second.getLowerLimit() << 
"] ");
 
   84      DEBUG((p->second(f1->GetParameter(i)) ? 
"passed" : 
"failed"));
 
   95  for (
int i = 0; i != f1->GetNpar(); ++i) {
 
   97    JTest_t::const_iterator p = test.find(f1->GetParName(i));
 
   99    if (p != test.end()) {
 
  100      ASSERT(p->second(f1->GetParameter(i)), p->first << 
' ' << p->second);