CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PlottingDevice.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PlottingDevice
4 // Class: PlottingDevice
5 //
13 //
14 // Original Author: Jean-Roch Vlimant
15 // Created: Thu May 15 14:37:59 CEST 2008
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
25 
28 
30 //
31 // class decleration
32 //
33 
36 
38 public:
39  explicit PlottingDevice(const edm::ParameterSet&);
40  ~PlottingDevice() override;
41 
42 private:
43  void beginJob() override;
44  void analyze(const edm::Event&, const edm::EventSetup&) override;
45  void endJob() override;
46 
47  // ----------member data ---------------------------
50  std::unique_ptr<Plotter> plotter_;
51 };
52 
53 //
54 // constants, enums and typedefs
55 //
56 
57 //
58 // static data member definitions
59 //
60 
61 //
62 // constructors and destructor
63 //
65  vHelperInstance_ = iConfig.getParameter<std::string>("@module_label");
66  plotDirectoryName_ = "PlottingDevice";
67 
68  //configure the inputtag distributor
69  if (iConfig.exists("InputTags"))
72 
73  //configure the variable helper
76 
77  //configure the plotting device
79  std::string plotterName = plotPset.getParameter<std::string>("ComponentName");
80  plotter_ = PlotterFactory::get()->create(plotterName, plotPset);
81 }
82 
84 
85 //
86 // member functions
87 //
88 
89 // ------------ method called to for each event ------------
92 
93  plotter_->fill(plotDirectoryName_, iEvent);
94 }
95 
98 
99 //define this as a plug-in
std::string vHelperInstance_
void endJob() override
void beginJob() override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
int init
Definition: HydjetWrapper.h:64
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< Plotter > plotter_
int iEvent
Definition: GenABIO.cc:224
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void analyze(const edm::Event &, const edm::EventSetup &) override
~PlottingDevice() override
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PlottingDevice(const edm::ParameterSet &)
#define get
std::string plotDirectoryName_