CMS 3D CMS Logo

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

#include <HtrXmlPatternSet.h>

Public Member Functions

CrateDatagetCrate (int crate)
 
 HtrXmlPatternSet (int cratesActive[ChannelPattern::NUM_CRATES], int slotsActive[ChannelPattern::NUM_SLOTS])
 
 ~HtrXmlPatternSet ()
 

Private Attributes

CrateDatam_crates [ChannelPattern::NUM_CRATES]
 

Detailed Description

Definition at line 72 of file HtrXmlPatternSet.h.

Constructor & Destructor Documentation

◆ HtrXmlPatternSet()

HtrXmlPatternSet::HtrXmlPatternSet ( int  cratesActive[ChannelPattern::NUM_CRATES],
int  slotsActive[ChannelPattern::NUM_SLOTS] 
)

Definition at line 278 of file HtrXmlPatternSet.cc.

References m_crates, and ChannelPattern::NUM_CRATES.

279  {
280  for (int crate = 0; crate < ChannelPattern::NUM_CRATES; crate++) {
281  if (cratesActive[crate])
282  m_crates[crate] = new CrateData(crate, slotsActive);
283  else
284  m_crates[crate] = nullptr;
285  }
286 }
static const int NUM_CRATES
CrateData * m_crates[ChannelPattern::NUM_CRATES]

◆ ~HtrXmlPatternSet()

HtrXmlPatternSet::~HtrXmlPatternSet ( )

Definition at line 288 of file HtrXmlPatternSet.cc.

References m_crates, and ChannelPattern::NUM_CRATES.

288  {
289  for (int crate = 0; crate < ChannelPattern::NUM_CRATES; crate++) {
290  if (m_crates[crate])
291  delete m_crates[crate];
292  }
293 }
static const int NUM_CRATES
CrateData * m_crates[ChannelPattern::NUM_CRATES]

Member Function Documentation

◆ getCrate()

CrateData * HtrXmlPatternSet::getCrate ( int  crate)

Definition at line 295 of file HtrXmlPatternSet.cc.

References m_crates, and ChannelPattern::NUM_CRATES.

Referenced by HtrXmlPatternTool::createHists(), HtrXmlPattern::do_hand_fill(), HtrXmlPatternTool::Fill(), and HtrXmlPatternTool::writeXML().

295  {
296  if (crate >= 0 && crate < ChannelPattern::NUM_CRATES)
297  return m_crates[crate];
298  else
299  return nullptr;
300 }
static const int NUM_CRATES
CrateData * m_crates[ChannelPattern::NUM_CRATES]

Member Data Documentation

◆ m_crates

CrateData* HtrXmlPatternSet::m_crates[ChannelPattern::NUM_CRATES]
private

Definition at line 79 of file HtrXmlPatternSet.h.

Referenced by getCrate(), HtrXmlPatternSet(), and ~HtrXmlPatternSet().