Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "DQM/CSCMonitorModule/interface/CSCDQM_EventProcessor.h"
00020
00021 namespace cscdqm {
00022
00023
00028 EventProcessor::EventProcessor(Configuration* const p_config) {
00029
00030 config = p_config;
00031
00032 fCloseL1As = true;
00033
00034 }
00035
00039 void EventProcessor::init() {
00040
00041 }
00042
00049 const bool EventProcessor::getEMUHisto(const HistoId& histo, MonitorObject*& me) {
00050 if (config->fnGetCacheEMUHisto(histo, me)) return (me != NULL);
00051 EMUHistoDef histoD(histo);
00052 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00053 return false;
00054 }
00055
00063 const bool EventProcessor::getDDUHisto(const HistoId& histo, const HwId& dduID, MonitorObject*& me) {
00064 if (config->fnGetCacheDDUHisto(histo, dduID, me)) return (me != NULL);
00065 DDUHistoDef histoD(histo, dduID);
00066 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00067 return false;
00068 }
00069
00078 const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, MonitorObject*& me) {
00079 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me)) return (me != NULL);
00080 CSCHistoDef histoD(histo, crateID, dmbSlot);
00081 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00082 return false;
00083 }
00084
00095 const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, const HwId& adId, MonitorObject*& me) {
00096 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me)) return (me != NULL);
00097 CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
00098 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00099 return false;
00100 }
00101
00108 const bool EventProcessor::getParHisto(const HistoId& histo, MonitorObject*& me) {
00109 if (config->fnGetCacheParHisto(histo, me)) return (me != NULL);
00110 ParHistoDef histoD(histo);
00111 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00112 return false;
00113 }
00114
00123 const bool EventProcessor::getCSCFromMap(const unsigned int& crateId, const unsigned int& dmbId, unsigned int& cscType, unsigned int& cscPosition) const {
00124 bool result = false;
00125
00126 CSCDetId cid;
00127 if (config->fnGetCSCDetId(crateId, dmbId, cid)) {
00128 cscPosition = cid.chamber();
00129 int iring = cid.ring();
00130 int istation = cid.station();
00131 int iendcap = cid.endcap();
00132 std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
00133 cscType = cscdqm::Utility::getCSCTypeBin(tlabel);
00134 result = true;
00135 }
00136
00137
00138
00139
00140
00141
00142
00143 return result;
00144
00145 }
00146
00153 unsigned int EventProcessor::maskHWElements(std::vector<std::string>& tokens) {
00154 unsigned int masked = summary.setMaskedHWElements(tokens);
00155 LOG_INFO << masked << " HW Elements masked";
00156 return masked;
00157 }
00158
00159 }