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 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::CSCAnodeDataFrame2006 ( )
inline

Definition at line 10 of file CSCAnodeData2006.h.

Referenced by CSCAnodeDataFrame2006().

10 {}
CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( unsigned short  frame)
inline

Definition at line 11 of file CSCAnodeData2006.h.

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

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

Definition at line 7 of file CSCAnodeData2006.cc.

References theFrame.

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

Member Function Documentation

void CSCAnodeDataFrame2006::addHit ( unsigned  wireBit)
inline

sets a bit, from 0 to 7

Definition at line 22 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeData2006::addHit(), CSCAnodeData2006::selfTest(), and CSCAnodeData2006::sizeInWords().

22  {
23  theFrame |= (1 << wireBit);
24  }
unsigned short theFrame
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 30 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeDataFrame2006(), and CSCAnodeData2006::selfTest().

30 {return (theFrame >>13) & 0x3;}
unsigned short theFrame
unsigned short CSCAnodeDataFrame2006::data ( ) const
inline

Definition at line 31 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeDataFrame2006(), CSCAnodeData2006::selfTest(), and CSCAnodeData2006::wireDigis().

31 {return theFrame & 0xFF;}
unsigned short theFrame
unsigned short CSCAnodeDataFrame2006::frame ( ) const
inline

Definition at line 32 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeData2006::addHit(), and CSCAnodeData2006::CSCAnodeData2006().

32 {return theFrame;}
unsigned short theFrame
bool CSCAnodeDataFrame2006::isHit ( unsigned  wireGroup) const
inline

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

Definition at line 16 of file CSCAnodeData2006.h.

References theFrame, and globals_cff::x1.

Referenced by CSCAnodeData2006::selfTest(), and CSCAnodeData2006::wireDigis().

16  {
17  assert(wireGroup < 8);
18  return ( (theFrame>>wireGroup) & 0x1 );
19  }
unsigned short theFrame
unsigned CSCAnodeDataFrame2006::tbin ( ) const
inline

time bin

Definition at line 27 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeDataFrame2006(), CSCAnodeData2006::selfTest(), and CSCAnodeData2006::sizeInWords().

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

Member Data Documentation

unsigned short CSCAnodeDataFrame2006::theFrame
private

Definition at line 35 of file CSCAnodeData2006.h.

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