CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
RPCDigiL1Link Class Reference

#include <RPCDigiL1Link.h>

Public Member Functions

int bx (unsigned int layer) const
 
bool empty () const
 
bool empty (unsigned int layer) const
 
unsigned int nlayer () const
 
unsigned int rawdetId (unsigned int layer) const
 
 RPCDigiL1Link ()
 
void setLink (unsigned int layer, unsigned int rpcdetId, int strip, int bx)
 
int strip (unsigned int layer) const
 
 ~RPCDigiL1Link ()
 

Private Member Functions

void checklayer (unsigned int layer) const
 

Private Attributes

std::vector< std::pair< unsigned int, int > > _link
 

Detailed Description

Definition at line 7 of file RPCDigiL1Link.h.

Constructor & Destructor Documentation

◆ RPCDigiL1Link()

RPCDigiL1Link::RPCDigiL1Link ( )

Definition at line 4 of file RPCDigiL1Link.cc.

4  {
5  for (unsigned int i = 0; i < 7; i++) {
6  std::pair<unsigned int, int> c(0, 0);
7  _link.push_back(c);
8  }
9 }

References _link, c, and mps_fire::i.

◆ ~RPCDigiL1Link()

RPCDigiL1Link::~RPCDigiL1Link ( )

Definition at line 11 of file RPCDigiL1Link.cc.

11 {}

Member Function Documentation

◆ bx()

int RPCDigiL1Link::bx ( unsigned int  layer) const

Definition at line 37 of file RPCDigiL1Link.cc.

37  {
38  this->checklayer(layer);
39  return _link[layer - 1].second / 1000;
40 }

References _link, checklayer(), and phase1PixelTopology::layer.

Referenced by setLink().

◆ checklayer()

void RPCDigiL1Link::checklayer ( unsigned int  layer) const
private

Definition at line 53 of file RPCDigiL1Link.cc.

53  {
54  if (layer == 0 || layer > 6)
55  throw cms::Exception("RPCException") << "RPCDigiL1Link: layer must be in the range from 1 to 6" << std::endl;
56 }

References Exception, and phase1PixelTopology::layer.

Referenced by bx(), empty(), rawdetId(), setLink(), and strip().

◆ empty() [1/2]

bool RPCDigiL1Link::empty ( ) const

Definition at line 13 of file RPCDigiL1Link.cc.

13  {
14  bool e = true;
15  for (unsigned int l = 1; l <= 6; l++) {
16  if (!this->empty(l))
17  e = false;
18  }
19  return e;
20 }

References MillePedeFileConverter_cfg::e, and cmsLHEtoEOSManager::l.

◆ empty() [2/2]

bool RPCDigiL1Link::empty ( unsigned int  layer) const

Definition at line 22 of file RPCDigiL1Link.cc.

22  {
23  this->checklayer(layer);
24  return this->rawdetId(layer) == 0;
25 }

References checklayer(), and rawdetId().

◆ nlayer()

unsigned int RPCDigiL1Link::nlayer ( ) const

Definition at line 42 of file RPCDigiL1Link.cc.

42 { return _link.size() - 1; }

References _link.

◆ rawdetId()

unsigned int RPCDigiL1Link::rawdetId ( unsigned int  layer) const

Definition at line 27 of file RPCDigiL1Link.cc.

27  {
28  this->checklayer(layer);
29  return _link[layer - 1].first;
30 }

References _link, checklayer(), and phase1PixelTopology::layer.

Referenced by empty().

◆ setLink()

void RPCDigiL1Link::setLink ( unsigned int  layer,
unsigned int  rpcdetId,
int  strip,
int  bx 
)

Definition at line 44 of file RPCDigiL1Link.cc.

44  {
45  this->checklayer(layer);
46  int pdigi = abs(bx) * 1000 + strip;
47  if (bx < 0)
48  pdigi *= -1;
49  std::pair<unsigned int, int> digi(rpcdetId, pdigi);
50  _link[layer - 1] = digi;
51 }

References _link, funct::abs(), bx(), checklayer(), phase1PixelTopology::layer, Digi_cff::pdigi, and strip().

◆ strip()

int RPCDigiL1Link::strip ( unsigned int  layer) const

Definition at line 32 of file RPCDigiL1Link.cc.

32  {
33  this->checklayer(layer);
34  return abs(_link[layer - 1].second) % 1000;
35 }

References _link, funct::abs(), checklayer(), phase1PixelTopology::layer, and edm::second().

Referenced by setLink().

Member Data Documentation

◆ _link

std::vector<std::pair<unsigned int, int> > RPCDigiL1Link::_link
private

Definition at line 29 of file RPCDigiL1Link.h.

Referenced by bx(), nlayer(), rawdetId(), RPCDigiL1Link(), setLink(), and strip().

mps_fire.i
i
Definition: mps_fire.py:428
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
Digi_cff.pdigi
pdigi
Definition: Digi_cff.py:48
Exception
Definition: hltDiff.cc:245
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37