00001 // -*- C++ -*- 00002 // Package: DQM/SiStripHistoricInfoClient 00003 // Class: HistoricOfflineClient 00009 // Original Author: Dorian Kcira 00010 // Created: Wed Apr 25 05:10:12 CEST 2007 00011 // $Id: HistoricOfflineClient.h,v 1.3 2008/03/02 00:07:41 dutta Exp $ 00012 #include <memory> 00013 #include "FWCore/Framework/interface/Frameworkfwd.h" 00014 #include "FWCore/Framework/interface/EDAnalyzer.h" 00015 #include "FWCore/Framework/interface/Event.h" 00016 #include "FWCore/Framework/interface/Run.h" 00017 #include "FWCore/Framework/interface/MakerMacros.h" 00018 #include "FWCore/ServiceRegistry/interface/Service.h" 00019 #include "CondFormats/SiStripObjects/interface/SiStripPerformanceSummary.h" 00020 #include "DQMServices/Core/interface/DQMStore.h" 00021 #include "DQMServices/Core/interface/MonitorElement.h" 00022 00023 class DQMStore; 00024 class MonitorElement; 00025 00026 namespace edm { 00027 class ParameterSet; 00028 class Event; 00029 class EventId; 00030 class Timestamp; 00031 } 00032 00033 class HistoricOfflineClient : public edm::EDAnalyzer { 00034 public: 00035 explicit HistoricOfflineClient(const edm::ParameterSet&); 00036 ~HistoricOfflineClient(); 00037 private: 00038 virtual void beginJob(const edm::EventSetup&) ; 00039 virtual void beginRun(const edm::Run&, const edm::EventSetup&) ; 00040 virtual void endRun(const edm::Run&, const edm::EventSetup&) ; 00041 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00042 virtual void endJob() ; 00043 void retrievePointersToModuleMEs(const edm::EventSetup&); 00044 void fillSummaryObjects(const edm::Run& run) const; 00045 void writeToDB(edm::EventID evid, edm::Timestamp evtime) const; 00046 void writeToDB(const edm::Run& run) const; 00047 float CalculatePercentOver(MonitorElement * me) const; 00048 private: 00049 int nevents; 00050 bool firstEventInRun; 00051 edm::ParameterSet parameters; 00052 DQMStore* dqmStore_; 00053 std::map<uint32_t, std::vector<MonitorElement *> > ClientPointersToModuleMEs; 00054 SiStripPerformanceSummary* pSummary_; 00055 }; 00056