BfldDbiCoilState Class Reference

#include <BfldDbiCoilState.h>

Inheritance diagram for BfldDbiCoilState:
DbiTableRow

List of all members.

Public Member Functions

 BfldDbiCoilState ()
 BfldDbiCoilState (const BfldDbiCoilState &from)
 BfldDbiCoilState (Float_t a, UInt_t b, UInt_t c)
virtual ~BfldDbiCoilState ()
Bool_t CanL2Cache () const
Bool_t Compare (const BfldDbiCoilState &that) const
UInt_t GetIndex (UInt_t) const
Float_t GetCurrent () const
UInt_t GetStatus () const
Int_t GetSupermodule () const
Int_t GetAggregateNo () const
Bool_t IsOK () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
virtual DbiTableRowCreateTableRow () const

Private Attributes

Float_t fCurrent
UInt_t iStatus
Int_t iSupermod

Detailed Description

Definition at line 13 of file BfldDbiCoilState.h.


Constructor & Destructor Documentation

BfldDbiCoilState::BfldDbiCoilState (  )  [inline]

Definition at line 20 of file BfldDbiCoilState.h.

00020 { }

BfldDbiCoilState::BfldDbiCoilState ( const BfldDbiCoilState from  )  [inline]

Definition at line 21 of file BfldDbiCoilState.h.

00021 : DbiTableRow(from) { *this = from; }

BfldDbiCoilState::BfldDbiCoilState ( Float_t  a,
UInt_t  b,
UInt_t  c 
) [inline]

Definition at line 22 of file BfldDbiCoilState.h.

00022                                                   :
00023    fCurrent(a), iStatus(b), iSupermod(c) { }
  virtual ~BfldDbiCoilState(){ };

virtual BfldDbiCoilState::~BfldDbiCoilState (  )  [inline, virtual]

Definition at line 24 of file BfldDbiCoilState.h.

00024 { };


Member Function Documentation

Bool_t BfldDbiCoilState::CanL2Cache (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 28 of file BfldDbiCoilState.h.

00028 { return kTRUE; }

Bool_t BfldDbiCoilState::Compare ( const BfldDbiCoilState that  )  const [inline]

Definition at line 29 of file BfldDbiCoilState.h.

References fCurrent, iStatus, and iSupermod.

00029                                                       {
00030                 return     fCurrent  == that.fCurrent
00031                        &&  iStatus   == that.iStatus
00032                        &&  iSupermod == that.iSupermod; }

virtual DbiTableRow* BfldDbiCoilState::CreateTableRow (  )  const [inline, virtual]

Implements DbiTableRow.

Definition at line 47 of file BfldDbiCoilState.h.

00047 { return new BfldDbiCoilState; }

void BfldDbiCoilState::Fill ( DbiResultSet rs,
const DbiValidityRec vrec 
) [virtual]

Implements DbiTableRow.

Definition at line 30 of file BfldDbiCoilState.cxx.

References fCurrent, iStatus, and iSupermod.

00031                                                               {
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() != "BFLDDBICOILSTATE" 
00047 //       && rs.TableName() != "BfldDbiCoilState" ) {
00048     
00049 // Dumb method.
00050           rs >> fCurrent >> iStatus >> iSupermod;
00051 
00052 /*  }
00053   
00054 // Smart method
00055   else {
00056     Int_t numCol = rs.NumCols();
00057     //  The first column (SeqNo) has already been processed.
00058     for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00059       string colName = rs.CurColName();
00060       if (      colName == "COIL_CURRENT" ) rs >> fCurrent;
00061       else if ( colName == "COIL_STATUS" )  rs >> iStatus;
00062       else if ( colName == "COIL_SUPERMODULE" )     rs >> iSupermod;
00063       else {
00064         MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00065                                << "(" << colName << ")"
00066                               << "; not part of BfldDbiCoilState" << endl;
00067         rs.IncrementCurCol();
00068       }
00069     }
00070     
00071   }
00072 */
00073 }

Int_t BfldDbiCoilState::GetAggregateNo (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 38 of file BfldDbiCoilState.h.

References iSupermod.

00038 { return iSupermod; }

Float_t BfldDbiCoilState::GetCurrent (  )  const [inline]
UInt_t BfldDbiCoilState::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 34 of file BfldDbiCoilState.h.

References iSupermod.

00034 { return iSupermod; }

UInt_t BfldDbiCoilState::GetStatus (  )  const [inline]

Definition at line 36 of file BfldDbiCoilState.h.

References iStatus.

Referenced by NtpSRModule::FillNtpDetStatus(), and CoilTools::IsCoilStateReverse().

00036 { return iStatus; }

Int_t BfldDbiCoilState::GetSupermodule (  )  const [inline]

Definition at line 37 of file BfldDbiCoilState.h.

References iSupermod.

Referenced by NtpSRModule::FillNtpDetStatus(), and CoilTools::GetLast().

00037 { return iSupermod; }

Bool_t BfldDbiCoilState::IsOK (  )  const [inline]

Definition at line 39 of file BfldDbiCoilState.h.

References iStatus, and CoilStatus::kBad.

Referenced by CoilTools::IsCoilStateOK().

00039                                  { if (iStatus & CoilStatus::kBad)
00040                                         return false;
00041                                    else return true;} 

void BfldDbiCoilState::Store ( DbiOutRowStream ors,
const DbiValidityRec vrec 
) const [virtual]

Reimplemented from DbiTableRow.

Definition at line 76 of file BfldDbiCoilState.cxx.

References fCurrent, iStatus, and iSupermod.

00077                                                                      {
00078 //  Purpose:  Stream object to output row stream
00079 //
00080 //  Arguments: 
00081 //    ors          in     Output row stream.
00082 //    vrec         in    Associated validity record (or 0 if filling
00083 //                                                    DbiValidityRec)
00084 //  o  Stream object to output row stream.
00085 
00086   ors << fCurrent << iStatus << iSupermod;
00087 }


Member Data Documentation

Float_t BfldDbiCoilState::fCurrent [private]

Definition at line 53 of file BfldDbiCoilState.h.

Referenced by Compare(), Fill(), GetCurrent(), and Store().

UInt_t BfldDbiCoilState::iStatus [private]

Definition at line 54 of file BfldDbiCoilState.h.

Referenced by Compare(), Fill(), GetStatus(), IsOK(), and Store().

Int_t BfldDbiCoilState::iSupermod [private]

Definition at line 55 of file BfldDbiCoilState.h.

Referenced by Compare(), Fill(), GetAggregateNo(), GetIndex(), GetSupermodule(), and Store().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1