#include #include #include #include #include using std::ifstream; using std::vector; using std::cout; using std::endl; using std::fabs; int main(int argc, char* argv[]) { // No good solution // TODO bool isFortranFile; if ( 2 == argc ) { isFortranFile = argv[1]; } // Read the milepede output and the file with shifts created by // TestMillePede to compare if the correction have been correctly calculated int label; float value; float value2; vector labelVector; vector valueVector; if (!isFortranFile) { cout<<"Read file created by TestMillePede."<> label >> value; if (!vInput.good()) { break; } labelVector.push_back(label); valueVector.push_back(value); } vInput.close(); } else { cout<<"Read file created by pede."<> label >> value >> value2; if (!vInput.good()) { break; } int label1=10+label*2; labelVector.push_back(label1); valueVector.push_back(value); label1=500+label; labelVector.push_back(label1); valueVector.push_back(value2); } vInput.close(); } for(int c=0; c < (int)labelVector.size(); ++c) { cout <<"c, label,value:" << c <<", "<::iterator result; result = std::max_element(labelVector.begin(), labelVector.end()); int maxValue = *result; float origShifts[maxValue+1]; float recoShifts[maxValue+1]; for (int i=0; i> label >> value >> dummy1 >> dummy2 >> dummy3; if (!vInput1.good()) { break; } labelVector.push_back(label); valueVector.push_back(value); cout << label<<", "< 1.) { cout< 2.) { percent2++; } if ( percent > 3.) { percent3++; } if ( percent > 4.) { percent4++; } } cout< 1%"< 2%"< 3%"< 4%"<