File indexing completed on 2024-04-06 12:06:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "CSCDQM_EventProcessor.h"
0020
0021 namespace cscdqm {
0022
0023
0024
0025
0026
0027 EventProcessor::EventProcessor(Configuration* const p_config) {
0028 config = p_config;
0029
0030 fCloseL1As = true;
0031 }
0032
0033 #ifdef DQMGLOBAL
0034
0035
0036
0037
0038
0039
0040
0041 EventProcessor::EventProcessor(Configuration* const p_config,
0042 const edm::InputTag& itag,
0043 edm::ConsumesCollector& coco) {
0044 config = p_config;
0045
0046
0047 frdtoken = coco.consumes<FEDRawDataCollection>(itag);
0048
0049
0050 fCloseL1As = true;
0051 }
0052
0053 #endif
0054
0055
0056
0057
0058 void EventProcessor::init() {}
0059
0060
0061
0062
0063
0064
0065
0066 const bool EventProcessor::getEMUHisto(const HistoId& histo, MonitorObject*& me) {
0067 if (config->fnGetCacheEMUHisto(histo, me))
0068 return (me != nullptr);
0069 EMUHistoDef histoD(histo);
0070 if (config->fnGetHisto(histoD, me))
0071 return (me != nullptr);
0072 return false;
0073 }
0074
0075
0076
0077
0078
0079
0080
0081
0082 const bool EventProcessor::getFEDHisto(const HistoId& histo, const HwId& fedID, MonitorObject*& me) {
0083 if (config->fnGetCacheFEDHisto(histo, fedID, me))
0084 return (me != nullptr);
0085 FEDHistoDef histoD(histo, fedID);
0086 if (config->fnGetHisto(histoD, me))
0087 return (me != nullptr);
0088 return false;
0089 }
0090
0091
0092
0093
0094
0095
0096
0097
0098 const bool EventProcessor::getDDUHisto(const HistoId& histo, const HwId& dduID, MonitorObject*& me) {
0099 if (config->fnGetCacheDDUHisto(histo, dduID, me))
0100 return (me != nullptr);
0101 DDUHistoDef histoD(histo, dduID);
0102 if (config->fnGetHisto(histoD, me))
0103 return (me != nullptr);
0104 return false;
0105 }
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 const bool EventProcessor::getCSCHisto(const HistoId& histo,
0116 const HwId& crateID,
0117 const HwId& dmbSlot,
0118 MonitorObject*& me) {
0119 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me))
0120 return (me != nullptr);
0121 CSCHistoDef histoD(histo, crateID, dmbSlot);
0122 if (config->fnGetHisto(histoD, me))
0123 return (me != nullptr);
0124 return false;
0125 }
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137 const bool EventProcessor::getCSCHisto(
0138 const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, const HwId& adId, MonitorObject*& me) {
0139 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me))
0140 return (me != nullptr);
0141 CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
0142 if (config->fnGetHisto(histoD, me))
0143 return (me != nullptr);
0144 return false;
0145 }
0146
0147
0148
0149
0150
0151
0152
0153 const bool EventProcessor::getParHisto(const HistoId& histo, MonitorObject*& me) {
0154 if (config->fnGetCacheParHisto(histo, me))
0155 return (me != nullptr);
0156 ParHistoDef histoD(histo);
0157 if (config->fnGetHisto(histoD, me))
0158 return (me != nullptr);
0159 return false;
0160 }
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170 const bool EventProcessor::getCSCFromMap(const unsigned int& crateId,
0171 const unsigned int& dmbId,
0172 unsigned int& cscType,
0173 unsigned int& cscPosition) const {
0174 bool result = false;
0175
0176 CSCDetId cid;
0177 if (config->fnGetCSCDetId(crateId, dmbId, cid)) {
0178 cscPosition = cid.chamber();
0179 int iring = cid.ring();
0180 int istation = cid.station();
0181 int iendcap = cid.endcap();
0182 std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
0183 cscType = cscdqm::Utility::getCSCTypeBin(tlabel);
0184 result = true;
0185 }
0186
0187
0188
0189
0190
0191
0192
0193 return result;
0194 }
0195
0196
0197
0198
0199
0200
0201
0202 unsigned int EventProcessor::maskHWElements(std::vector<std::string>& tokens) {
0203 unsigned int masked = summary.setMaskedHWElements(tokens);
0204 LOG_INFO << masked << " HW Elements masked";
0205 return masked;
0206 }
0207
0208 }