Commit 3123ece22481721930847131a890fb62dc59bb57
1 parent
dc4622a1
Update logging text (#1970)
Updated headers in log file to reflect what is actually going on. Changed omp scheduling to 'dynamic' so each observation is filled sequentially.
Showing
1 changed file
with
8 additions
and
7 deletions
src/ctbin/ctbin.cpp
| ... | ... | @@ -233,21 +233,22 @@ void ctbin::run(void) |
| 233 | 233 | log_observations(NORMAL, m_obs, "Input observation"); |
| 234 | 234 | |
| 235 | 235 | // Write header into logger |
| 236 | - log_header1(TERSE, gammalib::number("Bin observation", m_obs.size())); | |
| 236 | + log_header1(TERSE, gammalib::number("Find unbinned observation", m_obs.size())); | |
| 237 | 237 | |
| 238 | - // Extract out all of the non-NULL observations | |
| 239 | - log_header2(TERSE, "Executing pre-loop"); | |
| 238 | + // Find all unbinned CTA observations in m_obs | |
| 240 | 239 | std::vector<GCTAObservation*> obs_list(0); |
| 241 | 240 | for (GCTAObservation* obs = first_unbinned_observation(); obs != NULL; |
| 242 | 241 | obs = next_unbinned_observation()) { |
| 242 | + std::string msg = " Including unbinned "+obs->instrument()+" observation"; | |
| 243 | + log_string(NORMAL, msg); | |
| 243 | 244 | obs_list.push_back(obs); |
| 244 | 245 | } |
| 245 | 246 | |
| 246 | - // Write sub-header into logger | |
| 247 | - log_header2(TERSE, "Filling observations"); | |
| 248 | - | |
| 247 | + // Write header into logger | |
| 248 | + log_header1(TERSE, gammalib::number("Bin observation", m_obs.size())); | |
| 249 | + | |
| 249 | 250 | // Loop over all unbinned CTA observations in the container |
| 250 | - #pragma omp parallel for | |
| 251 | + #pragma omp parallel for schedule(dynamic) | |
| 251 | 252 | for (int oindx=0; oindx<obs_list.size(); ++oindx) { |
| 252 | 253 | GCTAObservation* obs = obs_list[oindx]; |
| 253 | 254 | ... | ... |