CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Private Attributes
QIE11DataFrame Class Reference

#include <QIE11DataFrame.h>

Classes

class  Sample
 

Public Member Functions

edm::DataFrame::iterator begin ()
 iterators More...
 
edm::DataFrame::const_iterator begin () const
 
bool capidError () const
 
void copyContent (const QIE11DataFrame &)
 
DetId detid () const
 Get the detector id. More...
 
edm::DataFrame::iterator end ()
 
edm::DataFrame::const_iterator end () const
 
uint16_t flags () const
 get the flag word More...
 
int flavor () const
 
edm::DataFrame::id_type id () const
 
bool linkError () const
 
Sample operator[] (edm::DataFrame::size_type i) const
 get the sample More...
 
int presamples () const
 for backward compatibility More...
 
 QIE11DataFrame ()
 
 QIE11DataFrame (edm::DataFrame const &df)
 
int samples () const
 total number of samples in the digi More...
 
void setCapid0 (int cap0)
 
void setFlags (uint16_t v)
 set the flag word More...
 
void setSample (edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
 set the sample contents More...
 
void setZSInfo (bool markAndPass)
 set ZS params More...
 
edm::DataFrame::size_type size () const
 more accessors More...
 
bool zsMarkAndPass () const
 was this a mark-and-pass ZS event? More...
 

Static Public Attributes

static const int FLAG_WORDS = 1
 
static const int HEADER_WORDS = 1
 
static const int MASK_CAPIDERROR = 0x400
 was there a capid rotation error? More...
 
static const int MASK_FLAVOR = 0x7
 
static const int MASK_LINKERROR = 0x800
 was there a link error? More...
 
static const int OFFSET_FLAVOR = 12
 get the flavor of the frame More...
 
static const int WORDS_PER_SAMPLE = 1
 

Private Attributes

edm::DataFrame m_data
 

Detailed Description

Precision readout digi from QIE11 including TDC information

Definition at line 11 of file QIE11DataFrame.h.

Constructor & Destructor Documentation

QIE11DataFrame::QIE11DataFrame ( )
inline

Definition at line 18 of file QIE11DataFrame.h.

18 { }
QIE11DataFrame::QIE11DataFrame ( edm::DataFrame const &  df)
inline

Definition at line 19 of file QIE11DataFrame.h.

19 : m_data(df) { }
edm::DataFrame m_data

Member Function Documentation

edm::DataFrame::iterator QIE11DataFrame::begin ( void  )
inline

iterators

Definition at line 47 of file QIE11DataFrame.h.

References edm::DataFrame::begin(), and m_data.

Referenced by UHTRpacker::addChannel().

47 { return m_data.begin(); }
iterator begin()
Definition: DataFrame.h:48
edm::DataFrame m_data
edm::DataFrame::const_iterator QIE11DataFrame::begin ( void  ) const
inline

Definition at line 49 of file QIE11DataFrame.h.

References edm::DataFrame::begin(), and m_data.

49 { return m_data.begin(); }
iterator begin()
Definition: DataFrame.h:48
edm::DataFrame m_data
bool QIE11DataFrame::capidError ( ) const
inline

Definition at line 64 of file QIE11DataFrame.h.

References m_data, and MASK_CAPIDERROR.

Referenced by operator<<().

64 { return m_data[0]&MASK_CAPIDERROR; }
static const int MASK_CAPIDERROR
was there a capid rotation error?
edm::DataFrame m_data
void QIE11DataFrame::copyContent ( const QIE11DataFrame digi)

Definition at line 13 of file QIE11DataFrame.cc.

References QIE11DataFrame::Sample::adc(), mps_fire::i, setSample(), size(), QIE11DataFrame::Sample::soi(), and QIE11DataFrame::Sample::tdc().

13  {
14  for (edm::DataFrame::size_type i=0; i<size() && i<digi.size();i++){
15  Sample sam = digi[i];
16  setSample(i,sam.adc(),sam.tdc(),sam.soi());
17  }
18 }
void setSample(edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
set the sample contents
edm::DataFrame::size_type size() const
more accessors
unsigned int size_type
Definition: DataFrame.h:18
DetId QIE11DataFrame::detid ( ) const
inline
edm::DataFrame::iterator QIE11DataFrame::end ( void  )
inline

Definition at line 48 of file QIE11DataFrame.h.

References edm::DataFrame::end(), and m_data.

Referenced by UHTRpacker::addChannel(), Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

48 { return m_data.end(); }
edm::DataFrame m_data
iterator end()
Definition: DataFrame.h:51
edm::DataFrame::const_iterator QIE11DataFrame::end ( void  ) const
inline

Definition at line 50 of file QIE11DataFrame.h.

References edm::DataFrame::end(), and m_data.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

50 { return m_data.end(); }
edm::DataFrame m_data
iterator end()
Definition: DataFrame.h:51
uint16_t QIE11DataFrame::flags ( ) const
inline

get the flag word

Definition at line 75 of file QIE11DataFrame.h.

References m_data, setFlags(), size(), and findQualityFiles::v.

75 { return m_data[size()-1]; }
edm::DataFrame::size_type size() const
more accessors
edm::DataFrame m_data
int QIE11DataFrame::flavor ( ) const
inline

Definition at line 58 of file QIE11DataFrame.h.

References m_data.

Referenced by zsMarkAndPass().

58 { return ((m_data[0]>>OFFSET_FLAVOR)&MASK_FLAVOR); }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
get the flavor of the frame
edm::DataFrame m_data
edm::DataFrame::id_type QIE11DataFrame::id ( ) const
inline
bool QIE11DataFrame::linkError ( ) const
inline

Definition at line 61 of file QIE11DataFrame.h.

References m_data, and MASK_LINKERROR.

Referenced by operator<<().

61 { return m_data[0]&MASK_LINKERROR; }
static const int MASK_LINKERROR
was there a link error?
edm::DataFrame m_data
Sample QIE11DataFrame::operator[] ( edm::DataFrame::size_type  i) const
inline
int QIE11DataFrame::presamples ( ) const

for backward compatibility

Definition at line 20 of file QIE11DataFrame.cc.

References mps_fire::i, and samples().

Referenced by HcalTriggerPrimitiveAlgo::addSignal(), HcalDigiToRawuHTR::produce(), and samples().

20  {
21  for (int i=0; i<samples(); i++) {
22  if ((*this)[i].soi()) return i;
23  }
24  return -1;
25 }
int samples() const
total number of samples in the digi
int QIE11DataFrame::samples ( ) const
inline
void QIE11DataFrame::setCapid0 ( int  cap0)

Definition at line 4 of file QIE11DataFrame.cc.

References m_data, QIE11DataFrame::Sample::MASK_CAPID, and QIE11DataFrame::Sample::OFFSET_CAPID.

Referenced by operator[]().

4  {
5  m_data[0]&=0xFCFF; // inversion of the capid0 mask
7 }
static const int OFFSET_CAPID
static const int MASK_CAPID
edm::DataFrame m_data
void QIE11DataFrame::setFlags ( uint16_t  v)

set the flag word

Definition at line 9 of file QIE11DataFrame.cc.

References m_data, size(), and findQualityFiles::v.

Referenced by Vispa.Plugins.EdmBrowser.EventContentView.LabelItem::__init__(), and flags().

9  {
10  m_data[size()-1]=v;
11 }
edm::DataFrame::size_type size() const
more accessors
edm::DataFrame m_data
void QIE11DataFrame::setSample ( edm::DataFrame::size_type  isample,
int  adc,
int  tdc,
bool  soi = false 
)

set the sample contents

Definition at line 31 of file QIE11DataFrame.cc.

References m_data, QIE11DataFrame::Sample::MASK_ADC, QIE11DataFrame::Sample::MASK_SOI, QIE11DataFrame::Sample::MASK_TDC, QIE11DataFrame::Sample::OFFSET_TDC, and size().

Referenced by copyContent(), operator[](), and HcaluLUTTPGCoder::update().

31  {
32  if (isample>=size()) return;
34 }
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::DataFrame::size_type size() const
more accessors
static const int MASK_ADC
static const int MASK_TDC
edm::DataFrame m_data
static const int OFFSET_TDC
static const int MASK_SOI
void QIE11DataFrame::setZSInfo ( bool  markAndPass)

set ZS params

Definition at line 27 of file QIE11DataFrame.cc.

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

Referenced by HcalZeroSuppressionAlgo::suppress(), and zsMarkAndPass().

27  {
29 }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
get the flavor of the frame
edm::DataFrame m_data
edm::DataFrame::size_type QIE11DataFrame::size ( void  ) const
inline

more accessors

Definition at line 45 of file QIE11DataFrame.h.

References m_data, and edm::DataFrame::size().

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), copyContent(), flags(), samples(), setFlags(), and setSample().

45 { return m_data.size(); }
edm::DataFrame m_data
size_type size() const
Definition: DataFrame.h:64
bool QIE11DataFrame::zsMarkAndPass ( ) const
inline

was this a mark-and-pass ZS event?

Definition at line 66 of file QIE11DataFrame.h.

References flavor(), hcalDigis_cfi::markAndPass, and setZSInfo().

Referenced by operator<<().

66 {return (flavor()==1); }
int flavor() const

Member Data Documentation

const int QIE11DataFrame::FLAG_WORDS = 1
static

Definition at line 16 of file QIE11DataFrame.h.

Referenced by UHTRpacker::addChannel().

const int QIE11DataFrame::HEADER_WORDS = 1
static

Definition at line 15 of file QIE11DataFrame.h.

Referenced by UHTRpacker::addChannel().

edm::DataFrame QIE11DataFrame::m_data
private
const int QIE11DataFrame::MASK_CAPIDERROR = 0x400
static

was there a capid rotation error?

Definition at line 63 of file QIE11DataFrame.h.

Referenced by capidError().

const int QIE11DataFrame::MASK_FLAVOR = 0x7
static

Definition at line 57 of file QIE11DataFrame.h.

Referenced by setZSInfo().

const int QIE11DataFrame::MASK_LINKERROR = 0x800
static

was there a link error?

Definition at line 60 of file QIE11DataFrame.h.

Referenced by linkError().

const int QIE11DataFrame::OFFSET_FLAVOR = 12
static

get the flavor of the frame

Definition at line 56 of file QIE11DataFrame.h.

Referenced by setZSInfo().

const int QIE11DataFrame::WORDS_PER_SAMPLE = 1
static

Definition at line 14 of file QIE11DataFrame.h.

Referenced by samples().