#include <DbiConfigSet.h>
Inheritance diagram for DbiConfigSet:
Public Member Functions | |
| DbiConfigSet () | |
| virtual | ~DbiConfigSet () |
| virtual DbiTableRow * | CreateTableRow () const |
| Int_t | GetAggregateNo () const |
| UInt_t | GetNumParams () const |
| string | GetParamName (UInt_t parNo) const |
| DbiFieldType | GetParamType (UInt_t parNo) const |
| string | GetParamValue (UInt_t parNo) const |
| void | Clear (const Option_t *="") |
| void | PushBack (const string &name, const string &value, const DbiFieldType &type) |
| void | SetAggregateNo (Int_t aggNo) |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
Private Member Functions | |
| DbiConfigSet (const DbiConfigSet &from) | |
Private Attributes | |
| vector< Param * > | fParams |
| Int_t | fAggregateNo |
DatabaseInterface
Contact: n.west1@physics.ox.ac.uk
Definition at line 40 of file DbiConfigSet.h.
|
|
Definition at line 46 of file DbiConfigSet.h. References fAggregateNo. 00046 : fAggregateNo(-2) { LEA_CTOR; }
|
|
|
Definition at line 36 of file DbiConfigSet.cxx. 00036 {
00037 //
00038 //
00039 // Purpose: Destructor
00040
00041 LEA_DTOR;
00042
00043 for ( vector<Param*>::iterator itr = fParams.begin();
00044 itr != fParams.end();
00045 ++itr ) delete (*itr);
00046
00047 }
|
|
|
|
|
|
Definition at line 60 of file DbiConfigSet.h. References fParams. Referenced by DbiConfigStream::operator<<(). 00060 { fParams.clear(); }
|
|
|
Implements DbiTableRow. Definition at line 51 of file DbiConfigSet.h. 00051 {
00052 return new DbiConfigSet; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 91 of file DbiConfigSet.cxx. References DbiRowStream::CurColFieldType(), DbiRowStream::CurColName(), DbiResultSet::CurColValue(), fAggregateNo, fParams, DbiValidityRec::GetAggregateNo(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), DbiConfigSet::Param::Name, DbiRowStream::NumCols(), DbiConfigSet::Param::Type, and DbiConfigSet::Param::Value. 00092 {
00093 //
00094 //
00095 // Purpose: Fill oject from Result Set
00096 //
00097 // Arguments:
00098 // rs in Result Set used to fill object
00099 // vrec in Associated validity record (or 0 if filling
00100 // DbiValidityRec)
00101 //
00102 // Return:
00103 //
00104 // Contact: N. West
00105 //
00106 // Specification:-
00107 // =============
00108 //
00109 // o Fill object from current (and only) row of Result Set.
00110
00111 // Program Notes:-
00112 // =============
00113
00114 // None.
00115
00116
00117 // Don't count leading SeqNo, its already been skipped.
00118 UInt_t numParams = rs.NumCols()-1;
00119 // Skip the ROW_COUNTER if present
00120 if ( rs.HasRowCounter() ) --numParams;
00121
00122 for (UInt_t iParam = 0; iParam < numParams; ++iParam ) {
00123 Param* par = new Param;
00124 par->Name = rs.CurColName();
00125 par->Value = rs.CurColValue();
00126 par->Type = rs.CurColFieldType();
00127
00128 fParams.push_back(par);
00129 rs.IncrementCurCol();
00130 }
00131
00132 fAggregateNo = vrec->GetAggregateNo ();
00133
00134 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 53 of file DbiConfigSet.h. Referenced by DbiConfigStream::DbiConfigStream(). 00053 { return fAggregateNo; }
|
|
|
Definition at line 54 of file DbiConfigSet.h. References fParams. Referenced by GetParamName(), GetParamType(), GetParamValue(), operator<<(), and DbiConfigStream::operator>>(). 00054 { return fParams.size(); }
|
|
|
Definition at line 137 of file DbiConfigSet.cxx. References fParams, and GetNumParams(). Referenced by operator<<(), and DbiConfigStream::operator>>(). 00137 {
00138 //
00139 //
00140 // Purpose: Get the name of selected parameter.
00141 //
00142 // Arguments:
00143 // parNo in parNo (in range 0..GetNumParams())
00144 //
00145 // Return: The name of selected parameter
00146 // or "" if parNo out of range.
00147 //
00148 // Contact: N. West
00149 //
00150 // Specification:-
00151 // =============
00152 //
00153 // o Get the name of selected parameter or "" if parNo out of range.
00154
00155 // Program Notes:-
00156 // =============
00157
00158 // None.
00159
00160 return ( parNo <= GetNumParams() ) ?
00161 fParams[parNo]->Name : "";
00162
00163 }
|
|
|
Definition at line 166 of file DbiConfigSet.cxx. References fParams, and GetNumParams(). Referenced by operator<<(). 00166 {
00167 //
00168 //
00169 // Purpose: Get the type of selected parameter.
00170 //
00171 // Arguments:
00172 // parNo in parNo (in range 0..GetNumParams())
00173 //
00174 // Return: The type of selected parameter
00175 // or Dbi::kUnknown if parNo out of range.
00176 //
00177 // Contact: N. West
00178 //
00179 // Specification:-
00180 // =============
00181 //
00182 // o Get the type of selected parameter or Dbi::kUnknown if
00183 // parNo out of range.
00184
00185 // Program Notes:-
00186 // =============
00187
00188 // None.
00189
00190 return ( parNo <= GetNumParams() ) ?
00191 fParams[parNo]->Type : DbiFieldType(Dbi::kUnknown);
00192
00193 }
|
|
|
Definition at line 196 of file DbiConfigSet.cxx. References fParams, and GetNumParams(). Referenced by DbiConfigStream::DbiConfigStream(), operator<<(), and DbiConfigStream::operator>>(). 00196 {
00197 //
00198 //
00199 // Purpose: Get the value of selected parameter.
00200 //
00201 // Arguments:
00202 // parNo in parNo (in range 0..GetNumParams())
00203 //
00204 // Return: The value of selected parameter
00205 // or "" if parNo out of range.
00206 //
00207 // Contact: N. West
00208 //
00209 // Specification:-
00210 // =============
00211 //
00212 // o Get the value of selected parameter or "" if parNo out of range.
00213
00214 // Program Notes:-
00215 // =============
00216
00217 // None.
00218
00219 return ( parNo <= GetNumParams() ) ?
00220 fParams[parNo]->Value : "";
00221
00222 }
|
|
||||||||||||||||
|
Definition at line 226 of file DbiConfigSet.cxx. References fParams. Referenced by DbiConfigStream::operator<<(). 00228 {
00229 //
00230 //
00231 // Purpose: Add another entry to the end of the existing row.
00232
00233 fParams.push_back(new Param(name,value,type));
00234 }
|
|
|
Definition at line 64 of file DbiConfigSet.h. References fAggregateNo. Referenced by DbiConfigStream::operator<<(), and DbiConfigStream::Write(). 00064 { fAggregateNo = aggNo; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 238 of file DbiConfigSet.cxx. References fParams, and DbiOutRowStream::Store(). 00239 {
00240 //
00241 //
00242 // Purpose: Stream object to output row stream
00243 //
00244 // Arguments:
00245 // ors in Output row stream.
00246 // vrec in =0. If filling other table rows it points
00247 // to the associated validity record.
00248 //
00249 // Return:
00250 //
00251 // Contact: N. West
00252 //
00253 // Specification:-
00254 // =============
00255 //
00256 // o Stream object to output row stream.
00257
00258 // Program Notes:-
00259 // =============
00260
00261 // This method sneaks round the back of the DbiRowStream interface
00262 // and directly uses the private Store method as the data is already
00263 // in string form. Its all in a good cause because this allows
00264 // DbiConfigSet to output data from any type of table.
00265
00266 for ( vector<Param*>::const_iterator itr = fParams.begin();
00267 itr != fParams.end();
00268 ++itr ) ors.Store((*itr)->Value.c_str());
00269
00270 }
|
|
|
Aggregate number or:- -1 Non-aggregated data or multiple aggregates -2 undefined aggregates Definition at line 102 of file DbiConfigSet.h. Referenced by DbiConfigSet(), Fill(), and SetAggregateNo(). |
|
|
Definition at line 97 of file DbiConfigSet.h. Referenced by Clear(), Fill(), GetNumParams(), GetParamName(), GetParamType(), GetParamValue(), PushBack(), and Store(). |
1.3.9.1