CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
CSCCLCTData Class Reference

#include <CSCCLCTData.h>

Public Member Functions

void add (const CSCComparatorDigi &digi, int layer)
 TODO for packing. Doesn't do flipping yet. More...
 
void add (const CSCComparatorDigi &digi, const CSCDetId &id)
 TODO for packing. Doesn't do flipping yet. More...
 
bool bitValue (int cfeb, int tbin, int layer, int distrip)
 
bool check () const
 
std::vector< CSCComparatorDigicomparatorDigis (int layer)
 layers count from one More...
 
std::vector< CSCComparatorDigicomparatorDigis (uint32_t idlayer, unsigned icfeb)
 layers count from one More...
 
 CSCCLCTData (const CSCTMBHeader *tmbHeader)
 
 CSCCLCTData (int ncfebs, int ntbins, int firmware_version=2007)
 
 CSCCLCTData (int ncfebs, int ntbins, const unsigned short *e0bbuf, int firmware_version=2007)
 
unsigned short * data ()
 
CSCCLCTDataWorddataWord (int iline) const
 
CSCCLCTDataWorddataWord (int cfeb, int tbin, int layer) const
 
void dump () const
 
int nlines () const
 
int sizeInWords () const
 in 16-bit words More...
 

Static Public Member Functions

static void selfTest ()
 
static void setDebug (const bool value)
 

Private Member Functions

void zero ()
 

Private Attributes

int ncfebs_
 
int ntbins_
 
int size_
 
unsigned short theData [7 *6 *32]
 
int theFirmwareVersion
 

Static Private Attributes

static std::atomic< bool > debug {false}
 

Detailed Description

Definition at line 26 of file CSCCLCTData.h.

Constructor & Destructor Documentation

CSCCLCTData::CSCCLCTData ( const CSCTMBHeader tmbHeader)
explicit

Definition at line 17 of file CSCCLCTData.cc.

CSCCLCTData::CSCCLCTData ( int  ncfebs,
int  ntbins,
int  firmware_version = 2007 
)

Definition at line 27 of file CSCCLCTData.cc.

CSCCLCTData::CSCCLCTData ( int  ncfebs,
int  ntbins,
const unsigned short *  e0bbuf,
int  firmware_version = 2007 
)

Definition at line 37 of file CSCCLCTData.cc.

Member Function Documentation

void CSCCLCTData::add ( const CSCComparatorDigi digi,
int  layer 
)

TODO for packing. Doesn't do flipping yet.

!!! Do we need to introduce format version here to accomodate 7 CFEBs

Definition at line 222 of file CSCCLCTData.cc.

Referenced by counter.Counter::register().

void CSCCLCTData::add ( const CSCComparatorDigi digi,
const CSCDetId id 
)

TODO for packing. Doesn't do flipping yet.

!!! Do we need to introduce format version here to accomodate 7 CFEBs

Definition at line 259 of file CSCCLCTData.cc.

Referenced by counter.Counter::register().

bool CSCCLCTData::bitValue ( int  cfeb,
int  tbin,
int  layer,
int  distrip 
)
inline

Definition at line 68 of file CSCCLCTData.h.

References dataWord(), and CSCCLCTDataWord::value().

68  {
69  return dataWord(cfeb, tbin, layer).value(distrip);
70  }
CSCCLCTDataWord & dataWord(int iline) const
Definition: CSCCLCTData.h:54
bool value(int distrip)
Definition: CSCCLCTData.h:16
bool CSCCLCTData::check ( ) const

first do some checks

Definition at line 359 of file CSCCLCTData.cc.

std::vector< CSCComparatorDigi > CSCCLCTData::comparatorDigis ( int  layer)

layers count from one

Definition at line 206 of file CSCCLCTData.cc.

std::vector< CSCComparatorDigi > CSCCLCTData::comparatorDigis ( uint32_t  idlayer,
unsigned  icfeb 
)

layers count from one

first do some checks

what is actually stored in comparator digis are 0/1 for left/right halfstrip for each strip

constructing four bitted words for tbits on

Definition at line 65 of file CSCCLCTData.cc.

unsigned short* CSCCLCTData::data ( )
inline

Definition at line 44 of file CSCCLCTData.h.

References theData.

44 {return theData;}
unsigned short theData[7 *6 *32]
Definition: CSCCLCTData.h:96
CSCCLCTDataWord& CSCCLCTData::dataWord ( int  iline) const
inline

Definition at line 54 of file CSCCLCTData.h.

References assert(), ztail::d, ntuplemaker::iline, nlines(), alignCSCRings::s, and theData.

Referenced by bitValue(), and dataWord().

54  {
55 #ifdef ASSERTS
56  assert(iline < nlines());
57 #endif
58  union dataPtr { const unsigned short * s; CSCCLCTDataWord * d; } mptr;
59  mptr.s = theData+iline;
60  return *(mptr.d);
61  }
int nlines() const
Definition: CSCCLCTData.h:47
assert(m_qm.get())
unsigned short theData[7 *6 *32]
Definition: CSCCLCTData.h:96
tuple d
Definition: ztail.py:151
CSCCLCTDataWord& CSCCLCTData::dataWord ( int  cfeb,
int  tbin,
int  layer 
) const
inline

Definition at line 63 of file CSCCLCTData.h.

References dataWord(), ntuplemaker::iline, and ntbins_.

63  {
64  int iline = (layer-1) + tbin*6 + cfeb*6*ntbins_;
65  return dataWord(iline);
66  }
CSCCLCTDataWord & dataWord(int iline) const
Definition: CSCCLCTData.h:54
void CSCCLCTData::dump ( void  ) const

Definition at line 387 of file CSCCLCTData.cc.

int CSCCLCTData::nlines ( ) const
inline

Definition at line 47 of file CSCCLCTData.h.

References ncfebs_, and ntbins_.

Referenced by dataWord().

47 { return ncfebs_*ntbins_*6; }
void CSCCLCTData::selfTest ( )
static

Definition at line 397 of file CSCCLCTData.cc.

static void CSCCLCTData::setDebug ( const bool  value)
inlinestatic

turns on/off debug flag for this class

Definition at line 35 of file CSCCLCTData.h.

References debug, and relativeConstraints::value.

35 {debug = value;};
static std::atomic< bool > debug
Definition: CSCCLCTData.h:90
int CSCCLCTData::sizeInWords ( ) const
inline

in 16-bit words

Definition at line 46 of file CSCCLCTData.h.

References size_.

46 { return size_;}
void CSCCLCTData::zero ( )
private

Definition at line 49 of file CSCCLCTData.cc.

Member Data Documentation

std::atomic< bool > CSCCLCTData::debug {false}
staticprivate

Definition at line 90 of file CSCCLCTData.h.

Referenced by setDebug().

int CSCCLCTData::ncfebs_
private

Definition at line 93 of file CSCCLCTData.h.

Referenced by nlines().

int CSCCLCTData::ntbins_
private

Definition at line 94 of file CSCCLCTData.h.

Referenced by dataWord(), and nlines().

int CSCCLCTData::size_
private

Definition at line 95 of file CSCCLCTData.h.

Referenced by sizeInWords().

unsigned short CSCCLCTData::theData[7 *6 *32]
private

Definition at line 96 of file CSCCLCTData.h.

Referenced by data(), and dataWord().

int CSCCLCTData::theFirmwareVersion
private

Definition at line 97 of file CSCCLCTData.h.