AggregateEvent_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // AggregateEvent module
4 //
5 // echurch@fnal.gov
6 ////////////////////////////////////////////////////////////////////////
7 
8 extern "C" {
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 }
12 #include <math.h>
13 #include <algorithm>
14 #include <fstream>
15 
16 // Framework includes
19 #include "fhiclcpp/ParameterSet.h"
25 #include "art_root_io/TFileService.h"
26 #include "art_root_io/TFileDirectory.h"
28 
29 // LArSoft includes
33 
34 // ROOT includes
35 #include "TMatrixD.h"
36 #include "TVectorD.h"
37 #include "TDecompSVD.h"
38 #include "TH2F.h"
39 #include "TF1.h"
40 #include "TVectorD.h"
41 #include "TFile.h"
42 #include "TGraph.h"
43 
45 
46 #include "TH2F.h"
47 #include "TF1.h"
48 #include <string>
49 
50 namespace recob{ class Vertex; }
51 
52 namespace event {
53 
55 
56  public:
57 
58  explicit AggregateEvent(fhicl::ParameterSet const& );
59 
60  private:
61  void produce(art::Event& evt) override;
62 
64 
66 
67  }; // class AggregateEvent
68 
69 } // namespace
70 
71 
72 namespace event {
73 
74  //-------------------------------------------------
75  AggregateEvent::AggregateEvent(fhicl::ParameterSet const& pset) :
76  EDProducer{pset},
77  fVertexModuleLabel(pset.get< std::string >("VertexModuleLabel"))
78  {
79 
80  produces< std::vector<recob::Event> >();
81 
82  }
83 
84  //------------------------------------------------------------------------------------//
86  {
87 
88  std::unique_ptr<std::vector<recob::Event> > ecol(new std::vector<recob::Event>);
89 
90  // get the geometry
92 
93  art::Handle< std::vector<recob::Vertex> > vertexListHandle;
94  evt.getByLabel(fVertexModuleLabel,vertexListHandle);
95  for(unsigned int ii = 0; ii < vertexListHandle->size(); ++ii){
96  art::Ptr<recob::Vertex> vertex(vertexListHandle, ii);
97  fvertexlist.push_back(vertex); // class member
98  }
99 
100  }
101 
103 
104 } // end namespace
Reconstruction base classes.
std::string string
Definition: nybbler.cc:12
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:446
art::PtrVector< recob::Vertex > fvertexlist
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:56
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
TCEvent evt
Definition: DataStructs.cxx:5
void produce(art::Event &evt) override
Event finding and building.
vertex reconstruction