CMS 3D CMS Logo

RPCAMCLinkCounters.h
Go to the documentation of this file.
1 #ifndef DataFormats_RPCDigi_RPCAMCLinkCounters_h
2 #define DataFormats_RPCDigi_RPCAMCLinkCounters_h
3 
4 #include <cstdint>
5 #include <map>
6 #include <string>
7 
9 
11 {
12 public:
13  typedef std::map<std::pair<unsigned int, std::uint32_t>, unsigned int > map_type;
14  typedef map_type::iterator iterator;
15  typedef map_type::const_iterator const_iterator;
16 
17  // from FED CDF Header and Trailer
18  static unsigned int const fed_event_ = 0;
19  static unsigned int const fed_header_check_fail_ = 1;
20  static unsigned int const fed_header_id_mismatch_ = 2;
21  static unsigned int const fed_trailer_check_fail_ = 3;
22  static unsigned int const fed_trailer_length_mismatch_ = 4;
23  static unsigned int const fed_trailer_crc_mismatch_ = 5;
24  // from FED Block Header
25  static unsigned int const fed_block_length_invalid_ = 6;
26  // from FED Block Content
27  static unsigned int const fed_block_amc_number_invalid_ = 7;
28 
29  static unsigned int const amc_evc_bc_invalid_ = 101;
30  static unsigned int const amc_payload_length_invalid_ = 102;
31  // from TwinMux Playload Header
32  static unsigned int const amc_number_mismatch_ = 103;
33 
34  // from RPC Record
35  static unsigned int const amc_link_invalid_ = 104;
36  static unsigned int const amc_data_ = 100;
37 
38  static unsigned int const input_data_ = 200;
39  static unsigned int const input_link_error_ = 201;
40  static unsigned int const input_link_ack_fail_ = 202;
41  static unsigned int const input_eod_ = 203;
42  static unsigned int const input_lb_invalid_ = 204;
43  static unsigned int const input_connector_invalid_ = 205;
44  static unsigned int const input_connector_not_used_ = 206;
45  // static unsigned int const input_bc_mismatch_ = 207;
46  // static unsigned int const input_bc0_mismatch_ = 208;
47 
48  static unsigned int const fed_min_ = 0;
49  static unsigned int const fed_max_ = 7;
50  static unsigned int const amc_min_ = 100;
51  static unsigned int const amc_max_ = 104;
52  static unsigned int const input_min_ = 200;
53  static unsigned int const input_max_ = 206;
54 
55  static std::string getTypeName(unsigned int type);
56 
57 public:
59 
60  void add(unsigned int type, RPCAMCLink const & link, unsigned int count = 1);
61  void reset();
62  void reset(unsigned int type);
63  void reset(unsigned int type, RPCAMCLink const & link);
64 
65  std::pair<const_iterator, const_iterator> getCounters() const;
66  std::pair<const_iterator, const_iterator> getCounters(unsigned int type) const;
67  std::pair<const_iterator, const_iterator> getCounters(unsigned int lower_type, unsigned int upper_type) const;
68 
69 protected:
70  map_type type_link_count_;
71 };
72 
73 #include "DataFormats/RPCDigi/interface/RPCAMCLinkCounters.icc"
74 
75 #endif // DataFormats_RPCDigi_RPCAMCLinkCounters_h
type
Definition: HCALResponse.h:21
static unsigned int const amc_max_
static unsigned int const amc_link_invalid_
static unsigned int const fed_header_check_fail_
static unsigned int const fed_event_
static std::string getTypeName(unsigned int type)
static unsigned int const input_link_ack_fail_
static unsigned int const input_connector_invalid_
static unsigned int const fed_trailer_length_mismatch_
static unsigned int const input_data_
static unsigned int const input_link_error_
static unsigned int const fed_trailer_crc_mismatch_
static unsigned int const amc_evc_bc_invalid_
static unsigned int const fed_block_amc_number_invalid_
static unsigned int const fed_header_id_mismatch_
static unsigned int const amc_payload_length_invalid_
static unsigned int const fed_block_length_invalid_
static unsigned int const amc_min_
map_type::iterator iterator
static unsigned int const fed_trailer_check_fail_
static unsigned int const input_max_
static unsigned int const input_eod_
static unsigned int const fed_min_
static unsigned int const amc_data_
std::map< std::pair< unsigned int, std::uint32_t >, unsigned int > map_type
static unsigned int const amc_number_mismatch_
static unsigned int const input_min_
void add(unsigned int type, RPCAMCLink const &link, unsigned int count=1)
map_type::const_iterator const_iterator
static unsigned int const fed_max_
static unsigned int const input_connector_not_used_
std::pair< const_iterator, const_iterator > getCounters() const
static unsigned int const input_lb_invalid_