CMS 3D CMS Logo

SiStripBaseCondObjDQM.h

Go to the documentation of this file.
00001 #ifndef SiStripMonitorSummary_SiStripBaseCondObjDQM_h
00002 #define SiStripMonitorSummary_SiStripBaseCondObjDQM_h
00003 
00004 #include "FWCore/Framework/interface/EventSetup.h"
00005 #include "FWCore/Framework/interface/ESHandle.h"
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 #include "FWCore/ServiceRegistry/interface/Service.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 
00010 
00011 
00012 #include "DataFormats/DetId/interface/DetId.h"
00013 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00014 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00015 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00016 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00017 
00018 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
00019 #include "DataFormats/SiStripDetId/interface/SiStripSubStructure.h"
00020 
00021 #include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h"
00022 #include "DQM/SiStripCommon/interface/SiStripHistoId.h"
00023 
00024 #include "DQMServices/Core/interface/DQMStore.h"
00025 #include "DQMServices/Core/interface/MonitorElement.h"
00026 
00027 #include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h"
00028 
00029 #include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"
00030 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
00031 
00032 #include <vector>
00033 #include <map>
00034 #include <string>
00035 
00036 
00037 class SiStripBaseCondObjDQM {
00038 
00039  
00040 
00041   public:
00042   
00043                  
00044 
00045   SiStripBaseCondObjDQM(const edm::EventSetup & eSetup,
00046                         edm::ParameterSet const& hPSet,
00047                         edm::ParameterSet const& fPSet );
00048   
00049   virtual ~SiStripBaseCondObjDQM(){};
00050   
00051   virtual void getActiveDetIds(const edm::EventSetup & eSetup)=0;
00052 
00053     void analysis(const edm::EventSetup & eSetup_);
00054     void analysisOnDemand(const edm::EventSetup & eSetup_, uint32_t detIdOnDemand);
00055     void analysisOnDemand(const edm::EventSetup & eSetup_, std::vector<uint32_t> detIdsOnDemand);
00056     void analysisOnDemand(const edm::EventSetup & eSetup_,
00057                         std::string requestedSubDetector, 
00058                         uint32_t requestedSide, 
00059                         uint32_t requestedLayer);
00060   
00061 
00062     std::vector<uint32_t> getCabledModules();
00063     void selectModules(std::vector<uint32_t> & detIds_);
00064   
00065     virtual void     fillModMEs(const std::vector<uint32_t> & selectedDetIds)=0;
00066     virtual void fillSummaryMEs(const std::vector<uint32_t> & selectedDetIds)=0;
00067     //    virtual void fillTopSummaryMEs()=0;
00068  
00069     virtual unsigned long long getCache(const edm::EventSetup & eSetup_)=0;
00070     virtual void getConditionObject(const edm::EventSetup & eSetup_)=0;
00071       
00072   protected:
00073     
00074     struct ModMEs{ 
00075       MonitorElement* ProfileDistr;
00076       MonitorElement* CumulDistr;
00077       MonitorElement* SummaryOfProfileDistr;
00078       MonitorElement* SummaryOfCumulDistr;
00079       MonitorElement* SummaryDistr;
00080     }; 
00081 
00082 
00083     void getModMEs(ModMEs& CondObj_ME, const uint32_t& detId_);
00084     void getSummaryMEs(ModMEs& CondObj_ME, const uint32_t& detId_);
00085     std::pair<std::string,uint32_t> getLayerNameAndId(const uint32_t& detId_);
00086     std::pair<std::string,uint32_t> getStringNameAndId(const uint32_t& detId_);
00087     std::vector<uint32_t> GetSameLayerDetId(std::vector<uint32_t> activeDetIds, uint32_t selDetId);
00088     
00089     SiStripDetInfoFileReader* reader; 
00090     
00091     const edm::EventSetup& eSetup_;
00092     edm::ParameterSet hPSet_;
00093     edm::ParameterSet fPSet_;
00094     
00095     bool Mod_On_;
00096     bool SummaryOnLayerLevel_On_;
00097     bool SummaryOnStringLevel_On_;
00098     bool GrandSummary_On_;
00099     std::string CondObj_fillId_;
00100     std::string CondObj_name_;
00101      
00102     std::map<uint32_t, ModMEs> ModMEsMap_;
00103     std::map<uint32_t, ModMEs> SummaryMEsMap_;
00104     std::vector<uint32_t> activeDetIds;
00105  
00106     unsigned long long cacheID_memory;
00107     unsigned long long cacheID_current;
00108 
00109 
00110   
00111  private:
00112   
00113     void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_);
00114     void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_);
00115     void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_);
00116     void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_);
00117     void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs& CondObj_ME, const uint32_t& detId_);
00118   
00119     
00120     std::vector<uint32_t> ModulesToBeExcluded_;
00121     std::vector<uint32_t> ModulesToBeIncluded_;
00122     std::vector<std::string> SubDetectorsToBeExcluded_;
00123 
00124     edm::ESHandle<SiStripDetCabling> detCablingHandle_;
00125 
00126     std::string condDataMonitoringMode_;
00127      
00128     SiStripHistoId hidmanager;                        
00129     SiStripFolderOrganizer folder_organizer;         
00130     DQMStore* dqmStore_;
00131 
00132 };
00133 
00134 
00135 #endif

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