CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

std::uint32_t getId () const
 
std::uint32_t getMask () const
 
std::string getName () const
 
bool matches (RPCLBLink const &rhs) const
 
 operator std::uint32_t () const
 
bool operator!= (RPCLBLink const &rhs) const
 
bool operator!= (std::uint32_t const &rhs) const
 
RPCLBLinkoperator++ ()
 
RPCLBLink operator++ (int)
 
RPCLBLinkoperator-- ()
 
RPCLBLink operator-- (int)
 
bool operator< (RPCLBLink const &rhs) const
 
bool operator< (std::uint32_t const &rhs) const
 
bool operator== (RPCLBLink const &rhs) const
 
bool operator== (std::uint32_t const &rhs) const
 
void reset ()
 
 RPCLBLink ()
 
 RPCLBLink (std::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 (std::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, std::uint32_t const mask, int const pos) const
 
RPCLBLinkbf_set (int const min, int const max, std::uint32_t const mask, int const pos, int const value)
 
std::ostream & bf_stream (std::ostream &ostream, int const min, std::uint32_t const mask, int const pos) const
 

Protected Attributes

std::uint32_t id_
 

Static Protected Attributes

static int const pos_region_ = 24
 
static std::uint32_t const mask_region_ = 0x03000000
 
static int const pos_yoke_ = 20
 
static std::uint32_t const mask_yoke_ = 0x00f00000
 
static int const pos_sector_ = 16
 
static std::uint32_t const mask_sector_ = 0x000f0000
 
static int const pos_side_ = 14
 
static std::uint32_t const mask_side_ = 0x0000c000
 
static int const pos_wheelordisk_ = 11
 
static std::uint32_t const mask_wheelordisk_ = 0x00003800
 
static int const pos_fibre_ = 7
 
static std::uint32_t const mask_fibre_ = 0x00000780
 
static int const pos_radial_ = 5
 
static std::uint32_t const mask_radial_ = 0x00000060
 
static int const pos_linkboard_ = 3
 
static std::uint32_t const mask_linkboard_ = 0x00000018
 
static int const pos_connector_ = 0
 
static std::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.

6 : id_(0x0) {}
RPCLBLink::RPCLBLink ( std::uint32_t const &  id)

Definition at line 8 of file RPCLBLink.cc.

8 : id_(id) {}
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 10 of file RPCLBLink.cc.

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

12  : id_(0x0) {
14  setYoke(yoke);
15  setSector(sector);
16  setSide(side);
17  setWheelOrDisk(wheelordisk);
18  setFibre(fibre);
19  setRadial(radial);
20  setLinkBoard(linkboard);
21  setConnector(connector);
22 }

Member Function Documentation

int RPCLBLink::bf_get ( int const  min,
std::uint32_t const  mask,
int const  pos 
) const
protected
RPCLBLink& RPCLBLink::bf_set ( int const  min,
int const  max,
std::uint32_t const  mask,
int const  pos,
int const  value 
)
protected
std::ostream& RPCLBLink::bf_stream ( std::ostream &  ostream,
int const  min,
std::uint32_t const  mask,
int const  pos 
) const
protected

Referenced by getName().

int RPCLBLink::getConnector ( ) const
int RPCLBLink::getFibre ( ) const

Referenced by getName().

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

Definition at line 24 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_.

24  {
25  std::uint32_t mask(0x0);
26  if (id_ & mask_region_)
27  mask |= mask_region_;
28  if (id_ & mask_yoke_)
29  mask |= mask_yoke_;
30  if (id_ & mask_sector_)
31  mask |= mask_sector_;
32  if (id_ & mask_side_)
33  mask |= mask_side_;
34  if (id_ & mask_wheelordisk_)
35  mask |= mask_wheelordisk_;
36  if (id_ & mask_fibre_)
37  mask |= mask_fibre_;
38  if (id_ & mask_radial_)
39  mask |= mask_radial_;
40  if (id_ & mask_linkboard_)
41  mask |= mask_linkboard_;
42  if (id_ & mask_connector_)
43  mask |= mask_connector_;
44  return mask;
45 }
std::string RPCLBLink::getName ( ) const

Definition at line 47 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_, HLT_FULL_cff::region, and wildcard_.

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

47  {
48  // LB_Rregion.yoke_Ssector_region.side.wheel_or_disk.fibre.radial_CHlinkboard:connector
49  // LB_RB -2 _S10 _ B N 2 A _CH2 :
50  // LB_RE -1 _S10 _ E N 2 3 _CH0 :
51  // LB_RB-2_S10_BN2A_CH2 , RB1in/W-2/S10:bwd ; LB_RE-1_S10_EN23_CH0 , RE-2/R3/C30
52 
53  int region(getRegion()), yoke(getYoke()), linkboard(getLinkBoard()), connector(getConnector());
54 
55  std::ostringstream oss;
56  oss << "LB_R";
57  switch (region) {
58  case 0:
59  oss << 'B';
60  break;
61  case 1:
62  oss << 'E';
63  break;
64  default:
65  oss << '*';
66  break;
67  }
68  (yoke > 0 ? oss << '+' << yoke : oss << yoke);
69 
71 
72  oss << '_';
73  switch (region) {
74  case 0:
75  oss << 'B';
76  break;
77  case 1:
78  oss << 'E';
79  break;
80  default:
81  oss << '*';
82  break;
83  }
84  switch (getSide()) {
85  case 0:
86  oss << 'N';
87  break;
88  case 1:
89  oss << 'M';
90  break;
91  case 2:
92  oss << 'P';
93  break;
94  default:
95  oss << '*';
96  break;
97  }
99  switch (getFibre()) {
100  case 0:
101  oss << '1';
102  break;
103  case 1:
104  oss << '2';
105  break;
106  case 2:
107  oss << '3';
108  break;
109  case 3:
110  oss << 'A';
111  break;
112  case 4:
113  oss << 'B';
114  break;
115  case 5:
116  oss << 'C';
117  break;
118  case 6:
119  oss << 'D';
120  break;
121  case 7:
122  oss << 'E';
123  break;
124  default:
125  oss << '*';
126  break;
127  }
128  switch (getRadial()) { // for completeness, CMS IN 2002/065
129  case 0:
130  oss << "ab";
131  break;
132  case 1:
133  oss << "cd";
134  break;
135  default:
136  oss << "";
137  break;
138  }
139 
140  if (linkboard != wildcard_)
141  oss << "_CH" << linkboard;
142 
143  if (connector != wildcard_)
144  oss << ":" << connector;
145 
146  return oss.str();
147 }
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
RPCLBLink::operator std::uint32_t ( ) const
bool RPCLBLink::operator!= ( RPCLBLink const &  rhs) const
bool RPCLBLink::operator!= ( std::uint32_t const &  rhs) const
RPCLBLink& RPCLBLink::operator++ ( )
RPCLBLink RPCLBLink::operator++ ( int  )
RPCLBLink& RPCLBLink::operator-- ( )
RPCLBLink RPCLBLink::operator-- ( int  )
bool RPCLBLink::operator< ( RPCLBLink const &  rhs) const
bool RPCLBLink::operator< ( std::uint32_t const &  rhs) const
bool RPCLBLink::operator== ( RPCLBLink const &  rhs) const
bool RPCLBLink::operator== ( std::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 ( std::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 133 of file RPCLBLink.h.

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

Definition at line 133 of file RPCLBLink.h.

Member Data Documentation

std::uint32_t RPCLBLink::id_
protected

Definition at line 131 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 58 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 52 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 56 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 54 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 42 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 46 of file RPCLBLink.h.

Referenced by getMask(), and getName().

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

Definition at line 48 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 50 of file RPCLBLink.h.

Referenced by getMask(), and getName().

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

Definition at line 44 of file RPCLBLink.h.

Referenced by getMask().

int const RPCLBLink::max_connector_ = 5
static
int const RPCLBLink::max_fibre_ = 7
static

Definition at line 29 of file RPCLBLink.h.

int const RPCLBLink::max_linkboard_ = 2
static
int const RPCLBLink::max_radial_ = 1
static

Definition at line 31 of file RPCLBLink.h.

int const RPCLBLink::max_region_ = 1
static

Definition at line 19 of file RPCLBLink.h.

int const RPCLBLink::max_sector_ = 12
static

Definition at line 23 of file RPCLBLink.h.

int const RPCLBLink::max_side_ = 2
static

Definition at line 25 of file RPCLBLink.h.

int const RPCLBLink::max_wheelordisk_ = 4
static

Definition at line 27 of file RPCLBLink.h.

int const RPCLBLink::max_yoke_ = 5
static

Definition at line 21 of file RPCLBLink.h.

int const RPCLBLink::min_connector_ = 0
static

Definition at line 34 of file RPCLBLink.h.

int const RPCLBLink::min_fibre_ = 0
static

Definition at line 28 of file RPCLBLink.h.

int const RPCLBLink::min_linkboard_ = 0
static

Definition at line 32 of file RPCLBLink.h.

int const RPCLBLink::min_radial_ = 0
static

Definition at line 30 of file RPCLBLink.h.

int const RPCLBLink::min_region_ = 0
static

field ranges

Definition at line 18 of file RPCLBLink.h.

int const RPCLBLink::min_sector_ = 1
static

Definition at line 22 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::min_side_ = 0
static

Definition at line 24 of file RPCLBLink.h.

int const RPCLBLink::min_wheelordisk_ = 0
static

Definition at line 26 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::min_yoke_ = -5
static

Definition at line 20 of file RPCLBLink.h.

int const RPCLBLink::pos_connector_ = 0
staticprotected

Definition at line 57 of file RPCLBLink.h.

int const RPCLBLink::pos_fibre_ = 7
staticprotected

Definition at line 51 of file RPCLBLink.h.

int const RPCLBLink::pos_linkboard_ = 3
staticprotected

Definition at line 55 of file RPCLBLink.h.

int const RPCLBLink::pos_radial_ = 5
staticprotected

Definition at line 53 of file RPCLBLink.h.

int const RPCLBLink::pos_region_ = 24
staticprotected

field positions and masks

Definition at line 41 of file RPCLBLink.h.

int const RPCLBLink::pos_sector_ = 16
staticprotected

Definition at line 45 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::pos_side_ = 14
staticprotected

Definition at line 47 of file RPCLBLink.h.

int const RPCLBLink::pos_wheelordisk_ = 11
staticprotected

Definition at line 49 of file RPCLBLink.h.

Referenced by getName().

int const RPCLBLink::pos_yoke_ = 20
staticprotected

Definition at line 43 of file RPCLBLink.h.

int const RPCLBLink::wildcard_ = INT_MIN
static

Definition at line 14 of file RPCLBLink.h.

Referenced by getName().