CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

constexpr edm::DataFrame::iterator begin ()
 iterators More...
 
constexpr
edm::DataFrame::const_iterator 
begin () const
 
constexpr bool capidError () const
 
constexpr void copyContent (const QIE11DataFrame &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
 get the flavor of the frame More...
 
constexpr edm::DataFrame::id_type id () const
 
constexpr bool linkError () const
 was there a link error? More...
 
constexpr Sample operator[] (edm::DataFrame::size_type i) const
 get the sample More...
 
constexpr int presamples () const
 for backward compatibility More...
 
constexpr QIE11DataFrame ()
 
constexpr QIE11DataFrame (edm::DataFrame const &df)
 
constexpr int samples () const
 total number of samples in the digi More...
 
constexpr void setCapid0 (int cap0)
 
constexpr void setFlags (uint16_t v)
 set the flag word More...
 
constexpr void setFlavor (int flavor)
 
constexpr void setSample (edm::DataFrame::size_type isample, int adc, int tdc, bool soi=false)
 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
 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

constexpr QIE11DataFrame::QIE11DataFrame ( )
inline

Definition at line 22 of file QIE11DataFrame.h.

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

Definition at line 23 of file QIE11DataFrame.h.

Member Function Documentation

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

iterators

Definition at line 72 of file QIE11DataFrame.h.

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

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

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

Definition at line 74 of file QIE11DataFrame.h.

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

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

Definition at line 92 of file QIE11DataFrame.h.

References m_data, and MASK_CAPIDERROR.

Referenced by operator<<().

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

Definition at line 59 of file QIE11DataFrame.h.

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

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

Definition at line 73 of file QIE11DataFrame.h.

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

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

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

Definition at line 75 of file QIE11DataFrame.h.

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

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

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

get the flag word

Definition at line 133 of file QIE11DataFrame.h.

References m_data, and size().

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

get the flavor of the frame

Definition at line 87 of file QIE11DataFrame.h.

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

Referenced by operator<<(), UHTRpacker::packQIE11header(), setCapid0(), setSample(), and zsMarkAndPass().

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

was there a link error?

Definition at line 89 of file QIE11DataFrame.h.

References m_data, and MASK_LINKERROR.

Referenced by operator<<().

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

get the sample

Definition at line 101 of file QIE11DataFrame.h.

References HEADER_WORDS, and m_data.

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

for backward compatibility

Definition at line 79 of file QIE11DataFrame.h.

References mps_fire::i, and samples().

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

79  {
80  for (int i = 0; i < samples(); i++) {
81  if ((*this)[i].soi())
82  return i;
83  }
84  return -1;
85  }
constexpr int samples() const
total number of samples in the digi
constexpr int QIE11DataFrame::samples ( ) const
inline
constexpr void QIE11DataFrame::setCapid0 ( int  cap0)
inline

Definition at line 109 of file QIE11DataFrame.h.

References flavor(), FLAVOR_HB, 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().

Referenced by convertHB().

109  {
110  if (flavor() == FLAVOR_HB) {
111  for (int i = 0; i < samples(); i++) {
113  m_data[i + 1] |= ((cap0 + i) & Sample::MASK_CAPID) << Sample::OFFSET_CAPID_HB;
114  }
115  } else {
116  m_data[0] &= 0xFCFF; // inversion of the capid0 mask
118  }
119  }
static const int MASK_CAPID
static const int OFFSET_CAPID_HB
edm::DataFrame m_data
constexpr int samples() const
total number of samples in the digi
constexpr int flavor() const
get the flavor of the frame
static const int MASK_CAPID_INV_HB
static const int OFFSET_CAPID_HE
static const int FLAVOR_HB
constexpr void QIE11DataFrame::setFlags ( uint16_t  v)
inline

set the flag word

Definition at line 135 of file QIE11DataFrame.h.

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

135 { m_data[size() - 1] = v; }
constexpr edm::DataFrame::size_type size() const
more accessors
edm::DataFrame m_data
constexpr void QIE11DataFrame::setFlavor ( int  flavor)
inline

Definition at line 104 of file QIE11DataFrame.h.

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

Referenced by convertHB().

104  {
105  m_data[0] &= 0x9FFF; // inversion of flavor mask
106  m_data[0] |= ((flavor & MASK_FLAVOR) << OFFSET_FLAVOR);
107  }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
edm::DataFrame m_data
constexpr int flavor() const
get the flavor of the frame
constexpr void QIE11DataFrame::setSample ( edm::DataFrame::size_type  isample,
int  adc,
int  tdc,
bool  soi = false 
)
inline

set the sample contents

Definition at line 121 of file QIE11DataFrame.h.

References flavor(), FLAVOR_HB, 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, and size().

Referenced by convertHB(), copyContent(), and HcalTDC::timing().

121  {
122  if (isample >= size())
123  return;
124  if (flavor() == FLAVOR_HB)
125  m_data[isample + 1] = (adc & Sample::MASK_ADC) | (soi ? (Sample::MASK_SOI) : (0)) |
127  (m_data[isample + 1] & Sample::MASK_CAPID_KEEP_HB);
128  else
129  m_data[isample + 1] = (adc & Sample::MASK_ADC) | (soi ? (Sample::MASK_SOI) : (0)) |
131  }
constexpr edm::DataFrame::size_type size() const
more accessors
static const int MASK_ADC
edm::DataFrame m_data
static const int OFFSET_TDC
constexpr int flavor() const
get the flavor of the frame
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
uint16_t *__restrict__ uint16_t const *__restrict__ adc
constexpr void QIE11DataFrame::setZSInfo ( bool  markAndPass)
inline

set ZS params

Definition at line 96 of file QIE11DataFrame.h.

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

Referenced by HcalZeroSuppressionAlgo::suppress().

96  {
97  if (markAndPass)
99  }
static const int MASK_FLAVOR
static const int OFFSET_FLAVOR
edm::DataFrame m_data
constexpr edm::DataFrame::size_type QIE11DataFrame::size ( void  ) const
inline

more accessors

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

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

was this a mark-and-pass ZS event?

Definition at line 94 of file QIE11DataFrame.h.

References flavor().

Referenced by operator<<().

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

Member Data Documentation

const int QIE11DataFrame::FLAG_WORDS = 1
static

Definition at line 15 of file QIE11DataFrame.h.

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

const int QIE11DataFrame::FLAVOR_HB = 3
static
const int QIE11DataFrame::HEADER_WORDS = 1
static
edm::DataFrame QIE11DataFrame::m_data
private
const int QIE11DataFrame::MASK_CAPIDERROR = 0x400
static

was there a capid rotation error?

Definition at line 91 of file QIE11DataFrame.h.

Referenced by capidError().

const int QIE11DataFrame::MASK_FLAVOR = 0x7
static

Definition at line 18 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::Sample::flavor(), flavor(), setFlavor(), and setZSInfo().

const int QIE11DataFrame::MASK_LINKERROR = 0x800
static

Definition at line 20 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::Sample::linkError(), and linkError().

const int QIE11DataFrame::OFFSET_FLAVOR = 12
static

Definition at line 17 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::Sample::flavor(), flavor(), setFlavor(), and setZSInfo().

const int QIE11DataFrame::WORDS_PER_SAMPLE = 1
static

Definition at line 13 of file QIE11DataFrame.h.

Referenced by samples().