DeferredIsReadyWithAssnsAnalyzer_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: DeferredIsReadyWithAssnsAnalyzer
3 // Module Type: analyzer
4 // File: DeferredIsReadyWithAssnsAnalyzer_module.cc
5 //
6 // Generated at Wed Nov 6 15:11:26 2013 by Christopher Green using artmod
7 // from cetpkgsupport v1_04_02.
8 ////////////////////////////////////////////////////////////////////////
9 
17 #include "canvas/Persistency/Common/FindMany.h"
19 #include "fhiclcpp/ParameterSet.h"
20 
21 namespace arttest {
22  class DeferredIsReadyWithAssnsAnalyzer;
23 }
24 
26 public:
28 
29  void analyze(art::Event const& e) override;
30 
31 private:
33 };
34 
36  fhicl::ParameterSet const& p)
37  : EDAnalyzer(p), inputLabel_(p.get<std::string>("input_label"))
38 {}
39 
40 void
42 {
43  auto h = e.getValidHandle<std::vector<size_t>>(inputLabel_);
45  pv.reserve(h->size());
46  for (size_t i = 0, e = h->size(); i != e; ++i) {
47  pv.push_back(art::Ptr<size_t>(h, i));
48  }
49  art::FindMany<std::string, arttest::AssnTestData> fmp(pv, e, inputLabel_);
50  for (size_t i = 0, sz = fmp.size(); i != sz; ++i) {
51  assert(fmp.at(i).size() > 0);
52  assert(*fmp.at(i)[0] == std::string(1, i + 'a'));
53  }
54 }
55 
std::string string
Definition: nybbler.cc:12
STL namespace.
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:68
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:480
p
Definition: test.py:228
auto const & get(AssnsNode< L, R, D > const &r)
Definition: AssnsNode.h:115
Definition: fwd.h:26
h
training ###############################
Definition: train_cnn.py:186