Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

TSStats.h

Go to the documentation of this file.
00001 #ifndef TSSTATS_H 00002 #define TSSTATS_H 00003 00004 #include <iostream> 00005 #include <string> 00006 #include <vector> 00007 #include <map> 00008 00009 #include "FixLenTimeSeries.h" 00010 #include "VersionRWLock.h" 00011 00012 00016 typedef double TimeStamp; 00017 00018 00022 typedef double TimeSec; 00023 00027 typedef string IDType; 00028 00032 typedef vector<IDType> IDVect; 00033 00034 00040 struct TSStats : public map<IDType, FixLenTimeSeries> 00041 { 00042 public: 00043 typedef enum 00044 { ID_NOT_FOUND 00045 } Error; 00046 00050 TimeStamp time_stamp; 00051 00057 TimeSec precision; 00058 00063 int32 window_size; 00064 00074 VersionRWLock vlock; 00075 00080 TimeSec getPrecision() { return precision; } 00081 00093 TSStats copy( 00094 int32 window_size = 0, 00095 TimeSec precision = 0, 00096 TimeStamp time_stamp = 0 00097 ); 00098 00112 TSStats copy( 00113 IDVect ids, 00114 int32 window_size = 0, 00115 TimeSec precision = 0, 00116 TimeStamp time_stamp = 0 00117 ); 00118 00133 FixLenTimeSeries copyStatistics( 00134 IDType id, 00135 int32 window_size = 0, 00136 TimeSec precision = 0, 00137 TimeStamp time_stamp = 0 00138 ) 00139 throw( Error ); 00140 00141 private: 00142 /* 00143 * This is a tool function used by other functions that copy 00144 * statistics out of the Stats 00145 * Set the parameter of tss_copy according to the given tss and 00146 * parameters. Returns the parameter "k" used in the next function 00147 */ 00148 double setParameter( 00149 int32 window_size, 00150 TimeSec precision, 00151 TimeStamp time_stamp, 00152 TSStats &tss_copy 00153 ) const; 00154 00155 }; 00156 00162 ostream &operator<<( ostream &os, const TSStats &tss ); 00163 00164 #endif // TSSTATS_H

Generated on Fri Nov 12 15:15:22 2004 for Borealis by doxygen 1.3.8