Reworked Populations Loggers.

Added Save and Load Option for Population Data.
This commit is contained in:
Christian
2019-06-17 10:47:04 +02:00
parent bd64d5390f
commit 13ce5177a2
55 changed files with 3446 additions and 672 deletions
+8 -11
View File
@@ -16,16 +16,13 @@ Pop3_Container::Pop3_Container(int num_z_bins, int num_r_bins, int num_phi_bins)
z_scale = Lin_Scale(Katrin_Geo::get_z_RW_m(), Katrin_Geo::get_z_WGTSend_m(), num_z_bins);
r_scale = Lin_Scale(0,Katrin_Geo::get_radius_m(), num_r_bins);
phi_scale = Lin_Scale(0, 2*pi, num_phi_bins);
int z_dimension = z_scale.get_number_bins();
int r_dimension = r_scale.get_number_bins();
int phi_dimension = phi_scale.get_number_bins();
data = new double **[z_dimension];
for (int i = 0; i < z_dimension; i++) {
data[i] = new double *[r_dimension];
for(int j = 0; j < r_dimension; j++) {
data[i][j] = new double[phi_dimension];
for (int k = 0; k < phi_dimension; k++) {
data = new double **[num_z_bins];
for (int i = 0; i < num_z_bins; i++) {
data[i] = new double *[num_r_bins];
for(int j = 0; j < num_r_bins; j++) {
data[i][j] = new double[num_phi_bins];
for (int k = 0; k < num_phi_bins; k++) {
data[i][j][k] = 0;
}
}
@@ -68,8 +65,8 @@ Pop3_Container::Pop3_Container(const Pop3_Container& other) {
Pop3_Container& Pop3_Container::operator=(const Pop3_Container& other) {
Pop3_Container tmp(other);
swap(z_scale, tmp.z_scale);
swap(z_scale, tmp.z_scale);
swap(z_scale, tmp.z_scale);
swap(r_scale, tmp.r_scale);
swap(phi_scale, tmp.phi_scale);
swap(data, tmp.data);
return (*this);
}