CMS 3D CMS Logo

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 26 of file L1RPCHsbConfig.h.

Constructor & Destructor Documentation

◆ L1RPCHsbConfig()

L1RPCHsbConfig::L1RPCHsbConfig ( )

Definition at line 4 of file L1RPCHsbConfig.cc.

4 {}

◆ ~L1RPCHsbConfig()

L1RPCHsbConfig::~L1RPCHsbConfig ( )
virtual

Definition at line 6 of file L1RPCHsbConfig.cc.

6 {}

Member Function Documentation

◆ getHsbMask()

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

Definition at line 30 of file L1RPCHsbConfig.cc.

References Exception, input, m_hsb0, and m_hsb1.

Referenced by RPCHalfSorter::run().

30  {
31  if (input < 0 || input >= int(sizeof(m_hsb0) / (sizeof(m_hsb0[0])))) {
32  throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb input index: " << input << "\n";
33  }
34  if (hsb == 0) {
35  return m_hsb0[input];
36  } else if (hsb == 1) {
37  return m_hsb1[input];
38  } else {
39  throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb index: " << hsb << "\n";
40  }
41 
42  return -1;
43 }
static std::string const input
Definition: EdmProvDump.cc:47

◆ getMaskSize()

int L1RPCHsbConfig::getMaskSize ( ) const
inline

Definition at line 33 of file L1RPCHsbConfig.h.

Referenced by setHsbMask().

33 { return sizeof(m_hsb0) / sizeof(m_hsb0[0]); };

◆ serialize()

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

◆ setHsbMask()

void L1RPCHsbConfig::setHsbMask ( int  hsb,
const std::vector< int > &  mask 
)

Definition at line 8 of file L1RPCHsbConfig.cc.

References Exception, getMaskSize(), mps_fire::i, m_hsb0, m_hsb1, and gpuClustering::pixelStatus::mask.

8  {
9  if (getMaskSize() != int(mask.size())) {
10  throw cms::Exception("L1RPCHsbConfig::setHsbMask")
11  << "Wrong size of hsb mask " << mask.size() << " " << getMaskSize() << "\n";
12  }
13 
14  if (hsb != 0 && hsb != 1) {
15  throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb index: " << hsb << "\n";
16  }
17  if (hsb == 0) {
18  for (int i = 0; i < getMaskSize(); ++i) {
19  m_hsb0[i] = mask[i];
20  }
21  }
22 
23  if (hsb == 1) {
24  for (int i = 0; i < getMaskSize(); ++i) {
25  m_hsb1[i] = mask[i];
26  }
27  }
28 }
constexpr uint32_t mask
Definition: gpuClustering.h:24
int getMaskSize() const

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 39 of file L1RPCHsbConfig.h.

◆ cond::serialization::access

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

Definition at line 39 of file L1RPCHsbConfig.h.

Member Data Documentation

◆ m_hsb0

int L1RPCHsbConfig::m_hsb0[8]
private

Definition at line 33 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().

◆ m_hsb1

int L1RPCHsbConfig::m_hsb1[8]
private

Definition at line 37 of file L1RPCHsbConfig.h.

Referenced by getHsbMask(), and setHsbMask().