#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] |
Description: Contains configuration of HSB inputs
Usage: <usage>
Definition at line 26 of file L1RPCHsbConfig.h.
L1RPCHsbConfig::L1RPCHsbConfig | ( | ) |
Definition at line 4 of file L1RPCHsbConfig.cc.
{ }
L1RPCHsbConfig::~L1RPCHsbConfig | ( | ) | [virtual] |
Definition at line 10 of file L1RPCHsbConfig.cc.
{ }
int L1RPCHsbConfig::getHsbMask | ( | int | hsb, |
int | input | ||
) | const |
Definition at line 42 of file L1RPCHsbConfig.cc.
References Exception, collect_tpl::input, m_hsb0, and m_hsb1.
{ if (input < 0 || input >= int(sizeof(m_hsb0)/(sizeof( m_hsb0[0] )) ) ) { throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb input index: " << input << "\n"; } if (hsb==0) { return m_hsb0[input]; } else if (hsb==1) { return m_hsb1[input]; } else { throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb index: " << hsb << "\n"; } return -1; }
int L1RPCHsbConfig::getMaskSize | ( | ) | const [inline] |
Definition at line 35 of file L1RPCHsbConfig.h.
Referenced by setHsbMask().
void L1RPCHsbConfig::setHsbMask | ( | int | hsb, |
std::vector< int > | mask | ||
) |
Definition at line 17 of file L1RPCHsbConfig.cc.
References Exception, getMaskSize(), i, m_hsb0, and m_hsb1.
{ if (getMaskSize() != int(mask.size()) ) { throw cms::Exception("L1RPCHsbConfig::setHsbMask") << "Wrong size of hsb mask " << mask.size() << " " << getMaskSize() << "\n"; } if (hsb != 0 && hsb != 1) { throw cms::Exception("L1RPCHsbConfig::getHsbMask") << "Wrong hsb index: " << hsb << "\n"; } if ( hsb == 0 ){ for (int i = 0 ; i < getMaskSize() ; ++i ) {m_hsb0[i] = mask[i];} } if ( hsb == 1 ){ for (int i = 0 ; i < getMaskSize() ; ++i ) {m_hsb1[i] = mask[i];} } }
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().