CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
RPCLBLink Class Reference

#include <RPCLBLink.h>

Public Member Functions

::uint32_t getId () const
 
::uint32_t getMask () const
 
std::string getName () const
 
bool matches (RPCLBLink const &_rhs) const
 
bool operator!= (RPCLBLink const &_rhs) const
 
bool operator!= (::uint32_t const &_rhs) const
 
RPCLBLinkoperator++ ()
 
RPCLBLink operator++ (int)
 
RPCLBLinkoperator-- ()
 
RPCLBLink operator-- (int)
 
 operator::uint32_t () const
 
bool operator< (RPCLBLink const &_rhs) const
 
bool operator< (::uint32_t const &_rhs) const
 
bool operator== (RPCLBLink const &_rhs) const
 
bool operator== (::uint32_t const &_rhs) const
 
void reset ()
 
 RPCLBLink ()
 
 RPCLBLink (::uint32_t const &_id)
 
 RPCLBLink (int _region, int _yoke, int _sector=wildcard_, int _side=wildcard_, int _wheelordisk=wildcard_, int _fibre=wildcard_, int _radial=wildcard_, int _linkboard=wildcard_, int _connector=wildcard_)
 
void setId (::uint32_t const &_id)
 
int getRegion () const
 
int getYoke () const
 
int getSector () const
 
int getSide () const
 
int getWheelOrDisk () const
 
int getFibre () const
 
int getRadial () const
 
int getLinkBoard () const
 
int getConnector () const
 
RPCLBLinksetRegion (int _region=wildcard_)
 
RPCLBLinksetYoke (int _yoke=wildcard_)
 
RPCLBLinksetSector (int _sector=wildcard_)
 
RPCLBLinksetSide (int _side=wildcard_)
 
RPCLBLinksetWheelOrDisk (int _wheelordisk=wildcard_)
 
RPCLBLinksetFibre (int _fibre=wildcard_)
 
RPCLBLinksetRadial (int _radial=wildcard_)
 
RPCLBLinksetLinkBoard (int _linkboard=wildcard_)
 
RPCLBLinksetConnector (int _connector=wildcard_)
 

Static Public Attributes

static int const wildcard_ = INT_MIN
 
static int const min_region_ = 0
 
static int const max_region_ = 1
 
static int const min_yoke_ = -5
 
static int const max_yoke_ = 5
 
static int const min_sector_ = 1
 
static int const max_sector_ = 12
 
static int const min_side_ = 0
 
static int const max_side_ = 2
 
static int const min_wheelordisk_ = 0
 
static int const max_wheelordisk_ = 4
 
static int const min_fibre_ = 0
 
static int const max_fibre_ = 7
 
static int const min_radial_ = 0
 
static int const max_radial_ = 1
 
static int const min_linkboard_ = 0
 
static int const max_linkboard_ = 2
 
static int const min_connector_ = 0
 
static int const max_connector_ = 5
 

Protected Member Functions

int bf_get (int const _min,::uint32_t const _mask, int const _pos) const
 
RPCLBLinkbf_set (int const _min, int const _max,::uint32_t const _mask, int const _pos, int const _value)
 
std::ostream & bf_stream (std::ostream &_ostream, int const _min,::uint32_t const _mask, int const _pos) const
 

Protected Attributes

::uint32_t id_
 

Static Protected Attributes

static int const pos_region_ = 24
 
::uint32_t const mask_region_ = 0x03000000
 
static int const pos_yoke_ = 20
 
::uint32_t const mask_yoke_ = 0x00f00000
 
static int const pos_sector_ = 16
 
::uint32_t const mask_sector_ = 0x000f0000
 
static int const pos_side_ = 14
 
::uint32_t const mask_side_ = 0x0000c000
 
static int const pos_wheelordisk_ = 11
 
::uint32_t const mask_wheelordisk_ = 0x00003800
 
static int const pos_fibre_ = 7
 
::uint32_t const mask_fibre_ = 0x00000780
 
static int const pos_radial_ = 5
 
::uint32_t const mask_radial_ = 0x00000060
 
static int const pos_linkboard_ = 3
 
::uint32_t const mask_linkboard_ = 0x00000018
 
static int const pos_connector_ = 0
 
::uint32_t const mask_connector_ = 0x00000007
 

Private Member Functions

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

Friends

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

Detailed Description

Identifier for RPC Readout Links, following CMS IN 2002/065

Definition at line 12 of file RPCLBLink.h.

Constructor & Destructor Documentation

RPCLBLink::RPCLBLink ( )

Definition at line 6 of file RPCLBLink.cc.

7  : id_(0x0)
8 {}
RPCLBLink::RPCLBLink ( ::uint32_t const &  _id)

Definition at line 10 of file RPCLBLink.cc.

11  : id_(_id)
12 {}
RPCLBLink::RPCLBLink ( int  _region,
int  _yoke,
int  _sector = wildcard_,
int  _side = wildcard_,
int  _wheelordisk = wildcard_,
int  _fibre = wildcard_,
int  _radial = wildcard_,
int  _linkboard = wildcard_,
int  _connector = wildcard_ 
)

Definition at line 14 of file RPCLBLink.cc.

References setConnector(), setFibre(), setLinkBoard(), setRadial(), setRegion(), setSector(), setSide(), setWheelOrDisk(), and setYoke().

23  : id_(0x0)
24 {
25  setRegion(_region);
26  setYoke(_yoke);
27  setSector(_sector);
28  setSide(_side);
29  setWheelOrDisk(_wheelordisk);
30  setFibre(_fibre);
31  setRadial(_radial);
32  setLinkBoard(_linkboard);
33  setConnector(_connector);
34 }

Member Function Documentation

int RPCLBLink::bf_get ( int const  _min,
::uint32_t const  _mask,
int const  _pos 
) const
protected
RPCLBLink& RPCLBLink::bf_set ( int const  _min,
int const  _max,
::uint32_t const  _mask,
int const  _pos,
int const  _value 
)
protected
std::ostream& RPCLBLink::bf_stream ( std::ostream &  _ostream,
int const  _min,
::uint32_t const  _mask,
int const  _pos 
) const
protected

Referenced by getName().

int RPCLBLink::getConnector ( ) const

Referenced by getName().

int RPCLBLink::getFibre ( ) const

Referenced by getName().

::uint32_t RPCLBLink::getId ( ) const
int RPCLBLink::getLinkBoard ( ) const

Referenced by getName().

uint32_t RPCLBLink::getMask ( ) const

Definition at line 36 of file RPCLBLink.cc.

References id_, mask_connector_, mask_fibre_, mask_linkboard_, mask_radial_, mask_region_, mask_sector_, mask_side_, mask_wheelordisk_, and mask_yoke_.

37 {
38  ::uint32_t _mask(0x0);
39  if (id_ & mask_region_)
40  _mask |= mask_region_;
41  if (id_ & mask_yoke_)
42  _mask |= mask_yoke_;
43  if (id_ & mask_sector_)
44  _mask |= mask_sector_;
45  if (id_ & mask_side_)
46  _mask |= mask_side_;
47  if (id_ & mask_wheelordisk_)
48  _mask |= mask_wheelordisk_;
49  if (id_ & mask_fibre_)
50  _mask |= mask_fibre_;
51  if (id_ & mask_radial_)
52  _mask |= mask_radial_;
53  if (id_ & mask_linkboard_)
54  _mask |= mask_linkboard_;
55  if (id_ & mask_connector_)
56  _mask |= mask_connector_;
57  return _mask;
58 }
std::string RPCLBLink::getName ( ) const

Definition at line 60 of file RPCLBLink.cc.

References bf_stream(), getConnector(), getFibre(), getLinkBoard(), getRadial(), getRegion(), getSide(), getYoke(), mask_sector_, mask_wheelordisk_, min_sector_, min_wheelordisk_, pos_sector_, pos_wheelordisk_, and wildcard_.

Referenced by plotting.Plot::draw(), RPCDCCLinkMapHandler::getNewObjects(), RPCLBLinkMapHandler::getNewObjects(), and operator<<().

61 {
62  // LB_Rregion.yoke_Ssector_region.side.wheel_or_disk.fibre.radial_CHlinkboard:connector
63  // LB_RB -2 _S10 _ B N 2 A _CH2 :
64  // LB_RE -1 _S10 _ E N 2 3 _CH0 :
65  // LB_RB-2_S10_BN2A_CH2 , RB1in/W-2/S10:bwd ; LB_RE-1_S10_EN23_CH0 , RE-2/R3/C30
66 
67  int _region(getRegion())
68  , _yoke(getYoke())
69  , _linkboard(getLinkBoard())
70  , _connector(getConnector());
71 
72  std::ostringstream _oss;
73  _oss << "LB_R";
74  switch (_region) {
75  case 0: _oss << 'B'; break;
76  case 1: _oss << 'E'; break;
77  default: _oss << '*'; break;
78  }
79  (_yoke > 0 ? _oss << '+' << _yoke : _oss << _yoke);
80 
82 
83  _oss << '_';
84  switch (_region) {
85  case 0: _oss << 'B'; break;
86  case 1: _oss << 'E'; break;
87  default: _oss << '*'; break;
88  }
89  switch (getSide()) {
90  case 0: _oss << 'N'; break;
91  case 1: _oss << 'M'; break;
92  case 2: _oss << 'P'; break;
93  default: _oss << '*'; break;
94  }
96  switch (getFibre()) {
97  case 0: _oss << '1'; break;
98  case 1: _oss << '2'; break;
99  case 2: _oss << '3'; break;
100  case 3: _oss << 'A'; break;
101  case 4: _oss << 'B'; break;
102  case 5: _oss << 'C'; break;
103  case 6: _oss << 'D'; break;
104  case 7: _oss << 'E'; break;
105  default: _oss << '*'; break;
106  }
107  switch (getRadial()) { // for completeness, CMS IN 2002/065
108  case 0: _oss << "ab"; break;
109  case 1: _oss << "cd"; break;
110  default: _oss << ""; break;
111  }
112 
113  if (_linkboard != wildcard_)
114  _oss << "_CH" << _linkboard;
115 
116  if (_connector != wildcard_)
117  _oss << ":" << _connector;
118 
119  return _oss.str();
120 }
int RPCLBLink::getRadial ( ) const

Referenced by getName().

int RPCLBLink::getRegion ( ) const

Field Getters

Referenced by getName().

int RPCLBLink::getSector ( ) const
int RPCLBLink::getSide ( ) const

Referenced by getName().

int RPCLBLink::getWheelOrDisk ( ) const
int RPCLBLink::getYoke ( ) const

Referenced by getName().

bool RPCLBLink::matches ( RPCLBLink const &  _rhs) const
bool RPCLBLink::operator!= ( RPCLBLink const &  _rhs) const
bool RPCLBLink::operator!= ( ::uint32_t const &  _rhs) const
RPCLBLink& RPCLBLink::operator++ ( )
RPCLBLink RPCLBLink::operator++ ( int  )
RPCLBLink& RPCLBLink::operator-- ( )
RPCLBLink RPCLBLink::operator-- ( int  )
RPCLBLink::operator::uint32_t ( ) const
bool RPCLBLink::operator< ( RPCLBLink const &  _rhs) const
bool RPCLBLink::operator< ( ::uint32_t const &  _rhs) const
bool RPCLBLink::operator== ( RPCLBLink const &  _rhs) const
bool RPCLBLink::operator== ( ::uint32_t const &  _rhs) const
void RPCLBLink::reset ( )
template<class Archive >
void RPCLBLink::serialize ( Archive &  ar,
const unsigned int  version 
)
private
RPCLBLink& RPCLBLink::setConnector ( int  _connector = wildcard_)
RPCLBLink& RPCLBLink::setFibre ( int  _fibre = wildcard_)
void RPCLBLink::setId ( ::uint32_t const &  _id)
RPCLBLink& RPCLBLink::setLinkBoard ( int  _linkboard = wildcard_)
RPCLBLink& RPCLBLink::setRadial ( int  _radial = wildcard_)
RPCLBLink& RPCLBLink::setRegion ( int  _region = wildcard_)

Field Setters A cms::Exception("OutOfRange") is thrown for out-of-range input values.

Referenced by RPCLBLinkNameParser::parse(), and RPCLBLink().

RPCLBLink& RPCLBLink::setSector ( int  _sector = wildcard_)
RPCLBLink& RPCLBLink::setSide ( int  _side = wildcard_)
RPCLBLink& RPCLBLink::setWheelOrDisk ( int  _wheelordisk = wildcard_)
RPCLBLink& RPCLBLink::setYoke ( int  _yoke = wildcard_)

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 134 of file RPCLBLink.h.

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

Definition at line 134 of file RPCLBLink.h.

Member Data Documentation

::uint32_t RPCLBLink::id_
protected

Definition at line 132 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_connector_ = 0x00000007
staticprotected

Definition at line 59 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_fibre_ = 0x00000780
staticprotected

Definition at line 53 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_linkboard_ = 0x00000018
staticprotected

Definition at line 57 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_radial_ = 0x00000060
staticprotected

Definition at line 55 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_region_ = 0x03000000
staticprotected

Definition at line 43 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_sector_ = 0x000f0000
staticprotected

Definition at line 47 of file RPCLBLink.h.

Referenced by getMask(), and getName().

::uint32_t const RPCLBLink::mask_side_ = 0x0000c000
staticprotected

Definition at line 49 of file RPCLBLink.h.

Referenced by getMask().

::uint32_t const RPCLBLink::mask_wheelordisk_ = 0x00003800
staticprotected

Definition at line 51 of file RPCLBLink.h.

Referenced by getMask(), and getName().

::uint32_t const RPCLBLink::mask_yoke_ = 0x00f00000
staticprotected

Definition at line 45 of file RPCLBLink.h.

Referenced by getMask().

int const RPCLBLink::max_connector_ = 5
static

Definition at line 36 of file RPCLBLink.h.

int const RPCLBLink::max_fibre_ = 7
static

Definition at line 30 of file RPCLBLink.h.

int const RPCLBLink::max_linkboard_ = 2
static

Definition at line 34 of file RPCLBLink.h.

int const RPCLBLink::max_radial_ = 1
static

Definition at line 32 of file RPCLBLink.h.

int const RPCLBLink::max_region_ = 1
static

Definition at line 20 of file RPCLBLink.h.

int const RPCLBLink::max_sector_ = 12
static

Definition at line 24 of file RPCLBLink.h.

int const RPCLBLink::max_side_ = 2
static

Definition at line 26 of file RPCLBLink.h.

int const RPCLBLink::max_wheelordisk_ = 4
static

Definition at line 28 of file RPCLBLink.h.

int const RPCLBLink::max_yoke_ = 5
static

Definition at line 22 of file RPCLBLink.h.

int const RPCLBLink::min_connector_ = 0
static

Definition at line 35 of file RPCLBLink.h.

int const RPCLBLink::min_fibre_ = 0
static

Definition at line 29 of file RPCLBLink.h.

int const RPCLBLink::min_linkboard_ = 0
static

Definition at line 33 of file RPCLBLink.h.

int const RPCLBLink::min_radial_ = 0
static

Definition at line 31 of file RPCLBLink.h.

int const RPCLBLink::min_region_ = 0
static

field ranges

Definition at line 19 of file RPCLBLink.h.

int const RPCLBLink::min_sector_ = 1
static

Definition at line 23 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::min_side_ = 0
static

Definition at line 25 of file RPCLBLink.h.

int const RPCLBLink::min_wheelordisk_ = 0
static

Definition at line 27 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::min_yoke_ = -5
static

Definition at line 21 of file RPCLBLink.h.

int const RPCLBLink::pos_connector_ = 0
staticprotected

Definition at line 58 of file RPCLBLink.h.

int const RPCLBLink::pos_fibre_ = 7
staticprotected

Definition at line 52 of file RPCLBLink.h.

int const RPCLBLink::pos_linkboard_ = 3
staticprotected

Definition at line 56 of file RPCLBLink.h.

int const RPCLBLink::pos_radial_ = 5
staticprotected

Definition at line 54 of file RPCLBLink.h.

int const RPCLBLink::pos_region_ = 24
staticprotected

field positions and masks

Definition at line 42 of file RPCLBLink.h.

int const RPCLBLink::pos_sector_ = 16
staticprotected

Definition at line 46 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::pos_side_ = 14
staticprotected

Definition at line 48 of file RPCLBLink.h.

int const RPCLBLink::pos_wheelordisk_ = 11
staticprotected

Definition at line 50 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::pos_yoke_ = 20
staticprotected

Definition at line 44 of file RPCLBLink.h.

int const RPCLBLink::wildcard_ = INT_MIN
static

Definition at line 15 of file RPCLBLink.h.

Referenced by getName().