GenericCRT_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: GenericCRT
3 // Plugin Type: producer (art v3_05_01)
4 // File: GenericCRT_module.cc
5 //
6 // Generated at Wed Oct 28 07:07:35 2020 by Andrzej Szelc using cetskelgen
7 // from cetlib version v3_10_00.
8 ////////////////////////////////////////////////////////////////////////
9 
17 #include "fhiclcpp/ParameterSet.h"
19 
20 #include "GenericCRT.h"
21 
22 
23 #include <memory>
24 
25 namespace sim {
26  class GenericCRT;
27 }
28 
29 
31 public:
32  explicit GenericCRT(fhicl::ParameterSet const& p);
33  // The compiler-generated destructor is fine for non-base
34  // classes without bare pointers or other resource use.
35 
36  // Plugins should not be copied or assigned.
37  GenericCRT(GenericCRT const&) = delete;
38  GenericCRT(GenericCRT&&) = delete;
39  GenericCRT& operator=(GenericCRT const&) = delete;
40  GenericCRT& operator=(GenericCRT&&) = delete;
41 
42  // Required functions.
43  void produce(art::Event& e) override;
44 
45 
46 private:
47 
49 
50  // Declare member data here.
51 
52 };
53 
54 
56  : EDProducer{p} //
58  // More initializers here.
59 {
60 
61  produces< std::vector<sim::AuxDetSimChannel> >();
62 }
63 
65 {
66  // Implementation of required member function here.
67  //std::unique_ptr< std::vector< sim::AuxDetSimChannel > > adCol (new std::vector<sim::AuxDetSimChannel> );
68  auto adCol = std::make_unique<std::vector<sim::AuxDetSimChannel>>();
69 
70  auto const &auxdethitcollection = e.getMany< std::vector<sim::AuxDetHit>> ();
71 
72  for (size_t ii = 0; ii < auxdethitcollection.size(); ii++) {
73  for (auto ch : fCRTConvertUtil.GetAuxDetSimChannels(*(auxdethitcollection.at(ii))))
74  adCol->emplace_back(ch);
75  }
76 
77  e.put(std::move(adCol));
78 
79 }
80 
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
sim::GenericCRTUtility fCRTConvertUtil
GenericCRT & operator=(GenericCRT const &)=delete
void produce(art::Event &e) override
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
std::vector< sim::AuxDetSimChannel > GetAuxDetSimChannels(const std::vector< sim::AuxDetHit > &InputHitVector) const
Definition: GenericCRT.cxx:118
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
Definition: DataViewImpl.h:479
def move(depos, offset)
Definition: depos.py:107
p
Definition: test.py:223
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
Code to link reconstructed objects back to the MC truth information.
GenericCRT(fhicl::ParameterSet const &p)