StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTableDescriptorI.h
1 /***************************************************************************
2  *
3  * $Id: StTableDescriptorI.h,v 1.9 2009/09/10 18:06:08 dmitry Exp $
4  *
5  * Author: R. Jeff Porter
6  ***************************************************************************
7  *
8  * Description: Abstract class defining access to a table-description
9  *
10  ***************************************************************************
11  *
12  * $Log: StTableDescriptorI.h,v $
13  * Revision 1.9 2009/09/10 18:06:08 dmitry
14  * struct alignment fix, does not rely on fixed 4 byte cap anymore - runtime align calculation is now in use
15  *
16  * Revision 1.8 2005/09/07 22:04:02 deph
17  * update to correct padding issue for packed tables
18  *
19  * Revision 1.7 2001/10/24 04:05:20 porter
20  * added long long type to I/O and got rid of obsolete dataIndex table
21  *
22  * Revision 1.6 2001/01/22 18:38:02 porter
23  * Update of code needed in next year running. This update has little
24  * effect on the interface (only 1 method has been changed in the interface).
25  * Code also preserves backwards compatibility so that old versions of
26  * StDbLib can read new table structures.
27  * -Important features:
28  * a. more efficient low-level table structure (see StDbSql.cc)
29  * b. more flexible indexing for new systems (see StDbElememtIndex.cc)
30  * c. environment variable override KEYS for each database
31  * d. StMessage support & clock-time logging diagnostics
32  * -Cosmetic features
33  * e. hid stl behind interfaces (see new *Impl.* files) to again allow rootcint access
34  * f. removed codes that have been obsolete for awhile (e.g. db factories)
35  * & renamed some classes for clarity (e.g. tableQuery became StDataBaseI
36  * and mysqlAccessor became StDbSql)
37  *
38  * Revision 1.5 2000/03/28 17:03:19 porter
39  * Several upgrades:
40  * 1. configuration by timestamp for Conditions
41  * 2. query by whereClause made more systematic
42  * 3. conflict between db-stored comments & number lists resolved
43  * 4. ensure endtime is correct for certain query falures
44  * 5. dbstl.h->handles ObjectSpace & RogueWave difference (Online vs Offline)
45  *
46  * Revision 1.4 1999/12/29 13:49:35 porter
47  * fix for Solaris-CC4.2 within StRoot make (cons)...
48  * replaced #include <config.h> with #include <ospace/config.h>
49  *
50  * Revision 1.3 1999/12/28 21:31:42 porter
51  * added 'using std::vector' and 'using std::list' for Solaris CC5 compilation.
52  * Also fixed some warnings arising from the CC5 compiles
53  *
54  * Revision 1.2 1999/09/30 02:06:12 porter
55  * add StDbTime to better handle timestamps, modify SQL content (mysqlAccessor)
56  * allow multiple rows (StDbTable), & Added the comment sections at top of
57  * each header and src file
58  *
59  **************************************************************************/
60 #ifndef StTableDescriptorI_HH
61 #define StTableDescriptorI_HH
62 
63 enum StTypeE {Stchar = 0, Stuchar, Stshort, Stushort, Stint, Stuint, Stlong, Stulong, Stlonglong, Stfloat, Stdouble, Stmaxtype };
64 
65 #ifndef ROOT_CINT
66 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)};
67 #endif
68 
70 
71 public:
72 
73  virtual ~StTableDescriptorI(){};
74  virtual StTableDescriptorI* getCpy() = 0;
75  virtual unsigned int getNumElements() const = 0;
76  virtual unsigned int getTotalSizeInBytes() const = 0;
77  virtual char* getElementName(int elementNum) const = 0;
78  virtual unsigned int getElementOffset(int elementNum) const = 0;
79  virtual unsigned int getElementSize(int elementNum) const = 0;
80  //MPD
81  virtual int getTrowSize() = 0;
82  virtual unsigned int getMaxAlign() = 0;
83  virtual StTypeE getElementType(int elementNum) const = 0;
84  virtual unsigned int* getElementDimensions(int elementNum) const = 0;
85  virtual unsigned int getElementLength(int elementNum) const = 0;
86  virtual unsigned int getElementNumDimensions(int elementNum) const = 0;
87  virtual unsigned int getElementIndexLength(int elementNum, int dimensionNum) const = 0;
88 
89 };
90 
91 #endif
92 
93