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
 
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)
 
 CSCDMBHeader (const CSCDMBStatusDigi &digi)
 
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
 
boost::shared_ptr< CSCVDMBHeaderFormattheHeaderFormat
 

Detailed Description

Definition at line 15 of file CSCDMBHeader.h.

Constructor & Destructor Documentation

CSCDMBHeader::CSCDMBHeader ( uint16_t  firmware_version = 2005)

Definition at line 8 of file CSCDMBHeader.cc.

References theFirmwareVersion, and theHeaderFormat.

9 : theHeaderFormat(), theFirmwareVersion(firmware_version)
10 {
11 
12  if (theFirmwareVersion == 2013) {
13  theHeaderFormat = boost::shared_ptr<CSCVDMBHeaderFormat>(new CSCDMBHeader2013());
14  } else {
15  theHeaderFormat = boost::shared_ptr<CSCVDMBHeaderFormat>(new CSCDMBHeader2005());
16  }
17 
18 }
int theFirmwareVersion
Definition: CSCDMBHeader.h:77
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
CSCDMBHeader::CSCDMBHeader ( const uint16_t *  buf,
uint16_t  firmware_version = 2005 
)

Definition at line 20 of file CSCDMBHeader.cc.

References theFirmwareVersion, and theHeaderFormat.

21 : theHeaderFormat(), theFirmwareVersion(firmware_version)
22 {
23  if (theFirmwareVersion == 2013) {
24  theHeaderFormat = boost::shared_ptr<CSCVDMBHeaderFormat>(new CSCDMBHeader2013(buf));
25  } else {
26  theHeaderFormat = boost::shared_ptr<CSCVDMBHeaderFormat>(new CSCDMBHeader2005(buf));
27  }
28 }
int theFirmwareVersion
Definition: CSCDMBHeader.h:77
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
CSCDMBHeader::CSCDMBHeader ( const CSCDMBStatusDigi digi)
inline

Definition at line 22 of file CSCDMBHeader.h.

References CSCDMBStatusDigi::header(), and sizeInWords().

23  {
24  memcpy(this, digi.header(), sizeInWords()*2);
25  }
unsigned sizeInWords() const
Definition: CSCDMBHeader.h:58
const uint16_t * header() const
Data Accessors.

Member Function Documentation

unsigned CSCDMBHeader::activeDavMismatch ( ) const
inline

Definition at line 56 of file CSCDMBHeader.h.

References theHeaderFormat.

56 { return theHeaderFormat->activeDavMismatch(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::addCFEB ( int  icfeb)
inline

Definition at line 33 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::add().

33 { theHeaderFormat->addCFEB(icfeb); }
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::addNALCT ( )
inline

Definition at line 36 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkALCTClasses().

36 { theHeaderFormat->addNALCT(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::addNCLCT ( )
inline

Definition at line 34 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkTMBClasses().

34 { theHeaderFormat->addNCLCT();};
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::bxn ( ) const
inline

Definition at line 47 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDMBTrailer2005::setEventInformation(), CSCALCTHeader2006::setEventInformation(), and CSCDMBTrailer2013::setEventInformation().

47 { return theHeaderFormat->bxn(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::bxn12 ( ) const
inline

Definition at line 48 of file CSCDMBHeader.h.

References theHeaderFormat.

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

48 { return theHeaderFormat->bxn12(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::cfebActive ( ) const
inline

Definition at line 44 of file CSCDMBHeader.h.

References theHeaderFormat.

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

44 { return theHeaderFormat->cfebActive(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
bool CSCDMBHeader::cfebAvailable ( unsigned  icfeb)
inline

Definition at line 29 of file CSCDMBHeader.h.

References theHeaderFormat.

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

29  {
30  return (theHeaderFormat->cfebAvailable() >> icfeb) & 1;
31  }
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::cfebAvailable ( ) const
inline

Definition at line 51 of file CSCDMBHeader.h.

References theHeaderFormat.

51 { return theHeaderFormat->cfebAvailable(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::cfebMovlp ( ) const
inline

Definition at line 54 of file CSCDMBHeader.h.

References theHeaderFormat.

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

54 { return theHeaderFormat->cfebMovlp(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
bool CSCDMBHeader::check ( ) const
inline

Definition at line 61 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::unpack_data().

61 { return theHeaderFormat->check(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::crateID ( ) const
inline

Definition at line 45 of file CSCDMBHeader.h.

References theHeaderFormat.

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

45 { return theHeaderFormat->crateID(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned short* CSCDMBHeader::data ( )
inline

Definition at line 63 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::pack().

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

Definition at line 64 of file CSCDMBHeader.h.

References dmbHeader2005(), dmbHeader2013(), and theHeaderFormat.

64 {return theHeaderFormat->data(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::dmbCfebSync ( ) const
inline

Definition at line 55 of file CSCDMBHeader.h.

References theHeaderFormat.

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

55 { return theHeaderFormat->dmbCfebSync(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
CSCDMBHeader2005 CSCDMBHeader::dmbHeader2005 ( ) const

will throw if the cast fails

Definition at line 30 of file CSCDMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by data().

30  {
31  CSCDMBHeader2005 * result = dynamic_cast<CSCDMBHeader2005 *>(theHeaderFormat.get());
32  if(result == nullptr)
33  {
34  throw cms::Exception("Could not get 2005 DMB header format");
35  }
36  return *result;
37 }
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
CSCDMBHeader2013 CSCDMBHeader::dmbHeader2013 ( ) const

Definition at line 40 of file CSCDMBHeader.cc.

References Exception, mps_fire::result, and theHeaderFormat.

Referenced by data().

40  {
41  CSCDMBHeader2013 * result = dynamic_cast<CSCDMBHeader2013 *>(theHeaderFormat.get());
42  if(result == nullptr)
43  {
44  throw cms::Exception("Could not get 2013 DMB header format");
45  }
46  return *result;
47 }
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::dmbID ( ) const
inline
unsigned CSCDMBHeader::format_version ( ) const
inline

Definition at line 59 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::add(), argparse.ArgumentParser::print_version(), python.rootplot.argparse.ArgumentParser::print_version(), and CSCEventData::unpack_data().

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

Definition at line 52 of file CSCDMBHeader.h.

References theHeaderFormat.

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

52 { return theHeaderFormat->nalct(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::nclct ( ) const
inline

Definition at line 53 of file CSCDMBHeader.h.

References theHeaderFormat.

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

53 { return theHeaderFormat->nclct(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::setBXN ( int  bxn)
inline

Definition at line 37 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

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

Definition at line 40 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

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

Definition at line 41 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDDUEventData::add().

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

Definition at line 42 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

42 { theHeaderFormat->setdmbVersion(version); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::setL1A ( int  l1a)
inline

Definition at line 38 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

38 { theHeaderFormat->setL1A(l1a); };
unsigned l1a() const
Definition: CSCDMBHeader.h:49
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::setL1A24 ( int  l1a)
inline

Definition at line 39 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

39 { theHeaderFormat->setL1A24(l1a); };
unsigned l1a() const
Definition: CSCDMBHeader.h:49
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::sizeInWords ( ) const
inline

Definition at line 58 of file CSCDMBHeader.h.

References theHeaderFormat.

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

58 { return theHeaderFormat->sizeInWords(); };
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:76

Member Data Documentation

int CSCDMBHeader::theFirmwareVersion
private

Definition at line 77 of file CSCDMBHeader.h.

Referenced by CSCDMBHeader().

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