CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
bool cfebAvailable (unsigned icfeb)
 
unsigned cfebAvailable () const
 
unsigned cfebMovlp () const
 
bool check () const
 
unsigned crateID () const
 
 CSCDMBHeader (uint16_t firmware_version=2005)
 
 CSCDMBHeader (const uint16_t *buf, 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
< CSCVDMBHeaderFormat
theHeaderFormat
 

Detailed Description

Definition at line 15 of file CSCDMBHeader.h.

Constructor & Destructor Documentation

CSCDMBHeader::CSCDMBHeader ( uint16_t  firmware_version = 2005)

Definition at line 7 of file CSCDMBHeader.cc.

References theFirmwareVersion, and theHeaderFormat.

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 }
int theFirmwareVersion
Definition: CSCDMBHeader.h:64
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
CSCDMBHeader::CSCDMBHeader ( const uint16_t *  buf,
uint16_t  firmware_version = 2005 
)

Definition at line 15 of file CSCDMBHeader.cc.

References visDQMUpload::buf, theFirmwareVersion, and theHeaderFormat.

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 }
int theFirmwareVersion
Definition: CSCDMBHeader.h:64
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63

Member Function Documentation

unsigned CSCDMBHeader::activeDavMismatch ( ) const
inline

Definition at line 46 of file CSCDMBHeader.h.

References theHeaderFormat.

46 { return theHeaderFormat->activeDavMismatch(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::addCFEB ( int  icfeb)
inline

Definition at line 23 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::add().

23 { theHeaderFormat->addCFEB(icfeb); }
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::addNALCT ( )
inline

Definition at line 26 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkALCTClasses().

26 { theHeaderFormat->addNALCT(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::addNCLCT ( )
inline

Definition at line 24 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkTMBClasses().

24 { theHeaderFormat->addNCLCT(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::bxn ( ) const
inline
unsigned CSCDMBHeader::bxn12 ( ) const
inline

Definition at line 38 of file CSCDMBHeader.h.

References theHeaderFormat.

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

38 { return theHeaderFormat->bxn12(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::cfebActive ( ) const
inline

Definition at line 34 of file CSCDMBHeader.h.

References theHeaderFormat.

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

34 { return theHeaderFormat->cfebActive(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
bool CSCDMBHeader::cfebAvailable ( unsigned  icfeb)
inline

Definition at line 21 of file CSCDMBHeader.h.

References theHeaderFormat.

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

21 { return (theHeaderFormat->cfebAvailable() >> icfeb) & 1; }
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::cfebAvailable ( ) const
inline

Definition at line 41 of file CSCDMBHeader.h.

References theHeaderFormat.

41 { return theHeaderFormat->cfebAvailable(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::cfebMovlp ( ) const
inline

Definition at line 44 of file CSCDMBHeader.h.

References theHeaderFormat.

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

44 { return theHeaderFormat->cfebMovlp(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
bool CSCDMBHeader::check ( ) const
inline

Definition at line 51 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::unpack_data().

51 { return theHeaderFormat->check(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::crateID ( ) const
inline

Definition at line 35 of file CSCDMBHeader.h.

References theHeaderFormat.

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

35 { return theHeaderFormat->crateID(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned short* CSCDMBHeader::data ( )
inline

Definition at line 53 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::pack().

53 { return theHeaderFormat->data(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned short* CSCDMBHeader::data ( ) const
inline

Definition at line 54 of file CSCDMBHeader.h.

References theHeaderFormat.

54 { return theHeaderFormat->data(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::dmbCfebSync ( ) const
inline

Definition at line 45 of file CSCDMBHeader.h.

References theHeaderFormat.

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

45 { return theHeaderFormat->dmbCfebSync(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
CSCDMBHeader2005 CSCDMBHeader::dmbHeader2005 ( ) const

will throw if the cast fails

Definition at line 24 of file CSCDMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

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 }
tuple result
Definition: mps_fire.py:311
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
CSCDMBHeader2013 CSCDMBHeader::dmbHeader2013 ( ) const

Definition at line 32 of file CSCDMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

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 }
tuple result
Definition: mps_fire.py:311
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::dmbID ( ) const
inline
unsigned CSCDMBHeader::format_version ( ) const
inline

Definition at line 49 of file CSCDMBHeader.h.

References theHeaderFormat.

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

49 { return theHeaderFormat->format_version(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::l1a ( ) const
inline
unsigned CSCDMBHeader::l1a24 ( ) const
inline
unsigned CSCDMBHeader::nalct ( ) const
inline

Definition at line 42 of file CSCDMBHeader.h.

References theHeaderFormat.

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

42 { return theHeaderFormat->nalct(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::nclct ( ) const
inline

Definition at line 43 of file CSCDMBHeader.h.

References theHeaderFormat.

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

43 { return theHeaderFormat->nclct(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::setBXN ( int  bxn)
inline

Definition at line 27 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

27 { theHeaderFormat->setBXN(bxn); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned bxn() const
Definition: CSCDMBHeader.h:37
void CSCDMBHeader::setCrateAddress ( int  crate,
int  dmbId 
)
inline

Definition at line 30 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

30 { theHeaderFormat->setCrateAddress(crate, dmbId); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::setdmbID ( int  newDMBID)
inline

Definition at line 31 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDDUEventData::add().

31 { theHeaderFormat->setdmbID(newDMBID); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::setdmbVersion ( unsigned int  version)
inline

Definition at line 32 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

32 { theHeaderFormat->setdmbVersion(version); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::setL1A ( int  l1a)
inline

Definition at line 28 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

28 { theHeaderFormat->setL1A(l1a); };
unsigned l1a() const
Definition: CSCDMBHeader.h:39
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
void CSCDMBHeader::setL1A24 ( int  l1a)
inline

Definition at line 29 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

29 { theHeaderFormat->setL1A24(l1a); };
unsigned l1a() const
Definition: CSCDMBHeader.h:39
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63
unsigned CSCDMBHeader::sizeInWords ( ) const
inline

Definition at line 48 of file CSCDMBHeader.h.

References theHeaderFormat.

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

48 { return theHeaderFormat->sizeInWords(); };
std::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:63

Member Data Documentation

int CSCDMBHeader::theFirmwareVersion
private

Definition at line 64 of file CSCDMBHeader.h.

Referenced by CSCDMBHeader().

std::shared_ptr<CSCVDMBHeaderFormat> CSCDMBHeader::theHeaderFormat
private