CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
GBRWrapperMaker Class Reference

#include <GBRWrap/GBRWrapperMaker/src/GBRWrapperMaker.cc>

Inheritance diagram for GBRWrapperMaker:
edm::EDAnalyzer

Public Member Functions

 GBRWrapperMaker (const edm::ParameterSet &)
 
 ~GBRWrapperMaker ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 49 of file GBRWrapperMaker.cc.

Constructor & Destructor Documentation

GBRWrapperMaker::GBRWrapperMaker ( const edm::ParameterSet iConfig)
explicit

Definition at line 81 of file GBRWrapperMaker.cc.

83 {
84  //now do what ever initialization is needed
85 
86 }
GBRWrapperMaker::~GBRWrapperMaker ( )

Definition at line 89 of file GBRWrapperMaker.cc.

90 {
91 
92  // do anything here that needs to be done at desctruction time
93  // (e.g. close files, deallocate resources etc.)
94 
95 }

Member Function Documentation

void GBRWrapperMaker::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 104 of file GBRWrapperMaker.cc.

References EdgesToViz::infile, and cond::service::PoolDBOutputService::writeOne().

105 {
106  using namespace edm;
107 
108 
109 
110 // #ifdef THIS_IS_AN_EVENT_EXAMPLE
111 // Handle<ExampleData> pIn;
112 // iEvent.getByLabel("example",pIn);
113 // #endif
114 //
115 // #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
116 // ESHandle<SetupData> pSetup;
117 // iSetup.get<SetupRecord>().get(pSetup);
118 // #endif
119 //from Josh:
120  TFile *infile = new TFile("/afs/cern.ch/user/b/bendavid/cmspublic/gbrv3ph.root","READ");
121 
122  printf("load forest\n");
123 
124 
125  GBRForest *gbreb = (GBRForest*)infile->Get("EBCorrection");
126  GBRForest *gbrebvar = (GBRForest*)infile->Get("EBUncertainty");
127  GBRForest *gbree = (GBRForest*)infile->Get("EECorrection");
128  GBRForest *gbreevar = (GBRForest*)infile->Get("EEUncertainty");
129 
130 
131 
132 
133 //from Rishi
134 
135  TFile *infile_PFLC = new TFile("/afs/cern.ch/user/r/rpatel/ConvXml/TMVARegression_BDTG_PFClusterCorr.root","READ");
136  TFile *infile_PFGC = new TFile("/afs/cern.ch/user/r/rpatel/ConvXml/TMVARegression_BDTG_PFGlobalCorr.root","READ");
137  TFile *infile_PFRes = new TFile("/afs/cern.ch/user/r/rpatel/ConvXml/TMVARegression_BDTG_PFRes.root ","READ");
138 
139  GBRForest *gbrLC = (GBRForest*)infile_PFLC->Get("GBRForest");
140  GBRForest *gbrGC = (GBRForest*)infile_PFGC->Get("GBRForest");
141  GBRForest *gbrRes = (GBRForest*)infile_PFRes->Get("GBRForest");
142 
143 
144 
145 
146  printf("made objects\n");
148  if (poolDbService.isAvailable()) {
149 
150  poolDbService->writeOne( gbreb, poolDbService->beginOfTime(),
151  "wgbrph_EBCorrection" );
152  poolDbService->writeOne( gbrebvar, poolDbService->beginOfTime(),
153  "wgbrph_EBUncertainty" );
154  poolDbService->writeOne( gbree, poolDbService->beginOfTime(),
155  "wgbrph_EECorrection" );
156  poolDbService->writeOne( gbreevar, poolDbService->beginOfTime(),
157  "wgbrph_EEUncertainty" );
158 
159  poolDbService->writeOne( gbrLC, poolDbService->beginOfTime(),
160  "wgbrph_PFLCCorrection" );
161  poolDbService->writeOne( gbrGC, poolDbService->beginOfTime(),
162  "wgbrph_PFGlobalCorrection" );
163  poolDbService->writeOne( gbrRes, poolDbService->beginOfTime(),
164  "wgbrph_PFResolution" );
165 
166  }
167 
168 
169 }
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
list infile
Definition: EdgesToViz.py:90
void GBRWrapperMaker::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 174 of file GBRWrapperMaker.cc.

175 {
176 }
void GBRWrapperMaker::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 198 of file GBRWrapperMaker.cc.

199 {
200 }
void GBRWrapperMaker::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 186 of file GBRWrapperMaker.cc.

187 {
188 }
void GBRWrapperMaker::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file GBRWrapperMaker.cc.

181 {
182 }
void GBRWrapperMaker::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 204 of file GBRWrapperMaker.cc.

205 {
206 }
void GBRWrapperMaker::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 192 of file GBRWrapperMaker.cc.

193 {
194 }
void GBRWrapperMaker::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 210 of file GBRWrapperMaker.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

210  {
211  //The following says we do not know what parameters are allowed so do no validation
212  // Please change this to state exactly what you do use, even if it is no parameters
214  desc.setUnknown();
215  descriptions.addDefault(desc);
216 }
void addDefault(ParameterSetDescription const &psetDescription)