CMS 3D CMS Logo

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

edm::DataFrame::iterator begin ()
 iterators More...
 
edm::DataFrame::const_iterator begin () const
 
void copyContent (const QIE10DataFrame &src)
 
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...
 
 QIE10DataFrame ()
 
 QIE10DataFrame (edm::DataFrame const &df)
 
int samples () const
 total number of samples in the digi More...
 
void setFlags (uint16_t v)
 set the flag word More...
 
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...
 
void setZSInfo (bool markAndPass)
 set ZS params More...
 
edm::DataFrame::size_type size () const
 more accessors More...
 
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::QIE10DataFrame ( )
inline

Definition at line 18 of file QIE10DataFrame.h.

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

Definition at line 19 of file QIE10DataFrame.h.

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

Member Function Documentation

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

iterators

Definition at line 51 of file QIE10DataFrame.h.

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

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

Definition at line 53 of file QIE10DataFrame.h.

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

53 { return m_data.begin(); }
edm::DataFrame m_data
iterator begin()
Definition: DataFrame.h:48
void QIE10DataFrame::copyContent ( const QIE10DataFrame src)

Definition at line 14 of file QIE10DataFrame.cc.

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

14  {
15  for (edm::DataFrame::size_type i=0; i<size() && i<digi.size();i++){
16  Sample sam = digi[i];
17  setSample(i, sam.adc(), sam.le_tdc(), sam.te_tdc(), sam.capid(), sam.soi(), sam.ok());
18  }
19 }
int i
Definition: DBlmapReader.cc:9
edm::DataFrame::size_type size() const
more accessors
unsigned int size_type
Definition: DataFrame.h:18
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
DetId QIE10DataFrame::detid ( ) const
inline

Get the detector id.

Definition at line 46 of file QIE10DataFrame.h.

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

Referenced by QIE10Task::_process(), and operator<<().

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

Definition at line 52 of file QIE10DataFrame.h.

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

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

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

Definition at line 54 of file QIE10DataFrame.h.

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

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

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

get the flag word

Definition at line 76 of file QIE10DataFrame.h.

References m_data, and size().

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

Definition at line 62 of file QIE10DataFrame.h.

References m_data, MASK_FLAVOR, and OFFSET_FLAVOR.

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

Definition at line 47 of file QIE10DataFrame.h.

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

Referenced by HcalZSAlgoRealistic::keepMe(), and HcalSimpleRecAlgo::reconstructQIE10().

47 { return m_data.id(); }
edm::DataFrame m_data
id_type id() const
Definition: DataFrame.h:61
bool QIE10DataFrame::linkError ( ) const
inline

Definition at line 65 of file QIE10DataFrame.h.

References m_data, and MASK_LINKERROR.

Referenced by operator<<().

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

get the sample

Definition at line 72 of file QIE10DataFrame.h.

References HEADER_WORDS, m_data, and WORDS_PER_SAMPLE.

72 { return Sample(m_data,i*WORDS_PER_SAMPLE+HEADER_WORDS); }
int i
Definition: DBlmapReader.cc:9
edm::DataFrame m_data
static const int WORDS_PER_SAMPLE
static const int HEADER_WORDS
int QIE10DataFrame::presamples ( ) const

for backward compatibility

Definition at line 21 of file QIE10DataFrame.cc.

References i, and samples().

21  {
22  for (int i=0; i<samples(); i++) {
23  if ((*this)[i].soi()) return i;
24  }
25  return -1;
26 }
int samples() const
total number of samples in the digi
int i
Definition: DBlmapReader.cc:9
int QIE10DataFrame::samples ( ) const
inline

total number of samples in the digi

Definition at line 56 of file QIE10DataFrame.h.

References FLAG_WORDS, HEADER_WORDS, size(), and WORDS_PER_SAMPLE.

Referenced by QIE10Task::_process(), DigiPhase1Task::_process(), operator<<(), and presamples().

static const int WORDS_PER_SAMPLE
edm::DataFrame::size_type size() const
more accessors
static const int FLAG_WORDS
static const int HEADER_WORDS
void QIE10DataFrame::setFlags ( uint16_t  v)

set the flag word

Definition at line 10 of file QIE10DataFrame.cc.

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

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

10  {
11  m_data[size()-1]=v;
12 }
edm::DataFrame m_data
edm::DataFrame::size_type size() const
more accessors
void QIE10DataFrame::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 at line 4 of file QIE10DataFrame.cc.

References HEADER_WORDS, m_data, QIE10DataFrame::Sample::MASK_ADC, QIE10DataFrame::Sample::MASK_CAPID, QIE10DataFrame::Sample::MASK_LE_TDC, QIE10DataFrame::Sample::MASK_OK, QIE10DataFrame::Sample::MASK_SOI, QIE10DataFrame::Sample::MASK_TE_TDC, QIE10DataFrame::Sample::OFFSET_CAPID, QIE10DataFrame::Sample::OFFSET_TE_TDC, size(), and WORDS_PER_SAMPLE.

Referenced by copyContent().

4  {
5  if (isample>=size()) return;
7  m_data[isample*WORDS_PER_SAMPLE+HEADER_WORDS+1]=(le_tdc&Sample::MASK_LE_TDC)|((te_tdc&Sample::MASK_TE_TDC)<<Sample::OFFSET_TE_TDC)|((capid&Sample::MASK_CAPID)<<Sample::OFFSET_CAPID)|0x4000; // 0x4000 marks this as second word of a pair
8 }
int adc(sample_type sample)
get the ADC sample (12 bits)
static const int MASK_OK
static const int MASK_SOI
static const int MASK_CAPID
static const int MASK_LE_TDC
edm::DataFrame m_data
static const int WORDS_PER_SAMPLE
edm::DataFrame::size_type size() const
more accessors
static const int MASK_ADC
static const int OFFSET_TE_TDC
static const int HEADER_WORDS
static const int MASK_TE_TDC
static const int OFFSET_CAPID
void QIE10DataFrame::setZSInfo ( bool  markAndPass)

set ZS params

Definition at line 28 of file QIE10DataFrame.cc.

References m_data, and MASK_MARKPASS.

Referenced by HcalZeroSuppressionAlgo::suppress().

28  {
29  if(markAndPass) m_data[0] |= MASK_MARKPASS;
30 }
edm::DataFrame m_data
static const int MASK_MARKPASS
was this a mark-and-pass ZS event?
edm::DataFrame::size_type QIE10DataFrame::size ( void  ) const
inline

more accessors

Definition at line 49 of file QIE10DataFrame.h.

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

Referenced by copyContent(), flags(), samples(), setFlags(), setSample(), and HcalZSAlgoRealistic::shouldKeep().

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

Definition at line 68 of file QIE10DataFrame.h.

References m_data, and MASK_MARKPASS.

Referenced by operator<<(), and HcalSimpleReconstructor::processUpgrade().

68 {return m_data[0]&MASK_MARKPASS; }
edm::DataFrame m_data
static const int MASK_MARKPASS
was this a mark-and-pass ZS event?

Member Data Documentation

const int QIE10DataFrame::FLAG_WORDS = 1
static

Definition at line 16 of file QIE10DataFrame.h.

Referenced by samples().

const int QIE10DataFrame::HEADER_WORDS = 1
static

Definition at line 15 of file QIE10DataFrame.h.

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

edm::DataFrame QIE10DataFrame::m_data
private
const int QIE10DataFrame::MASK_FLAVOR = 0x7
static

Definition at line 61 of file QIE10DataFrame.h.

Referenced by flavor().

const int QIE10DataFrame::MASK_LINKERROR = 0x800
static

was there a link error?

Definition at line 64 of file QIE10DataFrame.h.

Referenced by linkError().

const int QIE10DataFrame::MASK_MARKPASS = 0x100
static

was this a mark-and-pass ZS event?

Definition at line 67 of file QIE10DataFrame.h.

Referenced by setZSInfo(), and zsMarkAndPass().

const int QIE10DataFrame::OFFSET_FLAVOR = 12
static

get the flavor of the frame

Definition at line 60 of file QIE10DataFrame.h.

Referenced by flavor().

const int QIE10DataFrame::WORDS_PER_SAMPLE = 2
static

Definition at line 14 of file QIE10DataFrame.h.

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