Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:36

0001 #include "Mixing2DB.h"
0002 #include "FWCore/ServiceRegistry/interface/Service.h"
0003 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
0004 #include "CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h"
0005 
0006 #include "CondFormats/RunInfo/interface/MixingModuleConfig.h"
0007 
0008 //
0009 // constants, enums and typedefs
0010 //
0011 
0012 //
0013 // static data member definitions
0014 //
0015 
0016 //
0017 // constructors and destructor
0018 //
0019 Mixing2DB::Mixing2DB(const edm::ParameterSet& iConfig) {
0020   //cfi_=iConfig.getParameter<edm::ParameterSet>("input");
0021   cfi_ = iConfig;
0022 }
0023 
0024 Mixing2DB::~Mixing2DB() {
0025   // do anything here that needs to be done at desctruction time
0026   // (e.g. close files, deallocate resources etc.)
0027 }
0028 
0029 //
0030 // member functions
0031 //
0032 
0033 // ------------ method called for each event  ------------
0034 void Mixing2DB::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {}
0035 
0036 // ------------ method called once each job just before starting event loop  ------------
0037 void Mixing2DB::beginJob() {}
0038 
0039 // ------------ method fills 'descriptions' with the allowed parameters for the module  ------------
0040 void Mixing2DB::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0041   //The following says we do not know what parameters are allowed so do no validation
0042   // Please change this to state exactly what you do use, even if it is no parameters
0043   edm::ParameterSetDescription desc;
0044   desc.setUnknown();
0045   descriptions.addDefault(desc);
0046 }
0047 
0048 // ------------ method called once each job just after ending the event loop  ------------
0049 void Mixing2DB::endJob() {
0050   edm::Service<cond::service::PoolDBOutputService> poolDbService;
0051   MixingModuleConfig config;
0052   config.read(cfi_);
0053   poolDbService->writeOneIOV(config, poolDbService->currentTime(), "MixingRcd");
0054 }