diff --git a/src/ctprob/ctprob.cpp b/src/ctprob/ctprob.cpp index 5f00af7..14d8f8f 100644 --- a/src/ctprob/ctprob.cpp +++ b/src/ctprob/ctprob.cpp @@ -223,7 +223,7 @@ void ctprob::run(void) log_observations(NORMAL, m_obs, "Input observation"); // Write header into logger - log_header1(TERSE, "Event selection"); + log_header1(TERSE, "Event probability evaluation"); // Initialise counters int n_observations = 0; @@ -280,7 +280,7 @@ void ctprob::run(void) // Fall through in case that the event file is empty if (obs->events()->size() == 0) { log_string(NORMAL, " Warning: No events in event file \""+ - m_infiles[i]+"\". Event selection skipped."); + m_infiles[i]+"\". Event probability evaluation skipped."); continue; } diff --git a/test/test_ctprob.py b/test/test_ctprob.py index d8f5666..9833684 100755 --- a/test/test_ctprob.py +++ b/test/test_ctprob.py @@ -171,6 +171,27 @@ class Test(test): except ValueError: self.test_try_success() + + # Setup ctprob with a list of observations and test prefix + prob = ctools.ctprob() + prob['inobs'] = self._datadir + '/obs_unbinned.xml' + prob['prefix'] = 'ctprob_py3_' + prob['outobs'] = 'ctprob_py3_obs.xml' + prob['inmodel'] = self._model + prob['caldb'] = self._caldb + prob['irf'] = self._irf + prob['edisp'] = True + prob['logfile'] = 'ctprob_py3.log' + prob['chatter'] = 3 + + # Run ctprob tool + prob.logFileOpen() # Make sure we get a log file + prob.run() + prob.save() + + # Check result file + self._check_result_file('ctprob_py3_crab_events.fits') + # Return return