CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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/InputSourceMacros.h"
00003 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00004 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00005 #include "FWCore/Sources/interface/ProducerSourceBase.h"
00006 
00007 namespace edm {
00008   class EmptySource : public ProducerSourceBase {
00009   public:
00010     explicit EmptySource(ParameterSet const&, InputSourceDescription const&);
00011     ~EmptySource();
00012     static void fillDescriptions(ConfigurationDescriptions& descriptions);
00013   private:
00014     virtual bool setRunAndEventInfo(EventID& id, TimeValue_t& time);
00015     virtual void produce(Event &);
00016   };
00017 
00018   EmptySource::EmptySource(ParameterSet const& pset,
00019                                        InputSourceDescription const& desc) :
00020     ProducerSourceBase(pset, desc, false)
00021   { }
00022 
00023   EmptySource::~EmptySource() {
00024   }
00025 
00026   bool
00027   EmptySource::setRunAndEventInfo(EventID&, TimeValue_t&) {
00028     return true;
00029   }
00030 
00031   void
00032   EmptySource::produce(edm::Event&) {
00033   }
00034 
00035   void
00036   EmptySource::fillDescriptions(ConfigurationDescriptions& descriptions) {
00037     ParameterSetDescription desc;
00038     desc.setComment("Creates runs, lumis and events containing no products.");
00039     ProducerSourceBase::fillDescription(desc);
00040     descriptions.add("source", desc);
00041   }
00042 }
00043 
00044 using edm::EmptySource;
00045 DEFINE_FWK_INPUT_SOURCE(EmptySource);