CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

HcalUpgradeDataFrame Class Reference

#include <HcalUpgradeDataFrame.h>

List of all members.

Public Types

typedef HcalDetId key_type
 For the sorted collection.

Public Member Functions

uint16_t adc (int iSample=0) const
int capId (int iSample=0) const
 HcalUpgradeDataFrame (HcalDetId id)
 HcalUpgradeDataFrame ()
 HcalUpgradeDataFrame (HcalDetId id, int capId, int samples, int presamples)
const HcalDetIdid () const
HcalUpgradeQIESample operator[] (int iSample) const
int presamples () const
void setPresamples (int presamples)
void setSample (int iSample, uint16_t adc, uint16_t tdc, bool dv)
void setSize (int size)
void setStartingCapId (int capId)
int size () const
int startingCapId () const
uint16_t tdc (int iSample=0) const
bool valid (int iSample=0) const
bool zsMarkAndPass () const

Static Public Attributes

static const int MAXSAMPLES = 10

Private Attributes

uint16_t adc_ [MAXSAMPLES]
int capId_
bool dv_ [MAXSAMPLES]
HcalDetId id_
int presamples_
int size_
uint16_t tdc_ [MAXSAMPLES]

Detailed Description

Precision readout digi for Upgrade work.

Definition at line 14 of file HcalUpgradeDataFrame.h.


Member Typedef Documentation

For the sorted collection.

Definition at line 16 of file HcalUpgradeDataFrame.h.


Constructor & Destructor Documentation

HcalUpgradeDataFrame::HcalUpgradeDataFrame ( )

Definition at line 3 of file HcalUpgradeDataFrame.cc.

                                           : id_(0), 
                                     capId_(0),
                                     size_(0),
                                     presamples_(0)
{
}
HcalUpgradeDataFrame::HcalUpgradeDataFrame ( HcalDetId  id)

Definition at line 10 of file HcalUpgradeDataFrame.cc.

                                                       : id_(id),
                                                           capId_(0),
                                                           size_(0),
                                                           presamples_(0) 
{
}
HcalUpgradeDataFrame::HcalUpgradeDataFrame ( HcalDetId  id,
int  capId,
int  samples,
int  presamples 
)

Definition at line 17 of file HcalUpgradeDataFrame.cc.

References setPresamples(), and setSize().

: id_(id),
  capId_(capId)
{
    setSize(samples) ;
    setPresamples(presamples) ;
}

Member Function Documentation

uint16_t HcalUpgradeDataFrame::adc ( int  iSample = 0) const [inline]

Definition at line 30 of file HcalUpgradeDataFrame.h.

References adc_.

Referenced by operator<<(), operator[](), and HcalTDC::timing().

{ return adc_[iSample] ; } 
int HcalUpgradeDataFrame::capId ( int  iSample = 0) const [inline]

Definition at line 27 of file HcalUpgradeDataFrame.h.

References capId_.

Referenced by operator<<(), and setStartingCapId().

{ return (capId_+iSample)%4; }
const HcalDetId& HcalUpgradeDataFrame::id ( void  ) const [inline]

Definition at line 22 of file HcalUpgradeDataFrame.h.

References id_.

Referenced by operator<<(), HcalSimpleRecAlgo::reconstructHFUpgrade(), and HcalTDC::timing().

{ return id_; }
HcalUpgradeQIESample HcalUpgradeDataFrame::operator[] ( int  iSample) const

Definition at line 37 of file HcalUpgradeDataFrame.cc.

References adc(), and capId_.

                                                                 {
  return HcalUpgradeQIESample(adc(i), (capId_+i)%4, 0, 0);
}
int HcalUpgradeDataFrame::presamples ( ) const [inline]

Definition at line 25 of file HcalUpgradeDataFrame.h.

References presamples_.

Referenced by operator<<(), HcalSimpleRecAlgo::reconstructHFUpgrade(), and setPresamples().

{ return presamples_ ; }
void HcalUpgradeDataFrame::setPresamples ( int  presamples)
void HcalUpgradeDataFrame::setSample ( int  iSample,
uint16_t  adc,
uint16_t  tdc,
bool  dv 
)

Definition at line 41 of file HcalUpgradeDataFrame.cc.

References adc_, dv_, and tdc_.

Referenced by HcalCoderDb::fCUpgrade2adc_(), and HcalTDC::timing().

                                         { 

    if ( iSample < MAXSAMPLES && iSample>=0) { 
        adc_[iSample] = adc&0xFF ; 
        tdc_[iSample] = tdc&0xFFFF ; 
        dv_[iSample] = dv ; 
    }    
}
void HcalUpgradeDataFrame::setSize ( int  size)

Definition at line 25 of file HcalUpgradeDataFrame.cc.

References MAXSAMPLES, size(), and size_.

Referenced by HcalUpgradeDataFrame().

                                           {
  if (size>MAXSAMPLES) size_=MAXSAMPLES;
  else if (size<=0) size_=0;
  else size_=size;
}
void HcalUpgradeDataFrame::setStartingCapId ( int  capId) [inline]

Definition at line 37 of file HcalUpgradeDataFrame.h.

References capId(), and capId_.

{ capId_ = capId ; } 
int HcalUpgradeDataFrame::size ( void  ) const [inline]

Definition at line 24 of file HcalUpgradeDataFrame.h.

References size_.

Referenced by operator<<(), HcalTDCReco::reconstruct(), and setSize().

{ return size_ ; }
int HcalUpgradeDataFrame::startingCapId ( ) const [inline]

Definition at line 26 of file HcalUpgradeDataFrame.h.

References capId_.

{ return capId_ ; }
uint16_t HcalUpgradeDataFrame::tdc ( int  iSample = 0) const [inline]

Definition at line 31 of file HcalUpgradeDataFrame.h.

References tdc_.

Referenced by operator<<(), and HcalTDCReco::reconstruct().

{ return tdc_[iSample] ; } 
bool HcalUpgradeDataFrame::valid ( int  iSample = 0) const [inline]

Definition at line 29 of file HcalUpgradeDataFrame.h.

References dv_.

Referenced by operator<<().

{ return dv_[iSample] ; }
bool HcalUpgradeDataFrame::zsMarkAndPass ( ) const [inline]

Definition at line 33 of file HcalUpgradeDataFrame.h.

{return false;}

Member Data Documentation

Definition at line 46 of file HcalUpgradeDataFrame.h.

Referenced by adc(), and setSample().

Definition at line 43 of file HcalUpgradeDataFrame.h.

Referenced by capId(), operator[](), setStartingCapId(), and startingCapId().

Definition at line 45 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and valid().

Definition at line 42 of file HcalUpgradeDataFrame.h.

Referenced by id().

const int HcalUpgradeDataFrame::MAXSAMPLES = 10 [static]

Definition at line 40 of file HcalUpgradeDataFrame.h.

Referenced by setPresamples(), and setSize().

Definition at line 44 of file HcalUpgradeDataFrame.h.

Referenced by presamples(), and setPresamples().

Definition at line 44 of file HcalUpgradeDataFrame.h.

Referenced by setSize(), and size().

Definition at line 47 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and tdc().