CalTimeJump Class Reference

#include <CalTimeJump.h>

Inheritance diagram for CalTimeJump:
DbiTableRow

List of all members.

Public Member Functions

 CalTimeJump ()
 CalTimeJump (RawChannelId rcid, Float_t jump)
virtual ~CalTimeJump ()
virtual UInt_t GetIndex (UInt_t) const
virtual UInt_t GetIndex () const
virtual Int_t GetAggregateNo () const
RawChannelId GetRawChannelId () const
Float_t GetJump () const
virtual Bool_t CanL2Cache () 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 Int_t GetIndex (const RawChannelId &rcid)
static RawChannelId GetRawChannelId (Int_t index)

Private Member Functions

 CalTimeJump (const CalTimeJump &from)
 ClassDef (CalTimeJump, 0)

Private Attributes

UInt_t fChannelIndex
Float_t fJump

Detailed Description

Definition at line 20 of file CalTimeJump.h.


Constructor & Destructor Documentation

CalTimeJump::CalTimeJump (  )  [inline]

Definition at line 23 of file CalTimeJump.h.

References LEA_CTOR.

00023                 :
00024     fChannelIndex( 0 ), fJump(0) { LEA_CTOR; };

CalTimeJump::CalTimeJump ( RawChannelId  rcid,
Float_t  jump 
) [inline]

Definition at line 26 of file CalTimeJump.h.

References LEA_CTOR.

00026                                                :
00027     fChannelIndex( GetIndex(rcid) ), fJump(jump) { LEA_CTOR; };

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

Definition at line 29 of file CalTimeJump.h.

References LEA_DTOR.

00029 { LEA_DTOR; };

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

Definition at line 54 of file CalTimeJump.h.

References LEA_CTOR.

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


Member Function Documentation

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

Reimplemented from DbiTableRow.

Definition at line 43 of file CalTimeJump.h.

00043 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 44 of file CalTimeJump.h.

00044 { return new CalTimeJump; }

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

Implements DbiTableRow.

Definition at line 69 of file CalTimeJump.cxx.

References DbiRowStream::CurColName(), fChannelIndex, fJump, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00070                                                             {
00071 
00072 //
00073 //
00074 //  Purpose:  Fill object from Result Set
00075 //
00076 //  Arguments: 
00077 //    rs           in    Result Set used to fill object
00078 //    vrec         in    Associated validity record (or 0 if filling
00079 //                                                    DbiValidityRec)
00080 
00081    if ( rs.TableName() == "CALTIMEJUMP" ) {
00082       // Dumb method.
00083      rs  >> fChannelIndex >> fJump;
00084    }
00085    else {      
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 == "CHANNELINDEX" )      rs >> fChannelIndex;
00092        else if( colName == "JUMP" )        rs >> fJump;
00093        else {
00094             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00095                                    << "(" << colName << ")"
00096                                    << "; not part of CalTimeJump" 
00097                                    << endl;
00098             rs.IncrementCurCol();
00099          }
00100       }
00101    }
00102    
00103 }

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

Reimplemented from DbiTableRow.

Definition at line 37 of file CalTimeJump.h.

References fChannelIndex.

00037 { return fChannelIndex; } // One aggregate per chip

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

Definition at line 35 of file CalTimeJump.h.

References fChannelIndex.

Referenced by PulserTimeCalScheme::CalibrateByJumps().

00035 {return fChannelIndex;};

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

Reimplemented from DbiTableRow.

Definition at line 34 of file CalTimeJump.h.

References fChannelIndex.

00034 {return fChannelIndex;};

Int_t CalTimeJump::GetIndex ( const RawChannelId rcid  )  [static]

Definition at line 23 of file CalTimeJump.cxx.

References RawChannelId::GetCrate(), RawChannelId::GetDetector(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), RawChannelId::GetVmm(), RawChannelId::IsNull(), and Detector::kFar.

00024 {
00025   if(rcid.GetDetector()==Detector::kFar) {
00026     Int_t index = rcid.GetCrate()*108
00027                 + rcid.GetVarcId()*36
00028                 + rcid.GetVmm()*6
00029                 + rcid.GetVaAdcSel()*3
00030                 + rcid.GetVaChip();
00031     return index;
00032   } else if(rcid.IsNull()) {
00033     return -1;
00034   } else {
00035     // ND not supported.
00036     assert(0);
00037   }
00038   return -1;
00039 }

Float_t CalTimeJump::GetJump (  )  const [inline]

Definition at line 40 of file CalTimeJump.h.

References fJump.

Referenced by PulserTimeCalScheme::CalibrateByJumps().

00040 { return fJump; };

RawChannelId CalTimeJump::GetRawChannelId (  )  const [inline]

Definition at line 38 of file CalTimeJump.h.

References fChannelIndex, and GetRawChannelId().

Referenced by GetRawChannelId().

00038 {return GetRawChannelId(fChannelIndex);};

RawChannelId CalTimeJump::GetRawChannelId ( Int_t  index  )  [static]

Definition at line 41 of file CalTimeJump.cxx.

References Detector::kFar, and ElecType::kVA.

00042 {
00043   Int_t temp = index;
00044   Int_t crate = index/108;
00045   temp -= crate*108;
00046   Int_t varc  = temp/36;
00047   temp -= varc*36;
00048   Int_t vmm  = temp/6;
00049   temp -= vmm*6;
00050   Int_t vaadc = temp/3;
00051   temp -= vaadc*3;
00052   Int_t vachip  = temp;
00053 
00054   return RawChannelId(Detector::kFar,
00055                       ElecType::kVA,
00056                       crate, 
00057                       varc,
00058                       vmm,
00059                       vaadc,
00060                       vachip,
00061                       0  // no particular channel on chip
00062                       );                      
00063 }

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

Reimplemented from DbiTableRow.

Definition at line 106 of file CalTimeJump.cxx.

References fChannelIndex, and fJump.

00108 {
00109   //
00110   //
00111   //  Purpose:  Stream object to output row stream
00112   //
00113   
00114   ors << fChannelIndex << fJump;
00115 }


Member Data Documentation

UInt_t CalTimeJump::fChannelIndex [private]

Definition at line 50 of file CalTimeJump.h.

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

Float_t CalTimeJump::fJump [private]

Definition at line 51 of file CalTimeJump.h.

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