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 16 of file CSCDMBTrailer.h.

Constructor & Destructor Documentation

◆ CSCDMBTrailer() [1/2]

CSCDMBTrailer::CSCDMBTrailer ( uint16_t  firmware_version = 2005)

Definition at line 7 of file CSCDMBTrailer.cc.

References theFirmwareVersion, and theTrailerFormat.

7  : theTrailerFormat(), theFirmwareVersion(firmware_version) {
8  if (theFirmwareVersion == 2013) {
9  theTrailerFormat = std::make_shared<CSCDMBTrailer2013>();
10  } else {
11  theTrailerFormat = std::make_shared<CSCDMBTrailer2005>();
12  }
13 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:71
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ CSCDMBTrailer() [2/2]

CSCDMBTrailer::CSCDMBTrailer ( const uint16_t *  buf,
uint16_t  firmware_version = 2005 
)

Definition at line 15 of file CSCDMBTrailer.cc.

References visDQMUpload::buf, theFirmwareVersion, and theTrailerFormat.

16  : theTrailerFormat(), theFirmwareVersion(firmware_version) {
17  if (theFirmwareVersion == 2013) {
18  theTrailerFormat = std::make_shared<CSCDMBTrailer2013>(buf);
19  } else {
20  theTrailerFormat = std::make_shared<CSCDMBTrailer2005>(buf);
21  }
22 }
int theFirmwareVersion
Definition: CSCDMBTrailer.h:71
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

Member Function Documentation

◆ alct_empty()

unsigned CSCDMBTrailer::alct_empty ( ) const
inline

Definition at line 42 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

42 { return theTrailerFormat->alct_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ alct_endtimeout()

unsigned CSCDMBTrailer::alct_endtimeout ( ) const
inline

Definition at line 31 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

31 { return theTrailerFormat->alct_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ alct_full()

unsigned CSCDMBTrailer::alct_full ( ) const
inline

Definition at line 50 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

50 { return theTrailerFormat->alct_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ alct_half()

unsigned CSCDMBTrailer::alct_half ( ) const
inline

Definition at line 46 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

46 { return theTrailerFormat->alct_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ alct_starttimeout()

unsigned CSCDMBTrailer::alct_starttimeout ( ) const
inline

Definition at line 35 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

35 { return theTrailerFormat->alct_starttimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ cfeb_empty()

unsigned CSCDMBTrailer::cfeb_empty ( ) const
inline

Definition at line 44 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

44 { return theTrailerFormat->cfeb_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ cfeb_endtimeout()

unsigned CSCDMBTrailer::cfeb_endtimeout ( ) const
inline

Definition at line 33 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

33 { return theTrailerFormat->cfeb_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ cfeb_full()

unsigned CSCDMBTrailer::cfeb_full ( ) const
inline

Definition at line 52 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

52 { return theTrailerFormat->cfeb_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ cfeb_half()

unsigned CSCDMBTrailer::cfeb_half ( ) const
inline

Definition at line 48 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

48 { return theTrailerFormat->cfeb_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ cfeb_movlp()

unsigned CSCDMBTrailer::cfeb_movlp ( ) const
inline

Definition at line 39 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

◆ cfeb_starttimeout()

unsigned CSCDMBTrailer::cfeb_starttimeout ( ) const
inline

Definition at line 37 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

37 { return theTrailerFormat->cfeb_starttimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ check()

bool CSCDMBTrailer::check ( ) const
inline

Definition at line 63 of file CSCDMBTrailer.h.

References theTrailerFormat.

63 { return theTrailerFormat->check(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ crateID()

unsigned CSCDMBTrailer::crateID ( ) const
inline

Definition at line 25 of file CSCDMBTrailer.h.

References theTrailerFormat.

25 { return theTrailerFormat->crateID(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ crc22()

unsigned CSCDMBTrailer::crc22 ( ) const
inline

Definition at line 54 of file CSCDMBTrailer.h.

References theTrailerFormat.

54 { return theTrailerFormat->crc22(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ crc_hi_parity()

unsigned CSCDMBTrailer::crc_hi_parity ( ) const
inline

Definition at line 56 of file CSCDMBTrailer.h.

References theTrailerFormat.

56 { return theTrailerFormat->crc_hi_parity(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ crc_lo_parity()

unsigned CSCDMBTrailer::crc_lo_parity ( ) const
inline

Definition at line 55 of file CSCDMBTrailer.h.

References theTrailerFormat.

55 { return theTrailerFormat->crc_lo_parity(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ data() [1/2]

unsigned short* CSCDMBTrailer::data ( )
inline

Definition at line 58 of file CSCDMBTrailer.h.

References theTrailerFormat.

Referenced by CSCEventData::pack().

58 { return theTrailerFormat->data(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ data() [2/2]

unsigned short* CSCDMBTrailer::data ( ) const
inline

Definition at line 59 of file CSCDMBTrailer.h.

References theTrailerFormat.

59 { return theTrailerFormat->data(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmb_bxn()

unsigned CSCDMBTrailer::dmb_bxn ( ) const
inline

Definition at line 29 of file CSCDMBTrailer.h.

References theTrailerFormat.

29 { return theTrailerFormat->dmb_bxn(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmb_l1a()

unsigned CSCDMBTrailer::dmb_l1a ( ) const
inline

Definition at line 28 of file CSCDMBTrailer.h.

References theTrailerFormat.

28 { return theTrailerFormat->dmb_l1a(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmb_l1pipe()

unsigned CSCDMBTrailer::dmb_l1pipe ( ) const
inline

Definition at line 40 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

40 { return theTrailerFormat->dmb_l1pipe(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmbID()

unsigned CSCDMBTrailer::dmbID ( ) const
inline

Definition at line 26 of file CSCDMBTrailer.h.

References theTrailerFormat.

26 { return theTrailerFormat->dmbID(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmbTrailer2005()

CSCDMBTrailer2005 CSCDMBTrailer::dmbTrailer2005 ( ) const

will throw if the cast fails

Definition at line 24 of file CSCDMBTrailer.cc.

References Exception, mps_fire::result, and theTrailerFormat.

24  {
25  const CSCDMBTrailer2005 *result = dynamic_cast<const CSCDMBTrailer2005 *>(theTrailerFormat.get());
26  if (result == nullptr) {
27  throw cms::Exception("Could not get 2005 DMB trailer format");
28  }
29  return *result;
30 }
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ dmbTrailer2013()

CSCDMBTrailer2013 CSCDMBTrailer::dmbTrailer2013 ( ) const

Definition at line 32 of file CSCDMBTrailer.cc.

References Exception, mps_fire::result, and theTrailerFormat.

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

◆ setEventInformation()

void CSCDMBTrailer::setEventInformation ( const CSCDMBHeader header)
inline

@ NEEDS TO BE DONE

Definition at line 23 of file CSCDMBTrailer.h.

References RecoTauValidation_cfi::header, and theTrailerFormat.

23 { return theTrailerFormat->setEventInformation(header); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ sizeInWords()

unsigned CSCDMBTrailer::sizeInWords ( ) const
inline

Definition at line 61 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

61 { return theTrailerFormat->sizeInWords(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ tmb_empty()

unsigned CSCDMBTrailer::tmb_empty ( ) const
inline

Definition at line 43 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

43 { return theTrailerFormat->tmb_empty(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ tmb_endtimeout()

unsigned CSCDMBTrailer::tmb_endtimeout ( ) const
inline

Definition at line 32 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

32 { return theTrailerFormat->tmb_endtimeout(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ tmb_full()

unsigned CSCDMBTrailer::tmb_full ( ) const
inline

Definition at line 51 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

51 { return theTrailerFormat->tmb_full(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ tmb_half()

unsigned CSCDMBTrailer::tmb_half ( ) const
inline

Definition at line 47 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

47 { return theTrailerFormat->tmb_half(); };
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70

◆ tmb_starttimeout()

unsigned CSCDMBTrailer::tmb_starttimeout ( ) const
inline

Definition at line 36 of file CSCDMBTrailer.h.

References theTrailerFormat.

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

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

Member Data Documentation

◆ theFirmwareVersion

int CSCDMBTrailer::theFirmwareVersion
private

Definition at line 71 of file CSCDMBTrailer.h.

Referenced by CSCDMBTrailer().

◆ theTrailerFormat

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