Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CAlarmLogger.h

00001 // Author:
00002 //   Jason Venema
00003 //   NSCL
00004 //   Michigan State University
00005 //   East Lansing, MI 48824-1321
00006 //   mailto:venemaja@msu.edu
00007 //
00008 // Copyright
00009 //   NSCL All rights reserved.
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   // Default constructor
00049   CAlarmLogger(string facility, 
00050                string host="localhost", 
00051                string port="daqalarm");
00052 
00053   // Copy constructor
00054   CAlarmLogger(const CAlarmLogger& aCAlarmLogger);
00055 
00056   // Destructor
00057   ~CAlarmLogger();
00058 
00059   // Selectors
00060  public:
00061   string getFacility() { return m_sFacility; }
00062   string getHost() { return m_sHost; }
00063   string getPort() { return m_sPort; }
00064 
00065   // Mutators
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   // Member functions
00081  public:
00082   void Log(string message);
00083 };
00084 
00085 #endif

Generated at Tue May 21 12:10:50 2002 for CAlarmLogger by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001