All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AssnProducer1_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: AssnProducer1
3 // Plugin Type: producer (art v2_05_00)
4 // File: AssnProducer1_module.cc
5 //
6 // Generated at Thu Dec 8 12:20:56 2016 by Saba Sehrish using cetskelgen
7 // from cetlib version v1_21_00.
8 ////////////////////////////////////////////////////////////////////////
9 
10 #include "art/Framework/Core/EDProducer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 
14 namespace fhicl { class ParameterSet; }
15 
16 namespace lartest {
17  class AssnProducer1;
18 }
19 
21 
22 class lartest::AssnProducer1 : public art::EDProducer {
23 public:
24  typedef std::vector<int> intvec_t;
25  typedef std::vector<std::string> strvec_t;
26 
27  explicit AssnProducer1(fhicl::ParameterSet const & p);
28  // The compiler-generated destructor is fine for non-base
29  // classes without bare pointers or other resource use.
30 
31  // Plugins should not be copied or assigned.
32  AssnProducer1(AssnProducer1 const &) = delete;
33  AssnProducer1(AssnProducer1 &&) = delete;
34  AssnProducer1 & operator = (AssnProducer1 const &) = delete;
36 
37  // Required functions.
38  void produce(art::Event & e) override;
39 
40 private:
41 
42 };
43 
44 
45 AssnProducer1::AssnProducer1(fhicl::ParameterSet const & p)
46  : EDProducer{p}
47 {
48  produces<intvec_t>();
49  produces<strvec_t>();
50 }
51 
52 void AssnProducer1::produce(art::Event & e)
53 {
54  auto vs = std::make_unique<strvec_t>(strvec_t {"one", "one-a", "two", "two-a", "three", "three-a"});
55  auto vi = std::make_unique<intvec_t>(intvec_t {1, 2, 3});
56 
57  e.put(std::move(vs));
58  e.put(std::move(vi));
59 }
60 
61 DEFINE_ART_MODULE(AssnProducer1)
AssnProducer1 & operator=(AssnProducer1 const &)=delete
std::vector< std::string > strvec_t
pdgs p
Definition: selectors.fcl:22
std::vector< int > intvec_t
void produce(art::Event &e) override
AssnProducer1(fhicl::ParameterSet const &p)
do i e