CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OnlineBeamMonitor.h
Go to the documentation of this file.
1 #ifndef DQM_BeamMonitor_OnlineBeamMonitor_h
2 #define DQM_BeamMonitor_OnlineBeamMonitor_h
3 
8 // C++
9 #include <map>
10 #include <vector>
11 #include <string>
12 // CMS
26 
27 namespace onlinebeammonitor {
28  struct NoCache {};
29 } // namespace onlinebeammonitor
30 
31 class OnlineBeamMonitor : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<onlinebeammonitor::NoCache>> {
32 public:
35 
36 protected:
37  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
38  std::shared_ptr<onlinebeammonitor::NoCache> globalBeginLuminosityBlock(const edm::LuminosityBlock& iLumi,
39  const edm::EventSetup& iSetup) const override;
40  void globalEndLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& iSetup) override;
41  void dqmEndRun(edm::Run const&, edm::EventSetup const&) override;
42 
43 private:
44  //Typedefs
45  // BF,BS...
46  typedef std::map<std::string, reco::BeamSpot> BeamSpotContainer;
47  // x,y,z,sigmax(y,z)... [run,lumi] Histo name
48  typedef std::map<std::string, std::map<std::string, std::map<std::string, MonitorElement*>>> HistosContainer;
49  // x,y,z,sigmax(y,z)... [run,lumi] Histo name
50  typedef std::map<std::string, std::map<std::string, std::map<std::string, int>>> PositionContainer;
51 
52  //Parameters
57 
58  //Service variables
61  mutable std::vector<int> processedLumis_;
62  // MonitorElements:
64 
65  //Containers
69  std::vector<std::string> varNamesV_; //x,y,z,sigmax(y,z)
70  std::multimap<std::string, std::string> histoByCategoryNames_; //run, lumi
71 };
72 
73 #endif
std::map< std::string, std::map< std::string, std::map< std::string, MonitorElement * > > > HistosContainer
std::multimap< std::string, std::string > histoByCategoryNames_
edm::ESGetToken< BeamSpotOnlineObjects, BeamSpotOnlineLegacyObjectsRcd > bsLegacyToken_
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
BeamSpotContainer beamSpotsMap_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< std::string > varNamesV_
OnlineBeamMonitor(const edm::ParameterSet &)
void globalEndLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
std::vector< int > processedLumis_
std::string monitorName_
std::map< std::string, reco::BeamSpot > BeamSpotContainer
MonitorElement * bsChoice_
edm::ESGetToken< BeamSpotOnlineObjects, BeamSpotOnlineHLTObjectsRcd > bsHLTToken_
static void fillDescriptions(edm::ConfigurationDescriptions &)
HistosContainer histosMap_
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd > bsTransientToken_
PositionContainer positionsMap_
std::shared_ptr< onlinebeammonitor::NoCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) const override
std::map< std::string, std::map< std::string, std::map< std::string, int > > > PositionContainer
Definition: Run.h:45