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() [1/3]

RPCLBLink::RPCLBLink ( )

Definition at line 6 of file RPCLBLink.cc.

6 : id_(0x0) {}

◆ RPCLBLink() [2/3]

RPCLBLink::RPCLBLink ( std::uint32_t const &  id)

Definition at line 8 of file RPCLBLink.cc.

8 : id_(id) {}

◆ RPCLBLink() [3/3]

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 HLT_2022v12_cff::region, 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

◆ bf_get()

int RPCLBLink::bf_get ( int const  min,
std::uint32_t const  mask,
int const  pos 
) const
protected

◆ bf_set()

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

◆ bf_stream()

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

Referenced by getName().

◆ getConnector()

int RPCLBLink::getConnector ( ) const

◆ getFibre()

int RPCLBLink::getFibre ( ) const

Referenced by getName().

◆ getId()

std::uint32_t RPCLBLink::getId ( ) const

◆ getLinkBoard()

int RPCLBLink::getLinkBoard ( ) const

◆ getMask()

std::uint32_t RPCLBLink::getMask ( ) const

Definition at line 24 of file RPCLBLink.cc.

References id_, gpuClustering::pixelStatus::mask, 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_)
36  if (id_ & mask_fibre_)
37  mask |= mask_fibre_;
38  if (id_ & mask_radial_)
39  mask |= mask_radial_;
40  if (id_ & mask_linkboard_)
42  if (id_ & mask_connector_)
44  return mask;
45 }
constexpr uint32_t mask
Definition: gpuClustering.h:24

◆ getName()

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_2022v12_cff::region, and wildcard_.

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

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 }

◆ getRadial()

int RPCLBLink::getRadial ( ) const

Referenced by getName().

◆ getRegion()

int RPCLBLink::getRegion ( ) const

Field Getters

Referenced by getName().

◆ getSector()

int RPCLBLink::getSector ( ) const

◆ getSide()

int RPCLBLink::getSide ( ) const

Referenced by getName().

◆ getWheelOrDisk()

int RPCLBLink::getWheelOrDisk ( ) const

◆ getYoke()

int RPCLBLink::getYoke ( ) const

Referenced by getName().

◆ matches()

bool RPCLBLink::matches ( RPCLBLink const &  rhs) const

◆ operator std::uint32_t()

RPCLBLink::operator std::uint32_t ( ) const

◆ operator!=() [1/2]

bool RPCLBLink::operator!= ( RPCLBLink const &  rhs) const

◆ operator!=() [2/2]

bool RPCLBLink::operator!= ( std::uint32_t const &  rhs) const

◆ operator++() [1/2]

RPCLBLink& RPCLBLink::operator++ ( )

◆ operator++() [2/2]

RPCLBLink RPCLBLink::operator++ ( int  )

◆ operator--() [1/2]

RPCLBLink& RPCLBLink::operator-- ( )

◆ operator--() [2/2]

RPCLBLink RPCLBLink::operator-- ( int  )

◆ operator<() [1/2]

bool RPCLBLink::operator< ( RPCLBLink const &  rhs) const

◆ operator<() [2/2]

bool RPCLBLink::operator< ( std::uint32_t const &  rhs) const

◆ operator==() [1/2]

bool RPCLBLink::operator== ( RPCLBLink const &  rhs) const

◆ operator==() [2/2]

bool RPCLBLink::operator== ( std::uint32_t const &  rhs) const

◆ reset()

void RPCLBLink::reset ( )

◆ serialize()

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

◆ setConnector()

RPCLBLink& RPCLBLink::setConnector ( int  connector = wildcard_)

◆ setFibre()

RPCLBLink& RPCLBLink::setFibre ( int  fibre = wildcard_)

◆ setId()

void RPCLBLink::setId ( std::uint32_t const &  id)

◆ setLinkBoard()

RPCLBLink& RPCLBLink::setLinkBoard ( int  linkboard = wildcard_)

◆ setRadial()

RPCLBLink& RPCLBLink::setRadial ( int  radial = wildcard_)

◆ setRegion()

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().

◆ setSector()

RPCLBLink& RPCLBLink::setSector ( int  sector = wildcard_)

◆ setSide()

RPCLBLink& RPCLBLink::setSide ( int  side = wildcard_)

◆ setWheelOrDisk()

RPCLBLink& RPCLBLink::setWheelOrDisk ( int  wheelordisk = wildcard_)

◆ setYoke()

RPCLBLink& RPCLBLink::setYoke ( int  yoke = wildcard_)

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 133 of file RPCLBLink.h.

◆ cond::serialization::access

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

Definition at line 133 of file RPCLBLink.h.

Member Data Documentation

◆ id_

std::uint32_t RPCLBLink::id_
protected

Definition at line 131 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_connector_

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

Definition at line 58 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_fibre_

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

Definition at line 52 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_linkboard_

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

Definition at line 56 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_radial_

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

Definition at line 54 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_region_

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

Definition at line 42 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_sector_

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

Definition at line 46 of file RPCLBLink.h.

Referenced by getMask(), and getName().

◆ mask_side_

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

Definition at line 48 of file RPCLBLink.h.

Referenced by getMask().

◆ mask_wheelordisk_

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

Definition at line 50 of file RPCLBLink.h.

Referenced by getMask(), and getName().

◆ mask_yoke_

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

Definition at line 44 of file RPCLBLink.h.

Referenced by getMask().

◆ max_connector_

int const RPCLBLink::max_connector_ = 5
static

◆ max_fibre_

int const RPCLBLink::max_fibre_ = 7
static

Definition at line 29 of file RPCLBLink.h.

◆ max_linkboard_

int const RPCLBLink::max_linkboard_ = 2
static

◆ max_radial_

int const RPCLBLink::max_radial_ = 1
static

Definition at line 31 of file RPCLBLink.h.

◆ max_region_

int const RPCLBLink::max_region_ = 1
static

Definition at line 19 of file RPCLBLink.h.

◆ max_sector_

int const RPCLBLink::max_sector_ = 12
static

Definition at line 23 of file RPCLBLink.h.

◆ max_side_

int const RPCLBLink::max_side_ = 2
static

Definition at line 25 of file RPCLBLink.h.

◆ max_wheelordisk_

int const RPCLBLink::max_wheelordisk_ = 4
static

Definition at line 27 of file RPCLBLink.h.

◆ max_yoke_

int const RPCLBLink::max_yoke_ = 5
static

Definition at line 21 of file RPCLBLink.h.

◆ min_connector_

int const RPCLBLink::min_connector_ = 0
static

Definition at line 34 of file RPCLBLink.h.

◆ min_fibre_

int const RPCLBLink::min_fibre_ = 0
static

Definition at line 28 of file RPCLBLink.h.

◆ min_linkboard_

int const RPCLBLink::min_linkboard_ = 0
static

Definition at line 32 of file RPCLBLink.h.

◆ min_radial_

int const RPCLBLink::min_radial_ = 0
static

Definition at line 30 of file RPCLBLink.h.

◆ min_region_

int const RPCLBLink::min_region_ = 0
static

field ranges

Definition at line 18 of file RPCLBLink.h.

◆ min_sector_

int const RPCLBLink::min_sector_ = 1
static

Definition at line 22 of file RPCLBLink.h.

Referenced by getName().

◆ min_side_

int const RPCLBLink::min_side_ = 0
static

Definition at line 24 of file RPCLBLink.h.

◆ min_wheelordisk_

int const RPCLBLink::min_wheelordisk_ = 0
static

Definition at line 26 of file RPCLBLink.h.

Referenced by getName().

◆ min_yoke_

int const RPCLBLink::min_yoke_ = -5
static

Definition at line 20 of file RPCLBLink.h.

◆ pos_connector_

int const RPCLBLink::pos_connector_ = 0
staticprotected

Definition at line 57 of file RPCLBLink.h.

◆ pos_fibre_

int const RPCLBLink::pos_fibre_ = 7
staticprotected

Definition at line 51 of file RPCLBLink.h.

◆ pos_linkboard_

int const RPCLBLink::pos_linkboard_ = 3
staticprotected

Definition at line 55 of file RPCLBLink.h.

◆ pos_radial_

int const RPCLBLink::pos_radial_ = 5
staticprotected

Definition at line 53 of file RPCLBLink.h.

◆ pos_region_

int const RPCLBLink::pos_region_ = 24
staticprotected

field positions and masks

Definition at line 41 of file RPCLBLink.h.

◆ pos_sector_

int const RPCLBLink::pos_sector_ = 16
staticprotected

Definition at line 45 of file RPCLBLink.h.

Referenced by getName().

◆ pos_side_

int const RPCLBLink::pos_side_ = 14
staticprotected

Definition at line 47 of file RPCLBLink.h.

◆ pos_wheelordisk_

int const RPCLBLink::pos_wheelordisk_ = 11
staticprotected

Definition at line 49 of file RPCLBLink.h.

Referenced by getName().

◆ pos_yoke_

int const RPCLBLink::pos_yoke_ = 20
staticprotected

Definition at line 43 of file RPCLBLink.h.

◆ wildcard_

int const RPCLBLink::wildcard_ = INT_MIN
static

Definition at line 14 of file RPCLBLink.h.

Referenced by getName().