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 | Protected Attributes
HcalUHTRData Class Reference

#include <HcalUHTRData.h>

Classes

class  const_iterator
 
class  packer
 

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...
 
packer pack ()
 
void packHeaderTrailer (int L1Anumber, int bcn, int submodule, int orbitn, int pipeline, int ndd, int nps, int firmwareRev=0)
 pack header and trailer (call after pack) More...
 
void packUnsuppressed (const bool *mp)
 pack trailer with Mark and Pass bits 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 125 of file HcalUHTRData.cc.

125 : m_formatVersion(-2), m_rawLength64(0), m_raw64(0), m_raw16(0), m_ownData(0) { }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
uint64_t * m_ownData
Definition: HcalUHTRData.h:134
HcalUHTRData::~HcalUHTRData ( )
inline

Definition at line 24 of file HcalUHTRData.h.

References m_ownData.

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

Definition at line 133 of file HcalUHTRData.cc.

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

133  : m_formatVersion(version_to_create) {
134 
135  // the needed space is for the biggest possible event...
136  // fibers*maxsamples/fiber
137  const int needed=(0x20+FIBERS_PER_UHTR*CHANNELS_PER_FIBER_MAX*(10+1))*sizeof(uint16_t)/sizeof(uint64_t);
138 
139  m_ownData=new uint64_t[needed];
140  memset(m_ownData,0,sizeof(uint64_t)*needed);
141  m_rawLength64=0;
143  m_raw16=(const uint16_t*)m_raw64;
144 }
static const int CHANNELS_PER_FIBER_MAX
Definition: HcalUHTRData.h:21
const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
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:132
uint64_t * m_ownData
Definition: HcalUHTRData.h:134
HcalUHTRData::HcalUHTRData ( const uint64_t *  data,
int  length_words 
)

Definition at line 127 of file HcalUHTRData.cc.

References m_formatVersion, and m_raw16.

127  : m_rawLength64(length),m_raw64(data),m_raw16((const uint16_t*)(data)),m_ownData(0) {
128  m_formatVersion=(m_raw16[6]>>12)&0xF;
129 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
uint64_t * m_ownData
Definition: HcalUHTRData.h:134
HcalUHTRData::HcalUHTRData ( const HcalUHTRData hd)

Definition at line 131 of file HcalUHTRData.cc.

const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
uint64_t * m_ownData
Definition: HcalUHTRData.h:134

Member Function Documentation

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

Definition at line 77 of file HcalUHTRData.cc.

References HEADER_LENGTH_16BIT, m_raw16, and m_rawLength64.

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

Get the raw board id.

Definition at line 112 of file HcalUHTRData.h.

References m_raw64.

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

Get the HTR bunch number.

Definition at line 106 of file HcalUHTRData.h.

References m_raw64.

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

Get the board crate.

Definition at line 114 of file HcalUHTRData.h.

References m_raw64.

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

Definition at line 81 of file HcalUHTRData.cc.

References m_raw16, and m_rawLength64.

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

81  {
82  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));
83 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
unsigned long long uint64_t
Definition: Time.h:15
int HcalUHTRData::getEventType ( ) const
inline

Get the event type.

Definition at line 110 of file HcalUHTRData.h.

References m_raw64.

Referenced by HLTHcalCalibTypeFilter::filter().

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

Get the HTR firmware flavor.

Definition at line 126 of file HcalUHTRData.h.

References m_raw64.

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

Get the HTR firmware version.

Definition at line 124 of file HcalUHTRData.h.

References m_raw64.

124 { return uint32_t(m_raw64[1]>>48)&0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
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:133
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 104 of file HcalUHTRData.h.

References m_raw64.

Referenced by RawTask::_process().

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

Definition at line 146 of file HcalUHTRData.cc.

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

146  {
147  if (m_ownData==0) {
150  m_raw64=hd.m_raw64;
151  m_raw16=hd.m_raw16;
152  }
153  return (*this);
154 }
const uint16_t * m_raw16
Definition: HcalUHTRData.h:133
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
uint64_t * m_ownData
Definition: HcalUHTRData.h:134
uint32_t HcalUHTRData::orbitNumber ( ) const
inline

Get the HTR orbit number.

Definition at line 108 of file HcalUHTRData.h.

References m_raw64.

108 { return uint32_t(m_raw64[1]>>16)&0xFFFF; }
const uint64_t * m_raw64
Definition: HcalUHTRData.h:132
packer HcalUHTRData::pack ( )
void HcalUHTRData::packHeaderTrailer ( int  L1Anumber,
int  bcn,
int  submodule,
int  orbitn,
int  pipeline,
int  ndd,
int  nps,
int  firmwareRev = 0 
)

pack header and trailer (call after pack)

void HcalUHTRData::packUnsuppressed ( const bool *  mp)

pack trailer with Mark and Pass bits

uint32_t HcalUHTRData::slot ( void  ) const
inline

Get the board slot.

Definition at line 116 of file HcalUHTRData.h.

References m_raw64.

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

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

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

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

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 130 of file HcalUHTRData.h.

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

uint64_t* HcalUHTRData::m_ownData
protected

Definition at line 134 of file HcalUHTRData.h.

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

const uint16_t* HcalUHTRData::m_raw16
protected

Definition at line 133 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 131 of file HcalUHTRData.h.

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