CMS 3D CMS Logo

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

#include <QIE10DataFrame.h>

Classes

class  Sample
 

Public Member Functions

constexpr edm::DataFrame::iterator begin ()
 iterators More...
 
constexpr edm::DataFrame::const_iterator begin () const
 
constexpr void copyContent (const QIE10DataFrame &digi)
 
constexpr DetId detid () const
 Get the detector id. More...
 
constexpr edm::DataFrame::iterator end ()
 
constexpr edm::DataFrame::const_iterator end () const
 
constexpr uint16_t flags () const
 get the flag word More...
 
constexpr int flavor () const
 
constexpr edm::DataFrame::id_type id () const
 
constexpr bool linkError () const
 
constexpr Sample operator[] (edm::DataFrame::size_type i) const
 get the sample More...
 
constexpr int presamples () const
 for backward compatibility More...
 
constexpr QIE10DataFrame ()
 
constexpr QIE10DataFrame (edm::DataFrame const &df)
 
constexpr int samples () const
 total number of samples in the digi More...
 
constexpr void setFlags (uint16_t v)
 set the flag word More...
 
constexpr void setSample (edm::DataFrame::size_type isample, int adc, int le_tdc, int te_tdc, int capid, bool soi=false, bool ok=true)
 set the sample contents More...
 
constexpr void setZSInfo (bool markAndPass)
 set ZS params More...
 
constexpr edm::DataFrame::size_type size () const
 more accessors More...
 
constexpr bool zsMarkAndPass () const
 

Static Public Attributes

static const int FLAG_WORDS = 1
 
static const int HEADER_WORDS = 1
 
static const int MASK_FLAVOR = 0x7
 
static const int MASK_LINKERROR = 0x800
 was there a link error? More...
 
static const int MASK_MARKPASS = 0x100
 was this a mark-and-pass ZS event? More...
 
static const int OFFSET_FLAVOR = 12
 get the flavor of the frame More...
 
static const int WORDS_PER_SAMPLE = 2
 

Private Attributes

edm::DataFrame m_data
 

Detailed Description

Precision readout digi from QIE10 including TDC information

Definition at line 11 of file QIE10DataFrame.h.

Constructor & Destructor Documentation

◆ QIE10DataFrame() [1/2]

constexpr QIE10DataFrame::QIE10DataFrame ( )
inlineconstexpr

Definition at line 17 of file QIE10DataFrame.h.

17 {}

◆ QIE10DataFrame() [2/2]

constexpr QIE10DataFrame::QIE10DataFrame ( edm::DataFrame const &  df)
inlineconstexpr

Definition at line 18 of file QIE10DataFrame.h.

18 : m_data(df) {}

Member Function Documentation

◆ begin() [1/2]

constexpr edm::DataFrame::iterator QIE10DataFrame::begin ( void  )
inlineconstexpr

iterators

Definition at line 81 of file QIE10DataFrame.h.

81 { return m_data.begin(); }

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

Referenced by UHTRpacker::addChannel().

◆ begin() [2/2]

constexpr edm::DataFrame::const_iterator QIE10DataFrame::begin ( void  ) const
inlineconstexpr

Definition at line 83 of file QIE10DataFrame.h.

83 { return m_data.begin(); }

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

◆ copyContent()

constexpr void QIE10DataFrame::copyContent ( const QIE10DataFrame digi)
inlineconstexpr

Definition at line 68 of file QIE10DataFrame.h.

68  {
69  for (edm::DataFrame::size_type i = 0; i < size() && i < digi.size(); i++) {
70  Sample sam = digi[i];
71  setSample(i, sam.adc(), sam.le_tdc(), sam.te_tdc(), sam.capid(), sam.soi(), sam.ok());
72  }
73  }

References QIE10DataFrame::Sample::adc(), QIE10DataFrame::Sample::capid(), mps_fire::i, QIE10DataFrame::Sample::le_tdc(), QIE10DataFrame::Sample::ok(), setSample(), size(), QIE10DataFrame::Sample::soi(), and QIE10DataFrame::Sample::te_tdc().

◆ detid()

constexpr DetId QIE10DataFrame::detid ( ) const
inlineconstexpr

◆ end() [1/2]

constexpr edm::DataFrame::iterator QIE10DataFrame::end ( void  )
inlineconstexpr

Definition at line 82 of file QIE10DataFrame.h.

82 { return m_data.end(); }

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

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

◆ end() [2/2]

constexpr edm::DataFrame::const_iterator QIE10DataFrame::end ( void  ) const
inlineconstexpr

Definition at line 84 of file QIE10DataFrame.h.

84 { return m_data.end(); }

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

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

◆ flags()

constexpr uint16_t QIE10DataFrame::flags ( ) const
inlineconstexpr

get the flag word

Definition at line 126 of file QIE10DataFrame.h.

126 { return m_data[size() - 1]; }

References m_data, and size().

◆ flavor()

constexpr int QIE10DataFrame::flavor ( ) const
inlineconstexpr

Definition at line 98 of file QIE10DataFrame.h.

98 { return ((m_data[0] >> OFFSET_FLAVOR) & MASK_FLAVOR); }

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

◆ id()

constexpr edm::DataFrame::id_type QIE10DataFrame::id ( ) const
inlineconstexpr

◆ linkError()

constexpr bool QIE10DataFrame::linkError ( ) const
inlineconstexpr

◆ operator[]()

constexpr Sample QIE10DataFrame::operator[] ( edm::DataFrame::size_type  i) const
inlineconstexpr

get the sample

Definition at line 111 of file QIE10DataFrame.h.

111  {
112  return Sample(m_data, i * WORDS_PER_SAMPLE + HEADER_WORDS);
113  }

References HEADER_WORDS, mps_fire::i, m_data, and WORDS_PER_SAMPLE.

◆ presamples()

constexpr int QIE10DataFrame::presamples ( ) const
inlineconstexpr

for backward compatibility

Definition at line 88 of file QIE10DataFrame.h.

88  {
89  for (int i = 0; i < samples(); i++) {
90  if ((*this)[i].soi())
91  return i;
92  }
93  return -1;
94  }

References mps_fire::i, and samples().

Referenced by LaserTask::_process(), and HcalDigiToRawuHTR::produce().

◆ samples()

constexpr int QIE10DataFrame::samples ( ) const
inlineconstexpr

◆ setFlags()

constexpr void QIE10DataFrame::setFlags ( uint16_t  v)
inlineconstexpr

set the flag word

Definition at line 128 of file QIE10DataFrame.h.

128 { m_data[size() - 1] = v; }

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

◆ setSample()

constexpr void QIE10DataFrame::setSample ( edm::DataFrame::size_type  isample,
int  adc,
int  le_tdc,
int  te_tdc,
int  capid,
bool  soi = false,
bool  ok = true 
)
inlineconstexpr

◆ setZSInfo()

constexpr void QIE10DataFrame::setZSInfo ( bool  markAndPass)
inlineconstexpr

set ZS params

Definition at line 106 of file QIE10DataFrame.h.

106  {
107  if (markAndPass)
108  m_data[0] |= MASK_MARKPASS;
109  }

References m_data, DigiNZS_cff::markAndPass, and MASK_MARKPASS.

Referenced by HcalZeroSuppressionAlgo::suppress().

◆ size()

constexpr edm::DataFrame::size_type QIE10DataFrame::size ( void  ) const
inlineconstexpr

◆ zsMarkAndPass()

constexpr bool QIE10DataFrame::zsMarkAndPass ( ) const
inlineconstexpr

Definition at line 104 of file QIE10DataFrame.h.

104 { return m_data[0] & MASK_MARKPASS; }

References m_data, and MASK_MARKPASS.

Referenced by operator<<().

Member Data Documentation

◆ FLAG_WORDS

const int QIE10DataFrame::FLAG_WORDS = 1
static

Definition at line 15 of file QIE10DataFrame.h.

Referenced by UHTRpacker::addChannel(), and samples().

◆ HEADER_WORDS

const int QIE10DataFrame::HEADER_WORDS = 1
static

Definition at line 14 of file QIE10DataFrame.h.

Referenced by UHTRpacker::addChannel(), operator[](), samples(), and setSample().

◆ m_data

edm::DataFrame QIE10DataFrame::m_data
private

◆ MASK_FLAVOR

const int QIE10DataFrame::MASK_FLAVOR = 0x7
static

Definition at line 97 of file QIE10DataFrame.h.

Referenced by flavor().

◆ MASK_LINKERROR

const int QIE10DataFrame::MASK_LINKERROR = 0x800
static

was there a link error?

Definition at line 100 of file QIE10DataFrame.h.

Referenced by linkError().

◆ MASK_MARKPASS

const int QIE10DataFrame::MASK_MARKPASS = 0x100
static

was this a mark-and-pass ZS event?

Definition at line 103 of file QIE10DataFrame.h.

Referenced by setZSInfo(), and zsMarkAndPass().

◆ OFFSET_FLAVOR

const int QIE10DataFrame::OFFSET_FLAVOR = 12
static

get the flavor of the frame

Definition at line 96 of file QIE10DataFrame.h.

Referenced by flavor().

◆ WORDS_PER_SAMPLE

const int QIE10DataFrame::WORDS_PER_SAMPLE = 2
static

Definition at line 13 of file QIE10DataFrame.h.

Referenced by operator[](), QIE10DataFrame::Sample::raw(), samples(), and setSample().

ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
mps_fire.i
i
Definition: mps_fire.py:355
QIE10DataFrame::Sample::OFFSET_CAPID
static const int OFFSET_CAPID
Definition: QIE10DataFrame.h:42
QIE10DataFrame::samples
constexpr int samples() const
total number of samples in the digi
Definition: QIE10DataFrame.h:86
QIE10DataFrame::size
constexpr edm::DataFrame::size_type size() const
more accessors
Definition: QIE10DataFrame.h:79
QIE10DataFrame::m_data
edm::DataFrame m_data
Definition: QIE10DataFrame.h:131
findQualityFiles.v
v
Definition: findQualityFiles.py:179
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
QIE10DataFrame::Sample::MASK_CAPID
static const int MASK_CAPID
Definition: QIE10DataFrame.h:41
QIE10DataFrame::Sample::MASK_OK
static const int MASK_OK
Definition: QIE10DataFrame.h:40
DetId
Definition: DetId.h:17
QIE10DataFrame::Sample::OFFSET_TE_TDC
static const int OFFSET_TE_TDC
Definition: QIE10DataFrame.h:38
QIE10DataFrame::WORDS_PER_SAMPLE
static const int WORDS_PER_SAMPLE
Definition: QIE10DataFrame.h:13
QIE10DataFrame::MASK_MARKPASS
static const int MASK_MARKPASS
was this a mark-and-pass ZS event?
Definition: QIE10DataFrame.h:103
DigiNZS_cff.markAndPass
markAndPass
Definition: DigiNZS_cff.py:6
QIE10DataFrame::Sample::MASK_ADC
static const int MASK_ADC
Definition: QIE10DataFrame.h:35
edm::DataFrame::size_type
unsigned int size_type
Definition: DataFrame.h:17
QIE10DataFrame::MASK_LINKERROR
static const int MASK_LINKERROR
was there a link error?
Definition: QIE10DataFrame.h:100
QIE10DataFrame::MASK_FLAVOR
static const int MASK_FLAVOR
Definition: QIE10DataFrame.h:97
QIE10DataFrame::Sample::MASK_TE_TDC
static const int MASK_TE_TDC
Definition: QIE10DataFrame.h:37
QIE10DataFrame::setSample
constexpr void setSample(edm::DataFrame::size_type isample, int adc, int le_tdc, int te_tdc, int capid, bool soi=false, bool ok=true)
set the sample contents
Definition: QIE10DataFrame.h:115
edm::DataFrame::end
constexpr iterator end()
Definition: DataFrame.h:35
QIE10DataFrame::Sample::MASK_SOI
static const int MASK_SOI
Definition: QIE10DataFrame.h:39
QIE10DataFrame::FLAG_WORDS
static const int FLAG_WORDS
Definition: QIE10DataFrame.h:15
QIE10DataFrame::Sample::MASK_LE_TDC
static const int MASK_LE_TDC
Definition: QIE10DataFrame.h:36
edm::DataFrame::size
constexpr size_type size() const
Definition: DataFrame.h:43
QIE10DataFrame::HEADER_WORDS
static const int HEADER_WORDS
Definition: QIE10DataFrame.h:14
edm::DataFrame::id
constexpr id_type id() const
Definition: DataFrame.h:41
edm::DataFrame::begin
constexpr iterator begin()
Definition: DataFrame.h:33
QIE10DataFrame::OFFSET_FLAVOR
static const int OFFSET_FLAVOR
get the flavor of the frame
Definition: QIE10DataFrame.h:96