CMS 3D CMS Logo

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
RPCFebConnector & setFirstStrip(unsigned int strip)
static const double slope[3]
std::string getString() const
static unsigned int const max_first_strip_
unsigned int getFirstStrip() const
::int8_t slope_
-1 or 1
unsigned int getChannel(unsigned int strip) const
static unsigned int bit_count(std::uint16_t)
bool isActive(unsigned int channel) const
RPCDetId getRPCDetId() 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)
std::uint16_t channels_
active channels in range [1-16]
#define COND_SERIALIZABLE
Definition: Serializable.h:39
static unsigned int const min_first_strip_
unsigned int getStrip(unsigned int channel) const
bool hasStrip(unsigned int strip) const
int getSlope() const
std::uint32_t rpc_det_id_
RPCFebConnector & setChannels(std::uint16_t channels)
std::uint16_t getChannels() const
RPCFebConnector & setRPCDetId(RPCDetId const &rpc_det_id)
std::ostream & operator<<(std::ostream &ostream, RPCFebConnector const &connector)
unsigned int getNChannels() const
static unsigned int const nchannels_
std::uint8_t first_strip_
strip, allowing range [1-128]