CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FWCore/Modules/src/EmptySource.cc

Go to the documentation of this file.
00001 #include "FWCore/Framework/interface/Frameworkfwd.h"
00002 #include "FWCore/Framework/interface/GeneratedInputSource.h"
00003 #include "FWCore/Framework/interface/InputSourceMacros.h"
00004 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00006 
00007 namespace edm {
00008   class EmptySource : public GeneratedInputSource {
00009   public:
00010     explicit EmptySource(ParameterSet const&, InputSourceDescription const&);
00011     ~EmptySource();
00012     static void fillDescriptions(ConfigurationDescriptions& descriptions);
00013   private:
00014     virtual bool produce(Event &);
00015   };
00016 
00017   EmptySource::EmptySource(ParameterSet const& pset,
00018                                        InputSourceDescription const& desc) :
00019     GeneratedInputSource(pset, desc)
00020   { }
00021 
00022   EmptySource::~EmptySource() {
00023   }
00024 
00025   bool
00026   EmptySource::produce(edm::Event &) {
00027     return true;
00028   }
00029 
00030   void
00031   EmptySource::fillDescriptions(ConfigurationDescriptions& descriptions) {
00032     ParameterSetDescription desc;
00033     desc.setComment("Creates runs, lumis and events containing no products.");
00034     GeneratedInputSource::fillDescription(desc);
00035     descriptions.add("source", desc);
00036   }
00037 }
00038 
00039 using edm::EmptySource;
00040 DEFINE_FWK_INPUT_SOURCE(EmptySource);