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() [1/4]

HcalUHTRData::HcalUHTRData ( )

Definition at line 146 of file HcalUHTRData.cc.

147  : m_formatVersion(-2), m_rawLength64(0), m_raw64(nullptr), m_raw16(nullptr), m_ownData(nullptr) {}
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

◆ ~HcalUHTRData()

HcalUHTRData::~HcalUHTRData ( )
inline

Definition at line 24 of file HcalUHTRData.h.

References m_ownData.

24  {
25  if (m_ownData != nullptr)
26  delete[] m_ownData;
27  }
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

◆ HcalUHTRData() [2/4]

HcalUHTRData::HcalUHTRData ( int  version_to_create)

Definition at line 161 of file HcalUHTRData.cc.

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

161  : m_formatVersion(version_to_create) {
162  // the needed space is for the biggest possible event...
163  // fibers*maxsamples/fiber
164  const int needed = (0x20 + FIBERS_PER_UHTR * CHANNELS_PER_FIBER_MAX * (10 + 1)) * sizeof(uint16_t) / sizeof(uint64_t);
165 
166  m_ownData = new uint64_t[needed];
167  memset(m_ownData, 0, sizeof(uint64_t) * needed);
168  m_rawLength64 = 0;
169  m_raw64 = m_ownData;
170  m_raw16 = (const uint16_t*)m_raw64;
171 }
static const int CHANNELS_PER_FIBER_MAX
Definition: HcalUHTRData.h:21
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
static const int FIBERS_PER_UHTR
Definition: HcalUHTRData.h:18
unsigned long long uint64_t
Definition: Time.h:13
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

◆ HcalUHTRData() [3/4]

HcalUHTRData::HcalUHTRData ( const uint64_t *  data,
int  length_words 
)

Definition at line 149 of file HcalUHTRData.cc.

References m_formatVersion, and m_raw16.

150  : m_rawLength64(length), m_raw64(data), m_raw16((const uint16_t*)(data)), m_ownData(nullptr) {
151  m_formatVersion = (m_raw16[6] >> 12) & 0xF;
152 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

◆ HcalUHTRData() [4/4]

HcalUHTRData::HcalUHTRData ( const HcalUHTRData hd)

Definition at line 154 of file HcalUHTRData.cc.

157  m_raw64(hd.m_raw64),
158  m_raw16(hd.m_raw16),
159  m_ownData(nullptr) {}
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

Member Function Documentation

◆ begin()

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

Definition at line 136 of file HcalUHTRData.cc.

References HEADER_LENGTH_16BIT, m_raw16, and m_rawLength64.

136  {
138  m_raw16 + (m_rawLength64 - 1) * sizeof(uint64_t) / sizeof(uint16_t));
139 }
static const int HEADER_LENGTH_16BIT
Definition: HcalUHTRData.cc:4
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
unsigned long long uint64_t
Definition: Time.h:13

◆ boardId()

uint32_t HcalUHTRData::boardId ( ) const
inline

Get the raw board id.

Definition at line 95 of file HcalUHTRData.h.

References m_raw64.

95 { return uint32_t(m_raw64[1]) & 0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ bunchNumber()

uint32_t HcalUHTRData::bunchNumber ( ) const
inline

Get the HTR bunch number.

Definition at line 89 of file HcalUHTRData.h.

References m_raw64.

89 { return uint32_t(m_raw64[0] >> 20) & 0xFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ crateId()

uint32_t HcalUHTRData::crateId ( ) const
inline

Get the board crate.

Definition at line 97 of file HcalUHTRData.h.

References m_raw64.

97 { return uint32_t(m_raw64[1]) & 0xFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ end()

HcalUHTRData::const_iterator HcalUHTRData::end ( void  ) const

Definition at line 141 of file HcalUHTRData.cc.

References m_raw16, and m_rawLength64.

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

141  {
142  return HcalUHTRData::const_iterator(m_raw16 + (m_rawLength64 - 1) * sizeof(uint64_t) / sizeof(uint16_t),
143  m_raw16 + (m_rawLength64 - 1) * sizeof(uint64_t) / sizeof(uint16_t));
144 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
unsigned long long uint64_t
Definition: Time.h:13

◆ getEventType()

int HcalUHTRData::getEventType ( ) const
inline

Get the event type.

Definition at line 93 of file HcalUHTRData.h.

References m_raw64.

Referenced by HLTHcalCalibTypeFilter::filter().

93 { return uint32_t(m_raw64[1] >> 40) & 0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ getFirmwareFlavor()

int HcalUHTRData::getFirmwareFlavor ( ) const
inline

Get the HTR firmware flavor.

Definition at line 111 of file HcalUHTRData.h.

References m_raw64.

111 { return uint32_t(m_raw64[1] >> 32) & 0xFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ getFirmwareRevision()

unsigned int HcalUHTRData::getFirmwareRevision ( ) const
inline

Get the HTR firmware version.

Definition at line 109 of file HcalUHTRData.h.

References m_raw64.

109 { return uint32_t(m_raw64[1] >> 48) & 0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ getFormatVersion()

int HcalUHTRData::getFormatVersion ( ) const
inline

Get the version number of this event.

Definition at line 35 of file HcalUHTRData.h.

References m_formatVersion.

35 { return m_formatVersion; }

◆ getRawData16()

const unsigned short* HcalUHTRData::getRawData16 ( ) const
inline

Get a pointer to the raw data.

Definition at line 38 of file HcalUHTRData.h.

References m_raw16.

38 { return m_raw16; }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117

◆ getRawLengthBytes()

const int HcalUHTRData::getRawLengthBytes ( ) const
inline

Get the length of the raw data.

Definition at line 41 of file HcalUHTRData.h.

References m_rawLength64.

41 { return m_rawLength64 * sizeof(uint64_t); }
unsigned long long uint64_t
Definition: Time.h:13

◆ l1ANumber()

uint32_t HcalUHTRData::l1ANumber ( ) const
inline

Get the HTR event number.

Definition at line 87 of file HcalUHTRData.h.

References m_raw64.

Referenced by RawTask::_process(), and HcalFEDIntegrityTask::analyze().

87 { return uint32_t(m_raw64[0] >> 32) & 0xFFFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ operator=()

HcalUHTRData & HcalUHTRData::operator= ( const HcalUHTRData hd)

Definition at line 173 of file HcalUHTRData.cc.

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

173  {
174  if (m_ownData == nullptr) {
177  m_raw64 = hd.m_raw64;
178  m_raw16 = hd.m_raw16;
179  }
180  return (*this);
181 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:117
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116
uint64_t * m_ownData
Definition: HcalUHTRData.h:118

◆ orbitNumber()

uint32_t HcalUHTRData::orbitNumber ( ) const
inline

Get the HTR orbit number.

Definition at line 91 of file HcalUHTRData.h.

References m_raw64.

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

◆ presamples()

uint32_t HcalUHTRData::presamples ( ) const
inline

Get the presamples.

Definition at line 101 of file HcalUHTRData.h.

References m_raw64.

101 { return uint32_t(m_raw64[1] >> 12) & 0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ slot()

uint32_t HcalUHTRData::slot ( void  ) const
inline

Get the board slot.

Definition at line 99 of file HcalUHTRData.h.

References m_raw64.

99 { return uint32_t(m_raw64[1] >> 8) & 0xF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:116

◆ wasMarkAndPassZS()

bool HcalUHTRData::wasMarkAndPassZS ( int  fiber,
int  fiberchan 
) const

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

◆ wasMarkAndPassZSTP()

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

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

Member Data Documentation

◆ CHANNELS_PER_FIBER_HBHE

const int HcalUHTRData::CHANNELS_PER_FIBER_HBHE = 6
static

Definition at line 20 of file HcalUHTRData.h.

◆ CHANNELS_PER_FIBER_HF

const int HcalUHTRData::CHANNELS_PER_FIBER_HF = 4
static

Definition at line 19 of file HcalUHTRData.h.

◆ CHANNELS_PER_FIBER_MAX

const int HcalUHTRData::CHANNELS_PER_FIBER_MAX = 8
static

Definition at line 21 of file HcalUHTRData.h.

Referenced by HcalUHTRData().

◆ FIBERS_PER_UHTR

const int HcalUHTRData::FIBERS_PER_UHTR = 24
static

Definition at line 18 of file HcalUHTRData.h.

Referenced by HcalUHTRData().

◆ m_formatVersion

int HcalUHTRData::m_formatVersion
protected

Definition at line 114 of file HcalUHTRData.h.

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

◆ m_ownData

uint64_t* HcalUHTRData::m_ownData
protected

Definition at line 118 of file HcalUHTRData.h.

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

◆ m_raw16

const uint16_t* HcalUHTRData::m_raw16
protected

Definition at line 117 of file HcalUHTRData.h.

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

◆ m_raw64

const uint64_t* HcalUHTRData::m_raw64
protected

◆ m_rawLength64

int HcalUHTRData::m_rawLength64
protected

Definition at line 115 of file HcalUHTRData.h.

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