9 #include <daq/rawdata/CprErrorMessage.h>
13 #include <rawdata/switch_basf2_standalone.h>
24 CprErrorMessage::CprErrorMessage()
26 openlog(
"", LOG_PERROR , LOG_LOCAL0);
29 CprErrorMessage::~CprErrorMessage()
35 void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
string err_str)
38 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
40 PrintError(err_str.c_str());
43 void CprErrorMessage::PrintError(
const int shmflag,
RunInfoBuffer* nsm_status,
char* err_message,
44 const char* file,
const char* func_name,
const int line)
46 string err_str = err_message;
48 nsm_status->reportError(RunInfoBuffer::CPRFIFO_FULL);
50 PrintError(err_message, file, func_name, line);
54 void CprErrorMessage::PrintError(
char* err_message,
const char* file,
const char* func_name,
const int line)
57 sprintf(err_buf,
"%s : %s %s %d", err_message, file, func_name, line);
59 printf(
"%s", err_buf); fflush(stdout);
83 void CprErrorMessage::PrintError(
const char* err_message)
85 printf(
"[DEBUG] %s", err_message);
88 printf(
"[FATAL] %s\n", err_message); exit(1);
Abstract base class for different kinds of events.