SortByDCM_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: SortByDCM
3 // Module Type: producer
4 // File: SortByDCM_module.cc
5 //
6 // Generated at Tue Dec 18 09:37:36 2012 by Zukai Wang using artmod
7 // from art v1_02_06.
8 ////////////////////////////////////////////////////////////////////////
9 
14 
17 
18 namespace novaddt {
19  class SortByDCM;
20 }
21 
23 public:
24  explicit SortByDCM(fhicl::ParameterSet const & p);
25  virtual ~SortByDCM();
26 
27  bool filter(art::Event & e) override;
28 
29 
30 private:
31 
33 
34 };
35 
36 
38  :_hitslabel(p.get<std::string>("hits_label"))
39 {
40  produces<HitList>("DCMSortedHits");
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<DCM>());
55 
56  std::unique_ptr<HitList> product(new HitList(hit_list));
57  e.put(std::move(product), "DCMSortedHits");
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
SortByDCM(fhicl::ParameterSet const &p)
::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
bool filter(art::Event &e) override