CMS 3D CMS Logo

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

#include <CSCAnodeData2006.h>

Public Member Functions

void addHit (unsigned wireBit)
 sets a bit, from 0 to 7 More...
 
unsigned chip () const
 
 CSCAnodeDataFrame2006 ()
 
 CSCAnodeDataFrame2006 (unsigned chip, unsigned tbin, unsigned data)
 
 CSCAnodeDataFrame2006 (unsigned short frame)
 
unsigned short data () const
 
unsigned short frame () const
 
bool isHit (unsigned wireGroup) const
 given a wiregroup between 0 and 7, it tells whether this bit was on More...
 
unsigned tbin () const
 time bin More...
 

Private Attributes

unsigned short theFrame
 

Detailed Description

Definition at line 8 of file CSCAnodeData2006.h.

Constructor & Destructor Documentation

◆ CSCAnodeDataFrame2006() [1/3]

CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( )
inline

Definition at line 10 of file CSCAnodeData2006.h.

10 {}

◆ CSCAnodeDataFrame2006() [2/3]

CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( unsigned short  frame)
inline

Definition at line 11 of file CSCAnodeData2006.h.

11 : theFrame(frame) {}

◆ CSCAnodeDataFrame2006() [3/3]

CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( unsigned  chip,
unsigned  tbin,
unsigned  data 
)

Definition at line 8 of file CSCAnodeData2006.cc.

8  : theFrame(0) {
9  // lowest bit, plus the OR of the next two.
10  unsigned packedChip = ((chip & 1) + 2 * (chip > 1));
11  theFrame = data + ((tbin & 0x1F) << 8) + (packedChip << 13);
12 }

References chip(), data(), tbin(), and theFrame.

Member Function Documentation

◆ addHit()

void CSCAnodeDataFrame2006::addHit ( unsigned  wireBit)
inline

sets a bit, from 0 to 7

Definition at line 21 of file CSCAnodeData2006.h.

21 { theFrame |= (1 << wireBit); }

References theFrame.

◆ chip()

unsigned CSCAnodeDataFrame2006::chip ( ) const
inline

kind of the chip ID. But it's only 2-bit, and we really need three, so it's the lowest bit, plus the OR of the next two.

Definition at line 27 of file CSCAnodeData2006.h.

27 { return (theFrame >> 13) & 0x3; }

References theFrame.

Referenced by CSCAnodeDataFrame2006().

◆ data()

unsigned short CSCAnodeDataFrame2006::data ( ) const
inline

Definition at line 28 of file CSCAnodeData2006.h.

28 { return theFrame & 0xFF; }

References theFrame.

Referenced by CSCAnodeDataFrame2006().

◆ frame()

unsigned short CSCAnodeDataFrame2006::frame ( ) const
inline

Definition at line 29 of file CSCAnodeData2006.h.

29 { return theFrame; }

References theFrame.

Referenced by CSCAnodeData2006::CSCAnodeData2006().

◆ isHit()

bool CSCAnodeDataFrame2006::isHit ( unsigned  wireGroup) const
inline

given a wiregroup between 0 and 7, it tells whether this bit was on

Definition at line 15 of file CSCAnodeData2006.h.

15  {
16  assert(wireGroup < 8);
17  return ((theFrame >> wireGroup) & 0x1);
18  }

References cms::cuda::assert(), theFrame, and testProducerWithPsetDescEmpty_cfi::x1.

◆ tbin()

unsigned CSCAnodeDataFrame2006::tbin ( ) const
inline

time bin

Definition at line 24 of file CSCAnodeData2006.h.

24 { return (theFrame >> 8) & 0x1F; }

References theFrame.

Referenced by CSCAnodeDataFrame2006().

Member Data Documentation

◆ theFrame

unsigned short CSCAnodeDataFrame2006::theFrame
private

Definition at line 32 of file CSCAnodeData2006.h.

Referenced by addHit(), chip(), CSCAnodeDataFrame2006(), data(), frame(), isHit(), and tbin().

cms::cuda::assert
assert(be >=bs)
CSCAnodeDataFrame2006::data
unsigned short data() const
Definition: CSCAnodeData2006.h:28
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
CSCAnodeDataFrame2006::chip
unsigned chip() const
Definition: CSCAnodeData2006.h:27
CSCAnodeDataFrame2006::tbin
unsigned tbin() const
time bin
Definition: CSCAnodeData2006.h:24
CSCAnodeDataFrame2006::frame
unsigned short frame() const
Definition: CSCAnodeData2006.h:29
CSCAnodeDataFrame2006::theFrame
unsigned short theFrame
Definition: CSCAnodeData2006.h:32