28 for (
auto it = input->begin(); it != input->end(); ++it) {
29 for (
auto& siPixelRawDataError : *it) {
30 int fed = siPixelRawDataError.getFedId();
31 int type = siPixelRawDataError.getType();
32 DetId id = it->detId();
35 const uint32_t LINK_bits = 6;
36 const uint32_t LINK_shift = 26;
37 const uint64_t LINK_mask = (1 << LINK_bits) - 1;
42 if (type == 32 || type == 33 || type == 34) {
43 errorWord = siPixelRawDataError.getWord64();
45 errorWord = siPixelRawDataError.getWord32();
48 int32_t chanNmbr = (errorWord >> LINK_shift) & LINK_mask;
50 if (type == 29) chanNmbr = -1;
52 uint32_t error_data = errorWord & 0xFF;
55 for (uint32_t
i = 0;
i < 8;
i++) {
61 uint32_t statemachine_state = errorWord >> 8 & 0xF;
62 const uint32_t tbm_types[16] = {
69 histo[
TBMTYPE].fill(tbm_types[statemachine_state],
id, &iEvent, fed, chanNmbr);
71 for (uint32_t
i = 0;
i < 8;
i++) {
edm::EDGetTokenT< DetSetVector< SiPixelRawDataError > > srcToken_
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static std::string const input
SiPixelPhase1RawData(const edm::ParameterSet &conf)
unsigned long long uint64_t
std::vector< HistogramManager > histo
void analyze(const edm::Event &, const edm::EventSetup &)