00001 /*************************************************************************** 00002 * 00003 * $Id: StTableDescriptorI.h,v 1.8 2005/09/07 22:04:02 deph Exp $ 00004 * 00005 * Author: R. Jeff Porter 00006 *************************************************************************** 00007 * 00008 * Description: Abstract class defining access to a table-description 00009 * 00010 *************************************************************************** 00011 * 00012 * $Log: StTableDescriptorI.h,v $ 00013 * Revision 1.8 2005/09/07 22:04:02 deph 00014 * update to correct padding issue for packed tables 00015 * 00016 * Revision 1.7 2001/10/24 04:05:20 porter 00017 * added long long type to I/O and got rid of obsolete dataIndex table 00018 * 00019 * Revision 1.6 2001/01/22 18:38:02 porter 00020 * Update of code needed in next year running. This update has little 00021 * effect on the interface (only 1 method has been changed in the interface). 00022 * Code also preserves backwards compatibility so that old versions of 00023 * StDbLib can read new table structures. 00024 * -Important features: 00025 * a. more efficient low-level table structure (see StDbSql.cc) 00026 * b. more flexible indexing for new systems (see StDbElememtIndex.cc) 00027 * c. environment variable override KEYS for each database 00028 * d. StMessage support & clock-time logging diagnostics 00029 * -Cosmetic features 00030 * e. hid stl behind interfaces (see new *Impl.* files) to again allow rootcint access 00031 * f. removed codes that have been obsolete for awhile (e.g. db factories) 00032 * & renamed some classes for clarity (e.g. tableQuery became StDataBaseI 00033 * and mysqlAccessor became StDbSql) 00034 * 00035 * Revision 1.5 2000/03/28 17:03:19 porter 00036 * Several upgrades: 00037 * 1. configuration by timestamp for Conditions 00038 * 2. query by whereClause made more systematic 00039 * 3. conflict between db-stored comments & number lists resolved 00040 * 4. ensure endtime is correct for certain query falures 00041 * 5. dbstl.h->handles ObjectSpace & RogueWave difference (Online vs Offline) 00042 * 00043 * Revision 1.4 1999/12/29 13:49:35 porter 00044 * fix for Solaris-CC4.2 within StRoot make (cons)... 00045 * replaced #include <config.h> with #include <ospace/config.h> 00046 * 00047 * Revision 1.3 1999/12/28 21:31:42 porter 00048 * added 'using std::vector' and 'using std::list' for Solaris CC5 compilation. 00049 * Also fixed some warnings arising from the CC5 compiles 00050 * 00051 * Revision 1.2 1999/09/30 02:06:12 porter 00052 * add StDbTime to better handle timestamps, modify SQL content (mysqlAccessor) 00053 * allow multiple rows (StDbTable), & Added the comment sections at top of 00054 * each header and src file 00055 * 00056 **************************************************************************/ 00057 #ifndef StTableDescriptorI_HH 00058 #define StTableDescriptorI_HH 00059 00060 enum StTypeE {Stchar,Stuchar,Stshort,Stushort,Stint,Stuint,Stlong,Stulong,Stlonglong,Stfloat,Stdouble}; 00061 00062 #ifndef ROOT_CINT 00063 const int StTypeSize[]={sizeof(char),sizeof(unsigned char),sizeof(short),sizeof(unsigned short), sizeof(int),sizeof(unsigned int),sizeof(long),sizeof(unsigned long), sizeof(long long),sizeof(float),sizeof(double)}; 00064 #endif 00065 00066 class StTableDescriptorI { 00067 00068 public: 00069 00070 virtual ~StTableDescriptorI(){}; 00071 virtual StTableDescriptorI* getCpy() = 0; 00072 virtual unsigned int getNumElements() const = 0; 00073 virtual unsigned int getTotalSizeInBytes() const = 0; 00074 virtual char* getElementName(int elementNum) const = 0; 00075 virtual unsigned int getElementOffset(int elementNum) const = 0; 00076 virtual unsigned int getElementSize(int elementNum) const = 0; 00077 //MPD 00078 virtual int getTrowSize() = 0; 00079 virtual StTypeE getElementType(int elementNum) const = 0; 00080 virtual unsigned int* getElementDimensions(int elementNum) const = 0; 00081 virtual unsigned int getElementLength(int elementNum) const = 0; 00082 virtual unsigned int getElementNumDimensions(int elementNum) const = 0; 00083 virtual unsigned int getElementIndexLength(int elementNum, int dimensionNum) const = 0; 00084 00085 }; 00086 00087 #endif 00088 00089