CMS 3D CMS Logo

HODataFrame Class Reference

Precision readout digi for HO. More...

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

List of all members.

Public Types

typedef HcalDetId key_type
 For the sorted collection.

Public Member Functions

const HcalElectronicsIdelecId () const
 HODataFrame (const HcalDetId &id)
 HODataFrame ()
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 HO.

Definition at line 16 of file HODataFrame.h.


Member Typedef Documentation

typedef HcalDetId HODataFrame::key_type

For the sorted collection.

Definition at line 18 of file HODataFrame.h.


Constructor & Destructor Documentation

HODataFrame::HODataFrame (  ) 

Definition at line 4 of file HODataFrame.cc.

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

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

Definition at line 10 of file HODataFrame.cc.

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


Member Function Documentation

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

Definition at line 24 of file HODataFrame.h.

References electronicsId_.

Referenced by HcalDigiMonitor::processEvent().

00024 { return electronicsId_; }

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

Definition at line 23 of file HODataFrame.h.

References id_.

Referenced by HcalNominalCoder::adc2fC(), HcalPedestalsAnalysis::analyze(), operator<<(), HcalLaserMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalLEDMonitor::processEvent(), HcalPedestalAnalysis::processEvent(), HcalPedestalMonitor::processEvent(), HcalMTCCMonitor::processEvent(), HcalExpertMonitor::processEvent_Digi(), HcalDeadCellMonitor::processEvent_digi(), HcalHotCellMonitor::processEvent_pedestal(), and HcalLedAnalysis::processLedEvent().

00023 { return id_; }

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

access a sample

Definition at line 36 of file HODataFrame.h.

References data_.

00036 { return data_[i]; }

int HODataFrame::presamples (  )  const [inline]

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

Definition at line 29 of file HODataFrame.h.

References hcalPresamples_.

Referenced by HcalNominalCoder::adc2fC(), operator<<(), and HcalDigiMonitor::processEvent().

00029 { return hcalPresamples_&0xF; }

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

access a sample

Definition at line 38 of file HODataFrame.h.

References data_.

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

00038 { return data_[i]; }

void HODataFrame::setPresamples ( int  ps  ) 

Definition at line 23 of file HODataFrame.cc.

References hcalPresamples_.

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

void HODataFrame::setReadoutIds ( const HcalElectronicsId eid  ) 

Definition at line 26 of file HODataFrame.cc.

References electronicsId_.

00026                                                             {
00027   electronicsId_=eid;
00028 }

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

Definition at line 46 of file HODataFrame.h.

References data_.

00046 { data_[i]=sam; }

void HODataFrame::setSize ( int  size  ) 

Definition at line 18 of file HODataFrame.cc.

References MAXSAMPLES, and size_.

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

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

Definition at line 42 of file HODataFrame.cc.

References hcalPresamples_.

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

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

total number of samples in the digi

Definition at line 27 of file HODataFrame.h.

References size_.

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

00027 { return size_&0xF; }

bool HODataFrame::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 30 of file HODataFrame.cc.

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

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

bool HODataFrame::zsMarkAndPass (  )  const [inline]

was ZS MarkAndPass?

Definition at line 31 of file HODataFrame.h.

References hcalPresamples_.

Referenced by operator<<().

00031 { return (hcalPresamples_&0x10); }

bool HODataFrame::zsUnsuppressed (  )  const [inline]

was ZS unsuppressed?

Definition at line 33 of file HODataFrame.h.

References hcalPresamples_.

Referenced by operator<<().

00033 { return (hcalPresamples_&0x20); }


Member Data Documentation

HcalQIESample HODataFrame::data_[MAXSAMPLES] [private]

Definition at line 55 of file HODataFrame.h.

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

HcalElectronicsId HODataFrame::electronicsId_ [private]

Definition at line 52 of file HODataFrame.h.

Referenced by elecId(), and setReadoutIds().

int HODataFrame::hcalPresamples_ [private]

Definition at line 54 of file HODataFrame.h.

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

HcalDetId HODataFrame::id_ [private]

Definition at line 51 of file HODataFrame.h.

Referenced by id().

const int HODataFrame::MAXSAMPLES = 10 [static]

Definition at line 49 of file HODataFrame.h.

Referenced by setSize().

int HODataFrame::size_ [private]

Definition at line 53 of file HODataFrame.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:45 2009 for CMSSW by  doxygen 1.5.4