ParameterJob::ParameterJob (RunLog& _log, String _desc ): log (_log) { accuracy = 0; startTime = 0; _desc.TrimLeft (); curStatus = _desc.ExtractChar (); if ((curStatus == '0') || (curStatus == '1') || (curStatus == '2') || (curStatus == '3') ) { // We Are Ok } else { log.Level (-1) << endl << "ParameterJob: We have an invalid Cur Status." << endl; osWaitForEnter (); } { String processsNumField = _desc.ExtractToken (" ,\t"); processNum = atoi (processsNumField.Str ()); } { String jobIdField = _desc.ExtractToken (" ,\t"); jobId = atoi (jobIdField.Str ()); } { String cParmStr = _desc.ExtractToken (" ,\t"); cParm = atoi (cParmStr.Str ()); } { String gammaParmStr = _desc.ExtractToken (" ,\t"); gammaParm = atof (gammaParmStr.Str ()); } { String aParmStr = _desc.ExtractToken (" ,\t"); aParm = atoi (aParmStr.Str ()); } { String accuracyField = _desc.ExtractToken (" ,\t"); accuracy = atof (accuracyField.Str ()); } }
ParameterProcess::ParameterProcess (RunLog& _log, ImageClassList& imageClasses, String _desc ): log (_log) { highestAccuracy = (FFLOAT)0.0; startTime = 0; _desc.TrimLeft (); curStatus = _desc.ExtractChar (); if ((curStatus == '0') || (curStatus == '1') || (curStatus == '2') ) { // We Are Ok } else { log.Level (-1) << endl << "ParameterProcess: We have an invalid Cur Status[" << curStatus << "]." << endl; exit (-1); } { String processsNumField = _desc.ExtractToken (" ,\t"); processNum = atoi (processsNumField.Str ()); } { String jobIdField = _desc.ExtractToken (" ,\t"); jobId = atoi (jobIdField.Str ()); } { // Lets get the two Classes that we are running for String class0Name = _desc.ExtractToken (" ,\t"); String class1Name = _desc.ExtractToken (" ,\t"); if (class0Name == "NoName") { class0 = class1 = NULL; } else { class0 = imageClasses.LookUpByName (class0Name); class1 = imageClasses.LookUpByName (class1Name); if (!class0) { cerr << endl << "*** ERROR *** ParameterProcess, Invalid Class0[" << class0Name << "]." << endl << endl; exit (-1); } if (!class1) { cerr << endl << "*** ERROR *** ParameterProcess, Invalid Class0[" << class1Name << "]." << endl << endl; exit (-1); } } } { String cParmStr = _desc.ExtractToken (" ,\t"); cParm = atoi (cParmStr.Str ()); } { String gammaParmStr = _desc.ExtractToken (" ,\t"); gammaParm = atof (gammaParmStr.Str ()); } { String aParmStr = _desc.ExtractToken (" ,\t"); aParm = atoi (aParmStr.Str ()); } { String highestAccuracyField = _desc.ExtractToken (" ,\t"); highestAccuracy = (FFLOAT)atof (highestAccuracyField.Str ()); } }