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

Dcs_Mag_Near.h

Go to the documentation of this file.
00001 #ifndef DCSMAGNEAR_H
00002 #define DCSMAGNEAR_H
00003 
00004 #include "Rtypes.h"
00005 #include "DatabaseInterface/DbiTableRow.h"
00006 #include "DatabaseInterface/DbiOutRowStream.h"
00007 #include "DatabaseInterface/DbiResultSet.h"
00008 //#include "LeakChecker/Lea.h"
00009 #include "RawData/RawRecord.h"
00010 #include "RawData/RawHeader.h"
00011 #include "RawData/RawDataBlock.h"
00012 #include "Record/RecRecord.h"
00013 #include "JobControl/JobCommand.h"
00014 #include "JobControl/JobCModuleRegistry.h"
00015 #include "MinosObjectMap/MomNavigator.h"
00016 #include "MessageService/MsgService.h"
00017 #include "Validity/VldContext.h"
00018 
00019 class DbiValidityRec;
00020 
00021 class Dcs_Mag_Near : public DbiTableRow
00022 {
00023 
00024 using TObject::Compare;  // So won't be hidden
00025 
00026 public:
00027 // Constructors and destructors.
00028   Dcs_Mag_Near() { }
00029   Dcs_Mag_Near(const Dcs_Mag_Near& from) : DbiTableRow(from) { *this = from; }
00030   Dcs_Mag_Near(Float_t a, Float_t b, Float_t c, Int_t d, Short_t e,Short_t f,Short_t g,Short_t h,Short_t i,Short_t j,Short_t k,Short_t m, Short_t n):
00031    fCurrent(a),fVoltage(b),fVoltageRef(c),iRawData(d),b0LocalOrRemote(e),b1InterLocksComplete(f),b2PowerSupplyOn(g),b3GroundFault(h),b4OverCurrentDC(i),b5OverTemperature(j),b6CurrentRegulateMode(k),b7ExternalReference(m),b8Polarity(n) { }
00032   virtual ~Dcs_Mag_Near(){ };
00033 
00034 
00035 // State testing member functions
00036   Bool_t CanL2Cache() const { return kTRUE; }
00037   Bool_t Compare(const Dcs_Mag_Near& that ) const {
00038                 return     fCurrent == that.fCurrent
00039                        &&  fVoltage == that.fVoltage
00040                        &&  fVoltageRef == that.fVoltageRef
00041                        &&  b0LocalOrRemote == that.b0LocalOrRemote
00042                        &&  b1InterLocksComplete== that.b1InterLocksComplete
00043                        &&  b2PowerSupplyOn== that.b2PowerSupplyOn
00044                        &&  b3GroundFault== that.b3GroundFault
00045                        &&  b4OverCurrentDC== that.b4OverCurrentDC
00046                        &&  b5OverTemperature== that.b5OverTemperature
00047                        &&  b6CurrentRegulateMode== that.b6CurrentRegulateMode
00048                        &&  b7ExternalReference== that.b7ExternalReference
00049                        &&  b8Polarity== that.b8Polarity
00050                        &&  iRawData == that.iRawData; }
00051 
00052   UInt_t GetIndex(UInt_t /* defIndex */) const { return 1; }
00053   Int_t GetSupermodule() const { return 1; }
00054   Int_t GetAggregateNo() const { return 1; }
00055   Float_t GetCurrent() const { return fCurrent; }
00056   Float_t GetVoltage() const { return fVoltage; }
00057   Float_t GetVoltageReference() const { return fVoltageRef; }
00058   Int_t GetRawData() const { return iRawData; }
00059   Short_t GetControlState() const { return b0LocalOrRemote; }
00060   Short_t GetInterLocksComplete() const { return b1InterLocksComplete; }
00061   Short_t GetPowerSupplyOn() const { return b2PowerSupplyOn; }
00062   Short_t GetGroundFault() const { return b3GroundFault; }
00063   Short_t GetOverCurrentDC() const { return b4OverCurrentDC; }
00064   Short_t GetOverTemperature() const { return b5OverTemperature; }
00065   Short_t GetCurrentRegulateMode() const { return b6CurrentRegulateMode; }
00066   Short_t GetExternalReference() const { return b7ExternalReference; }
00067   Short_t GetPolarity() const { return b8Polarity; }
00068 
00069 // I/O  member functions
00070   virtual void Fill(DbiResultSet& rs, const DbiValidityRec* vrec);
00071   virtual void Store(DbiOutRowStream& ors, const DbiValidityRec* vrec) const;
00072 
00073   virtual DbiTableRow* CreateTableRow() const { return new Dcs_Mag_Near; }
00074 
00075 private:  
00076 
00077 // Data members
00078 
00079   Float_t fCurrent;
00080   Float_t fVoltage;
00081   Float_t fVoltageRef;
00082   Int_t iRawData;
00083   Short_t b0LocalOrRemote;
00084   Short_t b1InterLocksComplete;
00085   Short_t b2PowerSupplyOn;
00086   Short_t b3GroundFault;
00087   Short_t b4OverCurrentDC;
00088   Short_t b5OverTemperature;
00089   Short_t b6CurrentRegulateMode;
00090   Short_t b7ExternalReference;
00091   Short_t b8Polarity;
00092 
00093   // Note: fVoltage and fVoltageRef appear to have never been physically
00094   // connected to anything!  It just so happened that the inputs drifted
00095   // to plausible levels, so we assumed they were good.  Since they are
00096   // spots in the DB which until now have been filled with junk, I am
00097   // re-using their spots for actual useful magnet related data.  As of
00098   // 14:20 CST Jan. 31 2008, fVoltage is the LCW resistivity in MOhm cm
00099   // and fVoltageRef is the LCW temperature headed to the detector.
00100 
00101 ClassDef(Dcs_Mag_Near,0)
00102 
00103 };
00104 
00105 #endif  // DCSMAGNEAR_H

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