Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-15 23:33:54

0001 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0002 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0003 #include "FWCore/ServiceRegistry/interface/Service.h"
0004 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
0005 
0006 #include <vector>
0007 #include <sstream>
0008 #include <string>
0009 
0010 #include <boost/serialization/vector.hpp>
0011 
0012 typedef std::vector<int> Payload;
0013 
0014 class writeInt : public edm::one::EDAnalyzer<> {
0015 public:
0016   explicit writeInt(const edm::ParameterSet& iConfig);
0017   virtual void analyze(const edm::Event&, const edm::EventSetup&) {}
0018   virtual void endJob();
0019 
0020 private:
0021   std::string cont;
0022   int me;
0023 };
0024 
0025 void writeInt::endJob() {
0026   edm::Service<cond::service::PoolDBOutputService> outdb;
0027 
0028   outdb->writeOneIOV(std::vector<int>(1, me), me, cont);
0029 }
0030 
0031 writeInt::writeInt(const edm::ParameterSet& iConfig) : cont("oneInt"), me(iConfig.getParameter<int>("Number")) {}
0032 
0033 #include "FWCore/Framework/interface/MakerMacros.h"
0034 DEFINE_FWK_MODULE(writeInt);