LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
AggregateEvent_module.cc
Go to the documentation of this file.
1 //
3 // AggregateEvent module
4 //
5 // echurch@fnal.gov
7 
8 extern "C" {
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 }
12 #include <math.h>
13 #include <algorithm>
14 #include <iostream>
15 #include <fstream>
16 
17 // Framework includes
20 #include "fhiclcpp/ParameterSet.h"
29 
30 // LArSoft includes
34 
35 // ROOT includes
36 #include "TMatrixD.h"
37 #include "TVectorD.h"
38 #include "TDecompSVD.h"
39 #include "TH2F.h"
40 #include "TF1.h"
41 #include "TVectorD.h"
42 #include "TFile.h"
43 #include "TGraph.h"
44 #include "TMath.h"
45 
47 
48 #include "TH2F.h"
49 #include "TF1.h"
50 #include <vector>
51 #include <string>
52 
53 namespace recob{ class Vertex; }
54 
55 namespace event {
56 
58 
59  public:
60 
61  explicit AggregateEvent(fhicl::ParameterSet const& );
62  ~AggregateEvent();
63 
64  void produce(art::Event& evt);
65  void beginJob();
66 
67  private:
68 
69  std::string fVertexModuleLabel;
70 
72 
73  }; // class AggregateEvent
74 
75 } // namespace
76 
77 
78 namespace event {
79 
80  //-------------------------------------------------
81  AggregateEvent::AggregateEvent(fhicl::ParameterSet const& pset) :
82  fVertexModuleLabel(pset.get< std::string >("VertexModuleLabel"))
83  {
84 
85  produces< std::vector<recob::Event> >();
86 
87  }
88 
89  //-------------------------------------------------
91  {
92  }
93 
94  //-------------------------------------------------
96  {
97  }
98 
99  //------------------------------------------------------------------------------------//
101  {
102 
103  std::unique_ptr<std::vector<recob::Event> > ecol(new std::vector<recob::Event>);
104 
105  // get the geometry
107 
108  art::Handle< std::vector<recob::Vertex> > vertexListHandle;
109  evt.getByLabel(fVertexModuleLabel,vertexListHandle);
110  for(unsigned int ii = 0; ii < vertexListHandle->size(); ++ii){
111  art::Ptr<recob::Vertex> vertex(vertexListHandle, ii);
112  fvertexlist.push_back(vertex); // class member
113  }
114 
115  }
116 
118 
119 } // end namespace
120 
121 
122 
123 
Reconstruction base classes.
void produce(art::Event &evt)
STL namespace.
art::PtrVector< recob::Vertex > fvertexlist
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:42
void beginJob()
Definition: Breakpoints.cc:14
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
art framework interface to geometry description
Event finding and building.
vertex reconstruction