CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1RPCHsbConfig Class Reference

#include <CondFormats/L1TObjects/interface/L1RPCHsbConfig.h>

Public Member Functions

int getHsbMask (int hsb, int input) const
 
int getMaskSize () const
 
 L1RPCHsbConfig ()
 
void setHsbMask (int hsb, std::vector< int > mask)
 
virtual ~L1RPCHsbConfig ()
 

Private Attributes

int m_hsb0 [8]
 
int m_hsb1 [8]
 

Detailed Description

Description: Contains configuration of HSB inputs

Usage: <usage>

Definition at line 26 of file L1RPCHsbConfig.h.

Constructor & Destructor Documentation

L1RPCHsbConfig::L1RPCHsbConfig ( )

Definition at line 4 of file L1RPCHsbConfig.cc.

5 {
6 
7 }
L1RPCHsbConfig::~L1RPCHsbConfig ( )
virtual

Definition at line 10 of file L1RPCHsbConfig.cc.

10  {
11 
12 
13 
14 }

Member Function Documentation

int L1RPCHsbConfig::getHsbMask ( int  hsb,
int  input 
) const

Definition at line 42 of file L1RPCHsbConfig.cc.

References edm::hlt::Exception, LaserDQM_cfg::input, m_hsb0, and m_hsb1.

42  {
43 
44  if (input < 0 || input >= int(sizeof(m_hsb0)/(sizeof( m_hsb0[0] )) ) )
45  {
46  throw cms::Exception("L1RPCHsbConfig::getHsbMask")
47  << "Wrong hsb input index: " << input << "\n";
48  }
49  if (hsb==0) {
50  return m_hsb0[input];
51  } else if (hsb==1) {
52  return m_hsb1[input];
53  } else {
54  throw cms::Exception("L1RPCHsbConfig::getHsbMask")
55  << "Wrong hsb index: " << hsb << "\n";
56  }
57 
58  return -1;
59 }
int L1RPCHsbConfig::getMaskSize ( ) const
inline

Definition at line 35 of file L1RPCHsbConfig.h.

Referenced by setHsbMask().

35 {return sizeof(m_hsb0)/sizeof(m_hsb0[0]);};
void L1RPCHsbConfig::setHsbMask ( int  hsb,
std::vector< int >  mask 
)

Definition at line 17 of file L1RPCHsbConfig.cc.

References edm::hlt::Exception, getMaskSize(), i, m_hsb0, and m_hsb1.

17  {
18 
19  if (getMaskSize() != int(mask.size()) ) {
20  throw cms::Exception("L1RPCHsbConfig::setHsbMask")
21  << "Wrong size of hsb mask "
22  << mask.size() << " " << getMaskSize()
23  << "\n";
24 
25  }
26 
27 
28  if (hsb != 0 && hsb != 1) {
29  throw cms::Exception("L1RPCHsbConfig::getHsbMask")
30  << "Wrong hsb index: " << hsb << "\n";
31  }
32  if ( hsb == 0 ){
33  for (int i = 0 ; i < getMaskSize() ; ++i ) {m_hsb0[i] = mask[i];}
34  }
35 
36  if ( hsb == 1 ){
37  for (int i = 0 ; i < getMaskSize() ; ++i ) {m_hsb1[i] = mask[i];}
38  }
39 }
int i
Definition: DBlmapReader.cc:9
int getMaskSize() const

Member Data Documentation

int L1RPCHsbConfig::m_hsb0[8]
private

Definition at line 35 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().

int L1RPCHsbConfig::m_hsb1[8]
private

Definition at line 40 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().