File indexing completed on 2024-04-06 12:12:48
0001 #include "FWCore/Framework/interface/Frameworkfwd.h"
0002 #include "FWCore/Framework/interface/InputSourceMacros.h"
0003 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0004 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0005 #include "FWCore/Framework/interface/InputSource.h"
0006 #include "FWCore/Sources/interface/IDGeneratorSourceBase.h"
0007
0008 namespace edm {
0009 class EmptySource : public IDGeneratorSourceBase<InputSource> {
0010 public:
0011 explicit EmptySource(ParameterSet const&, InputSourceDescription const&);
0012 ~EmptySource() override;
0013 static void fillDescriptions(ConfigurationDescriptions& descriptions);
0014
0015 private:
0016 bool setRunAndEventInfo(EventID& id, TimeValue_t& time, edm::EventAuxiliary::ExperimentType&) override;
0017 void readEvent_(edm::EventPrincipal&) override;
0018 };
0019
0020 EmptySource::EmptySource(ParameterSet const& pset, InputSourceDescription const& desc)
0021 : IDGeneratorSourceBase<InputSource>(pset, desc, false) {}
0022
0023 EmptySource::~EmptySource() {}
0024
0025 bool EmptySource::setRunAndEventInfo(EventID&, TimeValue_t&, edm::EventAuxiliary::ExperimentType&) { return true; }
0026
0027 void EmptySource::readEvent_(edm::EventPrincipal& e) {
0028 doReadEvent(e, [](auto const&) {});
0029 }
0030
0031 void EmptySource::fillDescriptions(ConfigurationDescriptions& descriptions) {
0032 ParameterSetDescription desc;
0033 desc.setComment("Creates runs, lumis and events containing no products.");
0034 IDGeneratorSourceBase<InputSource>::fillDescription(desc);
0035 descriptions.add("source", desc);
0036 }
0037 }
0038
0039 using edm::EmptySource;
0040 DEFINE_FWK_INPUT_SOURCE(EmptySource);