DbuVaChipSpars Class Reference

#include <DbuVaChipSpars.h>

Inheritance diagram for DbuVaChipSpars:
DbiTableRow

List of all members.

Public Member Functions

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

 DbuVaChipSpars (const DbuVaChipSpars &from)

Detailed Description

Definition at line 29 of file DbuVaChipSpars.h.


Constructor & Destructor Documentation

DbuVaChipSpars::DbuVaChipSpars (  )  [inline]

Definition at line 36 of file DbuVaChipSpars.h.

References fChanPed, and LEA_CTOR.

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

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

Definition at line 40 of file DbuVaChipSpars.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; }

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

Definition at line 45 of file DbuVaChipSpars.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 DbuVaChipSpars::~DbuVaChipSpars (  )  [inline, virtual]

Definition at line 50 of file DbuVaChipSpars.h.

References LEA_DTOR.

00050 { LEA_DTOR; };

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

Definition at line 73 of file DbuVaChipSpars.h.

References LEA_CTOR.

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


Member Function Documentation

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

Implements DbiTableRow.

Definition at line 58 of file DbuVaChipSpars.h.

00058 { return new DbuVaChipSpars; }

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

Implements DbiTableRow.

Definition at line 69 of file DbuVaChipSpars.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 
00120 }

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

Reimplemented from DbiTableRow.

Definition at line 54 of file DbuVaChipSpars.h.

References fRawChannelId, and RawChannelId::GetCrate().

00054 { return fRawChannelId.GetCrate(); }

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

Definition at line 164 of file DbuVaChipSpars.cxx.

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

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

Reimplemented from DbiTableRow.

Definition at line 124 of file DbuVaChipSpars.cxx.

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

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


Member Data Documentation


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1