CalPmtDrift Class Reference

#include <CalPmtDrift.h>

Inheritance diagram for CalPmtDrift:
DbiTableRow

List of all members.

Public Types

enum  ECalPmtDriftTask { kPhotonStat = 1, kPinDrift = 2, kPhotonStatFarEnd = 3 }

Public Member Functions

 CalPmtDrift ()
 CalPmtDrift (PlexPixelSpotId psid, RawChannelId rcid, Float_t drift, Float_t statError, Float_t sysError, Float_t spotsUsed, Float_t spotsAvailable, Float_t crudeDrift, Float_t minDrift, Float_t maxDrift)
virtual ~CalPmtDrift ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
PlexPixelSpotId GetPmtId () const
RawChannelId GetChannel () const
Int_t GetCrate () const
Int_t GetAggregateNo () const
Float_t GetDrift () const
Float_t GetError () const
Float_t GetStatError () const
Float_t GetSysError () const
Float_t GetSpotsUsed () const
Float_t GetSpotsAvailable () const
Float_t GetCrudeDrift () const
Float_t GetMinDrift () const
Float_t GetMaxDrift () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Member Functions

 CalPmtDrift (const CalPmtDrift &from)

Private Attributes

UInt_t fPmtId
UInt_t fChannelId
Float_t fDrift
Float_t fStatError
Float_t fSysError
Float_t fSpotsUsed
Float_t fSpotsAvailable
Float_t fCrudeDrift
Float_t fMinDrift
Float_t fMaxDrift

Detailed Description

Definition at line 24 of file CalPmtDrift.h.


Member Enumeration Documentation

Enumerator:
kPhotonStat 
kPinDrift 
kPhotonStatFarEnd 

Definition at line 27 of file CalPmtDrift.h.

00027                         {
00028     kPhotonStat = 1,  // Task 1: Data uses mean/rms2 to get PMT gains
00029     kPinDrift = 2,    // Task 2: Data is from ADC/PIN
00030     kPhotonStatFarEnd = 3 // Task 3: as 1, but uses far end of flashed strip
00031   };


Constructor & Destructor Documentation

CalPmtDrift::CalPmtDrift (  )  [inline]

Definition at line 35 of file CalPmtDrift.h.

References LEA_CTOR.

00035 { LEA_CTOR; }

CalPmtDrift::CalPmtDrift ( PlexPixelSpotId  psid,
RawChannelId  rcid,
Float_t  drift,
Float_t  statError,
Float_t  sysError,
Float_t  spotsUsed,
Float_t  spotsAvailable,
Float_t  crudeDrift,
Float_t  minDrift,
Float_t  maxDrift 
)

Definition at line 35 of file CalPmtDrift.cxx.

References RawChannelId::ClearModeBits(), fChannelId, and RawChannelId::GetEncoded().

00040   : fPmtId( psid.GetUniquePmtEncodedValue()),
00041     fChannelId( 0 ),
00042     fDrift(drift),
00043     fStatError(statError),
00044     fSysError(sysError),
00045     fSpotsUsed(spotsUsed),
00046     fSpotsAvailable(spotsAvailable),
00047     fCrudeDrift(crudeDrift),
00048     fMinDrift(minDrift),
00049     fMaxDrift(maxDrift)
00050 {
00051   rcid.ClearModeBits();
00052   fChannelId = rcid.GetEncoded();
00053 }

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

Definition at line 42 of file CalPmtDrift.h.

References LEA_DTOR.

00042 { LEA_DTOR; };

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

Definition at line 71 of file CalPmtDrift.h.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 45 of file CalPmtDrift.h.

00045 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 61 of file CalPmtDrift.h.

00061 { return new CalPmtDrift; }

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

Implements DbiTableRow.

Definition at line 57 of file CalPmtDrift.cxx.

References DbiRowStream::CurColName(), fChannelId, fCrudeDrift, fDrift, fMaxDrift, fMinDrift, fPmtId, fSpotsAvailable, fSpotsUsed, fStatError, fSysError, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00058                                                                 {
00059 
00060 //
00061 //
00062 //  Purpose:  Fill object from Result Set
00063 //
00064 //  Arguments: 
00065 //    rs           in    Result Set used to fill object
00066 //    vrec         in    Associated validity record (or 0 if filling
00067 //                                                    DbiValidityRec)
00068 //
00069 //  o Fill object from current row of Result Set.
00070 
00071 //  Program Notes:-
00072 //  =============
00073 
00074 //  This method demonstrates both the "dumb" fill method (just
00075 //  load the data as it comes) and the smart method (check column
00076 //  name and load according to column order). 
00077 
00078    if ( rs.TableName() == "CALPMTDRIFT" ) {
00079       // Dumb method.
00080      rs  >> fPmtId >> fChannelId >> fDrift >> fStatError >> fSysError >> fSpotsUsed 
00081          >> fSpotsAvailable >> fCrudeDrift >> fMinDrift >> fMaxDrift;
00082    }
00083 
00084    else {
00085       
00086       // Smart method
00087       Int_t numCol = rs.NumCols();
00088       //  The first column (SeqNo) has already been processed.
00089       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00090          string colName = rs.CurColName();
00091          if ( colName == "PMT" )  rs >> fPmtId; 
00092          else if( colName == "CHANNEL" )   rs >> fChannelId;
00093          else if( colName == "DRIFT" )     rs >> fDrift;
00094          else if( colName == "STATERROR" )     rs >> fStatError;
00095          else if( colName == "SYSERROR"   )     rs >> fSysError;
00096          else if( colName == "SPOTSUSED" )     rs >> fSpotsUsed;
00097          else if( colName == "SPOTSAVAIL" )     rs >> fSpotsAvailable;
00098          else if( colName == "CRUDEDRIFT"   )     rs >> fCrudeDrift;
00099          else if( colName == "MINDRIFT"   )     rs >> fMinDrift;
00100          else if( colName == "MAXDRIFT"   )     rs >> fMaxDrift;
00101 
00102          else {
00103            MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00104                                   << "(" << colName << ")"
00105                                   << "; not part of CalPmtDrift" 
00106                                   << endl;
00107            rs.IncrementCurCol();
00108          }
00109       }
00110    }
00111    
00112    
00113 }

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

Reimplemented from DbiTableRow.

Definition at line 50 of file CalPmtDrift.h.

References GetChannel(), and RawChannelId::GetCrate().

00050 { return GetChannel().GetCrate(); };

RawChannelId CalPmtDrift::GetChannel (  )  const [inline]

Definition at line 48 of file CalPmtDrift.h.

References fChannelId.

Referenced by GetAggregateNo(), and GetCrate().

00048 { return RawChannelId(fChannelId); };

Int_t CalPmtDrift::GetCrate (  )  const [inline]

Definition at line 49 of file CalPmtDrift.h.

References GetChannel(), and RawChannelId::GetCrate().

00049 { return GetChannel().GetCrate();  };

Float_t CalPmtDrift::GetCrudeDrift (  )  const [inline]

Definition at line 57 of file CalPmtDrift.h.

References fCrudeDrift.

Referenced by PmtDriftCalScheme::GetDrift().

00057 { return fCrudeDrift; };

Float_t CalPmtDrift::GetDrift (  )  const [inline]

Definition at line 51 of file CalPmtDrift.h.

References fDrift.

Referenced by PmtDriftCalScheme::GetDrift().

00051 { return fDrift; };

Float_t CalPmtDrift::GetError (  )  const [inline]

Definition at line 52 of file CalPmtDrift.h.

References fStatError, and fSysError.

00052 { return sqrt(fSysError*fSysError + fStatError*fStatError); };

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

Reimplemented from DbiTableRow.

Definition at line 46 of file CalPmtDrift.h.

References fPmtId.

00046 { return fPmtId; }

Float_t CalPmtDrift::GetMaxDrift (  )  const [inline]

Definition at line 59 of file CalPmtDrift.h.

References fMaxDrift.

00059 { return fMaxDrift; };

Float_t CalPmtDrift::GetMinDrift (  )  const [inline]

Definition at line 58 of file CalPmtDrift.h.

References fMinDrift.

00058 { return fMinDrift; };

PlexPixelSpotId CalPmtDrift::GetPmtId (  )  const [inline]

Definition at line 47 of file CalPmtDrift.h.

References fPmtId.

00047 { return PlexPixelSpotId(fPmtId); };

Float_t CalPmtDrift::GetSpotsAvailable (  )  const [inline]

Definition at line 56 of file CalPmtDrift.h.

References fSpotsAvailable.

00056 { return fSpotsAvailable; };

Float_t CalPmtDrift::GetSpotsUsed (  )  const [inline]

Definition at line 55 of file CalPmtDrift.h.

References fSpotsUsed.

00055 { return fSpotsUsed; };

Float_t CalPmtDrift::GetStatError (  )  const [inline]

Definition at line 53 of file CalPmtDrift.h.

References fStatError.

Referenced by PmtDriftCalScheme::GetDrift().

00053 { return fStatError; };

Float_t CalPmtDrift::GetSysError (  )  const [inline]

Definition at line 54 of file CalPmtDrift.h.

References fSysError.

Referenced by PmtDriftCalScheme::GetDrift().

00054 { return fSysError; };

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

Reimplemented from DbiTableRow.

Definition at line 117 of file CalPmtDrift.cxx.

References fChannelId, fCrudeDrift, fDrift, fMaxDrift, fMinDrift, fPmtId, fSpotsAvailable, fSpotsUsed, fStatError, and fSysError.

00118                                                                        {
00119   //
00120   //
00121   //  Purpose:  Stream object to output row stream
00122   //
00123   //  Arguments: 
00124   //    ors          in     Output row stream.
00125   //    vrec         in    Associated validity record (or 0 if filling
00126   
00127   ors << fPmtId << fChannelId << fDrift << fStatError << fSysError
00128       << fSpotsUsed << fSpotsAvailable << fCrudeDrift << fMinDrift << fMaxDrift; 
00129 }


Member Data Documentation

UInt_t CalPmtDrift::fChannelId [private]

Definition at line 75 of file CalPmtDrift.h.

Referenced by CalPmtDrift(), Fill(), GetChannel(), and Store().

Float_t CalPmtDrift::fCrudeDrift [private]

Definition at line 81 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fDrift [private]

Definition at line 76 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fMaxDrift [private]

Definition at line 83 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fMinDrift [private]

Definition at line 82 of file CalPmtDrift.h.

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

UInt_t CalPmtDrift::fPmtId [private]

Definition at line 71 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fSpotsAvailable [private]

Definition at line 80 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fSpotsUsed [private]

Definition at line 79 of file CalPmtDrift.h.

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

Float_t CalPmtDrift::fStatError [private]

Definition at line 77 of file CalPmtDrift.h.

Referenced by Fill(), GetError(), GetStatError(), and Store().

Float_t CalPmtDrift::fSysError [private]

Definition at line 78 of file CalPmtDrift.h.

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