CMS 3D CMS Logo

GBRForestTools.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 //
3 // GRBForestTools
4 //
5 // Utility to read a TMVA weights file with a BDT into a GRBForest.
6 //
7 // Author: Jonas Rembser
8 //--------------------------------------------------------------------------------------------------
9 
10 
11 #ifndef RecoEgamma_EgammaTools_GBRForestTools_h
12 #define RecoEgamma_EgammaTools_GBRForestTools_h
13 
14 #include <vector>
15 #include <string>
16 
19 
20 #include "TMVA/MethodBDT.h"
21 #include "TMVA/Reader.h"
22 
24 
26 {
27  public:
29 
30  static std::unique_ptr<const GBRForest> createGBRForest(const std::string &weightFile);
31  static std::unique_ptr<const GBRForest> createGBRForest(const edm::FileInPath &weightFile);
32 
33  // Overloaded versions which are taking string vectors by reference to strore the variable names in
34  static std::unique_ptr<const GBRForest> createGBRForest(const std::string &weightFile, std::vector<std::string> &varNames);
35  static std::unique_ptr<const GBRForest> createGBRForest(const edm::FileInPath &weightFile, std::vector<std::string> &varNames);
36 
37 };
38 
39 #endif
static std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightFile)
char const * varNames[]