diff --git a/HHbbTauTau.files b/HHbbTauTau.files index bc711035..f7488248 100644 --- a/HHbbTauTau.files +++ b/HHbbTauTau.files @@ -313,3 +313,4 @@ HHKinFit/include/HHParticle.h HHKinFit/include/PSTools.h Analysis/config/embedded.cfg debug.sh +RunTools/config/known_memory_leaks.supp diff --git a/HHbbTauTau.includes b/HHbbTauTau.includes index c8f68e65..4566edfb 100644 --- a/HHbbTauTau.includes +++ b/HHbbTauTau.includes @@ -6,5 +6,3 @@ $$(BOOST_INCLUDE_PATH) $$(ROOT_INCLUDE_PATH) $$(HEPMC_INCLUDE_PATH) /usr/include -HHKinFit/src -HHKinFit/include diff --git a/RecoilCorrector_v7/RecoilCorrector.hh b/RecoilCorrector_v7/RecoilCorrector.hh index 2f24e85f..a0ee890a 100644 --- a/RecoilCorrector_v7/RecoilCorrector.hh +++ b/RecoilCorrector_v7/RecoilCorrector.hh @@ -31,6 +31,7 @@ class RecoilCorrector public: RecoilCorrector(std::string iNameZDat, int iSeed=0xDEADBEEF); RecoilCorrector(std::string iNameZDat1, std::string iPrefix, int iSeed=0xDEADBEEF); + ~RecoilCorrector(); void CorrectAll(double &met, double &metphi, double iGenPt, double iGenPhi, double iLepPt, double iLepPhi,double &iU1,double &iU2,double iFluc,double iScale=0,int njet=0); void Correct(double &pfmet, double &pfmetphi, double &trkmet, double &trkmetphi, double iGenPt, double iGenPhi, double iLepPt, double iLepPhi,double iFluc ,double iScale=0,int njet=0); @@ -174,6 +175,8 @@ RecoilCorrector::RecoilCorrector(std::string iNameZ, int iSeed) { fId = 0; fJet = 0; } +RecoilCorrector::~RecoilCorrector() { delete fRandom; } + //----------------------------------------------------------------------------------------------------------------------------------------- void RecoilCorrector::addDataFile(std::string iNameData) { readRecoil(fD1U1Fit,fD1U1RMSSMFit,fD1U1RMS1Fit,fD1U1RMS2Fit,fD1U2Fit,fD1U2RMSSMFit,fD1U2RMS1Fit,fD1U2RMS2Fit,iNameData,"PF"); diff --git a/RunTools/config/known_memory_leaks.supp b/RunTools/config/known_memory_leaks.supp new file mode 100644 index 00000000..5c6f8383 --- /dev/null +++ b/RunTools/config/known_memory_leaks.supp @@ -0,0 +1,113 @@ +{ + libCint_leaks + Memcheck:Leak + ... + obj:*/libCint.so +} + +{ + libRIO_leaks + Memcheck:Leak + ... + obj:*/libRIO.so +} + +{ + dyld_leaks + Memcheck:Leak + ... + obj:/usr/lib/dyld +} + +{ + Foundation_C_leaks + Memcheck:Leak + ... + obj:/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation +} + +{ + CoreFoundation_A_leaks + Memcheck:Leak + ... + obj:/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +} + +{ + libsystem_info_leaks + Memcheck:Leak + ... + obj:/usr/lib/system/libsystem_info.dylib +} + +{ + StreamerInfo_leaks + Memcheck:Leak + ... + fun:*TStreamerInfo*Compile* +} + +{ + basic_ostream_buffer + Memcheck:Leak + match-leak-kinds: reachable + ... + fun:*char_traits*basic_ostream* +} + +{ + basic_istream_buffer + Memcheck:Leak + match-leak-kinds: reachable + ... + fun:*basic_istream*char_traits* +} + +{ + exception_buffer + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:__cxa_get_globals + fun:__cxa_throw +} + +{ + libCore_leaks_ROOT + Memcheck:Leak + ... + fun:*ROOT* + obj:*/libCore.so +} + +{ + libCore_leaks_TClass + Memcheck:Leak + ... + fun:*TClass* + obj:*/libCore.so +} + +{ + libCore_leaks_TCint + Memcheck:Leak + ... + fun:*TCint* + obj:*/libCore.so +} + +{ + libCore_leaks_TApplication + Memcheck:Leak + ... + fun:*TApplication* + obj:*/libCore.so +} + +{ + libCore_leaks_TFormula + Memcheck:Leak + ... + fun:*TFormula* + obj:*/libCore.so +} diff --git a/RunTools/make.sh b/RunTools/make.sh index 9c3b7ab7..99ca67bf 100755 --- a/RunTools/make.sh +++ b/RunTools/make.sh @@ -72,6 +72,7 @@ printf \ #include int main() { + int result = 0; try { gROOT->ProcessLine(\"#include \"); $NAME a( $arg_list ); @@ -79,13 +80,12 @@ int main() } catch(std::exception& e) { std::cerr << \"ERROR: \" << e.what() << std::endl; - return 1; + result = 1; } - return 0; + return result; } " > $CODE_OUT -#g++ -std=c++0x -Wall -O3 \ g++ -std=c++0x -Wall $COMPILE_FLAGS \ -I. -I$CMSSW_BASE/src -I$CMSSW_RELEASE_BASE/src -I$ROOT_INCLUDE_PATH -I$BOOST_INCLUDE_PATH \ $( root-config --libs ) -lMathMore -lGenVector -lTMVA -L$BOOST_BASE/lib -lboost_thread \ diff --git a/debug.sh b/debug.sh index 268f5efb..c3aa13b4 100755 --- a/debug.sh +++ b/debug.sh @@ -43,7 +43,8 @@ $SCRIPT_PATH/RunTools/make.sh $SCRIPT_RUN_PATH $JOB_NAME -g $* RESULT=$? if [[ $RESULT -eq 0 ]] ; then - valgrind --leak-check=full --track-origins=yes -v $EXE_NAME + valgrind -v --leak-check=full --show-leak-kinds=all --track-origins=yes --log-file=debug.log \ + --suppressions=RunTools/config/known_memory_leaks.supp --gen-suppressions=all $EXE_NAME rm -f "$EXE_NAME" fi