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 // $Id: PATHeavyIonProducer.cc,v 1.2 2010/02/20 21:00:22 wmtan Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <string>
24 #include <iostream>
25 
26 // user include files
29 
32 
35 
38 
39 #include "HepMC/HeavyIon.h"
40 
41 using namespace std;
42 
43 //
44 // class decleration
45 //
46 
48  public:
49  explicit PATHeavyIonProducer(const edm::ParameterSet&);
51 
52  private:
53  virtual void beginJob() ;
54  virtual void produce(edm::Event&, const edm::EventSetup&);
55  virtual void endJob() ;
56 
57  // ----------member data ---------------------------
58 
59  bool doMC_;
60  bool doReco_;
61  std::vector<std::string> hepmcSrc_;
64 
65 };
66 
67 //
68 // constants, enums and typedefs
69 //
70 
71 
72 //
73 // static data member definitions
74 //
75 
76 //
77 // constructors and destructor
78 //
80 {
81  //register your products
82  produces<pat::HeavyIon>();
83 
84  //now do what ever other initialization is needed
85  doReco_ = iConfig.getParameter<bool>("doReco");
86  if(doReco_){
87  centSrc_ = iConfig.getParameter<edm::InputTag>("centrality");
88  evtPlaneSrc_ = iConfig.getParameter<edm::InputTag>("evtPlane");
89  }
90 
91  doMC_ = iConfig.getParameter<bool>("doMC");
92  if(doMC_){
93  hepmcSrc_ = iConfig.getParameter<std::vector<std::string> >("generators");
94  }
95 
96 }
97 
98 
100 {
101 
102  // do anything here that needs to be done at desctruction time
103  // (e.g. close files, deallocate resources etc.)
104 
105 }
106 
107 
108 //
109 // member functions
110 //
111 
112 // ------------ method called to produce the data ------------
113 void
115 {
116 
117 }
118 
119 // ------------ method called once each job just before starting event loop ------------
120 void
122 {
123 }
124 
125 // ------------ method called once each job just after ending the event loop ------------
126 void
128 }
129 
130 //define this as a plug-in
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void beginJob()
Definition: Breakpoints.cc:15
int iEvent
Definition: GenABIO.cc:243
PATHeavyIonProducer(const edm::ParameterSet &)
std::vector< std::string > hepmcSrc_
virtual void produce(edm::Event &, const edm::EventSetup &)