CMS 3D CMS Logo

DTROChainCoding Class Reference

FIXEME:. More...

#include <EventFilter/DTRawToDigi/interface/DTROChainCoding.h>

List of all members.

Public Member Functions

 DTROChainCoding (uint32_t code_)
 DTROChainCoding (const int &ddu, const int &ros, const int &rob, const int &tdc, const int &channel)
 DTROChainCoding ()
 Constructors.
int getChannel () const
int getChannelID () const
uint32_t getCode () const
 Getters ///////////////////////.
int getDDU () const
int getDDUID () const
int getROB () const
int getROBID () const
int getROS () const
int getROSID () const
int getSC () const
 SC getters: same as ROS getters (SC data goes in the corresponding ROS).
int getSCID () const
int getTDC () const
int getTDCID () const
void setChain (const int &ddu, const int &ros, const int &rob, const int &tdc, const int &channel)
void setChannel (const int &ID)
void setCode (const uint32_t &code_)
 Setters ///////////////////////.
void setDDU (const int &ID)
 need to reset the bits before setting
void setROB (const int &ID)
void setROS (const int &ID)
void setTDC (const int &ID)
virtual ~DTROChainCoding ()
 Destructor.

Private Attributes

uint32_t code

Static Private Attributes

static const int CHANNEL_MASK = 0x1F
static const int CHANNEL_SHIFT = 0
static const int DDU_MASK = 0x3FF
static const int DDU_SHIFT = 16
static const int ROB_MASK = 0x1F
static const int ROB_SHIFT = 7
static const int ROS_MASK = 0xF
static const int ROS_SHIFT = 12
static const int TDC_MASK = 0x3
static const int TDC_SHIFT = 5


Detailed Description

FIXEME:.

A class for handling the DT Read-out chain.

Date
2007/02/14 15:52:13
Revision
1.4
Author:
M. Zanetti - INFN Padova

Definition at line 33 of file DTROChainCoding.h.


Constructor & Destructor Documentation

DTROChainCoding::DTROChainCoding (  )  [inline]

Constructors.

Definition at line 39 of file DTROChainCoding.h.

00039 : code(0) {}

DTROChainCoding::DTROChainCoding ( const int ddu,
const int ros,
const int rob,
const int tdc,
const int channel 
) [inline]

Definition at line 41 of file DTROChainCoding.h.

References CHANNEL_SHIFT, code, DDU_SHIFT, ROB_SHIFT, ROS_SHIFT, and TDC_SHIFT.

00042                                                                             {    
00043     code = 
00044       ddu << DDU_SHIFT | 
00045       ros << ROS_SHIFT |
00046       rob << ROB_SHIFT |
00047       tdc << TDC_SHIFT |
00048       channel << CHANNEL_SHIFT;
00049   }

DTROChainCoding::DTROChainCoding ( uint32_t  code_  )  [inline]

Definition at line 51 of file DTROChainCoding.h.

00051 : code(code_) {}

virtual DTROChainCoding::~DTROChainCoding (  )  [inline, virtual]

Destructor.

Definition at line 54 of file DTROChainCoding.h.

00054 {}


Member Function Documentation

int DTROChainCoding::getChannel (  )  const [inline]

Definition at line 96 of file DTROChainCoding.h.

References CHANNEL_MASK, CHANNEL_SHIFT, and code.

00096 { return (code >> CHANNEL_SHIFT) & CHANNEL_MASK; }

int DTROChainCoding::getChannelID (  )  const [inline]

Definition at line 97 of file DTROChainCoding.h.

References CHANNEL_SHIFT, and code.

00097 { return (code >> CHANNEL_SHIFT) ; }

uint32_t DTROChainCoding::getCode (  )  const [inline]

Getters ///////////////////////.

Definition at line 87 of file DTROChainCoding.h.

References code.

Referenced by DTROS25Unpacker::interpretRawData().

00087 { return code; }

int DTROChainCoding::getDDU (  )  const [inline]

Definition at line 88 of file DTROChainCoding.h.

References code, DDU_MASK, and DDU_SHIFT.

00088 { return (code >> DDU_SHIFT) & DDU_MASK; }

int DTROChainCoding::getDDUID (  )  const [inline]

Definition at line 89 of file DTROChainCoding.h.

References code, and DDU_SHIFT.

Referenced by DTDataIntegrityTask::processFED(), and DTDataIntegrityTask::processROS25().

00089 { return (code >> DDU_SHIFT) ; }

int DTROChainCoding::getROB (  )  const [inline]

Definition at line 92 of file DTROChainCoding.h.

References code, ROB_MASK, and ROB_SHIFT.

Referenced by DTDataIntegrityTask::processROS25().

00092 { return (code >> ROB_SHIFT) & ROB_MASK; }

int DTROChainCoding::getROBID (  )  const [inline]

Definition at line 93 of file DTROChainCoding.h.

References code, and ROB_SHIFT.

Referenced by DTDataIntegrityTask::processROS25().

00093 { return (code >> ROB_SHIFT) ; }

int DTROChainCoding::getROS (  )  const [inline]

Definition at line 90 of file DTROChainCoding.h.

References code, ROS_MASK, and ROS_SHIFT.

Referenced by DTDataIntegrityTask::processROS25().

00090 { return (code >> ROS_SHIFT) & ROS_MASK; }

int DTROChainCoding::getROSID (  )  const [inline]

Definition at line 91 of file DTROChainCoding.h.

References code, and ROS_SHIFT.

Referenced by DTDataIntegrityTask::processROS25().

00091 { return (code >> ROS_SHIFT) ; }

int DTROChainCoding::getSC (  )  const [inline]

SC getters: same as ROS getters (SC data goes in the corresponding ROS).

Definition at line 100 of file DTROChainCoding.h.

References code, ROS_MASK, and ROS_SHIFT.

00100 { return (code >> ROS_SHIFT) & ROS_MASK; }

int DTROChainCoding::getSCID (  )  const [inline]

Definition at line 101 of file DTROChainCoding.h.

References code, and ROS_SHIFT.

Referenced by DTDataIntegrityTask::processROS25().

00101 { return (code >> ROS_SHIFT) ; }

int DTROChainCoding::getTDC (  )  const [inline]

Definition at line 94 of file DTROChainCoding.h.

References code, TDC_MASK, and TDC_SHIFT.

00094 { return (code >> TDC_SHIFT) & TDC_MASK; }

int DTROChainCoding::getTDCID (  )  const [inline]

Definition at line 95 of file DTROChainCoding.h.

References code, and TDC_SHIFT.

00095 { return (code >> TDC_SHIFT) ; }

void DTROChainCoding::setChain ( const int ddu,
const int ros,
const int rob,
const int tdc,
const int channel 
) [inline]

Definition at line 58 of file DTROChainCoding.h.

References CHANNEL_SHIFT, code, DDU_SHIFT, ROB_SHIFT, ROS_SHIFT, and TDC_SHIFT.

00059                                                                                  {
00060     
00061     code = 
00062       ddu << DDU_SHIFT | 
00063       ros << ROS_SHIFT |
00064       rob << ROB_SHIFT |
00065       tdc << TDC_SHIFT |
00066       channel << CHANNEL_SHIFT;
00067   }

void DTROChainCoding::setChannel ( const int ID  )  [inline]

Definition at line 82 of file DTROChainCoding.h.

References CHANNEL_MASK, CHANNEL_SHIFT, and code.

00082                                          { 
00083     code = ( code & (~(CHANNEL_MASK << CHANNEL_SHIFT)) ) | (ID << CHANNEL_SHIFT);
00084   } 

void DTROChainCoding::setCode ( const uint32_t &  code_  )  [inline]

Setters ///////////////////////.

Definition at line 57 of file DTROChainCoding.h.

References code.

00057 {code = code_;}

void DTROChainCoding::setDDU ( const int ID  )  [inline]

need to reset the bits before setting

Definition at line 70 of file DTROChainCoding.h.

References code, DDU_MASK, and DDU_SHIFT.

Referenced by DTDataIntegrityTask::postBeginJob(), DTDataIntegrityTask::processFED(), and DTDataIntegrityTask::processROS25().

00070                                      { 
00071     code = ( code & (~(DDU_MASK << DDU_SHIFT)) ) | (ID << DDU_SHIFT);
00072   } 

void DTROChainCoding::setROB ( const int ID  )  [inline]

Definition at line 76 of file DTROChainCoding.h.

References code, ROB_MASK, and ROB_SHIFT.

Referenced by DTDataIntegrityTask::bookHistosROS25(), and DTDataIntegrityTask::processROS25().

00076                                      { 
00077     code = ( code & (~(ROB_MASK << ROB_SHIFT)) ) | (ID << ROB_SHIFT);
00078   } 

void DTROChainCoding::setROS ( const int ID  )  [inline]

Definition at line 73 of file DTROChainCoding.h.

References code, ROS_MASK, and ROS_SHIFT.

Referenced by DTDataIntegrityTask::postBeginJob(), and DTDataIntegrityTask::processROS25().

00073                                      { 
00074     code = ( code & (~(ROS_MASK << ROS_SHIFT)) ) | (ID << ROS_SHIFT);
00075   } 

void DTROChainCoding::setTDC ( const int ID  )  [inline]

Definition at line 79 of file DTROChainCoding.h.

References code, TDC_MASK, and TDC_SHIFT.

00079                                      { 
00080     code = ( code & (~(TDC_MASK << TDC_SHIFT)) ) | (ID << TDC_SHIFT);
00081   } 


Member Data Documentation

const int DTROChainCoding::CHANNEL_MASK = 0x1F [static, private]

Definition at line 124 of file DTROChainCoding.h.

Referenced by getChannel(), and setChannel().

const int DTROChainCoding::CHANNEL_SHIFT = 0 [static, private]

Definition at line 123 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getChannel(), getChannelID(), setChain(), and setChannel().

uint32_t DTROChainCoding::code [private]

Definition at line 106 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getChannel(), getChannelID(), getCode(), getDDU(), getDDUID(), getROB(), getROBID(), getROS(), getROSID(), getSC(), getSCID(), getTDC(), getTDCID(), setChain(), setChannel(), setCode(), setDDU(), setROB(), setROS(), and setTDC().

const int DTROChainCoding::DDU_MASK = 0x3FF [static, private]

Definition at line 112 of file DTROChainCoding.h.

Referenced by getDDU(), and setDDU().

const int DTROChainCoding::DDU_SHIFT = 16 [static, private]

Definition at line 111 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getDDU(), getDDUID(), setChain(), and setDDU().

const int DTROChainCoding::ROB_MASK = 0x1F [static, private]

Definition at line 118 of file DTROChainCoding.h.

Referenced by getROB(), and setROB().

const int DTROChainCoding::ROB_SHIFT = 7 [static, private]

Definition at line 117 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getROB(), getROBID(), setChain(), and setROB().

const int DTROChainCoding::ROS_MASK = 0xF [static, private]

Definition at line 115 of file DTROChainCoding.h.

Referenced by getROS(), getSC(), and setROS().

const int DTROChainCoding::ROS_SHIFT = 12 [static, private]

Definition at line 114 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getROS(), getROSID(), getSC(), getSCID(), setChain(), and setROS().

const int DTROChainCoding::TDC_MASK = 0x3 [static, private]

Definition at line 121 of file DTROChainCoding.h.

Referenced by getTDC(), and setTDC().

const int DTROChainCoding::TDC_SHIFT = 5 [static, private]

Definition at line 120 of file DTROChainCoding.h.

Referenced by DTROChainCoding(), getTDC(), getTDCID(), setChain(), and setTDC().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:19:03 2009 for CMSSW by  doxygen 1.5.4