1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
// Class for Resistive Plate Chamber (RPC) Data Record
#ifndef __l1t_emtf_RPC_h__
#define __l1t_emtf_RPC_h__
#include <vector>
#include <cstdint>
namespace l1t {
namespace emtf {
class RPC {
public:
explicit RPC(uint64_t dataword);
RPC()
: phi(-99),
theta(-99),
word(-99),
frame(-99),
link(-99),
rpc_bxn(-99),
bc0(-99),
tbin(-99),
vp(-99),
format_errors(0),
dataword(-99) {}
virtual ~RPC() {}
void set_phi(int bits) { phi = bits; }
void set_theta(int bits) { theta = bits; }
void set_word(int bits) { word = bits; }
void set_frame(int bits) { frame = bits; }
void set_link(int bits) { link = bits; }
void set_rpc_bxn(int bits) { rpc_bxn = bits; }
void set_bc0(int bits) { bc0 = bits; }
void set_tbin(int bits) { tbin = bits; }
void set_vp(int bits) { vp = bits; }
void add_format_error() { format_errors += 1; }
void set_dataword(uint64_t bits) { dataword = bits; }
int Phi() const { return phi; }
int Theta() const { return theta; }
int Word() const { return word; }
int Frame() const { return frame; }
int Link() const { return link; }
int RPC_BXN() const { return rpc_bxn; }
int BC0() const { return bc0; }
int TBIN() const { return tbin; }
int VP() const { return vp; }
int Format_errors() const { return format_errors; }
uint64_t Dataword() const { return dataword; }
private:
int phi;
int theta;
int word;
int frame;
int link;
int rpc_bxn;
int bc0;
int tbin;
int vp;
int format_errors;
uint64_t dataword;
}; // End of class RPC
// Define a vector of RPC
typedef std::vector<RPC> RPCCollection;
} // End of namespace emtf
} // End of namespace l1t
#endif /* define __l1t_emtf_RPC_h__ */
|