CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDMBTrailer.h
Go to the documentation of this file.
1 #ifndef CSCDMBTrailer_h
2 #define CSCDMBTrailer_h
3 
4 #include <cassert>
5 #include <iosfwd>
6 #include <string.h> // bzero
11 #include <boost/shared_ptr.hpp>
12 
13 
14 // class CSCDMBHeader;
15 class CSCDMBTrailer2005;
16 class CSCDMBTrailer2013;
17 
19 public:
20 
21  CSCDMBTrailer(uint16_t firmware_version = 2005);
22 
23  CSCDMBTrailer(unsigned short * buf, uint16_t firmware_version = 2005);
24 
26  {
27  memcpy(this, digi.trailer(), sizeInWords()*2);
28  }
29 
30 
32  void setEventInformation(const CSCDMBHeader & header) { return theTrailerFormat->setEventInformation(header); };
33 
34  unsigned crateID() const { return theTrailerFormat->crateID(); };
35  unsigned dmbID() const { return theTrailerFormat->dmbID(); };
36 
37  unsigned dmb_l1a() const { return theTrailerFormat->dmb_l1a(); };
38  unsigned dmb_bxn() const { return theTrailerFormat->dmb_bxn(); };
39 
40  unsigned alct_endtimeout() const { return theTrailerFormat->alct_endtimeout(); };
41  unsigned tmb_endtimeout() const { return theTrailerFormat->tmb_endtimeout(); };
42  unsigned cfeb_endtimeout() const { return theTrailerFormat->cfeb_endtimeout(); };
43 
44  unsigned alct_starttimeout() const { return theTrailerFormat->alct_starttimeout(); };
45  unsigned tmb_starttimeout() const { return theTrailerFormat->tmb_starttimeout(); };
46  unsigned cfeb_starttimeout() const { return theTrailerFormat->cfeb_starttimeout(); };
47 
48  unsigned cfeb_movlp() const { return theTrailerFormat->cfeb_movlp(); };
49  unsigned dmb_l1pipe() const { return theTrailerFormat->dmb_l1pipe(); };
50 
51  unsigned alct_empty() const { return theTrailerFormat->alct_empty(); };
52  unsigned tmb_empty() const { return theTrailerFormat->tmb_empty(); };
53  unsigned cfeb_empty() const { return theTrailerFormat->cfeb_empty(); };
54 
55  unsigned alct_half() const { return theTrailerFormat->alct_half(); };
56  unsigned tmb_half() const { return theTrailerFormat->tmb_half(); };
57  unsigned cfeb_half() const { return theTrailerFormat->cfeb_half(); };
58 
59  unsigned alct_full() const { return theTrailerFormat->alct_full(); };
60  unsigned tmb_full() const {return theTrailerFormat->tmb_full(); };
61  unsigned cfeb_full() const { return theTrailerFormat->cfeb_full(); };
62 
63  unsigned crc22() const { return theTrailerFormat->crc22(); };
64  unsigned crc_lo_parity() const { return theTrailerFormat->crc_lo_parity(); };
65  unsigned crc_hi_parity() const { return theTrailerFormat->crc_hi_parity(); };
66 
67  unsigned short * data() { return theTrailerFormat->data(); };
68  unsigned short * data() const { return theTrailerFormat->data(); };
69 
70  unsigned sizeInWords() const { return theTrailerFormat->sizeInWords(); };
71 
72  bool check() const { return theTrailerFormat->check(); };
73 
77 
78 
79  private:
80 
81  boost::shared_ptr<CSCVDMBTrailerFormat> theTrailerFormat;
83 
84 };
85 
86 #endif
87 
unsigned tmb_half() const
Definition: CSCDMBTrailer.h:56
unsigned cfeb_empty() const
Definition: CSCDMBTrailer.h:53
unsigned alct_full() const
Definition: CSCDMBTrailer.h:59
unsigned tmb_empty() const
Definition: CSCDMBTrailer.h:52
unsigned cfeb_endtimeout() const
Definition: CSCDMBTrailer.h:42
bool check() const
Definition: CSCDMBTrailer.h:72
unsigned sizeInWords() const
Definition: CSCDMBTrailer.h:70
CSCDMBTrailer2013 dmbTrailer2013() const
int theFirmwareVersion
Definition: CSCDMBTrailer.h:82
unsigned short * data() const
Definition: CSCDMBTrailer.h:68
unsigned short * data()
Definition: CSCDMBTrailer.h:67
void setEventInformation(const CSCDMBHeader &header)
@ NEEDS TO BE DONE
Definition: CSCDMBTrailer.h:32
unsigned cfeb_starttimeout() const
Definition: CSCDMBTrailer.h:46
unsigned crc_hi_parity() const
Definition: CSCDMBTrailer.h:65
unsigned tmb_starttimeout() const
Definition: CSCDMBTrailer.h:45
unsigned alct_starttimeout() const
Definition: CSCDMBTrailer.h:44
unsigned tmb_full() const
Definition: CSCDMBTrailer.h:60
unsigned cfeb_movlp() const
Definition: CSCDMBTrailer.h:48
unsigned dmbID() const
Definition: CSCDMBTrailer.h:35
unsigned alct_half() const
Definition: CSCDMBTrailer.h:55
unsigned cfeb_half() const
Definition: CSCDMBTrailer.h:57
boost::shared_ptr< CSCVDMBTrailerFormat > theTrailerFormat
Definition: CSCDMBTrailer.h:81
unsigned cfeb_full() const
Definition: CSCDMBTrailer.h:61
CSCDMBTrailer(const CSCDMBStatusDigi &digi)
Definition: CSCDMBTrailer.h:25
unsigned crc22() const
Definition: CSCDMBTrailer.h:63
const uint16_t * trailer() const
unsigned crateID() const
Definition: CSCDMBTrailer.h:34
unsigned dmb_bxn() const
Definition: CSCDMBTrailer.h:38
CSCDMBTrailer2005 dmbTrailer2005() const
will throw if the cast fails
CSCDMBTrailer(uint16_t firmware_version=2005)
Definition: CSCDMBTrailer.cc:8
unsigned tmb_endtimeout() const
Definition: CSCDMBTrailer.h:41
unsigned alct_endtimeout() const
Definition: CSCDMBTrailer.h:40
unsigned alct_empty() const
Definition: CSCDMBTrailer.h:51
unsigned dmb_l1a() const
Definition: CSCDMBTrailer.h:37
unsigned dmb_l1pipe() const
Definition: CSCDMBTrailer.h:49
unsigned crc_lo_parity() const
Definition: CSCDMBTrailer.h:64