DropTestParentageFaker_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: DropTestParentageFaker
3 // Module Type: producer
4 // File: DropTestParentageFaker_module.cc
5 //
6 // Synopsis: Make sure that one of the products produced by the
7 // PtrmvProducer module is registered as a parent to
8 // improve test coverage.
9 //
10 // Generated at Thu Jan 5 17:44:19 2012 by Chris Green using artmod
11 // from art v1_00_06.
12 ////////////////////////////////////////////////////////////////////////
13 
19 
20 #include <memory>
21 
22 namespace arttest {
23  class DropTestParentageFaker;
24 }
25 
27 public:
29 
30 private:
31  void produce(art::Event& e) override;
32 
34 };
35 
37  fhicl::ParameterSet const& p)
38  : EDProducer{p}, inputLabel_(p.get<std::string>("input_label"))
39 {
40  produces<std::string>();
41 }
42 
43 void
45 {
47  // Force this product to be a parent of our child.
48  e.getByLabel(inputLabel_, sh);
49  e.put(std::make_unique<std::string>("Child"));
50 }
51 
std::string string
Definition: nybbler.cc:12
EDProducer()=default
DropTestParentageFaker(fhicl::ParameterSet const &p)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:435
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
p
Definition: test.py:228
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:692