CMS 3D CMS Logo

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

#include <RPCAMCLink.h>

Public Member Functions

std::uint32_t getId () const
 
std::uint32_t getMask () const
 
std::string getName () const
 
bool matches (RPCAMCLink const &rhs) const
 
 operator std::uint32_t () const
 
bool operator!= (RPCAMCLink const &rhs) const
 
bool operator!= (std::uint32_t const &rhs) const
 
RPCAMCLinkoperator++ ()
 
RPCAMCLink operator++ (int)
 
RPCAMCLinkoperator-- ()
 
RPCAMCLink operator-- (int)
 
bool operator< (RPCAMCLink const &rhs) const
 
bool operator< (std::uint32_t const &rhs) const
 
bool operator== (RPCAMCLink const &rhs) const
 
bool operator== (std::uint32_t const &rhs) const
 
void reset ()
 
 RPCAMCLink ()
 
 RPCAMCLink (std::uint32_t const &id)
 
 RPCAMCLink (int fed, int amcnumber, int amcinput=wildcard_)
 
void setId (std::uint32_t const &id)
 
int getFED () const
 
int getAMCNumber () const
 
int getAMCInput () const
 
RPCAMCLinksetFED (int fed=wildcard_)
 
RPCAMCLinksetAMCNumber (int amcnumber=wildcard_)
 
RPCAMCLinksetAMCInput (int amcinput=wildcard_)
 

Static Public Attributes

static int const wildcard_ = INT_MIN
 
static int const min_fed_ = 0
 
static int const max_fed_ = 65534
 
static int const min_amcnumber_ = 0
 
static int const max_amcnumber_ = 12
 
static int const min_amcinput_ = 0
 
static int const max_amcinput_ = 80
 

Protected Member Functions

int bf_get (int const min, std::uint32_t const mask, int const pos) const
 
RPCAMCLinkbf_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_fed_ = 16
 
static std::uint32_t const mask_fed_ = 0xffff0000
 
static int const pos_amcnumber_ = 12
 
static std::uint32_t const mask_amcnumber_ = 0x0000f000
 
static int const pos_amcinput_ = 0
 
static std::uint32_t const mask_amcinput_ = 0x00000fff
 

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 AMC-LB path

Definition at line 12 of file RPCAMCLink.h.

Constructor & Destructor Documentation

◆ RPCAMCLink() [1/3]

RPCAMCLink::RPCAMCLink ( )

Definition at line 6 of file RPCAMCLink.cc.

6 : id_(0x0) {}

◆ RPCAMCLink() [2/3]

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

Definition at line 8 of file RPCAMCLink.cc.

8 : id_(id) {}

◆ RPCAMCLink() [3/3]

RPCAMCLink::RPCAMCLink ( int  fed,
int  amcnumber,
int  amcinput = wildcard_ 
)

Definition at line 10 of file RPCAMCLink.cc.

References setAMCInput(), setAMCNumber(), and setFED().

10  : id_(0x0) {
11  setFED(fed);
12  setAMCNumber(amcnumber);
13  setAMCInput(amcinput);
14 }

Member Function Documentation

◆ bf_get()

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

◆ bf_set()

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

◆ bf_stream()

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

Referenced by getName().

◆ getAMCInput()

int RPCAMCLink::getAMCInput ( ) const

◆ getAMCNumber()

int RPCAMCLink::getAMCNumber ( ) const

◆ getFED()

int RPCAMCLink::getFED ( ) const

Field Getters

Referenced by RPCCPPFUnpacker::processRXRecord().

◆ getId()

std::uint32_t RPCAMCLink::getId ( ) const

◆ getMask()

std::uint32_t RPCAMCLink::getMask ( ) const

Definition at line 16 of file RPCAMCLink.cc.

References id_, gpuClustering::pixelStatus::mask, mask_amcinput_, mask_amcnumber_, and mask_fed_.

16  {
17  std::uint32_t mask(0x0);
18  if (id_ & mask_fed_)
19  mask |= mask_fed_;
20  if (id_ & mask_amcnumber_)
22  if (id_ & mask_amcinput_)
24  return mask;
25 }
constexpr uint32_t mask
Definition: gpuClustering.h:26

◆ getName()

std::string RPCAMCLink::getName ( ) const

Definition at line 27 of file RPCAMCLink.cc.

References bf_stream(), id_, mask_amcinput_, mask_amcnumber_, mask_fed_, min_amcinput_, min_amcnumber_, min_fed_, pos_amcinput_, pos_amcnumber_, and pos_fed_.

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

27  {
28  std::ostringstream oss;
29  oss << "RPCAMCLink_";
33  if (id_ & mask_amcinput_) {
35  }
36  }
37  return oss.str();
38 }

◆ matches()

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

◆ operator std::uint32_t()

RPCAMCLink::operator std::uint32_t ( ) const

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

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

◆ operator++() [1/2]

RPCAMCLink& RPCAMCLink::operator++ ( )

◆ operator++() [2/2]

RPCAMCLink RPCAMCLink::operator++ ( int  )

◆ operator--() [1/2]

RPCAMCLink& RPCAMCLink::operator-- ( )

◆ operator--() [2/2]

RPCAMCLink RPCAMCLink::operator-- ( int  )

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ reset()

void RPCAMCLink::reset ( )

◆ serialize()

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

◆ setAMCInput()

RPCAMCLink& RPCAMCLink::setAMCInput ( int  amcinput = wildcard_)

◆ setAMCNumber()

RPCAMCLink& RPCAMCLink::setAMCNumber ( int  amcnumber = wildcard_)

Referenced by RPCAMCLink().

◆ setFED()

RPCAMCLink& RPCAMCLink::setFED ( int  fed = wildcard_)

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

Referenced by RPCAMCLink().

◆ setId()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 89 of file RPCAMCLink.h.

◆ cond::serialization::access

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

Definition at line 89 of file RPCAMCLink.h.

Member Data Documentation

◆ id_

std::uint32_t RPCAMCLink::id_
protected

Definition at line 87 of file RPCAMCLink.h.

Referenced by getMask(), and getName().

◆ mask_amcinput_

std::uint32_t const RPCAMCLink::mask_amcinput_ = 0x00000fff
staticprotected

Definition at line 34 of file RPCAMCLink.h.

Referenced by getMask(), and getName().

◆ mask_amcnumber_

std::uint32_t const RPCAMCLink::mask_amcnumber_ = 0x0000f000
staticprotected

Definition at line 32 of file RPCAMCLink.h.

Referenced by getMask(), and getName().

◆ mask_fed_

std::uint32_t const RPCAMCLink::mask_fed_ = 0xffff0000
staticprotected

Definition at line 30 of file RPCAMCLink.h.

Referenced by getMask(), and getName().

◆ max_amcinput_

int const RPCAMCLink::max_amcinput_ = 80
static

Definition at line 23 of file RPCAMCLink.h.

◆ max_amcnumber_

int const RPCAMCLink::max_amcnumber_ = 12
static

◆ max_fed_

int const RPCAMCLink::max_fed_ = 65534
static

Definition at line 19 of file RPCAMCLink.h.

◆ min_amcinput_

int const RPCAMCLink::min_amcinput_ = 0
static

Definition at line 22 of file RPCAMCLink.h.

Referenced by getName().

◆ min_amcnumber_

int const RPCAMCLink::min_amcnumber_ = 0
static

Definition at line 20 of file RPCAMCLink.h.

Referenced by getName().

◆ min_fed_

int const RPCAMCLink::min_fed_ = 0
static

field ranges

Definition at line 18 of file RPCAMCLink.h.

Referenced by getName().

◆ pos_amcinput_

int const RPCAMCLink::pos_amcinput_ = 0
staticprotected

Definition at line 33 of file RPCAMCLink.h.

Referenced by getName().

◆ pos_amcnumber_

int const RPCAMCLink::pos_amcnumber_ = 12
staticprotected

Definition at line 31 of file RPCAMCLink.h.

Referenced by getName().

◆ pos_fed_

int const RPCAMCLink::pos_fed_ = 16
staticprotected

field positions and masks

Definition at line 29 of file RPCAMCLink.h.

Referenced by getName().

◆ wildcard_

int const RPCAMCLink::wildcard_ = INT_MIN
static