00001 // ===================================================================== 00024 // ===================================================================== 00025 #ifndef CLDAQ__TRUNINFORMATIONTABLE_HH 00026 #define CLDAQ__TRUNINFORMATIONTABLE_HH 00027 00028 #include "Tglobals.h" 00029 #include "TRunInformationList.hh" 00030 00031 class TOutputHtmlFileStream; 00032 00033 00053 class TRunInformationTable 00054 { 00055 00056 public: 00057 enum { tNotFound = -1 }; 00058 00059 private: 00060 TRunInformationList theRunInformationList; 00061 00062 public: 00063 TRunInformationTable(); 00064 TRunInformationTable( const TRunInformationList& infolist ); 00065 TRunInformationTable( const TRunInformationTable& right ); 00066 ~TRunInformationTable(); 00067 00068 public: 00069 const TRunInformationTable& operator=( const TRunInformationTable& right ); 00070 Tbool operator==( const TRunInformationTable& right ) const; 00071 Tbool operator!=( const TRunInformationTable& right ) const; 00072 friend Tostream& operator<<( Tostream& tos, const TRunInformationTable& right ); 00073 friend TOutputHtmlFileStream& operator<<( TOutputHtmlFileStream& html, const TRunInformationTable& right ); 00074 friend TRunInformationTable operator+( const TRunInformationList& left, const TRunInformationTable& right ); 00075 friend TRunInformationTable operator+( const TRunInformation& left, const TRunInformationTable& right ); 00076 00077 public: 00078 TRunInformationTable operator+( const TRunInformationTable& right ) const; 00079 TRunInformationTable operator+( const TRunInformationList& right ) const; 00080 TRunInformationTable operator+( const TRunInformation& right ) const; 00081 TRunInformationTable& operator+=( const TRunInformationTable& right ); 00082 TRunInformationTable& operator+=( const TRunInformationList& right ); 00083 TRunInformationTable& operator+=( const TRunInformation& right ); 00084 00085 public: 00086 const TRunInformationList& GetRunInformationList() const; 00087 TRunInformationList& GetRunInformationList(); 00088 Tvoid SetRunInformationList( const TRunInformationList& infolist ); 00089 00090 public: 00091 Tint GetNumberOfRows() const; 00092 Tvoid SetRunInformation( const Tstring& item ); 00093 Tvoid SetRunInformation( const Tstring& item, const Tstring& value ); 00094 Tvoid SetRunInformation( const TRunInformation& runinfo ); 00095 Tvoid SetRunInformation(); 00096 Tvoid AddRunInformation( const Tstring& item ); 00097 Tvoid AddRunInformation( const Tstring& item, const Tstring& value ); 00098 Tvoid AddRunInformation( const TRunInformation& runinfo ); 00099 Tvoid AddRunInformation(); 00100 Tstring GetItem( const Tstring& value ) const; 00101 Tstring GetItem( Tint nrow ) const; 00102 Tstring GetValue( const Tstring& item ) const; 00103 Tstring GetValue( Tint nrow ) const; 00104 Tint FindItem( const Tstring& item ) const; 00105 Tint FindValue( const Tstring& value ) const; 00106 Tint FindRunInformation( const TRunInformation& runinfo ) const; 00107 Tbool HasItem( const Tstring& item ) const; 00108 Tbool HasRunInformation( const TRunInformation& runinfo ) const; 00109 Tvoid Remove( const Tstring& item ); 00110 Tvoid Remove( const TRunInformation& runinfo ); 00111 Tvoid Clear(); 00112 00113 }; 00114 00115 inline const TRunInformationList& TRunInformationTable::GetRunInformationList() const 00116 { 00117 return theRunInformationList; 00118 } 00119 00120 inline TRunInformationList& TRunInformationTable::GetRunInformationList() 00121 { 00122 return theRunInformationList; 00123 } 00124 00125 inline Tvoid TRunInformationTable::SetRunInformationList( const TRunInformationList& infolist ) 00126 { 00127 theRunInformationList = infolist; 00128 return; 00129 } 00130 00131 #endif