Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:16

0001 #include "EventFilter/RPCRawToDigi/interface/RPCAMCLinkEvents.h"
0002 
0003 RPCAMCLinkEvents::RPCAMCLinkEvents() {}
0004 
0005 std::string RPCAMCLinkEvents::getEventName(unsigned int id) {
0006   constexpr auto mask = RPCAMCLinkEvent::event_mask_ | RPCAMCLinkEvent::group_mask_;
0007 
0008   switch (id & mask) {
0009       // from FED CDF Header and Trailer
0010     case (fed_event_ & mask):
0011       return std::string("FED Event");
0012       break;
0013     case (fed_header_check_fail_ & mask):
0014       return std::string("Header check fail");
0015       break;
0016     case (fed_header_id_mismatch_ & mask):
0017       return std::string("Header FED ID mismatch");
0018       break;
0019     case (fed_trailer_check_fail_ & mask):
0020       return std::string("Trailer check fail");
0021       break;
0022     case (fed_trailer_length_mismatch_ & mask):
0023       return std::string("Trailer length mismatch");
0024       break;
0025     case (fed_trailer_crc_mismatch_ & mask):
0026       return std::string("Trailer CRC mismatch");
0027       break;
0028       // from AMC13 Header
0029     case (fed_amc13_block_incomplete_ & mask):
0030       return std::string("Incomplete AMC13 data");
0031       break;
0032       // from AMC13 AMC Header
0033     case (fed_amc13_amc_number_invalid_ & mask):
0034       return std::string("Invalid AMC number");
0035       break;
0036     case (amc_amc13_block_incomplete_ & mask):
0037       return std::string("Incomplete AMC13 data");
0038       break;
0039 
0040     case (amc_event_ & mask):
0041       return std::string("AMC Event");
0042       break;
0043     case (amc_amc13_evc_bc_invalid_ & mask):
0044       return std::string("AMC EvC or BC invalid");
0045       break;
0046     case (amc_amc13_length_incorrect_ & mask):
0047       return std::string("AMC incorrect block length");
0048       break;
0049     case (amc_amc13_crc_mismatch_ & mask):
0050       return std::string("AMC CRC mismatch");
0051       break;
0052     case (amc_amc13_size_inconsistent_ & mask):
0053       return std::string("AMC payload size inconsistent");
0054       break;
0055     case (amc_payload_incomplete_ & mask):
0056       return std::string("Incomplete AMC payload");
0057       break;
0058       // from AMC Payload Header
0059     case (amc_number_mismatch_ & mask):
0060       return std::string("AMC number mismatch");
0061       break;
0062     case (amc_size_mismatch_ & mask):
0063       return std::string("AMC size mismatch");
0064       break;
0065       // from RPC Record
0066     case (amc_link_invalid_ & mask):
0067       return std::string("Invalid Link");
0068       break;
0069 
0070     case (input_event_ & mask):
0071       return std::string("Input Event");
0072       break;
0073     case (input_link_error_ & mask):
0074       return std::string("Link error");
0075       break;
0076     case (input_link_ack_fail_ & mask):
0077       return std::string("Link ack fail");
0078       break;
0079     case (input_eod_ & mask):
0080       return std::string("EOD");
0081       break;
0082     case (input_lb_invalid_ & mask):
0083       return std::string("Invalid LB");
0084       break;
0085     case (input_connector_invalid_ & mask):
0086       return std::string("Invalid Connector");
0087       break;
0088     case (input_connector_not_used_ & mask):
0089       return std::string("Connector not used");
0090       break;
0091       /*
0092           case ((input_bc_mismatch_ & mask):
0093           return std::string("BC Mismatch"); break;
0094           case ((input_bc0_mismatch_ & mask):
0095           return std::string("BC0 Mismatch"); break;
0096         */
0097 
0098     default:
0099       return std::string("unknown");
0100       break;
0101   }
0102 }