CMS 3D CMS Logo

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
OnlineBeamMonitor::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: OnlineBeamMonitor.cc:74
OnlineBeamMonitor::varNamesV_
std::vector< std::string > varNamesV_
Definition: OnlineBeamMonitor.h:69
OnlineBeamMonitor::bsChoice_
MonitorElement * bsChoice_
Definition: OnlineBeamMonitor.h:63
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
OnlineBeamMonitor::processedLumis_
std::vector< int > processedLumis_
Definition: OnlineBeamMonitor.h:61
edm::Run
Definition: Run.h:45
OnlineBeamMonitor::histosMap_
HistosContainer histosMap_
Definition: OnlineBeamMonitor.h:67
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
OnlineBeamMonitor::positionsMap_
PositionContainer positionsMap_
Definition: OnlineBeamMonitor.h:68
OnlineBeamMonitor::histoByCategoryNames_
std::multimap< std::string, std::string > histoByCategoryNames_
Definition: OnlineBeamMonitor.h:70
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
BeamSpotOnlineLegacyObjectsRcd.h
ESGetToken.h
LuminosityBlockID.h
DQMOneEDAnalyzer.h
BeamSpotObjects.h
onlinebeammonitor
Definition: OnlineBeamMonitor.h:27
OnlineBeamMonitor::monitorName_
std::string monitorName_
Definition: OnlineBeamMonitor.h:53
BeamSpot.h
OnlineBeamMonitor::bsTransientToken_
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd > bsTransientToken_
Definition: OnlineBeamMonitor.h:54
OnlineBeamMonitor::bsHLTToken_
edm::ESGetToken< BeamSpotOnlineObjects, BeamSpotOnlineHLTObjectsRcd > bsHLTToken_
Definition: OnlineBeamMonitor.h:55
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
OnlineBeamMonitor::BeamSpotContainer
std::map< std::string, reco::BeamSpot > BeamSpotContainer
Definition: OnlineBeamMonitor.h:46
OnlineBeamMonitor::dqmEndRun
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
Definition: OnlineBeamMonitor.cc:307
BeamSpotTransientObjectsRcd.h
OnlineBeamMonitor::PositionContainer
std::map< std::string, std::map< std::string, std::map< std::string, int > > > PositionContainer
Definition: OnlineBeamMonitor.h:50
OnlineBeamMonitor::beamSpotsMap_
BeamSpotContainer beamSpotsMap_
Definition: OnlineBeamMonitor.h:66
OnlineBeamMonitor::globalBeginLuminosityBlock
std::shared_ptr< onlinebeammonitor::NoCache > globalBeginLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) const override
Definition: OnlineBeamMonitor.cc:122
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd >
OnlineBeamMonitor::numberOfProcessedLumis_
int numberOfProcessedLumis_
Definition: OnlineBeamMonitor.h:60
OnlineBeamMonitor::bsLegacyToken_
edm::ESGetToken< BeamSpotOnlineObjects, BeamSpotOnlineLegacyObjectsRcd > bsLegacyToken_
Definition: OnlineBeamMonitor.h:56
BeamSpotOnlineHLTObjectsRcd.h
OnlineBeamMonitor::OnlineBeamMonitor
OnlineBeamMonitor(const edm::ParameterSet &)
Definition: OnlineBeamMonitor.cc:30
Frameworkfwd.h
OnlineBeamMonitor::numberOfValuesToSave_
int numberOfValuesToSave_
Definition: OnlineBeamMonitor.h:59
OnlineBeamMonitor::HistosContainer
std::map< std::string, std::map< std::string, std::map< std::string, MonitorElement * > > > HistosContainer
Definition: OnlineBeamMonitor.h:48
dqm::implementation::IBooker
Definition: DQMStore.h:43
OnlineBeamMonitor::globalEndLuminosityBlock
void globalEndLuminosityBlock(const edm::LuminosityBlock &iLumi, const edm::EventSetup &iSetup) override
Definition: OnlineBeamMonitor.cc:234
BeamSpotOnlineObjects.h
ParameterSet.h
OnlineBeamMonitor
Definition: OnlineBeamMonitor.h:31
onlinebeammonitor::NoCache
Definition: OnlineBeamMonitor.h:28
OnlineBeamMonitor::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: OnlineBeamMonitor.cc:67