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
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...
 
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.

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(), 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
int i
Definition: DBlmapReader.cc:9
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 42 of file QIE11DataFrame.h.

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

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

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

Definition at line 48 of file QIE11DataFrame.h.

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

Referenced by 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 73 of file QIE11DataFrame.h.

References m_data, and size().

73 { 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, MASK_FLAVOR, and OFFSET_FLAVOR.

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

Definition at line 43 of file QIE11DataFrame.h.

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

43 { return m_data.id(); }
edm::DataFrame m_data
id_type id() const
Definition: DataFrame.h:61
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

get the sample

Definition at line 68 of file QIE11DataFrame.h.

References HEADER_WORDS, and m_data.

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

for backward compatibility

Definition at line 20 of file QIE11DataFrame.cc.

References i, and samples().

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

total number of samples in the digi

Definition at line 52 of file QIE11DataFrame.h.

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

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

static const int FLAG_WORDS
edm::DataFrame::size_type size() const
more accessors
static const int HEADER_WORDS
static const int WORDS_PER_SAMPLE
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.

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__().

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 27 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().

27  {
28  if (isample>=size()) return;
30 }
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
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 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().

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 samples().

const int QIE11DataFrame::HEADER_WORDS = 1
static

Definition at line 15 of file QIE11DataFrame.h.

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

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

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

const int QIE11DataFrame::WORDS_PER_SAMPLE = 1
static

Definition at line 14 of file QIE11DataFrame.h.

Referenced by samples().