Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:20

0001 #ifndef DQM_BeamMonitor_AlcaBeamMonitorClient_h
0002 #define DQM_BeamMonitor_AlcaBeamMonitorClient_h
0003 
0004 /** \class AlcaBeamMonitorClient
0005  * *
0006  *  \author  Lorenzo Uplegger/FNAL
0007  *   
0008  */
0009 // C++
0010 #include <map>
0011 #include <vector>
0012 #include <string>
0013 // CMS
0014 #include "FWCore/Framework/interface/Frameworkfwd.h"
0015 #include "FWCore/Framework/interface/EDAnalyzer.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "DQMServices/Core/interface/DQMStore.h"
0019 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0020 //#include "DataFormats/VertexReco/interface/Vertex.h"
0021 //#include "DataFormats/VertexReco/interface/VertexFwd.h"
0022 
0023 class AlcaBeamMonitorClient : public edm::EDAnalyzer {
0024 public:
0025   typedef dqm::legacy::MonitorElement MonitorElement;
0026   typedef dqm::legacy::DQMStore DQMStore;
0027 
0028   AlcaBeamMonitorClient(const edm::ParameterSet&);
0029   ~AlcaBeamMonitorClient() override;
0030 
0031 protected:
0032   void beginJob(void) override;
0033   void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0034   void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0035   void endLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) override;
0036   void endRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0037 
0038 private:
0039   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name
0040   typedef std::map<std::string, std::map<std::string, std::map<std::string, MonitorElement*> > > HistosContainer;
0041 
0042   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name
0043   typedef std::map<std::string, std::map<std::string, std::map<std::string, int> > > PositionContainer;
0044 
0045   //Parameters
0046   edm::ParameterSet parameters_;
0047   std::string monitorName_;
0048 
0049   //Service variables
0050   int numberOfValuesToSave_;
0051   DQMStore* dbe_;
0052 
0053   //Containers
0054   HistosContainer histosMap_;
0055   std::vector<std::string> varNamesV_;                            //x,y,z,sigmax(y,z)
0056   std::multimap<std::string, std::string> histoByCategoryNames_;  //run, lumi
0057   std::map<edm::LuminosityBlockNumber_t, std::vector<double> > valuesMap_;
0058   PositionContainer positionsMap_;
0059 };
0060 
0061 #endif