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 (const uint16_t *buf, uint16_t firmware_version=2005)
 
 CSCDMBTrailer (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.

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 }

References theFirmwareVersion, and theTrailerFormat.

◆ CSCDMBTrailer() [2/2]

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

Definition at line 15 of file CSCDMBTrailer.cc.

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 }

References visDQMUpload::buf, theFirmwareVersion, and theTrailerFormat.

Member Function Documentation

◆ alct_empty()

unsigned CSCDMBTrailer::alct_empty ( ) const
inline

Definition at line 42 of file CSCDMBTrailer.h.

42 { return theTrailerFormat->alct_empty(); };

References theTrailerFormat.

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

◆ alct_endtimeout()

unsigned CSCDMBTrailer::alct_endtimeout ( ) const
inline

Definition at line 31 of file CSCDMBTrailer.h.

31 { return theTrailerFormat->alct_endtimeout(); };

References theTrailerFormat.

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

◆ alct_full()

unsigned CSCDMBTrailer::alct_full ( ) const
inline

Definition at line 50 of file CSCDMBTrailer.h.

50 { return theTrailerFormat->alct_full(); };

References theTrailerFormat.

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

◆ alct_half()

unsigned CSCDMBTrailer::alct_half ( ) const
inline

Definition at line 46 of file CSCDMBTrailer.h.

46 { return theTrailerFormat->alct_half(); };

References theTrailerFormat.

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

◆ alct_starttimeout()

unsigned CSCDMBTrailer::alct_starttimeout ( ) const
inline

Definition at line 35 of file CSCDMBTrailer.h.

35 { return theTrailerFormat->alct_starttimeout(); };

References theTrailerFormat.

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

◆ cfeb_empty()

unsigned CSCDMBTrailer::cfeb_empty ( ) const
inline

Definition at line 44 of file CSCDMBTrailer.h.

44 { return theTrailerFormat->cfeb_empty(); };

References theTrailerFormat.

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

◆ cfeb_endtimeout()

unsigned CSCDMBTrailer::cfeb_endtimeout ( ) const
inline

Definition at line 33 of file CSCDMBTrailer.h.

33 { return theTrailerFormat->cfeb_endtimeout(); };

References theTrailerFormat.

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

◆ cfeb_full()

unsigned CSCDMBTrailer::cfeb_full ( ) const
inline

Definition at line 52 of file CSCDMBTrailer.h.

52 { return theTrailerFormat->cfeb_full(); };

References theTrailerFormat.

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

◆ cfeb_half()

unsigned CSCDMBTrailer::cfeb_half ( ) const
inline

Definition at line 48 of file CSCDMBTrailer.h.

48 { return theTrailerFormat->cfeb_half(); };

References theTrailerFormat.

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

◆ cfeb_movlp()

unsigned CSCDMBTrailer::cfeb_movlp ( ) const
inline

Definition at line 39 of file CSCDMBTrailer.h.

39 { return theTrailerFormat->cfeb_movlp(); };

References theTrailerFormat.

◆ cfeb_starttimeout()

unsigned CSCDMBTrailer::cfeb_starttimeout ( ) const
inline

Definition at line 37 of file CSCDMBTrailer.h.

37 { return theTrailerFormat->cfeb_starttimeout(); };

References theTrailerFormat.

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

◆ check()

bool CSCDMBTrailer::check ( ) const
inline

Definition at line 63 of file CSCDMBTrailer.h.

63 { return theTrailerFormat->check(); };

References theTrailerFormat.

◆ crateID()

unsigned CSCDMBTrailer::crateID ( ) const
inline

Definition at line 25 of file CSCDMBTrailer.h.

25 { return theTrailerFormat->crateID(); };

References theTrailerFormat.

◆ crc22()

unsigned CSCDMBTrailer::crc22 ( ) const
inline

Definition at line 54 of file CSCDMBTrailer.h.

54 { return theTrailerFormat->crc22(); };

References theTrailerFormat.

◆ crc_hi_parity()

unsigned CSCDMBTrailer::crc_hi_parity ( ) const
inline

Definition at line 56 of file CSCDMBTrailer.h.

56 { return theTrailerFormat->crc_hi_parity(); };

References theTrailerFormat.

◆ crc_lo_parity()

unsigned CSCDMBTrailer::crc_lo_parity ( ) const
inline

Definition at line 55 of file CSCDMBTrailer.h.

55 { return theTrailerFormat->crc_lo_parity(); };

References theTrailerFormat.

◆ data() [1/2]

unsigned short* CSCDMBTrailer::data ( )
inline

Definition at line 58 of file CSCDMBTrailer.h.

58 { return theTrailerFormat->data(); };

References theTrailerFormat.

Referenced by CSCEventData::pack().

◆ data() [2/2]

unsigned short* CSCDMBTrailer::data ( ) const
inline

Definition at line 59 of file CSCDMBTrailer.h.

59 { return theTrailerFormat->data(); };

References theTrailerFormat.

◆ dmb_bxn()

unsigned CSCDMBTrailer::dmb_bxn ( ) const
inline

Definition at line 29 of file CSCDMBTrailer.h.

29 { return theTrailerFormat->dmb_bxn(); };

References theTrailerFormat.

◆ dmb_l1a()

unsigned CSCDMBTrailer::dmb_l1a ( ) const
inline

Definition at line 28 of file CSCDMBTrailer.h.

28 { return theTrailerFormat->dmb_l1a(); };

References theTrailerFormat.

◆ dmb_l1pipe()

unsigned CSCDMBTrailer::dmb_l1pipe ( ) const
inline

Definition at line 40 of file CSCDMBTrailer.h.

40 { return theTrailerFormat->dmb_l1pipe(); };

References theTrailerFormat.

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

◆ dmbID()

unsigned CSCDMBTrailer::dmbID ( ) const
inline

Definition at line 26 of file CSCDMBTrailer.h.

26 { return theTrailerFormat->dmbID(); };

References theTrailerFormat.

◆ dmbTrailer2005()

CSCDMBTrailer2005 CSCDMBTrailer::dmbTrailer2005 ( ) const

will throw if the cast fails

Definition at line 24 of file CSCDMBTrailer.cc.

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 }

References Exception, mps_fire::result, and theTrailerFormat.

◆ dmbTrailer2013()

CSCDMBTrailer2013 CSCDMBTrailer::dmbTrailer2013 ( ) const

Definition at line 32 of file CSCDMBTrailer.cc.

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 }

References Exception, mps_fire::result, and theTrailerFormat.

◆ setEventInformation()

void CSCDMBTrailer::setEventInformation ( const CSCDMBHeader header)
inline

@ NEEDS TO BE DONE

Definition at line 23 of file CSCDMBTrailer.h.

23 { return theTrailerFormat->setEventInformation(header); };

References RecoTauValidation_cfi::header, and theTrailerFormat.

◆ sizeInWords()

unsigned CSCDMBTrailer::sizeInWords ( ) const
inline

Definition at line 61 of file CSCDMBTrailer.h.

61 { return theTrailerFormat->sizeInWords(); };

References theTrailerFormat.

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

◆ tmb_empty()

unsigned CSCDMBTrailer::tmb_empty ( ) const
inline

Definition at line 43 of file CSCDMBTrailer.h.

43 { return theTrailerFormat->tmb_empty(); };

References theTrailerFormat.

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

◆ tmb_endtimeout()

unsigned CSCDMBTrailer::tmb_endtimeout ( ) const
inline

Definition at line 32 of file CSCDMBTrailer.h.

32 { return theTrailerFormat->tmb_endtimeout(); };

References theTrailerFormat.

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

◆ tmb_full()

unsigned CSCDMBTrailer::tmb_full ( ) const
inline

Definition at line 51 of file CSCDMBTrailer.h.

51 { return theTrailerFormat->tmb_full(); };

References theTrailerFormat.

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

◆ tmb_half()

unsigned CSCDMBTrailer::tmb_half ( ) const
inline

Definition at line 47 of file CSCDMBTrailer.h.

47 { return theTrailerFormat->tmb_half(); };

References theTrailerFormat.

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

◆ tmb_starttimeout()

unsigned CSCDMBTrailer::tmb_starttimeout ( ) const
inline

Definition at line 36 of file CSCDMBTrailer.h.

36 { return theTrailerFormat->tmb_starttimeout(); };

References theTrailerFormat.

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

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
CSCDMBTrailer2005
Definition: CSCDMBTrailer2005.h:8
CSCDMBTrailer::theFirmwareVersion
int theFirmwareVersion
Definition: CSCDMBTrailer.h:71
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
CSCDMBTrailer::theTrailerFormat
std::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:70
Exception
Definition: hltDiff.cc:245
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:291
mps_fire.result
result
Definition: mps_fire.py:311
CSCDMBTrailer2013
Definition: CSCDMBTrailer2013.h:42