Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:50

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/one/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
0024     : public edm::one::EDAnalyzer<edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks> {
0025 public:
0026   typedef dqm::legacy::MonitorElement MonitorElement;
0027   typedef dqm::legacy::DQMStore DQMStore;
0028 
0029   AlcaBeamMonitorClient(const edm::ParameterSet&);
0030   ~AlcaBeamMonitorClient() override;
0031 
0032 protected:
0033   void beginJob(void) override;
0034   void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0035   void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0036   void beginLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) override {}
0037   void endLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) override;
0038   void endRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0039 
0040 private:
0041   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name
0042   typedef std::map<std::string, std::map<std::string, std::map<std::string, MonitorElement*> > > HistosContainer;
0043 
0044   //                x,y,z,sigmax(y,z)... [run,lumi]          Histo name
0045   typedef std::map<std::string, std::map<std::string, std::map<std::string, int> > > PositionContainer;
0046 
0047   //Parameters
0048   edm::ParameterSet parameters_;
0049   std::string monitorName_;
0050 
0051   //Service variables
0052   int numberOfValuesToSave_;
0053   DQMStore* dbe_;
0054 
0055   //Containers
0056   HistosContainer histosMap_;
0057   std::vector<std::string> varNamesV_;                            //x,y,z,sigmax(y,z)
0058   std::multimap<std::string, std::string> histoByCategoryNames_;  //run, lumi
0059   std::map<edm::LuminosityBlockNumber_t, std::vector<double> > valuesMap_;
0060   PositionContainer positionsMap_;
0061 };
0062 
0063 #endif