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 | Static Private Attributes
CSCTMBData Class Reference

#include <CSCTMBData.h>

Public Member Functions

std::bitset< 22 > calCRC22 (const std::vector< std::bitset< 16 > > &datain)
 
bool checkSize () const
 sees if the size adds up to the word count More...
 
CSCCLCTDataclctData ()
 
 CSCTMBData ()
 
 CSCTMBData (int firmwareVersion, int firmwareRevision, int ncfebs=5)
 
 CSCTMBData (unsigned short *buf)
 
 CSCTMBData (const CSCTMBData &data)
 
short unsigned int CWordCnt () const
 
int getCRC () const
 
bool hasRPC () const
 check this before using RPC More...
 
bool hasTMBBlockedCFEB () const
 check this before TMB Block CFEB More...
 
bool hasTMBMiniScope () const
 check this before using TMB mini scope More...
 
bool hasTMBScope () const
 check this before using TMB Scope More...
 
std::bitset< 22 > nextCRC22_D16 (const std::bitset< 16 > &D, const std::bitset< 22 > &C)
 
boost::dynamic_bitset pack ()
 not const because it sets size int TMBTrailer More...
 
CSCRPCDatarpcData ()
 
const unsigned short size () const
 
CSCTMBBlockedCFEBtmbBlockedCFEB () const
 
int TMBCRCcalc ()
 
CSCTMBHeadertmbHeader ()
 
CSCTMBMiniScopetmbMiniScope () const
 
CSCTMBScopetmbScope () const
 
CSCTMBTrailertmbTrailer ()
 
int UnpackTMB (unsigned short *buf)
 
 ~CSCTMBData ()
 

Static Public Member Functions

static void selfTest ()
 tests packing More...
 
static void setDebug (const bool value)
 

Private Attributes

unsigned short cWordCnt
 
unsigned short size_
 
unsigned theB0CLine
 
bool theBlockedCFEBIsPresent
 
CSCCLCTData theCLCTData
 
unsigned theE0FLine
 
unsigned short * theOriginalBuffer
 
CSCRPCData theRPCData
 
bool theRPCDataIsPresent
 
CSCTMBBlockedCFEBtheTMBBlockedCFEB
 
CSCTMBHeader theTMBHeader
 
CSCTMBMiniScopetheTMBMiniScope
 
bool theTMBMiniScopeIsPresent
 
CSCTMBScopetheTMBScope
 
bool theTMBScopeIsPresent
 The TMB scope is not present in most of data hence its dynamic. More...
 
CSCTMBTrailer theTMBTrailer
 

Static Private Attributes

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

Detailed Description

Author
A. Tumanov - Rice

Definition at line 25 of file CSCTMBData.h.

Constructor & Destructor Documentation

CSCTMBData::CSCTMBData ( )

Definition at line 21 of file CSCTMBData.cc.

CSCTMBData::CSCTMBData ( int  firmwareVersion,
int  firmwareRevision,
int  ncfebs = 5 
)

Definition at line 42 of file CSCTMBData.cc.

CSCTMBData::~CSCTMBData ( )

Definition at line 119 of file CSCTMBData.cc.

CSCTMBData::CSCTMBData ( unsigned short *  buf)

Definition at line 67 of file CSCTMBData.cc.

CSCTMBData::CSCTMBData ( const CSCTMBData data)

Definition at line 84 of file CSCTMBData.cc.

Member Function Documentation

std::bitset< 22 > CSCTMBData::calCRC22 ( const std::vector< std::bitset< 16 > > &  datain)

Definition at line 370 of file CSCTMBData.cc.

bool CSCTMBData::checkSize ( ) const

sees if the size adds up to the word count

Definition at line 364 of file CSCTMBData.cc.

CSCCLCTData* CSCTMBData::clctData ( )
inline

Definition at line 43 of file CSCTMBData.h.

References theCLCTData.

43 {return &theCLCTData;}
CSCCLCTData theCLCTData
Definition: CSCTMBData.h:82
short unsigned int CSCTMBData::CWordCnt ( ) const
inline

Definition at line 38 of file CSCTMBData.h.

References cWordCnt.

38 {return cWordCnt;}
unsigned short cWordCnt
Definition: CSCTMBData.h:103
int CSCTMBData::getCRC ( ) const
inline

Definition at line 39 of file CSCTMBData.h.

References CSCTMBTrailer::crc22(), and theTMBTrailer.

39 {return theTMBTrailer.crc22();}
CSCTMBTrailer theTMBTrailer
Definition: CSCTMBData.h:96
unsigned int crc22() const
bool CSCTMBData::hasRPC ( ) const
inline

check this before using RPC

Definition at line 55 of file CSCTMBData.h.

References theRPCDataIsPresent.

55 {return theRPCDataIsPresent;}
bool theRPCDataIsPresent
Definition: CSCTMBData.h:104
bool CSCTMBData::hasTMBBlockedCFEB ( ) const
inline

check this before TMB Block CFEB

Definition at line 51 of file CSCTMBData.h.

References theBlockedCFEBIsPresent.

51 { return theBlockedCFEBIsPresent; }
bool theBlockedCFEBIsPresent
Definition: CSCTMBData.h:93
bool CSCTMBData::hasTMBMiniScope ( ) const
inline

check this before using TMB mini scope

Definition at line 48 of file CSCTMBData.h.

References theTMBMiniScopeIsPresent.

48 { return theTMBMiniScopeIsPresent; }
bool theTMBMiniScopeIsPresent
Definition: CSCTMBData.h:90
bool CSCTMBData::hasTMBScope ( ) const
inline

check this before using TMB Scope

Definition at line 45 of file CSCTMBData.h.

References theTMBScopeIsPresent.

45 { return theTMBScopeIsPresent;}
bool theTMBScopeIsPresent
The TMB scope is not present in most of data hence its dynamic.
Definition: CSCTMBData.h:85
std::bitset< 22 > CSCTMBData::nextCRC22_D16 ( const std::bitset< 16 > &  D,
const std::bitset< 22 > &  C 
)

Definition at line 401 of file CSCTMBData.cc.

boost::dynamic_bitset CSCTMBData::pack ( )

not const because it sets size int TMBTrailer

this method is for digi2raw

Definition at line 433 of file CSCTMBData.cc.

Referenced by pyrootRender.interactiveRender::draw().

CSCRPCData* CSCTMBData::rpcData ( )
inline

Definition at line 56 of file CSCTMBData.h.

References theRPCData.

56 {return &theRPCData;}
CSCRPCData theRPCData
Definition: CSCTMBData.h:83
void CSCTMBData::selfTest ( )
static

tests packing

Definition at line 468 of file CSCTMBData.cc.

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

Definition at line 37 of file CSCTMBData.h.

References debug, and relativeConstraints::value.

37 {debug = value;}
static std::atomic< bool > debug
Definition: CSCTMBData.h:100
const unsigned short CSCTMBData::size ( void  ) const
inline

Definition at line 40 of file CSCTMBData.h.

References size_.

40 {return size_;}
unsigned short size_
Definition: CSCTMBData.h:102
CSCTMBBlockedCFEB & CSCTMBData::tmbBlockedCFEB ( ) const

Definition at line 394 of file CSCTMBData.cc.

int CSCTMBData::TMBCRCcalc ( )

Definition at line 147 of file CSCTMBData.cc.

CSCTMBHeader* CSCTMBData::tmbHeader ( )
inline

Definition at line 42 of file CSCTMBData.h.

References theTMBHeader.

42 {return &theTMBHeader;}
CSCTMBHeader theTMBHeader
Definition: CSCTMBData.h:81
CSCTMBMiniScope & CSCTMBData::tmbMiniScope ( ) const

Definition at line 387 of file CSCTMBData.cc.

CSCTMBScope & CSCTMBData::tmbScope ( ) const

Definition at line 381 of file CSCTMBData.cc.

CSCTMBTrailer* CSCTMBData::tmbTrailer ( )
inline

Definition at line 53 of file CSCTMBData.h.

References theTMBTrailer.

53 {return &theTMBTrailer;}
CSCTMBTrailer theTMBTrailer
Definition: CSCTMBData.h:96
int CSCTMBData::UnpackTMB ( unsigned short *  buf)

determine 2007 or 2006 version

assumes that buf starts at the tmb data this is not true if something is wrong in the data before TMB - then we skip the whole event

Now Find the miniscope

end for the mini scope

Now Find the blocked CFEB DiStrips List Format

end for the blocked CFEB DiStrips List Format

Definition at line 165 of file CSCTMBData.cc.

Member Data Documentation

unsigned short CSCTMBData::cWordCnt
private

Definition at line 103 of file CSCTMBData.h.

Referenced by CWordCnt().

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

Definition at line 100 of file CSCTMBData.h.

Referenced by setDebug().

unsigned short CSCTMBData::size_
private

Definition at line 102 of file CSCTMBData.h.

Referenced by size().

unsigned CSCTMBData::theB0CLine
private

CRC calc needs to know where 0x6B0C and 0x6E0F lines were we want to put off CRC calc until needed

Definition at line 78 of file CSCTMBData.h.

bool CSCTMBData::theBlockedCFEBIsPresent
private

Definition at line 93 of file CSCTMBData.h.

Referenced by hasTMBBlockedCFEB().

CSCCLCTData CSCTMBData::theCLCTData
private

Definition at line 82 of file CSCTMBData.h.

Referenced by clctData().

unsigned CSCTMBData::theE0FLine
private

Definition at line 79 of file CSCTMBData.h.

unsigned short* CSCTMBData::theOriginalBuffer
private

@ not sure what this means for simulation. I keep this around so we can calculate CRCs

Definition at line 75 of file CSCTMBData.h.

CSCRPCData CSCTMBData::theRPCData
private

Definition at line 83 of file CSCTMBData.h.

Referenced by rpcData().

bool CSCTMBData::theRPCDataIsPresent
private

Definition at line 104 of file CSCTMBData.h.

Referenced by hasRPC().

CSCTMBBlockedCFEB* CSCTMBData::theTMBBlockedCFEB
private

Definition at line 94 of file CSCTMBData.h.

CSCTMBHeader CSCTMBData::theTMBHeader
private

Definition at line 81 of file CSCTMBData.h.

Referenced by tmbHeader().

CSCTMBMiniScope* CSCTMBData::theTMBMiniScope
private

Definition at line 91 of file CSCTMBData.h.

bool CSCTMBData::theTMBMiniScopeIsPresent
private

The TMB MiniScope must presen in every event, hovewer make it dynamic as for the main scope

Definition at line 90 of file CSCTMBData.h.

Referenced by hasTMBMiniScope().

CSCTMBScope* CSCTMBData::theTMBScope
private

Definition at line 86 of file CSCTMBData.h.

bool CSCTMBData::theTMBScopeIsPresent
private

The TMB scope is not present in most of data hence its dynamic.

Definition at line 85 of file CSCTMBData.h.

Referenced by hasTMBScope().

CSCTMBTrailer CSCTMBData::theTMBTrailer
private

Definition at line 96 of file CSCTMBData.h.

Referenced by getCRC(), and tmbTrailer().