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 Member Functions | Private Attributes | Friends
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, const std::vector< int > &mask)
 
virtual ~L1RPCHsbConfig ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

int m_hsb0 [8]
 
int m_hsb1 [8]
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Contains configuration of HSB inputs

Usage: <usage>

Definition at line 28 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 Exception, 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 }
static std::string const input
Definition: EdmProvDump.cc:44
int L1RPCHsbConfig::getMaskSize ( ) const
inline

Definition at line 37 of file L1RPCHsbConfig.h.

Referenced by setHsbMask().

37 {return sizeof(m_hsb0)/sizeof(m_hsb0[0]);};
template<class Archive >
void L1RPCHsbConfig::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void L1RPCHsbConfig::setHsbMask ( int  hsb,
const std::vector< int > &  mask 
)

Definition at line 17 of file L1RPCHsbConfig.cc.

References 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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 46 of file L1RPCHsbConfig.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 46 of file L1RPCHsbConfig.h.

Member Data Documentation

int L1RPCHsbConfig::m_hsb0[8]
private

Definition at line 37 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().

int L1RPCHsbConfig::m_hsb1[8]
private

Definition at line 42 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().