00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "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::getFEDHisto(const HistoId& histo, const HwId& fedID, MonitorObject*& me) {
00064 if (config->fnGetCacheFEDHisto(histo, fedID, me)) return (me != NULL);
00065 FEDHistoDef histoD(histo, fedID);
00066 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00067 return false;
00068 }
00069
00077 const bool EventProcessor::getDDUHisto(const HistoId& histo, const HwId& dduID, MonitorObject*& me) {
00078 if (config->fnGetCacheDDUHisto(histo, dduID, me)) return (me != NULL);
00079 DDUHistoDef histoD(histo, dduID);
00080 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00081 return false;
00082 }
00083
00092 const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, MonitorObject*& me) {
00093 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me)) return (me != NULL);
00094 CSCHistoDef histoD(histo, crateID, dmbSlot);
00095 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00096 return false;
00097 }
00098
00109 const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, const HwId& adId, MonitorObject*& me) {
00110 if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me)) return (me != NULL);
00111 CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
00112 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00113 return false;
00114 }
00115
00122 const bool EventProcessor::getParHisto(const HistoId& histo, MonitorObject*& me) {
00123 if (config->fnGetCacheParHisto(histo, me)) return (me != NULL);
00124 ParHistoDef histoD(histo);
00125 if (config->fnGetHisto(histoD, me)) return (me != NULL);
00126 return false;
00127 }
00128
00137 const bool EventProcessor::getCSCFromMap(const unsigned int& crateId, const unsigned int& dmbId, unsigned int& cscType, unsigned int& cscPosition) const {
00138 bool result = false;
00139
00140 CSCDetId cid;
00141 if (config->fnGetCSCDetId(crateId, dmbId, cid)) {
00142 cscPosition = cid.chamber();
00143 int iring = cid.ring();
00144 int istation = cid.station();
00145 int iendcap = cid.endcap();
00146 std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
00147 cscType = cscdqm::Utility::getCSCTypeBin(tlabel);
00148 result = true;
00149 }
00150
00151
00152
00153
00154
00155
00156
00157 return result;
00158
00159 }
00160
00167 unsigned int EventProcessor::maskHWElements(std::vector<std::string>& tokens) {
00168 unsigned int masked = summary.setMaskedHWElements(tokens);
00169 LOG_INFO << masked << " HW Elements masked";
00170 return masked;
00171 }
00172
00173 }