diff --git a/NEWS b/NEWS index 726c6ec..d938ace 100644 --- a/NEWS +++ b/NEWS @@ -85,6 +85,9 @@ is set to the map centre. This is only identical to the pointing in case of binning a single event list and using the usepnt=yes option (or specifying the pointing manually as the xref and yref parameters). +Memory usage has been reduced by disposing the event lists after their +usage. + 8. ctlike - Maximum likelihood fitting -------------------------------------- @@ -141,6 +144,9 @@ the use for 2D response functions in FITS files. ctmodel now also supports the handling of energy dispersion. Energy dispersion can be switched on or off using the hidden edisp parameter. +Memory usage has been reduced by disposing the event lists after their +usage. + 12. ctexpcube - CTA exposure cube generation -------------------------------------------- @@ -165,6 +171,9 @@ ctbkgcube computes the background cube for an observation definition file. The cube definition may be taken from a counts cube or may be specified by user parameters. +Memory usage has been reduced by disposing the event lists after their +usage. + 15. ctcubemask - CTA cube filtering ----------------------------------- diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index 3435ea0..a360bb9 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -263,6 +263,9 @@ void ctbin::run(void) // Fill the cube fill_cube(obs); + // Dispose events to free memory + obs->dispose_events(); + } // endif: CTA observation found } // endfor: looped over observations diff --git a/src/ctbkgcube/ctbkgcube.cpp b/src/ctbkgcube/ctbkgcube.cpp index 85f587a..44dbb78 100644 --- a/src/ctbkgcube/ctbkgcube.cpp +++ b/src/ctbkgcube/ctbkgcube.cpp @@ -322,6 +322,9 @@ void ctbkgcube::run(void) // Fill the cube fill_cube(obs); + // Dispose events to free memory + obs->dispose_events(); + } // endif: CTA observation found } // endfor: looped over observations diff --git a/src/ctmodel/ctmodel.cpp b/src/ctmodel/ctmodel.cpp index ac273d2..18daf9a 100644 --- a/src/ctmodel/ctmodel.cpp +++ b/src/ctmodel/ctmodel.cpp @@ -273,6 +273,9 @@ void ctmodel::run(void) // Fill the cube fill_cube(obs); + // Dispose events to free memory + obs->dispose_events(); + } // endif: CTA observation found } // endfor: looped over observations @@ -481,8 +484,6 @@ void ctmodel::get_parameters(void) // Read observation definition filename and response parameters m_obsfile = (*this)["obsfile"].filename(); - m_caldb = (*this)["caldb"].string(); - m_irf = (*this)["irf"].string(); // If no observation definition file has been specified then read all // parameters that are necessary to create an observation from scratch diff --git a/src/ctobssim/ctobssim.cpp b/src/ctobssim/ctobssim.cpp index 5d1cfb8..c82e24b 100644 --- a/src/ctobssim/ctobssim.cpp +++ b/src/ctobssim/ctobssim.cpp @@ -323,7 +323,6 @@ void ctobssim::run(void) // is enabled, this loop will be parallelized. #pragma omp for for (int i = 0; i < m_obs.size(); ++i) { -std::cout << "Observation " << i << ": " << get_current_rss() << std::endl; // Get pointer on CTA observation GCTAObservation* obs = dynamic_cast(m_obs[i]);