CalTimeCalibration Class Reference

#include <CalTimeCalibration.h>

Inheritance diagram for CalTimeCalibration:
DbiTableRow

List of all members.

Public Member Functions

 CalTimeCalibration ()
 CalTimeCalibration (UInt_t sk, UInt_t s, Float_t sc, Float_t off, Float_t c1, Float_t c2, Float_t c3, Float_t c4)
virtual ~CalTimeCalibration ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
UInt_t GetSEIDkey () const
UInt_t GetStripEndId () const
Float_t GetScale () const
Float_t GetOffset () const
Float_t GetSlewC1 () const
Float_t GetSlewC2 () const
Float_t GetSlewC3 () const
Float_t GetSlewC4 () const
Double_t GetTime (const Double_t rawtime) const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Member Functions

 CalTimeCalibration (const CalTimeCalibration &from)

Private Attributes

Int_t fSEIDkey
Int_t fStripEndId
Float_t fScale
Float_t fOffset
Float_t fSlewC1
Float_t fSlewC2
Float_t fSlewC3
Float_t fSlewC4

Detailed Description

Definition at line 12 of file CalTimeCalibration.h.


Constructor & Destructor Documentation

CalTimeCalibration::CalTimeCalibration (  )  [inline]

Definition at line 18 of file CalTimeCalibration.h.

References LEA_CTOR.

00018                         : 
00019      fSEIDkey(0), fStripEndId(0), fScale(1.), fOffset(0.),
00020      fSlewC1(0.), fSlewC2(0.), fSlewC3(0.), fSlewC4(0.) { LEA_CTOR; }

CalTimeCalibration::CalTimeCalibration ( UInt_t  sk,
UInt_t  s,
Float_t  sc,
Float_t  off,
Float_t  c1,
Float_t  c2,
Float_t  c3,
Float_t  c4 
) [inline]

Definition at line 21 of file CalTimeCalibration.h.

References LEA_CTOR.

00022                                          :
00023       fSEIDkey(sk), fStripEndId(s),fScale(sc),fOffset(off),fSlewC1(c1),fSlewC2(c2),fSlewC3(c3),fSlewC4(c4) { LEA_CTOR; }
   virtual ~CalTimeCalibration(){ LEA_DTOR; };

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

Definition at line 24 of file CalTimeCalibration.h.

References LEA_DTOR.

00024 { LEA_DTOR; };

CalTimeCalibration::CalTimeCalibration ( const CalTimeCalibration from  )  [inline, private]

Definition at line 51 of file CalTimeCalibration.h.

References LEA_CTOR.

00052      : DbiTableRow(from) { LEA_CTOR; *this = from; }


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 27 of file CalTimeCalibration.h.

00027 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 39 of file CalTimeCalibration.h.

00039                                                { 
00040       return new CalTimeCalibration; }

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

Implements DbiTableRow.

Definition at line 45 of file CalTimeCalibration.cxx.

References DbiRowStream::CurColName(), fOffset, fScale, fSEIDkey, fSlewC1, fSlewC2, fSlewC3, fSlewC4, fStripEndId, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00046                                                                 {
00047 
00048 //
00049 //
00050 //  Purpose:  Fill object from Result Set
00051 //
00052 //  Arguments: 
00053 //    rs           in    Result Set used to fill object
00054 //    vrec         in    Associated validity record (or 0 if filling
00055 //                                                    DbiValidityRec)
00056 //  Return:    
00057 //
00058 //  Contact:   N. West
00059 //
00060 //  Specification:-
00061 //  =============
00062 //
00063 //  o Fill object from current row of Result Set.
00064 
00065 //  Program Notes:-
00066 //  =============
00067 
00068 //  This method demonstrates both the "dumb" fill method (just
00069 //  load the data as it comes) and the smart method (check column
00070 //  name and load according to column order). 
00071 
00072    if ( rs.TableName() == "CALTIMECALIBRATION" ) {
00073       // Dumb method.
00074      rs >> fSEIDkey >> fStripEndId >> fScale >> fOffset >> fSlewC1 >> fSlewC2 >> fSlewC3 >> fSlewC4;
00075    }
00076    else {
00077       
00078       // Smart method
00079       Int_t numCol = rs.NumCols();
00080       //  The first column (SeqNo) has already been processed.
00081       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00082          string colName = rs.CurColName();
00083          if (      colName == "STRIPENDID" ) rs >> fStripEndId;
00084          else if ( colName == "SEIDKEY" )       rs >> fSEIDkey;
00085          else if ( colName == "SCALE" )       rs >> fScale;
00086          else if ( colName == "OFFSET" )    rs >> fOffset;
00087          else if ( colName == "SLEWCONST1" )    rs >> fSlewC1;
00088          else if ( colName == "SLEWCONST2" )    rs >> fSlewC2;
00089          else if ( colName == "SLEWCONST3" )    rs >> fSlewC3;
00090          else if ( colName == "SLEWCONST4" )    rs >> fSlewC4;
00091 
00092          else {
00093             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00094                                    << "(" << colName << ")"
00095                                    << "; not part of CalTimeCalibration" 
00096                                    << endl;
00097          rs.IncrementCurCol();
00098          }
00099       }
00100    }
00101    
00102    
00103 }

UInt_t CalTimeCalibration::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 28 of file CalTimeCalibration.h.

References fSEIDkey.

00028 { return fSEIDkey; }

Float_t CalTimeCalibration::GetOffset (  )  const [inline]
Float_t CalTimeCalibration::GetScale (  )  const [inline]
UInt_t CalTimeCalibration::GetSEIDkey (  )  const [inline]

Definition at line 29 of file CalTimeCalibration.h.

References fSEIDkey.

Referenced by PrintTimeCal().

00029 { return fSEIDkey; }

Float_t CalTimeCalibration::GetSlewC1 (  )  const [inline]

Definition at line 33 of file CalTimeCalibration.h.

References fSlewC1.

Referenced by PulserTimeCalScheme::CalibrateShield(), and PrintTimeCal().

00033 { return fSlewC1; }

Float_t CalTimeCalibration::GetSlewC2 (  )  const [inline]

Definition at line 34 of file CalTimeCalibration.h.

References fSlewC2.

Referenced by PulserTimeCalScheme::CalibrateShield(), and PrintTimeCal().

00034 { return fSlewC2; }

Float_t CalTimeCalibration::GetSlewC3 (  )  const [inline]

Definition at line 35 of file CalTimeCalibration.h.

References fSlewC3.

Referenced by PulserTimeCalScheme::CalibrateShield(), and PrintTimeCal().

00035 { return fSlewC3; }

Float_t CalTimeCalibration::GetSlewC4 (  )  const [inline]

Definition at line 36 of file CalTimeCalibration.h.

References fSlewC4.

Referenced by PulserTimeCalScheme::CalibrateShield(), and PrintTimeCal().

00036 { return fSlewC4; }

UInt_t CalTimeCalibration::GetStripEndId (  )  const [inline]

Definition at line 30 of file CalTimeCalibration.h.

References fStripEndId.

Referenced by PrintTimeCal().

00030 { return fStripEndId; }

Double_t CalTimeCalibration::GetTime ( const Double_t  rawtime  )  const

Definition at line 139 of file CalTimeCalibration.cxx.

References fOffset, fScale, fStripEndId, Msg::kVerbose, and MSG.

Referenced by TimeCalScheme::GetCalibratedTime().

00139                                                                  {
00140 //
00141 //
00142 //  Purpose: To apply sume dummy calibration to the linear charge  
00143 //
00144 //  Arguments: 
00145 //    xxxxxxxxx    in    yyyyyy
00146 //
00147 //  Return:    
00148 //
00149 //  Contact:   R.Nichol
00150 //
00151 //  Specification:-
00152 //  =============
00153 //
00154 //  o 
00155 
00156 //  Program Notes:-
00157 //  =============
00158 
00159 //  None.
00160    MSG("Calib",Msg::kVerbose) << "StripEndId " << fStripEndId 
00161                               << " raw time " << rawtime
00162                               << " Scale " << fScale
00163                               << " Offse t" << fOffset
00164                               << " Time " 
00165                               << rawtime/fScale - fOffset << "\n";
00166    return (rawtime/(Double_t)fScale - (Double_t)fOffset);
00167 }

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

Reimplemented from DbiTableRow.

Definition at line 107 of file CalTimeCalibration.cxx.

References fOffset, fScale, fSEIDkey, fSlewC1, fSlewC2, fSlewC3, fSlewC4, and fStripEndId.

00108                                                                        {
00109    //
00110 //
00111 //  Purpose:  Stream object to output row stream
00112 //
00113 //  Arguments: 
00114 //    ors          in     Output row stream.
00115 //    vrec         in    Associated validity record (or 0 if filling
00116 //                                                    DbiValidityRec)
00117 //
00118 //  Return:    
00119 //
00120 //  Contact:   N. West
00121 //
00122 //  Specification:-
00123 //  =============
00124 //
00125 //  o  Stream object to output row stream.
00126 
00127 //  Program Notes:-
00128 //  =============
00129 
00130 //  None.
00131 
00132   ors << fSEIDkey  << fStripEndId << fScale << fOffset <<fSlewC1 <<fSlewC2 <<fSlewC3 <<fSlewC4 ;
00133     
00134 }


Member Data Documentation

Float_t CalTimeCalibration::fOffset [private]

Definition at line 59 of file CalTimeCalibration.h.

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

Float_t CalTimeCalibration::fScale [private]

Definition at line 58 of file CalTimeCalibration.h.

Referenced by Fill(), GetScale(), GetTime(), and Store().

Definition at line 56 of file CalTimeCalibration.h.

Referenced by Fill(), GetIndex(), GetSEIDkey(), and Store().

Float_t CalTimeCalibration::fSlewC1 [private]

Definition at line 60 of file CalTimeCalibration.h.

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

Float_t CalTimeCalibration::fSlewC2 [private]

Definition at line 61 of file CalTimeCalibration.h.

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

Float_t CalTimeCalibration::fSlewC3 [private]

Definition at line 62 of file CalTimeCalibration.h.

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

Float_t CalTimeCalibration::fSlewC4 [private]

Definition at line 63 of file CalTimeCalibration.h.

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

Definition at line 57 of file CalTimeCalibration.h.

Referenced by Fill(), GetStripEndId(), GetTime(), 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