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, int capId, int samples, int presamples)
 HcalUpgradeDataFrame ()
const HcalDetIdid () const
int presamples () const
void setPresamples (int presamples)
void setSample (int relSample, const uint16_t adc, const uint8_t tdc, const bool dv)
void setSize (int size)
void setStartingCapId (int capId)
int size () const
int startingCapId () const
uint8_t tdc (int iSample=0) const
bool valid (int iSample=0) 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_
uint8_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 4 of file HcalUpgradeDataFrame.cc.

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

Definition at line 11 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 29 of file HcalUpgradeDataFrame.h.

References adc_.

Referenced by operator<<().

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

Definition at line 26 of file HcalUpgradeDataFrame.h.

References capId_.

Referenced by setStartingCapId().

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

Definition at line 21 of file HcalUpgradeDataFrame.h.

References id_.

Referenced by operator<<().

{ return id_; }
int HcalUpgradeDataFrame::presamples ( ) const [inline]

Definition at line 24 of file HcalUpgradeDataFrame.h.

References presamples_.

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

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

Definition at line 30 of file HcalUpgradeDataFrame.cc.

References adc_, dv_, presamples_, and tdc_.

                                               { 

    int linSample = presamples_ + relativeSample ;
    if ( linSample < MAXSAMPLES && linSample>=0) { 
        adc_[linSample] = adc&0xFF ; 
        tdc_[linSample] = tdc&0x1F ; 
        dv_[linSample] = dv ; 
    }    
}
void HcalUpgradeDataFrame::setSize ( int  size)

Definition at line 18 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 34 of file HcalUpgradeDataFrame.h.

References capId(), and capId_.

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

Definition at line 23 of file HcalUpgradeDataFrame.h.

References size_.

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

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

Definition at line 25 of file HcalUpgradeDataFrame.h.

References capId_.

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

Definition at line 30 of file HcalUpgradeDataFrame.h.

References tdc_.

Referenced by operator<<().

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

Definition at line 28 of file HcalUpgradeDataFrame.h.

References dv_.

Referenced by operator<<().

{ return dv_[iSample] ; }

Member Data Documentation

Definition at line 43 of file HcalUpgradeDataFrame.h.

Referenced by adc(), and setSample().

Definition at line 40 of file HcalUpgradeDataFrame.h.

Referenced by capId(), setStartingCapId(), and startingCapId().

Definition at line 42 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and valid().

Definition at line 39 of file HcalUpgradeDataFrame.h.

Referenced by id().

const int HcalUpgradeDataFrame::MAXSAMPLES = 10 [static]

Definition at line 37 of file HcalUpgradeDataFrame.h.

Referenced by setPresamples(), and setSize().

Definition at line 41 of file HcalUpgradeDataFrame.h.

Referenced by presamples(), setPresamples(), and setSample().

Definition at line 41 of file HcalUpgradeDataFrame.h.

Referenced by setSize(), and size().

Definition at line 44 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and tdc().