SortByView_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: SortByView
3 // Module Type: producer
4 // File: SortByView_module.cc
5 //
6 // Generated at Wed Oct 31 09:13:12 2012 by Jan Zirnstein using artmod
7 // from art v1_01_01.
8 ////////////////////////////////////////////////////////////////////////
9 
14 
17 
18 namespace novaddt {
19  class SortByView;
20 }
21 
23 public:
24  explicit SortByView(fhicl::ParameterSet const & p);
25  virtual ~SortByView();
26 
27  virtual void produce(art::Event & e);
28 
29 
30 private:
31 
33 
34 };
35 
36 
38 : _hitslabel(p.get< std::string >("hits_label"))
39 {
40  produces<HitList>("ViewSortedHits");
41 }
42 
44 {
45  // Clean up dynamic memory and other resources here.
46 }
47 
49 {
51  e.getByLabel(_hitslabel, hits);
52  HitList hit_list(*hits);
53 
54  sort(hit_list.begin(), hit_list.end(), CompareDAQHit<View>());
55 
56  std::unique_ptr<HitList> product(new HitList(hit_list));
57  e.put(std::move(product), "ViewSortedHits");
58 }
59 
virtual void produce(art::Event &e)
std::vector< DAQHit > HitList
Definition: HitList.h:15
const char * p
Definition: xmltok.h:285
DEFINE_ART_MODULE(TestTMapFile)
SortByView(fhicl::ParameterSet const &p)
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
void hits()
Definition: readHits.C:15
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
T product(std::vector< T > dims)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
Float_t e
Definition: plot.C:35