CMS 3D CMS Logo

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 (const uint16_t *buf, uint16_t firmware_version=2005)
 
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
 
std::shared_ptr< CSCVDMBTrailerFormattheTrailerFormat
 

Detailed Description

Definition at line 17 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 = std::make_shared<CSCDMBTrailer2013>();
14  } else {
15  theTrailerFormat = std::make_shared<CSCDMBTrailer2005>();
16  }
17 
18 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:76
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
CSCDMBTrailer::CSCDMBTrailer ( const uint16_t *  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 = std::make_shared<CSCDMBTrailer2013>(buf);
25  } else {
26  theTrailerFormat = std::make_shared<CSCDMBTrailer2005>(buf);
27  }
28 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:76
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75

Member Function Documentation

unsigned CSCDMBTrailer::alct_empty ( ) const
inline

Definition at line 45 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

45 { return theTrailerFormat->alct_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::alct_endtimeout ( ) const
inline

Definition at line 34 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

34 { return theTrailerFormat->alct_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::alct_full ( ) const
inline

Definition at line 53 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

53 { return theTrailerFormat->alct_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::alct_half ( ) const
inline

Definition at line 49 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

49 { return theTrailerFormat->alct_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::alct_starttimeout ( ) const
inline

Definition at line 38 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

38 { return theTrailerFormat->alct_starttimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_empty ( ) const
inline

Definition at line 47 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

47 { return theTrailerFormat->cfeb_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_endtimeout ( ) const
inline

Definition at line 36 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

36 { return theTrailerFormat->cfeb_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_full ( ) const
inline

Definition at line 55 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

55 { return theTrailerFormat->cfeb_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_half ( ) const
inline

Definition at line 51 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

51 { return theTrailerFormat->cfeb_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_movlp ( ) const
inline

Definition at line 42 of file CSCDMBTrailer.h.

References theTrailerFormat.

42 { return theTrailerFormat->cfeb_movlp(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::cfeb_starttimeout ( ) const
inline

Definition at line 40 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

40 { return theTrailerFormat->cfeb_starttimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
bool CSCDMBTrailer::check ( ) const
inline

Definition at line 66 of file CSCDMBTrailer.h.

References dmbTrailer2005(), dmbTrailer2013(), and theTrailerFormat.

66 { return theTrailerFormat->check(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::crateID ( ) const
inline

Definition at line 28 of file CSCDMBTrailer.h.

References theTrailerFormat.

28 { return theTrailerFormat->crateID(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::crc22 ( ) const
inline

Definition at line 57 of file CSCDMBTrailer.h.

References theTrailerFormat.

57 { return theTrailerFormat->crc22(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::crc_hi_parity ( ) const
inline

Definition at line 59 of file CSCDMBTrailer.h.

References theTrailerFormat.

59 { return theTrailerFormat->crc_hi_parity(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::crc_lo_parity ( ) const
inline

Definition at line 58 of file CSCDMBTrailer.h.

References theTrailerFormat.

58 { return theTrailerFormat->crc_lo_parity(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned short* CSCDMBTrailer::data ( )
inline

Definition at line 61 of file CSCDMBTrailer.h.

References theTrailerFormat.

Referenced by CSCEventData::pack().

61 { return theTrailerFormat->data(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned short* CSCDMBTrailer::data ( ) const
inline

Definition at line 62 of file CSCDMBTrailer.h.

References theTrailerFormat.

62 { return theTrailerFormat->data(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::dmb_bxn ( ) const
inline

Definition at line 32 of file CSCDMBTrailer.h.

References theTrailerFormat.

32 { return theTrailerFormat->dmb_bxn(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::dmb_l1a ( ) const
inline

Definition at line 31 of file CSCDMBTrailer.h.

References theTrailerFormat.

31 { return theTrailerFormat->dmb_l1a(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::dmb_l1pipe ( ) const
inline

Definition at line 43 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

43 { return theTrailerFormat->dmb_l1pipe(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::dmbID ( ) const
inline

Definition at line 29 of file CSCDMBTrailer.h.

References theTrailerFormat.

29 { return theTrailerFormat->dmbID(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
CSCDMBTrailer2005 CSCDMBTrailer::dmbTrailer2005 ( ) const

will throw if the cast fails

Definition at line 30 of file CSCDMBTrailer.cc.

References Exception, mps_fire::result, and theTrailerFormat.

Referenced by check().

30  {
31  const CSCDMBTrailer2005 * result = dynamic_cast<const CSCDMBTrailer2005 *>(theTrailerFormat.get());
32  if(result == nullptr)
33  {
34  throw cms::Exception("Could not get 2005 DMB trailer format");
35  }
36  return *result;
37 }
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
CSCDMBTrailer2013 CSCDMBTrailer::dmbTrailer2013 ( ) const

Definition at line 40 of file CSCDMBTrailer.cc.

References Exception, mps_fire::result, and theTrailerFormat.

Referenced by check().

40  {
41  const CSCDMBTrailer2013 * result = dynamic_cast<const CSCDMBTrailer2013 *>(theTrailerFormat.get());
42  if(result == nullptr)
43  {
44  throw cms::Exception("Could not get 2013 DMB trailer format");
45  }
46  return *result;
47 }
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
void CSCDMBTrailer::setEventInformation ( const CSCDMBHeader header)
inline

@ NEEDS TO BE DONE

Definition at line 26 of file CSCDMBTrailer.h.

References theTrailerFormat.

26 { return theTrailerFormat->setEventInformation(header); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::sizeInWords ( ) const
inline

Definition at line 64 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

64 { return theTrailerFormat->sizeInWords(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::tmb_empty ( ) const
inline

Definition at line 46 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

46 { return theTrailerFormat->tmb_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::tmb_endtimeout ( ) const
inline

Definition at line 35 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

35 { return theTrailerFormat->tmb_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::tmb_full ( ) const
inline

Definition at line 54 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

54 {return theTrailerFormat->tmb_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::tmb_half ( ) const
inline

Definition at line 50 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

50 { return theTrailerFormat->tmb_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75
unsigned CSCDMBTrailer::tmb_starttimeout ( ) const
inline

Definition at line 39 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

39 { return theTrailerFormat->tmb_starttimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:75

Member Data Documentation

int CSCDMBTrailer::theFirmwareVersion
private

Definition at line 76 of file CSCDMBTrailer.h.

Referenced by CSCDMBTrailer().

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