CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1DataEmulDigi.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1DataEmulDigi_h
2 #define DataFormats_L1DataEmulDigi_h
3 
4 /*\class L1DataEmulDigi
5  *\description L1 trigger data|emulation digi
6  *\author Nuno Leonardo (CERN)
7  *\date 07.07
8  */
9 
10 #include <ostream>
11 #include <string>
12 #include <utility>
13 #include <vector>
14 
16 
18 public:
20  L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n);
21  L1DataEmulDigi(int sid,
22  int cid,
23  double x1,
24  double x2,
25  double x3,
26  int n,
27  unsigned int dw,
28  unsigned int ew,
29  float dr,
30  float er,
31  const L1MonitorDigi& dm,
32  const L1MonitorDigi& em);
34 
35  void setSid(int sid) { m_sid = sid; }
36  void setCid(int cid) { m_cid = cid; }
37  void setLocation(double x1, double x2, double x3) {
38  m_location[0] = x1;
39  m_location[1] = x2;
40  m_location[2] = x3;
41  }
42  void setType(int n) { m_type = n; }
43  void setData(unsigned int d, unsigned int e) {
44  m_data[0] = d;
45  m_data[1] = e;
46  }
47  void setRank(float d, float e) {
48  m_rank[0] = d;
49  m_rank[1] = e;
50  }
51  void setDEpair(const L1MonitorDigi& d, const L1MonitorDigi& e) {
52  m_DEpair[0] = d;
53  m_DEpair[1] = e;
54  }
55 
56  int sid() const { return m_sid; }
57  int cid() const { return m_cid; }
58  double x1() const { return m_location[0]; }
59  double x2() const { return m_location[1]; }
60  double x3() const { return m_location[2]; }
61  int type() const { return m_type; }
62  void data(unsigned int* d) const {
63  d[0] = m_data[0];
64  d[1] = m_data[1];
65  }
66  void rank(float* r) const {
67  r[0] = m_rank[0];
68  r[1] = m_rank[1];
69  }
70  L1MonitorDigi data() const { return m_DEpair[0]; }
71  L1MonitorDigi emul() const { return m_DEpair[1]; }
72 
73  int reset();
74  bool empty() const;
75 
76 private:
77  int m_sid;
78  int m_cid;
79  double m_location[3];
80  int m_type;
81  unsigned int m_data[2];
82  float m_rank[2];
83  int m_null;
85 };
86 
87 std::ostream& operator<<(std::ostream&, const L1DataEmulDigi&);
88 
89 struct GltDEDigi {
90  typedef std::vector<bool> GltBits;
91  GltDEDigi();
92  void reset();
93  GltDEDigi(bool glbit[], GltBits dbits[], GltBits tbits[]);
94  void set(bool glbit[], GltBits dbits[], GltBits tbits[]);
95  bool globalDBit[2];
97 };
98 
99 std::ostream& operator<<(std::ostream&, const GltDEDigi&);
100 
101 #endif
void rank(float *r) const
int sid() const
void setCid(int cid)
int type() const
std::vector< bool > GltBits
void set(bool glbit[], GltBits dbits[], GltBits tbits[])
void setRank(float d, float e)
GltBits gltTchBits[2]
void data(unsigned int *d) const
unsigned int m_data[2]
void setData(unsigned int d, unsigned int e)
void setType(int n)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
int cid() const
double x2() const
void setSid(int sid)
tuple d
Definition: ztail.py:151
double x1() const
tuple dm
Definition: symbols.py:75
L1MonitorDigi data() const
void setDEpair(const L1MonitorDigi &d, const L1MonitorDigi &e)
L1MonitorDigi emul() const
L1MonitorDigi m_DEpair[2]
void reset()
bool empty() const
void setLocation(double x1, double x2, double x3)
double x3() const
double m_location[3]
bool globalDBit[2]
GltBits gltDecBits[2]