SpillTimeCalibration Class Reference

#include <SpillTimeCalibration.h>

Inheritance diagram for SpillTimeCalibration:
DbiTableRow

List of all members.

Public Types

enum  ESpillTimeTasks { kTask_Vtm = 1, kTask_TimeWatcher = 2, kTask_TimeGoblin = 3 }

Public Member Functions

 SpillTimeCalibration ()
 SpillTimeCalibration (Double_t offset, Double_t err, const std::string &descrip)
virtual ~SpillTimeCalibration ()
Bool_t CanL2Cache () const
Double_t GetOffset () const
Double_t GetError () const
const std::string & GetDescription () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Member Functions

 ClassDef (SpillTimeCalibration, 1)

Private Attributes

Double_t fOffset
Double_t fError
std::string fDescription

Detailed Description

Definition at line 10 of file SpillTimeCalibration.h.


Member Enumeration Documentation

Enumerator:
kTask_Vtm 
kTask_TimeWatcher 
kTask_TimeGoblin 

Definition at line 14 of file SpillTimeCalibration.h.

00014                       {
00015     kTask_Vtm = 1,
00016     kTask_TimeWatcher = 2,
00017     kTask_TimeGoblin = 3
00018   };


Constructor & Destructor Documentation

SpillTimeCalibration::SpillTimeCalibration (  )  [inline]

Definition at line 20 of file SpillTimeCalibration.h.

References LEA_CTOR.

00020 { LEA_CTOR; };

SpillTimeCalibration::SpillTimeCalibration ( Double_t  offset,
Double_t  err,
const std::string &  descrip 
) [inline]

Definition at line 22 of file SpillTimeCalibration.h.

References LEA_CTOR.

00023     : fOffset(offset), fError(err), fDescription(descrip)
00024     { LEA_CTOR; };

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

Definition at line 26 of file SpillTimeCalibration.h.

References LEA_DTOR.

00026 { LEA_DTOR; };


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 29 of file SpillTimeCalibration.h.

00029 { return kTRUE; }

SpillTimeCalibration::ClassDef ( SpillTimeCalibration  ,
 
) [private]
virtual DbiTableRow* SpillTimeCalibration::CreateTableRow (  )  const [inline, virtual]

Implements DbiTableRow.

Definition at line 36 of file SpillTimeCalibration.h.

00036 { return new SpillTimeCalibration; }

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

Implements DbiTableRow.

Definition at line 29 of file SpillTimeCalibration.cxx.

References DbiRowStream::CurColName(), fDescription, fError, fOffset, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00030                                                                 {
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 
00043 //  Program Notes:-
00044 //  =============
00045 
00046 //  This method demonstrates both the "dumb" fill method (just
00047 //  load the data as it comes) and the smart method (check column
00048 //  name and load according to column order). 
00049 
00050    if ( rs.TableName() == "SPILLTIMECALIBRATION" ) {
00051       // Dumb method.
00052      rs  >> fOffset >> fError >> fDescription;
00053    }
00054 
00055    else {
00056       
00057       // Smart method
00058       Int_t numCol = rs.NumCols();
00059       //  The first column (SeqNo) has already been processed.
00060       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00061          string colName = rs.CurColName();
00062               if( colName == "OFFSET" )      rs >> fOffset;
00063          else if( colName == "ERROR" )       rs >> fError;
00064          else if( colName == "DESCRIPTION" ) rs >> fDescription;
00065          else {
00066            MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00067                                   << "(" << colName << ")"
00068                                   << "; not part of SpillTimeCalibration" 
00069                                   << endl;
00070            rs.IncrementCurCol();
00071          }
00072       }
00073    }
00074    
00075    
00076 }

const std::string& SpillTimeCalibration::GetDescription (  )  const [inline]
Double_t SpillTimeCalibration::GetError (  )  const [inline]
Double_t SpillTimeCalibration::GetOffset (  )  const [inline]
void SpillTimeCalibration::Store ( DbiOutRowStream ors,
const DbiValidityRec vrec 
) const [virtual]

Reimplemented from DbiTableRow.

Definition at line 80 of file SpillTimeCalibration.cxx.

References fDescription, fError, and fOffset.

00081                                                                        {
00082   //
00083   //
00084   //  Purpose:  Stream object to output row stream
00085   //
00086   //  Arguments: 
00087   //    ors          in     Output row stream.
00088   //    vrec         in    Associated validity record (or 0 if filling
00089   
00090   ors << fOffset << fError << fDescription;
00091 }


Member Data Documentation

std::string SpillTimeCalibration::fDescription [private]

Definition at line 47 of file SpillTimeCalibration.h.

Referenced by Fill(), GetDescription(), and Store().

Double_t SpillTimeCalibration::fError [private]

Definition at line 46 of file SpillTimeCalibration.h.

Referenced by Fill(), GetError(), and Store().

Double_t SpillTimeCalibration::fOffset [private]

Definition at line 45 of file SpillTimeCalibration.h.

Referenced by Fill(), GetOffset(), and Store().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1