Commit 178c71d985d08f6fa9c6662933508a8a410fed7c
1 parent
07c8ec4a
Conditional passing of logger to GCTACubePsf (#2262)
Added conditional passing of pointer to logger in ctpsfcube to ensure ctpsfcube does not print out additional text when 'chatter=0'.
Showing
1 changed file
with
4 additions
and
1 deletions
src/ctpsfcube/ctpsfcube.cpp
| ... | ... | @@ -223,8 +223,11 @@ void ctpsfcube::run(void) |
| 223 | 223 | // Write header into logger |
| 224 | 224 | log_header1(TERSE, "Generate PSF cube"); |
| 225 | 225 | |
| 226 | + // Set pointer to logger dependent on chattiness | |
| 227 | + GLog* logger = (logNormal()) ? &log : NULL; | |
| 228 | + | |
| 226 | 229 | // Fill PSF cube |
| 227 | - m_psfcube.fill(m_obs, &log); | |
| 230 | + m_psfcube.fill(m_obs, logger); | |
| 228 | 231 | |
| 229 | 232 | // Write PSF cube into logger |
| 230 | 233 | log_string(EXPLICIT, m_psfcube.print(m_chatter)); | ... | ... |