From f2969009b28385ddb759364d7e20ea35d3096b7a Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <mouginot.baptiste@gmail.com> Date: Tue, 18 Nov 2014 14:39:13 +0000 Subject: [PATCH] XS_MLP : correction of a possible bug when reading input xml file DecayDataBase, adding construction without specifying the logFile IsotopicVector : Add *= operator Pool bug correction on SetOutBackEnd facility method git-svn-id: svn+ssh://svn.in2p3.fr/class@446 0e7d625b-0364-4367-a6be-d5be4a48d228 --- source/branches/CLASSV3/Model/XS/XSM_MLP.cxx | 4 +++- source/branches/CLASSV3/include/DecayDataBank.hxx | 12 ++++++++++++ source/branches/CLASSV3/include/IsotopicVector.hxx | 1 + source/branches/CLASSV3/include/Pool.hxx | 4 ++-- source/branches/CLASSV3/src/DecayDataBank.cxx | 14 ++++++++++++++ source/branches/CLASSV3/src/IsotopicVector.cxx | 11 +++++++++++ 6 files changed, 43 insertions(+), 3 deletions(-) diff --git a/source/branches/CLASSV3/Model/XS/XSM_MLP.cxx b/source/branches/CLASSV3/Model/XS/XSM_MLP.cxx index e8a6a1f36..678a471f2 100644 --- a/source/branches/CLASSV3/Model/XS/XSM_MLP.cxx +++ b/source/branches/CLASSV3/Model/XS/XSM_MLP.cxx @@ -179,7 +179,7 @@ void XSM_MLP::GetMLPWeightFiles() string FileName= fichierLu->d_name ; if(FileName != "." && FileName != ".." ) { - if(FileName[FileName.size()-3]=='x' && FileName[FileName.size()-2]=='m' && FileName[FileName.size()-1]=='l' ) + if(FileName[FileName.size()-3]=='x' && FileName[FileName.size()-2]=='m' && FileName[FileName.size()-1]=='l' && FileName[0]!='.' ) fWeightFiles.push_back(FileName); } @@ -282,6 +282,7 @@ TTree* XSM_MLP::CreateTMVAInputTree(IsotopicVector isotopicvector,int TimeStep) //________________________________________________________________________ double XSM_MLP::ExecuteTMVA(string WeightFile,TTree* InputTree) { + DBGV( "File :" << WeightFile); // --- Create the Reader object TMVA::Reader *reader = new TMVA::Reader( "Silent" ); @@ -327,6 +328,7 @@ double XSM_MLP::ExecuteTMVA(string WeightFile,TTree* InputTree) Float_t val = (reader->EvaluateRegression( methodName ))[0]; delete reader; + DBGL return (double)val; } diff --git a/source/branches/CLASSV3/include/DecayDataBank.hxx b/source/branches/CLASSV3/include/DecayDataBank.hxx index 0a36905f6..af502e18c 100644 --- a/source/branches/CLASSV3/include/DecayDataBank.hxx +++ b/source/branches/CLASSV3/include/DecayDataBank.hxx @@ -57,6 +57,18 @@ class DecayDataBank : public CLASSObject /// Normal Constructor. DecayDataBank(); + + //{ + /// Special Constructor. + /*! + Use to load a CLASSLogger + \param CLASSLogger CLASSLogger used for the log... + \param DB_index_file path to the index file + \param setlog if the log are stored in the CLASSLogger + \param olfreadmethod true if the old format of EvolutionData are used (ie without the key word such as Inv, XSFiss...) + */ + DecayDataBank(string DB_index_file, bool olfreadmethod = false ); + //} //{ /// Special Constructor. /*! diff --git a/source/branches/CLASSV3/include/IsotopicVector.hxx b/source/branches/CLASSV3/include/IsotopicVector.hxx index f633ad336..054d7c902 100755 --- a/source/branches/CLASSV3/include/IsotopicVector.hxx +++ b/source/branches/CLASSV3/include/IsotopicVector.hxx @@ -110,6 +110,7 @@ public : IsotopicVector& operator+=(IsotopicVector const& IVb); //!<.... IsotopicVector& operator-=(IsotopicVector const& IVb); //!<.... IsotopicVector& operator*=(IsotopicVector const& IVb); //!<.... + IsotopicVector& operator*=(double const& factor); //!<.... bool operator <(const IsotopicVector& isotopicvector) const; //!< IsotopicVector Comparator //@} diff --git a/source/branches/CLASSV3/include/Pool.hxx b/source/branches/CLASSV3/include/Pool.hxx index 20379177a..dd131462b 100755 --- a/source/branches/CLASSV3/include/Pool.hxx +++ b/source/branches/CLASSV3/include/Pool.hxx @@ -86,8 +86,8 @@ public : void SetOutBackEndFacility(CLASSBackEnd* befacility) { fOutBackEndFacility = befacility; - SetIsStorageType(); - fPutToWaste = true; } //!< Set the Pointer to the Storage + SetIsStorageType(false); + fPutToWaste = false; } //!< Set the Pointer to the Storage void SetPutToWaste(bool val) { fPutToWaste = val; } //!< Set True if IV goes to waste after cooling false instead diff --git a/source/branches/CLASSV3/src/DecayDataBank.cxx b/source/branches/CLASSV3/src/DecayDataBank.cxx index 1a01303c8..0a184b104 100644 --- a/source/branches/CLASSV3/src/DecayDataBank.cxx +++ b/source/branches/CLASSV3/src/DecayDataBank.cxx @@ -33,6 +33,20 @@ DecayDataBank::DecayDataBank():CLASSObject(new CLASSLogger("DecayDataBank.log")) //________________________________________________________________________ //________________________________________________________________________ //________________________________________________________________________ + +//________________________________________________________________________ + +DecayDataBank::DecayDataBank(string DB_index_file, bool olfreadmethod):CLASSObject(new CLASSLogger("DecayDataBank.log")) +{ + + fDataBaseIndex = DB_index_file; + fOldReadMethod = olfreadmethod; + + // Warning + INFO << " A EvolutionData has been define :" << endl; + INFO << "\t His index is : \"" << DB_index_file << "\"" << endl << endl; + +} //________________________________________________________________________ DecayDataBank::DecayDataBank(CLASSLogger* log, string DB_index_file, bool olfreadmethod):CLASSObject(log) diff --git a/source/branches/CLASSV3/src/IsotopicVector.cxx b/source/branches/CLASSV3/src/IsotopicVector.cxx index 982fa5056..feca41f17 100755 --- a/source/branches/CLASSV3/src/IsotopicVector.cxx +++ b/source/branches/CLASSV3/src/IsotopicVector.cxx @@ -248,6 +248,17 @@ IsotopicVector& IsotopicVector::operator*=(const IsotopicVector& IVa) } +//________________________________________________________________________ +IsotopicVector& IsotopicVector::operator*=(const double& factor) +{ + + Multiply(factor); + + return *this; + +} + + //________________________________________________________________________ bool IsotopicVector::operator<(const IsotopicVector& isotopicvector) const { -- GitLab