Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:54

0001 // Class for Resistive Plate Chamber (RPC) Data Record
0002 
0003 #ifndef __l1t_emtf_RPC_h__
0004 #define __l1t_emtf_RPC_h__
0005 
0006 #include <vector>
0007 #include <cstdint>
0008 
0009 namespace l1t {
0010   namespace emtf {
0011     class RPC {
0012     public:
0013       explicit RPC(uint64_t dataword);
0014 
0015       RPC()
0016           : phi(-99),
0017             theta(-99),
0018             word(-99),
0019             frame(-99),
0020             link(-99),
0021             rpc_bxn(-99),
0022             bc0(-99),
0023             tbin(-99),
0024             vp(-99),
0025             format_errors(0),
0026             dataword(-99) {}
0027 
0028       virtual ~RPC() {}
0029 
0030       void set_phi(int bits) { phi = bits; }
0031       void set_theta(int bits) { theta = bits; }
0032       void set_word(int bits) { word = bits; }
0033       void set_frame(int bits) { frame = bits; }
0034       void set_link(int bits) { link = bits; }
0035       void set_rpc_bxn(int bits) { rpc_bxn = bits; }
0036       void set_bc0(int bits) { bc0 = bits; }
0037       void set_tbin(int bits) { tbin = bits; }
0038       void set_vp(int bits) { vp = bits; }
0039       void add_format_error() { format_errors += 1; }
0040       void set_dataword(uint64_t bits) { dataword = bits; }
0041 
0042       int Phi() const { return phi; }
0043       int Theta() const { return theta; }
0044       int Word() const { return word; }
0045       int Frame() const { return frame; }
0046       int Link() const { return link; }
0047       int RPC_BXN() const { return rpc_bxn; }
0048       int BC0() const { return bc0; }
0049       int TBIN() const { return tbin; }
0050       int VP() const { return vp; }
0051       int Format_errors() const { return format_errors; }
0052       uint64_t Dataword() const { return dataword; }
0053 
0054     private:
0055       int phi;
0056       int theta;
0057       int word;
0058       int frame;
0059       int link;
0060       int rpc_bxn;
0061       int bc0;
0062       int tbin;
0063       int vp;
0064       int format_errors;
0065       uint64_t dataword;
0066 
0067     };  // End of class RPC
0068 
0069     // Define a vector of RPC
0070     typedef std::vector<RPC> RPCCollection;
0071 
0072   }  // End of namespace emtf
0073 }  // End of namespace l1t
0074 
0075 #endif /* define __l1t_emtf_RPC_h__ */