SortByPlane_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: SortByPlane
3 // Module Type: producer
4 // File: SortByPlane_module.cc
5 //
6 // Generated at Mon Nov 5 11:07:28 2012 by Martin Frank using artmod
7 // from art v1_01_01.
8 ////////////////////////////////////////////////////////////////////////
9 
14 
17 
18 namespace novaddt {
19  class SortByPlane;
20 }
21 
23 public:
24  explicit SortByPlane(fhicl::ParameterSet const & p);
25  virtual ~SortByPlane();
26 
27  virtual bool filter(art::Event & e);
28 
29 
30 private:
31 
33 
34 };
35 
36 
38  : _hitslabel(p.get<std::string>("hits_label"))
39 {
40  produces<HitList>("PlaneSortedHits");
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<Plane>());
55 
56  std::unique_ptr<HitList> product(new HitList(hit_list));
57  e.put(std::move(product), "PlaneSortedHits");
58 
59  return true;
60 }
61 
std::vector< DAQHit > HitList
Definition: HitList.h:15
const char * p
Definition: xmltok.h:285
DEFINE_ART_MODULE(TestTMapFile)
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
void hits()
Definition: readHits.C:15
virtual bool filter(art::Event &e)
::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
SortByPlane(fhicl::ParameterSet const &p)
Float_t e
Definition: plot.C:35
void SortByPlane(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in plane order (low to high).
Definition: CellHit.cxx:124