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 &digi)
 
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
 get the flavor of the frame More...
 
edm::DataFrame::id_type id () const
 
bool linkError () const
 was there a link error? More...
 
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 FLAVOR_HB = 3
 
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
 
static const int OFFSET_FLAVOR = 12
 
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 23 of file QIE11DataFrame.h.

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

Definition at line 24 of file QIE11DataFrame.h.

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

Member Function Documentation

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

iterators

Definition at line 65 of file QIE11DataFrame.h.

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

Referenced by UHTRpacker::addChannel().

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

Definition at line 67 of file QIE11DataFrame.h.

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

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

Definition at line 84 of file QIE11DataFrame.h.

References m_data, and MASK_CAPIDERROR.

Referenced by operator<<().

84 { 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)
inline

Definition at line 52 of file QIE11DataFrame.h.

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

52  {
53  for (edm::DataFrame::size_type i=0; i<size() && i<digi.size();i++){
54  Sample sam = digi[i];
55  setSample(i,sam.adc(),sam.tdc(),sam.soi());
56  }
57  }
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

Get the detector id.

Definition at line 60 of file QIE11DataFrame.h.

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

Referenced by QIE11Task::_process(), PedestalTask::_process(), LEDTask::_process(), DigiTask::_process(), LaserTask::_process(), UHTRpacker::addChannel(), operator<<(), and HcalDigiToRawuHTR::produce().

60 { return DetId(m_data.id()); }
constexpr id_type id() const
Definition: DataFrame.h:61
edm::DataFrame m_data
Definition: DetId.h:18
edm::DataFrame::iterator QIE11DataFrame::end ( void  )
inline

Definition at line 66 of file QIE11DataFrame.h.

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

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

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

Definition at line 68 of file QIE11DataFrame.h.

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

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

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

get the flag word

Definition at line 112 of file QIE11DataFrame.h.

References m_data, and size().

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

get the flavor of the frame

Definition at line 79 of file QIE11DataFrame.h.

References m_data.

79 { return ((m_data[0]>>OFFSET_FLAVOR)&MASK_FLAVOR); }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
edm::DataFrame m_data
edm::DataFrame::id_type QIE11DataFrame::id ( ) const
inline
bool QIE11DataFrame::linkError ( ) const
inline

was there a link error?

Definition at line 81 of file QIE11DataFrame.h.

References m_data, and MASK_LINKERROR.

Referenced by operator<<().

81 { return m_data[0]&MASK_LINKERROR; }
static const int MASK_LINKERROR
edm::DataFrame m_data
Sample QIE11DataFrame::operator[] ( edm::DataFrame::size_type  i) const
inline

get the sample

Definition at line 92 of file QIE11DataFrame.h.

References m_data, and QIE11DataFrame::Sample::Sample().

92 { return Sample(m_data,i+HEADER_WORDS); }
static const int HEADER_WORDS
edm::DataFrame m_data
int QIE11DataFrame::presamples ( ) const
inline

for backward compatibility

Definition at line 72 of file QIE11DataFrame.h.

References mps_fire::i, and samples().

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

72  {
73  for (int i=0; i<samples(); i++) {
74  if ((*this)[i].soi()) return i;
75  }
76  return -1;
77  }
int samples() const
total number of samples in the digi
int QIE11DataFrame::samples ( ) const
inline
void QIE11DataFrame::setCapid0 ( int  cap0)
inline

Definition at line 93 of file QIE11DataFrame.h.

References QIE11DataFrame::Sample::flavor(), mps_fire::i, m_data, QIE11DataFrame::Sample::MASK_CAPID, QIE11DataFrame::Sample::MASK_CAPID_INV_HB, QIE11DataFrame::Sample::OFFSET_CAPID_HB, QIE11DataFrame::Sample::OFFSET_CAPID_HE, and samples().

93  {
94  if (flavor()==FLAVOR_HB) {
95  for (int i=0; i<samples(); i++) {
98  }
99  } else {
100  m_data[0]&=0xFCFF; // inversion of the capid0 mask
102  }
103  }
static const int MASK_CAPID
int flavor() const
get the flavor of the frame
static const int OFFSET_CAPID_HB
edm::DataFrame m_data
static const int MASK_CAPID_INV_HB
static const int OFFSET_CAPID_HE
int samples() const
total number of samples in the digi
static const int FLAVOR_HB
void QIE11DataFrame::setFlags ( uint16_t  v)
inline

set the flag word

Definition at line 114 of file QIE11DataFrame.h.

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

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

114  {
115  m_data[size()-1]=v;
116  }
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 
)
inline

set the sample contents

Definition at line 105 of file QIE11DataFrame.h.

References QIE11DataFrame::Sample::flavor(), m_data, QIE11DataFrame::Sample::MASK_ADC, QIE11DataFrame::Sample::MASK_CAPID_KEEP_HB, QIE11DataFrame::Sample::MASK_SOI, QIE11DataFrame::Sample::MASK_TDC_HB, QIE11DataFrame::Sample::MASK_TDC_HE, QIE11DataFrame::Sample::OFFSET_TDC, size(), and QIE11DataFrame::Sample::soi().

Referenced by copyContent().

106  {
107  if (isample>=size()) return;
109  else m_data[isample+1]=(adc&Sample::MASK_ADC)|(soi?(Sample::MASK_SOI):(0))|((tdc&Sample::MASK_TDC_HE)<<Sample::OFFSET_TDC);
110  }
edm::DataFrame::size_type size() const
more accessors
int flavor() const
get the flavor of the frame
static const int MASK_ADC
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
edm::DataFrame m_data
static const int OFFSET_TDC
static const int MASK_CAPID_KEEP_HB
static const int MASK_TDC_HB
static const int MASK_SOI
static const int FLAVOR_HB
static const int MASK_TDC_HE
void QIE11DataFrame::setZSInfo ( bool  markAndPass)
inline

set ZS params

Definition at line 88 of file QIE11DataFrame.h.

References m_data, and MASK_FLAVOR.

Referenced by HcalZeroSuppressionAlgo::suppress().

88  {
90  }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
edm::DataFrame m_data
edm::DataFrame::size_type QIE11DataFrame::size ( void  ) const
inline

more accessors

Definition at line 63 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().

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

was this a mark-and-pass ZS event?

Definition at line 86 of file QIE11DataFrame.h.

References QIE11DataFrame::Sample::flavor().

Referenced by operator<<().

86 {return (flavor()==1); }
int flavor() const
get the flavor of the frame

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::FLAVOR_HB = 3
static

Definition at line 20 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::Sample::tdc().

const int QIE11DataFrame::HEADER_WORDS = 1
static

Definition at line 15 of file QIE11DataFrame.h.

Referenced by UHTRpacker::addChannel(), and QIE11DataFrame::Sample::capid().

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

was there a capid rotation error?

Definition at line 83 of file QIE11DataFrame.h.

Referenced by capidError().

const int QIE11DataFrame::MASK_FLAVOR = 0x7
static

Definition at line 19 of file QIE11DataFrame.h.

Referenced by setZSInfo().

const int QIE11DataFrame::MASK_LINKERROR = 0x800
static

Definition at line 21 of file QIE11DataFrame.h.

Referenced by linkError().

const int QIE11DataFrame::OFFSET_FLAVOR = 12
static

Definition at line 18 of file QIE11DataFrame.h.

const int QIE11DataFrame::WORDS_PER_SAMPLE = 1
static

Definition at line 14 of file QIE11DataFrame.h.

Referenced by samples().