CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPCFebConnector.h
Go to the documentation of this file.
1 #ifndef CondFormats_RPCObjects_RPCFebConnector_h
2 #define CondFormats_RPCObjects_RPCFebConnector_h
3 
4 #include <cstdint>
5 #include <string>
6 #include <iosfwd>
7 
9 
11 
13 public:
14  static unsigned int const min_first_strip_ = 1;
15  static unsigned int const max_first_strip_ = 128;
16  static unsigned int const nchannels_ = 16;
17 
18  static unsigned int bit_count(std::uint16_t);
19 
20 public:
21  RPCFebConnector(RPCDetId const& rpc_det_id = RPCDetId(0, 0, 1, 1, 1, 1, 0),
22  unsigned int first_strip = 1,
23  int slope = 1,
24  std::uint16_t channels = 0x0);
25 
26  void reset();
27 
28  RPCDetId getRPCDetId() const;
29  unsigned int getFirstStrip() const;
30  int getSlope() const;
31  std::uint16_t getChannels() const;
32 
33  RPCFebConnector& setRPCDetId(RPCDetId const& rpc_det_id);
34  RPCFebConnector& setFirstStrip(unsigned int strip);
36  RPCFebConnector& setChannels(std::uint16_t channels);
37 
38  bool isActive(unsigned int channel) const;
39  unsigned int getNChannels() const;
40  unsigned int getStrip(unsigned int channel) const;
41 
42  bool hasStrip(unsigned int strip) const;
43  unsigned int getChannel(unsigned int strip) const;
44 
45  std::string getString() const;
46 
47 protected:
48  std::uint8_t first_strip_;
49  ::int8_t slope_;
50  std::uint16_t channels_;
51 
52  std::uint32_t rpc_det_id_;
53 
55 };
56 
57 std::ostream& operator<<(std::ostream& ostream, RPCFebConnector const& connector);
58 
59 #include "CondFormats/RPCObjects/interface/RPCFebConnector.icc"
60 
61 #endif // CondFormats_RPCObjects_RPCFebConnector_h
unsigned int getStrip(unsigned int channel) const
RPCFebConnector & setFirstStrip(unsigned int strip)
unsigned int getNChannels() const
static const double slope[3]
static unsigned int const max_first_strip_
::int8_t slope_
-1 or 1
static unsigned int bit_count(std::uint16_t)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
unsigned int getFirstStrip() const
RPCFebConnector(RPCDetId const &rpc_det_id=RPCDetId(0, 0, 1, 1, 1, 1, 0), unsigned int first_strip=1, int slope=1, std::uint16_t channels=0x0)
RPCFebConnector & setSlope(int slope)
bool hasStrip(unsigned int strip) const
bool isActive(unsigned int channel) const
std::uint16_t channels_
active channels in range [1-16]
unsigned int getChannel(unsigned int strip) const
int getSlope() const
#define COND_SERIALIZABLE
Definition: Serializable.h:39
static unsigned int const min_first_strip_
std::uint16_t getChannels() const
std::uint32_t rpc_det_id_
RPCFebConnector & setChannels(std::uint16_t channels)
RPCFebConnector & setRPCDetId(RPCDetId const &rpc_det_id)
RPCDetId getRPCDetId() const
static unsigned int const nchannels_
std::string getString() const
std::uint8_t first_strip_
strip, allowing range [1-128]