ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/SysMon.h
Revision: 1.3
Committed: Fri Mar 23 14:59:01 2001 UTC (23 years, 6 months ago) by ab11
Content type: text/plain
Branch: MAIN
Changes since 1.2: +4 -2 lines
Log Message:
Added in a constant value maxTitles which specifies the maximum number of things it expects to get from statgrab.

File Contents

# User Rev Content
1 ab11 1.1 #include <iostream>
2     #include <string>
3     #include <stdlib.h> // used for system("XXSX") calls
4 ab11 1.2 #include "SubPipe.h"
5 ab11 1.1 #include "Config.h"
6     #ifndef XMLFORMATTER_H /* Has the file been INCLUDE'd already? */
7     #define XMLFORMATTER_H yes
8     #include "XMLFormatter.h"
9     #endif
10    
11    
12     #define MAX_UNIQUE_VALUES = 40;
13    
14     using std::string;
15    
16     class SysMon {
17    
18     public:
19     SysMon(Config config, int printDebug); // constructor
20     int collect(); // collect data for an averager
21     string getData(); // return the data from averages, or a snapshot if no data is avaible
22     int getSequence(){ return sequence; }; // inline
23 ab11 1.3 void clearData(); // reset the data arrays
24 ab11 1.1
25     private:
26 ab11 1.2 SubPipe * p;
27 ab11 1.1 int sequence; // sequence number for the packets
28     int debug; // print debug info?
29 ab11 1.3 const static int maxTitles = 100;
30     string titles[maxTitles]; // names for the packet info
31     string values[maxTitles]; // values for those packet infos
32 ab11 1.1 int titlepointer; // where have we got up to?
33     int checks; // number of checks since the last packet
34     }; // class