Using stringstream and bugfixing using c_str(). Compatible with kalinka now
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user