| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

FeeCableMap.h

Go to the documentation of this file.
00001 // $Id: FeeCableMap.h,v 1.0.0 2009/7/26 11:31:00 $
00002 
00003 #ifndef FEECABLEMAP_H
00004 #define FEECABLEMAP_H
00005 
00007 // FeeCableMap                                                        //
00008 //                                                                    //
00009 // Package: Dbi (Database Interface).                                 //
00010 //                                                                    //
00011 // Concept:  A concrete data type corresponding to a single row in    //
00012 //           the FeeCableMap database table of non-aggregated data.   //
00013 //                                                                    //
00014 // Weili Zhong  7/26/2009                                              //
00016 
00017 #include "Rtypes.h"
00018 #include "DatabaseInterface/DbiTableRow.h"
00019 #include "DatabaseInterface/DbiLog.h"
00020 #include "DatabaseInterface/DbiOutRowStream.h"
00021 #include "DatabaseInterface/DbiResultSet.h"
00022 #include "DatabaseInterface/DbiValidityRec.h"
00023 #include "DatabaseInterface/DbiResultPtr.h"
00024 #include "DataSvc/ICableSvc.h"
00025 #include "Conventions/Electronics.h"
00026 #include "Conventions/Hardware.h"
00027 #include <string>
00028 
00029 using namespace std;
00030 
00031 class DbiValidityRec;
00032 
00033 class FeeCableMap : public DbiTableRow
00034 {
00035 public:
00036   // Constructors and destructors.
00037   FeeCableMap() {  }
00038   FeeCableMap(const FeeCableMap& from) 
00039     : DbiTableRow(from) {  *this = from; }
00040 
00041  FeeCableMap(  //DayaBay::DetectorSensor pmtId,       // PMT Sensor ID 
00042         int feeChannelId,
00043           std::string channelDesc,
00044           int feeHardwareId ,
00045           std::string chanHrdwDesc,
00046           int sensorId,
00047           std::string sensorDesc,
00048           int pmtHardwareId,
00049           std::string pmtHrdwDesc
00050 
00051            ){
00052 
00053 m_feeChannelId = feeChannelId;
00054                m_channelDesc = channelDesc;
00055                m_feeHardwareId = feeHardwareId;
00056                m_chanHrdwDesc =  chanHrdwDesc;
00057                m_sensorId = sensorId;
00058                m_sensorDesc = sensorDesc;
00059                m_pmtHardwareId = pmtHardwareId;
00060                m_pmtHrdwDesc = pmtHrdwDesc;
00061 
00062 }
00063 
00064 
00065   virtual ~FeeCableMap(){  };
00066 
00067   int SetFeeCableMapValues( 
00068           int feeChannelId,
00069           std::string channelDesc,
00070           int feeHardwareId ,
00071           std::string chanHrdwDesc,
00072           int sensorId,
00073           std::string sensorDesc,
00074           int pmtHardwareId, 
00075           std::string pmtHrdwDesc
00076                   )
00077         {          m_feeChannelId = feeChannelId;
00078                m_channelDesc = channelDesc;
00079                m_feeHardwareId = feeHardwareId;
00080                m_chanHrdwDesc =  chanHrdwDesc;
00081                m_sensorId = sensorId;
00082                m_sensorDesc = sensorDesc;
00083                m_pmtHardwareId = pmtHardwareId;
00084                m_pmtHrdwDesc = pmtHrdwDesc;
00085                               }
00086 
00087 
00088   // State testing member functions
00089   Bool_t CanL2Cache() const { return kTRUE; }
00090   Bool_t Compare(const FeeCableMap& that ) const {
00091     return          m_feeChannelId  == that.m_feeChannelId
00092       &&             m_channelDesc  == that.m_channelDesc
00093       &&           m_feeHardwareId  == that.m_feeHardwareId
00094       &&            m_chanHrdwDesc  == that.m_chanHrdwDesc
00095       &&                m_sensorId  == that.m_sensorId
00096       &&              m_sensorDesc  == that.m_sensorDesc
00097       &&           m_pmtHardwareId  == that.m_pmtHardwareId
00098       &&             m_pmtHrdwDesc  == that.m_pmtHrdwDesc;}
00099 
00100   DayaBay::FeeChannelId GetFeeChannelId() const {return m_feeChannelId;}
00101   string GetFeeChannelDesc() const {return m_channelDesc;}
00102   DayaBay::FeeHardwareId GetFeeHardwareId() const {return m_feeHardwareId;}
00103   string GetChanHrdwDesc() const {return m_chanHrdwDesc;}
00104   DayaBay::DetectorSensor GetSensorId() const {return m_sensorId;}
00105   string GetsensorDesc() const {return m_sensorDesc;}
00106   DayaBay::PmtHardwareId GetPmtHardwareId() const {return m_pmtHardwareId;}
00107   string GetpmtHrdwDesc() const {return m_pmtHrdwDesc;}
00108 
00109 
00110   virtual DbiTableRow* CreateTableRow() const { 
00111                                               return new FeeCableMap; }
00112 
00113 // I/O  member functions
00114   virtual void Fill(DbiResultSet& rs,
00115                     const DbiValidityRec* vrec);
00116   virtual void Store(DbiOutRowStream& ors,
00117                      const DbiValidityRec* vrec) const;
00118 
00119 private:  
00120 
00121 // Data members
00122   DayaBay::FeeChannelId m_feeChannelId;   // Front-end electronics channel 
00123   std::string m_channelDesc;           // String of decribing FEE channel 
00124   DayaBay::FeeHardwareId m_feeHardwareId; // Identify a physical FEE board
00125   std::string m_chanHrdwDesc;             // String of decribing FEE board position
00126   DayaBay::DetectorSensor m_sensorId;     // PMT Sensor ID in detector
00127   std::string m_sensorDesc;               // String of decribing PMT sensor id
00128   DayaBay::PmtHardwareId m_pmtHardwareId; // Identify a physical PMT position 
00129   std::string m_pmtHrdwDesc;              // String of decribing PMT position 
00130 
00131 // Removed: ClassDef(FeeCableMap,0)    // Example of non-aggregated datadata type. 
00132 
00133 };
00134 
00135 
00136 #endif  // FeeCableMap_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:21:48 2011 for DbiDataSvc by doxygen 1.4.7