CalMIPCalibration Class Reference

#include <CalMIPCalibration.h>

Inheritance diagram for CalMIPCalibration:
DbiTableRow

List of all members.

Public Member Functions

 CalMIPCalibration ()
 CalMIPCalibration (Int_t sk, Int_t s, Float_t scale)
virtual ~CalMIPCalibration ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
UInt_t GetSEIDkey () const
UInt_t GetStripEndId () const
Float_t GetScale () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
Float_t GetMIP (const Float_t rawcharge) const

Private Member Functions

 CalMIPCalibration (const CalMIPCalibration &from)

Private Attributes

Int_t fSEIDkey
Int_t fStripEndId
Float_t fMIPScale

Detailed Description

Definition at line 14 of file CalMIPCalibration.h.


Constructor & Destructor Documentation

CalMIPCalibration::CalMIPCalibration (  )  [inline]

Definition at line 20 of file CalMIPCalibration.h.

References LEA_CTOR.

00020 { LEA_CTOR; }

CalMIPCalibration::CalMIPCalibration ( Int_t  sk,
Int_t  s,
Float_t  scale 
) [inline]

Definition at line 22 of file CalMIPCalibration.h.

References LEA_CTOR.

00022                                                         : 
00023     fSEIDkey(sk),fStripEndId(s) ,fMIPScale(scale) { LEA_CTOR; }

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

Definition at line 25 of file CalMIPCalibration.h.

References LEA_DTOR.

00025 { LEA_DTOR; };

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

Definition at line 46 of file CalMIPCalibration.h.

References LEA_CTOR.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 28 of file CalMIPCalibration.h.

00028 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 34 of file CalMIPCalibration.h.

00034                                                { 
00035      return new CalMIPCalibration; }

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

Implements DbiTableRow.

Definition at line 45 of file CalMIPCalibration.cxx.

References DbiRowStream::CurColName(), fMIPScale, fSEIDkey, 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() == "CALMIPCALIBRATION" ) {
00073       // Dumb method.
00074      rs  >> fSEIDkey   >> fStripEndId >> fMIPScale;
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 >> fMIPScale;
00086          else {
00087             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00088                                    << "(" << colName << ")"
00089                                    << "; not part of CalMIPCalibration" 
00090                                    << endl;
00091          rs.IncrementCurCol();
00092          }
00093       }
00094    }
00095    
00096    
00097 }

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

Reimplemented from DbiTableRow.

Definition at line 29 of file CalMIPCalibration.h.

References fSEIDkey.

00029 { return fSEIDkey; }

Float_t CalMIPCalibration::GetMIP ( const Float_t  rawcharge  )  const

Definition at line 134 of file CalMIPCalibration.cxx.

References fMIPScale, fStripEndId, Msg::kVerbose, and MSG.

Referenced by VtxModule::Reco(), and NueAnalysisCuts::SetNtpInfoObjects().

00134                                                                {
00135 //
00136 //
00137 //  Purpose: To apply sume dummy calibration to the linear charge  
00138 //
00139 //  Arguments: 
00140 //    xxxxxxxxx    in    yyyyyy
00141 //
00142 //  Return:    
00143 //
00144 //  Contact:   R.Nichol
00145 //
00146 //  Specification:-
00147 //  =============
00148 //
00149 //  o 
00150 
00151 //  Program Notes:-
00152 //  =============
00153 
00154 //  None.
00155 
00156   if(fMIPScale==0) return rawcharge;
00157 
00158   MSG("Calib",Msg::kVerbose) << "StripEndId " << fStripEndId 
00159                              << " raw charge " << rawcharge
00160     
00161                              << " MIPs " 
00162                              << rawcharge/fMIPScale << "\n";
00163    return rawcharge/fMIPScale;
00164 }

Float_t CalMIPCalibration::GetScale (  )  const [inline]
UInt_t CalMIPCalibration::GetSEIDkey (  )  const [inline]

Definition at line 30 of file CalMIPCalibration.h.

References fSEIDkey.

00030 { return fSEIDkey; }

UInt_t CalMIPCalibration::GetStripEndId (  )  const [inline]

Definition at line 31 of file CalMIPCalibration.h.

References fStripEndId.

00031 { return fStripEndId; }

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

Reimplemented from DbiTableRow.

Definition at line 101 of file CalMIPCalibration.cxx.

References fMIPScale, fSEIDkey, and fStripEndId.

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


Member Data Documentation

Float_t CalMIPCalibration::fMIPScale [private]

Definition at line 52 of file CalMIPCalibration.h.

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

Int_t CalMIPCalibration::fSEIDkey [private]

Definition at line 50 of file CalMIPCalibration.h.

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

Definition at line 51 of file CalMIPCalibration.h.

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