Revision: | 1.1 |
Committed: | Fri May 25 11:14:32 2012 UTC (12 years, 11 months ago) by yilmaz |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | HiForest_V02_85, HiForest_V02_84, HiForest_V02_83, HiForest_V02_82, HiForest_V02_81, HiForest_V02_80, HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HEAD |
Branch point for: | branch_44x |
Log Message: | clean up |
# | User | Rev | Content |
---|---|---|---|
1 | yilmaz | 1.1 | // -*- C++ -*- |
2 | // | ||
3 | // Package: HiForestInfo | ||
4 | // Class: HiForestInfo | ||
5 | // | ||
6 | /**\class HiForestInfo HiForestInfo.cc CmsHi/HiForestInfo/src/HiForestInfo.cc | ||
7 | |||
8 | Description: [one line class summary] | ||
9 | |||
10 | Implementation: | ||
11 | [Notes on implementation] | ||
12 | */ | ||
13 | // | ||
14 | // Original Author: Yetkin Yilmaz | ||
15 | // Created: Fri May 25 06:50:40 EDT 2012 | ||
16 | // $Id$ | ||
17 | // | ||
18 | // | ||
19 | |||
20 | |||
21 | // system include files | ||
22 | #include <memory> | ||
23 | |||
24 | // user include files | ||
25 | #include "FWCore/Framework/interface/Frameworkfwd.h" | ||
26 | #include "FWCore/Framework/interface/EDAnalyzer.h" | ||
27 | |||
28 | #include "FWCore/Framework/interface/Event.h" | ||
29 | #include "FWCore/Framework/interface/MakerMacros.h" | ||
30 | |||
31 | #include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
32 | #include "CommonTools/UtilAlgos/interface/TFileService.h" | ||
33 | #include "FWCore/ServiceRegistry/interface/Service.h" | ||
34 | #include "TH1.h" | ||
35 | |||
36 | // | ||
37 | // class declaration | ||
38 | // | ||
39 | |||
40 | class HiForestInfo : public edm::EDAnalyzer { | ||
41 | public: | ||
42 | explicit HiForestInfo(const edm::ParameterSet&); | ||
43 | ~HiForestInfo(); | ||
44 | |||
45 | static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
46 | |||
47 | |||
48 | private: | ||
49 | virtual void beginJob() ; | ||
50 | virtual void analyze(const edm::Event&, const edm::EventSetup&); | ||
51 | virtual void endJob() ; | ||
52 | |||
53 | virtual void beginRun(edm::Run const&, edm::EventSetup const&); | ||
54 | virtual void endRun(edm::Run const&, edm::EventSetup const&); | ||
55 | virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&); | ||
56 | virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&); | ||
57 | |||
58 | // ----------member data --------------------------- | ||
59 | |||
60 | edm::Service<TFileService> fs; | ||
61 | |||
62 | std::vector<std::string> inputLines_; | ||
63 | }; | ||
64 | |||
65 | // | ||
66 | // constants, enums and typedefs | ||
67 | // | ||
68 | |||
69 | // | ||
70 | // static data member definitions | ||
71 | // | ||
72 | |||
73 | // | ||
74 | // constructors and destructor | ||
75 | // | ||
76 | HiForestInfo::HiForestInfo(const edm::ParameterSet& iConfig) | ||
77 | |||
78 | { | ||
79 | |||
80 | inputLines_ = iConfig.getParameter<std::vector<std::string> >("inputLines"); | ||
81 | |||
82 | } | ||
83 | |||
84 | |||
85 | HiForestInfo::~HiForestInfo() | ||
86 | { | ||
87 | |||
88 | // do anything here that needs to be done at desctruction time | ||
89 | // (e.g. close files, deallocate resources etc.) | ||
90 | |||
91 | } | ||
92 | |||
93 | |||
94 | // | ||
95 | // member functions | ||
96 | // | ||
97 | |||
98 | // ------------ method called for each event ------------ | ||
99 | void | ||
100 | HiForestInfo::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) | ||
101 | { | ||
102 | using namespace edm; | ||
103 | |||
104 | } | ||
105 | |||
106 | |||
107 | // ------------ method called once each job just before starting event loop ------------ | ||
108 | void | ||
109 | HiForestInfo::beginJob() | ||
110 | { | ||
111 | for(unsigned i = 0; i < inputLines_.size(); ++i){ | ||
112 | fs->make<TH1D>(Form("h%d",i),inputLines_[i].data(),1,0,1); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | // ------------ method called once each job just after ending the event loop ------------ | ||
117 | void | ||
118 | HiForestInfo::endJob() | ||
119 | { | ||
120 | } | ||
121 | |||
122 | // ------------ method called when starting to processes a run ------------ | ||
123 | void | ||
124 | HiForestInfo::beginRun(edm::Run const&, edm::EventSetup const&) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | // ------------ method called when ending the processing of a run ------------ | ||
129 | void | ||
130 | HiForestInfo::endRun(edm::Run const&, edm::EventSetup const&) | ||
131 | { | ||
132 | } | ||
133 | |||
134 | // ------------ method called when starting to processes a luminosity block ------------ | ||
135 | void | ||
136 | HiForestInfo::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
137 | { | ||
138 | } | ||
139 | |||
140 | // ------------ method called when ending the processing of a luminosity block ------------ | ||
141 | void | ||
142 | HiForestInfo::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
143 | { | ||
144 | } | ||
145 | |||
146 | // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ | ||
147 | void | ||
148 | HiForestInfo::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
149 | //The following says we do not know what parameters are allowed so do no validation | ||
150 | // Please change this to state exactly what you do use, even if it is no parameters | ||
151 | edm::ParameterSetDescription desc; | ||
152 | desc.setUnknown(); | ||
153 | descriptions.addDefault(desc); | ||
154 | } | ||
155 | |||
156 | //define this as a plug-in | ||
157 | DEFINE_FWK_MODULE(HiForestInfo); |