SortByTDC_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: SortByTDC
3 // Module Type: producer
4 // File: SortByTDC_module.cc
5 //
6 // Generated at Thu Oct 18 16:45:39 2012 by Martin Frank using artmod
7 // from art v1_01_01.
8 ////////////////////////////////////////////////////////////////////////
9 
14 
17 
18 namespace novaddt {
19  class SortByTDC;
20 }
21 
23 public:
24  explicit SortByTDC(fhicl::ParameterSet const & p);
25  virtual ~SortByTDC();
26 
27  virtual bool filter(art::Event & e);
28 
29 
30 private:
31 
34 
35 };
36 
37 
39  : _hitslabel(p.get< std::string >("hits_label")),
40  _hitsinstance(p.get< std::string >("hits_instance"))
41 {
42  produces<HitList>("TDCSortedHits");
43 }
44 
46 {
47  // Clean up dynamic memory and other resources here.
48 }
49 
51 {
54 
55  std::unique_ptr<HitList> product(new HitList(*hits));
56 
57  if(product->size() > 0)
58  std::sort(product->begin(), product->end(), CompareDAQHit<TDC>());
59 
60  e.put(std::move(product), "TDCSortedHits");
61 
62  return true;
63 }
64 
SortByTDC(fhicl::ParameterSet const &p)
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
::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
virtual bool filter(art::Event &e)
Float_t e
Definition: plot.C:35
std::string _hitsinstance