Main Page
Namespaces
Classes
Package Documentation
CommonTools
MVAUtils
interface
TMVAZipReader.h
Go to the documentation of this file.
1
/*
2
* =====================================================================================
3
*
4
* Filename: TMVAZipReader.h
5
*
6
* Description: A stupid function that initializes a TMVA Reader
7
* using a gzipped or non-zipped xml file.
8
*
9
* The file will be unzipped if it ends in .gz or .gzip
10
* It will be passed as normal if it ends in .xml
11
*
12
* This file is header-only.
13
*
14
* Usage: loadTMVAWeights(&myReader, "BDT", "path_to_file.xml.gz");
15
*
16
*
17
* Author: Evan Friis, evan.friis@cern.ch
18
* Company: UW Madison
19
*
20
* =====================================================================================
21
*/
22
23
#ifndef CommonTools_MVAUtils_TMVAZipReader_h
24
#define CommonTools_MVAUtils_TMVAZipReader_h
25
26
#include "TMVA/IMethod.h"
27
#include "TMVA/Reader.h"
28
#include <string>
29
30
namespace
reco::details
{
31
32
bool
hasEnding
(
std::string
const
& fullString,
std::string
const
& ending);
33
char
*
readGzipFile
(
const
std::string
&
weightFile
);
34
35
TMVA::IMethod*
loadTMVAWeights
(
36
TMVA::Reader*
reader
,
const
std::string
&
method
,
const
std::string
& weightFile,
bool
verbose
=
false
);
37
38
}
39
40
#endif
reco::details::hasEnding
bool hasEnding(std::string const &fullString, std::string const &ending)
Definition:
TMVAZipReader.cc:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
verbose
Definition:
MagVerbosity.h:13
reco::details
Definition:
TMVAZipReader.h:30
AlcaSiPixelAliHarvester0T_cff.method
method
Definition:
AlcaSiPixelAliHarvester0T_cff.py:41
reco::details::readGzipFile
char * readGzipFile(const std::string &weightFile)
Definition:
TMVAZipReader.cc:20
electrons_cff.weightFile
weightFile
Definition:
electrons_cff.py:265
reco::details::loadTMVAWeights
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
Definition:
TMVAZipReader.cc:54
matplotRender.reader
reader
Definition:
matplotRender.py:815
Generated for CMSSW Reference Manual by
1.8.11