StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
gl3HistoManager.h
1 #ifndef GL3HISTOMANAGER_H
2 #define GL3HISTOMANAGER_H
3 
4 #include "gl3Histo.h"
5 #include <list>
6 
8  public:
9  int nBytes;
10  int nHistos;
11  int runNumber ;
12  int buffer;
13 };
14 
16 {
17  public:
18  static gl3HistoManager * instance();
19 
20  int listenAtPort(int port=3333);
21  int checkRequest();
22 
23  void add(gl3Histo *histo);
24  void remove(gl3Histo *histo);
25 
26  int resetHistos();
27  int saveHistos(char * filename);
28 
29  protected:
31 
32  int writeHistos (char *buffer) ;
33 
34  private:
35  // instance for singleton mechanism
36  static gl3HistoManager *pinstance;
37 
38  // list of histograms to be managed
39  std::list<gl3Histo *> histoList;
40 
41  // general controls
42  enum {crit, oper, err, warn, note, dbg } verbosity;
43  //CRIT, OPER, ERR, WARN, NOTE, DBG} verbosity;
44 
45  // network request related information
46  bool is_listening;
47  int socketFd;
48  int remoteSocket ;
49 
50  // max space for historgram data to be written/sent
51  int maxBytes;
52 };
53 
54 #endif
55