CMS 3D CMS Logo

MissingDictionaryTestProducer.cc
Go to the documentation of this file.
1 
5 // Without manual intervention this simply tests the case where all
6 // the test dictionaries are defined, which is not very interesting.
7 // Its primary purpose is to be run manually where specific dictionaries
8 // have been removed from classes_def.xml and checking that the proper
9 // exceptions are thrown without having to generate this code from scratch.
10 
12 #include "DataFormats/TestObjects/interface/MissingDictionaryTestObject.h"
19 
20 #include <list>
21 #include <vector>
22 
23 namespace edm {
24  class EventSetup;
25 }
26 
27 namespace edmtest {
28 
30  public:
33 
34  void produce(edm::Event&, edm::EventSetup const&) override;
35 
36  private:
40  };
41 
43  consumes<edm::View<MissingDictionaryTestA> >(pset.getParameter<edm::InputTag>("inputTag"));
44  inputToken1_ = consumes<MissingDictionaryTestA>(pset.getParameter<edm::InputTag>("inputTag"));
45  inputToken2_ = consumes<std::vector<MissingDictionaryTestA> >(pset.getParameter<edm::InputTag>("inputTag"));
46  inputToken3_ = consumes<std::list<MissingDictionaryTestA> >(pset.getParameter<edm::InputTag>("inputTag"));
47 
48  produces<MissingDictionaryTestA>();
49  produces<MissingDictionaryTestA>("anInstance");
50  produces<std::vector<MissingDictionaryTestA> >();
51  produces<std::vector<MissingDictionaryTestA> >("anInstance");
52  produces<std::list<MissingDictionaryTestA> >();
53  }
54 
56 
59  //event.getByToken(inputToken1_, h1);
60 
62  //event.getByToken(inputToken2_, h2);
63 
64  auto result1 = std::make_unique<MissingDictionaryTestA>();
65  event.put(std::move(result1));
66 
67  auto result2 = std::make_unique<MissingDictionaryTestA>();
68  event.put(std::move(result2), "anInstance");
69 
70  auto result3 = std::make_unique<std::vector<MissingDictionaryTestA> >();
71  event.put(std::move(result3));
72 
73  auto result4 = std::make_unique<std::vector<MissingDictionaryTestA> >();
74  event.put(std::move(result4), "anInstance");
75  }
76 } // namespace edmtest
edm::EDGetTokenT< std::vector< MissingDictionaryTestA > > inputToken2_
edm::EDGetTokenT< std::list< MissingDictionaryTestA > > inputToken3_
edm::EDGetTokenT< MissingDictionaryTestA > inputToken1_
void produce(edm::Event &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HLT enums.
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1