CMS 3D CMS Logo

Functions
GBRForestTools.h File Reference
#include "CondFormats/EgammaObjects/interface/GBRForest.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include <memory>

Go to the source code of this file.

Functions

std::unique_ptr< const GBRForestcreateGBRForest (const std::string &weightsFile)
 
std::unique_ptr< const GBRForestcreateGBRForest (const edm::FileInPath &weightsFile)
 
std::unique_ptr< const GBRForestcreateGBRForest (const std::string &weightsFile, std::vector< std::string > &varNames)
 
std::unique_ptr< const GBRForestcreateGBRForest (const edm::FileInPath &weightsFile, std::vector< std::string > &varNames)
 

Function Documentation

std::unique_ptr<const GBRForest> createGBRForest ( const std::string &  weightsFile)
std::unique_ptr<const GBRForest> createGBRForest ( const edm::FileInPath weightsFile)

Definition at line 278 of file GBRForestTools.cc.

References createGBRForest(), edm::FileInPath::fullPath(), and varNames.

279 {
280  std::vector<std::string> varNames;
281  return createGBRForest(weightsFile.fullPath(), varNames);
282 }
std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightsFile)
char const * varNames[]
std::string fullPath() const
Definition: FileInPath.cc:197
std::unique_ptr<const GBRForest> createGBRForest ( const std::string &  weightsFile,
std::vector< std::string > &  varNames 
)

Definition at line 286 of file GBRForestTools.cc.

References edm::FileInPath::fullPath(), init, and varNames.

287 {
288  std::unique_ptr<GBRForest> gbrForest;
289 
290  if(weightsFile[0] == '/') {
291  gbrForest = init(weightsFile, varNames);
292  }
293  else {
294  edm::FileInPath weightsFileEdm(weightsFile);
295  gbrForest = init( weightsFileEdm.fullPath(), varNames);
296  }
297  return gbrForest;
298 }
int init
Definition: HydjetWrapper.h:67
char const * varNames[]
std::unique_ptr<const GBRForest> createGBRForest ( const edm::FileInPath weightsFile,
std::vector< std::string > &  varNames 
)

Definition at line 301 of file GBRForestTools.cc.

References createGBRForest(), edm::FileInPath::fullPath(), and varNames.

302 {
303  return createGBRForest(weightsFile.fullPath(), varNames);
304 }
std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightsFile)
char const * varNames[]
std::string fullPath() const
Definition: FileInPath.cc:197