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 Attributes | Friends
CSCCFEBData Class Reference

#include <CSCCFEBData.h>

Public Member Functions

unsigned adcCounts (unsigned layer, unsigned channel, unsigned timeBin) const
 
unsigned adcOverflow (unsigned layer, unsigned channel, unsigned timeBin) const
 
void add (const CSCStripDigi &, int layer)
 
unsigned boardNumber () const
 
bool check () const
 makes sure each time slice has a trailer More...
 
unsigned controllerData (unsigned uglay, unsigned ugchan, unsigned timeBin) const
 
 CSCCFEBData (unsigned boardNumber, unsigned short *buf, uint16_t theFormatVersion=2005, bool fDCFEB=false)
 read from an existing data stream. More...
 
 CSCCFEBData (unsigned boardNumber, bool sixteenSamples, uint16_t theFormatVersion=2005, bool fDCFEB=false)
 create, More...
 
unsigned short * data ()
 
void digis (uint32_t idlayer, std::vector< CSCStripDigi > &result)
 faster way to get to digis More...
 
std::vector< CSCStripDigidigis (unsigned idlayer)
 
unsigned errorstat (unsigned layer, unsigned channel, unsigned timeBin) const
 
bool isDCFEB () const
 
unsigned nTimeSamples () const
 
unsigned overlappedSampleFlag (unsigned layer, unsigned channel, unsigned timeBin) const
 
void setBoardNumber (int cfeb)
 
void setL1A (unsigned l1a)
 
void setL1A (unsigned sample, unsigned l1a)
 
unsigned sizeInWords () const
 
CSCCFEBStatusDigi statusDigi () const
 returns one status digi per cfeb More...
 
std::vector< std::vector
< CSCStripDigi > > 
stripDigis ()
 deprecated. Use the above method. More...
 
const CSCCFEBTimeSlicetimeSlice (unsigned i) const
 count from 0. User should check if it's a bad slice More...
 

Static Public Member Functions

static void selfTest ()
 

Private Attributes

unsigned boardNumber_
 
std::vector< uint16_t > bWords
 
bool fDCFEB
 
unsigned short theData [1600]
 
uint16_t theFormatVersion
 
unsigned theNumberOfSamples
 
int theSize
 in words More...
 
std::vector< std::pair< int,
bool > > 
theSliceStarts
 

Friends

std::ostream & operator<< (std::ostream &os, const CSCCFEBData &)
 

Detailed Description

Definition at line 14 of file CSCCFEBData.h.

Constructor & Destructor Documentation

CSCCFEBData::CSCCFEBData ( unsigned  boardNumber,
unsigned short *  buf,
uint16_t  theFormatVersion = 2005,
bool  fDCFEB = false 
)

read from an existing data stream.

Definition at line 11 of file CSCCFEBData.cc.

CSCCFEBData::CSCCFEBData ( unsigned  boardNumber,
bool  sixteenSamples,
uint16_t  theFormatVersion = 2005,
bool  fDCFEB = false 
)

create,

Definition at line 63 of file CSCCFEBData.cc.

Member Function Documentation

unsigned CSCCFEBData::adcCounts ( unsigned  layer,
unsigned  channel,
unsigned  timeBin 
) const

Definition at line 119 of file CSCCFEBData.cc.

unsigned CSCCFEBData::adcOverflow ( unsigned  layer,
unsigned  channel,
unsigned  timeBin 
) const

Definition at line 127 of file CSCCFEBData.cc.

void CSCCFEBData::add ( const CSCStripDigi digi,
int  layer 
)

=VB= Set CRC value for simulated data

Definition at line 85 of file CSCCFEBData.cc.

Referenced by counter.Counter::register().

unsigned CSCCFEBData::boardNumber ( ) const
inline

Definition at line 48 of file CSCCFEBData.h.

References boardNumber_.

48 {return boardNumber_;}
unsigned boardNumber_
Definition: CSCCFEBData.h:69
bool CSCCFEBData::check ( ) const

makes sure each time slice has a trailer

Definition at line 321 of file CSCCFEBData.cc.

unsigned CSCCFEBData::controllerData ( unsigned  uglay,
unsigned  ugchan,
unsigned  timeBin 
) const

Definition at line 136 of file CSCCFEBData.cc.

unsigned short* CSCCFEBData::data ( )
inline

Definition at line 46 of file CSCCFEBData.h.

References theData.

46 {return theData;}
unsigned short theData[1600]
Definition: CSCCFEBData.h:63
void CSCCFEBData::digis ( uint32_t  idlayer,
std::vector< CSCStripDigi > &  result 
)

faster way to get to digis

Fill strip digis for layer with raw detid = idlayer WARNING: these digis have no comparator information.

for bad or missing data word will be zero

Handle 2013 Format

Definition at line 223 of file CSCCFEBData.cc.

std::vector< CSCStripDigi > CSCCFEBData::digis ( unsigned  idlayer)

Definition at line 310 of file CSCCFEBData.cc.

unsigned CSCCFEBData::errorstat ( unsigned  layer,
unsigned  channel,
unsigned  timeBin 
) const

Definition at line 160 of file CSCCFEBData.cc.

bool CSCCFEBData::isDCFEB ( ) const
inline

Definition at line 59 of file CSCCFEBData.h.

References fDCFEB.

59 {return fDCFEB;}
unsigned CSCCFEBData::nTimeSamples ( ) const
inline

Definition at line 21 of file CSCCFEBData.h.

References theNumberOfSamples.

21 { return theNumberOfSamples;}
unsigned theNumberOfSamples
Definition: CSCCFEBData.h:70
unsigned CSCCFEBData::overlappedSampleFlag ( unsigned  layer,
unsigned  channel,
unsigned  timeBin 
) const

Definition at line 152 of file CSCCFEBData.cc.

static void CSCCFEBData::selfTest ( )
static
void CSCCFEBData::setBoardNumber ( int  cfeb)
inline

Definition at line 49 of file CSCCFEBData.h.

References boardNumber_.

49 {boardNumber_=cfeb;}
unsigned boardNumber_
Definition: CSCCFEBData.h:69
void CSCCFEBData::setL1A ( unsigned  l1a)

Definition at line 170 of file CSCCFEBData.cc.

void CSCCFEBData::setL1A ( unsigned  sample,
unsigned  l1a 
)

Definition at line 175 of file CSCCFEBData.cc.

unsigned CSCCFEBData::sizeInWords ( ) const
inline

Definition at line 47 of file CSCCFEBData.h.

References theSize.

47 {return theSize;}
int theSize
in words
Definition: CSCCFEBData.h:68
CSCCFEBStatusDigi CSCCFEBData::statusDigi ( ) const

returns one status digi per cfeb

returns one status digi per cfeb contains bWord if slice is bad also contains crc word and controller word

here layer=1 bec this word repeats 6 times for each layer

Definition at line 186 of file CSCCFEBData.cc.

std::vector< std::vector< CSCStripDigi > > CSCCFEBData::stripDigis ( )

deprecated. Use the above method.

Definition at line 351 of file CSCCFEBData.cc.

const CSCCFEBTimeSlice * CSCCFEBData::timeSlice ( unsigned  i) const

count from 0. User should check if it's a bad slice

Definition at line 101 of file CSCCFEBData.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CSCCFEBData data 
)
friend

Definition at line 332 of file CSCCFEBData.cc.

Member Data Documentation

unsigned CSCCFEBData::boardNumber_
private

Definition at line 69 of file CSCCFEBData.h.

Referenced by boardNumber(), and setBoardNumber().

std::vector<uint16_t> CSCCFEBData::bWords
private

Definition at line 71 of file CSCCFEBData.h.

bool CSCCFEBData::fDCFEB
private

Definition at line 73 of file CSCCFEBData.h.

Referenced by isDCFEB().

unsigned short CSCCFEBData::theData[1600]
private

Definition at line 63 of file CSCCFEBData.h.

Referenced by data().

uint16_t CSCCFEBData::theFormatVersion
private

Definition at line 72 of file CSCCFEBData.h.

unsigned CSCCFEBData::theNumberOfSamples
private

Definition at line 70 of file CSCCFEBData.h.

Referenced by nTimeSamples().

int CSCCFEBData::theSize
private

in words

Definition at line 68 of file CSCCFEBData.h.

Referenced by sizeInWords().

std::vector<std::pair<int,bool> > CSCCFEBData::theSliceStarts
private

Shows where in theData the words start. A bad slice will be tagged with a false

Definition at line 66 of file CSCCFEBData.h.