#if !defined(PS_TRACE_H)
#define PS_TRACE_H 1

/** \file psTrace.h
 *  \brief basic run-time trace facilities
 *  \ingroup SystemGroup
 */

/** Functions **************************************************************/
/** \addtogroup SystemGroup System Utilities 
 *  \{
 */

/// Send a trace message
void p_psTrace(const char *facil, 	///< facilty of interest
	       int myLevel,		///< desired trace level
	       ...)			///< trace message arguments 
;

/// Set trace level 
int psTraceSetLevel(const char *facil,	///< facilty of interest
		    int level)		///< desired trace level
;

/// Get the trace level 
int psTraceGetLevel(const char *facil)	///< facilty of interest
;

/// turn off all tracing, and free trace's allocated memory 
void psTraceReset(void)
;

/// print trace levels 
void psTracePrintLevels(void)
;

/** Set destination for tracing. */
void psTraceSetDestination(FILE *fp	// Open file pointer to write to
    );

/* \} */ // End of SystemGroup Functions

//#define PS_NO_TRACE 1			///< to turn off all tracing

#if defined(PS_NO_TRACE)
#  define psTrace(facil, level, ...)	/* do nothing */
#else
#  define psTrace(facil, level, ...) \
          p_psTrace(facil, level, __VA_ARGS__)
#endif

#endif
