Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:54:01

0001 /*
0002  * =====================================================================================
0003  *
0004  *       Filename:  CSCOfflineClient.h
0005  *
0006  *    Description:  CSC Offline module that preocess merged histograms and
0007  *    creates/updates fractional and efficiency objects.
0008  *
0009  *        Version:  1.0
0010  *        Created:  09/20/2009 01:36:45 PM
0011  *       Revision:  none
0012  *       Compiler:  gcc
0013  *
0014  *         Author:  Valdas Rapsevicius (VR), valdas.rapsevicius@cern.ch
0015  *        Company:  CERN, CH
0016  *
0017  * =====================================================================================
0018  */
0019 
0020 #ifndef CSCOfflineClient_H
0021 #define CSCOfflineClient_H
0022 
0023 /// Global stuff
0024 #include <iostream>
0025 #include <cstring>
0026 #include <vector>
0027 #include <map>
0028 #include <set>
0029 
0030 /// DQM Framework stuff
0031 // #include <FWCore/Framework/interface/EDAnalyzer.h>
0032 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0033 
0034 #include <DQMServices/Core/interface/DQMStore.h>
0035 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0036 
0037 #include <FWCore/ServiceRegistry/interface/Service.h>
0038 #include <FWCore/Framework/interface/ESHandle.h>
0039 #include <FWCore/Framework/interface/EventSetup.h>
0040 
0041 /// CSC Framework stuff
0042 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0043 #include "CondFormats/CSCObjects/interface/CSCCrateMap.h"
0044 #include "CondFormats/DataRecord/interface/CSCCrateMapRcd.h"
0045 
0046 /// CSCDQM Framework stuff
0047 #include "CSCDQM_Logger.h"
0048 #include "CSCDQM_Configuration.h"
0049 #include "CSCDQM_Dispatcher.h"
0050 #include "CSCMonitorModule.h"
0051 
0052 /// Local stuff
0053 #include "CSCMonitorObject.h"
0054 
0055 /// Local Constants
0056 //static const char DIR_EVENTINFO[]        = "CSC/EventInfo/";
0057 //static const char DIR_DCSINFO[]          = "CSC/EventInfo/DCSContents/";
0058 //static const char DIR_DAQINFO[]          = "CSC/EventInfo/DAQContents/";
0059 //static const char DIR_CRTINFO[]          = "CSC/EventInfo/CertificationContents/";
0060 
0061 /**
0062  * @class CSCOfflineClient
0063  * @brief CSC Offline DQM Client that uses CSCDQM Framework 
0064  */
0065 class CSCOfflineClient : public DQMEDHarvester, public cscdqm::MonitorObjectProvider {
0066   /**
0067    * Global stuff
0068    */
0069 
0070 public:
0071   CSCOfflineClient(const edm::ParameterSet &ps);
0072   ~CSCOfflineClient() override;
0073 
0074 private:
0075   cscdqm::Configuration config;
0076   cscdqm::Dispatcher *dispatcher;
0077   // DQMStore                 *dbe;
0078   DQMStore::IBooker *ibooker;
0079   std::vector<std::string> maskedHW;
0080 
0081   /**
0082    * MonitorObjectProvider Implementation
0083    */
0084 
0085 public:
0086   bool getCSCDetId(const unsigned int crateId, const unsigned int dmbId, CSCDetId &detId) const override {
0087     return false;
0088   }
0089   cscdqm::MonitorObject *bookMonitorObject(const cscdqm::HistoBookRequest &p_req) override;
0090 
0091   /** 
0092    * EDAnalyzer Implementation
0093    */
0094 
0095 protected:
0096   // void beginJob() { }
0097   // void beginRun(const edm::Run& r, const edm::EventSetup& c) { }
0098   void setup() {}
0099   //void analyze(const edm::Event& e, const edm::EventSetup& c) { }
0100   // void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) { }
0101   // void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) { }
0102   // void endRun(const edm::Run& r, const edm::EventSetup& c);
0103   // void endJob() { }
0104   void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;  //performed in the endJob
0105 };
0106 
0107 #endif