CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CrateData Class Reference

#include <HtrXmlPatternSet.h>

Public Member Functions

 CrateData (int crate, int slotsActive[ChannelPattern::NUM_SLOTS])
 
HalfHtrDatagetHalfHtrData (int slot, int one_two_tb)
 
 ~CrateData ()
 

Private Attributes

HalfHtrDatam_slotsDoubled [ChannelPattern::NUM_SLOTS][2]
 

Detailed Description

Definition at line 62 of file HtrXmlPatternSet.h.

Constructor & Destructor Documentation

◆ CrateData()

CrateData::CrateData ( int  crate,
int  slotsActive[ChannelPattern::NUM_SLOTS] 
)

Definition at line 251 of file HtrXmlPatternSet.cc.

References FCDTask_cfi::crate, m_slotsDoubled, ChannelPattern::NUM_SLOTS, and FCDTask_cfi::slot.

251  {
252  for (int slot = 0; slot < ChannelPattern::NUM_SLOTS; slot++) {
253  for (int tb = 0; tb < 2; tb++) {
254  if (slotsActive[slot])
255  m_slotsDoubled[slot][tb] = new HalfHtrData(crate, slot, tb);
256  else
257  m_slotsDoubled[slot][tb] = nullptr;
258  }
259  }
260 }
HalfHtrData * m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
static const int NUM_SLOTS

◆ ~CrateData()

CrateData::~CrateData ( )

Definition at line 262 of file HtrXmlPatternSet.cc.

References m_slotsDoubled, ChannelPattern::NUM_SLOTS, and FCDTask_cfi::slot.

262  {
263  for (int slot = 0; slot < ChannelPattern::NUM_SLOTS; slot++) {
264  for (int tb = 0; tb < 2; tb++) {
265  if (m_slotsDoubled[slot][tb])
266  delete m_slotsDoubled[slot][tb];
267  }
268  }
269 }
HalfHtrData * m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
static const int NUM_SLOTS

Member Function Documentation

◆ getHalfHtrData()

HalfHtrData * CrateData::getHalfHtrData ( int  slot,
int  one_two_tb 
)

Definition at line 271 of file HtrXmlPatternSet.cc.

References m_slotsDoubled, ChannelPattern::NUM_SLOTS, and FCDTask_cfi::slot.

271  {
272  if (slot >= 0 && slot < ChannelPattern::NUM_SLOTS && (tb == 0 || tb == 1))
273  return m_slotsDoubled[slot][tb];
274  else
275  return nullptr;
276 }
HalfHtrData * m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
static const int NUM_SLOTS

Member Data Documentation

◆ m_slotsDoubled

HalfHtrData* CrateData::m_slotsDoubled[ChannelPattern::NUM_SLOTS][2]
private

Definition at line 69 of file HtrXmlPatternSet.h.

Referenced by CrateData(), getHalfHtrData(), and ~CrateData().