CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCDMBHeader Class Reference

#include <CSCDMBHeader.h>

Public Member Functions

unsigned activeDavMismatch () const
 
void addCFEB (int icfeb)
 
void addNALCT ()
 
void addNCLCT ()
 
unsigned bxn () const
 
unsigned bxn12 () const
 
unsigned cfebActive () const
 
unsigned cfebAvailable () const
 
bool cfebAvailable (unsigned icfeb)
 
unsigned cfebMovlp () const
 
bool check () const
 
unsigned crateID () const
 
 CSCDMBHeader (const uint16_t *buf, uint16_t firmware_version=2005)
 
 CSCDMBHeader (uint16_t firmware_version=2005)
 
unsigned short * data ()
 
unsigned short * data () const
 
unsigned dmbCfebSync () const
 
CSCDMBHeader2005 dmbHeader2005 () const
 will throw if the cast fails More...
 
CSCDMBHeader2013 dmbHeader2013 () const
 
unsigned dmbID () const
 
unsigned format_version () const
 
unsigned l1a () const
 
unsigned l1a24 () const
 
unsigned nalct () const
 
unsigned nclct () const
 
void setBXN (int bxn)
 
void setCrateAddress (int crate, int dmbId)
 
void setdmbID (int newDMBID)
 
void setdmbVersion (unsigned int version)
 
void setL1A (int l1a)
 
void setL1A24 (int l1a)
 
unsigned sizeInWords () const
 

Private Attributes

int theFirmwareVersion
 
std::shared_ptr< CSCVDMBHeaderFormattheHeaderFormat
 

Detailed Description

Definition at line 15 of file CSCDMBHeader.h.

Constructor & Destructor Documentation

◆ CSCDMBHeader() [1/2]

CSCDMBHeader::CSCDMBHeader ( uint16_t  firmware_version = 2005)

Definition at line 7 of file CSCDMBHeader.cc.

7  : theHeaderFormat(), theFirmwareVersion(firmware_version) {
8  if (theFirmwareVersion == 2013) {
9  theHeaderFormat = std::make_shared<CSCDMBHeader2013>();
10  } else {
11  theHeaderFormat = std::make_shared<CSCDMBHeader2005>();
12  }
13 }

References theFirmwareVersion, and theHeaderFormat.

◆ CSCDMBHeader() [2/2]

CSCDMBHeader::CSCDMBHeader ( const uint16_t *  buf,
uint16_t  firmware_version = 2005 
)

Definition at line 15 of file CSCDMBHeader.cc.

16  : theHeaderFormat(), theFirmwareVersion(firmware_version) {
17  if (theFirmwareVersion == 2013) {
18  theHeaderFormat = std::make_shared<CSCDMBHeader2013>(buf);
19  } else {
20  theHeaderFormat = std::make_shared<CSCDMBHeader2005>(buf);
21  }
22 }

References visDQMUpload::buf, theFirmwareVersion, and theHeaderFormat.

Member Function Documentation

◆ activeDavMismatch()

unsigned CSCDMBHeader::activeDavMismatch ( ) const
inline

Definition at line 46 of file CSCDMBHeader.h.

46 { return theHeaderFormat->activeDavMismatch(); };

References theHeaderFormat.

◆ addCFEB()

void CSCDMBHeader::addCFEB ( int  icfeb)
inline

Definition at line 23 of file CSCDMBHeader.h.

23 { theHeaderFormat->addCFEB(icfeb); }

References theHeaderFormat.

Referenced by CSCEventData::add().

◆ addNALCT()

void CSCDMBHeader::addNALCT ( )
inline

Definition at line 26 of file CSCDMBHeader.h.

26 { theHeaderFormat->addNALCT(); };

References theHeaderFormat.

Referenced by CSCEventData::checkALCTClasses().

◆ addNCLCT()

void CSCDMBHeader::addNCLCT ( )
inline

Definition at line 24 of file CSCDMBHeader.h.

24 { theHeaderFormat->addNCLCT(); };

References theHeaderFormat.

Referenced by CSCEventData::checkTMBClasses().

◆ bxn()

unsigned CSCDMBHeader::bxn ( ) const
inline

◆ bxn12()

unsigned CSCDMBHeader::bxn12 ( ) const
inline

Definition at line 38 of file CSCDMBHeader.h.

38 { return theHeaderFormat->bxn12(); };

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC(), and CSCALCTHeader2007::setEventInformation().

◆ cfebActive()

unsigned CSCDMBHeader::cfebActive ( ) const
inline

Definition at line 34 of file CSCDMBHeader.h.

34 { return theHeaderFormat->cfebActive(); };

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC().

◆ cfebAvailable() [1/2]

unsigned CSCDMBHeader::cfebAvailable ( ) const
inline

Definition at line 41 of file CSCDMBHeader.h.

41 { return theHeaderFormat->cfebAvailable(); };

References theHeaderFormat.

◆ cfebAvailable() [2/2]

bool CSCDMBHeader::cfebAvailable ( unsigned  icfeb)
inline

Definition at line 21 of file CSCDMBHeader.h.

21 { return (theHeaderFormat->cfebAvailable() >> icfeb) & 1; }

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC(), and CSCEventData::unpack_data().

◆ cfebMovlp()

unsigned CSCDMBHeader::cfebMovlp ( ) const
inline

Definition at line 44 of file CSCDMBHeader.h.

44 { return theHeaderFormat->cfebMovlp(); };

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC().

◆ check()

bool CSCDMBHeader::check ( ) const
inline

Definition at line 51 of file CSCDMBHeader.h.

51 { return theHeaderFormat->check(); };

References theHeaderFormat.

Referenced by CSCEventData::unpack_data().

◆ crateID()

unsigned CSCDMBHeader::crateID ( ) const
inline

◆ data() [1/2]

unsigned short* CSCDMBHeader::data ( )
inline

Definition at line 53 of file CSCDMBHeader.h.

53 { return theHeaderFormat->data(); };

References theHeaderFormat.

Referenced by CSCEventData::pack().

◆ data() [2/2]

unsigned short* CSCDMBHeader::data ( ) const
inline

Definition at line 54 of file CSCDMBHeader.h.

54 { return theHeaderFormat->data(); };

References theHeaderFormat.

◆ dmbCfebSync()

unsigned CSCDMBHeader::dmbCfebSync ( ) const
inline

Definition at line 45 of file CSCDMBHeader.h.

45 { return theHeaderFormat->dmbCfebSync(); };

References theHeaderFormat.

Referenced by cscdqm::EventProcessor::processCSC().

◆ dmbHeader2005()

CSCDMBHeader2005 CSCDMBHeader::dmbHeader2005 ( ) const

will throw if the cast fails

Definition at line 24 of file CSCDMBHeader.cc.

24  {
25  const CSCDMBHeader2005 *result = dynamic_cast<const CSCDMBHeader2005 *>(theHeaderFormat.get());
26  if (result == nullptr) {
27  throw cms::Exception("Could not get 2005 DMB header format");
28  }
29  return *result;
30 }

References Exception, mps_fire::result, and theHeaderFormat.

◆ dmbHeader2013()

CSCDMBHeader2013 CSCDMBHeader::dmbHeader2013 ( ) const

Definition at line 32 of file CSCDMBHeader.cc.

32  {
33  const CSCDMBHeader2013 *result = dynamic_cast<const CSCDMBHeader2013 *>(theHeaderFormat.get());
34  if (result == nullptr) {
35  throw cms::Exception("Could not get 2013 DMB header format");
36  }
37  return *result;
38 }

References Exception, mps_fire::result, and theHeaderFormat.

◆ dmbID()

unsigned CSCDMBHeader::dmbID ( ) const
inline

◆ format_version()

unsigned CSCDMBHeader::format_version ( ) const
inline

Definition at line 49 of file CSCDMBHeader.h.

49 { return theHeaderFormat->format_version(); };

References theHeaderFormat.

Referenced by CSCEventData::add(), and CSCEventData::unpack_data().

◆ l1a()

unsigned CSCDMBHeader::l1a ( ) const
inline

◆ l1a24()

unsigned CSCDMBHeader::l1a24 ( ) const
inline

◆ nalct()

unsigned CSCDMBHeader::nalct ( ) const
inline

Definition at line 42 of file CSCDMBHeader.h.

42 { return theHeaderFormat->nalct(); };

References theHeaderFormat.

Referenced by CSCEventData::nalct(), and cscdqm::EventProcessor::processCSC().

◆ nclct()

unsigned CSCDMBHeader::nclct ( ) const
inline

Definition at line 43 of file CSCDMBHeader.h.

43 { return theHeaderFormat->nclct(); };

References theHeaderFormat.

Referenced by CSCEventData::nclct(), and cscdqm::EventProcessor::processCSC().

◆ setBXN()

void CSCDMBHeader::setBXN ( int  bxn)
inline

Definition at line 27 of file CSCDMBHeader.h.

27 { theHeaderFormat->setBXN(bxn); };

References bxn(), and theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

◆ setCrateAddress()

void CSCDMBHeader::setCrateAddress ( int  crate,
int  dmbId 
)
inline

Definition at line 30 of file CSCDMBHeader.h.

30 { theHeaderFormat->setCrateAddress(crate, dmbId); };

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

◆ setdmbID()

void CSCDMBHeader::setdmbID ( int  newDMBID)
inline

Definition at line 31 of file CSCDMBHeader.h.

31 { theHeaderFormat->setdmbID(newDMBID); };

References theHeaderFormat.

◆ setdmbVersion()

void CSCDMBHeader::setdmbVersion ( unsigned int  version)
inline

Definition at line 32 of file CSCDMBHeader.h.

32 { theHeaderFormat->setdmbVersion(version); };

References theHeaderFormat, and BeamSplash_cfg::version.

Referenced by CSCDigiToRaw::findEventData().

◆ setL1A()

void CSCDMBHeader::setL1A ( int  l1a)
inline

Definition at line 28 of file CSCDMBHeader.h.

28 { theHeaderFormat->setL1A(l1a); };

References l1a(), and theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

◆ setL1A24()

void CSCDMBHeader::setL1A24 ( int  l1a)
inline

Definition at line 29 of file CSCDMBHeader.h.

29 { theHeaderFormat->setL1A24(l1a); };

References l1a(), and theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

◆ sizeInWords()

unsigned CSCDMBHeader::sizeInWords ( ) const
inline

Definition at line 48 of file CSCDMBHeader.h.

48 { return theHeaderFormat->sizeInWords(); };

References theHeaderFormat.

Referenced by CSCEventData::pack(), and CSCEventData::unpack_data().

Member Data Documentation

◆ theFirmwareVersion

int CSCDMBHeader::theFirmwareVersion
private

Definition at line 64 of file CSCDMBHeader.h.

Referenced by CSCDMBHeader().

◆ theHeaderFormat

std::shared_ptr<CSCVDMBHeaderFormat> CSCDMBHeader::theHeaderFormat
private
CSCDMBHeader::l1a
unsigned l1a() const
Definition: CSCDMBHeader.h:39
CSCDMBHeader::bxn
unsigned bxn() const
Definition: CSCDMBHeader.h:37
CSCDMBHeader2005
Definition: CSCDMBHeader2005.h:10
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCDMBHeader::theHeaderFormat
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
Exception
Definition: hltDiff.cc:246
CSCDMBHeader::theFirmwareVersion
int theFirmwareVersion
Definition: CSCDMBHeader.h:64
CSCDMBHeader2013
Definition: CSCDMBHeader2013.h:43
mps_fire.result
result
Definition: mps_fire.py:311
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45