Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:30

0001 
0002 #ifndef DQM_SiStripCommissioningClients_SiStripCommissioningOfflineClient_H
0003 #define DQM_SiStripCommissioningClients_SiStripCommissioningOfflineClient_H
0004 
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include "DQM/SiStripCommissioningClients/interface/SiStripTFile.h"
0007 #include "DQM/SiStripCommissioningClients/interface/SummaryPlotXmlParser.h"
0008 #include "DQM/SiStripCommissioningSummary/interface/SummaryPlot.h"
0009 #include "FWCore/Framework/interface/EDAnalyzer.h"
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 #include <string>
0015 #include <vector>
0016 #include <map>
0017 
0018 class CommissioningHistograms;
0019 class TH1;
0020 
0021 /**
0022    @class SiStripCommissioningOfflineClient 
0023    @author M.Wingham, R.Bainbridge
0024    
0025    @brief Class which reads a root file containing "commissioning
0026    histograms", analyzes the histograms to extract "monitorables", and
0027    creates summary histograms.
0028 */
0029 class SiStripCommissioningOfflineClient : public edm::EDAnalyzer {
0030 public:
0031   typedef dqm::harvesting::MonitorElement MonitorElement;
0032   typedef dqm::harvesting::DQMStore DQMStore;
0033 
0034   SiStripCommissioningOfflineClient(const edm::ParameterSet&);
0035   ~SiStripCommissioningOfflineClient() override;
0036 
0037   void beginRun(const edm::Run&, const edm::EventSetup&) override;
0038   void analyze(const edm::Event&, const edm::EventSetup&) override;
0039   void endJob() override;
0040 
0041 protected:
0042   virtual void createHistos(const edm::ParameterSet&, const edm::EventSetup&);
0043   virtual void uploadToConfigDb() { ; }
0044   virtual void setInputFiles(std::vector<std::string>&, const std::string, const std::string, uint32_t, bool);
0045 
0046 protected:
0047   /** DQMStore object. */
0048   DQMStore* bei_;
0049 
0050   /** Action "executor" */
0051   CommissioningHistograms* histos_;
0052 
0053   /** Input .root file. */
0054   std::vector<std::string> inputFiles_;
0055 
0056   /** Output .root file. */
0057   std::string outputFileName_;
0058 
0059   /** */
0060   bool collateHistos_;
0061 
0062   /** */
0063   bool analyzeHistos_;
0064 
0065   /** Input .xml file. */
0066   std::string xmlFile_;
0067 
0068   /** Flag. */
0069   bool createSummaryPlots_;
0070 
0071   /** */
0072   bool clientHistos_;
0073 
0074   /** */
0075   bool uploadToDb_;
0076 
0077   /** Commissioning runType. */
0078   sistrip::RunType runType_;
0079 
0080   /** Run number. */
0081   uint32_t runNumber_;
0082 
0083   /** Partition Name */
0084   std::string partitionName_;
0085 
0086   /** */
0087   typedef std::vector<TH1*> Histos;
0088 
0089   /** */
0090   typedef std::map<uint32_t, Histos> HistosMap;
0091 
0092   /** Map containing commissioning histograms. */
0093   HistosMap map_;
0094 
0095   /** SummaryPlot objects. */
0096   std::vector<SummaryPlot> plots_;
0097 
0098   /** */
0099   edm::ParameterSet parameters_;
0100 };
0101 
0102 #endif  // DQM_SiStripCommissioningClients_SiStripCommissioningOfflineClient_H