CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 (unsigned short *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
< 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 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:78
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:77
CSCDMBHeader::CSCDMBHeader ( unsigned short *  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:78
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:77
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:59
const uint16_t * header() const
Data Accessors.

Member Function Documentation

unsigned CSCDMBHeader::activeDavMismatch ( ) const
inline

Definition at line 57 of file CSCDMBHeader.h.

References theHeaderFormat.

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

Definition at line 34 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::add().

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

Definition at line 37 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkALCTClasses().

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

Definition at line 35 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::checkTMBClasses().

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

Definition at line 48 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 49 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 45 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 29 of file CSCDMBHeader.h.

References theFirmwareVersion, and theHeaderFormat.

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

29  {
30  assert (icfeb < (theFirmwareVersion==2013)?7:5);
31  return (theHeaderFormat->cfebAvailable() >> icfeb) & 1;
32  }
int theFirmwareVersion
Definition: CSCDMBHeader.h:78
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:77
unsigned CSCDMBHeader::cfebAvailable ( ) const
inline

Definition at line 52 of file CSCDMBHeader.h.

References theHeaderFormat.

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

Definition at line 55 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 62 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::unpack_data().

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

Definition at line 46 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 64 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by cuy.FindIssue::__init__(), and CSCEventData::pack().

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

Definition at line 65 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by cuy.FindIssue::__init__().

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

Definition at line 56 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

will throw if the cast fails

Definition at line 30 of file CSCDMBHeader.cc.

References edm::hlt::Exception, query::result, and theHeaderFormat.

30  {
31  CSCDMBHeader2005 * result = dynamic_cast<CSCDMBHeader2005 *>(theHeaderFormat.get());
32  if(result == 0)
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:77
tuple result
Definition: query.py:137
CSCDMBHeader2013 CSCDMBHeader::dmbHeader2013 ( ) const

Definition at line 40 of file CSCDMBHeader.cc.

References edm::hlt::Exception, query::result, and theHeaderFormat.

40  {
41  CSCDMBHeader2013 * result = dynamic_cast<CSCDMBHeader2013 *>(theHeaderFormat.get());
42  if(result == 0)
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:77
tuple result
Definition: query.py:137
unsigned CSCDMBHeader::dmbID ( ) const
inline
unsigned CSCDMBHeader::format_version ( ) const
inline

Definition at line 60 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 53 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 54 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Definition at line 38 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

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

Definition at line 41 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

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

Definition at line 42 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDDUEventData::add().

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

Definition at line 43 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCDigiToRaw::findEventData().

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

Definition at line 39 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

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

Definition at line 40 of file CSCDMBHeader.h.

References theHeaderFormat.

Referenced by CSCEventData::setEventInformation().

40 { theHeaderFormat->setL1A24(l1a); };
unsigned l1a() const
Definition: CSCDMBHeader.h:50
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition: CSCDMBHeader.h:77
unsigned CSCDMBHeader::sizeInWords ( ) const
inline

Definition at line 59 of file CSCDMBHeader.h.

References theHeaderFormat.

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

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

Member Data Documentation

int CSCDMBHeader::theFirmwareVersion
private

Definition at line 78 of file CSCDMBHeader.h.

Referenced by cfebAvailable(), and CSCDMBHeader().

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