CalADCtoPE Class Reference

#include <CalADCtoPE.h>

Inheritance diagram for CalADCtoPE:
DbiTableRow

List of all members.

Public Member Functions

 CalADCtoPE ()
 CalADCtoPE (UInt_t sk, UInt_t s, Float_t g, Float_t gerr, Float_t spew)
virtual ~CalADCtoPE ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
UInt_t GetStripEndId () const
UInt_t GetSEIDkey () const
Float_t GetGain () const
Float_t GetGainErr () const
Float_t GetSPEWidth () const
Float_t GetPE (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

 CalADCtoPE (const CalADCtoPE &from)

Private Attributes

Int_t fSEIDkey
Int_t fStripEndId
Float_t fGain
Float_t fGainErr
Float_t fSPEWidth

Detailed Description

Definition at line 11 of file CalADCtoPE.h.


Constructor & Destructor Documentation

CalADCtoPE::CalADCtoPE (  )  [inline]

Definition at line 17 of file CalADCtoPE.h.

References LEA_CTOR.

00017 { LEA_CTOR; }

CalADCtoPE::CalADCtoPE ( UInt_t  sk,
UInt_t  s,
Float_t  g,
Float_t  gerr,
Float_t  spew 
) [inline]

Definition at line 18 of file CalADCtoPE.h.

References LEA_CTOR.

00018                                                                           :
00019       fSEIDkey(sk),fStripEndId(s),fGain(g),fGainErr(gerr),fSPEWidth(spew) { LEA_CTOR; }
   virtual ~CalADCtoPE(){ LEA_DTOR; };

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

Definition at line 20 of file CalADCtoPE.h.

References LEA_DTOR.

00020 { LEA_DTOR; };

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

Definition at line 43 of file CalADCtoPE.h.

References LEA_CTOR.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 23 of file CalADCtoPE.h.

00023 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 31 of file CalADCtoPE.h.

00031                                                { 
00032       return new CalADCtoPE; }

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

Implements DbiTableRow.

Definition at line 46 of file CalADCtoPE.cxx.

References DbiRowStream::CurColName(), fGain, fGainErr, fSEIDkey, fSPEWidth, fStripEndId, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

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

Float_t CalADCtoPE::GetGain (  )  const [inline]
Float_t CalADCtoPE::GetGainErr (  )  const [inline]

Definition at line 28 of file CalADCtoPE.h.

References fGainErr.

Referenced by PEGainCalScheme::DecalGainAndWidth(), PEGainCalScheme::GetPhotoElectrons(), and LIPlexMaps::ReadDbGains().

00028 { return fGainErr; }

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

Reimplemented from DbiTableRow.

Definition at line 24 of file CalADCtoPE.h.

References fSEIDkey.

00024 { return fSEIDkey; }

Float_t CalADCtoPE::GetPE ( const Float_t  rawcharge  )  const

Definition at line 136 of file CalADCtoPE.cxx.

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

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

UInt_t CalADCtoPE::GetSEIDkey (  )  const [inline]

Definition at line 26 of file CalADCtoPE.h.

References fSEIDkey.

Referenced by LIPlexMaps::ReadDbGains().

00026 { return fSEIDkey; }

Float_t CalADCtoPE::GetSPEWidth (  )  const [inline]

Definition at line 29 of file CalADCtoPE.h.

References fSPEWidth.

Referenced by PEGainCalScheme::DecalGainAndWidth(), PEGainCalScheme::GuessGainAndWidth(), and LIPlexMaps::ReadDbGains().

00029 { return fSPEWidth;}

UInt_t CalADCtoPE::GetStripEndId (  )  const [inline]

Definition at line 25 of file CalADCtoPE.h.

References fStripEndId.

Referenced by LIPlexMaps::ReadDbGains().

00025 { return fStripEndId; }

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

Reimplemented from DbiTableRow.

Definition at line 104 of file CalADCtoPE.cxx.

References fGain, fGainErr, fSEIDkey, fSPEWidth, and fStripEndId.

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


Member Data Documentation

Float_t CalADCtoPE::fGain [private]

Definition at line 50 of file CalADCtoPE.h.

Referenced by Fill(), GetGain(), GetPE(), and Store().

Float_t CalADCtoPE::fGainErr [private]

Definition at line 51 of file CalADCtoPE.h.

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

Int_t CalADCtoPE::fSEIDkey [private]

Definition at line 48 of file CalADCtoPE.h.

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

Float_t CalADCtoPE::fSPEWidth [private]

Definition at line 52 of file CalADCtoPE.h.

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

Int_t CalADCtoPE::fStripEndId [private]

Definition at line 49 of file CalADCtoPE.h.

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