CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Protected Attributes
HcalUHTRData Class Reference

#include <HcalUHTRData.h>

Classes

class  const_iterator
 

Public Member Functions

const_iterator begin () const
 
uint32_t boardId () const
 Get the raw board id. More...
 
uint32_t bunchNumber () const
 Get the HTR bunch number. More...
 
uint32_t crateId () const
 Get the board crate. More...
 
const_iterator end () const
 
int getEventType () const
 Get the event type. More...
 
int getFirmwareFlavor () const
 Get the HTR firmware flavor. More...
 
unsigned int getFirmwareRevision () const
 Get the HTR firmware version. More...
 
int getFormatVersion () const
 Get the version number of this event. More...
 
const unsigned short * getRawData16 () const
 Get a pointer to the raw data. More...
 
const int getRawLengthBytes () const
 Get the length of the raw data. More...
 
 HcalUHTRData ()
 
 HcalUHTRData (int version_to_create)
 
 HcalUHTRData (const uint64_t *data, int length_words)
 
 HcalUHTRData (const HcalUHTRData &)
 
uint32_t l1ANumber () const
 Get the HTR event number. More...
 
HcalUHTRDataoperator= (const HcalUHTRData &)
 
uint32_t orbitNumber () const
 Get the HTR orbit number. More...
 
uint32_t presamples () const
 Get the presamples. More...
 
uint32_t slot () const
 Get the board slot. More...
 
bool wasMarkAndPassZS (int fiber, int fiberchan) const
 Was this channel passed as part of Mark&Pass ZS? More...
 
bool wasMarkAndPassZSTP (int slb, int slbchan) const
 Was this channel passed as part of Mark&Pass ZS? More...
 
 ~HcalUHTRData ()
 

Static Public Attributes

static const int CHANNELS_PER_FIBER_HBHE = 6
 
static const int CHANNELS_PER_FIBER_HF = 4
 
static const int CHANNELS_PER_FIBER_MAX = 8
 
static const int FIBERS_PER_UHTR = 24
 

Protected Attributes

int m_formatVersion
 
uint64_t * m_ownData
 
const uint16_t * m_raw16
 
const uint64_t * m_raw64
 
int m_rawLength64
 

Detailed Description

Interpretive class for HcalUHTRData Since this class requires external specification of the length of the data, it is implemented as an interpreter, rather than a cast-able header class.

Author
J. Mans - UMN

Definition at line 16 of file HcalUHTRData.h.

Constructor & Destructor Documentation

HcalUHTRData::HcalUHTRData ( )

Definition at line 107 of file HcalUHTRData.cc.

Referenced by ~HcalUHTRData().

107 : m_formatVersion(-2), m_rawLength64(0), m_raw64(0), m_raw16(0), m_ownData(0) { }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint64_t * m_ownData
Definition: HcalUHTRData.h:116
HcalUHTRData::~HcalUHTRData ( )
inline

Definition at line 24 of file HcalUHTRData.h.

References data, HcalUHTRData(), m_ownData, and operator=().

24 { if (m_ownData!=0) delete [] m_ownData; }
uint64_t * m_ownData
Definition: HcalUHTRData.h:116
HcalUHTRData::HcalUHTRData ( int  version_to_create)

Definition at line 115 of file HcalUHTRData.cc.

References CHANNELS_PER_FIBER_MAX, FIBERS_PER_UHTR, m_ownData, m_raw16, m_raw64, and m_rawLength64.

115  : m_formatVersion(version_to_create) {
116 
117  // the needed space is for the biggest possible event...
118  // fibers*maxsamples/fiber
119  const int needed=(0x20+FIBERS_PER_UHTR*CHANNELS_PER_FIBER_MAX*(10+1))*sizeof(uint16_t)/sizeof(uint64_t);
120 
121  m_ownData=new uint64_t[needed];
122  memset(m_ownData,0,sizeof(uint64_t)*needed);
123  m_rawLength64=0;
125  m_raw16=(const uint16_t*)m_raw64;
126 }
static const int CHANNELS_PER_FIBER_MAX
Definition: HcalUHTRData.h:21
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
static const int FIBERS_PER_UHTR
Definition: HcalUHTRData.h:18
unsigned long long uint64_t
Definition: Time.h:15
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint64_t * m_ownData
Definition: HcalUHTRData.h:116
HcalUHTRData::HcalUHTRData ( const uint64_t *  data,
int  length_words 
)

Definition at line 109 of file HcalUHTRData.cc.

References m_formatVersion, and m_raw16.

109  : m_rawLength64(length),m_raw64(data),m_raw16((const uint16_t*)(data)),m_ownData(0) {
110  m_formatVersion=(m_raw16[6]>>12)&0xF;
111 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint64_t * m_ownData
Definition: HcalUHTRData.h:116
HcalUHTRData::HcalUHTRData ( const HcalUHTRData hd)

Definition at line 113 of file HcalUHTRData.cc.

const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint64_t * m_ownData
Definition: HcalUHTRData.h:116

Member Function Documentation

HcalUHTRData::const_iterator HcalUHTRData::begin ( void  ) const

Definition at line 99 of file HcalUHTRData.cc.

References HEADER_LENGTH_16BIT, m_raw16, and m_rawLength64.

99  {
101 }
static const int HEADER_LENGTH_16BIT
Definition: HcalUHTRData.cc:4
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
unsigned long long uint64_t
Definition: Time.h:15
uint32_t HcalUHTRData::boardId ( ) const
inline

Get the raw board id.

Definition at line 92 of file HcalUHTRData.h.

References m_raw64.

92 { return uint32_t(m_raw64[1])&0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint32_t HcalUHTRData::bunchNumber ( ) const
inline

Get the HTR bunch number.

Definition at line 86 of file HcalUHTRData.h.

References m_raw64.

86 { return uint32_t(m_raw64[0]>>20)&0xFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint32_t HcalUHTRData::crateId ( ) const
inline

Get the board crate.

Definition at line 94 of file HcalUHTRData.h.

References m_raw64.

94 { return uint32_t(m_raw64[1])&0xFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
HcalUHTRData::const_iterator HcalUHTRData::end ( void  ) const

Definition at line 103 of file HcalUHTRData.cc.

References m_raw16, and m_rawLength64.

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

103  {
104  return HcalUHTRData::const_iterator(m_raw16+(m_rawLength64-1)*sizeof(uint64_t)/sizeof(uint16_t),m_raw16+(m_rawLength64-1)*sizeof(uint64_t)/sizeof(uint16_t));
105 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
unsigned long long uint64_t
Definition: Time.h:15
int HcalUHTRData::getEventType ( ) const
inline

Get the event type.

Definition at line 90 of file HcalUHTRData.h.

References m_raw64.

Referenced by HLTHcalCalibTypeFilter::filter().

90 { return uint32_t(m_raw64[1]>>40)&0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
int HcalUHTRData::getFirmwareFlavor ( ) const
inline

Get the HTR firmware flavor.

Definition at line 108 of file HcalUHTRData.h.

References m_raw64.

108 { return uint32_t(m_raw64[1]>>32)&0xFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
unsigned int HcalUHTRData::getFirmwareRevision ( ) const
inline

Get the HTR firmware version.

Definition at line 106 of file HcalUHTRData.h.

References m_raw64.

106 { return uint32_t(m_raw64[1]>>48)&0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
int HcalUHTRData::getFormatVersion ( ) const
inline

Get the version number of this event.

Definition at line 32 of file HcalUHTRData.h.

References m_formatVersion.

32 { return m_formatVersion; }
const unsigned short* HcalUHTRData::getRawData16 ( ) const
inline

Get a pointer to the raw data.

Definition at line 35 of file HcalUHTRData.h.

References m_raw16.

35 { return m_raw16; }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
const int HcalUHTRData::getRawLengthBytes ( ) const
inline

Get the length of the raw data.

Definition at line 38 of file HcalUHTRData.h.

References m_rawLength64.

38 { return m_rawLength64*sizeof(uint64_t); }
unsigned long long uint64_t
Definition: Time.h:15
uint32_t HcalUHTRData::l1ANumber ( ) const
inline

Get the HTR event number.

Definition at line 84 of file HcalUHTRData.h.

References m_raw64.

Referenced by RawTask::_process().

84 { return uint32_t(m_raw64[0]>>32)&0xFFFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
HcalUHTRData & HcalUHTRData::operator= ( const HcalUHTRData hd)

Definition at line 128 of file HcalUHTRData.cc.

References m_formatVersion, m_ownData, m_raw16, m_raw64, and m_rawLength64.

Referenced by ~HcalUHTRData().

128  {
129  if (m_ownData==0) {
132  m_raw64=hd.m_raw64;
133  m_raw16=hd.m_raw16;
134  }
135  return (*this);
136 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:115
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint64_t * m_ownData
Definition: HcalUHTRData.h:116
uint32_t HcalUHTRData::orbitNumber ( ) const
inline

Get the HTR orbit number.

Definition at line 88 of file HcalUHTRData.h.

References m_raw64.

88 { return uint32_t(m_raw64[1]>>16)&0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint32_t HcalUHTRData::presamples ( ) const
inline

Get the presamples.

Definition at line 98 of file HcalUHTRData.h.

References m_raw64, slb(), wasMarkAndPassZS(), and wasMarkAndPassZSTP().

98 { return uint32_t(m_raw64[1]>>12)&0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
uint32_t HcalUHTRData::slot ( void  ) const
inline

Get the board slot.

Definition at line 96 of file HcalUHTRData.h.

References m_raw64.

96 { return uint32_t(m_raw64[1]>>8)&0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:114
bool HcalUHTRData::wasMarkAndPassZS ( int  fiber,
int  fiberchan 
) const

Was this channel passed as part of Mark&Pass ZS?

Referenced by presamples().

bool HcalUHTRData::wasMarkAndPassZSTP ( int  slb,
int  slbchan 
) const

Was this channel passed as part of Mark&Pass ZS?

Referenced by presamples().

Member Data Documentation

const int HcalUHTRData::CHANNELS_PER_FIBER_HBHE = 6
static

Definition at line 20 of file HcalUHTRData.h.

const int HcalUHTRData::CHANNELS_PER_FIBER_HF = 4
static

Definition at line 19 of file HcalUHTRData.h.

const int HcalUHTRData::CHANNELS_PER_FIBER_MAX = 8
static

Definition at line 21 of file HcalUHTRData.h.

Referenced by HcalUHTRData().

const int HcalUHTRData::FIBERS_PER_UHTR = 24
static

Definition at line 18 of file HcalUHTRData.h.

Referenced by HcalUHTRData().

int HcalUHTRData::m_formatVersion
protected

Definition at line 112 of file HcalUHTRData.h.

Referenced by getFormatVersion(), HcalUHTRData(), and operator=().

uint64_t* HcalUHTRData::m_ownData
protected

Definition at line 116 of file HcalUHTRData.h.

Referenced by HcalUHTRData(), operator=(), and ~HcalUHTRData().

const uint16_t* HcalUHTRData::m_raw16
protected

Definition at line 115 of file HcalUHTRData.h.

Referenced by begin(), end(), getRawData16(), HcalUHTRData(), and operator=().

const uint64_t* HcalUHTRData::m_raw64
protected
int HcalUHTRData::m_rawLength64
protected

Definition at line 113 of file HcalUHTRData.h.

Referenced by begin(), end(), getRawLengthBytes(), HcalUHTRData(), and operator=().