CMS 3D CMS Logo

OnlineBeamSpotFromDB.cc
Go to the documentation of this file.
1 
29 #include <string>
30 
32 public:
33  explicit OnlineBeamSpotFromDB(const edm::ParameterSet& iConfig);
36 
37 private:
38  void analyze(const edm::Event&, const edm::EventSetup&) override;
39 };
40 
43 
45  auto const& mybeamspot = iSetup.getData(bsToken_);
46 
47  edm::LogInfo("Run numver: ") << iEvent.id().run();
48  edm::LogInfo("beamspot from HLT ") << mybeamspot;
49 }
52  desc.addWithDefaultLabel(dsc);
53 }
54 
55 //define this as a plug-in
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
int iEvent
Definition: GenABIO.cc:224
OnlineBeamSpotFromDB(const edm::ParameterSet &iConfig)
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Log< level::Info, false > LogInfo
edm::ESGetToken< BeamSpotObjects, BeamSpotTransientObjectsRcd > bsToken_
static void fillDescriptions(edm::ConfigurationDescriptions &desc)