63 Types::EMVA methodType,
68 :
TMVA::
MethodBase( jobName, methodType, methodTitle, theData, theOption, theTargetDir ),
69 fCurrentMethodIdx(0), fCurrentMethod(0)
79 fCurrentMethodIdx(0), fCurrentMethod(0)
87 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin();
88 std::vector<IMethod*>::const_iterator itrMethodEnd =
fMethods.end();
90 for (; itrMethod != itrMethodEnd; itrMethod++) {
102 std::vector<IMethod*>::const_iterator itrMethod =
fMethods.begin()+index;
103 if (itrMethod<
fMethods.end())
return *itrMethod;
139 std::vector<IMethod*>::iterator itrMethod =
fMethods.begin();
140 for (; itrMethod !=
fMethods.end(); itrMethod++) {
141 Log() <<
kVERBOSE <<
"Delete method: " << (*itrMethod)->GetName() <<
Endl;
153 TString methodName, methodTypeName, jobName, optionString;
160 for (
UInt_t i=0; i< nMethods; i++) {
161 Double_t methodWeight, methodSigCut, methodSigCutOrientation;
164 gTools().
ReadAttr( ch,
"MethodSigCutOrientation", methodSigCutOrientation);
171 if (
gTools().HasAttr( ch,
"UseMainMethodTransformation")) {
173 gTools().
ReadAttr( ch,
"UseMainMethodTransformation", rerouteString );
190 std::string(methodTypeName),jobName, methodName,
DataInfo(),optionString));
226 istr >> dummy >> methodNum;
227 Log() <<
kINFO <<
"Read " << methodNum <<
" Classifiers" <<
Endl;
231 for (
UInt_t i=0; i<methodNum; i++) {
232 istr >> dummy >> methodName >> dummy >>
fCurrentMethodIdx >> dummy >> methodWeight;
234 Log() <<
kFATAL <<
"Error while reading weight file; mismatch MethodIndex=" 236 <<
" MethodName " << methodName
237 <<
" dummy " << dummy
238 <<
" MethodWeight= " << methodWeight
242 istr >> dummy >> jobName;
243 istr >> dummy >> methodTitle;
244 istr >> dummy >> optionString;
250 methodTitle,
DataInfo(), optionString) );
253 m->ReadWeightsFromStream(istr);
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
void SetMsgType(EMsgType t)
MsgLogger & Endl(MsgLogger &ml)
void ReadWeightsFromXML(void *wghtnode)
XML streamer.
TString & ReplaceAll(const TString &s1, const TString &s2)
TransformationHandler * fTransformationPointer
void SetSignalReferenceCutOrientation(Double_t cutOrientation)
TransformationHandler & GetTransformationHandler(Bool_t takeReroutedIfAvailable=true)
void ToLower()
Change string to lower-case.
void ReadWeightsFromStream(std::istream &istr)
text streamer
MethodCompositeBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="", TDirectory *theTargetDir=NULL)
static Types & Instance()
the the single instance of "Types" if existin already, or create it (Signleton)
void AddWeightsXMLTo(void *parent) const
IMethod * GetMethod(const TString &title) const
returns pointer to MVA that corresponds to given method title
std::vector< Double_t > fMethodWeight
virtual ~MethodCompositeBase(void)
delete methods
virtual void ParseOptions()
options parser
void SetupMethod()
setup of methods
DataSetInfo & DataInfo() const
virtual void AddWeightsXMLTo(void *parent) const =0
virtual void ReadWeightsFromXML(void *wghtnode)=0
char * Form(const char *fmt,...)
const TString & GetJobName() const
const TString & GetMethodName() const
Double_t GetSignalReferenceCutOrientation() const
virtual void CheckSetup()
check may be overridden by derived class (sometimes, eg, fitters are used which can only be implement...
void RerouteTransformationHandler(TransformationHandler *fTargetTransformation)
Describe directory structure in memory.
static RooMathCoreReg dummy
void ProcessSetup()
process all options the "CheckForUnusedOptions" is done in an independent call, since it may be overr...
const TString & GetOptions() const
std::vector< IMethod * > fMethods
Abstract ClassifierFactory template that handles arbitrary types.
Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
return composite MVA response
TString GetMethodTypeName() const
Double_t GetSignalReferenceCut() const
Types::EMVA GetMethodType() const
void NoErrorCalc(Double_t *const err, Double_t *const errUpper)
void SetSignalReferenceCut(Double_t cut)