CMS 3D CMS Logo

HFDataFrame Class Reference

Precision readout digi for HF. More...

#include <DataFormats/HcalDigi/interface/HFDataFrame.h>

List of all members.

Public Types

typedef HcalDetId key_type
 For the sorted collection.

Public Member Functions

const HcalElectronicsIdelecId () const
 HFDataFrame (const HcalDetId &id)
 HFDataFrame ()
const HcalDetIdid () const
const HcalQIESampleoperator[] (int i) const
 access a sample
int presamples () const
 number of samples before the sample from the triggered beam crossing (according to the hardware)
const HcalQIESamplesample (int i) const
 access a sample
void setPresamples (int ps)
void setReadoutIds (const HcalElectronicsId &eid)
void setSample (int i, const HcalQIESample &sam)
void setSize (int size)
void setZSInfo (bool unsuppressed, bool markAndPass)
int size () const
 total number of samples in the digi
bool validate (int firstSample=0, int nSamples=100) const
 validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all)
bool zsMarkAndPass () const
 was ZS MarkAndPass?
bool zsUnsuppressed () const
 was ZS unsuppressed?

Static Public Attributes

static const int MAXSAMPLES = 10

Private Attributes

HcalQIESample data_ [MAXSAMPLES]
HcalElectronicsId electronicsId_
int hcalPresamples_
HcalDetId id_
int size_


Detailed Description

Precision readout digi for HF.

Definition at line 15 of file HFDataFrame.h.


Member Typedef Documentation

typedef HcalDetId HFDataFrame::key_type

For the sorted collection.

Definition at line 17 of file HFDataFrame.h.


Constructor & Destructor Documentation

HFDataFrame::HFDataFrame (  ) 

Definition at line 3 of file HFDataFrame.cc.

00003                          : id_(0), 
00004                              size_(0),
00005                              hcalPresamples_(0)
00006 {
00007 }

HFDataFrame::HFDataFrame ( const HcalDetId id  )  [explicit]

Definition at line 9 of file HFDataFrame.cc.

00009                                             : 
00010   id_(id), 
00011   size_(0),
00012   hcalPresamples_(0)
00013 {
00014   // TODO : test id for HcalForward
00015 }


Member Function Documentation

const HcalElectronicsId& HFDataFrame::elecId (  )  const [inline]

Definition at line 23 of file HFDataFrame.h.

References electronicsId_.

Referenced by HcalDigiMonitor::processEvent().

00023 { return electronicsId_; }

const HcalDetId& HFDataFrame::id ( void   )  const [inline]

Definition at line 22 of file HFDataFrame.h.

References id_.

Referenced by HcalNominalCoder::adc2fC(), HcaluLUTTPGCoder::adc2Linear(), HcalTriggerPrimitiveAlgo::addSignal(), HFLightCalRand::analyze(), HFLightCal::analyze(), HcalPedestalsAnalysis::analyze(), HFPreLightCal::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalBeamMonitor::processEvent(), HcalPedestalMonitor::processEvent(), HcalExpertMonitor::processEvent_Digi(), HcalDeadCellMonitor::processEvent_digi(), HcalHotCellMonitor::processEvent_pedestal(), HcalLedAnalysis::processLedEvent(), and HcalSimpleRecAlgo::reconstruct().

00022 { return id_; }

const HcalQIESample& HFDataFrame::operator[] ( int  i  )  const [inline]

access a sample

Definition at line 35 of file HFDataFrame.h.

References data_.

00035 { return data_[i]; }

int HFDataFrame::presamples (  )  const [inline]

number of samples before the sample from the triggered beam crossing (according to the hardware)

Definition at line 28 of file HFDataFrame.h.

References hcalPresamples_.

Referenced by HcalNominalCoder::adc2fC(), HcalTriggerPrimitiveAlgo::addSignal(), operator<<(), HcalDigiMonitor::processEvent(), and HcalSimpleRecAlgo::reconstruct().

00028 { return hcalPresamples_&0xF; }

const HcalQIESample& HFDataFrame::sample ( int  i  )  const [inline]

access a sample

Definition at line 37 of file HFDataFrame.h.

References data_.

Referenced by HcalPedestalsAnalysis::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalTrigPrimMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalLEDMonitor::processEvent(), HcalBeamMonitor::processEvent(), HcalPedestalMonitor::processEvent(), HcalDeadCellMonitor::processEvent_digi(), and HcalHotCellMonitor::processEvent_pedestal().

00037 { return data_[i]; }

void HFDataFrame::setPresamples ( int  ps  ) 

Definition at line 22 of file HFDataFrame.cc.

References hcalPresamples_.

00022                                       {
00023   hcalPresamples_|=ps&0xF;
00024 }

void HFDataFrame::setReadoutIds ( const HcalElectronicsId eid  ) 

Definition at line 25 of file HFDataFrame.cc.

References electronicsId_.

00025                                                             {
00026   electronicsId_=eid;
00027 }

void HFDataFrame::setSample ( int  i,
const HcalQIESample sam 
) [inline]

Definition at line 45 of file HFDataFrame.h.

References data_.

Referenced by HcalRecHitsMaker::loadHcalRecHits(), and HcaluLUTTPGCoder::update().

00045 { data_[i]=sam; }

void HFDataFrame::setSize ( int  size  ) 

Definition at line 17 of file HFDataFrame.cc.

References MAXSAMPLES, and size_.

Referenced by HcalRecHitsMaker::loadHcalRecHits(), and HcaluLUTTPGCoder::update().

00017                                   {
00018   if (size>MAXSAMPLES) size_=MAXSAMPLES;
00019   else if (size<=0) size_=0;
00020   else size_=size;
00021 }

void HFDataFrame::setZSInfo ( bool  unsuppressed,
bool  markAndPass 
)

Definition at line 41 of file HFDataFrame.cc.

References hcalPresamples_.

00041                                                                {
00042   if (markAndPass) hcalPresamples_|=0x10;
00043   if (unsuppressed) hcalPresamples_|=0x20;
00044 }

int HFDataFrame::size ( void   )  const [inline]

total number of samples in the digi

Definition at line 26 of file HFDataFrame.h.

References size_.

Referenced by HcalNominalCoder::adc2fC(), HcaluLUTTPGCoder::adc2Linear(), HcalTriggerPrimitiveAlgo::addSignal(), HFLightCalRand::analyze(), HFLightCal::analyze(), HcalPedestalsAnalysis::analyze(), HFPreLightCal::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalTrigPrimMonitor::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalBeamMonitor::processEvent(), HcalPedestalMonitor::processEvent(), HcalDeadCellMonitor::processEvent_digi(), and HcalHotCellMonitor::processEvent_pedestal().

00026 { return size_&0xF; }

bool HFDataFrame::validate ( int  firstSample = 0,
int  nSamples = 100 
) const

validate appropriate DV and ER bits as well as capid rotation for the specified samples (default is all)

Definition at line 29 of file HFDataFrame.cc.

References HcalQIESample::capid(), data_, i, and size_.

00029                                                               {
00030   int capid=-1;
00031   bool ok=true;
00032   for (int i=0; ok && i<nSamples && i+firstSample<size_; i++) {
00033     if (data_[i+firstSample].er() || !data_[i+firstSample].dv()) ok=false;
00034     if (i==0) capid=data_[i+firstSample].capid();
00035     if (capid!=data_[i+firstSample].capid()) ok=false;
00036     capid=(capid+1)%4;
00037   }
00038   return ok;
00039 }

bool HFDataFrame::zsMarkAndPass (  )  const [inline]

was ZS MarkAndPass?

Definition at line 30 of file HFDataFrame.h.

References hcalPresamples_.

Referenced by operator<<().

00030 { return (hcalPresamples_&0x10); }

bool HFDataFrame::zsUnsuppressed (  )  const [inline]

was ZS unsuppressed?

Definition at line 32 of file HFDataFrame.h.

References hcalPresamples_.

Referenced by operator<<().

00032 { return (hcalPresamples_&0x20); }


Member Data Documentation

HcalQIESample HFDataFrame::data_[MAXSAMPLES] [private]

Definition at line 54 of file HFDataFrame.h.

Referenced by operator[](), sample(), setSample(), and validate().

HcalElectronicsId HFDataFrame::electronicsId_ [private]

Definition at line 51 of file HFDataFrame.h.

Referenced by elecId(), and setReadoutIds().

int HFDataFrame::hcalPresamples_ [private]

Definition at line 53 of file HFDataFrame.h.

Referenced by presamples(), setPresamples(), setZSInfo(), zsMarkAndPass(), and zsUnsuppressed().

HcalDetId HFDataFrame::id_ [private]

Definition at line 50 of file HFDataFrame.h.

Referenced by id().

const int HFDataFrame::MAXSAMPLES = 10 [static]

Definition at line 48 of file HFDataFrame.h.

Referenced by setSize().

int HFDataFrame::size_ [private]

Definition at line 52 of file HFDataFrame.h.

Referenced by setSize(), size(), and validate().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:10 2009 for CMSSW by  doxygen 1.5.4