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
CSCDMBTrailer Class Reference

#include <CSCDMBTrailer.h>

Public Member Functions

unsigned alct_empty () const
 
unsigned alct_endtimeout () const
 
unsigned alct_full () const
 
unsigned alct_half () const
 
unsigned alct_starttimeout () const
 
unsigned cfeb_empty () const
 
unsigned cfeb_endtimeout () const
 
unsigned cfeb_full () const
 
unsigned cfeb_half () const
 
unsigned cfeb_movlp () const
 
unsigned cfeb_starttimeout () const
 
bool check () const
 
unsigned crateID () const
 
unsigned crc22 () const
 
unsigned crc_hi_parity () const
 
unsigned crc_lo_parity () const
 
 CSCDMBTrailer (uint16_t firmware_version=2005)
 
 CSCDMBTrailer (unsigned short *buf, uint16_t firmware_version=2005)
 
 CSCDMBTrailer (const CSCDMBStatusDigi &digi)
 
unsigned short * data ()
 
unsigned short * data () const
 
unsigned dmb_bxn () const
 
unsigned dmb_l1a () const
 
unsigned dmb_l1pipe () const
 
unsigned dmbID () const
 
CSCDMBTrailer2005 dmbTrailer2005 () const
 will throw if the cast fails More...
 
CSCDMBTrailer2013 dmbTrailer2013 () const
 
void setEventInformation (const CSCDMBHeader &header)
 @ NEEDS TO BE DONE More...
 
unsigned sizeInWords () const
 
unsigned tmb_empty () const
 
unsigned tmb_endtimeout () const
 
unsigned tmb_full () const
 
unsigned tmb_half () const
 
unsigned tmb_starttimeout () const
 

Private Attributes

int theFirmwareVersion
 
boost::shared_ptr
< CSCVDMBTrailerFormat
theTrailerFormat
 

Detailed Description

Definition at line 18 of file CSCDMBTrailer.h.

Constructor & Destructor Documentation

CSCDMBTrailer::CSCDMBTrailer ( uint16_t  firmware_version = 2005)

Definition at line 8 of file CSCDMBTrailer.cc.

References theFirmwareVersion, and theTrailerFormat.

9 : theTrailerFormat(), theFirmwareVersion(firmware_version)
10 {
11 
12  if (theFirmwareVersion == 2013) {
13  theTrailerFormat = boost::shared_ptr<CSCVDMBTrailerFormat>(new CSCDMBTrailer2013());
14  } else {
15  theTrailerFormat = boost::shared_ptr<CSCVDMBTrailerFormat>(new CSCDMBTrailer2005());
16  }
17 
18 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:82
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
CSCDMBTrailer::CSCDMBTrailer ( unsigned short *  buf,
uint16_t  firmware_version = 2005 
)

Definition at line 20 of file CSCDMBTrailer.cc.

References theFirmwareVersion, and theTrailerFormat.

21 : theTrailerFormat(), theFirmwareVersion(firmware_version)
22 {
23  if (theFirmwareVersion == 2013) {
24  theTrailerFormat = boost::shared_ptr<CSCVDMBTrailerFormat>(new CSCDMBTrailer2013(buf));
25  } else {
26  theTrailerFormat = boost::shared_ptr<CSCVDMBTrailerFormat>(new CSCDMBTrailer2005(buf));
27  }
28 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:82
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
CSCDMBTrailer::CSCDMBTrailer ( const CSCDMBStatusDigi digi)
inline

Definition at line 25 of file CSCDMBTrailer.h.

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

26  {
27  memcpy(this, digi.trailer(), sizeInWords()*2);
28  }
unsigned sizeInWords() const
Definition: CSCDMBTrailer.h:70
const uint16_t * trailer() const

Member Function Documentation

unsigned CSCDMBTrailer::alct_empty ( ) const
inline

Definition at line 51 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

51 { return theTrailerFormat->alct_empty(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::alct_endtimeout ( ) const
inline

Definition at line 40 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

40 { return theTrailerFormat->alct_endtimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::alct_full ( ) const
inline

Definition at line 59 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

59 { return theTrailerFormat->alct_full(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::alct_half ( ) const
inline

Definition at line 55 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

55 { return theTrailerFormat->alct_half(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::alct_starttimeout ( ) const
inline

Definition at line 44 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

44 { return theTrailerFormat->alct_starttimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_empty ( ) const
inline

Definition at line 53 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

53 { return theTrailerFormat->cfeb_empty(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_endtimeout ( ) const
inline

Definition at line 42 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

42 { return theTrailerFormat->cfeb_endtimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_full ( ) const
inline

Definition at line 61 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

61 { return theTrailerFormat->cfeb_full(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_half ( ) const
inline

Definition at line 57 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

57 { return theTrailerFormat->cfeb_half(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_movlp ( ) const
inline

Definition at line 48 of file CSCDMBTrailer.h.

References theTrailerFormat.

48 { return theTrailerFormat->cfeb_movlp(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::cfeb_starttimeout ( ) const
inline

Definition at line 46 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

46 { return theTrailerFormat->cfeb_starttimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
bool CSCDMBTrailer::check ( ) const
inline

Definition at line 72 of file CSCDMBTrailer.h.

References theTrailerFormat.

72 { return theTrailerFormat->check(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::crateID ( ) const
inline

Definition at line 34 of file CSCDMBTrailer.h.

References theTrailerFormat.

34 { return theTrailerFormat->crateID(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::crc22 ( ) const
inline

Definition at line 63 of file CSCDMBTrailer.h.

References theTrailerFormat.

63 { return theTrailerFormat->crc22(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::crc_hi_parity ( ) const
inline

Definition at line 65 of file CSCDMBTrailer.h.

References theTrailerFormat.

65 { return theTrailerFormat->crc_hi_parity(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::crc_lo_parity ( ) const
inline

Definition at line 64 of file CSCDMBTrailer.h.

References theTrailerFormat.

64 { return theTrailerFormat->crc_lo_parity(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned short* CSCDMBTrailer::data ( )
inline

Definition at line 67 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

67 { return theTrailerFormat->data(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned short* CSCDMBTrailer::data ( ) const
inline

Definition at line 68 of file CSCDMBTrailer.h.

References theTrailerFormat.

Referenced by cuy.FindIssue::__init__().

68 { return theTrailerFormat->data(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::dmb_bxn ( ) const
inline

Definition at line 38 of file CSCDMBTrailer.h.

References theTrailerFormat.

38 { return theTrailerFormat->dmb_bxn(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::dmb_l1a ( ) const
inline

Definition at line 37 of file CSCDMBTrailer.h.

References theTrailerFormat.

37 { return theTrailerFormat->dmb_l1a(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::dmb_l1pipe ( ) const
inline

Definition at line 49 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

49 { return theTrailerFormat->dmb_l1pipe(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::dmbID ( ) const
inline

Definition at line 35 of file CSCDMBTrailer.h.

References theTrailerFormat.

35 { return theTrailerFormat->dmbID(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
CSCDMBTrailer2005 CSCDMBTrailer::dmbTrailer2005 ( ) const

will throw if the cast fails

Definition at line 30 of file CSCDMBTrailer.cc.

References Exception, query::result, and theTrailerFormat.

30  {
32  if(result == 0)
33  {
34  throw cms::Exception("Could not get 2005 DMB trailer format");
35  }
36  return *result;
37 }
tuple result
Definition: query.py:137
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
CSCDMBTrailer2013 CSCDMBTrailer::dmbTrailer2013 ( ) const

Definition at line 40 of file CSCDMBTrailer.cc.

References Exception, query::result, and theTrailerFormat.

40  {
42  if(result == 0)
43  {
44  throw cms::Exception("Could not get 2013 DMB trailer format");
45  }
46  return *result;
47 }
tuple result
Definition: query.py:137
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
void CSCDMBTrailer::setEventInformation ( const CSCDMBHeader header)
inline

@ NEEDS TO BE DONE

Definition at line 32 of file CSCDMBTrailer.h.

References theTrailerFormat.

32 { return theTrailerFormat->setEventInformation(header); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::sizeInWords ( ) const
inline

Definition at line 70 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

70 { return theTrailerFormat->sizeInWords(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::tmb_empty ( ) const
inline

Definition at line 52 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

52 { return theTrailerFormat->tmb_empty(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::tmb_endtimeout ( ) const
inline

Definition at line 41 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

41 { return theTrailerFormat->tmb_endtimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::tmb_full ( ) const
inline

Definition at line 60 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

60 {return theTrailerFormat->tmb_full(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::tmb_half ( ) const
inline

Definition at line 56 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

56 { return theTrailerFormat->tmb_half(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned CSCDMBTrailer::tmb_starttimeout ( ) const
inline

Definition at line 45 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

45 { return theTrailerFormat->tmb_starttimeout(); };
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81

Member Data Documentation

int CSCDMBTrailer::theFirmwareVersion
private

Definition at line 82 of file CSCDMBTrailer.h.

Referenced by CSCDMBTrailer().

boost::shared_ptr<CSCVDMBTrailerFormat> CSCDMBTrailer::theTrailerFormat
private