File indexing completed on 2024-04-06 12:25:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <TFile.h>
0015
0016
0017 #include "RecoEgamma/EgammaTools/interface/egEnergyCorrectorFactoryFromRootFile.h"
0018 #include "CondFormats/GBRForest/interface/GBRForest.h"
0019
0020
0021
0022
0023
0024 EGEnergyCorrector::Initializer egEnergyCorrectorFactoryFromRootFile(const char *fileName) {
0025 EGEnergyCorrector::Initializer ret;
0026 std::unique_ptr<TFile> fgbr(TFile::Open(fileName, "READ"));
0027 ret.readereb_.reset((GBRForest *)fgbr->Get("EBCorrection"));
0028 ret.readerebvariance_.reset((GBRForest *)fgbr->Get("EBUncertainty"));
0029 ret.readeree_.reset((GBRForest *)fgbr->Get("EECorrection"));
0030 ret.readereevariance_.reset((GBRForest *)fgbr->Get("EEUncertainty"));
0031 fgbr->Close();
0032 return ret;
0033 }