SimPmtM16Crosstalk Class Reference

#include <SimPmtM16Crosstalk.h>

Inheritance diagram for SimPmtM16Crosstalk:
DbiTableRow

List of all members.

Public Member Functions

 SimPmtM16Crosstalk ()
 SimPmtM16Crosstalk (UInt_t injpix, UInt_t injspot, UInt_t xpix, Float_t elec, Float_t elecerr, Float_t opt, Float_t opterr)
UInt_t GetIndex (UInt_t) const
UInt_t GetInjectedPixel () const
UInt_t GetInjectedSpot () const
UInt_t GetCrosstalkPixel () const
Float_t GetElecFrac () const
Float_t GetElecFracErr () const
Float_t GetOptFrac () const
Float_t GetOptFracErr () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Static Public Member Functions

static UInt_t MakeIndex (UInt_t injPixel, UInt_t injSpot, UInt_t xPix)

Private Member Functions

 ClassDef (SimPmtM16Crosstalk, 1)

Private Attributes

Int_t fInjPixel
Int_t fInjSpot
Int_t fXPixel
Float_t fElecFrac
Float_t fElecFracErr
Float_t fOptFrac
Float_t fOptFracErr

Detailed Description

Definition at line 13 of file SimPmtM16Crosstalk.h.


Constructor & Destructor Documentation

SimPmtM16Crosstalk::SimPmtM16Crosstalk (  )  [inline]

Definition at line 16 of file SimPmtM16Crosstalk.h.

00016 {};

SimPmtM16Crosstalk::SimPmtM16Crosstalk ( UInt_t  injpix,
UInt_t  injspot,
UInt_t  xpix,
Float_t  elec,
Float_t  elecerr,
Float_t  opt,
Float_t  opterr 
) [inline]

Definition at line 17 of file SimPmtM16Crosstalk.h.

00019                                                   :
00020     fInjPixel(injpix), fInjSpot(injspot),fXPixel(xpix),
00021     fElecFrac(elec),fElecFracErr(elecerr),
00022     fOptFrac(opt),fOptFracErr(opterr) {};
  


Member Function Documentation

SimPmtM16Crosstalk::ClassDef ( SimPmtM16Crosstalk  ,
 
) [private]
virtual DbiTableRow* SimPmtM16Crosstalk::CreateTableRow (  )  const [inline, virtual]

Implements DbiTableRow.

Definition at line 39 of file SimPmtM16Crosstalk.h.

00040     { return new SimPmtM16Crosstalk; };

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

Implements DbiTableRow.

Definition at line 35 of file SimPmtM16Crosstalk.cxx.

References DbiRowStream::CurColName(), fElecFrac, fElecFracErr, fInjPixel, fInjSpot, fOptFrac, fOptFracErr, fXPixel, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00036                                                         {
00037 
00038 //
00039 //
00040 //  Purpose:  Fill object from Result Set
00041 //
00042 //  Arguments:
00043 //    rs           in    Result Set used to fill object
00044 //    vrec         in    Associated validity record (or 0 if filling
00045 //                                                    DbiValidityRec)
00046 //  Return:
00047 //
00048 //  Contact:   N. West
00049 //
00050 //  Specification:-
00051 //  =============
00052 //
00053 //  o Fill object from current row of Result Set.
00054 
00055 //  Program Notes:-
00056 //  =============
00057 
00058 //  This method demonstrates both the "dumb" fill method (just
00059 //  load the data as it comes) and the smart method (check column
00060 //  name and load according to column order).
00061 
00062   if ( rs.TableName() == "SIMPMTM16CROSSTALK" ) {
00063       // Dumb method.
00064     rs >> fInjPixel >>fInjSpot>> fXPixel >> fElecFrac >> fElecFracErr
00065        >> fOptFrac >> fOptFracErr;
00066    }
00067    else {
00068       // Smart method
00069       Int_t numCol = rs.NumCols();
00070       //  The first column (SeqNo) has already been processed.
00071       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00072          string colName = rs.CurColName();
00073          if (      colName == "INJPIXEL" )    rs >> fInjPixel;
00074          else if ( colName == "INJSPOT" )      rs >> fInjSpot;
00075          else if ( colName == "XPIXEL" )      rs >> fXPixel;
00076          else if ( colName == "ELECFRAC" )    rs >> fElecFrac;
00077          else if ( colName == "ELECFRACERR" ) rs >> fElecFracErr;
00078          else if ( colName == "OPTFRAC" )     rs >> fOptFrac;
00079          else if ( colName == "OPTFRACERR" )  rs >> fOptFracErr;
00080          else {
00081            MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol
00082                                   << "(" << colName << ")"
00083                                   << "; not part of CalADCtoPE"
00084                                   << endl;
00085            rs.IncrementCurCol();
00086          }
00087       }
00088    }
00089 }

UInt_t SimPmtM16Crosstalk::GetCrosstalkPixel (  )  const [inline]

Definition at line 32 of file SimPmtM16Crosstalk.h.

References fXPixel.

00032 { return fXPixel; };

Float_t SimPmtM16Crosstalk::GetElecFrac (  )  const [inline]

Definition at line 33 of file SimPmtM16Crosstalk.h.

References fElecFrac.

Referenced by SimPmtUTM16::RetrieveElectricXtalkFraction().

00033 { return fElecFrac; };

Float_t SimPmtM16Crosstalk::GetElecFracErr (  )  const [inline]

Definition at line 34 of file SimPmtM16Crosstalk.h.

References fElecFracErr.

00034 { return fElecFracErr; };

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

Reimplemented from DbiTableRow.

Definition at line 25 of file SimPmtM16Crosstalk.h.

References fInjPixel, fInjSpot, fXPixel, and MakeIndex().

00026     { return MakeIndex(fInjPixel, fInjSpot, fXPixel); }

UInt_t SimPmtM16Crosstalk::GetInjectedPixel (  )  const [inline]

Definition at line 30 of file SimPmtM16Crosstalk.h.

References fInjPixel.

00030 { return fInjPixel; };

UInt_t SimPmtM16Crosstalk::GetInjectedSpot (  )  const [inline]

Definition at line 31 of file SimPmtM16Crosstalk.h.

References fInjSpot.

00031 { return fInjSpot; };

Float_t SimPmtM16Crosstalk::GetOptFrac (  )  const [inline]

Definition at line 35 of file SimPmtM16Crosstalk.h.

References fOptFrac.

Referenced by SimPmtUTM16::RetrieveOpticalXtalkFraction().

00035 { return fOptFrac; };

Float_t SimPmtM16Crosstalk::GetOptFracErr (  )  const [inline]

Definition at line 36 of file SimPmtM16Crosstalk.h.

References fOptFracErr.

00036 { return fOptFracErr; };

UInt_t SimPmtM16Crosstalk::MakeIndex ( UInt_t  injPixel,
UInt_t  injSpot,
UInt_t  xPix 
) [static]

Definition at line 24 of file SimPmtM16Crosstalk.cxx.

Referenced by GetIndex(), and SimPmtM16CrosstalkTable::GetRow().

00025 {
00026   return (ip-1)*8*16+(is-1)*16+(xp-1);
00027 }

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

Reimplemented from DbiTableRow.

Definition at line 93 of file SimPmtM16Crosstalk.cxx.

References fElecFrac, fElecFracErr, fInjPixel, fInjSpot, fOptFrac, fOptFracErr, and fXPixel.

00094                                                                {
00095    //
00096 //
00097 //  Purpose:  Stream object to output row stream
00098 //
00099 //  Arguments:
00100 //    ors          in     Output row stream.
00101 //    vrec         in    Associated validity record (or 0 if filling
00102 //                                                    DbiValidityRec)
00103 //
00104 //  Return:
00105 //
00106 //  Contact:   N. West
00107 //
00108 //  Specification:-
00109 //  =============
00110 //
00111 //  o  Stream object to output row stream.
00112 
00113 //  Program Notes:-
00114 //  =============
00115 
00116 //  None.
00117 
00118   ors  << fInjPixel <<fInjSpot<< fXPixel << fElecFrac << fElecFracErr
00119        << fOptFrac << fOptFracErr;
00120 
00121 }


Member Data Documentation

Float_t SimPmtM16Crosstalk::fElecFrac [private]

Definition at line 51 of file SimPmtM16Crosstalk.h.

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

Definition at line 52 of file SimPmtM16Crosstalk.h.

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

Definition at line 48 of file SimPmtM16Crosstalk.h.

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

Definition at line 49 of file SimPmtM16Crosstalk.h.

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

Float_t SimPmtM16Crosstalk::fOptFrac [private]

Definition at line 53 of file SimPmtM16Crosstalk.h.

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

Definition at line 54 of file SimPmtM16Crosstalk.h.

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

Int_t SimPmtM16Crosstalk::fXPixel [private]

Definition at line 50 of file SimPmtM16Crosstalk.h.

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


The documentation for this class was generated from the following files:

Generated on 19 Oct 2017 for loon by  doxygen 1.6.1