00001 #ifndef _LIGO_XSILSTD_H
00002 #define _LIGO_XSILSTD_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include "xml/Xsil.hh"
00042
00043 class BasicDataDescriptor;
00044
00045 namespace xml {
00046
00047
00056 class xsilStd {
00057 public:
00059 enum DataType {
00061 kTimeSeries = 0,
00063 kSpectrum = 1,
00065 kTransferFunction = 2,
00067 kCoefficients = 3,
00069 kHistogram = 4
00070 };
00071
00073 class datainfo {
00074 public:
00076 typedef std::vector<std::string> chnlist;
00078 DataType fType;
00080 int fSubtype;
00082 chnlist fAChn;
00084 chnlist fBChn;
00086 int fN;
00088 int fM;
00090 unsigned long fSec;
00092 unsigned long fNSec;
00094 double fDt;
00096 double fF0;
00098 double fDf;
00100 double fBW;
00102 int fAverages;
00104 int fMeasurementNumber;
00106 datainfo () {
00107 init(); }
00109 void init ();
00110 };
00111
00121 static bool GetDataType (const char* graphtype, DataType& type,
00122 int& subtype);
00130 static bool GetGraphType (DataType type,
00131 int subtype, std::string& graphtype);
00132
00138 static std::string Typename (DataType type);
00144 static DataType Typeid (const char* type);
00145
00152 static int DataSubtypeXY (DataType type, int subtype);
00153
00162 static bool analyzeName (const std::string& name,
00163 std::string& n, int& index1, int& index2);
00164
00172 static std::string makeName (const std::string& Name,
00173 int index1 = -1, int index2 = -1);
00174
00182 static bool GetDataInfo (const char* xml, datainfo& info);
00183
00195 static bool GetDataInfo (const BasicDataDescriptor* desc,
00196 int& dim1, int& dim2, bool& complex,
00197 bool& XYdata);
00198
00217 static bool GetDataInfo (const BasicDataDescriptor* desc,
00218 int& dim1, int& dim2, bool& complex, bool& XYdata,
00219 const float** dataptr, bool& cpy,
00220 bool compress = false, bool forceXY = false);
00221
00240 static bool GetDataInfo (const BasicDataDescriptor* desc,
00241 int& dim1, int& dim2, bool& complex, bool& XYdata,
00242 const double** dataptr, bool& cpy,
00243 bool compress = false, bool forceXY = false);
00244 };
00245
00246
00247 }
00248
00249 #endif // _LIGO_XSILSTD_H