CalADCtoPEs Class Reference

#include <CalADCtoPEs.h>

Inheritance diagram for CalADCtoPEs:
DbiTableRow

List of all members.

Public Member Functions

 CalADCtoPEs ()
 CalADCtoPEs (Int_t agg, UInt_t sk, Float_t g, Float_t gerr, Float_t spew, Float_t spewerr)
virtual ~CalADCtoPEs ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
UInt_t GetSEIDkey () const
Float_t GetGain () const
Float_t GetGainErr () const
Float_t GetSPEWidth () const
Float_t GetSPEWidthErr () const
Float_t GetPE (const Float_t rawcharge) const
virtual Int_t GetAggregateNo () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Member Functions

 CalADCtoPEs (const CalADCtoPEs &from)

Private Attributes

Int_t fAggregate
Int_t fSEIDkey
Float_t fGain
Float_t fGainErr
Float_t fSPEWidth
Float_t fSPEWidthErr

Detailed Description

Definition at line 19 of file CalADCtoPEs.h.


Constructor & Destructor Documentation

CalADCtoPEs::CalADCtoPEs (  )  [inline]

Definition at line 25 of file CalADCtoPEs.h.

References LEA_CTOR.

00025 { LEA_CTOR; }

CalADCtoPEs::CalADCtoPEs ( Int_t  agg,
UInt_t  sk,
Float_t  g,
Float_t  gerr,
Float_t  spew,
Float_t  spewerr 
) [inline]

Definition at line 26 of file CalADCtoPEs.h.

References LEA_CTOR.

00026                                                                                              :
00027      fAggregate(agg),fSEIDkey(sk),fGain(g),fGainErr(gerr),fSPEWidth(spew),fSPEWidthErr(spewerr) { LEA_CTOR; }
   virtual ~CalADCtoPEs(){ LEA_DTOR; };

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

Definition at line 28 of file CalADCtoPEs.h.

References LEA_DTOR.

00028 { LEA_DTOR; };

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

Definition at line 52 of file CalADCtoPEs.h.

References LEA_CTOR.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 31 of file CalADCtoPEs.h.

00031 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 40 of file CalADCtoPEs.h.

00040                                                { 
00041       return new CalADCtoPEs; }

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

Implements DbiTableRow.

Definition at line 46 of file CalADCtoPEs.cxx.

References DbiRowStream::CurColName(), fAggregate, fGain, fGainErr, fSEIDkey, fSPEWidth, fSPEWidthErr, 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() == "CALADCTOPES" ) {
00074       // Dumb method.
00075      rs >> fAggregate >> fSEIDkey >> fGain >> fGainErr >> fSPEWidth >> fSPEWidthErr;
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 == "AGGREGATENO" ) rs >> fAggregate;
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 if ( colName == "WIDTH1PEERR" ) rs >> fSPEWidthErr;
00090          else {
00091             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00092                                    << "(" << colName << ")"
00093                                    << "; not part of CalADCtoPEs" 
00094                                    << endl;
00095          rs.IncrementCurCol();
00096          }
00097       }
00098    }
00099    
00100    
00101 }

virtual Int_t CalADCtoPEs::GetAggregateNo (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 39 of file CalADCtoPEs.h.

References fAggregate.

Referenced by LIPlexMaps::DumpGains().

00039 { return fAggregate; }

Float_t CalADCtoPEs::GetGain (  )  const [inline]
Float_t CalADCtoPEs::GetGainErr (  )  const [inline]
UInt_t CalADCtoPEs::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 32 of file CalADCtoPEs.h.

References fSEIDkey.

00032 { return fSEIDkey; }

Float_t CalADCtoPEs::GetPE ( const Float_t  rawcharge  )  const

Definition at line 137 of file CalADCtoPEs.cxx.

References fGain, Msg::kVerbose, and MSG.

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

UInt_t CalADCtoPEs::GetSEIDkey (  )  const [inline]

Definition at line 33 of file CalADCtoPEs.h.

References fSEIDkey.

Referenced by LIPlexMaps::DumpGains(), LIPlexMaps::GetGainMap(), and LIPlexMaps::ReadDbGains().

00033 { return fSEIDkey; }

Float_t CalADCtoPEs::GetSPEWidth (  )  const [inline]
Float_t CalADCtoPEs::GetSPEWidthErr (  )  const [inline]

Definition at line 37 of file CalADCtoPEs.h.

References fSPEWidthErr.

Referenced by LIPlexMaps::ReadDbGains().

00037 { return fSPEWidthErr;}

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

Reimplemented from DbiTableRow.

Definition at line 105 of file CalADCtoPEs.cxx.

References fAggregate, fGain, fGainErr, fSEIDkey, fSPEWidth, and fSPEWidthErr.

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


Member Data Documentation

Int_t CalADCtoPEs::fAggregate [private]

Definition at line 57 of file CalADCtoPEs.h.

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

Float_t CalADCtoPEs::fGain [private]

Definition at line 59 of file CalADCtoPEs.h.

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

Float_t CalADCtoPEs::fGainErr [private]

Definition at line 60 of file CalADCtoPEs.h.

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

Int_t CalADCtoPEs::fSEIDkey [private]

Definition at line 58 of file CalADCtoPEs.h.

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

Float_t CalADCtoPEs::fSPEWidth [private]

Definition at line 61 of file CalADCtoPEs.h.

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

Float_t CalADCtoPEs::fSPEWidthErr [private]

Definition at line 62 of file CalADCtoPEs.h.

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