Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BfldDbiCoilLimits.cxx

Go to the documentation of this file.
00001 
00002 #include "BfldDbiCoilLimits.h"
00003 #include "MessageService/MsgService.h"
00004 #include "DatabaseInterface/DbiOutRowStream.h"
00005 #include "DatabaseInterface/DbiResultSet.h"
00006 #include "DatabaseInterface/DbiValidityRec.h"
00007 
00008 ClassImp(BfldDbiCoilLimits)
00009 
00010 //   Definition of static data members
00011 //   *********************************
00012 
00013 CVSID("$Id: BfldDbiCoilLimits.cxx,v 1.1 2007/12/07 00:37:46 rhatcher Exp $");
00014 
00015 //  Instantiate associated Result Pointer class.
00016 //  *******************************************
00017 
00018 #include "DatabaseInterface/DbiResultPtr.tpl"
00019 template class  DbiResultPtr<BfldDbiCoilLimits>;
00020 
00021 #include "DatabaseInterface/DbiWriter.tpl"
00022 template class  DbiWriter<BfldDbiCoilLimits>;
00023 
00024 // Definition of member functions (alphabetical order)
00025 // ***************************************************
00026 
00027 
00028 //.....................................................................
00029 
00030 void BfldDbiCoilLimits::Fill(DbiResultSet& rs,
00031                             const DbiValidityRec* /* vrec */) {
00032 //
00033 //
00034 //  Purpose:  Fill object from Result Set
00035 //
00036 //  Arguments: 
00037 //    rs           in    Result Set used to fill object
00038 //    vrec         in    Associated validity record (or 0 if filling
00039 //                                                    DbiValidityRec)
00040 //
00041 //  o Fill object from current row of Result Set.
00042 //  This method demonstrates both the "dumb" fill method (just
00043 //  load the data as it comes) and the smart method (check column
00044 //  name and load according to column order). 
00045 
00046 // Dumb method.
00047   rs >> fLowLimit >> fHighLimit;
00048 
00049 /*
00050 // Smart method
00051   else {
00052     Int_t numCol = rs.NumCols();
00053     //  The first column (SeqNo) has already been processed.
00054     for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00055       string colName = rs.CurColName();
00056       if      ( colName == "LOWLIMIT"  ) rs >> fLowLimit;
00057       else if ( colName == "HIGHLIMIT" ) rs >> fHighLimit;
00058       else {
00059         MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00060                                << "(" << colName << ")"
00061                               << "; not part of BfldDbiCoilLimits" << endl;
00062         rs.IncrementCurCol();
00063       }
00064     }
00065     
00066   }
00067 */
00068 }
00069 //.....................................................................
00070 
00071 void BfldDbiCoilLimits::Store(DbiOutRowStream& ors,
00072                              const DbiValidityRec* /* vrec */) const {
00073 //  Purpose:  Stream object to output row stream
00074 //
00075 //  Arguments: 
00076 //    ors          in     Output row stream.
00077 //    vrec         in    Associated validity record (or 0 if filling
00078 //                                                    DbiValidityRec)
00079 //  o  Stream object to output row stream.
00080 
00081   ors << fLowLimit << fHighLimit;
00082 }

Generated on Mon Feb 15 11:06:25 2010 for loon by  doxygen 1.3.9.1