CMS 3D CMS Logo

CSCTFTBFrontHeader Class Reference

#include <EventFilter/CSCTFRawToDigi/old/CSCTFTBFrontHeader.h>

List of all members.

Public Member Functions

bool check () const
 Simple data integrity check.
 CSCTFTBFrontHeader (const CSCTFTBFrontHeader &)
 CSCTFTBFrontHeader ()
unsigned getSEBit (unsigned int frontFPGA, unsigned int link) const
 Synch Error for given link.
unsigned getVPBit (unsigned int frontFPGA, unsigned int link) const
 Valid Pattern for given link.
unsigned synchError () const
 Synch Error word (15 links/bits).
unsigned validPattern () const
 Valid Pattern word (15 links/bits).
 ~CSCTFTBFrontHeader ()

Static Public Member Functions

static unsigned size ()
 size of data bank in 16-bit words

Private Attributes

unsigned synch_err_:15
unsigned vld_patrn_:15
unsigned zero1_:1
unsigned zero2_:1

Static Private Attributes

static const unsigned size_ = 2

Friends

class CSCTFTBFrontBlock
std::ostream & operator<< (std::ostream &stream, const CSCTFTBFrontHeader &)
 pretty-print


Detailed Description

Definition at line 28 of file CSCTFTBFrontHeader.h.


Constructor & Destructor Documentation

CSCTFTBFrontHeader::CSCTFTBFrontHeader (  ) 

Definition at line 36 of file CSCTFTBFrontHeader.cc.

00036                                       :
00037   zero1_(0),
00038   zero2_(0)
00039 {}

CSCTFTBFrontHeader::CSCTFTBFrontHeader ( const CSCTFTBFrontHeader parent  ) 

Definition at line 41 of file CSCTFTBFrontHeader.cc.

References size().

00042 {
00043   memcpy(this,&parent,size()*sizeof(unsigned short));
00044 }

CSCTFTBFrontHeader::~CSCTFTBFrontHeader (  ) 

Definition at line 46 of file CSCTFTBFrontHeader.cc.

00047 {}


Member Function Documentation

bool CSCTFTBFrontHeader::check (  )  const [inline]

Simple data integrity check.

Definition at line 60 of file CSCTFTBFrontHeader.h.

References zero1_, and zero2_.

00060 { return (zero1_==0 && zero2_==0);}

unsigned CSCTFTBFrontHeader::getSEBit ( unsigned int  frontFPGA,
unsigned int  link 
) const

Synch Error for given link.

Definition at line 59 of file CSCTFTBFrontHeader.cc.

References synch_err_.

00060 {
00061   frontFPGA =  (frontFPGA >5 || frontFPGA < 1) ? 1 : frontFPGA;
00062   link =  (link >3 || link < 1) ? 1 : link;
00063   unsigned shift = ( (frontFPGA-1)*3 + (link-1) );
00064   return (synch_err_ & (1<<shift)) >> shift;
00065 }

unsigned CSCTFTBFrontHeader::getVPBit ( unsigned int  frontFPGA,
unsigned int  link 
) const

Valid Pattern for given link.

Definition at line 50 of file CSCTFTBFrontHeader.cc.

References vld_patrn_.

Referenced by CSCTFTBFrontBlock::frontDigiData(), and CSCTFTBFrontBlock::unpackData().

00051 {
00052   frontFPGA =  (frontFPGA >5 || frontFPGA < 1) ? 1 : frontFPGA;
00053   link =  (link >3 || link < 1) ? 1 : link;
00054   unsigned shift = ( (frontFPGA-1)*3 + (link-1) );
00055   return (vld_patrn_ & (1<<shift)) >> shift;
00056 }

static unsigned CSCTFTBFrontHeader::size ( void   )  [inline, static]

size of data bank in 16-bit words

Definition at line 63 of file CSCTFTBFrontHeader.h.

References size_.

Referenced by CSCTFTBFrontHeader(), and CSCTFTBFrontBlock::unpackData().

00063 {return size_;};

unsigned CSCTFTBFrontHeader::synchError (  )  const [inline]

Synch Error word (15 links/bits).

Definition at line 54 of file CSCTFTBFrontHeader.h.

References synch_err_.

Referenced by operator<<().

00054 {return  synch_err_;}

unsigned CSCTFTBFrontHeader::validPattern (  )  const [inline]

Valid Pattern word (15 links/bits).

Definition at line 48 of file CSCTFTBFrontHeader.h.

References vld_patrn_.

Referenced by operator<<().

00048 {return  vld_patrn_;}


Friends And Related Function Documentation

friend class CSCTFTBFrontBlock [friend]

Definition at line 67 of file CSCTFTBFrontHeader.h.

std::ostream& operator<< ( std::ostream &  stream,
const CSCTFTBFrontHeader hdr 
) [friend]

pretty-print

Definition at line 67 of file CSCTFTBFrontHeader.cc.

00068 {
00069   if(hdr.validPattern())
00070     {
00071       stream << "\tFront Header Data:\n";
00072       stream << "\t Valid Pattern Bits : " << std::hex << hdr.validPattern()
00073              << std::endl;
00074       stream << "\t Synch Error Bits   : " << std::hex << hdr.synchError()
00075              <<std::endl;
00076     }
00077   return stream;
00078 }


Member Data Documentation

const unsigned CSCTFTBFrontHeader::size_ = 2 [static, private]

Definition at line 89 of file CSCTFTBFrontHeader.h.

Referenced by size().

unsigned CSCTFTBFrontHeader::synch_err_ [private]

Definition at line 75 of file CSCTFTBFrontHeader.h.

Referenced by getSEBit(), and synchError().

unsigned CSCTFTBFrontHeader::vld_patrn_ [private]

Definition at line 72 of file CSCTFTBFrontHeader.h.

Referenced by getVPBit(), and validPattern().

unsigned CSCTFTBFrontHeader::zero1_ [private]

Definition at line 73 of file CSCTFTBFrontHeader.h.

Referenced by check().

unsigned CSCTFTBFrontHeader::zero2_ [private]

Definition at line 76 of file CSCTFTBFrontHeader.h.

Referenced by check().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:30 2009 for CMSSW by  doxygen 1.5.4