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 <stdint.h>
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(::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  , ::uint16_t _channels = 0x0);
26 
27  void reset();
28 
29  RPCDetId getRPCDetId() const;
30  unsigned int getFirstStrip() const;
31  int getSlope() const;
32  ::uint16_t getChannels() const;
33 
34  RPCFebConnector & setRPCDetId(RPCDetId const & _rpc_det_id);
35  RPCFebConnector & setFirstStrip(unsigned int _strip);
36  RPCFebConnector & setSlope(int _slope);
37  RPCFebConnector & setChannels(::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  ::uint8_t first_strip_;
50  ::int8_t slope_;
51  ::uint16_t channels_;
52 
53  ::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
::uint16_t getChannels() const
unsigned int getNChannels() const
RPCFebConnector & setRPCDetId(RPCDetId const &_rpc_det_id)
static unsigned int const max_first_strip_
::int8_t slope_
-1 or 1
std::ostream & operator<<(std::ostream &_ostream, RPCFebConnector const &_connector)
::uint32_t rpc_det_id_
unsigned int getFirstStrip() const
bool hasStrip(unsigned int _strip) const
unsigned int getChannel(unsigned int _strip) const
RPCFebConnector(RPCDetId const &_rpc_det_id=RPCDetId(0, 0, 1, 1, 1, 1, 0), unsigned int _first_strip=1, int _slope=1,::uint16_t _channels=0x0)
::uint8_t first_strip_
strip, allowing range [1-128]
bool isActive(unsigned int _channel) const
RPCFebConnector & setSlope(int _slope)
int getSlope() const
#define COND_SERIALIZABLE
Definition: Serializable.h:38
static unsigned int const min_first_strip_
::uint16_t channels_
active channels in range [1-16]
unsigned int getStrip(unsigned int _channel) const
RPCFebConnector & setFirstStrip(unsigned int _strip)
RPCFebConnector & setChannels(::uint16_t _channels)
static unsigned int bit_count(::uint16_t)
RPCDetId getRPCDetId() const
static unsigned int const nchannels_
std::string getString() const