File indexing completed on 2024-04-06 12:12:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "FWCore/Framework/test/DummyESProductResolverProvider.h"
0017
0018 #include "FWCore/Framework/test/DummyFinder.h"
0019 #include "FWCore/Framework/interface/SourceFactory.h"
0020
0021 namespace edm {
0022 class ParameterSet;
0023 }
0024
0025 class LoadableDummyESSource : public edm::eventsetup::test::DummyESProductResolverProvider, public DummyFinder {
0026 public:
0027 LoadableDummyESSource(const edm::ParameterSet& iPSet)
0028 : DummyESProductResolverProvider(edm::eventsetup::test::DummyData(iPSet.getUntrackedParameter<int>("value", 2))) {
0029 unsigned int startRun = iPSet.getUntrackedParameter<unsigned int>("startRunForIOV", 0);
0030 if (0 == startRun) {
0031 setInterval(edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime()));
0032 } else {
0033 setInterval(
0034 edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(startRun, 0, 0)), edm::IOVSyncValue::endOfTime()));
0035 }
0036 }
0037 };
0038
0039 DEFINE_FWK_EVENTSETUP_SOURCE(LoadableDummyESSource);