00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __CALARMLOGGER_H
00013 #define __CALARMLOGGER_H
00014
00015 #ifndef __CSOCKET_H
00016 #include <CSocket.h>
00017 #endif
00018
00019 #ifndef __SPECTRODAQ_H
00020 #include <spectrodaq.h>
00021 #endif
00022
00023 #ifndef __SPECTROFRAMEWORK_H
00024 #include <SpectroFramework.h>
00025 #endif
00026
00027 #ifndef __STL_STRING
00028 #define __STL_STRING
00029 #include <string>
00030 #endif
00031
00032 using namespace std;
00033
00041 class CAlarmLogger
00042 {
00043 string m_sFacility;
00044 string m_sHost;
00045 string m_sPort;
00046
00047 public:
00048
00049 CAlarmLogger(string facility,
00050 string host="localhost",
00051 string port="daqalarm");
00052
00053
00054 CAlarmLogger(const CAlarmLogger& aCAlarmLogger);
00055
00056
00057 ~CAlarmLogger();
00058
00059
00060 public:
00061 string getFacility() { return m_sFacility; }
00062 string getHost() { return m_sHost; }
00063 string getPort() { return m_sPort; }
00064
00065
00066 protected:
00067 void setFacility(string fac)
00068 {
00069 m_sFacility = fac;
00070 }
00071 void setHost(const string& host)
00072 {
00073 m_sHost = host;
00074 }
00075 void setPort(const string& port)
00076 {
00077 m_sPort = port;
00078 }
00079
00080
00081 public:
00082 void Log(string message);
00083 };
00084
00085 #endif