{ ifstream vInput("spectreMinus.out"); ofstream vOutput("SPL45GeVMinus.dat"); Int_t ibin; Float_t ene; Float_t nue, numu, nutau; Float_t anue, anumu, anutau; nutau = 0.; anutau = 0.; Int_t line=0; while (1) { vInput >> ibin >> ene >> numu >> anumu >> nue >> anue; if (!vInput.good()) break; line++; vOutput.width(8); vOutput.precision(4); vOutput.setf(ios_base::scientific, ios_base::floatfield); vOutput << ene << " " << nue << " " << numu << " " << nutau << " " << anue << " " << anumu << " " << anutau << "\n"; }//while nue = 0.; numu = 0.; anue = 0.; anumu = 0.; for (; line<501; line++) { ene += 0.020; vOutput.width(8); vOutput.precision(4); vOutput.setf(ios_base::scientific, ios_base::floatfield); vOutput << ene << " " << nue << " " << numu << " " << nutau << " " << anue << " " << anumu << " " << anutau << "\n"; } vOutput.close(); vInput.close(); }