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

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.

7  : id_(0x0)
8 {}
RPCLBLink::RPCLBLink ( std::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,
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 36 of file RPCLBLink.cc.

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

37 {
38  std::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_)
49  if (id_ & mask_fibre_)
50  mask |= mask_fibre_;
51  if (id_ & mask_radial_)
52  mask |= mask_radial_;
53  if (id_ & mask_linkboard_)
55  if (id_ & 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
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 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

std::uint32_t RPCLBLink::id_
protected

Definition at line 132 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 59 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 53 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 57 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 55 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 43 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 47 of file RPCLBLink.h.

Referenced by getMask(), and getName().

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

Definition at line 49 of file RPCLBLink.h.

Referenced by getMask().

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

Definition at line 51 of file RPCLBLink.h.

Referenced by getMask(), and getName().

std::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
int const RPCLBLink::max_fibre_ = 7
static

Definition at line 30 of file RPCLBLink.h.

int const RPCLBLink::max_linkboard_ = 2
static
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().