CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDDUHeader.h
Go to the documentation of this file.
1 /* CSCDDUHeader 4/24/03 A.Tumanov
2  * documented at http://www.physics.ohio-state.edu/~cms/ddu/
3  */
4 
5 #ifndef CSCDDUHeader_h
6 #define CSCDDUHeader_h
8 #include <cstring>
9 
10 class CSCDDUHeader {
11 
12  public:
13  CSCDDUHeader();
14  CSCDDUHeader(unsigned bx, unsigned l1num, unsigned sourceId);
16  {
17  memcpy(this, digi.header(), sizeInWords()*2);
18  }
19  int s_link_status() const { return s_link_status_;}
20  int format_version() const { return format_version_;}
21  int source_id() const { return source_id_;}
22  int bxnum() const { return bxnum_;}
23  int lvl1num() const { return lvl1num_;}
24  int event_type() const { return event_type_;}
25  int ncsc() const { return ncsc_;}
26  int dmb_dav() const { return dmb_dav_;}
27  int dmb_full() const { return dmb_full_;}
28  void setDMBDAV(int dduInput);
29  int live_cscs() const {return live_cscs_;}
30  int output_path_status() const {return output_path_;}
31  static unsigned sizeInWords() {return 12;}
32  void setSourceId(unsigned sourceId) {source_id_ = sourceId;}
33  unsigned short * data() {return (unsigned short *) this;}
34  bool check() const;
35 
36  // gets some data filled by the event data
37  friend class CSCDDUEventData;
38  private:
40  void init();
41 
42  unsigned s_link_status_ : 4;
43  unsigned format_version_ : 4;
44  unsigned source_id_ : 12;
45  unsigned bxnum_ : 12;
46 
47  unsigned lvl1num_ : 24;
48  unsigned event_type_ : 4;
50  unsigned bit64_ : 4;
51 
53  unsigned dmb_full_ : 16;
54  unsigned header2_1_ : 16;
55  unsigned header2_2_ : 16;
56  unsigned header2_3_ : 16;
57 
58 
59  unsigned ncsc_ : 4;
60  unsigned tts_status_ : 4;
61  unsigned boe_status_ : 8;
62  unsigned dmb_dav_ : 16;
63  unsigned output_path_ : 16;
64  unsigned live_cscs_ : 16;
65 
66 };
67 #endif
unsigned source_id_
Definition: CSCDDUHeader.h:44
unsigned dmb_dav_
Definition: CSCDDUHeader.h:62
unsigned lvl1num_
Definition: CSCDDUHeader.h:47
void setSourceId(unsigned sourceId)
Definition: CSCDDUHeader.h:32
bool check() const
Definition: CSCDDUHeader.cc:48
unsigned s_link_status_
Definition: CSCDDUHeader.h:42
int format_version() const
Definition: CSCDDUHeader.h:20
void setDMBDAV(int dduInput)
Definition: CSCDDUHeader.cc:31
int lvl1num() const
Definition: CSCDDUHeader.h:23
unsigned header2_3_
Definition: CSCDDUHeader.h:56
int bxnum() const
Definition: CSCDDUHeader.h:22
int output_path_status() const
Definition: CSCDDUHeader.h:30
int dmb_dav() const
Definition: CSCDDUHeader.h:26
unsigned output_path_
Definition: CSCDDUHeader.h:63
unsigned header2_2_
Definition: CSCDDUHeader.h:55
unsigned ncsc_
Definition: CSCDDUHeader.h:59
unsigned event_type_
Definition: CSCDDUHeader.h:48
unsigned header2_1_
Definition: CSCDDUHeader.h:54
unsigned live_cscs_
Definition: CSCDDUHeader.h:64
unsigned format_version_
Definition: CSCDDUHeader.h:43
const uint16_t * header() const
Data Accessors.
int event_type() const
Definition: CSCDDUHeader.h:24
unsigned bit64_
should always be 5
Definition: CSCDDUHeader.h:50
void init()
initializes constants
Definition: CSCDDUHeader.cc:23
int s_link_status() const
Definition: CSCDDUHeader.h:19
unsigned dmb_full_
should be 8000/0001/8000
Definition: CSCDDUHeader.h:53
int dmb_full() const
Definition: CSCDDUHeader.h:27
static unsigned sizeInWords()
Definition: CSCDDUHeader.h:31
int ncsc() const
Definition: CSCDDUHeader.h:25
int source_id() const
Definition: CSCDDUHeader.h:21
int live_cscs() const
Definition: CSCDDUHeader.h:29
unsigned boe_status_
Definition: CSCDDUHeader.h:61
unsigned bxnum_
Definition: CSCDDUHeader.h:45
CSCDDUHeader(const CSCDDUStatusDigi &digi)
Definition: CSCDDUHeader.h:15
unsigned tts_status_
Definition: CSCDDUHeader.h:60
unsigned short * data()
Definition: CSCDDUHeader.h:33