9#include <daq/rawdata/CprErrorMessage.h>
13#include <rawdata/switch_basf2_standalone.h>
26 openlog(
"", LOG_PERROR, LOG_LOCAL0);
35void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
string err_str)
38 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
40 PrintError(err_str.c_str());
43void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
char* err_message,
44 const char* file,
const char* func_name,
const int line)
47 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
49 PrintError(err_message, file, func_name, line);
53void CprErrorMessage::PrintError(
char* err_message,
const char* file,
const char* func_name,
const int line)
56 sprintf(err_buf,
"%s : %s %s %d", err_message, file, func_name, line);
58 printf(
"%s", err_buf); fflush(stdout);
82void CprErrorMessage::PrintError(
const char* err_message)
84 printf(
"[DEBUG] %s", err_message);
87 printf(
"[FATAL] %s\n", err_message); exit(1);
virtual ~CprErrorMessage()
Default constructor.
CprErrorMessage()
Default constructor.
Abstract base class for different kinds of events.