CMS 3D CMS Logo

Public Member Functions | Private Attributes

CSCAnodeDataFrame2006 Class Reference

#include <CSCAnodeData2006.h>

List of all members.

Public Member Functions

void addHit (unsigned wireBit)
 sets a bit, from 0 to 7
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
unsigned tbin () const
 time bin

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.

{}
CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( unsigned short  frame) [inline]

Definition at line 11 of file CSCAnodeData2006.h.

                                             :
    theFrame(frame) {}
CSCAnodeDataFrame2006::CSCAnodeDataFrame2006 ( unsigned  chip,
unsigned  tbin,
unsigned  data 
)

Definition at line 9 of file CSCAnodeData2006.cc.

References theFrame.

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

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(), and CSCAnodeData2006::selfTest().

                                {
    theFrame |= (1 << wireBit);
  }
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 CSCAnodeData2006::selfTest().

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

Definition at line 31 of file CSCAnodeData2006.h.

References theFrame.

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

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

Definition at line 32 of file CSCAnodeData2006.h.

References theFrame.

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

{return 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.

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

                                       {
    assert(wireGroup < 8);
    return ( (theFrame>>wireGroup) & 0x1 );
  }
unsigned CSCAnodeDataFrame2006::tbin ( ) const [inline]

time bin

Definition at line 27 of file CSCAnodeData2006.h.

References theFrame.

Referenced by CSCAnodeData2006::selfTest().

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

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