CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
RPCAMCLinkCounters Class Reference

#include <RPCAMCLinkCounters.h>

Public Types

typedef map_type::const_iterator const_iterator
 
typedef map_type::iterator iterator
 
typedef std::map< std::pair< unsigned int, std::uint32_t >, unsigned int > map_type
 

Public Member Functions

void add (unsigned int type, RPCAMCLink const &link, unsigned int count=1)
 
std::pair< const_iterator, const_iteratorgetCounters () const
 
std::pair< const_iterator, const_iteratorgetCounters (unsigned int type) const
 
std::pair< const_iterator, const_iteratorgetCounters (unsigned int lower_type, unsigned int upper_type) const
 
void reset ()
 
void reset (unsigned int type)
 
void reset (unsigned int type, RPCAMCLink const &link)
 
 RPCAMCLinkCounters ()
 

Static Public Member Functions

static std::string getTypeName (unsigned int type)
 

Static Public Attributes

static unsigned int const amc_data_ = 100
 
static unsigned int const amc_evc_bc_invalid_ = 101
 
static unsigned int const amc_link_invalid_ = 104
 
static unsigned int const amc_max_ = 104
 
static unsigned int const amc_min_ = 100
 
static unsigned int const amc_number_mismatch_ = 103
 
static unsigned int const amc_payload_length_invalid_ = 102
 
static unsigned int const fed_block_amc_number_invalid_ = 7
 
static unsigned int const fed_block_length_invalid_ = 6
 
static unsigned int const fed_event_ = 0
 
static unsigned int const fed_header_check_fail_ = 1
 
static unsigned int const fed_header_id_mismatch_ = 2
 
static unsigned int const fed_max_ = 7
 
static unsigned int const fed_min_ = 0
 
static unsigned int const fed_trailer_check_fail_ = 3
 
static unsigned int const fed_trailer_crc_mismatch_ = 5
 
static unsigned int const fed_trailer_length_mismatch_ = 4
 
static unsigned int const input_connector_invalid_ = 205
 
static unsigned int const input_connector_not_used_ = 206
 
static unsigned int const input_data_ = 200
 
static unsigned int const input_eod_ = 203
 
static unsigned int const input_lb_invalid_ = 204
 
static unsigned int const input_link_ack_fail_ = 202
 
static unsigned int const input_link_error_ = 201
 
static unsigned int const input_max_ = 206
 
static unsigned int const input_min_ = 200
 

Protected Attributes

map_type type_link_count_
 

Detailed Description

Definition at line 10 of file RPCAMCLinkCounters.h.

Member Typedef Documentation

typedef map_type::const_iterator RPCAMCLinkCounters::const_iterator

Definition at line 15 of file RPCAMCLinkCounters.h.

typedef map_type::iterator RPCAMCLinkCounters::iterator

Definition at line 14 of file RPCAMCLinkCounters.h.

typedef std::map<std::pair<unsigned int, std::uint32_t>, unsigned int > RPCAMCLinkCounters::map_type

Definition at line 13 of file RPCAMCLinkCounters.h.

Constructor & Destructor Documentation

RPCAMCLinkCounters::RPCAMCLinkCounters ( )

Definition at line 66 of file RPCAMCLinkCounters.cc.

67 {}

Member Function Documentation

void RPCAMCLinkCounters::add ( unsigned int  type,
RPCAMCLink const &  link,
unsigned int  count = 1 
)
std::pair<const_iterator, const_iterator> RPCAMCLinkCounters::getCounters ( ) const
std::pair<const_iterator, const_iterator> RPCAMCLinkCounters::getCounters ( unsigned int  type) const
std::pair<const_iterator, const_iterator> RPCAMCLinkCounters::getCounters ( unsigned int  lower_type,
unsigned int  upper_type 
) const
std::string RPCAMCLinkCounters::getTypeName ( unsigned int  type)
static

Definition at line 3 of file RPCAMCLinkCounters.cc.

References amc_data_, amc_evc_bc_invalid_, amc_link_invalid_, amc_number_mismatch_, amc_payload_length_invalid_, fed_block_amc_number_invalid_, fed_block_length_invalid_, fed_event_, fed_header_check_fail_, fed_header_id_mismatch_, fed_trailer_check_fail_, fed_trailer_crc_mismatch_, fed_trailer_length_mismatch_, input_connector_invalid_, input_connector_not_used_, input_data_, input_eod_, input_lb_invalid_, input_link_ack_fail_, input_link_error_, and AlCaHLTBitMon_QueryRunRegistry::string.

4 {
5  switch (type) {
6  // from FED CDF Header and Trailer
7  case fed_event_:
8  return std::string("Event"); break;
10  return std::string("Header check fail"); break;
12  return std::string("Header FED ID mismatch"); break;
14  return std::string("Trailer check fail"); break;
16  return std::string("Trailer length mismatch"); break;
18  return std::string("Trailer CRC mismatch"); break;
19  // from FED Block Header
21  return std::string("Invalid block length"); break;
22  // from FED Block Content
24  return std::string("Invalid AMC number"); break;
25 
27  return std::string("AMC EvC or BC invalid"); break;
29  return std::string("Invalid payload length"); break;
30  // from TwinMux Playload Header
32  return std::string("AMC number mismatch"); break;
33 
34  // from RPC Record
35  case amc_link_invalid_:
36  return std::string("Invalid Link"); break;
37  case amc_data_:
38  return std::string("Data"); break;
39 
40  case input_data_:
41  return std::string("Data"); break;
42  case input_link_error_:
43  return std::string("Link error"); break;
45  return std::string("Link ack fail"); break;
46  case input_eod_:
47  return std::string("EOD"); break;
48  case input_lb_invalid_:
49  return std::string("Invalid LB"); break;
51  return std::string("Invalid Connector"); break;
53  return std::string("Connector not used"); break;
54  /*
55  case input_bc_mismatch_:
56  return std::string("BC Mismatch"); break;
57  case input_bc0_mismatch_:
58  return std::string("BC0 Mismatch"); break;
59  */
60 
61  default:
62  return std::string("unknown"); break;
63  }
64 }
type
Definition: HCALResponse.h:21
static unsigned int const amc_link_invalid_
static unsigned int const fed_header_check_fail_
static unsigned int const fed_event_
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 fed_trailer_check_fail_
static unsigned int const input_eod_
static unsigned int const amc_data_
static unsigned int const amc_number_mismatch_
static unsigned int const input_connector_not_used_
static unsigned int const input_lb_invalid_
void RPCAMCLinkCounters::reset ( )
void RPCAMCLinkCounters::reset ( unsigned int  type)
void RPCAMCLinkCounters::reset ( unsigned int  type,
RPCAMCLink const &  link 
)

Member Data Documentation

unsigned int const RPCAMCLinkCounters::amc_data_ = 100
static

Definition at line 36 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::amc_evc_bc_invalid_ = 101
static

Definition at line 29 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processBlock().

unsigned int const RPCAMCLinkCounters::amc_link_invalid_ = 104
static

Definition at line 35 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::amc_max_ = 104
static

Definition at line 51 of file RPCAMCLinkCounters.h.

unsigned int const RPCAMCLinkCounters::amc_min_ = 100
static

Definition at line 50 of file RPCAMCLinkCounters.h.

unsigned int const RPCAMCLinkCounters::amc_number_mismatch_ = 103
static

Definition at line 32 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processTwinMux().

unsigned int const RPCAMCLinkCounters::amc_payload_length_invalid_ = 102
static

Definition at line 30 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processTwinMux().

unsigned int const RPCAMCLinkCounters::fed_block_amc_number_invalid_ = 7
static

Definition at line 27 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processTwinMux().

unsigned int const RPCAMCLinkCounters::fed_block_length_invalid_ = 6
static

Definition at line 25 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processBlock().

unsigned int const RPCAMCLinkCounters::fed_event_ = 0
static

Definition at line 18 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::produce().

unsigned int const RPCAMCLinkCounters::fed_header_check_fail_ = 1
static

Definition at line 19 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processCDFHeaders().

unsigned int const RPCAMCLinkCounters::fed_header_id_mismatch_ = 2
static

Definition at line 20 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processCDFHeaders().

unsigned int const RPCAMCLinkCounters::fed_max_ = 7
static

Definition at line 49 of file RPCAMCLinkCounters.h.

unsigned int const RPCAMCLinkCounters::fed_min_ = 0
static

Definition at line 48 of file RPCAMCLinkCounters.h.

unsigned int const RPCAMCLinkCounters::fed_trailer_check_fail_ = 3
static

Definition at line 21 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processCDFTrailers().

unsigned int const RPCAMCLinkCounters::fed_trailer_crc_mismatch_ = 5
static

Definition at line 23 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::produce().

unsigned int const RPCAMCLinkCounters::fed_trailer_length_mismatch_ = 4
static

Definition at line 22 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processCDFTrailers().

unsigned int const RPCAMCLinkCounters::input_connector_invalid_ = 205
static

Definition at line 43 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_connector_not_used_ = 206
static

Definition at line 44 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_data_ = 200
static

Definition at line 38 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_eod_ = 203
static

Definition at line 41 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_lb_invalid_ = 204
static

Definition at line 42 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_link_ack_fail_ = 202
static

Definition at line 40 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_link_error_ = 201
static

Definition at line 39 of file RPCAMCLinkCounters.h.

Referenced by getTypeName(), and RPCTwinMuxRawToDigi::processRPCRecord().

unsigned int const RPCAMCLinkCounters::input_max_ = 206
static

Definition at line 53 of file RPCAMCLinkCounters.h.

unsigned int const RPCAMCLinkCounters::input_min_ = 200
static

Definition at line 52 of file RPCAMCLinkCounters.h.

map_type RPCAMCLinkCounters::type_link_count_
protected

Definition at line 70 of file RPCAMCLinkCounters.h.