CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
19  public:
20 
22  L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n);
23  L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n,
24  unsigned int dw, unsigned int ew, float dr, float er,
27 
28  void setSid (int sid) {m_sid = sid;}
29  void setCid (int cid) {m_cid = cid;}
30  void setLocation (double x1, double x2, double x3)
31  { m_location[0]=x1; m_location[1]=x2; m_location[2]=x3;}
32  void setType (int n) {m_type = n;}
33  void setData(unsigned int d, unsigned int e) {m_data[0]=d; m_data[1]=e;}
34  void setRank(float d, float e) {m_rank[0]=d; m_rank[1]=e;}
36  {m_DEpair[0]=d; m_DEpair[1]=e; }
37 
38  int sid() const {return m_sid;}
39  int cid() const {return m_cid;}
40  double x1() const {return m_location[0];}
41  double x2() const {return m_location[1];}
42  double x3() const {return m_location[2];}
43  int type() const {return m_type;}
44  void data(unsigned int *d) const {d[0]=m_data[0]; d[1]=m_data[1];}
45  void rank(float *r) const {r[0]=m_rank[0]; r[1]=m_rank[1];}
46  L1MonitorDigi data() const {return m_DEpair[0];}
47  L1MonitorDigi emul() const {return m_DEpair[1];}
48 
49  int reset();
50  bool empty() const;
51 
52  private:
53 
54  int m_sid;
55  int m_cid;
56  double m_location[3];
57  int m_type;
58  unsigned int m_data[2];
59  float m_rank[2];
60  int m_null;
62 
63 };
64 
65 std::ostream& operator<<(std::ostream&, const L1DataEmulDigi&);
66 
67 struct GltDEDigi {
68  typedef std::vector<bool> GltBits;
69  GltDEDigi();
70  void reset();
71  GltDEDigi(bool glbit[], GltBits dbits[], GltBits tbits[]);
72  void set(bool glbit[], GltBits dbits[], GltBits tbits[]);
73  bool globalDBit[2];
75 };
76 
77 std::ostream& operator<<(std::ostream&, const GltDEDigi&);
78 
79 #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:187
int cid() const
double x2() const
void setSid(int sid)
double x1() const
L1MonitorDigi data() const
L1MonitorDigi emul() const
L1MonitorDigi m_DEpair[2]
void reset()
bool empty() const
void setLocation(double x1, double x2, double x3)
void setDEpair(L1MonitorDigi d, L1MonitorDigi e)
double x3() const
double m_location[3]
bool globalDBit[2]
GltBits gltDecBits[2]