diff --git a/test/stressTMVA.cxx b/test/stressTMVA.cxx index 7aa114940e06c..5f2d8bda8b3d1 100644 --- a/test/stressTMVA.cxx +++ b/test/stressTMVA.cxx @@ -2097,7 +2097,7 @@ void MethodUnitTestWithROCLimits::run() // setup test tree access TFile* testFile = new TFile("weights/TMVA.root"); - TTree* testTree = (TTree*)(testFile->Get("TestTree")); + TTree* testTree = (TTree*)(testFile->GetDirectory("dataset")->Get("TestTree")); for (UInt_t i=0;i<_VariableNames->size();i++) testTree->SetBranchAddress(_TreeVariableNames->at(i),&testvar[i]); testTree->SetBranchAddress(_methodTitle.Data(),&testTreeVal); @@ -2106,15 +2106,15 @@ void MethodUnitTestWithROCLimits::run() variableNames2.push_back("var0"); variableNames2.push_back("var1"); TFile* testFile2 = new TFile("weights/ByHand.root"); - TTree* testTree2 = (TTree*)(testFile2->Get("TestTree")); + TTree* testTree2 = (TTree*)(testFile2->GetDirectory("dataset")->Get("TestTree")); testTree2->SetBranchAddress("var0",&dummy[0]); testTree2->SetBranchAddress("var1",&dummy[1]); TString readerName = _methodTitle + TString(" method"); TString readerOption="!Color:Silent"; - TString dir = "weights/TMVAUnitTesting_"; + TString dir = "dataset/weights/TMVAUnitTesting_"; TString weightfile=dir+_methodTitle+".weights.xml"; - TString weightfile2="weights/ByHand_BDT.weights.xml"; //TMVATest3VarF2VarI_BDT.weights.xml + TString weightfile2="dataset/weights/ByHand_BDT.weights.xml"; //TMVATest3VarF2VarI_BDT.weights.xml TString readerName2 = "BDT method"; double diff, maxdiff = 0., sumdiff=0., previousVal=0.; int stuckCount=0, nevt= TMath::Min((int) testTree->GetEntries(),100); @@ -2505,7 +2505,7 @@ void RegressionUnitTestWithDeviation::run() // setup test tree access TFile* testFile = new TFile("weights/TMVARegUT.root"); // fix me hardcoded file name - TTree* testTree = (TTree*)(testFile->Get("TestTree")); + TTree* testTree = (TTree*)(testFile->GetDirectory("dataset")->Get("TestTree")); const int nTest=3; // 3 reader usages float testTarget,readerVal=0.; @@ -2523,7 +2523,7 @@ void RegressionUnitTestWithDeviation::run() testTree->SetBranchAddress(_methodTitle.Data(),&testTarget); TString readerName = _methodTitle + TString(" method"); - TString dir = "weights/TMVARegressionUnitTesting_"; + TString dir = "dataset/weights/TMVARegressionUnitTesting_"; TString weightfile=dir+_methodTitle+".weights.xml"; double diff, maxdiff = 0., sumdiff=0., previousVal=0.; int stuckCount=0, nevt= TMath::Min((int) testTree->GetEntries(),50); diff --git a/tmva/tmva/inc/TMVA/MethodCFMlpANN.h b/tmva/tmva/inc/TMVA/MethodCFMlpANN.h index b73fe73006e59..39d13cee95061 100644 --- a/tmva/tmva/inc/TMVA/MethodCFMlpANN.h +++ b/tmva/tmva/inc/TMVA/MethodCFMlpANN.h @@ -134,7 +134,8 @@ namespace TMVA { Int_t GetClass( Int_t ivar ) const { return (*fClass)[ivar]; } // static pointer to this object (required for external functions - static MethodCFMlpANN* This( void ); + //NOTE: removed static value for new design + MethodCFMlpANN* This( void ); // ranking of input variables const Ranking* CreateRanking() { return 0; } @@ -161,7 +162,7 @@ namespace TMVA { void DeclareOptions(); void ProcessOptions(); - static MethodCFMlpANN* fgThis; // this carrier + MethodCFMlpANN* fgThis; // this carrier // LUTs TMatrixF *fData; // the (data,var) string diff --git a/tmva/tmva/src/MethodCFMlpANN.cxx b/tmva/tmva/src/MethodCFMlpANN.cxx index 4ed85251f9c47..df648269d448a 100644 --- a/tmva/tmva/src/MethodCFMlpANN.cxx +++ b/tmva/tmva/src/MethodCFMlpANN.cxx @@ -95,7 +95,6 @@ namespace TMVA { Int_t MethodCFMlpANN_nsel = 0; } -TMVA::MethodCFMlpANN* TMVA::MethodCFMlpANN::fgThis = 0; //////////////////////////////////////////////////////////////////////////////// /// standard constructor @@ -140,7 +139,7 @@ TMVA::MethodCFMlpANN::MethodCFMlpANN( const TString& jobName, fYNN(0) { MethodCFMlpANN_Utils::SetLogger(&Log()); - + fgThis = 0; } //////////////////////////////////////////////////////////////////////////////// @@ -157,6 +156,7 @@ TMVA::MethodCFMlpANN::MethodCFMlpANN( DataSetInfo& theData, fNodes(0), fYNN(0) { + fgThis = 0; } //////////////////////////////////////////////////////////////////////////////// diff --git a/tmva/tmva/src/MethodPDEFoam.cxx b/tmva/tmva/src/MethodPDEFoam.cxx index a40412cf0f318..06879f2528ea2 100644 --- a/tmva/tmva/src/MethodPDEFoam.cxx +++ b/tmva/tmva/src/MethodPDEFoam.cxx @@ -1497,8 +1497,11 @@ void TMVA::MethodPDEFoam::FillVariableNamesToFoam() const /// write PDEFoam-specific classifier response /// NOT IMPLEMENTED YET! -void TMVA::MethodPDEFoam::MakeClassSpecific( std::ostream& /*fout*/, const TString& /*className*/ ) const +void TMVA::MethodPDEFoam::MakeClassSpecific( std::ostream& fout, const TString& className ) const { + // write specific classifier response + fout << " // not implemented for class: \"" << className << "\"" << std::endl; + fout << "};" << std::endl; } //////////////////////////////////////////////////////////////////////////////// diff --git a/tmva/tmva/src/ROCCurve.cxx b/tmva/tmva/src/ROCCurve.cxx index 910e2edcb73e0..b9dac8219dd50 100644 --- a/tmva/tmva/src/ROCCurve.cxx +++ b/tmva/tmva/src/ROCCurve.cxx @@ -66,7 +66,7 @@ TMVA::ROCCurve::~ROCCurve() { Double_t TMVA::ROCCurve::GetROCIntegral(){ Float_t integral=0; - int ndivisions = 20; + int ndivisions = 40; std::vector vec_epsilon_s(1); vec_epsilon_s.push_back(0); diff --git a/tutorials/tmva/TMVAClassification.C b/tutorials/tmva/TMVAClassification.C index 5cf0c82107ec6..6d1d498fb4117 100644 --- a/tutorials/tmva/TMVAClassification.C +++ b/tutorials/tmva/TMVAClassification.C @@ -57,7 +57,7 @@ #include "TMVA/Tools.h" #include "TMVA/TMVAGui.h" -int TMVAClassification( TString myMethodList = "" ) +void TMVAClassification( TString myMethodList = "" ) { // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc // if you use your private .rootrc, or run from a different directory, please copy the @@ -154,7 +154,7 @@ int TMVAClassification( TString myMethodList = "" ) std::cout << "Method \"" << regMethod << "\" not known in TMVA under this name. Choose among the following:" << std::endl; for (std::map::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first << " "; std::cout << std::endl; - return 1; + return; } Use[regMethod] = 1; } @@ -496,8 +496,6 @@ int TMVAClassification( TString myMethodList = "" ) delete dataloader; // Launch the GUI for the root macros if (!gROOT->IsBatch()) TMVA::TMVAGui( outfileName ); - - return 0; } int main( int argc, char** argv ) @@ -510,5 +508,7 @@ int main( int argc, char** argv ) if (!methodList.IsNull()) methodList += TString(","); methodList += regMethod; } - return TMVAClassification(methodList); + + TMVAClassification(methodList); + return 0; }