test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HcalUpgradeDataFrame Class Reference

#include <HcalUpgradeDataFrame.h>

Public Types

typedef HcalDetId key_type
 For the sorted collection. More...
 

Public Member Functions

uint16_t adc (int iSample=0) const
 
int capId (int iSample=0) const
 
const HcalElectronicsIdelecId () const
 
 HcalUpgradeDataFrame ()
 
 HcalUpgradeDataFrame (HcalDetId id)
 
 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 setReadoutIds (const HcalElectronicsId &eid)
 
void setSample (int iSample, uint16_t adc, uint16_t tdc, bool dv)
 
void setSize (int size)
 
void setStartingCapId (int capId)
 
void setZSInfo (bool unsuppressed, bool markAndPass, uint32_t crossingMask=0)
 
int size () const
 
int startingCapId () const
 
uint16_t tdc (int iSample=0) const
 
bool valid (int iSample=0) const
 
uint32_t zsCrossingMask () const
 
bool zsMarkAndPass () const
 
bool zsUnsuppressed () const
 

Static Public Attributes

static const int MAXSAMPLES = 10
 

Private Attributes

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

Detailed Description

Precision readout digi for Upgrade work.

Definition at line 15 of file HcalUpgradeDataFrame.h.

Member Typedef Documentation

For the sorted collection.

Definition at line 17 of file HcalUpgradeDataFrame.h.

Constructor & Destructor Documentation

HcalUpgradeDataFrame::HcalUpgradeDataFrame ( )

Definition at line 3 of file HcalUpgradeDataFrame.cc.

HcalUpgradeDataFrame::HcalUpgradeDataFrame ( HcalDetId  id)

Definition at line 11 of file HcalUpgradeDataFrame.cc.

11  : id_(id),
12  electronicsId_(0),
13  capId_(0),
14  size_(0),
15  presamples_(0)
16 {
17 }
HcalElectronicsId electronicsId_
HcalUpgradeDataFrame::HcalUpgradeDataFrame ( HcalDetId  id,
int  capId,
int  samples,
int  presamples 
)

Definition at line 19 of file HcalUpgradeDataFrame.cc.

References setPresamples(), and setSize().

20  : id_(id),
21  electronicsId_(0),
22  capId_(capId)
23 {
24  setSize(samples) ;
26 }
void setPresamples(int presamples)
int capId(int iSample=0) const
HcalElectronicsId electronicsId_

Member Function Documentation

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

Definition at line 36 of file HcalUpgradeDataFrame.h.

References adc_.

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

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

Definition at line 33 of file HcalUpgradeDataFrame.h.

References capId_.

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

33 { return (capId_+iSample)%4; }
const HcalElectronicsId& HcalUpgradeDataFrame::elecId ( ) const
inline

Definition at line 24 of file HcalUpgradeDataFrame.h.

References electronicsId_.

24 { return electronicsId_; }
HcalElectronicsId electronicsId_
const HcalDetId& HcalUpgradeDataFrame::id ( ) const
inline
HcalUpgradeQIESample HcalUpgradeDataFrame::operator[] ( int  iSample) const

Definition at line 44 of file HcalUpgradeDataFrame.cc.

References adc(), and capId_.

44  {
45  return HcalUpgradeQIESample(adc(i), (capId_+i)%4, 0, 0);
46 }
int i
Definition: DBlmapReader.cc:9
uint16_t adc(int iSample=0) const
int HcalUpgradeDataFrame::presamples ( ) const
inline

Definition at line 27 of file HcalUpgradeDataFrame.h.

References presamples_.

Referenced by operator<<().

27 { return presamples_&0xF ; }
void HcalUpgradeDataFrame::setPresamples ( int  presamples)

Definition at line 34 of file HcalUpgradeDataFrame.cc.

References MAXSAMPLES, and presamples_.

Referenced by HcalUpgradeDataFrame().

34  {
36  else if (presamples<=0) presamples_=0;
37  else presamples_|=presamples&0xF;
38 }
static const int MAXSAMPLES
void HcalUpgradeDataFrame::setReadoutIds ( const HcalElectronicsId eid)

Definition at line 40 of file HcalUpgradeDataFrame.cc.

References electronicsId_.

40  {
41  electronicsId_=eid;
42 }
HcalElectronicsId electronicsId_
void HcalUpgradeDataFrame::setSample ( int  iSample,
uint16_t  adc,
uint16_t  tdc,
bool  dv 
)

Definition at line 48 of file HcalUpgradeDataFrame.cc.

References adc_, dv_, and tdc_.

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

51  {
52  if ( iSample < MAXSAMPLES && iSample>=0) {
53  adc_[iSample] = adc&0xFF ;
54  tdc_[iSample] = tdc&0xFFFF ;
55  dv_[iSample] = dv ;
56  }
57 }
uint16_t tdc(int iSample=0) const
uint16_t tdc_[MAXSAMPLES]
uint16_t adc_[MAXSAMPLES]
uint16_t adc(int iSample=0) const
void HcalUpgradeDataFrame::setSize ( int  size)

Definition at line 28 of file HcalUpgradeDataFrame.cc.

References MAXSAMPLES, size(), and size_.

Referenced by HcalUpgradeDataFrame().

28  {
30  else if (size<=0) size_=0;
31  else size_=size;
32 }
static const int MAXSAMPLES
void HcalUpgradeDataFrame::setStartingCapId ( int  capId)
inline

Definition at line 43 of file HcalUpgradeDataFrame.h.

References capId(), and capId_.

43 { capId_ = capId ; }
int capId(int iSample=0) const
void HcalUpgradeDataFrame::setZSInfo ( bool  unsuppressed,
bool  markAndPass,
uint32_t  crossingMask = 0 
)

Definition at line 59 of file HcalUpgradeDataFrame.cc.

References presamples_.

Referenced by HcalZeroSuppressionAlgo::suppress().

60  {
61  presamples_&=0x7FC00F0F; // preserve actual presamples and fiber idle offset
62  if (markAndPass) presamples_|=0x10;
63  if (unsuppressed) presamples_|=0x20;
64  presamples_|=(crossingMask&0x3FF)<<12;
65 }
int HcalUpgradeDataFrame::size ( void  ) const
inline
int HcalUpgradeDataFrame::startingCapId ( ) const
inline

Definition at line 32 of file HcalUpgradeDataFrame.h.

References capId_.

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

Definition at line 37 of file HcalUpgradeDataFrame.h.

References tdc_.

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

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

Definition at line 35 of file HcalUpgradeDataFrame.h.

References dv_.

Referenced by operator<<().

35 { return dv_[iSample] ; }
uint32_t HcalUpgradeDataFrame::zsCrossingMask ( ) const
inline

Definition at line 30 of file HcalUpgradeDataFrame.h.

References presamples_.

Referenced by HcalZSAlgoRealistic::shouldKeep().

30 { return (presamples_&0x3FF000)>>12; }
bool HcalUpgradeDataFrame::zsMarkAndPass ( ) const
inline

Definition at line 28 of file HcalUpgradeDataFrame.h.

References presamples_.

Referenced by operator<<().

28 { return (presamples_&0x10); }
bool HcalUpgradeDataFrame::zsUnsuppressed ( ) const
inline

Definition at line 29 of file HcalUpgradeDataFrame.h.

References presamples_.

Referenced by operator<<().

29 { return (presamples_&0x20); }

Member Data Documentation

uint16_t HcalUpgradeDataFrame::adc_[MAXSAMPLES]
private

Definition at line 54 of file HcalUpgradeDataFrame.h.

Referenced by adc(), and setSample().

int HcalUpgradeDataFrame::capId_
private

Definition at line 51 of file HcalUpgradeDataFrame.h.

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

bool HcalUpgradeDataFrame::dv_[MAXSAMPLES]
private

Definition at line 53 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and valid().

HcalElectronicsId HcalUpgradeDataFrame::electronicsId_
private

Definition at line 50 of file HcalUpgradeDataFrame.h.

Referenced by elecId(), and setReadoutIds().

HcalDetId HcalUpgradeDataFrame::id_
private

Definition at line 49 of file HcalUpgradeDataFrame.h.

Referenced by id().

const int HcalUpgradeDataFrame::MAXSAMPLES = 10
static

Definition at line 47 of file HcalUpgradeDataFrame.h.

Referenced by setPresamples(), and setSize().

int HcalUpgradeDataFrame::presamples_
private
int HcalUpgradeDataFrame::size_
private

Definition at line 52 of file HcalUpgradeDataFrame.h.

Referenced by setSize(), and size().

uint16_t HcalUpgradeDataFrame::tdc_[MAXSAMPLES]
private

Definition at line 55 of file HcalUpgradeDataFrame.h.

Referenced by setSample(), and tdc().