CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimMuon/Neutron/plugins/EmptyHepMCProducer.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    SimMuon/Neutron
00004 // Class:      EmptyHepMCProducer
00005 //
00014 //
00015 // Original Author:  Vadim Khotilovich
00016 //         Created:  Mon Aug 09 19:11:42 CST 2010
00017 // $Id: EmptyHepMCProducer.cc,v 1.1 2010/08/20 00:28:11 khotilov Exp $
00018 //
00019 //
00020 
00021 #include "FWCore/Framework/interface/Frameworkfwd.h"
00022 #include "FWCore/Framework/interface/EDProducer.h"
00023 #include "FWCore/Framework/interface/ESHandle.h"
00024 
00025 #include "FWCore/Framework/interface/Event.h"
00026 #include "FWCore/Framework/interface/MakerMacros.h"
00027 
00028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00029 
00030 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00031 
00032 
00033 class EmptyHepMCProducer : public edm::EDProducer
00034 {
00035 public:
00036   explicit EmptyHepMCProducer(const edm::ParameterSet&);
00037   ~EmptyHepMCProducer() {};
00038 
00039 private:
00040   virtual void beginJob();
00041   virtual void produce(edm::Event&, const edm::EventSetup&);
00042   virtual void endJob();
00043 
00044 };
00045 
00046 
00047 
00048 EmptyHepMCProducer::EmptyHepMCProducer(const edm::ParameterSet& iConfig)
00049 {
00050   produces<edm::HepMCProduct>();
00051 }
00052 
00053 void
00054 EmptyHepMCProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
00055 {
00056   // create an empty output collection
00057   std::auto_ptr<edm::HepMCProduct> theOutput(new edm::HepMCProduct());
00058   //theOutput->addHepMCData(theEvent);
00059   iEvent.put(theOutput);
00060 }
00061 
00062 void EmptyHepMCProducer::beginJob() {}
00063 
00064 void EmptyHepMCProducer::endJob() {}
00065 
00066 //define this as a plug-in
00067 DEFINE_FWK_MODULE(EmptyHepMCProducer);