Changeset 2808 in Sophya for trunk/SophyaLib/HiStats/basedtable.h
- Timestamp:
- Jun 14, 2005, 1:25:05 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/basedtable.h
r2732 r2808 18 18 19 19 namespace SOPHYA { 20 //! Interface definition for classes handling data in a table. 20 21 class BaseDataTable : public AnyDataObj , public NTupleInterface { 21 22 public: … … 33 34 virtual ~BaseDataTable(); 34 35 36 //! Adds a column holding integer, named \b cnom 35 37 inline sa_size_t AddIntegerColumn(const char * cnom) 36 38 { return AddColumn(IntegerField, cnom); } 39 //! Adds a column holding integer, named \b cnom 37 40 inline sa_size_t AddIntegerColumn(string const & cnom) 38 41 { return AddColumn(IntegerField, cnom); } 42 //! Adds a column holding long integer, named \b cnom 39 43 inline sa_size_t AddLongColumn(const char * cnom) 40 44 { return AddColumn(LongField, cnom); } 45 //! Adds a column holding long integer, named \b cnom 41 46 inline sa_size_t AddLongColumn(string const & cnom) 42 47 { return AddColumn(LongField, cnom); } 48 //! Adds a column holding floating values (r_4), named \b cnom 43 49 inline sa_size_t AddFloatColumn(const char * cnom) 44 50 { return AddColumn(FloatField, cnom); } 51 //! Adds a column holding floating values (r_4), named \b cnom 45 52 inline sa_size_t AddFloatColumn(string const & cnom) 46 53 { return AddColumn(FloatField, cnom); } 54 //! Adds a column holding double values (r_8), named \b cnom 47 55 inline sa_size_t AddDoubleColumn(const char * cnom) 48 56 { return AddColumn(DoubleField, cnom); } 57 //! Adds a column holding double values (r_8), named \b cnom 49 58 inline sa_size_t AddDoubleColumn(string const & cnom) 50 59 { return AddColumn(DoubleField, cnom); } 60 //! Adds a column holding character strings, named \b cnom 51 61 inline sa_size_t AddStringColumn(const char * cnom) 52 62 { return AddColumn(StringField, cnom); } 63 //! Adds a column holding character strings, named \b cnom 53 64 inline sa_size_t AddStringColumn(string const & cnom) 54 65 { return AddColumn(StringField, cnom); } … … 69 80 70 81 // Acces to various counts and parameters 82 //! Return the number of lines (rows) in the table) 71 83 inline sa_size_t NEntry() const { return mNEnt ; } 84 //! Return the number of columns in the tables (number of cells in a row) 72 85 inline sa_size_t NVar() const { return mNames.size() ; } 86 //! Return the number of columns in the tables (number of cells in a row) 73 87 inline sa_size_t NVars() const { return mNames.size() ; } 88 //! Return the segment size (SegDBInterface objects corresponding to columns) 74 89 inline sa_size_t SegmentSize() const { return mSegSz ; } 90 //! Return the number of segments (SegDBInterface objects corresponding to columns) 75 91 inline sa_size_t NbSegments() const { return mNSeg ; } 76 92 … … 78 94 virtual sa_size_t AddLine(const r_8* data); 79 95 virtual sa_size_t AddLine(const MuTyV * data); 80 96 97 //! Alias for AddLine() 81 98 inline sa_size_t Fill(const r_8* data) 82 99 { return AddLine(data); } 100 //! Alias for AddLine() 83 101 inline sa_size_t Fill(const MuTyV * data); 84 102 85 103 virtual sa_size_t Extend(); 86 104 87 // Getting a given line (record) information105 //! Return the information stored in line \b n of the table 88 106 virtual MuTyV * GetLine(sa_size_t n) const ; 89 107 108 //! Return the index for column name \b nom 90 109 sa_size_t IndexNom(char const* nom) const ; 110 //! Return the index for column name \b nom 91 111 inline sa_size_t IndexNom(string const & nom) const 92 112 { return IndexNom(nom.c_str()); } 113 //! Return the column name for column index \b k 93 114 string NomIndex(sa_size_t k) const ; 94 115 … … 107 128 virtual void Clear() = 0; 108 129 109 // ---- ASCII I/O130 //! Prints the table content - NOT YET IMPLEMENTED ! 110 131 void Print(int num, int nmax=1) const ; 111 132 133 //! Prints table definition and number of entries 112 134 void Show(ostream& os) const ; 135 //! Prints table definition and number of entries on the standard output stream \b cout 113 136 inline void Show() const { Show(cout) ; } 114 137 … … 144 167 mutable r_8 * mVarD; // Pour retourner une ligne de la table 145 168 mutable MuTyV * mVarMTV; // Pour retourner une ligne de la table en MuTyV 146 169 170 //! \cond Pour pas inclure ds la documentation doxygen 147 171 typedef struct { 148 172 string nom; … … 150 174 sa_size_t ser; 151 175 } colst; 176 //! \endcond 152 177 std::vector<colst> mNames; 153 178
Note:
See TracChangeset
for help on using the changeset viewer.