DbuVaChipPeds Class Reference

#include <DbuVaChipPeds.h>

Inheritance diagram for DbuVaChipPeds:
DbiTableRow

List of all members.

Public Member Functions

 DbuVaChipPeds ()
 DbuVaChipPeds (const RawChannelId &rcid)
 DbuVaChipPeds (const RawChannelId &rcid, Short_t *chanpeds)
virtual ~DbuVaChipPeds ()
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

Static Public Member Functions

static const char * GetTableDescr ()

Public Attributes

RawChannelId fRawChannelId
Short_t fChanPed [22]

Private Member Functions

 DbuVaChipPeds (const DbuVaChipPeds &from)

Detailed Description

Definition at line 29 of file DbuVaChipPeds.h.


Constructor & Destructor Documentation

DbuVaChipPeds::DbuVaChipPeds (  )  [inline]

Definition at line 36 of file DbuVaChipPeds.h.

References fChanPed, and LEA_CTOR.

00036                    :
00037       fRawChannelId() 
00038       { LEA_CTOR; for (int i=0; i<22; ++i) fChanPed[i] = -1; }

DbuVaChipPeds::DbuVaChipPeds ( const RawChannelId rcid  )  [inline]

Definition at line 40 of file DbuVaChipPeds.h.

References fChanPed, fRawChannelId, LEA_CTOR, and RawChannelId::SetVaChannel().

00040                                            :
00041       fRawChannelId(rcid)
00042       { LEA_CTOR; fRawChannelId.SetVaChannel(0);
00043         for (int i=0; i<22; ++i) fChanPed[i] = -1; }

DbuVaChipPeds::DbuVaChipPeds ( const RawChannelId rcid,
Short_t *  chanpeds 
) [inline]

Definition at line 45 of file DbuVaChipPeds.h.

References fChanPed, fRawChannelId, LEA_CTOR, and RawChannelId::SetVaChannel().

00045                                                               :
00046       fRawChannelId(rcid)
00047       { LEA_CTOR; fRawChannelId.SetVaChannel(0);
00048         for (int i=0; i<22; ++i) fChanPed[i] = chanpeds[i]; }

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

Definition at line 50 of file DbuVaChipPeds.h.

References LEA_DTOR.

00050 { LEA_DTOR; };

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

Definition at line 73 of file DbuVaChipPeds.h.

References LEA_CTOR.

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


Member Function Documentation

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

Implements DbiTableRow.

Definition at line 58 of file DbuVaChipPeds.h.

00058 { return new DbuVaChipPeds; }

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

Implements DbiTableRow.

Definition at line 69 of file DbuVaChipPeds.cxx.

References det, fChanPed, fRawChannelId, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), ElecType::kVA, and RawChannelId::SetModeBits().

00070                                                                   {
00071 //
00072 //
00073 //  Purpose:  Fill object from Result Set
00074 //
00075 //  Arguments: 
00076 //    rs           in    Result Set used to fill object
00077 //    vrec         in    Associated validity record (or 0 if filling
00078 //                                                    DbiValidityRec)
00079 //
00080 //  Return:    
00081 //
00082 //  Contact:   R. Hatcher
00083 //
00084 //  Specification:-
00085 //  =============
00086 //
00087 //  o Fill object from current row of Result Set.
00088 
00089 //  Program Notes:-
00090 //  =============
00091 
00092 //  None.
00093 
00094    Detector::Detector_t det =
00095       (Detector::Detector_t) 
00096       ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00097    
00098    ElecType::Elec_t elec = ElecType::kVA;
00099 
00100    UInt_t       crate, varc, vmm, adcsel, vachip;
00101    const UInt_t vachan = 0;
00102    Int_t        modeflags;
00103 
00104    rs >> crate
00105       >> modeflags
00106       >> varc
00107       >> vmm
00108       >> adcsel
00109       >> vachip;
00110    for (int i=0; i<22; ++i) rs >> fChanPed[i];
00111    
00112    modeflags  = modeflags << shiftModes;
00113    Bool_t pedMode    = modeflags & maskPedMode;
00114    Bool_t sparsMode  = modeflags & maskSparsMode;
00115    Bool_t commonMode = modeflags & maskComMode;
00116 
00117    fRawChannelId = RawChannelId(det,elec,crate,varc,vmm,adcsel,vachip,vachan);
00118    fRawChannelId.SetModeBits(commonMode,sparsMode,pedMode);
00119 }

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

Reimplemented from DbiTableRow.

Definition at line 54 of file DbuVaChipPeds.h.

References fRawChannelId, and RawChannelId::GetCrate().

00054 { return fRawChannelId.GetCrate(); }

const char * DbuVaChipPeds::GetTableDescr (  )  [static]

Definition at line 163 of file DbuVaChipPeds.cxx.

00164 {
00165 //
00166 //
00167 //  Purpose:  Return a string describing rows in the table
00168 //            Used in creating temporary tables
00169 //
00170 //  Return:   const char* to parenthesized comma separated list
00171 //            of column name and type pairs
00172 //
00173 //  Contact:   R. Hatcher
00174 //
00175 //  Specification:-
00176 //  =============
00177 //
00178 
00179 //  Program Notes:-
00180 //  =============
00181 
00182 //  None.
00183 
00184    const char* const_tabledescr = "(\
00185        SEQNO             int,      \
00186        ROW_COUNTER       int,      \
00187        CRATE             smallint, \
00188        MODEFLAGS         tinyint,  \
00189        VARC              tinyint,  \
00190        VMM               tinyint,  \
00191        VAADCSEL          tinyint,  \
00192        VACHIP            tinyint,  \
00193        CHAN00            smallint, \
00194        CHAN01            smallint, \
00195        CHAN02            smallint, \
00196        CHAN03            smallint, \
00197        CHAN04            smallint, \
00198        CHAN05            smallint, \
00199        CHAN06            smallint, \
00200        CHAN07            smallint, \
00201        CHAN08            smallint, \
00202        CHAN09            smallint, \
00203        CHAN10            smallint, \
00204        CHAN11            smallint, \
00205        CHAN12            smallint, \
00206        CHAN13            smallint, \
00207        CHAN14            smallint, \
00208        CHAN15            smallint, \
00209        CHAN16            smallint, \
00210        CHAN17            smallint, \
00211        CHAN18            smallint, \
00212        CHAN19            smallint, \
00213        CHAN20            smallint, \
00214        CHAN21            smallint, \
00215        primary key (SEQNO,ROW_COUNTER) \
00216        )";
00217 
00218    return const_tabledescr;
00219 }

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

Reimplemented from DbiTableRow.

Definition at line 123 of file DbuVaChipPeds.cxx.

References fChanPed, fRawChannelId, RawChannelId::GetCrate(), RawChannelId::GetEncoded(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), and RawChannelId::GetVmm().

00124                                                                   {
00125 //
00126 //
00127 //  Purpose:  Stream object to output row stream
00128 //
00129 //  Arguments: 
00130 //    ors          in     Output row stream.
00131 //    vrec         in     Associated validity record (or 0 if filling
00132 //                                                    DbiValidityRec)
00133 //
00134 //  Return:    
00135 //
00136 //  Contact:   R. Hatcher
00137 //
00138 //  Specification:-
00139 //  =============
00140 //
00141 //  o  Stream object to output row stream.
00142 
00143 //  Program Notes:-
00144 //  =============
00145 
00146 //  None.
00147 
00148    Int_t modeflags = 
00149       (fRawChannelId.GetEncoded() & maskModes) >> shiftModes;
00150 
00151    ors << fRawChannelId.GetCrate()
00152        << modeflags
00153        << fRawChannelId.GetVarcId()
00154        << fRawChannelId.GetVmm()
00155        << fRawChannelId.GetVaAdcSel()
00156        << fRawChannelId.GetVaChip();
00157    for (int i=0; i<22; ++i) ors << fChanPed[i];
00158 
00159 }


Member Data Documentation


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1