Messaging


Defines

#define uves_msg_error()   cpl_msg_error(__func__, __VA_ARGS__)
 Print an error message.
#define uves_msg_progress(i, iter,)   cpl_msg_progress(__func__, (i), (iter), __VA_ARGS__)
 Print a progress message.
#define uves_msg_warning()   uves_msg_warning_macro(__func__, __VA_ARGS__)
 Print an warning message.
#define uves_msg_debug()   cpl_msg_debug(__func__, __VA_ARGS__)
 Print a debug message.
#define uves_msg_low()
 Print a message on a lower message level.
#define uves_msg()   uves_msg_macro(__func__, __VA_ARGS__)
 Print a message on 'info' or 'debug' level.
#define uves_msg_softer()   uves_msg_softer_macro(__func__)
 Decrease message volume.
#define uves_msg_louder()   uves_msg_louder_macro(__func__)
 Increase message volume.

Functions

void uves_msg_init (int olevel, const char *dom)
 Initialize messaging.
void uves_msg_set_level (int olevel)
 Set output level.
void uves_msg_softer_macro (const char *fct)
 Decrease message volume.
void uves_msg_louder_macro (const char *fct)
 Increase message volume.
void uves_msg_macro (const char *fct, const char *format,...)
 Print a message on 'info' or 'debug' level.
int uves_msg_get_warnings (void)
 Get number of warnings printed so far.
void uves_msg_add_warnings (int n)
 Accumulate warnings.
void uves_msg_warning_macro (const char *fct, const char *format,...)
 Print a warning message.
const char * uves_msg_get_domain (void)
 Get current message domain.
void uves_msg_set_domain (const char *d)
 Set message domain.

Detailed Description

CPL's info message level is expanded to a set of relative message level. The functions uves_msg_louder() and uves_msg_softer() are used to turn up/down the message volume level (instead of setting the verbosity to an absolute level using cpl_msg_info() or cpl_msg_debug()). These two functions should be used consistently, so that the volume level is always the same on function exit as it was on function entry.

These messaging functions never fail, but might print warnings if called inconsistently.


Define Documentation

 
#define uves_msg_error  )     cpl_msg_error(__func__, __VA_ARGS__)
 

Print an error message.

Parameters:
... Message to print
This function is used instead of cpl_msg_error(), and saves the user from typing the calling function name.

Definition at line 64 of file uves_msg.h.

Referenced by uves_paf_print_header(), uves_pfits_put_qc(), uves_physmod_regress_echelle(), and uves_save_paf().

#define uves_msg_progress i,
iter   )     cpl_msg_progress(__func__, (i), (iter), __VA_ARGS__)
 

Print a progress message.

Parameters:
i See cpl_msg_progress()
iter See cpl_msg_progress()
... Message to print
This function is used instead of cpl_msg_progress(), and saves the user from typing the calling function name.

Definition at line 77 of file uves_msg.h.

Referenced by uves_hough().

 
#define uves_msg_warning  )     uves_msg_warning_macro(__func__, __VA_ARGS__)
 

Print an warning message.

Parameters:
... Message to print
This function is used instead of cpl_msg_warning(), and saves the user from typing the calling function name.

Definition at line 87 of file uves_msg.h.

Referenced by compute_lambda(), detect_lines(), extract_ff_rebin_merge(), flames_get_trans(), opt_get_order_width(), test_polynomial_fit_2d(), uves_check_version(), uves_flames_pfits_get_plateid(), uves_hough(), uves_locate_orders(), uves_msg_louder_macro(), uves_pfits_get_gain(), uves_pfits_get_ron_adu(), uves_physmod_regress_echelle(), uves_physmod_stability_check(), uves_qclog_init(), uves_reduce(), uves_reduce_scired(), and verify_calibration().

 
#define uves_msg_debug  )     cpl_msg_debug(__func__, __VA_ARGS__)
 

Print a debug message.

Parameters:
... Message to print
This function is used instead of cpl_msg_debug(), and saves the user from typing the calling function name.

Definition at line 97 of file uves_msg.h.

Referenced by calculate_spacing(), calibrate_global(), compute_lambda(), detect_lines(), detect_ripples(), estimate_sn(), estimate_threshold(), extract_ff_rebin_merge(), find_centroid(), fit_order_linear(), interpolate_wave(), opt_get_order_width(), opt_reject_outlier(), repeat_orderdef(), subtract_sky_row(), test_gaussian_fitting(), trace_order(), uves_align(), uves_baryvel(), uves_check_version(), uves_draw_lines(), uves_initialize(), uves_merge_orders(), uves_mflat_at_ypos(), uves_physmod_calmap(), uves_physmod_center_gauss(), uves_physmod_chop_otab(), uves_physmod_create_table(), uves_physmod_msrawxy(), uves_physmod_necregr(), uves_physmod_qc1pmtbl(), uves_physmod_regress_echelle(), uves_polynomial_convert_from_plist_midas(), uves_polynomial_convert_from_table(), uves_polynomial_regression_1d(), uves_polynomial_regression_2d(), uves_print_cpl_frame(), uves_qclog_add_sci(), uves_qclog_init(), uves_rebin(), uves_reduce_scired(), uves_response_efficiency(), uves_wavecal_identify(), and xcenter().

 
#define uves_msg_low  ) 
 

Value:

do {                     \
                           uves_msg_softer();       \
                           uves_msg(__VA_ARGS__);   \
                           uves_msg_louder();       \
                           } while (false)
Print a message on a lower message level.

Parameters:
... Message to print

Definition at line 105 of file uves_msg.h.

Referenced by extract_ff_rebin_merge(), opt_extract_sky(), subtract_sky_row(), uves_extract(), uves_initialize(), uves_reduce(), and uves_reduce_scired().

 
#define uves_msg  )     uves_msg_macro(__func__, __VA_ARGS__)
 

Print a message on 'info' or 'debug' level.

Parameters:
... Message to print
See also uves_msg_macro().

Definition at line 119 of file uves_msg.h.

Referenced by detect_lines(), extract_ff_rebin_merge(), opt_extract_sky(), uves_align(), uves_correct_badpix(), uves_extract(), uves_hough(), uves_initialize(), uves_mflat_process_chip(), uves_msflats(), uves_normalize_spectrum(), uves_physmod_calmap(), uves_physmod_center_gauss(), uves_physmod_create_table(), uves_physmod_regress_echelle(), uves_physmod_stability_check(), uves_print_cpl_frame(), uves_print_cpl_frameset(), uves_print_cpl_property(), uves_print_uves_propertylist(), uves_reduce(), uves_reduce_scired(), uves_response_efficiency(), uves_save_paf(), uves_scired_process_chip(), uves_subtract_dark(), uves_wavecal_identify(), uves_wavecal_search(), and verify_calibration().


Function Documentation

void uves_msg_init int  olevel,
const char *  dom
 

Initialize messaging.

Parameters:
olevel The output level
dom The message domain
Only messages at levels 0 (most important) to outlevel are printed as 'info'. Messages at levels above outlevel are printed as 'debug'.

Therefore, set outlevel = 0 to print fewest messages. Increase outlevel to increase verbosity.

To print all messages as 'info' set outlevel to the special value -1 (which substitutes for infinity).

Definition at line 150 of file uves_msg.c.

References uves_msg_set_domain().

void uves_msg_set_level int  olevel  ) 
 

Set output level.

Parameters:
olevel The output level
See uves_msg_init() .

Definition at line 199 of file uves_msg.c.

Referenced by uves_initialize().

void uves_msg_softer_macro const char *  fct  ) 
 

Decrease message volume.

Parameters:
fct Identity of calling function
Don't call this function directly, use uves_msg_softer().

Definition at line 213 of file uves_msg.c.

void uves_msg_louder_macro const char *  fct  ) 
 

Increase message volume.

Parameters:
fct Identity of calling function
Don't call this function directly, use uves_msg_louder().

Definition at line 236 of file uves_msg.c.

References uves_msg_warning.

void uves_msg_macro const char *  fct,
const char *  format,
  ...
 

Print a message on 'info' or 'debug' level.

Parameters:
fct Identity of calling function
format A printf()-like format string
Don't call this function directly, use uves_msg().

If the current level (which is often equal to the current depth of the function call-tree) is less than the output level, the message printed on the 'info' level, otherwise it is printed on the 'debug' level.

Definition at line 278 of file uves_msg.c.

int uves_msg_get_warnings void   ) 
 

Get number of warnings printed so far.

Returns:
Number of warnings since initialization of messaging

Definition at line 306 of file uves_msg.c.

Referenced by uves_end().

void uves_msg_add_warnings int  n  ) 
 

Accumulate warnings.

Parameters:
n Number of warnings to add
The (internal) number of warnings (returned by uves_msg_get_warnings()) is increased by n, but without actually printing any warnings.

Definition at line 321 of file uves_msg.c.

void uves_msg_warning_macro const char *  fct,
const char *  format,
  ...
 

Print a warning message.

Parameters:
fct Identity of calling function
format A printf()-like format string
Don't call this function directly, use uves_msg_warning().

This function is used instead of cpl_msg_warning(), and saves the user from typing the calling function name.

Additionally, record is kept on the total number of warnings printed (see uves_msg_get_warnings()).

This function does not read or write the cpl_error_code

Definition at line 344 of file uves_msg.c.

const char * uves_msg_get_domain void   ) 
 

Get current message domain.

Returns:
The current message domain set by uves_msg_init() or uves_msg_set_domain().

Definition at line 365 of file uves_msg.c.

void uves_msg_set_domain const char *  d  ) 
 

Set message domain.

Parameters:
d The new message domain

Definition at line 376 of file uves_msg.c.

Referenced by uves_msg_init().


Generated on Tue Jun 19 14:39:21 2007 for UVES Pipeline Reference Manual by  doxygen 1.4.6