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 {
14 public:
15  static unsigned int const min_first_strip_ = 1;
16  static unsigned int const max_first_strip_ = 128;
17  static unsigned int const nchannels_ = 16;
18 
19  static unsigned int bit_count(std::uint16_t);
20 
21 public:
22  RPCFebConnector(RPCDetId const & rpc_det_id = RPCDetId(0, 0, 1, 1, 1, 1, 0)
23  , unsigned int first_strip = 1
24  , int slope = 1
25  , std::uint16_t channels = 0x0);
26 
27  void reset();
28 
29  RPCDetId getRPCDetId() const;
30  unsigned int getFirstStrip() const;
31  int getSlope() const;
32  std::uint16_t getChannels() const;
33 
34  RPCFebConnector & setRPCDetId(RPCDetId const & rpc_det_id);
35  RPCFebConnector & setFirstStrip(unsigned int strip);
37  RPCFebConnector & setChannels(std::uint16_t channels);
38 
39  bool isActive(unsigned int channel) const;
40  unsigned int getNChannels() const;
41  unsigned int getStrip(unsigned int channel) const;
42 
43  bool hasStrip(unsigned int strip) const;
44  unsigned int getChannel(unsigned int strip) const;
45 
46  std::string getString() const;
47 
48 protected:
49  std::uint8_t first_strip_;
50  ::int8_t slope_;
51  std::uint16_t channels_;
52 
53  std::uint32_t rpc_det_id_;
54 
56 };
57 
58 std::ostream & operator<<(std::ostream & ostream, RPCFebConnector const & connector);
59 
60 #include "CondFormats/RPCObjects/interface/RPCFebConnector.icc"
61 
62 #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)
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:38
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)
std::ostream & operator<<(std::ostream &ostream, RPCFebConnector const &connector)
RPCDetId getRPCDetId() const
static unsigned int const nchannels_
std::string getString() const
std::uint8_t first_strip_
strip, allowing range [1-128]