CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PATHeavyIonProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PATHeavyIonProducer
4 // Class: PATHeavyIonProducer
5 //
13 //
14 // Original Author: Yetkin Yilmaz
15 // Created: Thu Aug 13 08:39:51 EDT 2009
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 #include <string>
23 #include <iostream>
24 
25 // user include files
28 
31 
34 
37 
38 #include "HepMC/HeavyIon.h"
39 
40 using namespace std;
41 
42 //
43 // class decleration
44 //
45 
47  public:
48  explicit PATHeavyIonProducer(const edm::ParameterSet&);
50 
51  private:
52  virtual void beginJob() override ;
53  virtual void produce(edm::Event&, const edm::EventSetup&) override;
54  virtual void endJob() override ;
55 
56  // ----------member data ---------------------------
57 
58  bool doMC_;
59  bool doReco_;
60  std::vector<std::string> hepmcSrc_;
63 
64 };
65 
66 //
67 // constants, enums and typedefs
68 //
69 
70 
71 //
72 // static data member definitions
73 //
74 
75 //
76 // constructors and destructor
77 //
79 {
80  //register your products
81  produces<pat::HeavyIon>();
82 
83  //now do what ever other initialization is needed
84  doReco_ = iConfig.getParameter<bool>("doReco");
85  if(doReco_){
86  centSrc_ = iConfig.getParameter<edm::InputTag>("centrality");
87  evtPlaneSrc_ = iConfig.getParameter<edm::InputTag>("evtPlane");
88  }
89 
90  doMC_ = iConfig.getParameter<bool>("doMC");
91  if(doMC_){
92  hepmcSrc_ = iConfig.getParameter<std::vector<std::string> >("generators");
93  }
94 
95 }
96 
97 
99 {
100 
101  // do anything here that needs to be done at desctruction time
102  // (e.g. close files, deallocate resources etc.)
103 
104 }
105 
106 
107 //
108 // member functions
109 //
110 
111 // ------------ method called to produce the data ------------
112 void
114 {
115 
116 }
117 
118 // ------------ method called once each job just before starting event loop ------------
119 void
121 {
122 }
123 
124 // ------------ method called once each job just after ending the event loop ------------
125 void
127 }
128 
129 //define this as a plug-in
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual void beginJob() override
void beginJob()
Definition: Breakpoints.cc:15
int iEvent
Definition: GenABIO.cc:230
PATHeavyIonProducer(const edm::ParameterSet &)
std::vector< std::string > hepmcSrc_
virtual void produce(edm::Event &, const edm::EventSetup &) override
virtual void endJob() override