CMS 3D CMS Logo

CSCDQM_EventProcessor.cc

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *       Filename:  EventProcessor.cc
00005  *
00006  *    Description:  EventProcessor Object
00007  *
00008  *        Version:  1.0
00009  *        Created:  10/03/2008 10:47:11 AM
00010  *       Revision:  none
00011  *       Compiler:  gcc
00012  *
00013  *         Author:  Valdas Rapsevicius (VR), Valdas.Rapsevicius@cern.ch
00014  *        Company:  CERN, CH
00015  *
00016  * =====================================================================================
00017  */
00018 
00019 #include "DQM/CSCMonitorModule/interface/CSCDQM_EventProcessor.h"
00020 
00021 namespace cscdqm {
00022 
00023 
00024   EventProcessor::EventProcessor(Configuration* const p_config) {
00025 
00026     config = p_config;
00027     fFirstEvent = true;
00028     fCloseL1As = true;
00029 
00030   }
00031 
00032   void EventProcessor::init() {
00033 
00034     binChecker.crcALCT(config->getBINCHECKER_CRC_ALCT());
00035     binChecker.crcTMB(config->getBINCHECKER_CRC_CLCT());
00036     binChecker.crcCFEB(config->getBINCHECKER_CRC_CFEB());
00037     binChecker.modeDDU(config->getBINCHECKER_MODE_DDU());
00038 
00039     if (config->getBINCHECKER_OUTPUT()) {
00040       binChecker.output1().show();
00041       binChecker.output2().show();
00042     } else {
00043       binChecker.output1().hide();
00044       binChecker.output2().hide();
00045     }
00046 
00047   }
00048 
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 
00056 
00057   const bool EventProcessor::getDDUHisto(const HistoId& histo, const HwId& dduID, MonitorObject*& me) {
00058     if (config->fnGetCacheDDUHisto(histo, dduID, me)) return (me != NULL);
00059     DDUHistoDef histoD(histo, dduID);
00060     if (config->fnGetHisto(histoD, me)) return (me != NULL);
00061     return false;
00062   }
00063 
00064 
00065   const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, MonitorObject*& me) {
00066     if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, 0, me)) return (me != NULL);
00067     CSCHistoDef histoD(histo, crateID, dmbSlot);
00068     if (config->fnGetHisto(histoD, me)) return (me != NULL);
00069     return false;
00070   }
00071 
00072 
00073   const bool EventProcessor::getCSCHisto(const HistoId& histo, const HwId& crateID, const HwId& dmbSlot, const HwId& adId, MonitorObject*& me) {
00074     if (config->fnGetCacheCSCHisto(histo, crateID, dmbSlot, adId, me)) return (me != NULL);
00075     CSCHistoDef histoD(histo, crateID, dmbSlot, adId);
00076     if (config->fnGetHisto(histoD, me)) return (me != NULL);
00077     return false;
00078   }
00079 
00080 
00081   const bool EventProcessor::getParHisto(const HistoId& histo, MonitorObject*& me) {
00082     if (config->fnGetCacheParHisto(histo, me)) return (me != NULL);
00083     ParHistoDef histoD(histo);
00084     if (config->fnGetHisto(histoD, me)) return (me != NULL);
00085     return false;
00086   }
00087 
00088   const bool EventProcessor::getCSCFromMap(const unsigned int& crateId, const unsigned int& dmbId, unsigned int& cscType, unsigned int& cscPosition) const {
00089 
00090     if (crateId < 1 || crateId > 60 || dmbId < 1 || dmbId > 10) return false;
00091 
00092     CSCDetId cid = config->fnGetCSCDetId(crateId, dmbId);
00093     cscPosition  = cid.chamber();
00094     int iring    = cid.ring();
00095     int istation = cid.station();
00096     int iendcap  = cid.endcap();
00097     std::string tlabel = cscdqm::Utility::getCSCTypeLabel(iendcap, istation, iring);
00098     cscType = cscdqm::Utility::getCSCTypeBin(tlabel);
00099 
00100     return true;
00101 
00102   }
00103 
00104 }

Generated on Tue Jun 9 17:32:33 2009 for CMSSW by  doxygen 1.5.4