Using stringstream and bugfixing using c_str(). Compatible with kalinka now

This commit is contained in:
Christian Reiling
2018-11-27 11:11:19 +01:00
parent 2cf9bc6c23
commit ae5546a3ed
3 changed files with 15 additions and 12 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ void runTests() {
void TestSimulation::injection (int numParticles, string outputFilePath) {
ofstream outFile;
outFile.open (outputFilePath);
outFile.open (outputFilePath.c_str());
for (int i = 0;i<numParticles;i++) {
outFile << inject() <<endl;
}
@@ -28,7 +28,7 @@ void TestSimulation::injection (int numParticles, string outputFilePath) {
void TestSimulation::decaySpectrum (int numPoints,string outputFilePath) {
ofstream outFile;
outFile.open (outputFilePath);
outFile.open (outputFilePath.c_str());
double x,y;
for (int i = 0;i<numPoints;i++) {
x = i * Etridecay_eV/(numPoints-1);
@@ -40,7 +40,7 @@ void TestSimulation::decaySpectrum (int numPoints,string outputFilePath) {
void TestSimulation::rejectionBetaDecay(int numDecays, string outputFilePath) {
ofstream outFile;
outFile.open (outputFilePath);
outFile.open (outputFilePath.c_str());
for (int i = 0;i<numDecays;i++) {
outFile << getBetaDecayEnergyRejection_eV() <<endl;
}
@@ -50,7 +50,7 @@ void TestSimulation::rejectionBetaDecay(int numDecays, string outputFilePath) {
void TestSimulation::maxwellBoltzmann(int numDecays, string outputFilePath) {
ofstream outFile;
outFile.open (outputFilePath);
outFile.open (outputFilePath.c_str());
for (int i = 0;i<numDecays;i++) {
//outFile << getEnergyBoltzmann_eV() <<endl;
}