00001 #ifndef GL3HISTOMANAGER_H
00002 #define GL3HISTOMANAGER_H
00003
00004 #include "gl3Histo.h"
00005 #include <list>
00006
00007 class gl3HistoContainer {
00008 public:
00009 int nBytes;
00010 int nHistos;
00011 int runNumber ;
00012 int buffer;
00013 };
00014
00015 class gl3HistoManager
00016 {
00017 public:
00018 static gl3HistoManager * instance();
00019
00020 int listenAtPort(int port=3333);
00021 int checkRequest();
00022
00023 void add(gl3Histo *histo);
00024 void remove(gl3Histo *histo);
00025
00026 int resetHistos();
00027 int saveHistos(char * filename);
00028
00029 protected:
00030 gl3HistoManager();
00031
00032 int writeHistos (char *buffer) ;
00033
00034 private:
00035
00036 static gl3HistoManager *pinstance;
00037
00038
00039 std::list<gl3Histo *> histoList;
00040
00041
00042 enum {crit, oper, err, warn, note, dbg } verbosity;
00043
00044
00045
00046 bool is_listening;
00047 int socketFd;
00048 int remoteSocket ;
00049
00050
00051 int maxBytes;
00052 };
00053
00054 #endif
00055