CMS 3D CMS Logo

CSCTFTBEventHeader Class Reference

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

List of all members.

Public Member Functions

bool check () const
 simple data integrity check
 CSCTFTBEventHeader (const CSCTFTBEventHeader &)
 CSCTFTBEventHeader ()
unsigned int getActiveDT () const
 DT data flag word.
unsigned int getActiveFront () const
 Overall Active Front FPGA word.
unsigned int getActiveFrontFPGA1 () const
unsigned int getActiveFrontFPGA2 () const
unsigned int getActiveFrontFPGA3 () const
unsigned int getActiveFrontFPGA4 () const
unsigned int getActiveFrontFPGA5 () const
unsigned int getActiveME1a () const
 ME1 data flag words.
unsigned int getActiveME1b () const
unsigned int getActiveME2 () const
 ME2 data flag words.
unsigned int getActiveME3 () const
 ME3 data flag words.
unsigned int getActiveME4 () const
 ME4 data flag words.
int getBXnum () const
 BX number (for first bx read out).
int getLvl1num () const
 L1A number.
unsigned int getNumActiveFront () const
 Calculate number of active front FPGAs.
unsigned int getPtLutSpy () const
 PT LUT Spy flag 0 = no track, 1 = 1st track, 2 = 2nd, 3 = 3rd.
unsigned int getZeroSupp () const
 Zero Supp word.
int numBX () const
 number of BX read out per link
int numLinks () const
 number of links to read out per MPC connection
int numMPC () const
 number of MPC connections to read out
 ~CSCTFTBEventHeader ()

Static Public Member Functions

static unsigned size ()

Private Attributes

unsigned act_DT_:1
unsigned act_ffpga_:5
unsigned bunch_cntr_:12
unsigned key1_:4
unsigned key2_:4
unsigned key3_:4
unsigned key4_:4
unsigned l1a_lsb_:12
unsigned l1a_msb_:12
unsigned num_bx_:3
unsigned pt_lut_spy_:2
unsigned zero_supp_:1

Static Private Attributes

static const unsigned nLinks_ = 3
static const unsigned nMPC_ = 5
static const unsigned size_ = 4

Friends

class CSCTFTBEventData
 filled by EventData
std::ostream & operator<< (std::ostream &stream, const CSCTFTBEventHeader &)
 pretty-print


Detailed Description

Definition at line 73 of file CSCTFTBEventHeader.h.


Constructor & Destructor Documentation

CSCTFTBEventHeader::CSCTFTBEventHeader (  ) 

Definition at line 104 of file CSCTFTBEventHeader.cc.

00105 {}

CSCTFTBEventHeader::CSCTFTBEventHeader ( const CSCTFTBEventHeader parent  ) 

Definition at line 107 of file CSCTFTBEventHeader.cc.

References size().

00108 {
00109   memcpy(reinterpret_cast<unsigned*>(this),&parent,size()*sizeof(unsigned short));
00110 }

CSCTFTBEventHeader::~CSCTFTBEventHeader (  ) 

Definition at line 112 of file CSCTFTBEventHeader.cc.

00113 {}


Member Function Documentation

bool CSCTFTBEventHeader::check (  )  const

simple data integrity check

Definition at line 126 of file CSCTFTBEventHeader.cc.

References key1_, key2_, key3_, and key4_.

00127 {
00128   return (key1_ == 0xf && key2_ == 0xf && key3_ == 0xf && key4_ == 0xf);
00129 }

unsigned int CSCTFTBEventHeader::getActiveDT (  )  const [inline]

DT data flag word.

Definition at line 101 of file CSCTFTBEventHeader.h.

References act_DT_.

Referenced by operator<<(), and CSCTFTBSPBlock::unpackData().

00101 {return act_DT_;}

unsigned int CSCTFTBEventHeader::getActiveFront (  )  const [inline]

Overall Active Front FPGA word.

Definition at line 122 of file CSCTFTBEventHeader.h.

References act_ffpga_.

Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().

00122 {return act_ffpga_;}

unsigned int CSCTFTBEventHeader::getActiveFrontFPGA1 (  )  const [inline]

Definition at line 106 of file CSCTFTBEventHeader.h.

References act_ffpga_.

Referenced by getActiveME1a().

00106 {return (act_ffpga_&1);}

unsigned int CSCTFTBEventHeader::getActiveFrontFPGA2 (  )  const [inline]

Definition at line 107 of file CSCTFTBEventHeader.h.

References act_ffpga_.

Referenced by getActiveME1b().

00107 {return ((act_ffpga_&2)>>1);}

unsigned int CSCTFTBEventHeader::getActiveFrontFPGA3 (  )  const [inline]

Definition at line 111 of file CSCTFTBEventHeader.h.

References act_ffpga_.

Referenced by getActiveME2().

00111 {return ((act_ffpga_&4)>>2);}

unsigned int CSCTFTBEventHeader::getActiveFrontFPGA4 (  )  const [inline]

Definition at line 115 of file CSCTFTBEventHeader.h.

References act_ffpga_.

Referenced by getActiveME3(), and getActiveME4().

00115 {return ((act_ffpga_&8)>>3);}

unsigned int CSCTFTBEventHeader::getActiveFrontFPGA5 (  )  const [inline]

Definition at line 119 of file CSCTFTBEventHeader.h.

References act_ffpga_.

00119 {return ((act_ffpga_&10)>>4);}

unsigned int CSCTFTBEventHeader::getActiveME1a (  )  const [inline]

ME1 data flag words.

Definition at line 104 of file CSCTFTBEventHeader.h.

References getActiveFrontFPGA1().

00104 {return getActiveFrontFPGA1();}

unsigned int CSCTFTBEventHeader::getActiveME1b (  )  const [inline]

Definition at line 105 of file CSCTFTBEventHeader.h.

References getActiveFrontFPGA2().

00105 {return getActiveFrontFPGA2();}

unsigned int CSCTFTBEventHeader::getActiveME2 (  )  const [inline]

ME2 data flag words.

Definition at line 110 of file CSCTFTBEventHeader.h.

References getActiveFrontFPGA3().

00110 {return getActiveFrontFPGA3();}

unsigned int CSCTFTBEventHeader::getActiveME3 (  )  const [inline]

ME3 data flag words.

Definition at line 114 of file CSCTFTBEventHeader.h.

References getActiveFrontFPGA4().

00114 {return getActiveFrontFPGA4();}

unsigned int CSCTFTBEventHeader::getActiveME4 (  )  const [inline]

ME4 data flag words.

Definition at line 118 of file CSCTFTBEventHeader.h.

References getActiveFrontFPGA4().

00118 {return getActiveFrontFPGA4();}

int CSCTFTBEventHeader::getBXnum (  )  const [inline]

BX number (for first bx read out).

Definition at line 95 of file CSCTFTBEventHeader.h.

References bunch_cntr_.

Referenced by operator<<().

00095 {return bunch_cntr_;}

int CSCTFTBEventHeader::getLvl1num (  )  const [inline]

L1A number.

Definition at line 92 of file CSCTFTBEventHeader.h.

References l1a_lsb_, and l1a_msb_.

Referenced by operator<<().

00092 {return ((l1a_lsb_)|(l1a_msb_<<12));}

unsigned int CSCTFTBEventHeader::getNumActiveFront (  )  const

Calculate number of active front FPGAs.

Definition at line 115 of file CSCTFTBEventHeader.cc.

References act_ffpga_, i, and funct::num().

Referenced by operator<<().

00116 {
00117   unsigned int num = 0;
00118 
00119   for(int i=0;i<5;i++)
00120     {
00121       if(act_ffpga_&(1<<i)) num++;
00122     }
00123   return num;
00124 }

unsigned int CSCTFTBEventHeader::getPtLutSpy (  )  const [inline]

PT LUT Spy flag 0 = no track, 1 = 1st track, 2 = 2nd, 3 = 3rd.

Definition at line 128 of file CSCTFTBEventHeader.h.

References pt_lut_spy_.

Referenced by operator<<(), and CSCTFTBSPBlock::unpackData().

00128 { return pt_lut_spy_;}

unsigned int CSCTFTBEventHeader::getZeroSupp (  )  const [inline]

Zero Supp word.

Definition at line 98 of file CSCTFTBEventHeader.h.

References zero_supp_.

Referenced by operator<<(), CSCTFTBSPBlock::unpackData(), and CSCTFTBFrontBlock::unpackData().

00098 {return zero_supp_;}

int CSCTFTBEventHeader::numBX (  )  const [inline]

number of BX read out per link

Definition at line 137 of file CSCTFTBEventHeader.h.

References num_bx_.

Referenced by operator<<(), and CSCTFTBEventData::unpackData().

00137 {return num_bx_;}

int CSCTFTBEventHeader::numLinks (  )  const [inline]

number of links to read out per MPC connection

Definition at line 131 of file CSCTFTBEventHeader.h.

References nLinks_.

Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().

00131 {return nLinks_;}

int CSCTFTBEventHeader::numMPC (  )  const [inline]

number of MPC connections to read out

Definition at line 134 of file CSCTFTBEventHeader.h.

References nMPC_.

Referenced by operator<<(), and CSCTFTBFrontBlock::unpackData().

00134 {return nMPC_;}

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

Definition at line 143 of file CSCTFTBEventHeader.h.

References size_.

Referenced by CSCTFTBEventHeader(), and CSCTFTBEventData::unpackData().

00143 {return size_;}


Friends And Related Function Documentation

friend class CSCTFTBEventData [friend]

filled by EventData

Definition at line 149 of file CSCTFTBEventHeader.h.

std::ostream& operator<< ( std::ostream &  stream,
const CSCTFTBEventHeader header 
) [friend]

pretty-print

Definition at line 131 of file CSCTFTBEventHeader.cc.

00131                                                                                 {
00132   stream << std::dec <<"Event Header for L1A " << header.getLvl1num()<<" :\n"
00133          << " BX " << header.getBXnum() << std::endl
00134          << " " << header.numMPC() << " MPC(s)" 
00135          << " with " << header.numLinks() << " links per MPC.\n"
00136          << " There are " << header.numBX() << " BX in this event." << std::endl;
00137   if(header.getZeroSupp()) stream << " Zero Suppression is active.\n";
00138   if(header.getActiveDT()) stream << " DT is active.\n";
00139   if(header.getPtLutSpy()) 
00140     stream << " PT LUT data present on link " << header.getPtLutSpy()<<".\n";
00141   if(header.getActiveFront())
00142     {
00143       stream << " There are "<<header.getNumActiveFront()<<" active front FPGAs." <<std::endl;
00144     }
00145   stream<<std::hex;
00146   return stream;
00147 }


Member Data Documentation

unsigned CSCTFTBEventHeader::act_DT_ [private]

Definition at line 155 of file CSCTFTBEventHeader.h.

Referenced by getActiveDT().

unsigned CSCTFTBEventHeader::act_ffpga_ [private]

Definition at line 154 of file CSCTFTBEventHeader.h.

Referenced by getActiveFront(), getActiveFrontFPGA1(), getActiveFrontFPGA2(), getActiveFrontFPGA3(), getActiveFrontFPGA4(), getActiveFrontFPGA5(), and getNumActiveFront().

unsigned CSCTFTBEventHeader::bunch_cntr_ [private]

Definition at line 159 of file CSCTFTBEventHeader.h.

Referenced by getBXnum(), and CSCTFTBEventData::setEventInformation().

unsigned CSCTFTBEventHeader::key1_ [private]

Definition at line 157 of file CSCTFTBEventHeader.h.

Referenced by check().

unsigned CSCTFTBEventHeader::key2_ [private]

Definition at line 160 of file CSCTFTBEventHeader.h.

Referenced by check().

unsigned CSCTFTBEventHeader::key3_ [private]

Definition at line 163 of file CSCTFTBEventHeader.h.

Referenced by check().

unsigned CSCTFTBEventHeader::key4_ [private]

Definition at line 166 of file CSCTFTBEventHeader.h.

Referenced by check().

unsigned CSCTFTBEventHeader::l1a_lsb_ [private]

Definition at line 162 of file CSCTFTBEventHeader.h.

Referenced by getLvl1num(), and CSCTFTBEventData::setEventInformation().

unsigned CSCTFTBEventHeader::l1a_msb_ [private]

Definition at line 165 of file CSCTFTBEventHeader.h.

Referenced by getLvl1num(), and CSCTFTBEventData::setEventInformation().

const unsigned CSCTFTBEventHeader::nLinks_ = 3 [static, private]

Definition at line 169 of file CSCTFTBEventHeader.h.

Referenced by numLinks().

const unsigned CSCTFTBEventHeader::nMPC_ = 5 [static, private]

Definition at line 170 of file CSCTFTBEventHeader.h.

Referenced by numMPC().

unsigned CSCTFTBEventHeader::num_bx_ [private]

Definition at line 152 of file CSCTFTBEventHeader.h.

Referenced by numBX().

unsigned CSCTFTBEventHeader::pt_lut_spy_ [private]

Definition at line 156 of file CSCTFTBEventHeader.h.

Referenced by getPtLutSpy().

const unsigned CSCTFTBEventHeader::size_ = 4 [static, private]

Definition at line 168 of file CSCTFTBEventHeader.h.

Referenced by size().

unsigned CSCTFTBEventHeader::zero_supp_ [private]

Definition at line 153 of file CSCTFTBEventHeader.h.

Referenced by getZeroSupp().


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