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

Dcs_Env_Near.cxx

Go to the documentation of this file.
00001 
00002 #include "Dcs_Env_Near.h"
00003 #include "MessageService/MsgService.h"
00004 #include "DatabaseInterface/DbiOutRowStream.h"
00005 #include "DatabaseInterface/DbiResultSet.h"
00006 #include "DatabaseInterface/DbiValidityRec.h"
00007 
00008 ClassImp(Dcs_Env_Near)
00009 
00010 //   Definition of static data members
00011 //   *********************************
00012 
00013 CVSID("$Id: Dcs_Env_Near.cxx,v 1.5 2005/03/11 16:17:48 west Exp $\n  CVSID_DBIRESULTPTR ");
00014 
00015 //  Instantiate associated Result Pointer class.
00016 //  *******************************************
00017 
00018 #include "DatabaseInterface/DbiResultPtr.tpl"
00019 template class  DbiResultPtr<Dcs_Env_Near>;
00020 
00021 #include "DatabaseInterface/DbiWriter.tpl"
00022 template class  DbiWriter<Dcs_Env_Near>;
00023 
00024 // Definition of member functions (alphabetiNear order)
00025 // ***************************************************
00026 
00027 
00028 //.....................................................................
00029 
00030 void Dcs_Env_Near::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   //if (    rs.TableName() == "DCS_ENV_NEAR" 
00047   //     && rs.TableName() == "Dcs_Env_Near" ) {
00048     
00049 // Dumb method.
00050          rs >> fTemp >> fHumid >> fPres >> iTrgRate >> fTherm1 >> fTherm2 >> fTherm3 >> fTherm4 >> fTherm5 >> fTherm6 >> fTherm7 >> fTherm8 >> fTherm9 >> fTherm10 >> fTherm11 >> fTherm12 >> fTherm13 >> fTherm14 >> fTherm15 >> fTherm16 >> fTherm17 >> fTherm18 >> fTherm19 >> fTherm20 >> fTherm21 >> fTherm22 >> fTherm23 >> fTherm24 >> fTherm25 >> fTherm26 >> fTherm27 >> fTherm28 >> fTherm29 >> fTherm30 >> fTherm31 >> fTherm32;
00051          rs >> fTherm33 >> fTherm34 >> fTherm35 >> fTherm36 >> fTherm37 >> fTherm38 >> fTherm39 >> fTherm40  >> fTherm41 >> fTherm42 >> fTherm43 >> fTherm44 >> fTherm45 >> fTherm46 >> fTherm47 >> fTherm48 >> fTherm49 >> fTherm50 >> fTherm51 >> fTherm52 >> fTherm53 >> fTherm54 >> fTherm55 >> fTherm56;
00052   
00053   //}
00054   
00055 /* Smart method
00056   else {
00057     Int_t numCol = rs.NumCols();
00058     //  The first column (SeqNo) has already been processed.
00059     for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00060       string colName = rs.CurColName();
00061       if (      colName == "Near_TEMPERATURE" ) rs >> fTemp;
00062       else if ( colName == "Near_HUMIDITY" )  rs >> fHumid;
00063       else if ( colName == "Near_PRESSURE" )     rs >> fPres;
00064       else if ( colName == "Near_ISTRIG" )     rs >> iIsTrg;
00065       else if ( colName == "Near_TRIGGERRATE" )     rs >> iTrgRate;
00066       else if ( colName == "Near_THERM1" )     rs >> fTherm1;
00067       else if ( colName == "Near_THERM2" )     rs >> fTherm2;
00068       else if ( colName == "Near_THERM3" )     rs >> fTherm3;
00069       else if ( colName == "Near_THERM4" )     rs >> fTherm4;
00070       else if ( colName == "Near_THERM5" )     rs >> fTherm5;
00071       else if ( colName == "Near_THERM6" )     rs >> fTherm6;
00072       else if ( colName == "Near_THERM7" )     rs >> fTherm7;
00073       else if ( colName == "Near_THERM8" )     rs >> fTherm8;
00074       else if ( colName == "Near_THERM9" )     rs >> fTherm9;
00075       else if ( colName == "Near_THERM10" )     rs >> fTherm10;
00076       else if ( colName == "Near_THERM11" )     rs >> fTherm11;
00077       else if ( colName == "Near_THERM12" )     rs >> fTherm12;
00078       else if ( colName == "Near_THERM13" )     rs >> fTherm13;
00079       else if ( colName == "Near_THERM14" )     rs >> fTherm14;
00080       else if ( colName == "Near_THERM15" )     rs >> fTherm15;
00081       else if ( colName == "Near_THERM16" )     rs >> fTherm16;
00082       else if ( colName == "Near_THERM17" )     rs >> fTherm17;
00083       else if ( colName == "Near_THERM18" )     rs >> fTherm18;
00084       else if ( colName == "Near_THERM19" )     rs >> fTherm19;
00085       else if ( colName == "Near_THERM20" )     rs >> fTherm20;
00086       else if ( colName == "Near_THERM21" )     rs >> fTherm21;
00087       else if ( colName == "Near_THERM22" )     rs >> fTherm22;
00088       else if ( colName == "Near_THERM23" )     rs >> fTherm23;
00089       else if ( colName == "Near_THERM24" )     rs >> fTherm24;
00090       else if ( colName == "Near_THERM25" )     rs >> fTherm25;
00091       else if ( colName == "Near_THERM26" )     rs >> fTherm26;
00092       else if ( colName == "Near_THERM27" )     rs >> fTherm27;
00093       else if ( colName == "Near_THERM28" )     rs >> fTherm28;
00094       else if ( colName == "Near_THERM29" )     rs >> fTherm29;
00095       else if ( colName == "Near_THERM30" )     rs >> fTherm30;
00096       else if ( colName == "Near_THERM31" )     rs >> fTherm31;
00097       else if ( colName == "Near_THERM32" )     rs >> fTherm32;
00098       else {
00099         MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00100                                << "(" << colName << ")"
00101                               << "; not part of DcsEnvNear" << endl;
00102         rs.IncrementCurCol();
00103       }
00104     }
00105     
00106   }*/
00107 }
00108 //.....................................................................
00109 
00110 void Dcs_Env_Near::Store(DbiOutRowStream& ors,
00111                          const DbiValidityRec* /* vrec */) const {
00112 //  Purpose:  Stream object to output row stream
00113 //
00114 //  Arguments: 
00115 //    ors          in     Output row stream.
00116 //    vrec         in    Associated validity record (or 0 if filling
00117 //                                                    DbiValidityRec)
00118 //  o  Stream object to output row stream.
00119 
00120   ors << fTemp << fHumid << fPres << iTrgRate << fTherm1 << fTherm2 << fTherm3 << fTherm4 << fTherm5 << fTherm6 << fTherm7 << fTherm8 << fTherm9 << fTherm10 << fTherm11 << fTherm12 << fTherm13 << fTherm14 << fTherm15 << fTherm16 << fTherm17 << fTherm18 << fTherm19 << fTherm20 << fTherm21 << fTherm22 << fTherm23 << fTherm24 << fTherm25 << fTherm26 << fTherm27 << fTherm28 << fTherm29 << fTherm30 << fTherm31 << fTherm32;
00121   ors << fTherm33 << fTherm34 << fTherm35 << fTherm36 << fTherm37 << fTherm38 << fTherm39 << fTherm40  << fTherm41 << fTherm42 << fTherm43 << fTherm44 << fTherm45 << fTherm46 << fTherm47 << fTherm48 << fTherm49 << fTherm50 << fTherm51 << fTherm52 << fTherm53 << fTherm54 << fTherm55 << fTherm56;
00122 }
00123 
00124 void Dcs_Env_Near::SetAdditionalTherms(Float_t th1,Float_t th2,Float_t th3, Float_t th4, Float_t th5,Float_t th6,Float_t th7,Float_t th8, Float_t th9, Float_t th10,Float_t th11,Float_t th12,Float_t th13, Float_t th14, Float_t th15,Float_t th16,Float_t th17,Float_t th18, Float_t th19, Float_t th20,Float_t th21,Float_t th22,Float_t th23,Float_t th24) const
00125 {
00126         fTherm33 = th1;
00127         fTherm34 = th2;
00128         fTherm35 = th3;
00129         fTherm36 = th4;
00130         fTherm37 = th5;
00131         fTherm38 = th6;
00132         fTherm39 = th7;
00133         fTherm40 = th8;
00134         fTherm41 = th9;
00135         fTherm42 = th10;
00136         fTherm43 = th11;
00137         fTherm44 = th12;
00138         fTherm45 = th13;
00139         fTherm46 = th14;
00140         fTherm47 = th15;
00141         fTherm48 = th16;
00142         fTherm49 = th17;
00143         fTherm50 = th18;
00144         fTherm51 = th19;
00145         fTherm52 = th20;
00146         fTherm53 = th21;
00147         fTherm54 = th22;
00148         fTherm55 = th23;
00149         fTherm56 = th24;
00150 }
00151 

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