File indexing completed on 2024-04-06 12:04:38
0001 #ifndef DataFormats_L1DataEmulDigi_h
0002 #define DataFormats_L1DataEmulDigi_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <ostream>
0011 #include <string>
0012 #include <utility>
0013 #include <vector>
0014
0015 #include "DataFormats/L1Trigger/interface/L1MonitorDigi.h"
0016
0017 class L1DataEmulDigi {
0018 public:
0019 L1DataEmulDigi();
0020 L1DataEmulDigi(int sid, int cid, double x1, double x2, double x3, int n);
0021 L1DataEmulDigi(int sid,
0022 int cid,
0023 double x1,
0024 double x2,
0025 double x3,
0026 int n,
0027 unsigned int dw,
0028 unsigned int ew,
0029 float dr,
0030 float er,
0031 const L1MonitorDigi& dm,
0032 const L1MonitorDigi& em);
0033 ~L1DataEmulDigi();
0034
0035 void setSid(int sid) { m_sid = sid; }
0036 void setCid(int cid) { m_cid = cid; }
0037 void setLocation(double x1, double x2, double x3) {
0038 m_location[0] = x1;
0039 m_location[1] = x2;
0040 m_location[2] = x3;
0041 }
0042 void setType(int n) { m_type = n; }
0043 void setData(unsigned int d, unsigned int e) {
0044 m_data[0] = d;
0045 m_data[1] = e;
0046 }
0047 void setRank(float d, float e) {
0048 m_rank[0] = d;
0049 m_rank[1] = e;
0050 }
0051 void setDEpair(const L1MonitorDigi& d, const L1MonitorDigi& e) {
0052 m_DEpair[0] = d;
0053 m_DEpair[1] = e;
0054 }
0055
0056 int sid() const { return m_sid; }
0057 int cid() const { return m_cid; }
0058 double x1() const { return m_location[0]; }
0059 double x2() const { return m_location[1]; }
0060 double x3() const { return m_location[2]; }
0061 int type() const { return m_type; }
0062 void data(unsigned int* d) const {
0063 d[0] = m_data[0];
0064 d[1] = m_data[1];
0065 }
0066 void rank(float* r) const {
0067 r[0] = m_rank[0];
0068 r[1] = m_rank[1];
0069 }
0070 L1MonitorDigi data() const { return m_DEpair[0]; }
0071 L1MonitorDigi emul() const { return m_DEpair[1]; }
0072
0073 int reset();
0074 bool empty() const;
0075
0076 private:
0077 int m_sid;
0078 int m_cid;
0079 double m_location[3];
0080 int m_type;
0081 unsigned int m_data[2];
0082 float m_rank[2];
0083 int m_null;
0084 L1MonitorDigi m_DEpair[2];
0085 };
0086
0087 std::ostream& operator<<(std::ostream&, const L1DataEmulDigi&);
0088
0089 struct GltDEDigi {
0090 typedef std::vector<bool> GltBits;
0091 GltDEDigi();
0092 void reset();
0093 GltDEDigi(bool glbit[], GltBits dbits[], GltBits tbits[]);
0094 void set(bool glbit[], GltBits dbits[], GltBits tbits[]);
0095 bool globalDBit[2];
0096 GltBits gltDecBits[2], gltTchBits[2];
0097 };
0098
0099 std::ostream& operator<<(std::ostream&, const GltDEDigi&);
0100
0101 #endif