EVD_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file EVD_plugin.cc
3 ///
4 /// \version $Id: EVD_plugin.cc,v 1.1 2010/11/10 22:49:25 p-novaart Exp $
5 /// \author jpaley@anl.gov
6 
7 // Framework includes
9 
10 #ifndef EVD_EVD_H
11 #define EVD_EVD_H
12 
13 // Framework Includes
15 
16 #include <string>
17 #include "TH1D.h"
18 
19 extern "C" {
20 #include <sys/types.h>
21 #include <sys/stat.h>
22 }
23 
24 //GArSoft includes
25 #include "nuevdb/EventDisplayBase/DisplayWindow.h"
28 
29 // Framework includes
31 #include "fhiclcpp/ParameterSet.h"
34 #include "art_root_io/TFileService.h"
35 #include "art_root_io/TFileDirectory.h"
37 
38 /// The Event Display
39 // Builder for the Display3D view
40 static evdb::Canvas* mk_display3d_canvas(TGMainFrame* mf)
41 {
42  return new gar::evd::Display3DView(mf);
43 }
44 
45 // Builder for the Calor view
46 static evdb::Canvas* mk_calor_canvas(TGMainFrame* mf)
47 {
48  return new gar::evd::CalorView(mf);
49 }
50 
51 // // Builder for the MCTruth view
52 // static evdb::ObjListCanvas* mk_mctrue_canvas(TGMainFrame* mf)
53 // {
54 // return new evd::MCTrueView(mf);
55 // }
56 
57 namespace gar{
58  namespace evd{
59 
60  /// a class for transporting photons in a roughly realistic way
61  class EVD : public art::EDAnalyzer
62  {
63  public:
64  explicit EVD(fhicl::ParameterSet const &pset);
65  virtual ~EVD();
66 
67  void analyze(art::Event const& evt);
68  void beginJob();
69 
70  private:
71 
72  //unused bool fWindowsDrawn; ///< flag for whether windows are already drawn
73 
74  };
75 
76  //----------------------------------------------------
78  : EDAnalyzer(pset)
79  //, fWindowsDrawn(false)
80  {
81 
82  }
83 
84  //----------------------------------------------------
86  {
87  }
88 
89  //----------------------------------------------------
91  {
92  evdb::DisplayWindow::Register("Display3D",
93  "Display3D",
94  700,
95  700,
97 
98  evdb::DisplayWindow::Register("Calorimetry",
99  "Calorimetry",
100  700,
101  700,
103 
104  // evdb::ListWindow::Register("MC Particle List",
105  // "MC Particle List",
106  // 400,
107  // 800,
108  // mk_mctrue_canvas);
109 
110  // Open up the main display window and run
111  evdb::DisplayWindow::OpenWindow(0);
112  }
113 
114  //----------------------------------------------------
115  void EVD::analyze(const art::Event& /*evt*/)
116  {
117  }
118 
120 
121  } // namespace evd
122 } // namespace gar
123 
124 #endif // EVD
125 ////////////////////////////////////////////////////////////////////////
void beginJob()
Definition: EVD_module.cc:90
virtual ~EVD()
Definition: EVD_module.cc:85
void analyze(art::Event const &evt)
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
EVD(fhicl::ParameterSet const &pset)
Definition: EVD_module.cc:77
LArSoft includes.
Definition: InfoTransfer.h:33
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
static evdb::Canvas * mk_calor_canvas(TGMainFrame *mf)
Definition: EVD_module.cc:46
a class for transporting photons in a roughly realistic way
Definition: EVD_module.cc:61
General GArSoft Utilities.
View showing calorimetric particle ID information.
Definition: CalorView.h:21
View of event shoing the XZ and YZ readout planes.
Definition: Display3DView.h:23
TCEvent evt
Definition: DataStructs.cxx:7
static evdb::Canvas * mk_display3d_canvas(TGMainFrame *mf)
The Event Display.
Definition: EVD_module.cc:40