#include <DbuDaqConfigFilesText.h>
Inheritance diagram for DbuDaqConfigFilesText:

Public Member Functions | |
| DbuDaqConfigFilesText () | |
| DbuDaqConfigFilesText (string text) | |
| virtual | ~DbuDaqConfigFilesText () |
| virtual Int_t | GetAggregateNo () const |
| virtual DbiTableRow * | CreateTableRow () const |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
| Int_t | GetSeqNo () const |
| Int_t | LookupSeqNo (DbiStatement *stmt) const |
| std::string & | CalcMD5 () |
Static Public Member Functions | |
| const char * | GetTableDescr () |
Public Attributes | |
| std::string | fText |
| std::string | fMD5 |
| Int_t | fSeqNo |
Static Public Attributes | |
| const std::string | kNoText = "<<No ConfigFileText>>" |
| const std::string | kNoMD5 = "<<No MD5 value>>" |
Private Member Functions | |
| DbuDaqConfigFilesText (const DbuDaqConfigFilesText &from) | |
Friends | |
| class | DbuRunSummary |
| class | DbuDaqFileModule |
|
|
Definition at line 41 of file DbuDaqConfigFilesText.h. References fMD5, fSeqNo, fText, kNoMD5, and kNoText.
|
|
|
Definition at line 45 of file DbuDaqConfigFilesText.h. References fMD5, fSeqNo, fText, and kNoMD5.
|
|
|
Definition at line 49 of file DbuDaqConfigFilesText.h. 00049 { LEA_DTOR; };
|
|
|
Definition at line 85 of file DbuDaqConfigFilesText.h. 00086 : DbiTableRow() { LEA_CTOR; *this = from; }
|
|
|
Definition at line 170 of file DbuDaqConfigFilesText.cxx. Referenced by DbuDaqFileModule::CommitDbuDaqConfigFilesText(). 00171 {
00172 //
00173 //
00174 // Purpose: Calculate and record MD5 value
00175 //
00176 // Return: nothing
00177 //
00178 // Contact: R. Hatcher
00179 //
00180 // Specification:-
00181 // =============
00182 //
00183
00184 // Program Notes:-
00185 // =============
00186
00187 // None.
00188
00189 TMD5 md5;
00190 md5.Update((const UChar_t*)fText.c_str(),(UInt_t)fText.size());
00191 md5.Final();
00192 fMD5 = md5.AsString();
00193 return fMD5;
00194 }
|
|
|
Implements DbiTableRow. Definition at line 57 of file DbuDaqConfigFilesText.h. 00057 { return new DbuDaqConfigFilesText; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 71 of file DbuDaqConfigFilesText.cxx. References fMD5, fSeqNo, and DbiValidityRec::GetSeqNo(). 00072 {
00073 //
00074 //
00075 // Purpose: Fill object from Result Set
00076 //
00077 // Arguments:
00078 // rs in Result Set used to fill object
00079 // vrec in Associated validity record (or 0 if filling
00080 // DbiValidityRec)
00081 //
00082 // Return:
00083 //
00084 // Contact: R. Hatcher
00085 //
00086 // Specification:-
00087 // =============
00088 //
00089 // o Fill object from current row of Result Set.
00090
00091 // Program Notes:-
00092 // =============
00093
00094 // None.
00095
00096 rs >> fMD5
00097 >> fText;
00098
00099 fSeqNo = ((vrec) ? vrec->GetSeqNo() : 0 );
00100 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 53 of file DbuDaqConfigFilesText.h. 00053 { return -1; }
|
|
|
Definition at line 66 of file DbuDaqConfigFilesText.h. 00066 { return fSeqNo; }
|
|
|
Definition at line 243 of file DbuDaqConfigFilesText.cxx. 00244 {
00245 //
00246 //
00247 // Purpose: Return a string describing rows in the table
00248 // Used in creating temporary tables
00249 //
00250 // Return: const char* to parenthesized comma separated list
00251 // of column name and type pairs
00252 //
00253 // Contact: R. Hatcher
00254 //
00255 // Specification:-
00256 // =============
00257 //
00258
00259 // Program Notes:-
00260 // =============
00261
00262 // None.
00263
00264 const char* const_tabledescr = "( \
00265 SEQNO int, \
00266 ROW_COUNTER int, \
00267 CONFIGFILES_MD5 char(32), \
00268 CONFIGFILES_TEXT mediumtext, \
00269 primary key (SEQNO,ROW_COUNTER) \
00270 )";
00271
00272 return const_tabledescr;
00273 }
|
|
|
Definition at line 197 of file DbuDaqConfigFilesText.cxx. References DbiStatement::ExecuteQuery(), fMD5, Form(), and MSG. Referenced by DbuDaqFileModule::CommitDbuDaqConfigFilesText(). 00198 {
00199 //
00200 //
00201 // Purpose: Lookup the SeqNo for this MD5
00202 //
00203 // Return: the SEQNO (or 0 if no match exists)
00204 //
00205 // Contact: R. Hatcher
00206 //
00207 // Specification:-
00208 // =============
00209 //
00210
00211 // Program Notes:-
00212 // =============
00213
00214 // None.
00215
00216 // ensure MD5 is up-to-date
00217 // CalcMD5(); ... not const
00218 const char* sqlbase =
00219 "select SEQNO from DBUDAQCONFIGFILESTEXT where CONFIGFILES_MD5='%s';\0";
00220 TString sqlquery = Form(sqlbase,fMD5.c_str());
00221
00222 TSQLStatement* tsqlstmt = stmt->ExecuteQuery(sqlquery);
00223
00224 Int_t nrows = 0, seqno = 0;
00225 while ( 1 ) {
00226 if ( ! tsqlstmt->NextResultRow() ) break;
00227 nrows++;
00228 seqno = tsqlstmt->GetInt(0);
00229 }
00230 // accept the last one
00231
00232 if (nrows>1) {
00233 MSG("Dbu",Msg::kWarning)
00234 << "DbuDaqConfigFilesText saw " << nrows << " that statisfied '"
00235 << sqlquery
00236 << "'" << endl;
00237 }
00238 return seqno;
00239 }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 104 of file DbuDaqConfigFilesText.cxx. References fMD5. 00105 {
00106 //
00107 //
00108 // Purpose: Stream object to output row stream
00109 //
00110 // Arguments:
00111 // ors in Output row stream.
00112 // vrec in Associated validity record (or 0 if filling
00113 // DbiValidityRec)
00114 //
00115 // Return:
00116 //
00117 // Contact: R. Hatcher
00118 //
00119 // Specification:-
00120 // =============
00121 //
00122 // o Stream object to output row stream.
00123
00124 // Program Notes:-
00125 // =============
00126
00127 // None.
00128
00129 ors << fMD5
00130 << fText;
00131
00132 }
|
|
|
Definition at line 83 of file DbuDaqConfigFilesText.h. |
|
|
Definition at line 82 of file DbuDaqConfigFilesText.h. |
|
|
Definition at line 93 of file DbuDaqConfigFilesText.h. Referenced by CalcMD5(), DbuDaqConfigFilesText(), Fill(), LookupSeqNo(), operator<<(), and Store(). |
|
|
Definition at line 94 of file DbuDaqConfigFilesText.h. Referenced by DbuDaqConfigFilesText(), Fill(), and operator<<(). |
|
|
Definition at line 92 of file DbuDaqConfigFilesText.h. Referenced by CalcMD5(), DbuDaqConfigFilesText(), and DbuDaqFileModule::HandleConfigFilesBlock(). |
|
|
Definition at line 39 of file DbuDaqConfigFilesText.cxx. Referenced by DbuDaqConfigFilesText(). |
|
|
Definition at line 38 of file DbuDaqConfigFilesText.cxx. Referenced by DbuDaqConfigFilesText(). |
1.3.9.1