CMS 3D CMS Logo

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
L1DataEmulDigi::setCid
void setCid(int cid)
Definition: L1DataEmulDigi.h:36
L1DataEmulDigi::emul
L1MonitorDigi emul() const
Definition: L1DataEmulDigi.h:71
L1MonitorDigi.h
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
L1DataEmulDigi::m_rank
float m_rank[2]
Definition: L1DataEmulDigi.h:82
L1DataEmulDigi::m_null
int m_null
Definition: L1DataEmulDigi.h:83
GltDEDigi::reset
void reset()
Definition: L1DataEmulDigi.cc:88
L1DataEmulDigi::setRank
void setRank(float d, float e)
Definition: L1DataEmulDigi.h:47
L1DataEmulDigi::type
int type() const
Definition: L1DataEmulDigi.h:61
L1DataEmulDigi::sid
int sid() const
Definition: L1DataEmulDigi.h:56
L1DataEmulDigi::x2
double x2() const
Definition: L1DataEmulDigi.h:59
L1DataEmulDigi::x1
double x1() const
Definition: L1DataEmulDigi.h:58
L1DataEmulDigi::empty
bool empty() const
Definition: L1DataEmulDigi.cc:4
L1DataEmulDigi
Definition: L1DataEmulDigi.h:17
GltDEDigi::gltDecBits
GltBits gltDecBits[2]
Definition: L1DataEmulDigi.h:96
L1DataEmulDigi::rank
void rank(float *r) const
Definition: L1DataEmulDigi.h:66
L1DataEmulDigi::m_data
unsigned int m_data[2]
Definition: L1DataEmulDigi.h:81
L1DataEmulDigi::setLocation
void setLocation(double x1, double x2, double x3)
Definition: L1DataEmulDigi.h:37
GltDEDigi::globalDBit
bool globalDBit[2]
Definition: L1DataEmulDigi.h:95
L1DataEmulDigi::cid
int cid() const
Definition: L1DataEmulDigi.h:57
L1DataEmulDigi::setType
void setType(int n)
Definition: L1DataEmulDigi.h:42
GltDEDigi::GltBits
std::vector< bool > GltBits
Definition: L1DataEmulDigi.h:90
GltDEDigi::set
void set(bool glbit[], GltBits dbits[], GltBits tbits[])
Definition: L1DataEmulDigi.cc:104
L1DataEmulDigi::data
L1MonitorDigi data() const
Definition: L1DataEmulDigi.h:70
L1DataEmulDigi::setData
void setData(unsigned int d, unsigned int e)
Definition: L1DataEmulDigi.h:43
symbols.dm
dm
Definition: symbols.py:75
L1DataEmulDigi::reset
int reset()
Definition: L1DataEmulDigi.cc:13
L1DataEmulDigi::m_type
int m_type
Definition: L1DataEmulDigi.h:80
L1DataEmulDigi::L1DataEmulDigi
L1DataEmulDigi()
Definition: L1DataEmulDigi.cc:28
GltDEDigi
Definition: L1DataEmulDigi.h:89
alignCSCRings.r
r
Definition: alignCSCRings.py:93
GltDEDigi::gltTchBits
GltBits gltTchBits[2]
Definition: L1DataEmulDigi.h:96
L1DataEmulDigi::setDEpair
void setDEpair(const L1MonitorDigi &d, const L1MonitorDigi &e)
Definition: L1DataEmulDigi.h:51
L1MonitorDigi
Definition: L1MonitorDigi.h:14
L1DataEmulDigi::m_sid
int m_sid
Definition: L1DataEmulDigi.h:77
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
L1DataEmulDigi::m_cid
int m_cid
Definition: L1DataEmulDigi.h:78
L1DataEmulDigi::m_DEpair
L1MonitorDigi m_DEpair[2]
Definition: L1DataEmulDigi.h:84
operator<<
std::ostream & operator<<(std::ostream &, const L1DataEmulDigi &)
Definition: L1DataEmulDigi.cc:69
L1DataEmulDigi::~L1DataEmulDigi
~L1DataEmulDigi()
Definition: L1DataEmulDigi.cc:67
ztail.d
d
Definition: ztail.py:151
L1DataEmulDigi::setSid
void setSid(int sid)
Definition: L1DataEmulDigi.h:35
L1DataEmulDigi::x3
double x3() const
Definition: L1DataEmulDigi.h:60
L1DataEmulDigi::data
void data(unsigned int *d) const
Definition: L1DataEmulDigi.h:62
L1DataEmulDigi::m_location
double m_location[3]
Definition: L1DataEmulDigi.h:79
GltDEDigi::GltDEDigi
GltDEDigi()
Definition: L1DataEmulDigi.cc:86
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37