CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCDCCLink.h
Go to the documentation of this file.
1 #ifndef CondFormats_RPCObjects_RPCDCCLink_h
2 #define CondFormats_RPCObjects_RPCDCCLink_h
3 
4 #include <stdint.h>
5 #include <string>
6 #include <iosfwd>
7 #include <climits>
8 
10 
13 {
14 public:
15  static int const wildcard_ = INT_MIN;
16 
19  static int const min_fed_ = 0;
20  static int const max_fed_ = 65534;
21  static int const min_dccinput_ = 0;
22  static int const max_dccinput_ = 36;
23  static int const min_tbinput_ = 0;
24  static int const max_tbinput_ = 18;
27 protected:
30  static int const pos_fed_ = 16;
31  static ::uint32_t const mask_fed_ = 0xffff0000;
32  static int const pos_dccinput_ = 8;
33  static ::uint32_t const mask_dccinput_ = 0x0000ff00;
34  static int const pos_tbinput_ = 0;
35  static ::uint32_t const mask_tbinput_ = 0x000000ff;
38 public:
39  RPCDCCLink();
40  RPCDCCLink(::uint32_t const & _id);
41  RPCDCCLink(int _fed
42  , int _dccinput
43  , int _tbinput = wildcard_);
44 
45  ::uint32_t getId() const;
46  operator ::uint32_t() const;
47  ::uint32_t getMask() const;
48 
49  bool matches(RPCDCCLink const & _rhs) const;
50 
51  void setId(::uint32_t const & _id);
52  void reset();
53 
56  int getFED() const;
57  int getDCCInput() const;
58  int getTBInput() const;
65  RPCDCCLink & setFED(int _fed = wildcard_);
66  RPCDCCLink & setDCCInput(int _dccinput = wildcard_);
67  RPCDCCLink & setTBInput(int _tbinput = wildcard_);
70  std::string getName() const;
71 
72  bool operator<(RPCDCCLink const & _rhs) const;
73  bool operator==(RPCDCCLink const & _rhs) const;
74  bool operator!=(RPCDCCLink const & _rhs) const;
75  bool operator<(::uint32_t const & _rhs) const;
76  bool operator==(::uint32_t const & _rhs) const;
77  bool operator!=(::uint32_t const & _rhs) const;
78 
83 
84 protected:
85  int bf_get(int const _min, ::uint32_t const _mask, int const _pos) const;
86  RPCDCCLink & bf_set(int const _min, int const _max, ::uint32_t const _mask, int const _pos, int const _value);
87  std::ostream & bf_stream(std::ostream & _ostream, int const _min, ::uint32_t const _mask, int const _pos) const;
88 
89 protected:
90  ::uint32_t id_;
91 
93 };
94 
95 std::ostream & operator<<(std::ostream & _ostream, RPCDCCLink const & _link);
96 
97 #include "CondFormats/RPCObjects/interface/RPCDCCLink.icc"
98 
99 #endif // CondFormats_RPCObjects_RPCDCCLink_h
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
#define COND_SERIALIZABLE
Definition: Serializable.h:38