CalTempCalibration Class Reference

#include <CalTempCalibration.h>

Inheritance diagram for CalTempCalibration:
DbiTableRow

List of all members.

Public Member Functions

 CalTempCalibration ()
 CalTempCalibration (Float_t temp, Float_t temp_err)
virtual ~CalTempCalibration ()
Bool_t CanL2Cache () const
Float_t GetTemp () const
Float_t GetTempErr () const
Float_t GetCorrection () const
Float_t GetCorrected (const Float_t rawcharge) const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Member Functions

 CalTempCalibration (const CalTempCalibration &from)

Private Attributes

Float_t fTemp
Float_t fTempErr

Detailed Description

Definition at line 11 of file CalTempCalibration.h.


Constructor & Destructor Documentation

CalTempCalibration::CalTempCalibration (  )  [inline]

Definition at line 17 of file CalTempCalibration.h.

References LEA_CTOR.

00017 { LEA_CTOR; }

CalTempCalibration::CalTempCalibration ( Float_t  temp,
Float_t  temp_err 
) [inline]

Definition at line 18 of file CalTempCalibration.h.

References LEA_CTOR.

00018                                                       :
00019       fTemp(temp),fTempErr(temp_err) { LEA_CTOR; }
   virtual ~CalTempCalibration(){ LEA_DTOR; };

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

Definition at line 20 of file CalTempCalibration.h.

References LEA_DTOR.

00020 { LEA_DTOR; };

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

Definition at line 40 of file CalTempCalibration.h.

References LEA_CTOR.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 23 of file CalTempCalibration.h.

00023 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 28 of file CalTempCalibration.h.

00028                                                { 
00029       return new CalTempCalibration; }

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

Implements DbiTableRow.

Definition at line 48 of file CalTempCalibration.cxx.

References DbiRowStream::CurColName(), fTemp, fTempErr, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

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

Float_t CalTempCalibration::GetCorrected ( const Float_t  rawcharge  )  const

Definition at line 141 of file CalTempCalibration.cxx.

References fTemp, GetCorrection(), Msg::kVerbose, and MSG.

00141                                                                       {
00142 //
00143 //
00144 //  Purpose: To apply temperature calibration to charge,NPEs,MIPs,etc
00145 //
00146 //  Arguments: 
00147 //    xxxxxxxxx    in    yyyyyy
00148 //
00149 //  Return:    
00150 //
00151 //  Contact:   R.Nichol
00152 //
00153 //  Specification:-
00154 //  =============
00155 //
00156 //  o 
00157 
00158 //  Program Notes:-
00159 //  =============
00160 
00161 //  None.
00162   Float_t cor = GetCorrection();
00163 
00164    MSG("Calib",Msg::kVerbose) << " Input " << rawcharge
00165                               << " Temp " << fTemp
00166                               << " Corrected " 
00167                               << cor*rawcharge << "\n";
00168    return (cor*rawcharge);
00169 }

Float_t CalTempCalibration::GetCorrection (  )  const

Definition at line 134 of file CalTempCalibration.cxx.

References fTemp, REFTEMP, TCONVERT_ICEPT, and TCONVERT_M.

Referenced by GetCorrected().

00134                                                 {
00135 
00136   return (REFTEMP*TCONVERT_M + TCONVERT_ICEPT)
00137     /(fTemp*TCONVERT_M + TCONVERT_ICEPT);
00138 
00139 }

Float_t CalTempCalibration::GetTemp (  )  const [inline]

Definition at line 24 of file CalTempCalibration.h.

References fTemp.

Referenced by TemperatureCalScheme::GetTemperature(), and UberModule::Reco().

00024 { return fTemp; }

Float_t CalTempCalibration::GetTempErr (  )  const [inline]

Definition at line 25 of file CalTempCalibration.h.

References fTempErr.

00025 { return fTempErr; }

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

Reimplemented from DbiTableRow.

Definition at line 103 of file CalTempCalibration.cxx.

References fTemp, and fTempErr.

00104                                                                {
00105    //
00106 //
00107 //  Purpose:  Stream object to output row stream
00108 //
00109 //  Arguments: 
00110 //    ors          in     Output row stream.
00111 //    vrec         in    Associated validity record (or 0 if filling
00112 //                                                    DbiValidityRec)
00113 //
00114 //  Return:    
00115 //
00116 //  Contact:   N. West
00117 //
00118 //  Specification:-
00119 //  =============
00120 //
00121 //  o  Stream object to output row stream.
00122 
00123 //  Program Notes:-
00124 //  =============
00125 
00126 //  None.
00127 
00128   ors  << fTemp << fTempErr;
00129     
00130 }


Member Data Documentation

Float_t CalTempCalibration::fTemp [private]

Definition at line 45 of file CalTempCalibration.h.

Referenced by Fill(), GetCorrected(), GetCorrection(), GetTemp(), and Store().

Float_t CalTempCalibration::fTempErr [private]

Definition at line 46 of file CalTempCalibration.h.

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