CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 short frame)
 
 CSCAnodeDataFrame2006 (unsigned chip, unsigned tbin, unsigned data)
 
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.

◆ CSCAnodeDataFrame2006() [3/3]

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

Definition at line 8 of file CSCAnodeData2006.cc.

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

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 }
unsigned chip() const
unsigned tbin() const
time bin
unsigned short theFrame
unsigned short data() const

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.

References theFrame.

21 { theFrame |= (1 << wireBit); }
unsigned short 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.

References theFrame.

Referenced by CSCAnodeDataFrame2006().

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

◆ data()

unsigned short CSCAnodeDataFrame2006::data ( ) const
inline

Definition at line 28 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeDataFrame2006().

28 { return theFrame & 0xFF; }
unsigned short theFrame

◆ frame()

unsigned short CSCAnodeDataFrame2006::frame ( ) const
inline

Definition at line 29 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeData2006::CSCAnodeData2006().

29 { return theFrame; }
unsigned short theFrame

◆ 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.

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

15  {
16  assert(wireGroup < 8);
17  return ((theFrame >> wireGroup) & 0x1);
18  }
assert(be >=bs)
unsigned short theFrame

◆ tbin()

unsigned CSCAnodeDataFrame2006::tbin ( ) const
inline

time bin

Definition at line 24 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeDataFrame2006().

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

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