From a157249542ec64bbaa4b55c723280da4e0d37138 Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Fri, 15 Nov 2013 17:22:39 +0100 Subject: [PATCH 01/85] Now the calling of TMVAGui etc from the example macros should work again within TMVA as it comes with the ROOT release --- tmva/test/.rootrc | 6 ++++-- tmva/test/Boost.C | 11 ++++++++++- tmva/test/Boost2.C | 11 ++++++++++- tmva/test/PlotDecisionBoundary.C | 1 - tmva/test/TMVAClassification.C | 10 +++++++++- tmva/test/TMVAClassificationApplication.C | 2 -- tmva/test/TMVAClassificationCategory.C | 12 +++++++++++- tmva/test/TMVAMultiClassGui.C | 6 +++--- tmva/test/TMVAMulticlass.C | 10 +++++++++- tmva/test/TMVAMulticlass.cxx | 15 +++++++++++---- tmva/test/TMVARegression.C | 9 ++++++++- tmva/test/setup.sh | 12 ++++++------ 12 files changed, 81 insertions(+), 24 deletions(-) diff --git a/tmva/test/.rootrc b/tmva/test/.rootrc index d14214d6ef395..67a49ddb86e11 100644 --- a/tmva/test/.rootrc +++ b/tmva/test/.rootrc @@ -1,6 +1,8 @@ -Unix.*.Root.MacroPath: .:$TMVASYS/test +Unix.*.Root.MacroPath: .:$TMVASYS/test:$(ROOTSYS)/macros + +Unix.*.Root.DynamicPath: $TMVASYS/lib:$(ROOTSYS)/lib + -Unix.*.Root.DynamicPath: $TMVASYS/lib Rint.Logon: TMVAlogon.C Rint.Logoff: TMVAlogoff.C Root.History: ./.root_hist diff --git a/tmva/test/Boost.C b/tmva/test/Boost.C index 87e41da9ab480..38357faac8f54 100644 --- a/tmva/test/Boost.C +++ b/tmva/test/Boost.C @@ -12,7 +12,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAGui.C" #ifndef __CINT__ #include "TMVA/Tools.h" @@ -22,6 +21,16 @@ using namespace TMVA; void Boost(){ + // This loads the library + TMVA::Tools::Instance(); + + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAGui.C"); + TString outfileName = "boost.root"; TFile* outputFile = TFile::Open( outfileName, "RECREATE" ); TMVA::Factory *factory = new TMVA::Factory( "TMVAClassification", outputFile, diff --git a/tmva/test/Boost2.C b/tmva/test/Boost2.C index 63a80667cec27..a1caeb7c53027 100644 --- a/tmva/test/Boost2.C +++ b/tmva/test/Boost2.C @@ -12,7 +12,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAGui.C" #ifndef __CINT__ #include "TMVA/Tools.h" @@ -22,6 +21,16 @@ using namespace TMVA; void Boost2(){ + // This loads the library + TMVA::Tools::Instance(); + + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAGui.C"); + TString outfileName = "boost.root"; TFile* outputFile = TFile::Open( outfileName, "RECREATE" ); TMVA::Factory *factory = new TMVA::Factory( "TMVAClassification", outputFile, diff --git a/tmva/test/PlotDecisionBoundary.C b/tmva/test/PlotDecisionBoundary.C index 565568578fb45..1579c1173818b 100755 --- a/tmva/test/PlotDecisionBoundary.C +++ b/tmva/test/PlotDecisionBoundary.C @@ -21,7 +21,6 @@ #include "TH2F.h" #include "TH3F.h" -#include "TMVAGui.C" #include "tmvaglob.C" #if not defined(__CINT__) || defined(__MAKECINT__) diff --git a/tmva/test/TMVAClassification.C b/tmva/test/TMVAClassification.C index 87e04d393941d..22132b071edf9 100644 --- a/tmva/test/TMVAClassification.C +++ b/tmva/test/TMVAClassification.C @@ -40,7 +40,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAGui.C" #if not defined(__CINT__) || defined(__MAKECINT__) // needs to be included when makecint runs (ACLIC) @@ -69,6 +68,15 @@ void TMVAClassification( TString myMethodList = "" ) // This loads the library TMVA::Tools::Instance(); + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAGui.C"); + + + // Default MVA methods to be trained + tested std::map Use; diff --git a/tmva/test/TMVAClassificationApplication.C b/tmva/test/TMVAClassificationApplication.C index c1afa6dbd38e4..012aef220f07e 100644 --- a/tmva/test/TMVAClassificationApplication.C +++ b/tmva/test/TMVAClassificationApplication.C @@ -20,8 +20,6 @@ #include "TROOT.h" #include "TStopwatch.h" -#include "TMVAGui.C" - #if not defined(__CINT__) || defined(__MAKECINT__) #include "TMVA/Tools.h" #include "TMVA/Reader.h" diff --git a/tmva/test/TMVAClassificationCategory.C b/tmva/test/TMVAClassificationCategory.C index 43cc167ddd6de..5ced6009cd37b 100644 --- a/tmva/test/TMVAClassificationCategory.C +++ b/tmva/test/TMVAClassificationCategory.C @@ -33,7 +33,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAGui.C" #if not defined(__CINT__) || defined(__MAKECINT__) // needs to be included when makecint runs (ACLIC) @@ -52,6 +51,17 @@ void TMVAClassificationCategory() std::cout << std::endl << "==> Start TMVAClassificationCategory" << std::endl; + // This loads the library + TMVA::Tools::Instance(); + + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAGui.C"); + + bool batchMode = false; // Create a new root output file. diff --git a/tmva/test/TMVAMultiClassGui.C b/tmva/test/TMVAMultiClassGui.C index 91a2b5742ba8a..c8fefe07aa9b5 100644 --- a/tmva/test/TMVAMultiClassGui.C +++ b/tmva/test/TMVAMultiClassGui.C @@ -67,7 +67,7 @@ void TMVAMultiClassGui( const char* fName = "TMVAMulticlass.root" ) gSystem->SetIncludePath(newIncludePath); std::cout <<"new include path="<GetIncludePath()< Abort TMVAGui, please verify filename" << endl; + std::cout << "==> Abort TMVAGui, please verify filename" << std::endl; return; } // find all references @@ -272,7 +272,7 @@ void TMVAMultiClassGui( const char* fName = "TMVAMulticlass.root" ) // indicate inactive buttons for (UInt_t i=0; iSetButtonState( TMVAGui_inactiveButtons[i], 3 ); if (TMVAGui_inactiveButtons.size() > 0) { - cout << "=== Note: inactive buttons indicate that the corresponding classifiers were not trained ===" << endl; + std::cout << "=== Note: inactive buttons indicate that the corresponding classifiers were not trained ===" << std::endl; } gROOT->SaveContext(); diff --git a/tmva/test/TMVAMulticlass.C b/tmva/test/TMVAMulticlass.C index 3ecd4c606f83a..15d4818aef2ae 100644 --- a/tmva/test/TMVAMulticlass.C +++ b/tmva/test/TMVAMulticlass.C @@ -18,7 +18,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAMultiClassGui.C" #ifndef __CINT__ #include "TMVA/Tools.h" @@ -30,7 +29,16 @@ using namespace TMVA; void TMVAMulticlass( TString myMethodList = "" ) { + // This loads the library TMVA::Tools::Instance(); + + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAMultiClassGui.C"); + //--------------------------------------------------------------- // default MVA methods to be trained + tested diff --git a/tmva/test/TMVAMulticlass.cxx b/tmva/test/TMVAMulticlass.cxx index 9c3c2047ecb0d..5c0aefd028ee1 100644 --- a/tmva/test/TMVAMulticlass.cxx +++ b/tmva/test/TMVAMulticlass.cxx @@ -18,8 +18,6 @@ #include "TSystem.h" #include "TROOT.h" -#include "TMVAMultiClassGui.C" - #ifndef __CINT__ #include "TMVA/Tools.h" #include "TMVA/Factory.h" @@ -30,7 +28,16 @@ using namespace TMVA; int main(int argc, char** argv ) { + // This loads the library TMVA::Tools::Instance(); + + // to get access to the GUI and all tmva macros + TString tmva_dir(TString(gRootDir) + "/tmva"); + if(gSystem->Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVAGui.C"); + //--------------------------------------------------------------- // default MVA methods to be trained + tested @@ -80,10 +87,10 @@ int main(int argc, char** argv ) input = TFile::Open( fname ); } else { - cout << "Creating testdata...." << std::endl; + std::cout << "Creating testdata...." << std::endl; gROOT->ProcessLine(".L createData.C+"); gROOT->ProcessLine("create_MultipleBackground(2000)"); - cout << " created tmva_example_multiple_background.root for tests of the multiclass features"<Getenv("TMVASYS")) + tmva_dir = TString(gSystem->Getenv("TMVASYS")); + gROOT->SetMacroPath(tmva_dir + "/test/:" + gROOT->GetMacroPath() ); + gROOT->ProcessLine(".L TMVARegGui.C"); + + // Default MVA methods to be trained + tested std::map Use; diff --git a/tmva/test/setup.sh b/tmva/test/setup.sh index e330b24201725..0e732217d147a 100755 --- a/tmva/test/setup.sh +++ b/tmva/test/setup.sh @@ -40,12 +40,12 @@ echo "use TMVA version installed in " $TMVASYS #cd test; if [[ ! -h tmva_example.root && $TMVATESTDIR -eq 1 ]]; then ln -s data/toy_sigbkg.root tmva_example.root; fi if [[ ! -h tmva_reg_example.root && $TMVATESTDIR -eq 1 ]]; then ln -s data/regression_parabola_noweights.root tmva_reg_example.root; fi -ln -sf $TMVASYS/lib/libTMVA.rootmap; -ln -sf $TMVASYS/lib/libTMVA.rootmap .rootmap; -if [[ ! -f TMVAlogon.C ]]; then cp $TMVASYS/test/TMVAlogon.C . ; fi -if [[ ! -f TMVAGui.C ]]; then cp $TMVASYS/test/TMVAGui.C . ; fi -if [[ ! -f TMVARegGui.C ]]; then cp $TMVASYS/test/TMVARegGui.C . ; fi -if [[ ! -f tmvaglob.C ]]; then cp $TMVASYS/test/tmvaglob.C . ; fi +#ln -sf $TMVASYS/lib/libTMVA.rootmap; +#ln -sf $TMVASYS/lib/libTMVA.rootmap .rootmap; +#if [[ ! -f TMVAlogon.C ]]; then cp $TMVASYS/test/TMVAlogon.C . ; fi +#if [[ ! -f TMVAGui.C ]]; then cp $TMVASYS/test/TMVAGui.C . ; fi +#if [[ ! -f TMVARegGui.C ]]; then cp $TMVASYS/test/TMVARegGui.C . ; fi +#if [[ ! -f tmvaglob.C ]]; then cp $TMVASYS/test/tmvaglob.C . ; fi if [[ ! -f .rootrc ]]; then cp $TMVASYS/test/.rootrc . ; fi From e6a185e09cb058c364a6f4f054cb6a67f31ffa7c Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Fri, 15 Nov 2013 16:50:51 +0100 Subject: [PATCH 02/85] TDirectory parse speedup (buffer overflow safe) --- core/base/inc/TDirectory.h | 2 +- core/base/src/TDirectory.cxx | 39 ++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/core/base/inc/TDirectory.h b/core/base/inc/TDirectory.h index 0bdfcdc432987..2e27328e45c10 100644 --- a/core/base/inc/TDirectory.h +++ b/core/base/inc/TDirectory.h @@ -197,7 +197,7 @@ class TDirectory : public TNamed { virtual void WriteKeys() {} static Bool_t Cd(const char *path); - static void DecodeNameCycle(const char *namecycle, char *name, Short_t &cycle, Ssiz_t maxlen = 0); + static void DecodeNameCycle(const char *namecycle, char *name, Short_t &cycle, const Ssiz_t maxlen = 0); static void EncodeNameCycle(char *buffer, const char *name, Short_t cycle); ClassDef(TDirectory,5) //Describe directory structure in memory diff --git a/core/base/src/TDirectory.cxx b/core/base/src/TDirectory.cxx index f4b40b165cdbb..753111538e951 100644 --- a/core/base/src/TDirectory.cxx +++ b/core/base/src/TDirectory.cxx @@ -1090,28 +1090,33 @@ void TDirectory::EncodeNameCycle(char *buffer, const char *name, Short_t cycle) //______________________________________________________________________________ void TDirectory::DecodeNameCycle(const char *buffer, char *name, Short_t &cycle, - Ssiz_t maxlen) + const Ssiz_t maxlen) { // Decode a namecycle "aap;2" into name "aap" and cycle "2". - cycle = 9999; - Ssiz_t nch = buffer ? strlen(buffer) : 0; - if (maxlen && (nch > maxlen)) nch = maxlen; - for (Ssiz_t i = 0; i < nch; i++) { - if (buffer[i] != ';') - name[i] = buffer[i]; - else { - name[i] = 0; - if (i < nch-1 ) - if (buffer[i+1] == '*') { - cycle = 10000; - return; - } - sscanf(buffer+i+1, "%hd", &cycle); - return; + char *sc = strchr(buffer, ';'); + if (sc) { + // Cycle specified + Ssiz_t len = sc - buffer; + if (maxlen && len > maxlen) + len = maxlen; + strncpy(name, buffer, len); + name[len] = '\0'; + if (*(++sc) == '*') { + cycle = 10000; } + else if (isdigit(*sc)) { + // Negative numbers not allowed + cycle = atoi(sc); + } + else cycle = 9999; + } + else { + // No cycle specified + if (maxlen) strncpy(name, buffer, maxlen); + else strcpy(name, buffer); // unsafe + cycle = 9999; } - name[nch] = 0; } //______________________________________________________________________________ From afa5f25762864ee6f472bef0579c1e2c8d913e6b Mon Sep 17 00:00:00 2001 From: Gerardo Ganis Date: Fri, 15 Nov 2013 18:14:14 +0100 Subject: [PATCH 03/85] Fix portability of previous patch --- core/base/src/TDirectory.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/base/src/TDirectory.cxx b/core/base/src/TDirectory.cxx index 753111538e951..91828c06fa577 100644 --- a/core/base/src/TDirectory.cxx +++ b/core/base/src/TDirectory.cxx @@ -8,6 +8,7 @@ * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ +#include #include "Riostream.h" #include "Strlen.h" @@ -1090,11 +1091,11 @@ void TDirectory::EncodeNameCycle(char *buffer, const char *name, Short_t cycle) //______________________________________________________________________________ void TDirectory::DecodeNameCycle(const char *buffer, char *name, Short_t &cycle, - const Ssiz_t maxlen) + const Ssiz_t maxlen) { // Decode a namecycle "aap;2" into name "aap" and cycle "2". - char *sc = strchr(buffer, ';'); + char *sc = (char *) strchr(buffer, ';'); if (sc) { // Cycle specified Ssiz_t len = sc - buffer; @@ -1104,14 +1105,13 @@ void TDirectory::DecodeNameCycle(const char *buffer, char *name, Short_t &cycle, name[len] = '\0'; if (*(++sc) == '*') { cycle = 10000; - } - else if (isdigit(*sc)) { + } else if (isdigit(*sc)) { // Negative numbers not allowed cycle = atoi(sc); + } else { + cycle = 9999; } - else cycle = 9999; - } - else { + } else { // No cycle specified if (maxlen) strncpy(name, buffer, maxlen); else strcpy(name, buffer); // unsafe From 4b3545c7d823e3d11af071dacba11a199b7030aa Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Mon, 18 Nov 2013 09:43:29 +0100 Subject: [PATCH 04/85] Fix memory leak in TSQLiteStatement. Fixes ROOT-5720. By Oliver Freyemuth. --- sql/sqlite/src/TSQLiteStatement.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sqlite/src/TSQLiteStatement.cxx b/sql/sqlite/src/TSQLiteStatement.cxx index 02d38ac565d70..073f1bb8c54f2 100644 --- a/sql/sqlite/src/TSQLiteStatement.cxx +++ b/sql/sqlite/src/TSQLiteStatement.cxx @@ -65,6 +65,8 @@ void TSQLiteStatement::Close(Option_t *) } fStmt->fRes = 0; + fStmt->fConn = 0; + delete fStmt; } From 1189016a2c6126fdd2d2e119b0a6e65883c830fe Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Sat, 16 Nov 2013 19:20:11 +0100 Subject: [PATCH 05/85] Always invoke DecodeNameCycle with the length arg Signed-off-by: Fons Rademakers --- io/io/src/TDirectoryFile.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/io/io/src/TDirectoryFile.cxx b/io/io/src/TDirectoryFile.cxx index 23f9c87756109..300c6a1c284d8 100644 --- a/io/io/src/TDirectoryFile.cxx +++ b/io/io/src/TDirectoryFile.cxx @@ -593,7 +593,7 @@ void TDirectoryFile::Delete(const char *namecycle) TDirectory::TContext ctxt(gDirectory, this); Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(namecycle, name, cycle); + DecodeNameCycle(namecycle, name, cycle, kMaxLen); Int_t deleteall = 0; Int_t deletetree = 0; @@ -718,7 +718,7 @@ TKey *TDirectoryFile::FindKey(const char *keyname) const Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(keyname, name, cycle); + DecodeNameCycle(keyname, name, cycle, kMaxLen); return GetKey(name,cycle); } @@ -734,7 +734,7 @@ TKey *TDirectoryFile::FindKeyAny(const char *keyname) const Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(keyname, name, cycle); + DecodeNameCycle(keyname, name, cycle, kMaxLen); TIter next(GetListOfKeys()); TKey *key; @@ -777,7 +777,7 @@ TObject *TDirectoryFile::FindObjectAny(const char *aname) const Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(aname, name, cycle); + DecodeNameCycle(aname, name, cycle, kMaxLen); TIter next(GetListOfKeys()); TKey *key; @@ -849,7 +849,7 @@ TObject *TDirectoryFile::Get(const char *namecycle) Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(namecycle, name, cycle); + DecodeNameCycle(namecycle, name, cycle, kMaxLen); Int_t nch = strlen(name); for (Int_t i = nch-1; i > 0; i--) { if (name[i] == '/') { @@ -949,7 +949,7 @@ void *TDirectoryFile::GetObjectChecked(const char *namecycle, const TClass* expe Short_t cycle; char name[kMaxLen]; - DecodeNameCycle(namecycle, name, cycle); + DecodeNameCycle(namecycle, name, cycle, kMaxLen); Int_t nch = strlen(name); for (Int_t i = nch-1; i > 0; i--) { if (name[i] == '/') { From ce03ed630e05851145d68f3a4d1c14cf08a2d4db Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Sun, 17 Nov 2013 18:29:32 +0100 Subject: [PATCH 06/85] Turned CID 53502 into a warning user message DecodeNameCycle() is now safe against buffer overflows: in order to keep it backwards-compatible, an "unsafe" use mode has been retained and triggered a Coverity notification. The "unsafe mode" now does not trigger Coverity but instead warns the user via an on screen message. Signed-off-by: Fons Rademakers --- core/base/inc/TDirectory.h | 2 +- core/base/src/TDirectory.cxx | 55 +++++++++++++++++++++--------------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/core/base/inc/TDirectory.h b/core/base/inc/TDirectory.h index 2e27328e45c10..8e45657896fc5 100644 --- a/core/base/inc/TDirectory.h +++ b/core/base/inc/TDirectory.h @@ -197,7 +197,7 @@ class TDirectory : public TNamed { virtual void WriteKeys() {} static Bool_t Cd(const char *path); - static void DecodeNameCycle(const char *namecycle, char *name, Short_t &cycle, const Ssiz_t maxlen = 0); + static void DecodeNameCycle(const char *namecycle, char *name, Short_t &cycle, const size_t namesize = 0); static void EncodeNameCycle(char *buffer, const char *name, Short_t cycle); ClassDef(TDirectory,5) //Describe directory structure in memory diff --git a/core/base/src/TDirectory.cxx b/core/base/src/TDirectory.cxx index 91828c06fa577..76a2f5c42ebbd 100644 --- a/core/base/src/TDirectory.cxx +++ b/core/base/src/TDirectory.cxx @@ -1091,32 +1091,41 @@ void TDirectory::EncodeNameCycle(char *buffer, const char *name, Short_t cycle) //______________________________________________________________________________ void TDirectory::DecodeNameCycle(const char *buffer, char *name, Short_t &cycle, - const Ssiz_t maxlen) + const size_t namesize) { - // Decode a namecycle "aap;2" into name "aap" and cycle "2". - - char *sc = (char *) strchr(buffer, ';'); - if (sc) { - // Cycle specified - Ssiz_t len = sc - buffer; - if (maxlen && len > maxlen) - len = maxlen; - strncpy(name, buffer, len); - name[len] = '\0'; - if (*(++sc) == '*') { - cycle = 10000; - } else if (isdigit(*sc)) { - // Negative numbers not allowed - cycle = atoi(sc); - } else { - cycle = 9999; - } + // Decode a namecycle "aap;2" into name "aap" and cycle "2". Destination + // buffer size for name (including string terminator) should be specified in + // namesize. + + size_t len = 0; + const char *ni = strchr(buffer, ';'); + + if (ni) { + // Found ';' + len = ni - buffer; + ++ni; } else { - // No cycle specified - if (maxlen) strncpy(name, buffer, maxlen); - else strcpy(name, buffer); // unsafe - cycle = 9999; + // No ';' found + len = strlen(buffer); + ni = &buffer[len]; + } + + if (namesize) { + if (len > namesize-1ul) len = namesize-1; // accommodate string terminator + } else { + ::Warning("TDirectory::DecodeNameCycle", + "Using unsafe version: invoke this metod by specifying the buffer size"); } + + strncpy(name, buffer, len); + name[len] = '\0'; + + if (*ni == '*') + cycle = 10000; + else if (isdigit(*ni)) + cycle = atoi(ni); + else + cycle = 9999; } //______________________________________________________________________________ From d7091579e0c997fa9c1c871f1d1832e517bb5c73 Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Mon, 18 Nov 2013 11:56:14 +0100 Subject: [PATCH 07/85] switch off color and progress bar by default under windows --- tmva/src/Factory.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tmva/src/Factory.cxx b/tmva/src/Factory.cxx index 3ea6204ffb57b..b7bcc19a5466e 100644 --- a/tmva/src/Factory.cxx +++ b/tmva/src/Factory.cxx @@ -91,7 +91,7 @@ TMVA::Factory::Factory( TString jobName, TFile* theTargetFile, TString theOption : Configurable ( theOption ), fDataSetManager ( NULL ), //DSMTEST fDataInputHandler ( new DataInputHandler ), - fTransformations ( "" ), + fTransformations ( "I" ), fVerbose ( kFALSE ), fJobName ( jobName ), fDataAssignType ( kAssignEvents ), @@ -122,8 +122,14 @@ TMVA::Factory::Factory( TString jobName, TFile* theTargetFile, TString theOption // directory and hence don't go out of scope when closing the file // TH1::AddDirectory(kFALSE); Bool_t silent = kFALSE; +#ifdef WIN32 + // under Windows, switch progress bar and color off by default, as the typical windows shell doesn't handle these (would need different sequences..) + Bool_t color = kFALSE; + Bool_t drawProgressBar = kFALSE; +#else Bool_t color = !gROOT->IsBatch(); Bool_t drawProgressBar = kTRUE; +#endif DeclareOptionRef( fVerbose, "V", "Verbose flag" ); DeclareOptionRef( color, "Color", "Flag for coloured screen output (default: True, if in batch mode: False)" ); DeclareOptionRef( fTransformations, "Transformations", "List of transformations to test; formatting example: \"Transformations=I;D;P;U;G,D\", for identity, decorrelation, PCA, Uniform and Gaussianisation followed by decorrelation transformations" ); From 9b2fdffa6b9b6bae269dac0ec7c77cfecd0967ae Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Mon, 18 Nov 2013 14:53:48 +0100 Subject: [PATCH 08/85] New static function to change the position of the "power of 10" near the axis. --- graf2d/graf/inc/TGaxis.h | 7 ++++++- graf2d/graf/src/TGaxis.cxx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/graf2d/graf/inc/TGaxis.h b/graf2d/graf/inc/TGaxis.h index f4f122ec7a587..0d878d7316e2a 100644 --- a/graf2d/graf/inc/TGaxis.h +++ b/graf2d/graf/inc/TGaxis.h @@ -59,6 +59,10 @@ class TGaxis : public TLine, public TAttText { TAxis *fAxis; //!pointer to original TAxis axis (if any) static Int_t fgMaxDigits; //!Number of digits above which the 10>N notation is used + static Float_t fXAxisExpXOffset; //Exponent X offset for the X axis + static Float_t fXAxisExpYOffset; //Exponent Y offset for the X axis + static Float_t fYAxisExpXOffset; //Exponent X offset for the Y axis + static Float_t fYAxisExpYOffset; //Exponent Y offset for the Y axis TGaxis(const TGaxis&); TGaxis& operator=(const TGaxis&); @@ -129,7 +133,8 @@ class TGaxis : public TLine, public TAttText { void SetTitleColor(Int_t titlecolor) {SetTextColor(titlecolor);} // *MENU* void SetWmin(Double_t wmin) {fWmin = wmin;} void SetWmax(Double_t wmax) {fWmax = wmax;} - + static void SetExponentOffset(Float_t xoff=0., Float_t yoff=0., Option_t *axis="xy"); + ClassDef(TGaxis,5) //Graphics axis }; diff --git a/graf2d/graf/src/TGaxis.cxx b/graf2d/graf/src/TGaxis.cxx index 0f96d2a47f136..975e34efafc20 100644 --- a/graf2d/graf/src/TGaxis.cxx +++ b/graf2d/graf/src/TGaxis.cxx @@ -34,6 +34,10 @@ #include "TSystem.h" Int_t TGaxis::fgMaxDigits = 5; +Float_t TGaxis::fXAxisExpXOffset = 0.; //Exponent X offset for the X axis +Float_t TGaxis::fXAxisExpYOffset = 0.; //Exponent Y offset for the X axis +Float_t TGaxis::fYAxisExpXOffset = 0.; //Exponent X offset for the Y axis +Float_t TGaxis::fYAxisExpYOffset = 0.; //Exponent Y offset for the Y axis const Int_t kHori = BIT(9); //defined in TPad ClassImp(TGaxis) @@ -1631,6 +1635,14 @@ void TGaxis::PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t yma textaxis->SetTextAlign(11); if (GetLabelFont()%10 < 2) // force TLatex mode in PaintLatex textaxis->SetTextFont((Int_t)(GetLabelFont()/10)*10+2); + if (!strcmp(fAxis->GetName(),"xaxis")) { + xx = xx + fXAxisExpXOffset; + yy = yy + fXAxisExpYOffset; + } + if (!strcmp(fAxis->GetName(),"yaxis")) { + xx = xx + fYAxisExpXOffset; + yy = yy + fYAxisExpYOffset; + } textaxis->PaintLatex(gPad->GetX1() + xx*(gPad->GetX2() - gPad->GetX1()), gPad->GetY1() + yy*(gPad->GetY2() - gPad->GetY1()), 0, @@ -2198,6 +2210,28 @@ void TGaxis::SetTimeOffset(Double_t toffset, Option_t *option) } +//______________________________________________________________________________ +void TGaxis::SetExponentOffset(Float_t xoff, Float_t yoff, Option_t *axis) +{ + // Static function to set X and Y offset of the axis 10^n notation. + // It is in % of the pad size. It can be negative. + // axis specifies which axis ("x","y"), default = "x" + // if axis="xz" set the two axes + + TString opt = axis; + opt.ToLower(); + + if (opt.Contains("x")) { + fXAxisExpXOffset = xoff; + fXAxisExpYOffset = yoff; + } + if (opt.Contains("y")) { + fYAxisExpXOffset = xoff; + fYAxisExpYOffset = yoff; + } +} + + //______________________________________________________________________________ void TGaxis::Streamer(TBuffer &R__b) { From dcec35bdba16cd64624aca7f7c63c5930cab8b3a Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Mon, 18 Nov 2013 15:14:10 +0100 Subject: [PATCH 09/85] Add ! to avoid I/O --- graf2d/graf/inc/TGaxis.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graf2d/graf/inc/TGaxis.h b/graf2d/graf/inc/TGaxis.h index 0d878d7316e2a..25db9e906a9fb 100644 --- a/graf2d/graf/inc/TGaxis.h +++ b/graf2d/graf/inc/TGaxis.h @@ -59,10 +59,10 @@ class TGaxis : public TLine, public TAttText { TAxis *fAxis; //!pointer to original TAxis axis (if any) static Int_t fgMaxDigits; //!Number of digits above which the 10>N notation is used - static Float_t fXAxisExpXOffset; //Exponent X offset for the X axis - static Float_t fXAxisExpYOffset; //Exponent Y offset for the X axis - static Float_t fYAxisExpXOffset; //Exponent X offset for the Y axis - static Float_t fYAxisExpYOffset; //Exponent Y offset for the Y axis + static Float_t fXAxisExpXOffset; //!Exponent X offset for the X axis + static Float_t fXAxisExpYOffset; //!Exponent Y offset for the X axis + static Float_t fYAxisExpXOffset; //!Exponent X offset for the Y axis + static Float_t fYAxisExpYOffset; //!Exponent Y offset for the Y axis TGaxis(const TGaxis&); TGaxis& operator=(const TGaxis&); From 38921e47e0b173701ceb6c00b9fb0faa401266e4 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Mon, 18 Nov 2013 09:30:45 -0600 Subject: [PATCH 10/85] Generate dictionary for iterator for apple libcxx --- cint/cint/lib/dll_stl/lst.h | 22 +++++++++ cint/cint/lib/dll_stl/mp.h | 88 +++++++++++++++++++++++++++++++++ cint/cint/lib/dll_stl/multmp.h | 73 +++++++++++++++++++++++++++ cint/cint/lib/dll_stl/multst.h | 22 +++++++++ cint/cint/lib/dll_stl/st.h | 22 +++++++++ cint/cint/lib/prec_stl/list | 4 ++ cint/cint/lib/prec_stl/map | 2 +- cint/cint/lib/prec_stl/multimap | 2 +- cint/cint/lib/prec_stl/multiset | 2 +- cint/cint/lib/prec_stl/set | 2 +- 10 files changed, 235 insertions(+), 4 deletions(-) diff --git a/cint/cint/lib/dll_stl/lst.h b/cint/cint/lib/dll_stl/lst.h index c3168b8bc85b8..a742a37bff063 100644 --- a/cint/cint/lib/dll_stl/lst.h +++ b/cint/cint/lib/dll_stl/lst.h @@ -31,7 +31,29 @@ using namespace std; #pragma link C++ class list; #if defined(G__STRING_DLL) || defined(G__ROOT) #pragma link C++ class list; +#pragma link C++ operators list::iterator; #endif +#pragma link C++ operators list::iterator; +#pragma link C++ operators list::iterator; +#pragma link C++ operators list::iterator; +#pragma link C++ operators list::iterator; +#pragma link C++ operators list::iterator; +#pragma link C++ operators list::iterator; + +#pragma link C++ operators list::const_iterator; +#pragma link C++ operators list::const_iterator; +#pragma link C++ operators list::const_iterator; +#pragma link C++ operators list::const_iterator; +#pragma link C++ operators list::const_iterator; +#pragma link C++ operators list::const_iterator; + +#pragma link C++ operators list::reverse_iterator; +#pragma link C++ operators list::reverse_iterator; +#pragma link C++ operators list::reverse_iterator; +#pragma link C++ operators list::reverse_iterator; +#pragma link C++ operators list::reverse_iterator; +#pragma link C++ operators list::reverse_iterator; + #endif diff --git a/cint/cint/lib/dll_stl/mp.h b/cint/cint/lib/dll_stl/mp.h index c4a0bbb33ca11..ad3a33319ab7b 100644 --- a/cint/cint/lib/dll_stl/mp.h +++ b/cint/cint/lib/dll_stl/mp.h @@ -45,6 +45,51 @@ using namespace std; #pragma link C++ class map; #pragma link C++ class map; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; + +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; + +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; + +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; + +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; + +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; + #pragma link off function pair::operator=; #pragma link off function pair::operator=; #pragma link off function pair::operator=; @@ -68,6 +113,27 @@ using namespace std; #pragma link C++ class map; #pragma link C++ class map; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; + +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; + +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; + #if defined(G__STRING_DLL) || defined(G__ROOT) #pragma link C++ class map; #pragma link C++ class map; @@ -75,6 +141,28 @@ using namespace std; #pragma link C++ class map; #pragma link C++ class map; //#pragma link C++ class map; + +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +#pragma link C++ operators map::iterator; +//#pragma link C++ operators map::iterator; + +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +#pragma link C++ operators map::const_iterator; +//#pragma link C++ operators map::const_iterator; + +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +#pragma link C++ operators map::reverse_iterator; +//#pragma link C++ operators map::reverse_iterator; + #if defined(G__GNUC) && (G__GNUC>=3) #pragma link off class pair; #pragma link off class pair; diff --git a/cint/cint/lib/dll_stl/multmp.h b/cint/cint/lib/dll_stl/multmp.h index c6705dcb06ccd..f7862df1f6a42 100644 --- a/cint/cint/lib/dll_stl/multmp.h +++ b/cint/cint/lib/dll_stl/multmp.h @@ -39,6 +39,42 @@ using namespace std; #pragma link C++ class multimap; #pragma link C++ class multimap; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; + +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; + +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; + +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; + +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; + +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; + #pragma link off function pair::operator=; #pragma link off function pair::operator=; #pragma link off function pair::operator=; @@ -58,12 +94,49 @@ using namespace std; #pragma link C++ class multimap; #pragma link C++ class multimap; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; + +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; + +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; + #if defined(G__STRING_DLL) || defined(G__ROOT) #pragma link C++ class multimap; #pragma link C++ class multimap; #pragma link C++ class multimap; #pragma link C++ class multimap; //#pragma link C++ class multimap; + +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +#pragma link C++ operators multimap::iterator; +//#pragma link C++ operators multimap::iterator; + +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +#pragma link C++ operators multimap::const_iterator; +//#pragma link C++ operators multimap::const_iterator; + +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +#pragma link C++ operators multimap::reverse_iterator; +//#pragma link C++ operators multimap::reverse_iterator; + #pragma link off function pair::operator=; #pragma link off function pair::operator=; #pragma link off function pair::operator=; diff --git a/cint/cint/lib/dll_stl/multst.h b/cint/cint/lib/dll_stl/multst.h index 7625546b3b66b..5b6b530049c3d 100644 --- a/cint/cint/lib/dll_stl/multst.h +++ b/cint/cint/lib/dll_stl/multst.h @@ -34,8 +34,30 @@ using namespace std; #pragma link C++ class multiset; #if defined(G__STRING_DLL) || defined(G__ROOT) #pragma link C++ class multiset; +#pragma link C++ operators multiset::iterator; #endif +#pragma link C++ operators multiset::iterator; +#pragma link C++ operators multiset::iterator; +#pragma link C++ operators multiset::iterator; +#pragma link C++ operators multiset::iterator; +#pragma link C++ operators multiset::iterator; +#pragma link C++ operators multiset::iterator; + +#pragma link C++ operators multiset::const_iterator; +#pragma link C++ operators multiset::const_iterator; +#pragma link C++ operators multiset::const_iterator; +#pragma link C++ operators multiset::const_iterator; +#pragma link C++ operators multiset::const_iterator; +#pragma link C++ operators multiset::const_iterator; + +#pragma link C++ operators multiset::reverse_iterator; +#pragma link C++ operators multiset::reverse_iterator; +#pragma link C++ operators multiset::reverse_iterator; +#pragma link C++ operators multiset::reverse_iterator; +#pragma link C++ operators multiset::reverse_iterator; +#pragma link C++ operators multiset::reverse_iterator; + #endif diff --git a/cint/cint/lib/dll_stl/st.h b/cint/cint/lib/dll_stl/st.h index 688a8e6c40c0f..ba8dacc7ed423 100644 --- a/cint/cint/lib/dll_stl/st.h +++ b/cint/cint/lib/dll_stl/st.h @@ -30,8 +30,30 @@ using namespace std; #pragma link C++ class set; #if defined(G__STRING_DLL) || defined(G__ROOT) #pragma link C++ class set; +#pragma link C++ operators set::iterator; #endif +#pragma link C++ operators set::iterator; +#pragma link C++ operators set::iterator; +#pragma link C++ operators set::iterator; +#pragma link C++ operators set::iterator; +#pragma link C++ operators set::iterator; +#pragma link C++ operators set::iterator; + +#pragma link C++ operators set::const_iterator; +#pragma link C++ operators set::const_iterator; +#pragma link C++ operators set::const_iterator; +#pragma link C++ operators set::const_iterator; +#pragma link C++ operators set::const_iterator; +#pragma link C++ operators set::const_iterator; + +#pragma link C++ operators set::reverse_iterator; +#pragma link C++ operators set::reverse_iterator; +#pragma link C++ operators set::reverse_iterator; +#pragma link C++ operators set::reverse_iterator; +#pragma link C++ operators set::reverse_iterator; +#pragma link C++ operators set::reverse_iterator; + #endif diff --git a/cint/cint/lib/prec_stl/list b/cint/cint/lib/prec_stl/list index bdecfdf81f934..a5fbbe86e3b48 100644 --- a/cint/cint/lib/prec_stl/list +++ b/cint/cint/lib/prec_stl/list @@ -107,6 +107,10 @@ class list { void* _Ptr; #endif }; +#ifdef G__APPLE_LIBCXX + friend bool operator==(const list::iterator& x,const list::iterator& y)const; + friend bool operator!=(const list::iterator& x,const list::iterator& y)const; +#endif #ifdef G__HPUX friend bool operator!=(const list::iterator& x,const list::iterator& y)const; #endif diff --git a/cint/cint/lib/prec_stl/map b/cint/cint/lib/prec_stl/map index eac298c526f0d..49e1f74f048dd 100644 --- a/cint/cint/lib/prec_stl/map +++ b/cint/cint/lib/prec_stl/map @@ -125,7 +125,7 @@ class map { bool operator==(const iterator& x) ; #endif }; -#if defined(G__GNUC) && !defined(G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004) +#if (defined(G__GNUC) && !defined(G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004)) || defined(G__APPLE_LIBCXX) friend bool operator==(const map::iterator& x ,const map::iterator& y) const; friend bool operator!=(const map::iterator& x ,const map::iterator& y) const; #endif diff --git a/cint/cint/lib/prec_stl/multimap b/cint/cint/lib/prec_stl/multimap index a91ed42bab4e3..4b442dd874a81 100644 --- a/cint/cint/lib/prec_stl/multimap +++ b/cint/cint/lib/prec_stl/multimap @@ -122,7 +122,7 @@ class multimap { bool operator==(const iterator& x) ; #endif }; -#if defined(G__GNUC) && !defined (G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004) +#if (defined(G__GNUC) && !defined (G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004)) || defined(G__APPLE_LIBCXX) friend bool operator==(const multimap::iterator& x ,const multimap::iterator& y) const; friend bool operator!=(const multimap::iterator& x ,const multimap::iterator& y) const; #endif diff --git a/cint/cint/lib/prec_stl/multiset b/cint/cint/lib/prec_stl/multiset index d76a19d43dafa..250b507ded406 100644 --- a/cint/cint/lib/prec_stl/multiset +++ b/cint/cint/lib/prec_stl/multiset @@ -115,7 +115,7 @@ class multiset { bool operator==(const iterator& x) ; #endif }; -#if (defined(G__GNUC) && !defined (G__KCC) && !defined(G__INTEL_COMPILER)) && !(G__GNUC_VER>=3004) +#if ((defined(G__GNUC) && !defined (G__KCC) && !defined(G__INTEL_COMPILER)) && !(G__GNUC_VER>=3004)) || defined(G__APPLE_LIBCXX) friend bool operator==(const multiset::iterator& x ,const multiset::iterator& y) const; friend bool operator!=(const multiset::iterator& x ,const multiset::iterator& y) const; #endif diff --git a/cint/cint/lib/prec_stl/set b/cint/cint/lib/prec_stl/set index 4c4f7d3dc690b..c1e7948befa0d 100644 --- a/cint/cint/lib/prec_stl/set +++ b/cint/cint/lib/prec_stl/set @@ -115,7 +115,7 @@ class set { bool operator==(const iterator& x) ; #endif }; -#if defined(G__GNUC) && !defined(G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004) +#if (defined(G__GNUC) && !defined(G__KCC) && !defined(G__INTEL_COMPILER) && !(G__GNUC_VER>=3004)) || defined(G__APPLE_LIBCXX) friend bool operator==(const set::iterator& x ,const set::iterator& y) const; friend bool operator!=(const set::iterator& x ,const set::iterator& y) const; #endif From 7cae21f2e4f5c5d64e3260ad91afc5dfa2223a0a Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Mon, 18 Nov 2013 16:43:25 +0100 Subject: [PATCH 11/85] protect against no events in the training data set --- tmva/src/DataSetFactory.cxx | 14 ++++++++++++++ tmva/src/MethodCategory.cxx | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/tmva/src/DataSetFactory.cxx b/tmva/src/DataSetFactory.cxx index 2dce48dae48a9..e6fa6cca0ca24 100644 --- a/tmva/src/DataSetFactory.cxx +++ b/tmva/src/DataSetFactory.cxx @@ -141,6 +141,20 @@ TMVA::DataSet* TMVA::DataSetFactory::CreateDataSet( TMVA::DataSetInfo& dsi, dsi.PrintCorrelationMatrix( className ); } Log() << kINFO << " " << Endl; + } else { + Log() << kERROR << "There is a problem with one of your training (or testing) data sets" << Endl; + Log() << kERROR << " not having (enough) events. " << Endl; + Log() << kERROR << " please check .. from the name, you might be able to figure out which " << Endl; + Log() << kERROR << " classifier (or category) has not gotten any or too little events" << Endl; + Log() << kERROR << " The program will stop here .. as w/o data for training testing things" << Endl; + Log() << kERROR << " will get very messy later otherwise .. better fix that now! " << Endl; + + Log() << kWARNING << " Number of Test Signal: " << ds->GetNEvtSigTest() << Endl; + Log() << kWARNING << " Number of Test Backgr: " << ds->GetNEvtBkgdTest() << Endl; + Log() << kWARNING << " Number of Train Signal: " << ds->GetNEvtSigTrain() << Endl; + Log() << kWARNING << " Nnumber of Train Backgr:" << ds->GetNEvtBkgdTrain() << Endl; + + Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have training/test events, I better stop here and let you fix that one first " << Endl; } return ds; } diff --git a/tmva/src/MethodCategory.cxx b/tmva/src/MethodCategory.cxx index 995a98a9843d3..cafad965b8a02 100644 --- a/tmva/src/MethodCategory.cxx +++ b/tmva/src/MethodCategory.cxx @@ -301,6 +301,7 @@ TMVA::DataSetInfo& TMVA::MethodCategory::CreateCategoryDSI(const TCut& theCut, dsi->SetNormalization(norm); DataSetInfo& dsiReference= (*dsi); + return dsiReference; } @@ -406,6 +407,10 @@ void TMVA::MethodCategory::Train() << " not trained (training tree has less entries [" << mva->Data()->GetNTrainingEvents() << "] than required [" << MinNoTrainingEvents << "]" << Endl; + + Log() << kERROR << " w/o training/test events for that category, I better stop here and let you fix " << Endl; + Log() << kFATAL << "that one first, otherwise things get too messy later ... " << Endl; + } } From a88f5b9abbca65989d64ac3913c6ba7509bd9a66 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Mon, 18 Nov 2013 15:32:13 -0600 Subject: [PATCH 12/85] Avoid null pointer dereferencing (was breaking stressgraphics) --- graf2d/graf/src/TGaxis.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graf2d/graf/src/TGaxis.cxx b/graf2d/graf/src/TGaxis.cxx index 975e34efafc20..39febdc3b4034 100644 --- a/graf2d/graf/src/TGaxis.cxx +++ b/graf2d/graf/src/TGaxis.cxx @@ -1635,11 +1635,11 @@ void TGaxis::PaintAxis(Double_t xmin, Double_t ymin, Double_t xmax, Double_t yma textaxis->SetTextAlign(11); if (GetLabelFont()%10 < 2) // force TLatex mode in PaintLatex textaxis->SetTextFont((Int_t)(GetLabelFont()/10)*10+2); - if (!strcmp(fAxis->GetName(),"xaxis")) { + if (fAxis && !strcmp(fAxis->GetName(),"xaxis")) { xx = xx + fXAxisExpXOffset; yy = yy + fXAxisExpYOffset; } - if (!strcmp(fAxis->GetName(),"yaxis")) { + if (fAxis && !strcmp(fAxis->GetName(),"yaxis")) { xx = xx + fYAxisExpXOffset; yy = yy + fYAxisExpYOffset; } From a718de66872efc4a453005dc4c79245c3c10233c Mon Sep 17 00:00:00 2001 From: Wouter Verkerke Date: Mon, 18 Nov 2013 22:44:50 +0100 Subject: [PATCH 13/85] o FlexibleInterpVar - Fix minus sign on 2nd derivative on negative side for icode=4 (From Sven Kreiss) --- roofit/histfactory/src/FlexibleInterpVar.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roofit/histfactory/src/FlexibleInterpVar.cxx b/roofit/histfactory/src/FlexibleInterpVar.cxx index 3cd15bae6fd57..6a0278e84bae1 100644 --- a/roofit/histfactory/src/FlexibleInterpVar.cxx +++ b/roofit/histfactory/src/FlexibleInterpVar.cxx @@ -370,7 +370,7 @@ Double_t FlexibleInterpVar::evaluate() const double pow_up_log = _high[i] <= 0.0 ? 0.0 : pow_up*_logHi[i] ; double pow_down_log = _low[i] <= 0.0 ? 0.0 : -pow_down*_logLo[i] ; double pow_up_log2 = _high[i] <= 0.0 ? 0.0 : pow_up_log*_logHi[i] ; - double pow_down_log2= _low[i] <= 0.0 ? 0.0 : pow_down_log*_logLo[i] ; + double pow_down_log2= _low[i] <= 0.0 ? 0.0 : -pow_down_log*_logLo[i] ; /* double pow_up = pow(_high[i]/_nominal, x0); double pow_down = pow(_low[i]/_nominal, x0); From 370ea02cc2e013513304f556d92ca8a67c69bb6a Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Tue, 19 Nov 2013 11:01:43 +0100 Subject: [PATCH 14/85] fixing the fix - now the reader is again allowed to have a dataset w/o actual training/testing events :) --- tmva/src/DataSetFactory.cxx | 39 ++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/tmva/src/DataSetFactory.cxx b/tmva/src/DataSetFactory.cxx index e6fa6cca0ca24..ccdd3f7759f1e 100644 --- a/tmva/src/DataSetFactory.cxx +++ b/tmva/src/DataSetFactory.cxx @@ -141,21 +141,8 @@ TMVA::DataSet* TMVA::DataSetFactory::CreateDataSet( TMVA::DataSetInfo& dsi, dsi.PrintCorrelationMatrix( className ); } Log() << kINFO << " " << Endl; - } else { - Log() << kERROR << "There is a problem with one of your training (or testing) data sets" << Endl; - Log() << kERROR << " not having (enough) events. " << Endl; - Log() << kERROR << " please check .. from the name, you might be able to figure out which " << Endl; - Log() << kERROR << " classifier (or category) has not gotten any or too little events" << Endl; - Log() << kERROR << " The program will stop here .. as w/o data for training testing things" << Endl; - Log() << kERROR << " will get very messy later otherwise .. better fix that now! " << Endl; - - Log() << kWARNING << " Number of Test Signal: " << ds->GetNEvtSigTest() << Endl; - Log() << kWARNING << " Number of Test Backgr: " << ds->GetNEvtBkgdTest() << Endl; - Log() << kWARNING << " Number of Train Signal: " << ds->GetNEvtSigTrain() << Endl; - Log() << kWARNING << " Nnumber of Train Backgr:" << ds->GetNEvtBkgdTrain() << Endl; + } - Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have training/test events, I better stop here and let you fix that one first " << Endl; - } return ds; } @@ -1368,6 +1355,30 @@ TMVA::DataSetFactory::MixEvents( DataSetInfo& dsi, Log() << kINFO << "Create internal testing tree" << Endl; ds->SetEventCollection(testingEventVector, Types::kTesting ); + + + if (ds->GetNEvtSigTest() < 1 || ds->GetNEvtBkgdTest() < 1 || ds->GetNEvtSigTrain() < 1 || ds->GetNEvtBkgdTrain() < 1 ){ + Log() << kERROR << "There is a problem with one of your training (or testing) data sets" << Endl; + Log() << kERROR << " not having (enough) events. " << Endl; + Log() << kERROR << " please check .. from the name, you might be able to figure out which " << Endl; + Log() << kERROR << " classifier (or category) has not gotten any or too little events" << Endl; + Log() << kERROR << " The program will stop here .. as w/o data for training testing things" << Endl; + Log() << kERROR << " will get very messy later otherwise .. better fix that now! " << Endl; + + Log() << kWARNING << " Number of Test Signal: " << ds->GetNEvtSigTest() << Endl; + Log() << kWARNING << " Number of Test Backgr: " << ds->GetNEvtBkgdTest() << Endl; + Log() << kWARNING << " Number of Train Signal: " << ds->GetNEvtSigTrain() << Endl; + Log() << kWARNING << " Nnumber of Train Backgr:" << ds->GetNEvtBkgdTrain() << Endl; + + if (ds->GetNTrainingEvents() < 1){ + Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have any training events, I better stop here and let you fix that one first " << Endl; + } + + if (ds->GetNTestEvents() < 1) { + Log() << kERROR << "Dataset " << std::string(dsi.GetName()) << " does not have any testing events, guess that will cause problems later..but for now, I continue " << Endl; + } + } + return ds; From 27620fc862286e7ea766c861798127c8448691a6 Mon Sep 17 00:00:00 2001 From: Andrei Gheata Date: Tue, 19 Nov 2013 10:49:59 +0100 Subject: [PATCH 15/85] fixed matrix allocation in assignment operator --- geom/geom/src/TGeoBranchArray.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geom/geom/src/TGeoBranchArray.cxx b/geom/geom/src/TGeoBranchArray.cxx index 9ed89bdfbdad3..3bc5cc88626e5 100644 --- a/geom/geom/src/TGeoBranchArray.cxx +++ b/geom/geom/src/TGeoBranchArray.cxx @@ -44,6 +44,7 @@ TGeoBranchArray::TGeoBranchArray(Int_t level) // Constructor. Alocates the array with a size given by level. fMaxLevel = (fLevel+1 > 10) ? fLevel+1:10; fArray = new TGeoNode*[fMaxLevel]; + fMatrix = new TGeoHMatrix(); } //______________________________________________________________________________ @@ -92,7 +93,7 @@ TGeoBranchArray& TGeoBranchArray::operator=(const TGeoBranchArray& other) fLevel = other.fLevel; if (fLevel+1) memcpy(fArray, other.fArray, (fLevel+1)*sizeof(TGeoNode*)); if (other.fMatrix) { - fMatrix = new TGeoHMatrix(); + if (!fMatrix) fMatrix = new TGeoHMatrix(); fMatrix->CopyFrom(other.fMatrix); } fClient = other.fClient; From e891a1056ac6ac10a392f9f42384227c2fe46065 Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Tue, 19 Nov 2013 11:15:38 +0100 Subject: [PATCH 16/85] fixing the fixing of the fix, I know that touching the DataSet is like asking pandora .. --- tmva/src/DataSetFactory.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmva/src/DataSetFactory.cxx b/tmva/src/DataSetFactory.cxx index ccdd3f7759f1e..583bf122f01a8 100644 --- a/tmva/src/DataSetFactory.cxx +++ b/tmva/src/DataSetFactory.cxx @@ -1356,7 +1356,7 @@ TMVA::DataSetFactory::MixEvents( DataSetInfo& dsi, ds->SetEventCollection(testingEventVector, Types::kTesting ); - + /* if (ds->GetNEvtSigTest() < 1 || ds->GetNEvtBkgdTest() < 1 || ds->GetNEvtSigTrain() < 1 || ds->GetNEvtBkgdTrain() < 1 ){ Log() << kERROR << "There is a problem with one of your training (or testing) data sets" << Endl; Log() << kERROR << " not having (enough) events. " << Endl; @@ -1369,7 +1369,7 @@ TMVA::DataSetFactory::MixEvents( DataSetInfo& dsi, Log() << kWARNING << " Number of Test Backgr: " << ds->GetNEvtBkgdTest() << Endl; Log() << kWARNING << " Number of Train Signal: " << ds->GetNEvtSigTrain() << Endl; Log() << kWARNING << " Nnumber of Train Backgr:" << ds->GetNEvtBkgdTrain() << Endl; - + */ if (ds->GetNTrainingEvents() < 1){ Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have any training events, I better stop here and let you fix that one first " << Endl; } @@ -1377,7 +1377,7 @@ TMVA::DataSetFactory::MixEvents( DataSetInfo& dsi, if (ds->GetNTestEvents() < 1) { Log() << kERROR << "Dataset " << std::string(dsi.GetName()) << " does not have any testing events, guess that will cause problems later..but for now, I continue " << Endl; } - } + // } return ds; From 91e08845771769e562cf56ec66c4c621f98e7b64 Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Mon, 18 Nov 2013 23:15:40 +0100 Subject: [PATCH 17/85] make version v5-34-12. --- build/version_number | 2 +- core/base/inc/RVersion.h | 10 +++++----- doc/v534/index.html | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/version_number b/build/version_number index 25ef7532e55ed..6f1e9fcb52918 100644 --- a/build/version_number +++ b/build/version_number @@ -1 +1 @@ -5.34/11 +5.34/12 diff --git a/core/base/inc/RVersion.h b/core/base/inc/RVersion.h index 81b24cc92547a..13f9f2dae47ee 100644 --- a/core/base/inc/RVersion.h +++ b/core/base/inc/RVersion.h @@ -14,13 +14,13 @@ * */ -#define ROOT_RELEASE "5.34/11" -#define ROOT_RELEASE_DATE "Oct 31 2013" -#define ROOT_RELEASE_TIME "16:40:11" +#define ROOT_RELEASE "5.34/12" +#define ROOT_RELEASE_DATE "Nov 16 2013" +#define ROOT_RELEASE_TIME "16:33:37" #define ROOT_SVN_REVISION 49361 -#define ROOT_GIT_COMMIT "v5-34-10-229-g7a28a30" +#define ROOT_GIT_COMMIT "v5-34-11-49-gafa5f25" #define ROOT_GIT_BRANCH "heads/v5-34-00-patches" -#define ROOT_VERSION_CODE 336395 +#define ROOT_VERSION_CODE 336396 #define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #endif diff --git a/doc/v534/index.html b/doc/v534/index.html index e98d71b41284d..23245d03714b1 100644 --- a/doc/v534/index.html +++ b/doc/v534/index.html @@ -8,7 +8,7 @@ -ROOT Version 5.34/11 Release Notes +ROOT Version 5.34/12 Release Notes From c1989391830937884748163758861be0ba65223b Mon Sep 17 00:00:00 2001 From: Helge Voss Date: Tue, 19 Nov 2013 12:38:31 +0100 Subject: [PATCH 18/85] streetest runs through again .. --- tmva/src/DataSetFactory.cxx | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/tmva/src/DataSetFactory.cxx b/tmva/src/DataSetFactory.cxx index 583bf122f01a8..3de8b86fe7496 100644 --- a/tmva/src/DataSetFactory.cxx +++ b/tmva/src/DataSetFactory.cxx @@ -1356,28 +1356,13 @@ TMVA::DataSetFactory::MixEvents( DataSetInfo& dsi, ds->SetEventCollection(testingEventVector, Types::kTesting ); - /* - if (ds->GetNEvtSigTest() < 1 || ds->GetNEvtBkgdTest() < 1 || ds->GetNEvtSigTrain() < 1 || ds->GetNEvtBkgdTrain() < 1 ){ - Log() << kERROR << "There is a problem with one of your training (or testing) data sets" << Endl; - Log() << kERROR << " not having (enough) events. " << Endl; - Log() << kERROR << " please check .. from the name, you might be able to figure out which " << Endl; - Log() << kERROR << " classifier (or category) has not gotten any or too little events" << Endl; - Log() << kERROR << " The program will stop here .. as w/o data for training testing things" << Endl; - Log() << kERROR << " will get very messy later otherwise .. better fix that now! " << Endl; - - Log() << kWARNING << " Number of Test Signal: " << ds->GetNEvtSigTest() << Endl; - Log() << kWARNING << " Number of Test Backgr: " << ds->GetNEvtBkgdTest() << Endl; - Log() << kWARNING << " Number of Train Signal: " << ds->GetNEvtSigTrain() << Endl; - Log() << kWARNING << " Nnumber of Train Backgr:" << ds->GetNEvtBkgdTrain() << Endl; - */ - if (ds->GetNTrainingEvents() < 1){ - Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have any training events, I better stop here and let you fix that one first " << Endl; - } - - if (ds->GetNTestEvents() < 1) { - Log() << kERROR << "Dataset " << std::string(dsi.GetName()) << " does not have any testing events, guess that will cause problems later..but for now, I continue " << Endl; - } - // } + if (ds->GetNTrainingEvents() < 1){ + Log() << kFATAL << "Dataset " << std::string(dsi.GetName()) << " does not have any training events, I better stop here and let you fix that one first " << Endl; + } + + if (ds->GetNTestEvents() < 1) { + Log() << kERROR << "Dataset " << std::string(dsi.GetName()) << " does not have any testing events, guess that will cause problems later..but for now, I continue " << Endl; + } return ds; From 5f8d8e3aa602cbb7d3ebddffe1b480ffa5df28ae Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Tue, 19 Nov 2013 12:16:09 +0100 Subject: [PATCH 19/85] From Max Baak: add a new function in HypoTestInverterResult to exclude some points in the scan to avoid wrong values. ExclusionCleanup() Add also assignment and copy constructors to ConfInterval classes --- roofit/roostats/inc/RooStats/ConfInterval.h | 7 + .../inc/RooStats/HypoTestInverterResult.h | 13 ++ roofit/roostats/inc/RooStats/SimpleInterval.h | 4 + .../roostats/src/HypoTestInverterResult.cxx | 184 +++++++++++++++++- roofit/roostats/src/SimpleInterval.cxx | 34 ++++ tutorials/math/quasirandom.C | 12 +- 6 files changed, 250 insertions(+), 4 deletions(-) diff --git a/roofit/roostats/inc/RooStats/ConfInterval.h b/roofit/roostats/inc/RooStats/ConfInterval.h index ccbf796de6bc3..3e1087fa069cd 100644 --- a/roofit/roostats/inc/RooStats/ConfInterval.h +++ b/roofit/roostats/inc/RooStats/ConfInterval.h @@ -46,6 +46,13 @@ namespace RooStats { // destructor virtual ~ConfInterval() {} + + // operator= + ConfInterval& operator=(const ConfInterval& other) { + if (&other==this) { return *this; } + TNamed::operator=(other); + return *this; + } // check if given point is in the interval virtual Bool_t IsInInterval(const RooArgSet&) const = 0; diff --git a/roofit/roostats/inc/RooStats/HypoTestInverterResult.h b/roofit/roostats/inc/RooStats/HypoTestInverterResult.h index 99dfd342e5334..4739eb703e64e 100644 --- a/roofit/roostats/inc/RooStats/HypoTestInverterResult.h +++ b/roofit/roostats/inc/RooStats/HypoTestInverterResult.h @@ -37,9 +37,17 @@ class HypoTestInverterResult : public SimpleInterval { const RooRealVar& scannedVariable, double cl ) ; + HypoTestInverterResult( const HypoTestInverterResult& other, const char* name ); + // destructor virtual ~HypoTestInverterResult(); + // operator = + HypoTestInverterResult& operator = (const HypoTestInverterResult& other); + + // remove points that appear to have failed. + void ExclusionCleanup(); + // merge with the content of another HypoTestInverterResult object bool Add( const HypoTestInverterResult& otherResult ); @@ -95,6 +103,9 @@ class HypoTestInverterResult : public SimpleInterval { // set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) virtual void SetConfidenceLevel( Double_t cl ) { fConfidenceLevel = cl; } + // set CLs threshold for exclusion cleanup function + inline void SetCLsCleanupThreshold( Double_t th ) { fCLsCleanupThreshold = th; } + // flag to switch between using CLsb (default) or CLs as confidence level void UseCLs( bool on = true ) { fUseCLs = on; } @@ -188,6 +199,8 @@ class HypoTestInverterResult : public SimpleInterval { double fLowerLimitError; double fUpperLimitError; + double fCLsCleanupThreshold; + static double fgAsymptoticMaxSigma; // max sigma value used to scan asymptotic expected p values std::vector fXValues; diff --git a/roofit/roostats/inc/RooStats/SimpleInterval.h b/roofit/roostats/inc/RooStats/SimpleInterval.h index ea6dc59aba848..8ed233c6456b1 100644 --- a/roofit/roostats/inc/RooStats/SimpleInterval.h +++ b/roofit/roostats/inc/RooStats/SimpleInterval.h @@ -27,6 +27,10 @@ namespace RooStats { // default constructors explicit SimpleInterval(const char* name = 0); + SimpleInterval(const SimpleInterval& other, const char* name); + + SimpleInterval& operator=(const SimpleInterval& other) ; + // constructor from name, the Parameter of interest and lower/upper bound values SimpleInterval(const char* name, const RooRealVar & var, Double_t lower, Double_t upper, Double_t cl); diff --git a/roofit/roostats/src/HypoTestInverterResult.cxx b/roofit/roostats/src/HypoTestInverterResult.cxx index 72b3a1da9557f..9bf03acac096d 100644 --- a/roofit/roostats/src/HypoTestInverterResult.cxx +++ b/roofit/roostats/src/HypoTestInverterResult.cxx @@ -58,7 +58,8 @@ HypoTestInverterResult::HypoTestInverterResult(const char * name ) : fFittedUpperLimit(false), fInterpolOption(kLinear), fLowerLimitError(-1), - fUpperLimitError(-1) + fUpperLimitError(-1), + fCLsCleanupThreshold(0.005) { // default constructor fLowerLimit = TMath::QuietNaN(); @@ -66,6 +67,69 @@ HypoTestInverterResult::HypoTestInverterResult(const char * name ) : } +HypoTestInverterResult::HypoTestInverterResult( const HypoTestInverterResult& other, const char * name ) : + SimpleInterval(other,name), + fUseCLs(other.fUseCLs), + fIsTwoSided(other.fIsTwoSided), + fInterpolateLowerLimit(other.fInterpolateLowerLimit), + fInterpolateUpperLimit(other.fInterpolateUpperLimit), + fFittedLowerLimit(other.fFittedLowerLimit), + fFittedUpperLimit(other.fFittedUpperLimit), + fInterpolOption(other.fInterpolOption), + fLowerLimitError(other.fLowerLimitError), + fUpperLimitError(other.fUpperLimitError), + fCLsCleanupThreshold(other.fCLsCleanupThreshold) +{ + // copy constructor + fLowerLimit = TMath::QuietNaN(); + fUpperLimit = TMath::QuietNaN(); + int nOther = other.ArraySize(); + + fXValues = other.fXValues; + for (int i = 0; i < nOther; ++i) + fYObjects.Add( other.fYObjects.At(i)->Clone() ); + for (int i = 0; i < fExpPValues.GetSize() ; ++i) + fExpPValues.Add( other.fExpPValues.At(i)->Clone() ); +} + + +HypoTestInverterResult& +HypoTestInverterResult::operator=(const HypoTestInverterResult& other) +{ + if (&other==this) { + return *this ; + } + + SimpleInterval::operator = (other); + fLowerLimit = other.fLowerLimit; + fUpperLimit = other.fUpperLimit; + fUseCLs = other.fUseCLs; + fIsTwoSided = other.fIsTwoSided; + fInterpolateLowerLimit = other.fInterpolateLowerLimit; + fInterpolateUpperLimit = other.fInterpolateUpperLimit; + fFittedLowerLimit = other.fFittedLowerLimit; + fFittedUpperLimit = other.fFittedUpperLimit; + fInterpolOption = other.fInterpolOption; + fLowerLimitError = other.fLowerLimitError; + fUpperLimitError = other.fUpperLimitError; + fCLsCleanupThreshold = other.fCLsCleanupThreshold; + + int nOther = other.ArraySize(); + fXValues = other.fXValues; + + fYObjects.RemoveAll(); + for (int i=0; i < nOther; ++i) { + fYObjects.Add( other.fYObjects.At(i)->Clone() ); + } + fExpPValues.RemoveAll(); + for (int i=0; i < fExpPValues.GetSize() ; ++i) { + fExpPValues.Add( other.fExpPValues.At(i)->Clone() ); + } + + return *this; +} + + HypoTestInverterResult::HypoTestInverterResult( const char* name, const RooRealVar& scannedVariable, double cl ) : @@ -78,7 +142,8 @@ HypoTestInverterResult::HypoTestInverterResult( const char* name, fFittedUpperLimit(false), fInterpolOption(kLinear), fLowerLimitError(-1), - fUpperLimitError(-1) + fUpperLimitError(-1), + fCLsCleanupThreshold(0.005) { // constructor fYObjects.SetOwner(); @@ -91,6 +156,121 @@ HypoTestInverterResult::HypoTestInverterResult( const char* name, } +void +HypoTestInverterResult::ExclusionCleanup() +{ + const int nEntries = ArraySize(); + + // initialization + double nsig1(1.0); + double nsig2(2.0); + double p[5]; + double q[5]; + std::vector qv; + qv.resize(11,-1.0); + + p[0] = ROOT::Math::normal_cdf(-nsig2); + p[1] = ROOT::Math::normal_cdf(-nsig1); + p[2] = 0.5; + p[3] = ROOT::Math::normal_cdf(nsig1); + p[4] = ROOT::Math::normal_cdf(nsig2); + + bool resultIsAsymptotic(false); + if (nEntries>=1) { + HypoTestResult* r = dynamic_cast ( GetResult(0) ); + assert(r!=0); + if ( !r->GetNullDistribution() && !r->GetAltDistribution() ) { + resultIsAsymptotic = true; + } + } + + double CLsobsprev(1.0); + std::vector::iterator itr = fXValues.begin(); + + for (; itr!=fXValues.end();) { + + double x = (*itr); + int i = FindIndex(x); + //HypoTestResult* oneresult = GetResult(i); + + SamplingDistribution * s = GetExpectedPValueDist(i); + if (!s) break; + + ///////////////////////////////////////////////////////////////////////////////////////// + + const std::vector & values = s->GetSamplingDistribution(); + + /// expected p-values + // special case for asymptotic results (cannot use TMath::quantile in that case) + if (resultIsAsymptotic) { + double maxSigma = 5; // == HypoTestInverterResult::fgAsymptoticMaxSigma; // MB: HACK + double dsig = 2.*maxSigma / (values.size() -1) ; + int i0 = (int) TMath::Floor ( ( -nsig2 + maxSigma )/dsig + 0.5 ); + int i1 = (int) TMath::Floor ( ( -nsig1 + maxSigma )/dsig + 0.5 ); + int i2 = (int) TMath::Floor ( ( maxSigma )/dsig + 0.5 ); + int i3 = (int) TMath::Floor ( ( nsig1 + maxSigma )/dsig + 0.5 ); + int i4 = (int) TMath::Floor ( ( nsig2 + maxSigma )/dsig + 0.5 ); + // + q[0] = values[i0]; + q[1] = values[i1]; + q[2] = values[i2]; + q[3] = values[i3]; + q[4] = values[i4]; + } else { + double * z = const_cast( &values[0] ); // need to change TMath::Quantiles + TMath::Quantiles(values.size(), 5, z, q, p, false); + } + + delete s; + + /// store useful quantities for reuse later ... + /// http://root.cern.ch/root/html532/src/RooStats__HypoTestInverterPlot.cxx.html#197 + for (int j=0; j<5; ++j) { qv[j]=q[j]; } + qv[5] = CLs(i) ; // + qv[6] = CLsError(i) ; // + qv[7] = CLb(i) ; // + qv[8] = CLbError(i) ; // + qv[9] = CLsplusb(i) ; // + qv[10] = CLsplusbError(i) ; // + double CLsobs = qv[5]; + + ///////////////////////////////////////////////////////////////////////////////////////// + + bool removeThisPoint(false); + + // 1. CLs should drop, else skip this point + if (!removeThisPoint && resultIsAsymptotic && i>=1 && CLsobs>CLsobsprev) { + //StatToolsLogger << kERROR << "Asymptotic. CLs not dropping: " << CLsobs << ". Remove this point." << GEndl; + removeThisPoint = true; + } else { CLsobsprev = CLsobs; } + + // 2. CLs should not spike, else skip this point + if (!removeThisPoint && i>=1 && CLsobs>=0.9999) { + //StatToolsLogger << kERROR << "CLs spiking at 1.0: " << CLsobs << ". Remove this point." << GEndl; + removeThisPoint = true; + } + // 3. Not interested in CLs values that become too low. + if (!removeThisPoint && i>=1 && qv[4] @@ -31,22 +31,30 @@ int quasirandom(int n = 10000) { // generate n random points double x[2]; + TStopwatch w; w.Start(); for (int i = 0; i < n; ++i) { r0.RndmArray(2,x); h0->Fill(x[0],x[1]); } + std::cout << "Time for gRandom "; + w.Print(); - + w.Start(); for (int i = 0; i < n; ++i) { r1.Next(x); h1->Fill(x[0],x[1]); } + std::cout << "Time for Sobol "; + w.Print(); + w.Start(); for (int i = 0; i < n; ++i) { r2.Next(x); h2->Fill(x[0],x[1]); } + std::cout << "Time for Niederreiter "; + w.Print(); TCanvas * c1 = new TCanvas("c1","Random sequence",600,1200); From 22d7c5ef66b63bcb671e239b33ba499aa4e2d6a2 Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Tue, 19 Nov 2013 16:49:10 +0100 Subject: [PATCH 20/85] Add skipping of n quasi random numbers --- math/mathmore/inc/Math/GSLQuasiRandom.h | 5 +- math/mathmore/inc/Math/QuasiRandom.h | 158 ++++++++++++------------ math/mathmore/src/GSLQuasiRandom.cxx | 9 ++ tutorials/math/quasirandom.C | 4 +- 4 files changed, 98 insertions(+), 78 deletions(-) diff --git a/math/mathmore/inc/Math/GSLQuasiRandom.h b/math/mathmore/inc/Math/GSLQuasiRandom.h index adff65546fd1b..1adcf3726064f 100644 --- a/math/mathmore/inc/Math/GSLQuasiRandom.h +++ b/math/mathmore/inc/Math/GSLQuasiRandom.h @@ -103,7 +103,10 @@ namespace Math { */ bool operator() (double * x) const; - + /** + Skip the next n random numbers + */ + bool Skip(unsigned int n) const; /** Generate an array of quasi random numbers diff --git a/math/mathmore/inc/Math/QuasiRandom.h b/math/mathmore/inc/Math/QuasiRandom.h index 3d65cc572f72f..b5c1cd5764da5 100644 --- a/math/mathmore/inc/Math/QuasiRandom.h +++ b/math/mathmore/inc/Math/QuasiRandom.h @@ -44,113 +44,119 @@ namespace Math { //_____________________________________________________________________________________ - /** - User class for MathMore random numbers template on the Engine type. - The API of this class followed that of the class ROOT::Math::Random - It must be implemented using as Engine one of the derived classes of - ROOT::Math::GSLQuasiRandomEngine, like ROOT::Math::GSLQrngSobol +/** + User class for MathMore random numbers template on the Engine type. + The API of this class followed that of the class ROOT::Math::Random + It must be implemented using as Engine one of the derived classes of + ROOT::Math::GSLQuasiRandomEngine, like ROOT::Math::GSLQrngSobol - @ingroup Random + @ingroup Random - */ - template < class Engine> - class QuasiRandom { +*/ +template < class Engine> +class QuasiRandom { - public: +public: - /** - Create a QuasiRandom generator. Use default engine constructor. - Engine will be initialized via Initialize() function in order to - allocate resources - */ - QuasiRandom(unsigned int dimension = 1) { + /** + Create a QuasiRandom generator. Use default engine constructor. + Engine will be initialized via Initialize() function in order to + allocate resources + */ + QuasiRandom(unsigned int dimension = 1) { fEngine.Initialize(dimension); - } + } - /** - Create a QuasiRandom generator based on a provided generic engine. - Engine will be initialized via Initialize() function in order to - allocate resources - */ - explicit QuasiRandom(const Engine & e, unsigned int dimension = 1) : fEngine(e) { + /** + Create a QuasiRandom generator based on a provided generic engine. + Engine will be initialized via Initialize() function in order to + allocate resources + */ + explicit QuasiRandom(const Engine & e, unsigned int dimension = 1) : fEngine(e) { fEngine.Initialize(dimension); - } + } - /** - Destructor: call Terminate() function of engine to free any - allocated resource - */ - ~QuasiRandom() { + /** + Destructor: call Terminate() function of engine to free any + allocated resource + */ + ~QuasiRandom() { fEngine.Terminate(); - } + } - /** - Generate next quasi random numbers points - */ - bool Next(double * x) { + /** + Generate next quasi random numbers points + */ + bool Next(double * x) { return fEngine(x); - } + } - /** - Generate next quasi random numbers point (1 - dimension) - */ - double Next() { + /** + Generate next quasi random numbers point (1 - dimension) + */ + double Next() { return fEngine(); - } + } - /** + /** Generate quasi random numbers between ]0,1[ 0 and 1 are excluded Function to be compatible with ROOT TRandom compatibility - */ + */ double Rndm() { return fEngine(); - } - - /** + } + + /** + skip the next n number and jumb directly to the current state + n + */ + bool Skip(unsigned int n) { + return fEngine.Skip(n); + } + /** Generate an array of random numbers between ]0,1[ Function to preserve ROOT Trandom compatibility The array will be filled as x1,y1,z1,....x2,y2,z2,... - */ - bool RndmArray(int n, double * array) { - return fEngine.GenerateArray(array, array+n*NDim()); - } - - /** - Return the type (name) of the used generator - */ - std::string Type() const { + */ + bool RndmArray(int n, double * array) { + return fEngine.GenerateArray(array, array+n*NDim()); + } + + /** + Return the type (name) of the used generator + */ + std::string Type() const { return fEngine.Name(); - } - - /** - Return the size of the generator state - */ - unsigned int EngineSize() const { + } + + /** + Return the size of the generator state + */ + unsigned int EngineSize() const { return fEngine.Size(); - } - - /** - Return the dimension of the generator - */ - unsigned int NDim() const { + } + + /** + Return the dimension of the generator + */ + unsigned int NDim() const { return fEngine.NDim(); - } + } - /** - Return the name of the generator - */ - std::string Name() const { - return fEngine.Name(); - } + /** + Return the name of the generator + */ + std::string Name() const { + return fEngine.Name(); + } - private: +private: - Engine fEngine; + Engine fEngine; - }; +}; diff --git a/math/mathmore/src/GSLQuasiRandom.cxx b/math/mathmore/src/GSLQuasiRandom.cxx index 75c9c62fc1604..4c96e56f1de2b 100644 --- a/math/mathmore/src/GSLQuasiRandom.cxx +++ b/math/mathmore/src/GSLQuasiRandom.cxx @@ -112,6 +112,15 @@ namespace Math { return (status == 0); } + bool GSLQuasiRandomEngine::Skip(unsigned int n) const { + // throw away the next n random numbers + std::vector xtmp(fQRng->Dimension() ); + int status = 0; + for (unsigned int i = 0; i < n; ++i ) { + status |= gsl_qrng_get(fQRng->Rng(), &xtmp[0] ); + } + return status == 0; + } bool GSLQuasiRandomEngine::GenerateArray(double * begin, double * end ) const { // generate array of randoms betweeen 0 and 1. 0 is excluded diff --git a/tutorials/math/quasirandom.C b/tutorials/math/quasirandom.C index 2dc43ab36d691..7ddd4d40b5e19 100644 --- a/tutorials/math/quasirandom.C +++ b/tutorials/math/quasirandom.C @@ -13,7 +13,7 @@ using namespace ROOT::Math; -int quasirandom(int n = 10000) { +int quasirandom(int n = 10000, int skip = 0) { TH2D * h0 = new TH2D("h0","Pseudo-random Sequence",200,0,1,200,0,1); @@ -40,6 +40,7 @@ int quasirandom(int n = 10000) { w.Print(); w.Start(); + if( skip>0) r1.Skip(skip); for (int i = 0; i < n; ++i) { r1.Next(x); h1->Fill(x[0],x[1]); @@ -49,6 +50,7 @@ int quasirandom(int n = 10000) { w.Start(); + if( skip>0) r2.Skip(skip); for (int i = 0; i < n; ++i) { r2.Next(x); h2->Fill(x[0],x[1]); From d1ffea01e0100b8644f3e35c94f91a2fd21c4dd5 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 13:24:00 -0600 Subject: [PATCH 21/85] Avoid duplication of enum value assignment that must be equal. This solves ROOT-5730. --- core/meta/inc/TDictionary.h | 16 +++++++++- core/meta/inc/TStreamerElement.h | 21 +++++++++---- core/meta/inc/TVirtualStreamerInfo.h | 7 ++++- core/metautils/inc/ESTLType.h | 44 ++++++++++++++++++++++++++++ core/metautils/inc/TClassEdit.h | 22 ++++++++------ 5 files changed, 93 insertions(+), 17 deletions(-) create mode 100644 core/metautils/inc/ESTLType.h diff --git a/core/meta/inc/TDictionary.h b/core/meta/inc/TDictionary.h index 632599f78ca18..49db02d460673 100644 --- a/core/meta/inc/TDictionary.h +++ b/core/meta/inc/TDictionary.h @@ -57,6 +57,10 @@ typedef void MethodArgInfo_t; typedef void TypeInfo_t; typedef void TypedefInfo_t; +#ifndef ROOT_ESTLType +#include "ESTLType.h" +#endif + enum EProperty { kIsClass = G__BIT_ISCLASS, kIsStruct = G__BIT_ISSTRUCT, @@ -95,7 +99,17 @@ class TDictionary : public TNamed { static TDictionary* GetDictionary(const type_info &typeinfo); // Type of STL container (returned by IsSTLContainer). - enum ESTLType {kNone=0, kVector=1, kList, kDeque, kMap, kMultimap, kSet, kMultiset}; + enum ESTLType { + kNone = ROOT::kNotSTL, + kVector = ROOT::kSTLvector, + kList = ROOT::kSTLlist, + kDeque = ROOT::kSTLdeque, + kMap = ROOT::kSTLmap, + kMultimap = ROOT::kSTLmultimap, + kSet = ROOT::kSTLset, + kMultiset = ROOT::kSTLmultiset, + kBitset = ROOT::kSTLbitset + }; ClassDef(TDictionary,0) //ABC defining interface to dictionary }; diff --git a/core/meta/inc/TStreamerElement.h b/core/meta/inc/TStreamerElement.h index d0f458c338253..e3da746481053 100644 --- a/core/meta/inc/TStreamerElement.h +++ b/core/meta/inc/TStreamerElement.h @@ -25,6 +25,10 @@ #include "TNamed.h" #endif +#ifndef ROOT_ESTLType +#include "ESTLType.h" +#endif + class TMethodCall; class TClass; class TStreamerBasicType; @@ -54,12 +58,17 @@ class TStreamerElement : public TNamed { public: - enum ESTLtype { kSTL = 300 /* TVirtualStreamerInfo::kSTL */, - kSTLstring = 365 /* TVirtualStreamerInfo::kSTLstring */, - kSTLvector = 1, - kSTLlist = 2, kSTLdeque = 3, kSTLmap = 4, - kSTLset = 5, kSTLmultimap= 6, kSTLmultiset = 7, - kSTLbitset = 8 + enum ESTLtype { + kSTL = ROOT::kSTLany, + kSTLstring = ROOT::kSTLstring, + kSTLvector = ROOT::kSTLvector, + kSTLlist = ROOT::kSTLlist, + kSTLdeque = ROOT::kSTLdeque, + kSTLmap = ROOT::kSTLmap, + kSTLmultimap = ROOT::kSTLmultimap, + kSTLset = ROOT::kSTLset, + kSTLmultiset = ROOT::kSTLmultiset, + kSTLbitset = ROOT::kSTLbitset }; // TStreamerElement status bits enum { diff --git a/core/meta/inc/TVirtualStreamerInfo.h b/core/meta/inc/TVirtualStreamerInfo.h index e187c0b986c03..569d7e667ffd6 100644 --- a/core/meta/inc/TVirtualStreamerInfo.h +++ b/core/meta/inc/TVirtualStreamerInfo.h @@ -25,6 +25,10 @@ #include "TNamed.h" #endif +#ifndef ROOT_ESTLType +#include "ESTLType.h" +#endif + class TFile; class TClass; class TObjArray; @@ -70,7 +74,8 @@ class TVirtualStreamerInfo : public TNamed { kSTLp = 71, kSkip = 100, kSkipL = 120, kSkipP = 140, kConv = 200, kConvL = 220, kConvP = 240, - kSTL = 300, kSTLstring = 365, + kSTL = ROOT::kSTLany /* 300 */, + kSTLstring = ROOT::kSTLstring /* 365 */, kStreamer = 500, kStreamLoop = 501, kCache = 600, // Cache the value in memory than is not part of the object but is accessible via a SchemaRule kArtificial = 1000, diff --git a/core/metautils/inc/ESTLType.h b/core/metautils/inc/ESTLType.h new file mode 100644 index 0000000000000..4b272078e0fb0 --- /dev/null +++ b/core/metautils/inc/ESTLType.h @@ -0,0 +1,44 @@ +// @(#)root/metautils: +// Author: Philippe Canal November 2013 + +/************************************************************************* + * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. * + * All rights reserved. * + * * + * For the licensing terms see $ROOTSYS/LICENSE. * + * For the list of contributors see $ROOTSYS/README/CREDITS. * + *************************************************************************/ + +#ifndef ROOT_ESTLType +#define ROOT_ESTLType + + +////////////////////////////////////////////////////////////////////////// +// // +// ROOT::ESTLType // +// // +// Enum describing STL collections and some std classes // +// This is used in TClassEdit, TStreamerInfo, TClassEdit // +// and TStreamerElement. // +// // +////////////////////////////////////////////////////////////////////////// + +namespace ROOT { + + enum ESTLType { + kNotSTL = 0, + kSTLvector = 1, + kSTLlist = 2, + kSTLdeque = 3, + kSTLmap = 4, + kSTLmultimap = 5, + kSTLset = 6, + kSTLmultiset = 7, + kSTLbitset = 8, + kSTLany = 300 /* TVirtualStreamerInfo::kSTL */, + kSTLstring = 365 /* TVirtualStreamerInfo::kSTLstring */ + }; + +} + +#endif \ No newline at end of file diff --git a/core/metautils/inc/TClassEdit.h b/core/metautils/inc/TClassEdit.h index bd396c0ae5aed..b575a9072acef 100644 --- a/core/metautils/inc/TClassEdit.h +++ b/core/metautils/inc/TClassEdit.h @@ -17,6 +17,10 @@ #include #include +#ifndef ROOT_ESTLType +#include "ESTLType.h" +#endif + #ifdef R__OLDHPACC namespace std { using ::string; @@ -46,15 +50,15 @@ namespace TClassEdit { }; enum ESTLType { - kNotSTL = 0, - kVector = 1, - kList = 2, - kDeque = 3, - kMap = 4, - kMultiMap = 5, - kSet = 6, - kMultiSet = 7, - kBitSet = 8, + kNotSTL = ROOT::kNotSTL, + kVector = ROOT::kSTLvector, + kList = ROOT::kSTLlist, + kDeque = ROOT::kSTLdeque, + kMap = ROOT::kSTLmap, + kMultiMap = ROOT::kSTLmultimap, + kSet = ROOT::kSTLset, + kMultiSet = ROOT::kSTLmultiset, + kBitSet = ROOT::kSTLbitset, kEnd = 9 }; From bd4ceedc04810a62c55a05602999236b4be3c019 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 17:05:23 -0600 Subject: [PATCH 22/85] Add backward compatibility to 'fix' the value fSTLtype in StreamerElement --- core/meta/src/TStreamerElement.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/meta/src/TStreamerElement.cxx b/core/meta/src/TStreamerElement.cxx index 632e8fb56a8d7..7f7414919cb4b 100644 --- a/core/meta/src/TStreamerElement.cxx +++ b/core/meta/src/TStreamerElement.cxx @@ -1836,6 +1836,18 @@ void TStreamerSTL::Streamer(TBuffer &R__b) R__b >> fCtype; R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA()); } + if (fSTLtype == kSTLmultimap || fSTLtype == kSTLset) { + // For a long time those where inverted compared to the other + // definitions. When we move to version 'x', this got standardized, + // but we now need to fix it. + + if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) { + fSTLtype = kSTLset; + } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) { + fSTLtype = kSTLmultimap; + } + } + if (IsaPointer()) fType = TVirtualStreamerInfo::kSTLp; else fType = TVirtualStreamerInfo::kSTL; if (GetArrayLength() > 0) { From c8325abe21923e5f47514480ddbecb9b4a420a52 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 17:06:01 -0600 Subject: [PATCH 23/85] Use the correct header file for multiset and multimap --- core/meta/src/TStreamerElement.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/meta/src/TStreamerElement.cxx b/core/meta/src/TStreamerElement.cxx index 7f7414919cb4b..52b8c631785a0 100644 --- a/core/meta/src/TStreamerElement.cxx +++ b/core/meta/src/TStreamerElement.cxx @@ -1804,8 +1804,8 @@ const char *TStreamerSTL::GetInclude() const else if (fSTLtype == kSTLdeque) gIncludeName.Form("<%s>","deque"); else if (fSTLtype == kSTLmap) gIncludeName.Form("<%s>","map"); else if (fSTLtype == kSTLset) gIncludeName.Form("<%s>","set"); - else if (fSTLtype == kSTLmultimap) gIncludeName.Form("<%s>","multimap"); - else if (fSTLtype == kSTLmultiset) gIncludeName.Form("<%s>","multiset"); + else if (fSTLtype == kSTLmultimap) gIncludeName.Form("<%s>","map"); + else if (fSTLtype == kSTLmultiset) gIncludeName.Form("<%s>","set"); else if (fSTLtype == kSTLbitset) gIncludeName.Form("<%s>","bitset"); return gIncludeName; } From f2f2e9c4f4354f9cf3dc4d9d72873fdf6da3e939 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 21:06:26 -0600 Subject: [PATCH 24/85] Resolve ambiguity --- core/utils/src/rootcint.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/utils/src/rootcint.cxx b/core/utils/src/rootcint.cxx index 0efa87e260b89..43ff08dab1e82 100644 --- a/core/utils/src/rootcint.cxx +++ b/core/utils/src/rootcint.cxx @@ -1626,7 +1626,7 @@ int IsSTLContainer(G__DataMemberInfo &m) // Is this an STL container? const char *s = m.Type()->TrueName(); - if (!s) return kNotSTL; + if (!s) return TClassEdit::kNotSTL; string type(s); int k = TClassEdit::IsSTLCont(type.c_str(),1); @@ -1642,7 +1642,7 @@ int IsSTLContainer(G__BaseClassInfo &m) // Is this an STL container? const char *s = m.Name(); - if (!s) return kNotSTL; + if (!s) return TClassEdit::kNotSTL; string type(s); int k = TClassEdit::IsSTLCont(type.c_str(),1); From fc170b8ea2a36fc244cb02c953f6e65f63cc2cca Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 20:43:35 -0600 Subject: [PATCH 25/85] Increment version number of TStreamerSTL Conflicts: core/meta/src/TStreamerElement.cxx --- core/meta/inc/TStreamerElement.h | 2 +- core/meta/src/TStreamerElement.cxx | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/meta/inc/TStreamerElement.h b/core/meta/inc/TStreamerElement.h index e3da746481053..0175724da7cc7 100644 --- a/core/meta/inc/TStreamerElement.h +++ b/core/meta/inc/TStreamerElement.h @@ -388,7 +388,7 @@ class TStreamerSTL : public TStreamerElement { void SetCtype(Int_t t) {fCtype = t;} virtual void SetStreamer(TMemberStreamer *streamer); - ClassDef(TStreamerSTL,3) //Streamer element of type STL container + ClassDef(TStreamerSTL,4) //Streamer element of type STL container }; //________________________________________________________________________ diff --git a/core/meta/src/TStreamerElement.cxx b/core/meta/src/TStreamerElement.cxx index 52b8c631785a0..843a8378bb64f 100644 --- a/core/meta/src/TStreamerElement.cxx +++ b/core/meta/src/TStreamerElement.cxx @@ -1836,15 +1836,17 @@ void TStreamerSTL::Streamer(TBuffer &R__b) R__b >> fCtype; R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA()); } - if (fSTLtype == kSTLmultimap || fSTLtype == kSTLset) { - // For a long time those where inverted compared to the other - // definitions. When we move to version 'x', this got standardized, - // but we now need to fix it. - - if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) { - fSTLtype = kSTLset; - } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) { - fSTLtype = kSTLmultimap; + if (R__v < 4) { + if (fSTLtype == kSTLmultimap || fSTLtype == kSTLset) { + // For a long time those where inverted in TStreamerElement + // compared to the other definitions. When we moved to version '4', + // this got standardized, but we now need to fix it. + + if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) { + fSTLtype = kSTLset; + } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) { + fSTLtype = kSTLmultimap; + } } } From 086a7f53520bb6d12778c001cf04881ba3b8e83a Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 19 Nov 2013 21:28:10 -0600 Subject: [PATCH 26/85] Revert "Increment version number of TStreamerSTL" This reverts commit fc170b8ea2a36fc244cb02c953f6e65f63cc2cca. --- core/meta/inc/TStreamerElement.h | 2 +- core/meta/src/TStreamerElement.cxx | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/core/meta/inc/TStreamerElement.h b/core/meta/inc/TStreamerElement.h index 0175724da7cc7..e3da746481053 100644 --- a/core/meta/inc/TStreamerElement.h +++ b/core/meta/inc/TStreamerElement.h @@ -388,7 +388,7 @@ class TStreamerSTL : public TStreamerElement { void SetCtype(Int_t t) {fCtype = t;} virtual void SetStreamer(TMemberStreamer *streamer); - ClassDef(TStreamerSTL,4) //Streamer element of type STL container + ClassDef(TStreamerSTL,3) //Streamer element of type STL container }; //________________________________________________________________________ diff --git a/core/meta/src/TStreamerElement.cxx b/core/meta/src/TStreamerElement.cxx index 843a8378bb64f..52b8c631785a0 100644 --- a/core/meta/src/TStreamerElement.cxx +++ b/core/meta/src/TStreamerElement.cxx @@ -1836,17 +1836,15 @@ void TStreamerSTL::Streamer(TBuffer &R__b) R__b >> fCtype; R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA()); } - if (R__v < 4) { - if (fSTLtype == kSTLmultimap || fSTLtype == kSTLset) { - // For a long time those where inverted in TStreamerElement - // compared to the other definitions. When we moved to version '4', - // this got standardized, but we now need to fix it. - - if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) { - fSTLtype = kSTLset; - } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) { - fSTLtype = kSTLmultimap; - } + if (fSTLtype == kSTLmultimap || fSTLtype == kSTLset) { + // For a long time those where inverted compared to the other + // definitions. When we move to version 'x', this got standardized, + // but we now need to fix it. + + if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) { + fSTLtype = kSTLset; + } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) { + fSTLtype = kSTLmultimap; } } From 5335ac42d592714014fd96b434455f173a1a71c1 Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Wed, 20 Nov 2013 09:34:16 +0100 Subject: [PATCH 27/85] Fix the issue mention described: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=17322 Predefined palettes where redefined even if it was not necessary. --- core/base/src/TColor.cxx | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/core/base/src/TColor.cxx b/core/base/src/TColor.cxx index a360f09006050..63b1115ce5d45 100644 --- a/core/base/src/TColor.cxx +++ b/core/base/src/TColor.cxx @@ -208,7 +208,7 @@ Begin_Macro(source) End_Macro Begin_Html -

The function TColor::CreateGradientColorTable() automatically +

The function TColor::CreateGradientColorTable() automatically calls gStyle->SetPalette(), so there is not need to add one.

After a call to TColor::CreateGradientColorTable() it is sometimes @@ -238,13 +238,13 @@ The following macro illustrate this feature. End_Html Begin_Macro(source) ../../../tutorials/graphs/multipalette.C -End_Macro +End_Macro Begin_Html

Color transparency

-To make a graphics object transparent it is enough to set its color to a -transparent one. The color transparency is defined via its alpha component. The -alpha value varies from 0. (fully transparent) to 1. (fully +To make a graphics object transparent it is enough to set its color to a +transparent one. The color transparency is defined via its alpha component. The +alpha value varies from 0. (fully transparent) to 1. (fully opaque). To set the alpha value of an existing color it is enough to do:
    TColor *col26 = gROOT->GetColor(26);
@@ -256,7 +256,7 @@ A new color can be created transparent the following way:
    TColor *color = new TColor(ci, 0.1, 0.2, 0.3, "", 0.5); // alpha = 0.5
 
An example of tranparency usage with parallel coordinates can be found -in $ROOTSYS/tutorials/tree/parallelcoordtrans.C. Right now the +in $ROOTSYS/tutorials/tree/parallelcoordtrans.C. Right now the transparency is implemented only for PDF output, SVG output, and for gif, jpg and png outputs. @@ -1608,14 +1608,14 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) Spectrum Violet->Red is created with 50 colors. That's the default rain bow pallette.

- Other prefined palettes with 255 colors are available when colors == 0. + Other prefined palettes with 255 colors are available when colors == 0. The following value of ncolors give access to:

    if ncolors = 51 and colors=0, a Deep Sea palette is used.
    if ncolors = 52 and colors=0, a Grey Scale palette is used.
    if ncolors = 53 and colors=0, a Dark Body Radiator palette is used.
-   if ncolors = 54 and colors=0, a two-color hue palette palette is used.(dark blue through neutral gray to bright yellow) 
+   if ncolors = 54 and colors=0, a two-color hue palette palette is used.(dark blue through neutral gray to bright yellow)
    if ncolors = 55 and colors=0, a Rain Bow palette is used.
    if ncolors = 56 and colors=0, an inverted Dark Body Radiator palette is used.
    
@@ -1625,8 +1625,8 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) the item "colors" in the "VIEW" menu of the canvas toolbar. The color parameters can be changed via TColor::SetRGB.

- Note that when drawing a 2D histogram h2 with the option "COL" or - "COLZ" or with any "CONT" options using the color map, the number of colors + Note that when drawing a 2D histogram h2 with the option "COL" or + "COLZ" or with any "CONT" options using the color map, the number of colors used is defined by the number of contours n specified with: h2->SetContour(n) End_html */ @@ -1659,7 +1659,7 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) // set Deep Sea palette if (ncolors == 51 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 3) return; + if (paletteType == 3) return; const Int_t nRGBs = 5; Double_t stops[nRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; Double_t red[nRGBs] = { 0.00, 0.09, 0.18, 0.09, 0.00 }; @@ -1669,11 +1669,11 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) paletteType = 3; return; } - + // set Grey Scale palette if (ncolors == 52 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 4) return; + if (paletteType == 4) return; const Int_t nRGBs = 3; Double_t stops[nRGBs] = { 0.00, 0.50, 1.00}; Double_t red[nRGBs] = { 0.00, 0.50, 1.00}; @@ -1683,11 +1683,11 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) paletteType = 4; return; } - + // set Dark Body Radiator palette if (ncolors == 53 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 5) return; + if (paletteType == 5) return; const Int_t nRGBs = 5; Double_t stops[nRGBs] = { 0.00, 0.25, 0.50, 0.75, 1.00}; Double_t red[nRGBs] = { 0.00, 0.50, 1.00, 1.00, 1.00}; @@ -1697,11 +1697,11 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) paletteType = 5; return; } - + // set two-color hue palette (dark blue through neutral gray to bright yellow) if (ncolors == 54 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 6) return; + if (paletteType == 6) return; const Int_t nRGBs = 3; Double_t stops[nRGBs] = { 0.00, 0.50, 1.00}; Double_t red[nRGBs] = { 0.00, 0.50, 1.00}; @@ -1711,11 +1711,11 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) paletteType = 6; return; } - - // set Rain Bow palette + + // set Rain Bow palette if (ncolors == 55 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 7) return; + if (paletteType == 7) return; const Int_t nRGBs = 5; Double_t stops[nRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; Double_t red[nRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; @@ -1725,18 +1725,18 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) paletteType = 7; return; } - + // set Inverted Dark Body Radiator palette if (ncolors == 56 && colors == 0) { TColor::InitializeColors(); - if (ncolors == fgPalette.fN && paletteType == 5) return; + if (paletteType == 8) return; const Int_t nRGBs = 5; Double_t stops[nRGBs] = { 0.00, 0.25, 0.50, 0.75, 1.00}; Double_t red[nRGBs] = { 1.00, 1.00, 1.00, 0.50, 0.00}; Double_t green[nRGBs] = { 1.00, 1.00, 0.55, 0.00, 0.00}; Double_t blue[nRGBs] = { 1.00, 0.00, 0.00, 0.00, 0.00}; TColor::CreateGradientColorTable(nRGBs, stops, red, green, blue, 255, alpha); - paletteType = 5; + paletteType = 8; return; } @@ -1744,6 +1744,6 @@ void TColor::SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha) fgPalette.Set(ncolors); if (colors) for (i=0;i Date: Wed, 20 Nov 2013 18:08:37 +0100 Subject: [PATCH 28/85] Fix for the introduction of core/metautils/inc/ESTLType.h (CMake) --- core/meta/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/meta/CMakeLists.txt b/core/meta/CMakeLists.txt index 39a005b532ab9..fc6458acea7a8 100644 --- a/core/meta/CMakeLists.txt +++ b/core/meta/CMakeLists.txt @@ -2,6 +2,8 @@ # CMakeLists.txt file for building ROOT core/meta package ############################################################################ +ROOT_USE_PACKAGE(core/metautils) + ROOT_GLOB_SOURCES(sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx) ROOT_GLOB_HEADERS(headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h) From a54d0ec9f62095d042b513b8a291fd0ab95d9d8c Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Wed, 20 Nov 2013 19:47:26 +0100 Subject: [PATCH 29/85] don't unzip and tar tv unnecessarily the unuran tar file. Fixes ROOT-5735. --- math/unuran/Module.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/math/unuran/Module.mk b/math/unuran/Module.mk index 3d301debd00d3..e46e3e4c8b9dd 100644 --- a/math/unuran/Module.mk +++ b/math/unuran/Module.mk @@ -20,6 +20,17 @@ UNRDIRS := $(call stripsrc,$(MODDIRS)/$(UNRVERS)) UNURANETAG := $(call stripsrc,$(UNURANDIRS)/headers.d) UNRCFG := $(call stripsrc,$(UNURANDIRS)/$(UNRVERS)/config.h) +ifneq ($(wildcard $(UNRDIRS)/.),) +UNRS := $(wildcard $(UNRDIRS)/src/utils/*.c) \ + $(wildcard $(UNRDIRS)/src/methods/*.c) \ + $(wildcard $(UNRDIRS)/src/specfunct/*.c) \ + $(wildcard $(UNRDIRS)/src/distr/*.c) \ + $(wildcard $(UNRDIRS)/src/distributions/*.c) \ + $(wildcard $(UNRDIRS)/src/parser/*.c) \ + $(wildcard $(UNRDIRS)/src/tests/*.c) \ + $(wildcard $(UNRDIRS)/src/uniform/*.c) \ + $(wildcard $(UNRDIRS)/src/urng/*.c) +else UNRTARCONTENT:=$(subst $(UNRVERS),$(UNRDIRS),$(shell mkdir -p $(UNRDIR); cd $(UNRDIR); gunzip -c $(UNRSRCS) | tar tf -)) UNRS := $(filter %.c, \ $(filter $(UNRDIRS)/src/utils/%,$(UNRTARCONTENT)) \ @@ -31,6 +42,7 @@ UNRS := $(filter %.c, \ $(filter $(UNRDIRS)/src/tests/%,$(UNRTARCONTENT)) \ $(filter $(UNRDIRS)/src/uniform/%,$(UNRTARCONTENT)) \ $(filter $(UNRDIRS)/src/urng/%,$(UNRTARCONTENT))) +endif UNRO := $(UNRS:.c=.o) ifeq ($(PLATFORM),win32) From 3b2d8b3e108c403d0579fc929bedd6a2f71a0192 Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Thu, 21 Nov 2013 11:18:38 +0100 Subject: [PATCH 30/85] possible fix for Windows. --- math/unuran/Module.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math/unuran/Module.mk b/math/unuran/Module.mk index e46e3e4c8b9dd..00a530bab9a26 100644 --- a/math/unuran/Module.mk +++ b/math/unuran/Module.mk @@ -20,7 +20,7 @@ UNRDIRS := $(call stripsrc,$(MODDIRS)/$(UNRVERS)) UNURANETAG := $(call stripsrc,$(UNURANDIRS)/headers.d) UNRCFG := $(call stripsrc,$(UNURANDIRS)/$(UNRVERS)/config.h) -ifneq ($(wildcard $(UNRDIRS)/.),) +ifneq ($(wildcard $(UNRDIRS)),) UNRS := $(wildcard $(UNRDIRS)/src/utils/*.c) \ $(wildcard $(UNRDIRS)/src/methods/*.c) \ $(wildcard $(UNRDIRS)/src/specfunct/*.c) \ From f3a5cedf1f5143122d1fb95f66b3f69cb8cb074f Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Thu, 21 Nov 2013 16:24:12 +0100 Subject: [PATCH 31/85] from Max Baak:: the cleanup function now return the number of rejected points. --- roofit/roostats/inc/RooStats/HypoTestInverterResult.h | 2 +- roofit/roostats/src/HypoTestInverterResult.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/roofit/roostats/inc/RooStats/HypoTestInverterResult.h b/roofit/roostats/inc/RooStats/HypoTestInverterResult.h index 4739eb703e64e..448ea8280bb63 100644 --- a/roofit/roostats/inc/RooStats/HypoTestInverterResult.h +++ b/roofit/roostats/inc/RooStats/HypoTestInverterResult.h @@ -46,7 +46,7 @@ class HypoTestInverterResult : public SimpleInterval { HypoTestInverterResult& operator = (const HypoTestInverterResult& other); // remove points that appear to have failed. - void ExclusionCleanup(); + int ExclusionCleanup(); // merge with the content of another HypoTestInverterResult object bool Add( const HypoTestInverterResult& otherResult ); diff --git a/roofit/roostats/src/HypoTestInverterResult.cxx b/roofit/roostats/src/HypoTestInverterResult.cxx index 9bf03acac096d..ce32f820a44b2 100644 --- a/roofit/roostats/src/HypoTestInverterResult.cxx +++ b/roofit/roostats/src/HypoTestInverterResult.cxx @@ -156,7 +156,7 @@ HypoTestInverterResult::HypoTestInverterResult( const char* name, } -void +int HypoTestInverterResult::ExclusionCleanup() { const int nEntries = ArraySize(); @@ -184,6 +184,8 @@ HypoTestInverterResult::ExclusionCleanup() } } + int nPointsRemoved(0); + double CLsobsprev(1.0); std::vector::iterator itr = fXValues.begin(); @@ -257,6 +259,7 @@ HypoTestInverterResult::ExclusionCleanup() itr = fXValues.erase(itr); // returned itr has been updated. fYObjects.RemoveAt(i); fExpPValues.RemoveAt(i); + nPointsRemoved++; continue; } else { // keep CLsobsprev = CLsobs; @@ -268,6 +271,8 @@ HypoTestInverterResult::ExclusionCleanup() fFittedUpperLimit = false; fFittedLowerLimit = false; FindInterpolatedLimit(1-ConfidenceLevel(),true); + + return nPointsRemoved; } From a6492e8770936b2f7c23d51dedd47d71c50d6682 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Thu, 21 Nov 2013 16:59:09 +0100 Subject: [PATCH 32/85] Patch from ROOT-5742 --- graf2d/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graf2d/CMakeLists.txt b/graf2d/CMakeLists.txt index da40ebab4d7b4..bf195dbefa67a 100644 --- a/graf2d/CMakeLists.txt +++ b/graf2d/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(postscript) add_subdirectory(mathtext) if(WIN32) add_subdirectory(win32gdk) -else() +elseif(x11) add_subdirectory(x11) # special CMakeLists.txt add_subdirectory(x11ttf) # special CMakeLists.txt endif() From 660ea6cfc01cb221c672d6d5d66fe40e985e34ec Mon Sep 17 00:00:00 2001 From: CristinaCristescu Date: Thu, 21 Nov 2013 15:01:19 +0100 Subject: [PATCH 33/85] Remove the Int properties from TClassAttributeMap. --- core/meta/inc/TClassAttributeMap.h | 6 +--- core/meta/src/TClassAttributeMap.cxx | 52 ---------------------------- 2 files changed, 1 insertion(+), 57 deletions(-) diff --git a/core/meta/inc/TClassAttributeMap.h b/core/meta/inc/TClassAttributeMap.h index c6de1c6f9daaf..ad506e05d7657 100644 --- a/core/meta/inc/TClassAttributeMap.h +++ b/core/meta/inc/TClassAttributeMap.h @@ -37,13 +37,10 @@ class TClassAttributeMap : public TObject TClassAttributeMap(); virtual ~TClassAttributeMap(); - void AddProperty(const char* key, Int_t value); void AddProperty(const char* key, const char* value); Bool_t HasKey(const char* key) const; const char *GetPropertyAsString(const char* key) const; - Int_t GetPropertyAsInt(const char* key) const; - Int_t GetPropertySize() const; - Int_t RemovePropertyInt(const char* key); + Int_t GetPropertySize() const { return fStringProperty.GetSize(); } TString RemovePropertyString(const char* key); Bool_t RemoveProperty(const char* key); void Clear(Option_t* option = ""); @@ -51,7 +48,6 @@ class TClassAttributeMap : public TObject private: THashTable fStringProperty; //all properties of String type - THashTable fIntProperty; //all properties of Int type ClassDef(TClassAttributeMap,1) // Container for name/value pairs of TClass attributes }; diff --git a/core/meta/src/TClassAttributeMap.cxx b/core/meta/src/TClassAttributeMap.cxx index c759258a035d0..8223589ad5950 100644 --- a/core/meta/src/TClassAttributeMap.cxx +++ b/core/meta/src/TClassAttributeMap.cxx @@ -30,7 +30,6 @@ ClassImp(TClassAttributeMap) TClassAttributeMap::TClassAttributeMap() { //Default constructor. - fIntProperty.SetOwner(kTRUE); fStringProperty.SetOwner(kTRUE); } @@ -40,16 +39,6 @@ TClassAttributeMap::~TClassAttributeMap() //Default destructor. } -//_____________________________________________________________________________ -void TClassAttributeMap::AddProperty(const char* key, Int_t value) -{ - //Add a property with a Int value to the TClassAttributeMap. - //Parameters: key and Int value of the property. - - //Add the property pair name - Int value to the hash table. - fIntProperty.Add(new TParameter(key, value)); -} - //_____________________________________________________________________________ void TClassAttributeMap::AddProperty(const char* key, const char* value) { @@ -68,27 +57,9 @@ Bool_t TClassAttributeMap::HasKey(const char* key) const if (fStringProperty.FindObject(key)) return true; - if (fIntProperty.FindObject(key)) - return true; return false; } -//_____________________________________________________________________________ -Int_t TClassAttributeMap::GetPropertyAsInt(const char* key) const -{ - //Access the value of a Int property using the key. - - //Copy object into found to avoid calling the function two times. - TObject* found = fIntProperty.FindObject(key); - if (found) - return ((TParameter*)found)->GetVal(); - else - //Show an error message if the key is not found. - Error("GetPropertyAsInt" - , "Could not find property with Int value for this key: %s", key); - return -1; -} - //_____________________________________________________________________________ const char* TClassAttributeMap::GetPropertyAsString(const char* key) const { @@ -105,28 +76,6 @@ const char* TClassAttributeMap::GetPropertyAsString(const char* key) const return 0; } -//_____________________________________________________________________________ -Int_t TClassAttributeMap::GetPropertySize() const -{ - //Return the number of properties of the class as Int_t. - - return fIntProperty.GetSize() + fStringProperty.GetSize(); -} - -//_____________________________________________________________________________ -Int_t TClassAttributeMap::RemovePropertyInt(const char* key) -{ - //Remove a Int property from the attribute map. - //Returns the Int property removed or NULL if the property does not exist. - - TParameter *property = (TParameter*)fIntProperty.FindObject(key); - if (property) { - fIntProperty.Remove(property); - return property->GetVal(); - } - return -1; -} - //_____________________________________________________________________________ TString TClassAttributeMap::RemovePropertyString(const char* key) { @@ -159,6 +108,5 @@ void TClassAttributeMap::Clear(Option_t* /*option = ""*/) { //Deletes all the properties of the class. - fIntProperty.Delete(); fStringProperty.Delete(); } From 4fbbe06ceecfd5d831454417dbfdc520486e2fe2 Mon Sep 17 00:00:00 2001 From: CristinaCristescu Date: Thu, 21 Nov 2013 15:02:03 +0100 Subject: [PATCH 34/85] Fill the TClassAttributeMap with the properties. --- cint/cintex/src/ROOTClassEnhancer.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cint/cintex/src/ROOTClassEnhancer.cxx b/cint/cintex/src/ROOTClassEnhancer.cxx index 06d78757b26ed..08b91fa407076 100644 --- a/cint/cintex/src/ROOTClassEnhancer.cxx +++ b/cint/cintex/src/ROOTClassEnhancer.cxx @@ -15,6 +15,7 @@ #include "Cintex/Cintex.h" #include "TROOT.h" #include "TClass.h" +#include "TClassAttributeMap.h" #include "TClassEdit.h" #include "TClassTable.h" #include "TClassStreamer.h" @@ -33,6 +34,7 @@ #include #include +#include #if ROOT_VERSION_CODE >= ROOT_VERSION(5,1,1) #include "TVirtualIsAProxy.h" @@ -394,6 +396,7 @@ namespace ROOT { namespace Cintex { TClass* ROOTClassEnhancerInfo::Default_CreateClass( Type typ, ROOT::TGenericClassInfo* info) { // Create root class. + TClass* root_class = 0; std::string Name = typ.Name(SCOPED); int kind = TClassEdit::IsSTLCont(Name.c_str()); @@ -461,6 +464,26 @@ namespace ROOT { namespace Cintex { root_class->SetBit(TClass::kIsForeign); } } + // Add the class properties. + PropertyList properties = typ.Properties(); + if (properties) { + size_t noProperties = properties.KeySize(); + // Add the properties to the map, if any. + if (noProperties > 0) { + //Create the attribute map. + root_class->CreateAttributeMap(); + TClassAttributeMap* attrMap = root_class->GetAttributeMap(); + for (size_t i = 1; i < noProperties; ++i) { + // Check if the property is exists and is valid. + if (properties.HasProperty(i)) { + // Get the String value of the property. + std::string stringValue = properties.PropertyAsString(i); + // Add the property to the map. + attrMap->AddProperty(properties.KeyAt(i).c_str(), stringValue.c_str()); + } + } + } + } // end of class has properties } return root_class; } From 341cb37d11449f33d0b33df38a430d69e1e7226e Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Thu, 21 Nov 2013 18:47:37 +0100 Subject: [PATCH 35/85] Change the way the string input is done in the Pad toolbar for text and Pave Label. It doesn't use anymore the TGX11 function RequestString. Now the text appears directly as it will show and it is possible to enter several text string. The input is not block in the RequestString event loop. --- graf2d/gpad/src/TCreatePrimitives.cxx | 144 ++++++++++++++++---------- 1 file changed, 89 insertions(+), 55 deletions(-) diff --git a/graf2d/gpad/src/TCreatePrimitives.cxx b/graf2d/gpad/src/TCreatePrimitives.cxx index c269ff99fd707..4a2f98241a5bf 100644 --- a/graf2d/gpad/src/TCreatePrimitives.cxx +++ b/graf2d/gpad/src/TCreatePrimitives.cxx @@ -36,6 +36,7 @@ #include "TROOT.h" #include "TSystem.h" #include "TMath.h" +#include "KeySymbols.h" //______________________________________________________________________________ TCreatePrimitives::TCreatePrimitives() @@ -304,18 +305,48 @@ void TCreatePrimitives::Pave(Int_t event, Int_t px, Int_t py, Int_t mode) static Int_t pxold, pyold; static Int_t px0, py0; static Int_t linedrawn; - const Int_t kTMAX=100; - Int_t i,pxl,pyl; + Int_t pxl,pyl; Double_t temp; Double_t xp0,xp1,yp0,yp1; - static char atext[kTMAX]; - TObject *pave = 0; + static TObject *pave = 0; if (mode == kPaveLabel) ((TPad *)gPad)->EventPave(); switch (event) { + case kKeyPress: + if (mode == kPaveLabel) { + if ((py == kKey_Return) || (py == kKey_Enter)) { + TString s(pave->GetTitle()); + Int_t l = s.Length(); + s.Remove(l-1); + ((TPaveLabel*)pave)->SetLabel(s.Data()); + gSystem->ProcessEvents(); + gPad->Modified(kTRUE); + gROOT->SetEditorMode(); + gPad->Update(); + pave = 0; + } else if (py == kKey_Backspace) { + TString s(pave->GetTitle()); + Int_t l = s.Length(); + if (l>1) { + s.Replace(l-2, 2, "<"); + ((TPaveLabel*)pave)->SetLabel(s.Data()); + gPad->Modified(kTRUE); + gPad->Update(); + } + } else if (isprint(py)) { + TString s(pave->GetTitle()); + Int_t l = s.Length(); + s.Insert(l-1,(char)py); + ((TPaveLabel*)pave)->SetLabel(s.Data()); + gPad->Modified(kTRUE); + gPad->Update(); + } + } + break; + case kButton1Down: gVirtualX->SetLineColor(-1); x0 = gPad->AbsPixeltoX(px); @@ -349,31 +380,18 @@ void TCreatePrimitives::Pave(Int_t event, Int_t px, Int_t py, Int_t mode) if (mode == kPaveText ) pave = new TPaveText(xp0,yp0,xp1,yp1); if (mode == kPavesText) pave = new TPavesText(xp0,yp0,xp1,yp1); if (mode == kDiamond) pave = new TDiamond(x0,y0,x1,y1); - if (mode == kPaveLabel || mode == kButton) { + if (mode == kPaveLabel) { ((TPad *)gPad)->StartEditing(); gSystem->ProcessEvents(); pxl = (px0 + px)/2; pyl = (py0 + py)/2; - for (i=0;iRequestString(pxl, pyl, atext); - for (i=kTMAX-2;i>=0;i--) { - if ((i==0) || (atext[i] != ' ')) { - atext[i+1] = 0; - break; - } - } - if (mode == kPaveLabel) { - pave = new TPaveLabel(xp0,yp0,xp1,yp1,atext); - gSystem->ProcessEvents(); - ((TPad *)gPad)->RecordPave(pave); + if (mode == kPaveLabel) { + pave = new TPaveLabel(xp0,yp0,xp1,yp1,"<"); + pave->Draw(); + gPad->Modified(kTRUE); + gPad->Update(); + break; } - if (mode == kButton) pave = new TButton(atext,"", - (x0-gPad->GetX1())/(gPad->GetX2() - gPad->GetX1()), - (y0-gPad->GetY1())/(gPad->GetY2() - gPad->GetY1()), - (x1-gPad->GetX1())/(gPad->GetX2() - gPad->GetX1()), - (y1-gPad->GetY1())/(gPad->GetY2() - - gPad->GetY1())); } TCanvas *canvas = gPad->GetCanvas(); if (canvas) canvas->FeedbackMode(kFALSE); @@ -490,54 +508,70 @@ void TCreatePrimitives::Text(Int_t event, Int_t px, Int_t py, Int_t mode) // Click left button to indicate the text position // - const Int_t kTMAX=100; - static char atext[kTMAX]; - Int_t i, lentext; - TLatex *newtext; - TMarker *marker; - Double_t x, y; - TCanvas *canvas = gPad->GetCanvas(); + static TLatex *text = 0; + static Double_t x, y; switch (event) { + case kKeyPress: + if ((py == kKey_Return) || (py == kKey_Enter)) { + TString s(text->GetTitle()); + Int_t l = s.Length(); + s.Remove(l-1); + text->SetText(x,y,s.Data()); + gSystem->ProcessEvents(); + gPad->Modified(kTRUE); + gROOT->SetEditorMode(); + gPad->Update(); + text = 0; + } else if (py == kKey_Backspace) { + TString s(text->GetTitle()); + Int_t l = s.Length(); + if (l>1) { + s.Replace(l-2, 2, "<"); + text->SetText(x,y,s.Data()); + gPad->Modified(kTRUE); + gPad->Update(); + } + } else if (isprint(py)) { + TString s(text->GetTitle()); + Int_t l = s.Length(); + s.Insert(l-1,(char)py); + text->SetText(x,y,s.Data()); + gPad->Modified(kTRUE); + gPad->Update(); + } + break; + case kButton1Down: + if (text) { + TString s(text->GetTitle()); + Int_t l = s.Length(); + s.Remove(l-1); + text->SetText(x,y,s.Data()); + } + x = gPad->AbsPixeltoX(px); y = gPad->AbsPixeltoY(py); if (gPad->GetLogx()) x = TMath::Power(10,x); if (gPad->GetLogy()) y = TMath::Power(10,y); + if (mode == kMarker) { + TMarker *marker; marker = new TMarker(x,y,gStyle->GetMarkerStyle()); marker->Draw(); - if (canvas) canvas->Selected((TPad*)gPad, marker, event); gROOT->SetEditorMode(); break; } + ((TPad *)gPad)->StartEditing(); gSystem->ProcessEvents(); - for (i=0;iSetLineColor(-1); - newtext->TAttText::Modify(); - gVirtualX->RequestString(px, py, atext); - lentext = strlen(atext); - for (i=lentext-1;i>=0;i--) { - if (atext[i] != ' ') { - atext[lentext] = 0; - break; - } - lentext--; - } - if (!lentext) break; - TLatex copytext(x, y, atext); - gSystem->ProcessEvents(); - ((TPad *)gPad)->RecordLatex(©text); - newtext->DrawLatex(x, y, atext); + + text = new TLatex(x,y,"<"); + text->Draw(); gPad->Modified(kTRUE); - if (canvas) canvas->Selected((TPad*)gPad, newtext, event); - gROOT->SetEditorMode(); gPad->Update(); + break; } -} +} \ No newline at end of file From 360380fcdb2e9c08da4307ba3937c7b5ab022a2f Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Fri, 22 Nov 2013 11:56:19 +0100 Subject: [PATCH 36/85] remove unused variables --- graf2d/gpad/src/TCreatePrimitives.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/graf2d/gpad/src/TCreatePrimitives.cxx b/graf2d/gpad/src/TCreatePrimitives.cxx index 4a2f98241a5bf..cff18178ef85c 100644 --- a/graf2d/gpad/src/TCreatePrimitives.cxx +++ b/graf2d/gpad/src/TCreatePrimitives.cxx @@ -305,7 +305,6 @@ void TCreatePrimitives::Pave(Int_t event, Int_t px, Int_t py, Int_t mode) static Int_t pxold, pyold; static Int_t px0, py0; static Int_t linedrawn; - Int_t pxl,pyl; Double_t temp; Double_t xp0,xp1,yp0,yp1; static TObject *pave = 0; @@ -383,8 +382,6 @@ void TCreatePrimitives::Pave(Int_t event, Int_t px, Int_t py, Int_t mode) if (mode == kPaveLabel) { ((TPad *)gPad)->StartEditing(); gSystem->ProcessEvents(); - pxl = (px0 + px)/2; - pyl = (py0 + py)/2; if (mode == kPaveLabel) { pave = new TPaveLabel(xp0,yp0,xp1,yp1,"<"); pave->Draw(); From d370b5200364677de5b14e91eaa6e98677d4bb9a Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 12:00:28 +0100 Subject: [PATCH 37/85] Adding new option 'fortran' to enable disable the fortran components (CMake). Issue ROOT-5668. --- cmake/modules/CheckCompiler.cmake | 4 ++-- cmake/modules/RootBuildOptions.cmake | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index ebd9ee1958b44..3e9ad4e4f90ae 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -2,8 +2,8 @@ # CheckCompiler.cmake #--------------------------------------------------------------------------------------------------- -#---Enable FORTRAN (unfortunatelly is not nowt possible in all cases)------------------------------- -if(NOT WIN32 AND NOT CMAKE_GENERATOR STREQUAL Xcode AND NOT CMAKE_GENERATOR STREQUAL Ninja) +#---Enable FORTRAN (unfortunatelly is not not possible in all cases)------------------------------- +if(fortran AND NOT WIN32 AND NOT CMAKE_GENERATOR STREQUAL Xcode AND NOT CMAKE_GENERATOR STREQUAL Ninja) #--Work-around for CMake issue 0009220 if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$") set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index c3f86a151cb7f..e003a7a07816a 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -84,6 +84,7 @@ ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability" ROOT_BUILD_OPTION(explicitlink ${explicitlink_defvalue} "Explicitly link with all dependent libraries") ROOT_BUILD_OPTION(fftw3 ON "Fast Fourier Transform support, requires libfftw3") ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio") +ROOT_BUILD_OPTION(fortran ON "Enable the Fortran components of ROOT") ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz") ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader") ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library") From 1c578a7c143f66ff27aa04899c1539ed36a0f1e1 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 15:02:30 +0100 Subject: [PATCH 38/85] Potential fix for ROOT-5745 (CMake) --- cmake/modules/SetUpLinux.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 57f60b86bf911..072d3b4fe6ead 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -86,8 +86,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}") - string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}") + string(REGEX REPLACE "(^.*[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") + string(REGEX REPLACE "(^.*[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") message(STATUS "Found ICC major version ${ICC_MAJOR}") message(STATUS "Found ICC minor version ${ICC_MINOR}") From d9bcab93d7c817e1109014ec0f041718df78f572 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 16:40:59 +0100 Subject: [PATCH 39/85] Fix for ROOT-5736 (ROOT compiled with Cocoa MacOS10.9 and CMake crashes on graphics use). Added root executable. --- CMakeLists.txt | 4 +-- graf2d/asimage/BuildAfterImage.cmake | 48 +++++++++++++--------------- rootx/CMakeLists.txt | 16 +++++++--- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04950c7e4aff7..d5c784d4985cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,9 +59,7 @@ add_subdirectory (proof) add_subdirectory (html) add_subdirectory (montecarlo) add_subdirectory (geom) -if(x11) - add_subdirectory (rootx) -endif() +add_subdirectory (rootx) add_subdirectory (misc) add_subdirectory (main) add_subdirectory (bindings) diff --git a/graf2d/asimage/BuildAfterImage.cmake b/graf2d/asimage/BuildAfterImage.cmake index f7507087fa862..21d4729541ce7 100644 --- a/graf2d/asimage/BuildAfterImage.cmake +++ b/graf2d/asimage/BuildAfterImage.cmake @@ -19,7 +19,7 @@ if(WIN32) set(astepbld "libAfterImage - Win32 Release") endif() -add_custom_command( OUTPUT ${afterimageliba} + add_custom_command( OUTPUT ${afterimageliba} COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/src/libAfterImage libAfterImage COMMAND echo "*** Building ${afterimageliba}" COMMAND cmake -E chdir libAfterImage @@ -37,50 +37,48 @@ else() if(ROOT_ARCHITECTURE MATCHES linuxx8664icc) set(AFTER_CFLAGS "${AFTER_CFLAGS} -m64 -O") elseif(ROOT_ARCHITECTURE MATCHES linuxx8664gcc) - set(AFTER_CFLAGS "-m64 -O") + set(AFTER_CC "${AFTER_CC} -m64") set(AFTER_MMX "--enable-mmx-optimization=no") elseif(ROOT_ARCHITECTURE MATCHES linuxicc) - set(AFTER_CFLAGS "${AFTER_CFLAGS} -m32 -O") + set(AFTER_CC "${AFTER_CC} -m32") + elseif(ROOT_ARCHITECTURE MATCHES linux8664icc) + set(AFTER_CC "${AFTER_CC} -m64") elseif(ROOT_ARCHITECTURE MATCHES linuxppc64gcc) - set(AFTER_CFLAGS "-m64 -O") + set(AFTER_CC "${AFTER_CC} -m64") elseif(ROOT_ARCHITECTURE MATCHES linux) - set(AFTER_CFLAGS "-m32 -O") + set(AFTER_CC "${AFTER_CC} -m32") elseif(ROOT_ARCHITECTURE MATCHES macosx64) - set(AFTER_CFLAGS "-m64 -O") + set(AFTER_CC "${AFTER_CC} -m64") elseif(ROOT_ARCHITECTURE MATCHES macosx) - set(AFTER_CFLAGS "-m32 -O") + set(AFTER_CC "${AFTER_CC} -m32") elseif(ROOT_ARCHITECTURE MATCHES solarisCC5) set(AFTER_CFLAGS "${AFTER_CFLAGS} --erroff=E_WHITE_SPACE_IN_DIRECTIVE") + set(AFTER_MMX "--disable-mmx-optimization") elseif(ROOT_ARCHITECTURE MATCHES solaris64CC5) - set(AFTER_CC "cc") - set(AFTER_CFLAGS "${AFTER_CFLAGS} -m64 -KPIC --erroff=E_WHITE_SPACE_IN_DIRECTIVE") + set(AFTER_CC "${AFTER_CC} -m64") + set(AFTER_CFLAGS "${AFTER_CFLAGS} -KPIC --erroff=E_WHITE_SPACE_IN_DIRECTIVE") + set(AFTER_MMX "--disable-mmx-optimization") elseif(ROOT_ARCHITECTURE MATCHES sgicc64) - set(AFTER_CC "gcc") - set(AFTER_CFLAGS "-mabi=64 -O") + set(AFTER_CC "${AFTER_CC} -mabi=64") elseif(ROOT_ARCHITECTURE MATCHES hpuxia64acc) - set(AFTER_CC "cc") - set(AFTER_CFLAGS "+DD64 -Ae +W863 -O") - set(AFTER_ALT "gcc -mlp64") + set(AFTER_CC "${AFTER_CC} +DD64 -Ae +W863") endif() if(JPEG_FOUND) - set(JPEGINCLUDE "--with-jpeg-includes=-I${JPEG_INCLUDE_DIR}") + set(JPEGINCLUDE "--with-jpeg-includes=${JPEG_INCLUDE_DIR}") endif() if(PNG_FOUND) - #foreach(_dir ${PNG_INCLUDE_DIR}) - # set(PNG_INC_DIR "${PNG_INC_DIR} -I${_dir}") - #endforeach() - #set(PNGINCLUDE "--with-png-includes=${PNG_INC_DIR}") - set(PNGINCLUDE "--with-png-includes=${PNG_PNG_INCLUDE_DIR}") + set(PNGINCLUDE "--with-png-includes=${PNG_INCLUDE_DIR}") + endif() + if(cocoa) + set(JPEGINCLUDE --without-x --with-builtin-jpeg) + set(PNGINCLUDE "--with-builtin-png") endif() if(TIFF_FOUND) - set(TIFFINCLUDE "--with-tiff-includes=-I${TIFF_INCLUDE_DIR}") + set(TIFFINCLUDE "--with-tiff-includes=${TIFF_INCLUDE_DIR}") else() set(TIFFINCLUDE "--with-tiff=no") endif() - if(GIF_FOUND) - set(GIFINCLUDE "--with-gif-includes=-I${GIF_INCLUDE_DIR}") - endif() set(TTFINCLUDE "--with-ttf-includes=-I${FREETYPE_INCLUDE_DIR}") #---copy files from source directory to build directory------------------------------ @@ -89,7 +87,7 @@ else() #---configure and make -------------------------------------------------------------- add_custom_command(OUTPUT ${afterimageliba} - COMMAND GNUMAKE=make CC=${AFTER_CC} CFLAGS=${AFTER_CFLAGS} ./configure --with-ttf ${TTFINCLUDE} --with-afterbase=no --without-svg --disable-glx ${AFTER_MMX} ${AFTER_DBG} --with-builtin-ungif ${GIFINCLUDE} --with-jpeg ${JPEGINCLUDE} --with-png ${PNGINCLUDE} ${TIFFINCLUDE} > /dev/null 2>& 1 + COMMAND GNUMAKE=make CC=${AFTER_CC} CFLAGS=${AFTER_CFLAGS} ./configure --with-ttf ${TTFINCLUDE} --with-afterbase=no --without-svg --disable-glx ${AFTER_MMX} ${AFTER_DBG} --with-builtin-ungif --with-jpeg ${JPEGINCLUDE} --with-png ${PNGINCLUDE} ${TIFFINCLUDE} # > /dev/null 2>& 1 COMMAND make > /dev/null 2>& 1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libAfterImage DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libAfterImage diff --git a/rootx/CMakeLists.txt b/rootx/CMakeLists.txt index 3c1ea69de86a1..9ebe25d4b1f5a 100644 --- a/rootx/CMakeLists.txt +++ b/rootx/CMakeLists.txt @@ -4,8 +4,14 @@ ############################################################################ ROOT_USE_PACKAGE(core) -include_directories(${X11_INCLUDE_DIR}) - -ROOT_EXECUTABLE(root *.cxx ${CMAKE_SOURCE_DIR}/core/clib/src/strlcpy.c - LIBRARIES ${X11_LIBRARIES} ${X11_Xpm_LIB} ${X11_Xft_LIB} ${X11_Xext_LIB}) - +if(x11) + include_directories(${X11_INCLUDE_DIR}) + ROOT_EXECUTABLE(root *.cxx ${CMAKE_SOURCE_DIR}/core/clib/src/strlcpy.c + LIBRARIES ${X11_LIBRARIES} ${X11_Xpm_LIB} ${X11_Xft_LIB} ${X11_Xext_LIB}) +elseif(cocoa) + add_custom_target(root ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root) + add_dependencies(root root.exe) + install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root + DESTINATION ${bin} COMPONENT applications) +endif() From 2c78f6915a82a573f25e20e82f70fe7ac3638790 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 17:36:48 +0100 Subject: [PATCH 40/85] Complete the fix for ROOT-5736 (CMake) --- cmake/modules/SearchInstalledSoftware.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 9f49007b77659..92dd0a4aca078 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -173,6 +173,7 @@ if(asimage) find_Package(PNG) if(PNG_FOUND) set(ASEXTRA_LIBRARIES ${ASEXTRA_LIBRARIES} ${PNG_LIBRARIES}) + list(GET PNG_INCLUDE_DIRS 0 PNG_INCLUDE_DIR) endif() find_Package(JPEG) if(JPEG_FOUND) From 8179b7a268400b8c455a3ec903c80de89115ffc1 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 17:37:36 +0100 Subject: [PATCH 41/85] Fix for ROOT-5751 (CMake) --- cmake/modules/RootNewMacros.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index dad55adbc6413..9fe84f531f1a6 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -451,6 +451,7 @@ function(ROOT_INSTALL_HEADERS) install(DIRECTORY ${d} DESTINATION include COMPONENT headers PATTERN ".svn" EXCLUDE + PATTERN "X11" EXCLUDE REGEX "LinkDef" EXCLUDE ) set_property(GLOBAL APPEND PROPERTY ROOT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${d}) endforeach() From 3e1de51a4bf4e453e35ae600b2a93a68f31fad6d Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 18:08:23 +0100 Subject: [PATCH 42/85] Potential fix for ROOT-5745 again (CMake) --- cmake/modules/SetUpLinux.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 072d3b4fe6ead..1390bedafd306 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -86,8 +86,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "(^.*[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") - string(REGEX REPLACE "(^.*[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") + string(REGEX REPLACE "^.*[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") + string(REGEX REPLACE "^.*[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") message(STATUS "Found ICC major version ${ICC_MAJOR}") message(STATUS "Found ICC minor version ${ICC_MINOR}") From 8ccc38088adfbdec88f9d71f5ed6cdb75033d057 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Fri, 22 Nov 2013 11:35:26 -0600 Subject: [PATCH 43/85] Add missing lock --- geom/geom/src/TGeoManager.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/geom/geom/src/TGeoManager.cxx b/geom/geom/src/TGeoManager.cxx index eeceda51bda89..6aba36da56a21 100644 --- a/geom/geom/src/TGeoManager.cxx +++ b/geom/geom/src/TGeoManager.cxx @@ -842,8 +842,12 @@ TGeoNavigator *TGeoManager::GetCurrentNavigator() const TGeoNavigator *nav = TTHREAD_TLS_GET(TGeoNavigator*,tnav); if (nav) return nav; Long_t threadId = TThread::SelfId(); + + TThread::Lock(); NavigatorsMap_t::const_iterator it = fNavigators.find(threadId); if (it == fNavigators.end()) return 0; + TThread::UnLock(); + TGeoNavigatorArray *array = it->second; nav = array->GetCurrentNavigator(); TTHREAD_TLS_SET(TGeoNavigator*,tnav,nav); @@ -983,10 +987,13 @@ Int_t TGeoManager::ThreadId() Int_t ttid = TTHREAD_TLS_GET(Int_t,tid); if (ttid > -1) return ttid; if (gGeoManager && !gGeoManager->IsMultiThread()) return 0; + TThread::Lock(); TGeoManager::ThreadsMapIt_t it = fgThreadId->find(TThread::SelfId()); - if (it != fgThreadId->end()) return it->second; + if (it != fgThreadId->end()) { + return it->second; + TThread::UnLock(); + } // Map needs to be updated. - TThread::Lock(); (*fgThreadId)[TThread::SelfId()] = fgNumThreads; TTHREAD_TLS_SET(Int_t,tid,fgNumThreads); fgNumThreads++; From 2db95a32c2ba84d6241fbe524a2de2a7fb74b133 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 22 Nov 2013 18:43:51 +0100 Subject: [PATCH 44/85] Potential fix for ROOT-5745 again (CMake) --- cmake/modules/SetUpLinux.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 1390bedafd306..73b38b162046f 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -86,8 +86,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "^.*[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") - string(REGEX REPLACE "^.*[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") + string(REGEX REPLACE "^.*ersion[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") + string(REGEX REPLACE "^.*ersion[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") message(STATUS "Found ICC major version ${ICC_MAJOR}") message(STATUS "Found ICC minor version ${ICC_MINOR}") From b79ee728eff77760e02ef5fb0525c26822c90044 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Fri, 22 Nov 2013 13:38:56 -0600 Subject: [PATCH 45/85] Better unlock _before_ returning --- geom/geom/src/TGeoManager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geom/geom/src/TGeoManager.cxx b/geom/geom/src/TGeoManager.cxx index 6aba36da56a21..60db241f54388 100644 --- a/geom/geom/src/TGeoManager.cxx +++ b/geom/geom/src/TGeoManager.cxx @@ -990,8 +990,8 @@ Int_t TGeoManager::ThreadId() TThread::Lock(); TGeoManager::ThreadsMapIt_t it = fgThreadId->find(TThread::SelfId()); if (it != fgThreadId->end()) { - return it->second; TThread::UnLock(); + return it->second; } // Map needs to be updated. (*fgThreadId)[TThread::SelfId()] = fgNumThreads; From 2f7afd29416994fde885176785193531ab0f627a Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Fri, 22 Nov 2013 14:47:20 -0600 Subject: [PATCH 46/85] Make sure to call UnLock even in early returns --- geom/geom/src/TGeoManager.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geom/geom/src/TGeoManager.cxx b/geom/geom/src/TGeoManager.cxx index 60db241f54388..60c0016b3acf3 100644 --- a/geom/geom/src/TGeoManager.cxx +++ b/geom/geom/src/TGeoManager.cxx @@ -845,8 +845,9 @@ TGeoNavigator *TGeoManager::GetCurrentNavigator() const TThread::Lock(); NavigatorsMap_t::const_iterator it = fNavigators.find(threadId); - if (it == fNavigators.end()) return 0; + bool notfound = (it == fNavigators.end()); TThread::UnLock(); + if (notfound) return 0; TGeoNavigatorArray *array = it->second; nav = array->GetCurrentNavigator(); @@ -918,6 +919,7 @@ void TGeoManager::RemoveNavigator(const TGeoNavigator *nav) if (arr) { if ((TGeoNavigator*)arr->Remove((TObject*)nav)) { delete nav; + if (fMultiThread) TThread::UnLock(); return; } } From b7a426468e5515de3eb1c18d64c322ef654f0ad2 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Mon, 25 Nov 2013 11:10:43 +0100 Subject: [PATCH 47/85] Potential fix for ROOT-5745 again (CMake) --- cmake/modules/RootNewMacros.cmake | 4 ++-- cmake/modules/SetUpLinux.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 9fe84f531f1a6..c849e778395a2 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -1,10 +1,10 @@ #--------------------------------------------------------------------------------------------------- # RootNewMacros.cmake #--------------------------------------------------------------------------------------------------- -cmake_minimum_required(VERSION 2.4.6) cmake_policy(SET CMP0003 NEW) # See "cmake --help-policy CMP0003" for more details cmake_policy(SET CMP0011 NEW) # See "cmake --help-policy CMP0011" for more details cmake_policy(SET CMP0009 NEW) # See "cmake --help-policy CMP0009" for more details +cmake_policy(SET CMP0022 OLD) # See "cmake --help-policy CMP0022" for more details set(lib lib) set(bin bin) @@ -253,7 +253,7 @@ endfunction() #--------------------------------------------------------------------------------------------------- -#---ROOT_LINKER_LIBRARY( source1 source2 ...[TYPE STATIC|SHARED] [DLLEXPORT] LIBRARIES library1 library2 ...) +#---ROOT_LINKER_LIBRARY( source1 source2 ...[TYPE STATIC|SHARED] [DLLEXPORT] LIBRARIES lib1 lib2 ... DEPENDENCIES lib3 l1b4) #--------------------------------------------------------------------------------------------------- function(ROOT_LINKER_LIBRARY library) PARSE_ARGUMENTS(ARG "TYPE;LIBRARIES;DEPENDENCIES" "DLLEXPORT;CMAKENOEXPORT" ${ARGN}) diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/modules/SetUpLinux.cmake index 73b38b162046f..10ec2f7f2e17f 100644 --- a/cmake/modules/SetUpLinux.cmake +++ b/cmake/modules/SetUpLinux.cmake @@ -86,8 +86,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "^.*ersion[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}") - string(REGEX REPLACE "^.*ersion[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}") + string(REGEX REPLACE "(^V|^icc[ ]v|^icpc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}") + string(REGEX REPLACE "(^V|^icc[ ]v|^icpc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}") message(STATUS "Found ICC major version ${ICC_MAJOR}") message(STATUS "Found ICC minor version ${ICC_MINOR}") From eab3b965d65ede9beaec115629cb6cbab73b3c48 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Mon, 25 Nov 2013 11:44:18 +0100 Subject: [PATCH 48/85] Changed policy CMP0022 (CMake) to avoid configuration warnings for versions > 2.8.12 --- cmake/modules/RootNewMacros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index c849e778395a2..b0a16ac9efd65 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -4,7 +4,9 @@ cmake_policy(SET CMP0003 NEW) # See "cmake --help-policy CMP0003" for more details cmake_policy(SET CMP0011 NEW) # See "cmake --help-policy CMP0011" for more details cmake_policy(SET CMP0009 NEW) # See "cmake --help-policy CMP0009" for more details -cmake_policy(SET CMP0022 OLD) # See "cmake --help-policy CMP0022" for more details +if(CMAKE_VERSION VERSION_GREATER 2.8.12) + cmake_policy(SET CMP0022 OLD) # See "cmake --help-policy CMP0022" for more details +endif() set(lib lib) set(bin bin) From de9500fbec59a73a7a5773bb1c5e020d67f76245 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Mon, 25 Nov 2013 11:59:39 +0100 Subject: [PATCH 49/85] Apply patch of ROOT-5485 --- cmake/modules/FindPCRE.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindPCRE.cmake b/cmake/modules/FindPCRE.cmake index f3cb6415956e5..e7a65a6022d0f 100644 --- a/cmake/modules/FindPCRE.cmake +++ b/cmake/modules/FindPCRE.cmake @@ -15,9 +15,9 @@ find_program(PCRE_CONFIG_EXECUTABLE pcre-config) if(PCRE_CONFIG_EXECUTABLE) execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PCRE_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE PCRE_CFLAGS) + execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE PCRE_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) string( REGEX MATCHALL "-I[^;]+" PCRE_INCLUDE_DIR "${PCRE_CFLAGS}" ) - string( REPLACE "-I" "" PCRE_INCLUDE_DIR "${PCRE_INCLUDE_DIRS}") + string( REPLACE "-I" "" PCRE_INCLUDE_DIR "${PCRE_INCLUDE_DIR}") if(NOT PCRE_INCLUDE_DIR) execute_process(COMMAND ${PCRE_CONFIG_EXECUTABLE} --prefix OUTPUT_VARIABLE PCRE_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE) set(PCRE_INCLUDE_DIR ${PCRE_PREFIX}/include) From f74a64213001594ea5f9e2992d529a5aaea71a39 Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Mon, 25 Nov 2013 13:03:10 +0100 Subject: [PATCH 50/85] fix ports to ios and iossim that got broken over time. Now works with iOS7. --- cint/cint/Module.mk | 2 +- config/Makefile.ios | 13 ++++++++++--- config/Makefile.iossim | 13 ++++++++++--- config/Makefile.macosxicc | 4 ++-- configure | 20 +++++++++++++++++--- core/lzma/Module.mk | 2 -- graf2d/freetype/Module.mk | 2 -- sql/sqlite/Module.mk | 3 +-- 8 files changed, 41 insertions(+), 18 deletions(-) diff --git a/cint/cint/Module.mk b/cint/cint/Module.mk index 0030e485880da..32f9e6bcda45e 100644 --- a/cint/cint/Module.mk +++ b/cint/cint/Module.mk @@ -211,7 +211,7 @@ endif endif # used in the main Makefile -ALLHDRS += $(CINTHT) +ALLHDRS += $(CINTHT) $(CINTINCLUDES) CINTSIZEFLAGS := ifneq ($(CINTMAXSTRUCT),) diff --git a/config/Makefile.ios b/config/Makefile.ios index a3b9108c7b093..d65bf7c593326 100644 --- a/config/Makefile.ios +++ b/config/Makefile.ios @@ -21,20 +21,27 @@ IOS_MAJOR := $(shell echo $(IOSVERS) | cut -d . -f 1) ifeq ($(subst $(IOS_MAJOR),,1234),1234) CXX := $(shell xcrun -find clang++) CC := $(shell xcrun -find clang) +ifeq ($(CXX11),yes) +CXX11FLAGS = -std=c++11 +endif +ifeq ($(LIBCXX),yes) +CXX11FLAGS += -stdlib=libc++ +CXX11LDFLAGS = -stdlib=libc++ +endif else CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ - $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) + $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) CINTCXXFLAGS = -arch armv7 -pipe -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL \ - -DG__STD_EXCEPTION \ + -DG__STD_EXCEPTION $(CXX11FLAGS) \ $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) CINTCFLAGS = -arch armv7 -pipe -W -Wall -fsigned-char -fno-common \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ @@ -49,7 +56,7 @@ LD := $(shell xcrun -find clang++) else LD := $(shell xcrun -find g++) endif -LDFLAGS = $(OPT) -arch armv7 -isysroot $(IOSSDK) \ +LDFLAGS = $(CXX11LDFLAGS) $(OPT) -arch armv7 -isysroot $(IOSSDK) \ -miphoneos-version-min=$(IOSVERS) # this is set for 64 but not for 32 bit (for iOS too???) diff --git a/config/Makefile.iossim b/config/Makefile.iossim index 6b8ae075b75c1..95038be04e275 100644 --- a/config/Makefile.iossim +++ b/config/Makefile.iossim @@ -21,20 +21,27 @@ IOS_MAJOR := $(shell echo $(IOSVERS) | cut -d . -f 1) ifeq ($(subst $(IOS_MAJOR),,1234),1234) CXX := $(shell xcrun -find clang++) CC := $(shell xcrun -find clang) +ifeq ($(CXX11),yes) +CXX11FLAGS = -std=c++11 +endif +ifeq ($(LIBCXX),yes) +CXX11FLAGS += -stdlib=libc++ +CXX11LDFLAGS = -stdlib=libc++ +endif else CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch i386 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ - $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) + $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch i386 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) CINTCXXFLAGS = -arch i386 -pipe -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL \ - -DG__STD_EXCEPTION \ + -DG__STD_EXCEPTION $(CXX11FLAGS) \ $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) CINTCFLAGS = -arch i386 -pipe -W -Wall -fsigned-char -fno-common \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ @@ -49,7 +56,7 @@ LD := $(shell xcrun -find clang++) else LD := $(shell xcrun -find g++) endif -LDFLAGS = $(OPT) -arch i386 -isysroot $(IOSSDK) \ +LDFLAGS = $(CXX11LDFLAGS) $(OPT) -arch i386 -isysroot $(IOSSDK) \ -miphoneos-version-min=$(IOSVERS) # this is set for 64 but not for 32 bit (for iOS too???) diff --git a/config/Makefile.macosxicc b/config/Makefile.macosxicc index 9f5a3e8dc3072..1c16e3f086019 100644 --- a/config/Makefile.macosxicc +++ b/config/Makefile.macosxicc @@ -111,9 +111,9 @@ XLIBS = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lXext -lX11 CILIBS = -lm $(EXTRA_LDFLAGS) -ldl # Fortran: -ifeq ($(F77),ifort) -F77 = ifort +F77ORG = ifort F77FLAGS = -fPIC +ifneq ($(F77),) ifeq ($(findstring $(ICC_MAJOR),11 10 9),) ifneq ($(subst ia32,,$(shell which ifort)),$(shell which ifort)) F77LIBS := -L$(shell which ifort | sed -e 's|bin/ia32/ifort|compiler/lib|') \ diff --git a/configure b/configure index 4d2d42e4bceaa..cfa849c4b1d15 100755 --- a/configure +++ b/configure @@ -1863,9 +1863,9 @@ macosx*) # get most recent SDK version macosxminor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` macosxvers=10.$macosxminor - # make available to conftest.mk scripts - export MACOSXVERS=$macosxvers fi + # make available to conftest.mk scripts + export MACOSXVERS=$macosxvers ;; ios*) logmsg "Will check iOS SDK libraries" @@ -1874,8 +1874,15 @@ ios*) # get most recent SDK version iosvers=`xcodebuild -showsdks | sed -n '/iphoneos/s/.*iOS //p' | sed 's/ .*//'|awk 'END{print}'` fi + if [ `echo $iosvers | cut -d . -f 1` -ge 7 ]; then + ios7=yes + fi xcodepath=`/usr/bin/xcode-select -print-path` - iossdk=$xcodepath/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$iosvers.sdk + if test "x$arch" = "xios"; then + iossdk=$xcodepath/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$iosvers.sdk + else + iossdk=$xcodepath/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$iosvers.sdk + fi result "$iossdk" if [ ! -d $iossdk ]; then result "`basename $0`: no iOS SDK found at $iossdk" @@ -1883,6 +1890,9 @@ ios*) result "or make sure the desired SDK version is installed" exit 1 fi + # make available to conftest.mk scripts + export IOSSDK=$iossdk + export IOSVERS=$iosvers enable_cintex="no" enable_reflex="no" enable_genvector="no" @@ -2467,6 +2477,10 @@ fi if test "x$macosx109" = "xyes" && echo $altcxx | grep 'clang++' > /dev/null 2>&1; then enable_libcxx="yes" fi +# iOS 7.0 only has libc++ with clang so make sure this option is turned on +if test "x$ios7" = "xyes" && echo $altcxx | grep 'clang++' > /dev/null 2>&1; then + enable_libcxx="yes" +fi uselibcxx="undef" if test "x$enable_libcxx" = "xyes" ; then diff --git a/core/lzma/Module.mk b/core/lzma/Module.mk index 51a95258eeb66..ddfffaecfd7be 100644 --- a/core/lzma/Module.mk +++ b/core/lzma/Module.mk @@ -142,12 +142,10 @@ else LZMA_CFLAGS="-m64"; \ fi; \ if [ $(ARCH) = "iossim" ]; then \ - LZMACC="$$LZMACC -arch i386"; \ LZMA_CFLAGS="-arch i386 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ LZMA_HOST="--host=i686-apple-darwin10"; \ fi; \ if [ $(ARCH) = "ios" ]; then \ - LZMACC="$$LZMACC -arch armv7"; \ LZMA_CFLAGS="-arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ LZMA_HOST="--host=arm-apple-darwin10"; \ fi; \ diff --git a/graf2d/freetype/Module.mk b/graf2d/freetype/Module.mk index 08c571e121bd9..eece696bc1b7c 100644 --- a/graf2d/freetype/Module.mk +++ b/graf2d/freetype/Module.mk @@ -134,12 +134,10 @@ else FREE_CFLAGS="-m64"; \ fi; \ if [ $(ARCH) = "iossim" ]; then \ - FREECC="$$FREECC -arch i386"; \ FREE_CFLAGS="-arch i386 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ FREE_HOST="--host=i686-apple-darwin10"; \ fi; \ if [ $(ARCH) = "ios" ]; then \ - FREECC="$$FREECC -arch armv7"; \ FREE_CFLAGS="-arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ FREE_HOST="--host=arm-apple-darwin10"; \ fi; \ diff --git a/sql/sqlite/Module.mk b/sql/sqlite/Module.mk index a4159a36d56d2..14754b2714b02 100644 --- a/sql/sqlite/Module.mk +++ b/sql/sqlite/Module.mk @@ -49,8 +49,7 @@ $(SQLITELIB): $(SQLITEO) $(SQLITEDO) $(ORDER_) $(MAINLIBS) $(SQLITELIBDEP) $(SQLITEDS): $(SQLITEH) $(SQLITEL) $(ROOTCINTTMPDEP) $(MAKEDIR) @echo "Generating dictionary $@..." - $(ROOTCINTTMP) -f $@ -c $(SQLITEINCDIR:%=-I%) $(SQLITEH) \ - $(SQLITEL) + $(ROOTCINTTMP) -f $@ -c $(SQLITEH) $(SQLITEL) $(SQLITEMAP): $(RLIBMAP) $(MAKEFILEDEP) $(SQLITEL) $(RLIBMAP) -o $@ -l $(SQLITELIB) \ From 1d828a5b449b8dd44d77dc1c6fa002e8587a12bf Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 25 Nov 2013 17:19:24 +0100 Subject: [PATCH 51/85] Add PaintText/PaintTextNDC with wchar_t parameter (mathtext) to make IOS::Pad non-abstract class (empty implementation at the moment). --- graf2d/ios/inc/IOSPad.h | 2 ++ graf2d/ios/inc/IOSPadStub.h | 6 ++++++ graf2d/ios/src/IOSPadStub.cxx | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/graf2d/ios/inc/IOSPad.h b/graf2d/ios/inc/IOSPad.h index ea36d2b115648..0ef438cf67fad 100644 --- a/graf2d/ios/inc/IOSPad.h +++ b/graf2d/ios/inc/IOSPad.h @@ -233,6 +233,8 @@ class Pad : public PadStub { void PaintPolyMarker(Int_t n, Float_t *x, Float_t *y, Option_t *option=""); void PaintPolyMarker(Int_t n, Double_t *x, Double_t *y, Option_t *option=""); + using PadStub::PaintText; + using PadStub::PaintTextNDC; void PaintText(Double_t x, Double_t y, const char *text); void PaintTextNDC(Double_t u, Double_t v, const char *text); diff --git a/graf2d/ios/inc/IOSPadStub.h b/graf2d/ios/inc/IOSPadStub.h index c8ac17d2f7344..fb039bad9b156 100644 --- a/graf2d/ios/inc/IOSPadStub.h +++ b/graf2d/ios/inc/IOSPadStub.h @@ -66,6 +66,12 @@ class PadStub : public TVirtualPad { void SetAttMarkerPS(Color_t, Style_t, Size_t); void SetAttTextPS(Int_t, Float_t, Color_t, Style_t, Float_t); void PaintBorderPS(Double_t, Double_t, Double_t, Double_t, Int_t, Int_t, Int_t, Int_t); + //PaintText with a parameter of a type wchar_t is a special version + //used by mathtext. It relies strongly on ttf and actually requires + //ttf. NOOP at the moment (whence it's here, in a 'stub' class). + virtual void PaintText(Double_t, Double_t, const wchar_t *); + virtual void PaintTextNDC(Double_t, Double_t, const wchar_t *); + // Int_t GetGLDevice(); void SetCopyGLDevice(Bool_t); void Pop(); diff --git a/graf2d/ios/src/IOSPadStub.cxx b/graf2d/ios/src/IOSPadStub.cxx index a3ea40b2dff3e..692e5e2dbf5b7 100644 --- a/graf2d/ios/src/IOSPadStub.cxx +++ b/graf2d/ios/src/IOSPadStub.cxx @@ -191,6 +191,16 @@ void PadStub::SetAttTextPS(Int_t, Float_t, Color_t, Style_t, Float_t) { } +//______________________________________________________________________________ +void PadStub::PaintText(Double_t, Double_t, const wchar_t *) +{ +} + +//______________________________________________________________________________ +void PadStub::PaintTextNDC(Double_t, Double_t, const wchar_t *) +{ +} + //______________________________________________________________________________ void PadStub::PaintBorderPS(Double_t, Double_t, Double_t, Double_t, Int_t, Int_t, Int_t, Int_t) { From df37e9679b2aa952b583cc0da1c2149b9771979f Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 25 Nov 2013 17:29:48 +0100 Subject: [PATCH 52/85] Replace deprecated enumerators. --- test/ios/RootBrowser/AxisFontInspector.mm | 2 +- test/ios/RootBrowser/EditorPlateView.mm | 2 +- test/ios/RootBrowser/EditorView.mm | 2 +- test/ios/RootBrowser/FileShortcut.mm | 2 +- test/ios/RootBrowser/H1ErrorsInspector.mm | 2 +- test/ios/RootBrowser/ObjectShortcut.mm | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/ios/RootBrowser/AxisFontInspector.mm b/test/ios/RootBrowser/AxisFontInspector.mm index 9d356f6848b97..5aed590f81126 100644 --- a/test/ios/RootBrowser/AxisFontInspector.mm +++ b/test/ios/RootBrowser/AxisFontInspector.mm @@ -165,7 +165,7 @@ - (UIView *) pickerView : (UIPickerView *)pickerView viewForRow : (NSInteger)row UILabel *label = [[UILabel alloc] initWithFrame : CGRectMake(0.f, 0.f, defaultCellW, defaultCellH)]; label.text = fixedFontNames[row]; label.font = [UIFont fontWithName : fixedFonts[row] size : 14.f]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.backgroundColor = [UIColor colorWithPatternImage : [UIImage imageNamed : @"text_cell_bkn.png"]]; return label; diff --git a/test/ios/RootBrowser/EditorPlateView.mm b/test/ios/RootBrowser/EditorPlateView.mm index 91f501c1e9754..4db889240df07 100644 --- a/test/ios/RootBrowser/EditorPlateView.mm +++ b/test/ios/RootBrowser/EditorPlateView.mm @@ -33,7 +33,7 @@ - (id)initWithFrame:(CGRect)frame editorName : (NSString *)name topView : (Edito editorLabel = [[UILabel alloc] initWithFrame : CGRectMake(frame.size.width / 2 - 60.f, 10.f, 120.f, 30.f)]; editorLabel.backgroundColor = [UIColor clearColor]; editorLabel.font = [UIFont systemFontOfSize : 14]; - editorLabel.textAlignment = UITextAlignmentCenter; + editorLabel.textAlignment = NSTextAlignmentCenter; editorLabel.textColor = [UIColor whiteColor]; [self addSubview : editorLabel]; editorLabel.text = name; diff --git a/test/ios/RootBrowser/EditorView.mm b/test/ios/RootBrowser/EditorView.mm index fdcfe15cc90bd..245028413f8b2 100644 --- a/test/ios/RootBrowser/EditorView.mm +++ b/test/ios/RootBrowser/EditorView.mm @@ -91,7 +91,7 @@ - (id)initWithFrame : (CGRect)frame //It's completely transparent. const CGRect titleRect = CGRectMake(10.f, 10.f, 250.f, 35.f); editorTitle = [[UILabel alloc] initWithFrame : titleRect]; - editorTitle.textAlignment = UITextAlignmentCenter; + editorTitle.textAlignment = NSTextAlignmentCenter; editorTitle.textColor = [UIColor blackColor]; editorTitle.backgroundColor = [UIColor clearColor]; [self addSubview : editorTitle]; diff --git a/test/ios/RootBrowser/FileShortcut.mm b/test/ios/RootBrowser/FileShortcut.mm index 22874e2de2214..56cdd1ef07b0d 100644 --- a/test/ios/RootBrowser/FileShortcut.mm +++ b/test/ios/RootBrowser/FileShortcut.mm @@ -71,7 +71,7 @@ - (void) drawRect : (CGRect)rect //Draw the file name. CGContextSetRGBFillColor(ctx, 1.f, 1.f, 1.f, 1.f); const CGRect textRect = CGRectMake(0.f, [FileShortcut iconHeight] - [FileShortcut textHeight], [FileShortcut iconWidth], [FileShortcut textHeight]); - [fileName drawInRect : textRect withFont : [UIFont systemFontOfSize : 16] lineBreakMode : UILineBreakModeWordWrap alignment : UITextAlignmentCenter]; + [fileName drawInRect : textRect withFont : [UIFont systemFontOfSize : 16] lineBreakMode : NSLineBreakByWordWrapping alignment : NSTextAlignmentCenter]; } //____________________________________________________________________________________________________ diff --git a/test/ios/RootBrowser/H1ErrorsInspector.mm b/test/ios/RootBrowser/H1ErrorsInspector.mm index 039d5de4730ff..ac5e6fc70557e 100644 --- a/test/ios/RootBrowser/H1ErrorsInspector.mm +++ b/test/ios/RootBrowser/H1ErrorsInspector.mm @@ -113,7 +113,7 @@ - (UIView *)pickerView : (UIPickerView *)pickerView viewForRow : (NSInteger)row UILabel *label = [[UILabel alloc] initWithFrame : CGRectMake(0.f, 0.f, defaultCellW, defaultCellH)]; label.text = errorTypesStrings[row]; label.font = [UIFont fontWithName : @"TimesNewRomanPS-BoldMT" size : 14.f]; - label.textAlignment = UITextAlignmentCenter; + label.textAlignment = NSTextAlignmentCenter; label.backgroundColor = [UIColor colorWithPatternImage : [UIImage imageNamed : @"text_cell_bkn.png"]]; return label; diff --git a/test/ios/RootBrowser/ObjectShortcut.mm b/test/ios/RootBrowser/ObjectShortcut.mm index 0df9fec99a0f2..c9591b5e4000f 100644 --- a/test/ios/RootBrowser/ObjectShortcut.mm +++ b/test/ios/RootBrowser/ObjectShortcut.mm @@ -123,7 +123,7 @@ - (void) drawRect : (CGRect)rect CGContextSetRGBFillColor(ctx, 1.f, 1.f, 1.f, 1.f); const CGRect textRect = CGRectMake(0.f, [ObjectShortcut iconHeight], [ObjectShortcut iconWidth], [ObjectShortcut textHeight]); - [objectName drawInRect : textRect withFont : [UIFont systemFontOfSize : 16] lineBreakMode : UILineBreakModeWordWrap alignment : UITextAlignmentCenter]; + [objectName drawInRect : textRect withFont : [UIFont systemFontOfSize : 16] lineBreakMode : NSLineBreakByWordWrapping alignment : NSTextAlignmentCenter]; } //____________________________________________________________________________________________________ From 116b7cea453c3f94bc7d3c939391110d838885f1 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Mon, 25 Nov 2013 19:04:18 +0100 Subject: [PATCH 53/85] Fix for the FTGL CMake configuratiom issues (ROOT-5394) --- cmake/modules/FindFTGL.cmake | 24 +++++++++++++++++++-- cmake/modules/RootConfiguration.cmake | 2 +- cmake/modules/SearchInstalledSoftware.cmake | 20 +++++++++++++++++ graf3d/gl/CMakeLists.txt | 12 +++++------ 4 files changed, 48 insertions(+), 10 deletions(-) diff --git a/cmake/modules/FindFTGL.cmake b/cmake/modules/FindFTGL.cmake index 9c9c932021333..eaaaef99034a5 100644 --- a/cmake/modules/FindFTGL.cmake +++ b/cmake/modules/FindFTGL.cmake @@ -1,2 +1,22 @@ -#TODO: create find script for FTGL. in the moment we will use the builtin -# version \ No newline at end of file +# - Locate FTGL library +# Defines: +# +# FTGL_FOUND +# FTGL_INCLUDE_DIR +# FTGL_LIBRARY +# FTGL_INCLUDE_DIRS (not cached) +# FTGL_LIBRARIES (not cached) + +find_path(FTGL_INCLUDE_DIR FTGL/ftgl.h + HINTS $ENV{FTGL_ROOT_DIR}/include ${FTGL_ROOT_DIR}/include) + +find_library(FTGL_LIBRARY NAMES ftgl + HINTS $ENV{FTGL_ROOT_DIR}/lib ${FTGL_ROOT_DIR}/lib) + +set(FTGL_INCLUDE_DIRS ${FTGL_INCLUDE_DIR}) +set(FTGL_LIBRARIES ${FTGL_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FTGL DEFAULT_MSG FTGL_INCLUDE_DIR FTGL_LIBRARY) +mark_as_advanced(FTGL_FOUND FTGL_INCLUDE_DIR FTGL_LIBRARY) + diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake index 7bd76df8d87d7..6668719a14a20 100644 --- a/cmake/modules/RootConfiguration.cmake +++ b/cmake/modules/RootConfiguration.cmake @@ -129,7 +129,7 @@ set(dcaplibdir ${DCAP_LIBRARY_DIR}) set(dcaplib ${DCAP_LIBRARY}) set(dcapincdir ${DCAP_INCLUDE_DIR}) -set(buildftgl ${value${ftgl}}) +set(buildftgl ${value${builtin_ftgl}}) set(ftgllibdir ${FTGL_LIBRARY_DIR}) set(ftgllibs ${FTGL_LIBRARIES}) set(ftglincdir ${FTGL_INCLUDE_DIR}) diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 92dd0a4aca078..c40d25c8a3f38 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -645,6 +645,26 @@ if(globus) endif() endif() +#---Check for ftgl if needed---------------------------------------------------------- +if(NOT builtin_ftgl) + find_package(FTGL) + if(NOT FTGL_FOUND) + if(fail-on-missing) + message(FATAL_ERROR "ftgl library not found and is required ('builtin_ftgl' is OFF). Set varible FTGL_ROOT_DIR to installation location") + else() + message(STATUS "ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation") + message(STATUS "For the time being switching ON 'builtin_ftgl' option") + set(builtin_ftgl ON CACHE BOOL "" FORCE) + endif() + endif() +endif() +if(builtin_ftgl) + set(FTGL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/graf3d/ftgl/inc) + set(FTGL_CFLAGS -DBUILTIN_FTGL) + set(FTGL_LIBRARIES FTGL) +endif() + + #---Report non implemented options--------------------------------------------------- foreach(opt afs chirp clarens glite hdfs pch peac sapdb srp) if(${opt}) diff --git a/graf3d/gl/CMakeLists.txt b/graf3d/gl/CMakeLists.txt index a6216dc6bae0b..4dcbf61b023ea 100644 --- a/graf3d/gl/CMakeLists.txt +++ b/graf3d/gl/CMakeLists.txt @@ -5,10 +5,8 @@ ROOT_USE_PACKAGE(gui/ged) if(builtin_glew) ROOT_USE_PACKAGE(graf3d/glew) endif() -if(builtin_ftgl) - ROOT_USE_PACKAGE(graf3d/ftgl) -endif() -include_directories(${OPENGL_INCLUDE_DIR}) + +include_directories(${OPENGL_INCLUDE_DIR} ${FTGL_INCLUDE_DIR}) ROOT_GLOB_HEADERS(headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h) list(REMOVE_ITEM headers gl2ps.h CsgOps.h TGLIncludes.h TGLWSIncludes.h TGLContextPrivate.h @@ -20,11 +18,11 @@ if(WIN32) list(REMOVE_ITEM sources TX11GL.cxx) endif() -set_source_files_properties(src/TGLFontManager.cxx PROPERTIES COMPILE_FLAGS "-I${FREETYPE_INCLUDE_DIR} -DBUILTIN_FTGL") -set_source_files_properties(src/TGLText.cxx PROPERTIES COMPILE_FLAGS "-I${FREETYPE_INCLUDE_DIR} -DBUILTIN_FTGL") +set_source_files_properties(src/TGLFontManager.cxx PROPERTIES COMPILE_FLAGS "-I${FREETYPE_INCLUDE_DIR} ${FTGL_CFLAGS}") +set_source_files_properties(src/TGLText.cxx PROPERTIES COMPILE_FLAGS "-I${FREETYPE_INCLUDE_DIR} ${FTGL_CFLAGS}") ROOT_GENERATE_DICTIONARY(G__GL ${headers} LINKDEF LinkDef.h) ROOT_GENERATE_ROOTMAP(RGL LINKDEF LinkDef.h DEPENDENCIES Graf3d Gui Graf Hist Ged MathCore Tree TreePlayer) -ROOT_LINKER_LIBRARY(RGL ${sources} G__GL.cxx LIBRARIES ${OPENGL_LIBRARIES} GLEW FTGL DEPENDENCIES Hist Gui Ged) +ROOT_LINKER_LIBRARY(RGL ${sources} G__GL.cxx LIBRARIES ${OPENGL_LIBRARIES} GLEW ${FTGL_LIBRARIES} DEPENDENCIES Hist Gui Ged) ROOT_INSTALL_HEADERS() From b0708166e27c0094b55ba0065fe35ee3dfdeadf1 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Tue, 18 Dec 2012 05:19:27 +0000 Subject: [PATCH 54/85] Improve CompareContent by also comparing the 'data type' index. This helps in the case where cling is actually keeping more typedef information that CINT did git-svn-id: http://root.cern.ch/svn/root/trunk@48083 27541ba8-7e3a-0410-8455-c3a389f83636 --- io/io/src/TStreamerInfo.cxx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index 5b67ac09d4f33..266affc38eb86 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -2087,6 +2087,12 @@ namespace { TString fName; TString fClassName; TString fComment; + Int_t fDataType; + + void SetDataType(Int_t datatype) { + fDataType = datatype; + } + void SetName(const char *name) { fName = name; } @@ -2118,7 +2124,12 @@ namespace { */ Bool_t operator!=(const TMemberInfo &other) { if (fName != other.fName) return kTRUE; - if (fClassName != other.fClassName) { + if (fDataType < TStreamerInfo::kObject) { + // For simple type, let compare the data type + if (fDataType != other.fDataType) { + return kTRUE; + } + } else if (fClassName != other.fClassName) { if ( (fClassName == "long" && (other.fClassName == "long long" || other.fClassName == "Long64_t")) || ( (fClassName == "long long" || fClassName == "Long64_t") && other.fClassName == "long") ) { // This is okay both have the same on file format. @@ -2348,6 +2359,7 @@ Bool_t TStreamerInfo::CompareContent(TClass *cl, TVirtualStreamerInfo *info, Boo local.SetName( el->GetName() ); local.SetClassName( el->GetTypeName() ); local.SetComment( el->GetTitle() ); + local.SetDataType( el->GetType() ); } if (cl) { TDataMember *tdm = (TDataMember*)membernext(); @@ -2356,8 +2368,11 @@ Bool_t TStreamerInfo::CompareContent(TClass *cl, TVirtualStreamerInfo *info, Boo } if (tdm) { other.SetName( tdm->GetName() ); - other.SetClassName( tdm->GetFullTypeName() ); + other.SetClassName( tdm->GetTrueTypeName() ); other.SetComment( tdm->GetTitle() ); + if (tdm->GetDataType()) { + other.SetDataType( tdm->GetDataType()->GetType() ); + } } else if (el==0) { done = kTRUE; break; @@ -2371,6 +2386,7 @@ Bool_t TStreamerInfo::CompareContent(TClass *cl, TVirtualStreamerInfo *info, Boo other.SetName( infoel->GetName() ); other.SetClassName( infoel->GetTypeName() ); other.SetComment( infoel->GetTitle() ); + other.SetDataType( infoel->GetType() ); } else if (el==0) { done = kTRUE; break; From 443c07d2ae1535f7222209903c742704b92838a9 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Fri, 11 Jan 2013 12:56:43 +0000 Subject: [PATCH 55/85] In the new section (r48083) of TStreamerInfo::CompareContent check the dataType of the members, (re)add the equivalency between long and longlong git-svn-id: http://root.cern.ch/svn/root/trunk@48267 27541ba8-7e3a-0410-8455-c3a389f83636 --- io/io/src/TStreamerInfo.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index 266affc38eb86..592ebf6a0480d 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -2127,8 +2127,16 @@ namespace { if (fDataType < TStreamerInfo::kObject) { // For simple type, let compare the data type if (fDataType != other.fDataType) { - return kTRUE; - } + if ( (fDataType == 4 && other.fDataType == 16) + || (fDataType == 16 && other.fDataType == 4) ) { + // long and 'long long' have the same file format + } else if ( (fDataType == 14 && other.fDataType == 17) + || (fDataType == 17 && other.fDataType == 14) ) { + // unsigned long and 'unsigned long long' have the same file format + } else { + return kTRUE; + } + } } else if (fClassName != other.fClassName) { if ( (fClassName == "long" && (other.fClassName == "long long" || other.fClassName == "Long64_t")) || ( (fClassName == "long long" || fClassName == "Long64_t") && other.fClassName == "long") ) { From cdb1885b3cf2096c73f816fe88d9c721245784fd Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Mon, 25 Nov 2013 16:54:43 -0600 Subject: [PATCH 56/85] Properly detect class layout match with array and counter variable. In the case of array data member (both variable size and fixed size), CompareContent was incorrectly reporting mismatches. In the case of a counter variable, whether it is marked as a counter variable or a regular variable might depends on the derived class used. (This is the case for TCollection where fSize is used as to hold the size of a variable size array only in some cases). This results in different files containing a different TStreamerInfo (for TCollection) depending on what collections were stored in the file. CompareContent was upgraded to correctly ignore the difference. This fixes ROOT-5151. --- io/io/src/TStreamerInfo.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index 592ebf6a0480d..8b6c9a9d6c921 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -2133,6 +2133,12 @@ namespace { } else if ( (fDataType == 14 && other.fDataType == 17) || (fDataType == 17 && other.fDataType == 14) ) { // unsigned long and 'unsigned long long' have the same file format + } else if ( (fDataType == 3 && other.fDataType == 6) + ||(fDataType == 6 && other.fDataType == 3) ){ + // Int_t and kCounter. As the switch from Int_t (3) to + // kCounter (6) might be triggered by a derived class using + // the field as an array size, the class itself has no + // control on what the field type really use. } else { return kTRUE; } @@ -2379,7 +2385,16 @@ Bool_t TStreamerInfo::CompareContent(TClass *cl, TVirtualStreamerInfo *info, Boo other.SetClassName( tdm->GetTrueTypeName() ); other.SetComment( tdm->GetTitle() ); if (tdm->GetDataType()) { - other.SetDataType( tdm->GetDataType()->GetType() ); + // Need to update the type for arrays. + if (tdm->IsaPointer()) { + other.SetDataType( tdm->GetDataType()->GetType() + TVirtualStreamerInfo::kOffsetP); + } else { + if (tdm->GetArrayDim()) { + other.SetDataType( tdm->GetDataType()->GetType() + TVirtualStreamerInfo::kOffsetL); + } else { + other.SetDataType( tdm->GetDataType()->GetType() ); + } + } } } else if (el==0) { done = kTRUE; From 55222d455370df13c9d3dee24372b9a840df9954 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Tue, 26 Nov 2013 11:01:43 +0100 Subject: [PATCH 57/85] Fix for Windows CMake/nmake (ROOT-5560) --- cmake/modules/RootNewMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index b0a16ac9efd65..ebc2a2fb94353 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -288,7 +288,7 @@ function(ROOT_LINKER_LIBRARY library) string (REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "" src2 ${src1}) string (REPLACE ${CMAKE_CURRENT_BINARY_DIR} "" src3 ${src2}) string (REPLACE ".." "__" src ${src3}) - get_filename_component(name ${src} NAME_WE) + get_filename_component(name ${src} NAME) get_filename_component(path ${src} PATH) set(lib_objs ${lib_objs} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${library}.dir/${path}/${name}.obj) endif() From 9834cd60e631faa1da9f08fb0798411c588c97b7 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Tue, 26 Nov 2013 18:47:01 +0100 Subject: [PATCH 58/85] Added new option 'sysinstall' to control the installation with CMake. Redefine various installation destinations. It should address issues ROOT-5753, ROOT-5755 --- CMakeLists.txt | 25 ++++----- bindings/pyroot/CMakeLists.txt | 9 ++- cint/ROOT/CMakeLists.txt | 14 ++--- cint/cint/CMakeLists.txt | 14 ++--- cint/reflex/CMakeLists.txt | 13 +++-- cmake/modules/PostInstalledSoftware.cmake | 7 +-- cmake/modules/RootBuildOptions.cmake | 62 ++++++++++++++------- cmake/modules/RootConfiguration.cmake | 22 +++++--- cmake/modules/RootNewMacros.cmake | 49 ++++++++-------- cmake/modules/SearchInstalledSoftware.cmake | 2 +- cmake/modules/SetUpWindows.cmake | 4 +- core/lzma/CMakeLists.txt | 2 +- core/utils/CMakeLists.txt | 2 +- core/zip/CMakeLists.txt | 2 +- graf2d/asimage/BuildAfterImage.cmake | 2 +- graf2d/freetype/CMakeLists.txt | 2 +- graf2d/win32gdk/CMakeLists.txt | 2 +- main/CMakeLists.txt | 2 +- roofit/histfactory/CMakeLists.txt | 2 +- roofit/roostats/CMakeLists.txt | 2 +- rootx/CMakeLists.txt | 2 +- tmva/CMakeLists.txt | 8 +-- 22 files changed, 137 insertions(+), 112 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5c784d4985cc..87a51dc19d9b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) set_property(GLOBAL PROPERTY USE_FOLDERS ON) #---Load some basic macros which are needed later for the confiuration and build---------------- -include(RootNewMacros) include(RootBuildOptions) +include(RootNewMacros) include(CheckCompiler) include(MacroEnsureVersion) @@ -76,23 +76,22 @@ include(PostInstalledSoftware) #---Configure and install various files neded later and for clients ----------------------------- include(RootConfiguration) -#install(EXPORT ${CMAKE_PROJECT_NAME}Exports DESTINATION cmake/modules) - #---Installation of project-wise artifacts------------------------------------------------------- if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) - install(FILES LICENSE DESTINATION .) - install(DIRECTORY README/ DESTINATION README PATTERN ".svn" EXCLUDE) - install(DIRECTORY etc/ DESTINATION etc USE_SOURCE_PERMISSIONS + install(FILES LICENSE DESTINATION ${DOC_INSTALL_DIR}) + install(DIRECTORY README/ DESTINATION ${DOC_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY etc/ DESTINATION ${ETC_INSTALL_DIR} USE_SOURCE_PERMISSIONS PATTERN ".svn" EXCLUDE REGEX system.rootrc EXCLUDE REGEX root.mimes EXCLUDE) - install(DIRECTORY fonts/ DESTINATION fonts PATTERN ".svn" EXCLUDE) - install(DIRECTORY icons/ DESTINATION icons PATTERN ".svn" EXCLUDE) - install(DIRECTORY macros/ DESTINATION macros PATTERN ".svn" EXCLUDE) - install(DIRECTORY man/ DESTINATION man PATTERN ".svn" EXCLUDE) - install(DIRECTORY test/ DESTINATION test COMPONENT tests PATTERN ".svn" EXCLUDE) - install(DIRECTORY tutorials/ DESTINATION tutorials COMPONENT tests PATTERN ".svn" EXCLUDE) - install(DIRECTORY cmake/modules DESTINATION cmake PATTERN ".svn" EXCLUDE) + install(DIRECTORY fonts/ DESTINATION ${FONT_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY icons/ DESTINATION ${ICON_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY macros/ DESTINATION ${MACRO_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY man/ DESTINATION ${MAN_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY test/ DESTINATION ${TEST_INSTALL_DIR} COMPONENT tests PATTERN ".svn" EXCLUDE) + install(DIRECTORY tutorials/ DESTINATION ${TUT_INSTALL_DIR} COMPONENT tests PATTERN ".svn" EXCLUDE) + install(DIRECTORY cmake/modules DESTINATION ${CMAKE_INSTALL_DIR} PATTERN ".svn" EXCLUDE) + install(FILES build/misc/root.m4 DESTINATION ${ACLOCAL_INSTALL_DIR}) endif() #---Configure Testing using CTest---------------------------------------------------------------- diff --git a/bindings/pyroot/CMakeLists.txt b/bindings/pyroot/CMakeLists.txt index d273aa721a93e..cf9dfe4cb8946 100644 --- a/bindings/pyroot/CMakeLists.txt +++ b/bindings/pyroot/CMakeLists.txt @@ -17,9 +17,12 @@ if(MACOSX_MINOR EQUAL 5) endif() #---Install python modules-------------------------------------------------- -install(FILES ROOT.py DESTINATION ${runtimedir}) -install(CODE "execute_process(COMMAND python -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/ROOT.py )") -install(CODE "execute_process(COMMAND python -O -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/ROOT.py )") +file(GLOB pyfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py) +foreach(pyfile ${pyfiles}) + install(FILES ${pyfile} DESTINATION ${runtimedir}) + install(CODE "execute_process(COMMAND python -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") + install(CODE "execute_process(COMMAND python -O -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") +endforeach() #---Install headers---------------------------------------------------------- ROOT_INSTALL_HEADERS() diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt index fc4acf791b319..1a5ed1e70ac21 100644 --- a/cint/ROOT/CMakeLists.txt +++ b/cint/ROOT/CMakeLists.txt @@ -139,9 +139,9 @@ foreach(_name ${CINTSTLDLLNAMES}) add_Library(${_name}Dict SHARED ${Dictionary}.cxx ) set_Target_properties(${_name}Dict PROPERTIES PREFIX ${libprefix} SUFFIX ${libsuffix} FOLDER Dictionaries) - install(TARGETS ${_name}Dict RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + install(TARGETS ${_name}Dict RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) if(explicitlink) target_link_libraries(${_name}Dict Cint Core) @@ -160,7 +160,7 @@ foreach(_name ${CINTSTLDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION cint/cint/stl) + install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/stl) endforeach() @@ -185,7 +185,7 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint ${CMAKE_M_LIBS}) endif() - install(TARGETS ${_name} DESTINATION cint/cint/include) + install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) elseif(_name MATCHES ipc) add_custom_command(OUTPUT ${OutFileName} @@ -203,7 +203,7 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION cint/cint/include) + install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) elseif(_name MATCHES posix) @@ -243,6 +243,6 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION cint/cint/include) + install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) endif() endforeach() diff --git a/cint/cint/CMakeLists.txt b/cint/cint/CMakeLists.txt index 1e5ad5dd342a5..7a79dfaf86586 100644 --- a/cint/cint/CMakeLists.txt +++ b/cint/cint/CMakeLists.txt @@ -90,7 +90,7 @@ add_custom_target(IOSENUM_H COMMAND cmake -E copy ${CMAKE_CURRENT_BINARY_DIR}/iosenum.h ${HEADER_OUTPUT_PATH}/iosenum.h DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/iosenum.h ) -install(FILES ${HEADER_OUTPUT_PATH}/iosenum.h DESTINATION cint/cint/include) +install(FILES ${HEADER_OUTPUT_PATH}/iosenum.h DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) set_target_properties(IOSENUM_H PROPERTIES FOLDER Builtins) #---special compile settings------------------------------------------------------------------------------ @@ -138,24 +138,24 @@ endif() ROOT_LINKER_LIBRARY(Cint loadfile.cxx LIBRARIES Cint_static ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) #---Create the cint cint executable------------------------------------------------------------------------- -ROOT_EXECUTABLE(cint.exe ${CMAKE_CURRENT_SOURCE_DIR}/main/cppmain.cxx LIBRARIES Cint) +ROOT_EXECUTABLE(cint.exe ${CMAKE_CURRENT_SOURCE_DIR}/main/cppmain.cxx LIBRARIES Cint NOINSTALL) #---Create the temporary cint_tmp executable---------------------------------------------------------------- ROOT_EXECUTABLE(cint_tmp ${CMAKE_CURRENT_SOURCE_DIR}/main/cppmain.cxx - ${CMAKE_CURRENT_BINARY_DIR}/loadfile_tmp.cxx LIBRARIES Cint_static ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) + ${CMAKE_CURRENT_BINARY_DIR}/loadfile_tmp.cxx LIBRARIES Cint_static ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} NOINSTALL) #---Trick to avoid building all dictionaties when CINT is changed------------------------------------------- add_custom_target(CINTTARGET DEPENDS cint_tmp) #---Create the makecint executable-------------------------------------------------------------------------- -ROOT_EXECUTABLE(makecint ${CMAKE_SOURCE_DIR}/cint/tool/makecint.cxx LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) +ROOT_EXECUTABLE(makecint ${CMAKE_SOURCE_DIR}/cint/tool/makecint.cxx LIBRARIES ${CMAKE_THREAD_LIBS_INIT} NOINSTALL) #---Installation-------------------------------------------------------------------------------------------- ROOT_INSTALL_HEADERS() if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) - install(DIRECTORY lib DESTINATION cint/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) - install(DIRECTORY include DESTINATION cint/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) - install(DIRECTORY stl DESTINATION cint/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY lib DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY include DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY stl DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) endif() diff --git a/cint/reflex/CMakeLists.txt b/cint/reflex/CMakeLists.txt index 994cae9793d97..bf7cdabcf6e0b 100644 --- a/cint/reflex/CMakeLists.txt +++ b/cint/reflex/CMakeLists.txt @@ -20,14 +20,17 @@ if(CMAKE_PROJECT_NAME STREQUAL ROOT) #---Reflex library--------------------------------------------------------- ROOT_LINKER_LIBRARY(Reflex *.cxx LIBRARIES ${CMAKE_DL_LIBS}) #---genreflex files-------------------------------------------------------- - install(CODE "file(WRITE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/python/genreflex/gccxmlpath.py \"gccxmlpath = '${GCCXML_EXECUTABLE}'\n\")") - install(DIRECTORY python/genreflex DESTINATION lib/python FILES_MATCHING PATTERN "*.py" PATTERN ".svn" EXCLUDE) - install(CODE "execute_process(COMMAND python -m compileall \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/python/genreflex)") + install(CODE "file(WRITE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/python/genreflex/gccxmlpath.py \"gccxmlpath = '${GCCXML_EXECUTABLE}'\n\")") + install(DIRECTORY python/genreflex DESTINATION ${LIB_INSTALL_DIR}/python FILES_MATCHING PATTERN "*.py" PATTERN ".svn" EXCLUDE) + install(CODE "execute_process(COMMAND python -m compileall \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/python/genreflex)") #---genmap executable------------------------------------------------------ ROOT_EXECUTABLE(genmap genmap/genmap.cxx LIBRARIES Reflex ${CMAKE_DL_LIBS}) #---install headers-------------------------------------------------------- - ROOT_INSTALL_HEADERS() - + #ROOT_INSTALL_HEADERS() + install(DIRECTORY inc/Reflex/ DESTINATION ${INCLUDE_INSTALL_DIR}/Reflex + PATTERN ".svn" EXCLUDE + PATTERN "Makefile.am" EXCLUDE + REGEX "LinkDef" EXCLUDE ) else() PROJECT(Reflex) CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) diff --git a/cmake/modules/PostInstalledSoftware.cmake b/cmake/modules/PostInstalledSoftware.cmake index a2a5dbd573c53..9fb2487b61243 100644 --- a/cmake/modules/PostInstalledSoftware.cmake +++ b/cmake/modules/PostInstalledSoftware.cmake @@ -4,10 +4,7 @@ if(builtin_gsl) add_dependencies(MathMore GSL) endif() ExternalProject_Get_Property(GSL install_dir) - install(DIRECTORY ${install_dir}/lib/ DESTINATION lib FILES_MATCHING PATTERN "libgsl*") - #install(FILES ${install_dir}/lib/libgslcblas.so - # ${install_dir}/lib/libgsl.so - # DESTINATION lib) + install(DIRECTORY ${install_dir}/lib/ DESTINATION ${LIB_INSTALL_DIR} FILES_MATCHING PATTERN "libgsl*") endif() #---Post actions to use builtin CFITSIO------------------------------------------------ @@ -15,6 +12,4 @@ if(builtin_cfitsio) if(TARGET FITSIO) add_dependencies(FITSIO CFITSIO) endif() - #install(FILES ${install_dir}/lib/libcfitsio.so - # DESTINATION lib) endif() diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index e003a7a07816a..fcf32b36eb761 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -123,6 +123,7 @@ ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames (recommended)") ROOT_BUILD_OPTION(sqlite ON "SQLite support, requires libsqlite3") ROOT_BUILD_OPTION(srp ON "SRP support, requires SRP source tree") ROOT_BUILD_OPTION(ssl ON "SSL encryption support, requires openssl") +ROOT_BUILD_OPTION(sysinstall OFF "Perform installation as a system package") ROOT_BUILD_OPTION(table OFF "Build libTable contrib library") ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library") ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers") @@ -158,18 +159,11 @@ include_regular_expression("^[^.]+$|[.]h$|[.]icc$|[.]hxx$|[.]hpp$") #---Set all directories where to install parts of root up to now everything is installed ------ #---according to the setting of CMAKE_INSTALL_DIR -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT sysinstall) message(STATUS "Setting default installation prefix CMAKE_INSTALL_PREFIX to ${ROOTSYS}") set(CMAKE_INSTALL_PREFIX ${ROOTSYS} CACHE PATH "Default installation of ROOT" FORCE) endif() -#if(ROOT_INSTALL_DIR) -# set(CMAKE_INSTALL_PREFIX ${ROOT_INSTALL_DIR}) -# add_definitions(-DR__HAVE_CONFIG) -#else() -# set(CMAKE_INSTALL_PREFIX ${ROOTSYS}) -#endif() - #---Add defines for CINT limits----------------------------------------------------------------- if(DEFINED CINTMAXSTRUCT) add_definitions(-DG__MAXSTRUCT=${CINTMAXSTRUCT}) @@ -181,19 +175,45 @@ if(DEFINED CINTLONGLINE) add_definitions(-DG__LONGLINE=${CINTLONGLINE}) endif() - -set(ROOT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) -set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) -set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) -set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) -set(ETC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/etc) -set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) -set(DOC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) -set(MACRO_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/macro) -set(SRC_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/src) -set(ICON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/icons) -set(FONT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/fonts) -set(CINT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/cint) +if(sysinstall) + set(ROOT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) + set(BIN_INSTALL_DIR bin) + set(LIB_INSTALL_DIR lib/root) + set(INCLUDE_INSTALL_DIR include/root) + set(ETC_INSTALL_DIR /etc/root) + set(MAN_INSTALL_DIR share/man) + set(DATA_INSTALL_DIR share/root) + set(MACRO_INSTALL_DIR ${DATA_INSTALL_DIR}/macros) + set(CINTINC_INSTALL_DIR ${LIB_INSTALL_DIR}/cint) + set(ICON_INSTALL_DIR ${DATA_INSTALL_DIR}/icons) + set(SRC_INSTALL_DIR ${DATA_INSTALL_DIR}/src) + set(FONT_INSTALL_DIR ${DATA_INSTALL_DIR}/fonts) + set(DOC_INSTALL_DIR share/doc/root) + set(TEST_INSTALL_DIR ${DOC_INSTALL_DIR}/test) + set(TUT_INSTALL_DIR ${DOC_INSTALL_DIR}/tutorials) + set(ACLOCAL_INSTALL_DIR share/aclocal) + set(ELISP_INSTALL_DIR share/emacs/site-lisp) + set(CMAKE_INSTALL_DIR ${DATA_INSTALL_DIR}/cmake) +else() + set(ROOT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) + set(BIN_INSTALL_DIR bin) + set(LIB_INSTALL_DIR lib) + set(INCLUDE_INSTALL_DIR include) + set(ETC_INSTALL_DIR etc) + set(MAN_INSTALL_DIR man) + set(DATA_INSTALL_DIR .) + set(MACRO_INSTALL_DIR macros) + set(CINTINC_INSTALL_DIR cint) + set(ICON_INSTALL_DIR icons) + set(SRC_INSTALL_DIR src) + set(FONT_INSTALL_DIR fonts) + set(DOC_INSTALL_DIR .) + set(TEST_INSTALL_DIR test) + set(TUT_INSTALL_DIR tutorials) + set(ACLOCAL_INSTALL_DIR build/misc) + set(ELISP_INSTALL_DIR build/misc) + set(CMAKE_INSTALL_DIR cmake) +endif() diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake index 6668719a14a20..37e8cfb16a752 100644 --- a/cmake/modules/RootConfiguration.cmake +++ b/cmake/modules/RootConfiguration.cmake @@ -359,7 +359,7 @@ execute_process(COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/t #---RConfigure.h--------------------------------------------------------------------------------------------- configure_file(${PROJECT_SOURCE_DIR}/config/RConfigure.in include/RConfigure.h) -install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION include) +install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION ${INCLUDE_INSTALL_DIR}) #---Configure and install various files---------------------------------------------------------------------- execute_Process(COMMAND hostname OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -414,8 +414,8 @@ configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/ROOTConfig.cmake.in ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake @ONLY) install(FILES ${CMAKE_BINARY_DIR}/ROOTConfig-version.cmake ${CMAKE_BINARY_DIR}/ROOTUseFile.cmake - ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake DESTINATION cmake) -install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTINATION cmake) + ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake DESTINATION ${CMAKE_INSTALL_DIR}) +install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTINATION ${CMAKE_INSTALL_DIR}) #---Especial definitions for root-config et al.-------------------------------------------------------------- @@ -435,6 +435,7 @@ configure_file(${CMAKE_SOURCE_DIR}/config/genreflex.in ${CMAKE_RUNTIME_OUTPUT_DI configure_file(${CMAKE_SOURCE_DIR}/config/genreflex-rootcint.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/genreflex-rootcint @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/proofserv.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/proofserv @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/roots.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/roots @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/config/root-help.el.in root-help.el @ONLY) if(WIN32) set(thisrootbat ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.bat) @@ -456,19 +457,22 @@ install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/genreflex PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ - DESTINATION bin) + DESTINATION ${BIN_INSTALL_DIR}) install(FILES ${CMAKE_BINARY_DIR}/include/RConfigOptions.h ${CMAKE_BINARY_DIR}/include/compiledata.h - DESTINATION include) + DESTINATION ${INCLUDE_INSTALL_DIR}) install(FILES ${CMAKE_BINARY_DIR}/etc/root.mimes ${CMAKE_BINARY_DIR}/etc/system.rootrc - DESTINATION etc) + DESTINATION ${ETC_INSTALL_DIR}) + +install(FILES ${CMAKE_BINARY_DIR}/root-help.el DESTINATION ${ELISP_INSTALL_DIR}) -install(FILES ${CMAKE_BINARY_DIR}/config/Makefile.comp - ${CMAKE_BINARY_DIR}/config/Makefile.config - DESTINATION config) + +#install(FILES ${CMAKE_BINARY_DIR}/config/Makefile.comp +# ${CMAKE_BINARY_DIR}/config/Makefile.config +# DESTINATION config) endfunction() diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index ebc2a2fb94353..2b7f8f08565ee 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -16,21 +16,21 @@ if(WIN32) set(libprefix lib) set(ld_library_path PATH) set(libsuffix .dll) - set(runtimedir bin) + set(runtimedir ${BIN_INSTALL_DIR}) elseif(APPLE) set(ld_library_path DYLD_LIBRARY_PATH) set(ssuffix .csh) set(scomment \#) set(libprefix lib) set(libsuffix .so) - set(runtimedir lib) + set(runtimedir ${LIB_INSTALL_DIR}) else() set(ld_library_path LD_LIBRARY_PATH) set(ssuffix .csh) set(scomment \#) set(libprefix lib) set(libsuffix .so) - set(runtimedir lib) + set(runtimedir ${LIB_INSTALL_DIR}) endif() if(soversion) @@ -321,32 +321,31 @@ function(ROOT_LINKER_LIBRARY library) set_target_properties(${library} PROPERTIES LINK_INTERFACE_LIBRARIES "${ARG_DEPENDENCIES}") #----Installation details------------------------------------------------------- if(ARG_CMAKENOEXPORT) - install(TARGETS ${library} RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + install(TARGETS ${library} RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) else() install(TARGETS ${library} EXPORT ${CMAKE_PROJECT_NAME}Exports - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) - #install(EXPORT ${CMAKE_PROJECT_NAME}Exports DESTINATION cmake/modules) endif() if(WIN32 AND ARG_TYPE STREQUAL SHARED) if(CMAKE_GENERATOR MATCHES "Visual Studio") install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/lib${library}.pdb CONFIGURATIONS Debug - DESTINATION bin + DESTINATION ${BIN_INSTALL_DIR} COMPONENT libraries) install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/lib${library}.pdb CONFIGURATIONS RelWithDebInfo - DESTINATION bin + DESTINATION ${BIN_INSTALL_DIR} COMPONENT libraries) else() install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${library}.pdb CONFIGURATIONS Debug RelWithDebInfo - DESTINATION bin + DESTINATION ${BIN_INSTALL_DIR} COMPONENT libraries) endif() endif() @@ -363,9 +362,9 @@ function(ROOT_MODULE_LIBRARY library) set_target_properties(${library} PROPERTIES ${ROOT_LIBRARY_PROPERTIES}) target_link_libraries(${library} ${ARG_LIBRARIES}) #----Installation details------------------------------------------------------- - install(TARGETS ${library} RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + install(TARGETS ${library} RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) endfunction() @@ -437,7 +436,7 @@ function(ROOT_GENERATE_ROOTMAP library) add_custom_target( ${libprefix}${library}.rootmap ALL DEPENDS ${outfile}) set_target_properties(${libprefix}${library}.rootmap PROPERTIES FOLDER RootMaps ) #---Install the rootmap file------------------------------------ - install(FILES ${outfile} DESTINATION lib COMPONENT libraries) + install(FILES ${outfile} DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) endfunction() #--------------------------------------------------------------------------------------------------- @@ -450,7 +449,7 @@ function(ROOT_INSTALL_HEADERS) set(dirs inc/) endif() foreach(d ${dirs}) - install(DIRECTORY ${d} DESTINATION include + install(DIRECTORY ${d} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT headers PATTERN ".svn" EXCLUDE PATTERN "X11" EXCLUDE @@ -474,7 +473,7 @@ endfunction() #---ROOT_EXECUTABLE( source1 source2 ... LIBRARIES library1 library2 ...) #--------------------------------------------------------------------------------------------------- function(ROOT_EXECUTABLE executable) - PARSE_ARGUMENTS(ARG "LIBRARIES" "CMAKENOEXPORT" ${ARGN}) + PARSE_ARGUMENTS(ARG "LIBRARIES" "CMAKENOEXPORT;NOINSTALL" ${ARGN}) ROOT_GET_SOURCES(exe_srcs src ${ARG_DEFAULT_ARGS}) set(executable_name ${executable}) if(TARGET ${executable}) @@ -490,10 +489,12 @@ function(ROOT_EXECUTABLE executable) set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${executable}) set_target_properties(${executable} PROPERTIES OUTPUT_NAME ${executable_name}) #----Installation details------------------------------------------------------ - if(ARG_CMAKENOEXPORT) - install(TARGETS ${executable} RUNTIME DESTINATION ${bin} COMPONENT applications) - else() - install(TARGETS ${executable} EXPORT ${CMAKE_PROJECT_NAME}Exports RUNTIME DESTINATION ${bin} COMPONENT applications) + if(NOT ARG_NOINSTALL) + if(ARG_CMAKENOEXPORT) + install(TARGETS ${executable} RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) + else() + install(TARGETS ${executable} EXPORT ${CMAKE_PROJECT_NAME}Exports RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) + endif() endif() endfunction() @@ -506,7 +507,7 @@ function(REFLEX_BUILD_DICTIONARY dictionary headerfiles selectionfile ) add_library(${dictionary}Dict MODULE ${gensrcdict}) target_link_libraries(${dictionary}Dict ${ARG_LIBRARIES} ${ROOT_Reflex_LIBRARY}) #----Installation details------------------------------------------------------- - install(TARGETS ${dictionary}Dict LIBRARY DESTINATION ${lib}) + install(TARGETS ${dictionary}Dict LIBRARY DESTINATION ${LIB_INSTALL_DIR}) set(mergedRootMap ${CMAKE_INSTALL_PREFIX}/${lib}/${CMAKE_PROJECT_NAME}Dict.rootmap) set(srcRootMap ${CMAKE_CURRENT_BINARY_DIR}/${rootmapname}) install(CODE "EXECUTE_PROCESS(COMMAND ${merge_rootmap_cmd} --do-merge --input-file ${srcRootMap} --merged-file ${mergedRootMap})") diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index c40d25c8a3f38..ce7aaa41a0e2d 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -77,7 +77,7 @@ if(builtin_lzma) CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND cmake -E copy lib/liblzma.dll /bin/${CMAKE_CFG_INTDIR} BUILD_IN_SOURCE 1) - install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION bin) + install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION ${BIN_INSTALL_DIR}) set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib) set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include) else() diff --git a/cmake/modules/SetUpWindows.cmake b/cmake/modules/SetUpWindows.cmake index cbccae74a30f1..683caef68eb8b 100644 --- a/cmake/modules/SetUpWindows.cmake +++ b/cmake/modules/SetUpWindows.cmake @@ -31,8 +31,8 @@ endif() if(CMAKE_PROJECT_NAME STREQUAL ROOT) set(CMAKE_CXX_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -D_WIN32") set(CMAKE_C_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCFLAGS} -EHsc- -W3 -D_WIN32") - install(FILES ${CMAKE_SOURCE_DIR}/build/win/w32pragma.h DESTINATION include COMPONENT headers) - install(FILES ${CMAKE_SOURCE_DIR}/build/win/sehmap.h DESTINATION include COMPONENT headers) + install(FILES ${CMAKE_SOURCE_DIR}/build/win/w32pragma.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT headers) + install(FILES ${CMAKE_SOURCE_DIR}/build/win/sehmap.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT headers) else() set(CMAKE_CXX_FLAGS "-nologo -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -D_WIN32") set(CMAKE_C_FLAGS "-nologo -FIw32pragma.h -FIsehmap.h ${BLDCFLAGS} -EHsc- -W3 -D_WIN32") diff --git a/core/lzma/CMakeLists.txt b/core/lzma/CMakeLists.txt index c1e76347a8dbd..a59c0d5cba555 100644 --- a/core/lzma/CMakeLists.txt +++ b/core/lzma/CMakeLists.txt @@ -16,5 +16,5 @@ list(APPEND LibCore_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/inc) set(LibCore_SRCS ${LibCore_SRCS} PARENT_SCOPE) set(LibCore_INCLUDE_DIRS ${LibCore_INCLUDE} PARENT_SCOPE) -install(FILES ${LZMA_headers} DESTINATION include) +install(FILES ${LZMA_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) diff --git a/core/utils/CMakeLists.txt b/core/utils/CMakeLists.txt index 8f4b96f598880..f683375e2095d 100644 --- a/core/utils/CMakeLists.txt +++ b/core/utils/CMakeLists.txt @@ -29,7 +29,7 @@ ROOT_EXECUTABLE(rootcint_tmp rootcint_tmp.cxx RStl_tmp.cxx loadfile_tmp.cxx ${METAUTILS_CXX_SOURCES} ${CMAKE_SOURCE_DIR}/core/clib/src/strlcpy.c ${CMAKE_SOURCE_DIR}/core/clib/src/strlcat.c - LIBRARIES Cint_static ${CMAKE_DL_LIBS}) + LIBRARIES Cint_static ${CMAKE_DL_LIBS} NOINSTALL) add_dependencies(rootcint_tmp IOSENUM_H) #---Trick to avoid building all dictionaties when CINT is changed------------- diff --git a/core/zip/CMakeLists.txt b/core/zip/CMakeLists.txt index d828f8833ec7b..4c8c563dfcc4a 100644 --- a/core/zip/CMakeLists.txt +++ b/core/zip/CMakeLists.txt @@ -62,7 +62,7 @@ endif() # Define all the header files which should be installed when # doing a "make install" -install(FILES ${ZLIB_HEADERS} DESTINATION include) +install(FILES ${ZLIB_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}) set_property(GLOBAL APPEND PROPERTY ROOT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/inc) # Add all source files of this subdirectory to the source files diff --git a/graf2d/asimage/BuildAfterImage.cmake b/graf2d/asimage/BuildAfterImage.cmake index 21d4729541ce7..407433d551d7e 100644 --- a/graf2d/asimage/BuildAfterImage.cmake +++ b/graf2d/asimage/BuildAfterImage.cmake @@ -117,4 +117,4 @@ if(builtin_freetype) add_dependencies(AFTERIMAGE FREETYPE) endif() -install(FILES ${afterimagelib} DESTINATION lib) +install(FILES ${afterimagelib} DESTINATION ${LIB_INSTALL_DIR}) diff --git a/graf2d/freetype/CMakeLists.txt b/graf2d/freetype/CMakeLists.txt index 6f83e0d23efa9..3c2e3d93fdb64 100644 --- a/graf2d/freetype/CMakeLists.txt +++ b/graf2d/freetype/CMakeLists.txt @@ -110,4 +110,4 @@ endif() # build directory. add_custom_target(FREETYPE DEPENDS ${freetypelib}) set_target_properties(FREETYPE PROPERTIES FOLDER Builtins) -install(FILES ${freetypelib} DESTINATION lib) +install(FILES ${freetypelib} DESTINATION ${LIB_INSTALL_DIR}) diff --git a/graf2d/win32gdk/CMakeLists.txt b/graf2d/win32gdk/CMakeLists.txt index c3affb78b1e6d..74a658c508d23 100644 --- a/graf2d/win32gdk/CMakeLists.txt +++ b/graf2d/win32gdk/CMakeLists.txt @@ -105,6 +105,6 @@ endif() install(FILES ${gdkdlla} ${glibdlla} ${iconvdlla} - DESTINATION bin) + DESTINATION ${BIN_INSTALL_DIR}) ROOT_INSTALL_HEADERS() diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 3090b9ebb4bfa..88b7497f913db 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -18,6 +18,6 @@ ROOT_EXECUTABLE(hadd hadd.cxx LIBRARIES Core Cint RIO Net Hist Graf Graf3d Gpad if(CMAKE_Fortran_COMPILER) ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern) - #ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core Cint RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern) + ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core Cint RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern) endif() diff --git a/roofit/histfactory/CMakeLists.txt b/roofit/histfactory/CMakeLists.txt index 2cec504395a73..89e51ff0069f9 100644 --- a/roofit/histfactory/CMakeLists.txt +++ b/roofit/histfactory/CMakeLists.txt @@ -17,6 +17,6 @@ ROOT_EXECUTABLE(hist2workspace MakeModelAndMeasurements.cxx hist2workspace.cxx Graf Gpad Minuit Foam RooStats XMLParser) #ROOT_INSTALL_HEADERS() -install(DIRECTORY inc/RooStats/HistFactory/ DESTINATION include/RooStats/HistFactory +install(DIRECTORY inc/RooStats/HistFactory/ DESTINATION ${INCLUDE_INSTALL_DIR}/RooStats/HistFactory PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) diff --git a/roofit/roostats/CMakeLists.txt b/roofit/roostats/CMakeLists.txt index e4d3d34ae9163..5b6c79494ffa3 100644 --- a/roofit/roostats/CMakeLists.txt +++ b/roofit/roostats/CMakeLists.txt @@ -10,7 +10,7 @@ ROOT_LINKER_LIBRARY(RooStats *.cxx G__RooStats.cxx LIBRARIES Core Cint DEPENDENCIES RooFit RooFitCore Tree RIO Hist Matrix MathCore Minuit Foam Graf Gpad ) #ROOT_INSTALL_HEADERS() -install(DIRECTORY inc/RooStats/ DESTINATION include/RooStats +install(DIRECTORY inc/RooStats/ DESTINATION ${INCLUDE_INSTALL_DIR}/RooStats COMPONENT headers PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) diff --git a/rootx/CMakeLists.txt b/rootx/CMakeLists.txt index 9ebe25d4b1f5a..eb970ec51b796 100644 --- a/rootx/CMakeLists.txt +++ b/rootx/CMakeLists.txt @@ -13,5 +13,5 @@ elseif(cocoa) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root) add_dependencies(root root.exe) install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root - DESTINATION ${bin} COMPONENT applications) + DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) endif() diff --git a/tmva/CMakeLists.txt b/tmva/CMakeLists.txt index 0859b69dd30e0..9604f1f09ad14 100644 --- a/tmva/CMakeLists.txt +++ b/tmva/CMakeLists.txt @@ -59,11 +59,11 @@ ROOT_GENERATE_ROOTMAP(TMVA LINKDEF LinkDef1.h LinkDef2.h LinkDef3.h LinkDef4.h ROOT_LINKER_LIBRARY(TMVA *.cxx G__TMVA1.cxx G__TMVA2.cxx G__TMVA3.cxx G__TMVA4.cxx LIBRARIES Core Cint DEPENDENCIES RIO Hist Tree MLP Minuit XMLIO) -install(DIRECTORY inc/TMVA/ DESTINATION include/TMVA +install(DIRECTORY inc/TMVA/ DESTINATION ${INCLUDE_INSTALL_DIR}/TMVA PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) -if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) - install(DIRECTORY test DESTINATION tmva PATTERN ".svn" EXCLUDE) -endif() +#if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) +# install(DIRECTORY test DESTINATION ${DOC_INSTALL_DIR}/tmva PATTERN ".svn" EXCLUDE) +#endif() From a9537f1d0d7f83d08dc56b3667644f43d5cbfea9 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Tue, 26 Nov 2013 19:03:55 +0100 Subject: [PATCH 59/85] Silence the configure of unuran (CMake). Fixes ROOT-5754. --- math/unuran/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math/unuran/CMakeLists.txt b/math/unuran/CMakeLists.txt index 190eeda0ca393..d253aa4bdc574 100644 --- a/math/unuran/CMakeLists.txt +++ b/math/unuran/CMakeLists.txt @@ -40,7 +40,7 @@ else() #---configure unuran (required for creating the config.h used by unuran source files)---------------- add_custom_command(OUTPUT ${UNR_UNTARDIR}/config.h - COMMAND GNUMAKE=make ./configure CC=${UNR_CC} CFLAGS=${UNR_CFLAGS} + COMMAND GNUMAKE=make ./configure CC=${UNR_CC} CFLAGS=${UNR_CFLAGS} > /dev/null 2>& 1 WORKING_DIRECTORY ${UNR_UNTARDIR}) endif() From 7ed6dccc20a05cb8fa1cb8e22f71ece216ade375 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Wed, 27 Nov 2013 18:38:13 +0100 Subject: [PATCH 60/85] Fix the use of R__HAVE_CONFIG (CMake) --- cmake/modules/CheckCompiler.cmake | 6 ++- cmake/modules/RootConfiguration.cmake | 54 ++++++++++++--------------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index 3e9ad4e4f90ae..ab5071ea479f4 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -74,8 +74,12 @@ elseif(WIN32) endif() if(c++11) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declaration") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declaration") endif() +if(sysinstall) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DR__HAVE_CONFIG") +endif() + #---Print the final compiler flags-------------------------------------------------------------------- message(STATUS "ROOT Platform: ${ROOT_PLATFORM}") diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake index 37e8cfb16a752..f063b887200b7 100644 --- a/cmake/modules/RootConfiguration.cmake +++ b/cmake/modules/RootConfiguration.cmake @@ -24,24 +24,30 @@ set(winrtdebug ${value${winrtdebug}}) set(exceptions ${value${exceptions}}) set(explicitlink ${value${explicitlink}}) -set(prefix "$(ROOTSYS)") -set(bindir "$(ROOTSYS)/bin") -set(libdir "$(ROOTSYS)/lib") -set(incdir "$(ROOTSYS)/include") -set(mandir "$(ROOTSYS)/man/man1") -set(etcdir "$(ROOTSYS)/etc") +if(sysinstall) + set(prefix ${ROOT_INSTALL_DIR}) + set(etcdir ${ETC_INSTALL_DIR}) +else() + set(prefix $(ROOTSYS)) + set(etcdir ${prefix}/${ETC_INSTALL_DIR}) +endif() +set(bindir ${prefix}/${BIN_INSTALL_DIR}) +set(libdir ${prefix}/${LIB_INSTALL_DIR}) +set(incdir ${prefix}/${INCLUDE_INSTALL_DIR}) +set(mandir ${prefix}/${MAN_INSTALL_DIR}) set(plugindir ${etcdir}/plugins) -set(datadir "$(ROOTSYS)") -set(elispdir "$(ROOTSYS)/build/misc") -set(ttffontdir "$(ROOTSYS)/fonts") -set(macrodir "$(ROOTSYS)/macros") -set(srcdir "$(ROOTSYS)/src") -set(iconpath ${datadir}/icons) -set(cintincdir "$(ROOTSYS)/cint") -set(docdir "$(ROOTSYS)") -set(testdir "$(ROOTSYS)/test") -set(tutdir "$(ROOTSYS)/tutorials") -set(aclocaldir "$(ROOTSYS)/build/misc") +set(datadir ${prefix}/${DATA_INSTALL_DIR}) +set(elispdir ${prefix}/${ELISP_INSTALL_DIR}) +set(ttffontdir ${prefix}/${FONT_INSTALL_DIR}) +set(macrodir ${prefix}/${MACRO_INSTALL_DIR}) +set(srcdir ${prefix}/${SRC_INSTALL_DIR}) +set(iconpath ${prefix}/${ICON_INSTALL_DIR}) +set(cintincdir ${prefix}/${CINTINC_INSTALL_DIR}) +set(docdir ${prefix}/${DOC_INSTALL_DIR}) +set(testdir ${prefix}/${TEST_INSTALL_DIR}) +set(tutdir ${prefix}/${TUT_INSTALL_DIR}) +set(aclocaldir ${prefix}/${ACLOCAL_INSTALL_DIR}) + set(LibSuffix ${SOEXT}) set(buildx11 ${value${x11}}) @@ -355,7 +361,7 @@ set(pythonvers ${PYTHON_VERSION}) include(WriteConfigCint) WRITE_CONFIG_CINT( ${CMAKE_CURRENT_BINARY_DIR}/tmp/configcint.h) execute_process(COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/tmp/configcint.h ${HEADER_OUTPUT_PATH}/configcint.h) -#install(FILES ${HEADER_OUTPUT_PATH}/configcint.h DESTINATION include) +#install(FILES ${HEADER_OUTPUT_PATH}/configcint.h DESTINATION ${INCLUDE_INSTALL_DIR}) #---RConfigure.h--------------------------------------------------------------------------------------------- configure_file(${PROJECT_SOURCE_DIR}/config/RConfigure.in include/RConfigure.h) @@ -419,12 +425,6 @@ install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTIN #---Especial definitions for root-config et al.-------------------------------------------------------------- -set(prefix $ROOTSYS) -set(bindir $ROOTSYS/bin) -set(libdir $ROOTSYS/lib) -set(incdir $ROOTSYS/include) -set(etcdir $ROOTSYS/etc) -set(mandir $ROOTSYS/man/man1) configure_file(${CMAKE_SOURCE_DIR}/config/root-config.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root-config @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/memprobe.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/memprobe @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/thisroot.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.sh @ONLY) @@ -469,11 +469,5 @@ install(FILES ${CMAKE_BINARY_DIR}/etc/root.mimes install(FILES ${CMAKE_BINARY_DIR}/root-help.el DESTINATION ${ELISP_INSTALL_DIR}) - -#install(FILES ${CMAKE_BINARY_DIR}/config/Makefile.comp -# ${CMAKE_BINARY_DIR}/config/Makefile.config -# DESTINATION config) - - endfunction() RootConfigure() From 0e467da8654c20d1876ca253050f4a071dbfffe9 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Wed, 27 Nov 2013 19:52:19 +0100 Subject: [PATCH 61/85] Fixes for ROOT-5755 (CMake) --- bindings/pyroot/CMakeLists.txt | 4 ++-- cint/cintex/CMakeLists.txt | 4 ++-- cmake/modules/RootNewMacros.cmake | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/pyroot/CMakeLists.txt b/bindings/pyroot/CMakeLists.txt index cf9dfe4cb8946..4e1e0106f7294 100644 --- a/bindings/pyroot/CMakeLists.txt +++ b/bindings/pyroot/CMakeLists.txt @@ -20,8 +20,8 @@ endif() file(GLOB pyfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py) foreach(pyfile ${pyfiles}) install(FILES ${pyfile} DESTINATION ${runtimedir}) - install(CODE "execute_process(COMMAND python -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") - install(CODE "execute_process(COMMAND python -O -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") + install(CODE "execute_process(COMMAND python -m py_compile \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") + install(CODE "execute_process(COMMAND python -O -m py_compile \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtimedir}/${pyfile} )") endforeach() #---Install headers---------------------------------------------------------- diff --git a/cint/cintex/CMakeLists.txt b/cint/cintex/CMakeLists.txt index 0ec6483bbd73f..b81d661950636 100644 --- a/cint/cintex/CMakeLists.txt +++ b/cint/cintex/CMakeLists.txt @@ -11,8 +11,8 @@ ROOT_GENERATE_ROOTMAP(Cintex LINKDEF LinkDef.h DEPENDENCIES Reflex) #---Install python modules-------------------------------------------------- install(FILES python/PyCintex.py DESTINATION ${runtimedir}) -install(CODE "execute_process(COMMAND python -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/PyCintex.py )") -install(CODE "execute_process(COMMAND python -O -m py_compile ${CMAKE_INSTALL_PREFIX}/${runtimedir}/PyCintex.py )") +install(CODE "execute_process(COMMAND python -m py_compile \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtimedir}/PyCintex.py )") +install(CODE "execute_process(COMMAND python -O -m py_compile \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtimedir}/PyCintex.py )") #---install headers---------------------------------------------------------- ROOT_INSTALL_HEADERS() diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 2b7f8f08565ee..2baf54a6e44f0 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -35,8 +35,8 @@ endif() if(soversion) set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} - VERSION ${ROOT_VERSION} - SOVERSION ${ROOT_MAJOR_VERSION} + VERSION ${ROOT_MAJOR_VERSION}.${ROOT_MINOR_VERSION} + #SOVERSION ${ROOT_MAJOR_VERSION} SUFFIX ${libsuffix} PREFIX ${libprefix} ) else() From 1f97337159e8f12008503a26ac5e55881ec77205 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Wed, 27 Nov 2013 19:56:38 +0100 Subject: [PATCH 62/85] Fixes for ROOT-5755 (2) (CMake) --- cmake/modules/RootNewMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 2baf54a6e44f0..ee454dcdcd420 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -36,7 +36,7 @@ endif() if(soversion) set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} VERSION ${ROOT_MAJOR_VERSION}.${ROOT_MINOR_VERSION} - #SOVERSION ${ROOT_MAJOR_VERSION} + SOVERSION ${ROOT_MAJOR_VERSION} SUFFIX ${libsuffix} PREFIX ${libprefix} ) else() From e25bcc8ca402bdba7aa2a286de2202f294773faf Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Wed, 27 Nov 2013 22:51:01 +0100 Subject: [PATCH 63/85] Undo partially the changes for dealing with $prefix (CMake) --- cmake/modules/RootConfiguration.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake index f063b887200b7..eed4e26a70aa3 100644 --- a/cmake/modules/RootConfiguration.cmake +++ b/cmake/modules/RootConfiguration.cmake @@ -425,6 +425,14 @@ install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTIN #---Especial definitions for root-config et al.-------------------------------------------------------------- +if(prefix STREQUAL "$(ROOTSYS)") + set(prefix $ROOTSYS) + set(bindir $ROOTSYS/bin) + set(libdir $ROOTSYS/lib) + set(incdir $ROOTSYS/include) + set(etcdir $ROOTSYS/etc) + set(mandir $ROOTSYS/man/man1) +endif() configure_file(${CMAKE_SOURCE_DIR}/config/root-config.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root-config @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/memprobe.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/memprobe @ONLY) configure_file(${CMAKE_SOURCE_DIR}/config/thisroot.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/thisroot.sh @ONLY) From c5f64d3f23da0ec41314cbc2fe55fdfcf0ed2d4d Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Wed, 27 Nov 2013 23:42:45 +0100 Subject: [PATCH 64/85] Fix a typo for building linAfterImage (CMake) --- graf2d/asimage/BuildAfterImage.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graf2d/asimage/BuildAfterImage.cmake b/graf2d/asimage/BuildAfterImage.cmake index 407433d551d7e..c46aa80c2de0f 100644 --- a/graf2d/asimage/BuildAfterImage.cmake +++ b/graf2d/asimage/BuildAfterImage.cmake @@ -68,7 +68,7 @@ else() set(JPEGINCLUDE "--with-jpeg-includes=${JPEG_INCLUDE_DIR}") endif() if(PNG_FOUND) - set(PNGINCLUDE "--with-png-includes=${PNG_INCLUDE_DIR}") + set(PNGINCLUDE "--with-png-includes=${PNG_PNG_INCLUDE_DIR}") endif() if(cocoa) set(JPEGINCLUDE --without-x --with-builtin-jpeg) From d2b569f314cb96943705f212cad8a4f7ac659aff Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Fri, 29 Nov 2013 11:23:28 +0100 Subject: [PATCH 65/85] Adapt to first,last from current SetRange(); fixes AliROOT. --- hist/hist/src/THnBase.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hist/hist/src/THnBase.cxx b/hist/hist/src/THnBase.cxx index 12be666f89ae0..928d6f83f32a5 100644 --- a/hist/hist/src/THnBase.cxx +++ b/hist/hist/src/THnBase.cxx @@ -103,7 +103,13 @@ void THnBase::Init(const char* name, const char* title, TAxis* reqaxis = (TAxis*)axis->Clone(); if (!keepTargetAxis && axis->TestBit(TAxis::kAxisRange)) { Int_t binFirst = axis->GetFirst(); + // The lowest egde of the underflow is meaningless. + if (binFirst == 0) + binFirst = 1; Int_t binLast = axis->GetLast(); + // The overflow edge is implicit. + if (binLast > axis->GetNbins()) + binLast = axis->GetNbins(); Int_t nBins = binLast - binFirst + 1; if (axis->GetXbins()->GetSize()) { // non-uniform bins: From 269055b9ae2f02028166abe42a6b51b2bce3f13c Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Fri, 29 Nov 2013 14:37:38 +0100 Subject: [PATCH 66/85] Pervent bin shift by one if underflows are included. (cherry picked from commit 92742b73aa743ffc6658e0ed42a691c7e42c3907) --- hist/hist/src/THnBase.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hist/hist/src/THnBase.cxx b/hist/hist/src/THnBase.cxx index 928d6f83f32a5..f6f53ea82df48 100644 --- a/hist/hist/src/THnBase.cxx +++ b/hist/hist/src/THnBase.cxx @@ -527,7 +527,10 @@ TObject* THnBase::ProjectionAny(Int_t ndim, const Int_t* dim, for (Int_t d = 0; d < ndim; ++d) { bins[d] = iter.GetCoord(dim[d]); if (!keepTargetAxis && GetAxis(dim[d])->TestBit(TAxis::kAxisRange)) { - bins[d] -= GetAxis(dim[d])->GetFirst() - 1; + Int_t binOffset = GetAxis(dim[d])->GetFirst(); + // Don't subtract even more if underflow is alreday included: + if (binOffset > 0) --binOffset; + bins[d] -= binOffset; } } From f3bfda66465e9874db8d3ee62b1bc18f9347292f Mon Sep 17 00:00:00 2001 From: Wouter Verkerke Date: Fri, 29 Nov 2013 13:43:05 +0100 Subject: [PATCH 67/85] o RooTrace - Add new object tracing code to track memory footprint by type of object o RooRealSumPdf - Make sure expectedEvents() always returns the correct answer, even when BinnedLikelihood is activate --- roofit/roofitcore/inc/RooTrace.h | 21 ++++++++ roofit/roofitcore/src/RooRealSumPdf.cxx | 24 +++++++-- roofit/roofitcore/src/RooTrace.cxx | 71 +++++++++++++++++++++++-- 3 files changed, 110 insertions(+), 6 deletions(-) diff --git a/roofit/roofitcore/inc/RooTrace.h b/roofit/roofitcore/inc/RooTrace.h index ec1ccf9ec0e1b..5e35ae8dfc65f 100644 --- a/roofit/roofitcore/inc/RooTrace.h +++ b/roofit/roofitcore/inc/RooTrace.h @@ -17,9 +17,15 @@ #define ROO_TRACE #include +#include #include "Riosfwd.h" #include "RooLinkedList.h" +#ifndef __CINT__ +#define TRACE_CREATE RooTrace::create(this); +#define TRACE_DESTROY RooTrace::destroy(this); +#endif + class RooTrace { public: @@ -27,6 +33,10 @@ class RooTrace { static void create(const TObject* obj) ; static void destroy(const TObject* obj) ; + + static void createSpecial(const char* name, int size) ; + static void destroySpecial(const char* name) ; + static void active(Bool_t flag) ; static void verbose(Bool_t flag) ; @@ -34,15 +44,21 @@ class RooTrace { static void dump() ; static void dump(std::ostream& os, Bool_t sinceMarked=kFALSE) ; static void mark() ; + + static void printObjectCounts() ; static void callgrind_zero() ; static void callgrind_dump() ; + protected: static void create2(const TObject* obj) ; static void destroy2(const TObject* obj) ; + static void create3(const TObject* obj) ; + static void destroy3(const TObject* obj) ; + void addPad(const TObject* ref, Bool_t doPad) ; Bool_t removePad(const TObject* ref) ; @@ -52,6 +68,11 @@ class RooTrace { static RooLinkedList _list ; static RooLinkedList _markList ; + static std::map _objectCount ; + + static std::map _specialCount ; + static std::map _specialSize ; + ClassDef(RooTrace,0) // Memory tracer utility for RooFit objects }; diff --git a/roofit/roofitcore/src/RooRealSumPdf.cxx b/roofit/roofitcore/src/RooRealSumPdf.cxx index 904a8b003b6c5..ebb7ea51b1ab2 100644 --- a/roofit/roofitcore/src/RooRealSumPdf.cxx +++ b/roofit/roofitcore/src/RooRealSumPdf.cxx @@ -42,6 +42,7 @@ #include "RooRealIntegral.h" #include "RooMsgService.h" #include "RooNameReg.h" +#include "RooTrace.h" #include #include @@ -61,6 +62,7 @@ RooRealSumPdf::RooRealSumPdf() _coefIter = _coefList.createIterator() ; _extended = kFALSE ; _doFloor = kFALSE ; + TRACE_CREATE } @@ -78,6 +80,7 @@ RooRealSumPdf::RooRealSumPdf(const char *name, const char *title) : // Constructor with name and title _funcIter = _funcList.createIterator() ; _coefIter = _coefList.createIterator() ; + TRACE_CREATE } @@ -104,6 +107,7 @@ RooRealSumPdf::RooRealSumPdf(const char *name, const char *title, _funcList.add(func1) ; _funcList.add(func2) ; _coefList.add(coef1) ; + TRACE_CREATE } @@ -167,6 +171,7 @@ RooRealSumPdf::RooRealSumPdf(const char *name, const char *title, const RooArgLi delete funcIter ; delete coefIter ; + TRACE_CREATE } @@ -186,6 +191,7 @@ RooRealSumPdf::RooRealSumPdf(const RooRealSumPdf& other, const char* name) : _funcIter = _funcList.createIterator() ; _coefIter = _coefList.createIterator() ; + TRACE_CREATE } @@ -196,6 +202,8 @@ RooRealSumPdf::~RooRealSumPdf() // Destructor delete _funcIter ; delete _coefIter ; + + TRACE_DESTROY } @@ -450,15 +458,25 @@ Double_t RooRealSumPdf::analyticalIntegralWN(Int_t code, const RooArgSet* normSe //_____________________________________________________________________________ Double_t RooRealSumPdf::expectedEvents(const RooArgSet* nset) const { - // return getNorm(nset) ; - Double_t n = getNorm(nset) ; + Double_t n(0) ; + if (getAttribute("BinnedLikelihood")) { + + // need special handling as default integral is disabled + const_cast(this)->setAttribute("BinnedLikelihood",kFALSE) ; + RooAbsReal* integral = createIntegral(*nset) ; + n = integral->getVal() ; + delete integral ; + const_cast(this)->setAttribute("BinnedLikelihood") ; + + } else { + n = getNorm(nset) ; + } if (n<0) { logEvalError("Expected number of events is negative") ; } return n ; } - //_____________________________________________________________________________ std::list* RooRealSumPdf::binBoundaries(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const { diff --git a/roofit/roofitcore/src/RooTrace.cxx b/roofit/roofitcore/src/RooTrace.cxx index 5ffa1e8e83601..4be78bcf3efc1 100644 --- a/roofit/roofitcore/src/RooTrace.cxx +++ b/roofit/roofitcore/src/RooTrace.cxx @@ -36,6 +36,7 @@ + using namespace std; ClassImp(RooTrace) @@ -46,7 +47,9 @@ Bool_t RooTrace::_active(kFALSE) ; Bool_t RooTrace::_verbose(kFALSE) ; RooLinkedList RooTrace::_list ; RooLinkedList RooTrace::_markList ; - +map RooTrace::_objectCount ; +map RooTrace::_specialCount ; +map RooTrace::_specialSize ; //_____________________________________________________________________________ @@ -54,7 +57,7 @@ void RooTrace::create(const TObject* obj) { // Register creation of object 'obj' - if (_active) create2(obj) ; + if (_active) create3(obj) ; } @@ -63,10 +66,30 @@ void RooTrace::destroy(const TObject* obj) { // Register deletion of object 'obj' - if (_active) destroy2(obj) ; + if (_active) destroy3(obj) ; } +//_____________________________________________________________________________ +void RooTrace::createSpecial(const char* name, int size) +{ + if (_active) { + _specialCount[name]++ ; + _specialSize[name] = size ; + } +} + + +//_____________________________________________________________________________ +void RooTrace::destroySpecial(const char* name) +{ + if (_active) { + _specialCount[name]++ ; + } +} + + + //_____________________________________________________________________________ void RooTrace::active(Bool_t flag) { @@ -116,6 +139,27 @@ void RooTrace::destroy2(const TObject* obj) +//_____________________________________________________________________________ +void RooTrace::create3(const TObject* obj) +{ + // Back end function of create(), register creation of object 'obj' + _objectCount[obj->IsA()]++ ; +} + + + + +//_____________________________________________________________________________ +void RooTrace::destroy3(const TObject* obj) +{ + // Back end function of destroy(), register deletion of object 'obj' + _objectCount[obj->IsA()]-- ; +} + + + + + //_____________________________________________________________________________ void RooTrace::mark() { @@ -157,6 +201,27 @@ void RooTrace::dump(ostream& os, Bool_t sinceMarked) +//_____________________________________________________________________________ +void RooTrace::printObjectCounts() +{ + Double_t total(0) ; + for (map::iterator iter = _objectCount.begin() ; iter != _objectCount.end() ; ++iter) { + Double_t tot= 1.0*(iter->first->Size()*iter->second)/(1024*1024) ; + cout << " class " << iter->first->GetName() << " count = " << iter->second << " sizeof = " << iter->first->Size() << " total memory = " << Form("%5.1f",tot) << " Mb" << endl ; + total+=tot ; + } + + for (map::iterator iter = _specialCount.begin() ; iter != _specialCount.end() ; ++iter) { + int size = _specialSize[iter->first] ; + Double_t tot=1.0*(size*iter->second)/(1024*1024) ; + cout << " special " << iter->first << " count = " << iter->second << " sizeof = " << size << " total memory = " << Form("%5.1f",tot) << " Mb" << endl ; + total+=tot ; + } + cout << "grand total memory = " << total << endl ; + +} + + //_____________________________________________________________________________ void RooTrace::callgrind_zero() { From dc668b1dd36369053a38273dc3d26c05417ebebc Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 29 Nov 2013 16:43:13 +0100 Subject: [PATCH 68/85] - Added new variables CMAKE_INSTALL_<...>DIR to allow full configurability of installations. It addresses ROOT5753 - Renamed option 'sysinstall' to gnuinstall' to force installation following the GNU style. - Additional cleanup of unneeded files. --- CMakeLists.txt | 22 +- cint/ROOT/CMakeLists.txt | 14 +- cint/cint/CMakeLists.txt | 8 +- cint/reflex/CMakeLists.txt | 8 +- cint/reflex/python/CMakeLists.txt | 4 +- cmake/modules/CheckCompiler.cmake | 2 +- cmake/modules/FindROOTInternal.cmake | 298 ---- cmake/modules/PostInstalledSoftware.cmake | 2 +- cmake/modules/RootBuildOptions.cmake | 45 +- cmake/modules/RootConfiguration.cmake | 72 +- cmake/modules/RootInstallDirs.cmake | 212 +++ cmake/modules/RootNewMacros.cmake | 52 +- cmake/modules/SearchInstalledSoftware.cmake | 2 +- cmake/modules/SetUpWindows.cmake | 4 +- cmake/scripts/CMakeLists.template | 69 - cmake/scripts/Makefile-comp.in | 10 - cmake/scripts/RConfigOptions.in | 7 - cmake/scripts/RConfigure.in | 26 - cmake/scripts/configcint.h | 48 - cmake/scripts/configcint.in | 92 -- cmake/scripts/configcint.mk | 100 -- cmake/scripts/genreflex-rootcint.in | 3 - cmake/scripts/genreflex.final.in | 3 - cmake/scripts/genreflex.in | 3 - cmake/scripts/memprobe.in | 309 ---- cmake/scripts/root-config.in | 824 ---------- cmake/scripts/rootrc.in | 514 ------ cmake/scripts/testsingle.cxx.in | 1553 ------------------- cmake/scripts/thisroot.sh | 67 - core/lzma/CMakeLists.txt | 2 +- core/zip/CMakeLists.txt | 2 +- graf2d/asimage/BuildAfterImage.cmake | 2 +- graf2d/freetype/CMakeLists.txt | 2 +- graf2d/win32gdk/CMakeLists.txt | 2 +- roofit/histfactory/CMakeLists.txt | 2 +- roofit/roostats/CMakeLists.txt | 2 +- rootx/CMakeLists.txt | 2 +- tmva/CMakeLists.txt | 4 +- 38 files changed, 332 insertions(+), 4061 deletions(-) delete mode 100644 cmake/modules/FindROOTInternal.cmake create mode 100644 cmake/modules/RootInstallDirs.cmake delete mode 100644 cmake/scripts/CMakeLists.template delete mode 100644 cmake/scripts/Makefile-comp.in delete mode 100644 cmake/scripts/RConfigOptions.in delete mode 100644 cmake/scripts/RConfigure.in delete mode 100644 cmake/scripts/configcint.h delete mode 100644 cmake/scripts/configcint.in delete mode 100644 cmake/scripts/configcint.mk delete mode 100644 cmake/scripts/genreflex-rootcint.in delete mode 100644 cmake/scripts/genreflex.final.in delete mode 100644 cmake/scripts/genreflex.in delete mode 100644 cmake/scripts/memprobe.in delete mode 100644 cmake/scripts/root-config.in delete mode 100644 cmake/scripts/rootrc.in delete mode 100644 cmake/scripts/testsingle.cxx.in delete mode 100755 cmake/scripts/thisroot.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 87a51dc19d9b5..d81cb5be9944d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,20 +78,20 @@ include(RootConfiguration) #---Installation of project-wise artifacts------------------------------------------------------- if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) - install(FILES LICENSE DESTINATION ${DOC_INSTALL_DIR}) - install(DIRECTORY README/ DESTINATION ${DOC_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(DIRECTORY etc/ DESTINATION ${ETC_INSTALL_DIR} USE_SOURCE_PERMISSIONS + install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(DIRECTORY README/ DESTINATION ${CMAKE_INSTALL_DOCDIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY etc/ DESTINATION ${CMAKE_INSTALL_ETCDIR} USE_SOURCE_PERMISSIONS PATTERN ".svn" EXCLUDE REGEX system.rootrc EXCLUDE REGEX root.mimes EXCLUDE) - install(DIRECTORY fonts/ DESTINATION ${FONT_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(DIRECTORY icons/ DESTINATION ${ICON_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(DIRECTORY macros/ DESTINATION ${MACRO_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(DIRECTORY man/ DESTINATION ${MAN_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(DIRECTORY test/ DESTINATION ${TEST_INSTALL_DIR} COMPONENT tests PATTERN ".svn" EXCLUDE) - install(DIRECTORY tutorials/ DESTINATION ${TUT_INSTALL_DIR} COMPONENT tests PATTERN ".svn" EXCLUDE) - install(DIRECTORY cmake/modules DESTINATION ${CMAKE_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - install(FILES build/misc/root.m4 DESTINATION ${ACLOCAL_INSTALL_DIR}) + install(DIRECTORY fonts/ DESTINATION ${CMAKE_INSTALL_FONTDIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY icons/ DESTINATION ${CMAKE_INSTALL_ICONDIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY macros/ DESTINATION ${CMAKE_INSTALL_MACRODIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY man/ DESTINATION ${CMAKE_INSTALL_MANDIR} PATTERN ".svn" EXCLUDE) + install(DIRECTORY test/ DESTINATION ${CMAKE_INSTALL_TESTDIR} COMPONENT tests PATTERN ".svn" EXCLUDE) + install(DIRECTORY tutorials/ DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests PATTERN ".svn" EXCLUDE) + install(DIRECTORY cmake/modules DESTINATION ${CMAKE_INSTALL_CMAKEDIR} PATTERN ".svn" EXCLUDE) + install(FILES build/misc/root.m4 DESTINATION ${CMAKE_INSTALL_ACLOCALDIR}) endif() #---Configure Testing using CTest---------------------------------------------------------------- diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt index 1a5ed1e70ac21..2519c6fc4c060 100644 --- a/cint/ROOT/CMakeLists.txt +++ b/cint/ROOT/CMakeLists.txt @@ -139,9 +139,9 @@ foreach(_name ${CINTSTLDLLNAMES}) add_Library(${_name}Dict SHARED ${Dictionary}.cxx ) set_Target_properties(${_name}Dict PROPERTIES PREFIX ${libprefix} SUFFIX ${libsuffix} FOLDER Dictionaries) - install(TARGETS ${_name}Dict RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + install(TARGETS ${_name}Dict RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(explicitlink) target_link_libraries(${_name}Dict Cint Core) @@ -160,7 +160,7 @@ foreach(_name ${CINTSTLDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/stl) + install(TARGETS ${_name} DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint/stl) endforeach() @@ -185,7 +185,7 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint ${CMAKE_M_LIBS}) endif() - install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) + install(TARGETS ${_name} DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint/include) elseif(_name MATCHES ipc) add_custom_command(OUTPUT ${OutFileName} @@ -203,7 +203,7 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) + install(TARGETS ${_name} DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint/include) elseif(_name MATCHES posix) @@ -243,6 +243,6 @@ foreach(_name ${CINTINCDLLNAMES}) if(explicitlink) target_link_libraries(${_name} Cint) endif() - install(TARGETS ${_name} DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) + install(TARGETS ${_name} DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint/include) endif() endforeach() diff --git a/cint/cint/CMakeLists.txt b/cint/cint/CMakeLists.txt index 7a79dfaf86586..38787d1fa097b 100644 --- a/cint/cint/CMakeLists.txt +++ b/cint/cint/CMakeLists.txt @@ -90,7 +90,7 @@ add_custom_target(IOSENUM_H COMMAND cmake -E copy ${CMAKE_CURRENT_BINARY_DIR}/iosenum.h ${HEADER_OUTPUT_PATH}/iosenum.h DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/iosenum.h ) -install(FILES ${HEADER_OUTPUT_PATH}/iosenum.h DESTINATION ${CINTINC_INSTALL_DIR}/cint/include) +install(FILES ${HEADER_OUTPUT_PATH}/iosenum.h DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint/include) set_target_properties(IOSENUM_H PROPERTIES FOLDER Builtins) #---special compile settings------------------------------------------------------------------------------ @@ -153,9 +153,9 @@ ROOT_EXECUTABLE(makecint ${CMAKE_SOURCE_DIR}/cint/tool/makecint.cxx LIBRARIES ${ #---Installation-------------------------------------------------------------------------------------------- ROOT_INSTALL_HEADERS() if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) - install(DIRECTORY lib DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) - install(DIRECTORY include DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) - install(DIRECTORY stl DESTINATION ${CINTINC_INSTALL_DIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY lib DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY include DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) + install(DIRECTORY stl DESTINATION ${CMAKE_INSTALL_CINTINCDIR}/cint PATTERN ".dll" EXCLUDE PATTERN ".svn" EXCLUDE) endif() diff --git a/cint/reflex/CMakeLists.txt b/cint/reflex/CMakeLists.txt index bf7cdabcf6e0b..0cda3a0af070b 100644 --- a/cint/reflex/CMakeLists.txt +++ b/cint/reflex/CMakeLists.txt @@ -20,14 +20,14 @@ if(CMAKE_PROJECT_NAME STREQUAL ROOT) #---Reflex library--------------------------------------------------------- ROOT_LINKER_LIBRARY(Reflex *.cxx LIBRARIES ${CMAKE_DL_LIBS}) #---genreflex files-------------------------------------------------------- - install(CODE "file(WRITE \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/python/genreflex/gccxmlpath.py \"gccxmlpath = '${GCCXML_EXECUTABLE}'\n\")") - install(DIRECTORY python/genreflex DESTINATION ${LIB_INSTALL_DIR}/python FILES_MATCHING PATTERN "*.py" PATTERN ".svn" EXCLUDE) - install(CODE "execute_process(COMMAND python -m compileall \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/python/genreflex)") + install(CODE "file(WRITE \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/python/genreflex/gccxmlpath.py \"gccxmlpath = '${GCCXML_EXECUTABLE}'\n\")") + install(DIRECTORY python/genreflex DESTINATION ${CMAKE_INSTALL_LIBDIR}/python FILES_MATCHING PATTERN "*.py" PATTERN ".svn" EXCLUDE) + install(CODE "execute_process(COMMAND python -m compileall \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/python/genreflex)") #---genmap executable------------------------------------------------------ ROOT_EXECUTABLE(genmap genmap/genmap.cxx LIBRARIES Reflex ${CMAKE_DL_LIBS}) #---install headers-------------------------------------------------------- #ROOT_INSTALL_HEADERS() - install(DIRECTORY inc/Reflex/ DESTINATION ${INCLUDE_INSTALL_DIR}/Reflex + install(DIRECTORY inc/Reflex/ DESTINATION ${CMAKE_INSTALL_INCDIR}/Reflex PATTERN ".svn" EXCLUDE PATTERN "Makefile.am" EXCLUDE REGEX "LinkDef" EXCLUDE ) diff --git a/cint/reflex/python/CMakeLists.txt b/cint/reflex/python/CMakeLists.txt index b1faf57ac42e9..97cd2062e6e86 100644 --- a/cint/reflex/python/CMakeLists.txt +++ b/cint/reflex/python/CMakeLists.txt @@ -67,10 +67,10 @@ ENDIF (WIN32) ##################### install #################### INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/genreflex - DESTINATION ${LIB_INSTALL_DIR}/python + DESTINATION ${CMAKE_INSTALL_LIBDIR}/python FILES_MATCHING PATTERN "*.py" PATTERN "gccxmlpath.py" EXCLUDE) INSTALL(PROGRAMS ${_genreflex_filename} - DESTINATION ${BIN_INSTALL_DIR}) + DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index ab5071ea479f4..e04a2cd69f5eb 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -76,7 +76,7 @@ endif() if(c++11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declaration") endif() -if(sysinstall) +if(gnuinstall) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DR__HAVE_CONFIG") endif() diff --git a/cmake/modules/FindROOTInternal.cmake b/cmake/modules/FindROOTInternal.cmake deleted file mode 100644 index b17cb64e6c40c..0000000000000 --- a/cmake/modules/FindROOTInternal.cmake +++ /dev/null @@ -1,298 +0,0 @@ -macro(check_value_ok _value) - # check _value (TRUE, ENABLE, 1 -> TRUE) - # (FALSE, DISABLE, 0 -> FALSE) - set (true_allowed TRUE ENABLE 1) - set (false_allowed FALSE DISABLE 0) - string(TOUPPER ${_value} _value_upper) - set (true_value FALSE) - set (false_value FALSE) - foreach(_true ${true_allowed}) - if (${_value_upper} MATCHES ${_true}) - set(true_value TRUE) - endif (${_value_upper} MATCHES ${_true}) - endforeach(_true ${true_allowed}) - foreach(_false ${false_allowed}) - if (${_value_upper} MATCHES ${_false}) - set(false_value TRUE) - endif (${_value_upper} MATCHES ${_false}) - endforeach(_false ${false_allowed}) - if (true_value OR false_value) - if (true_value AND false_value) - MESSAGE(FATAL_ERROR "check_value_ok: Value for option is true and false. This can never happen. If this error message is plotted something is wrong with the logic of the macro.") - endif(true_value AND false_value) - else (true_value OR false_value) - MESSAGE("check_value_ok: This value for options is not known.") - MESSAGE("check_value_ok: Allowed value for TRUE are TRUE, Enable or 1") - MESSAGE(FATAL_ERROR "check_value_ok: Allowed value for FALSE are FALSE, Disable or 0") - endif (true_value OR false_value) -endmacro(check_value_ok _value) - -macro(show_root_install_options) - foreach(_actual_option ${ROOT_INSTALL_OPTIONS}) - list(FIND ROOT_INSTALL_OPTIONS ${_actual_option} position) - list(GET ROOT_INSTALL_OPTIONS ${position} __option) - list(GET ROOT_INSTALL_OPTIONS_VALUE ${position} __value) - MESSAGE("${__option}": ${__value}) - endforeach(_actual_option ${ROOT_INSTALL_OPTIONS}) -endmacro(show_root_install_options) - -macro(is_root_install_option_enabled _option) - list(FIND ROOT_INSTALL_OPTIONS ${_option} position) - list(GET ROOT_INSTALL_OPTIONS_VALUE ${position} __value) - if(__value) - set (BLA option_${_option}_is_enabled) - set(${BLA} TRUE) - else(__value) - set (BLA option_${_option}_is_enabled) - set(${BLA} FALSE) - endif(__value) -endmacro(is_root_install_option_enabled _option) - -macro(get_enabled_root_install_options) - set(installed_options_list) - foreach(_actual_option ${ROOT_INSTALL_OPTIONS}) - list(FIND ROOT_INSTALL_OPTIONS ${_actual_option} position) - list(GET ROOT_INSTALL_OPTIONS ${position} __option) - list(GET ROOT_INSTALL_OPTIONS_VALUE ${position} __value) - if(${__value} MATCHES TRUE) - set(installed_options_list "${installed_options_list} ${__option}") - endif(${__value} MATCHES TRUE) - endforeach(_actual_option ${ROOT_INSTALL_OPTIONS}) - -endmacro(get_enabled_root_install_options) - - -macro(CHANGE_ROOT_INSTALL_OPTIONS _option _value) - # get position of option from array ROOT_INSTAL_OPTIONS - list(FIND ROOT_INSTALL_OPTIONS ${_option} position) - if (position EQUAL -1) - MESSAGE(FATAL_ERROR "CHANGE_ROOT_INSTALL_OPTIONS: The option ${_option} is not known. \n Possible options are ${ROOT_INSTALL_OPTIONS}") - endif (position EQUAL -1) - - #check if the value to be set is okay - check_value_ok(${_value}) - - #Now set the value _value for option _option - if (true_value) - list(INSERT ROOT_INSTALL_OPTIONS_VALUE ${position} TRUE) - math(EXPR rel_pos ${position}+1) - list(REMOVE_AT ROOT_INSTALL_OPTIONS_VALUE ${rel_pos}) - endif (true_value) - if (false_value) - list(INSERT ROOT_INSTALL_OPTIONS_VALUE ${position} FALSE) - math(EXPR rel_pos ${position}+1) - list(REMOVE_AT ROOT_INSTALL_OPTIONS_VALUE ${rel_pos}) - endif (false_value) - - #check if after the operation the length of ROOT_INSTALL_OPTIONS and ROOT_INSTALL_OPTIONS_VALUE - #is still the same - list(LENGTH ROOT_INSTALL_OPTIONS_VALUE length_value) - list(LENGTH ROOT_INSTALL_OPTIONS length_options) - if(NOT ${length_value} EQUAL ${length_options}) - MESSAGE(FATAL_ERROR "CHANGE_ROOT_INSTALL_OPTIONS: After changing the option the length of both arrays is different (${length_value} NEQ ${length_options}). Something is wrong with this operation") - endif(NOT ${length_value} EQUAL ${length_options}) - -endmacro(CHANGE_ROOT_INSTALL_OPTIONS _option _value) - - -# define all packages to be build. By default all of them are enabled at start. -# We switch them off later on during the process of configuration. - -set (ROOT_INSTALL_OPTIONS - afs - alien - asimage - astiff - builtin_afterimage - builtin_ftgl - builtin_freetype - builtin_pcre - builtin_zlib - castor - chirp - cint7 - cintex - clarens - dcache - exceptions - explicitlink - fftw3 - gdml - gfal - g4root - glite - globus - gsl_shared - krb5 - ldap - genvector - mathmore - memstat - monalisa - mysql - odbc - opengl - oracle - pch - peac - pgsql - pythia6 - pythia8 - python - qt - qtgsi - reflex - roofit - minuit2 - ruby - rfio - rpath - sapdb - shadowpw - shared - soversion - sqlite - srp - ssl - table - unuran - winrtdebug - xft - xml - xrootd -) - -set (ROOT_INSTALL_OPTIONS_VALUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE - TRUE -) - -CHANGE_ROOT_INSTALL_OPTIONS("afs" "enable") -CHANGE_ROOT_INSTALL_OPTIONS("afs" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("cint7" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("gdml" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("globus" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("explicitlink" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("pch" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("qt" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("qtgsi" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("roofit" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("minuit2" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("rpath" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("ruby" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("shadowpw" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("soversion" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("table" "disable") -list(APPEND ROOT_INSTALL_OPTIONS "thread") -list(APPEND ROOT_INSTALL_OPTIONS_VALUE "TRUE") -CHANGE_ROOT_INSTALL_OPTIONS("unuran" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("winrtdebug" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("xrootd" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("winrtdebug" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("builtin_freetype" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("builtin_ftgl" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("builtin_pcre" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("builtin_zlib" "disable") -CHANGE_ROOT_INSTALL_OPTIONS("mathmore" "disable") - -#show_root_install_options() - -#set all directories where to install parts of root -#up to now everything is installed according to the setting of -#CMAKE_INSTALL_DIR -#TODO: Make installation layout more flexible - -if(ROOT_INSTALL_DIR) - set(CMAKE_INSTALL_PREFIX ${ROOT_INSTALL_DIR}) - add_definitions(-DR__HAVE_CONFIG) -else(ROOT_INSTALL_DIR) - set(CMAKE_INSTALL_PREFIX ${ROOTSYS}) -endif(ROOT_INSTALL_DIR) - -set(ROOT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") -set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") -set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") -set(ETC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc") -set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") -set(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") -set(MACRO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/macros") -set(SRC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/src") -set(ICON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/icons") -set(FONT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/fonts") -set(CINT_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cint") - -# use, i.e. don't skip the full RPATH for the build tree -SET(CMAKE_SKIP_BUILD_RPATH FALSE) - -# when building, don't use the install RPATH already -# (but later on when installing) -SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - -# the RPATH to be used when installing -SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -#MESSAGE("RPATH: ${CMAKE_INSTALL_RPATH}") - -# add the automatically determined parts of the RPATH -# which point to directories outside the build tree to the install RPATH -SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - diff --git a/cmake/modules/PostInstalledSoftware.cmake b/cmake/modules/PostInstalledSoftware.cmake index 9fb2487b61243..bf551808946eb 100644 --- a/cmake/modules/PostInstalledSoftware.cmake +++ b/cmake/modules/PostInstalledSoftware.cmake @@ -4,7 +4,7 @@ if(builtin_gsl) add_dependencies(MathMore GSL) endif() ExternalProject_Get_Property(GSL install_dir) - install(DIRECTORY ${install_dir}/lib/ DESTINATION ${LIB_INSTALL_DIR} FILES_MATCHING PATTERN "libgsl*") + install(DIRECTORY ${install_dir}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} FILES_MATCHING PATTERN "libgsl*") endif() #---Post actions to use builtin CFITSIO------------------------------------------------ diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index fcf32b36eb761..4971024ebc90a 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -123,7 +123,7 @@ ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames (recommended)") ROOT_BUILD_OPTION(sqlite ON "SQLite support, requires libsqlite3") ROOT_BUILD_OPTION(srp ON "SRP support, requires SRP source tree") ROOT_BUILD_OPTION(ssl ON "SSL encryption support, requires openssl") -ROOT_BUILD_OPTION(sysinstall OFF "Perform installation as a system package") +ROOT_BUILD_OPTION(gnuinstall OFF "Perform installation following the GNU guidelines") ROOT_BUILD_OPTION(table OFF "Build libTable contrib library") ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library") ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers") @@ -159,7 +159,7 @@ include_regular_expression("^[^.]+$|[.]h$|[.]icc$|[.]hxx$|[.]hpp$") #---Set all directories where to install parts of root up to now everything is installed ------ #---according to the setting of CMAKE_INSTALL_DIR -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT sysinstall) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT gnuinstall) message(STATUS "Setting default installation prefix CMAKE_INSTALL_PREFIX to ${ROOTSYS}") set(CMAKE_INSTALL_PREFIX ${ROOTSYS} CACHE PATH "Default installation of ROOT" FORCE) endif() @@ -175,45 +175,8 @@ if(DEFINED CINTLONGLINE) add_definitions(-DG__LONGLINE=${CINTLONGLINE}) endif() -if(sysinstall) - set(ROOT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) - set(BIN_INSTALL_DIR bin) - set(LIB_INSTALL_DIR lib/root) - set(INCLUDE_INSTALL_DIR include/root) - set(ETC_INSTALL_DIR /etc/root) - set(MAN_INSTALL_DIR share/man) - set(DATA_INSTALL_DIR share/root) - set(MACRO_INSTALL_DIR ${DATA_INSTALL_DIR}/macros) - set(CINTINC_INSTALL_DIR ${LIB_INSTALL_DIR}/cint) - set(ICON_INSTALL_DIR ${DATA_INSTALL_DIR}/icons) - set(SRC_INSTALL_DIR ${DATA_INSTALL_DIR}/src) - set(FONT_INSTALL_DIR ${DATA_INSTALL_DIR}/fonts) - set(DOC_INSTALL_DIR share/doc/root) - set(TEST_INSTALL_DIR ${DOC_INSTALL_DIR}/test) - set(TUT_INSTALL_DIR ${DOC_INSTALL_DIR}/tutorials) - set(ACLOCAL_INSTALL_DIR share/aclocal) - set(ELISP_INSTALL_DIR share/emacs/site-lisp) - set(CMAKE_INSTALL_DIR ${DATA_INSTALL_DIR}/cmake) -else() - set(ROOT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) - set(BIN_INSTALL_DIR bin) - set(LIB_INSTALL_DIR lib) - set(INCLUDE_INSTALL_DIR include) - set(ETC_INSTALL_DIR etc) - set(MAN_INSTALL_DIR man) - set(DATA_INSTALL_DIR .) - set(MACRO_INSTALL_DIR macros) - set(CINTINC_INSTALL_DIR cint) - set(ICON_INSTALL_DIR icons) - set(SRC_INSTALL_DIR src) - set(FONT_INSTALL_DIR fonts) - set(DOC_INSTALL_DIR .) - set(TEST_INSTALL_DIR test) - set(TUT_INSTALL_DIR tutorials) - set(ACLOCAL_INSTALL_DIR build/misc) - set(ELISP_INSTALL_DIR build/misc) - set(CMAKE_INSTALL_DIR cmake) -endif() +#---Add Installation Variables------------------------------------------------------------------ +include(RootInstallDirs) diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake index eed4e26a70aa3..c5b92114e422c 100644 --- a/cmake/modules/RootConfiguration.cmake +++ b/cmake/modules/RootConfiguration.cmake @@ -24,29 +24,45 @@ set(winrtdebug ${value${winrtdebug}}) set(exceptions ${value${exceptions}}) set(explicitlink ${value${explicitlink}}) -if(sysinstall) - set(prefix ${ROOT_INSTALL_DIR}) - set(etcdir ${ETC_INSTALL_DIR}) +if(gnuinstall) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(etcdir ${CMAKE_INSTALL_FULL_ETCDIR}) + set(bindir ${CMAKE_INSTALL_FULL_BINDIR}) + set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) + set(incdir ${CMAKE_INSTALL_FULL_INCDIR}) + set(mandir ${CMAKE_INSTALL_FULL_MANDIR}) + set(plugindir ${CMAKE_INSTALL_FULL_ETCDIR}/plugins) + set(datadir ${CMAKE_INSTALL_FULL_DATADIR}) + set(elispdir ${CMAKE_INSTALL_FULL_ELISPDIR}) + set(ttffontdir ${CMAKE_INSTALL_FULL_FONTDIR}) + set(macrodir ${CMAKE_INSTALL_FULL_MACRODIR}) + set(srcdir ${CMAKE_INSTALL_FULL_SRCDIR}) + set(iconpath ${CMAKE_INSTALL_FULL_ICONDIR}) + set(cintincdir ${CMAKE_INSTALL_FULL_CINTINCDIR}) + set(docdir ${CMAKE_INSTALL_FULL_DOCDIR}) + set(testdir ${CMAKE_INSTALL_FULL_TESTDIR}) + set(tutdir ${CMAKE_INSTALL_FULL_TUTDIR}) + set(aclocaldir ${CMAKE_INSTALL_FULL_ACLOCALDIR}) else() set(prefix $(ROOTSYS)) - set(etcdir ${prefix}/${ETC_INSTALL_DIR}) + set(etcdir ${prefix}/${CMAKE_INSTALL_ETCDIR}) + set(bindir ${prefix}/${CMAKE_INSTALL_BINDIR}) + set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) + set(incdir ${prefix}/${CMAKE_INSTALL_INCDIR}) + set(mandir ${prefix}/${CMAKE_INSTALL_MANDIR}) + set(plugindir ${prefix}/${CMAKE_INSTALL_ETCDIR}/plugins) + set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR}) + set(elispdir ${prefix}/${CMAKE_INSTALL_ELISPDIR}) + set(ttffontdir ${prefix}/${CMAKE_INSTALL_FONTDIR}) + set(macrodir ${prefix}/${CMAKE_INSTALL_MACRODIR}) + set(srcdir ${prefix}/${CMAKE_INSTALL_SRCDIR}) + set(iconpath ${prefix}/${CMAKE_INSTALL_ICONDIR}) + set(cintincdir ${prefix}/${CMAKE_INSTALL_CINTINCDIR}) + set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR}) + set(testdir ${prefix}/${CMAKE_INSTALL_TESTDIR}) + set(tutdir ${prefix}/${CMAKE_INSTALL_TUTDIR}) + set(aclocaldir ${prefix}/${CMAKE_INSTALL_ACLOCALDIR}) endif() -set(bindir ${prefix}/${BIN_INSTALL_DIR}) -set(libdir ${prefix}/${LIB_INSTALL_DIR}) -set(incdir ${prefix}/${INCLUDE_INSTALL_DIR}) -set(mandir ${prefix}/${MAN_INSTALL_DIR}) -set(plugindir ${etcdir}/plugins) -set(datadir ${prefix}/${DATA_INSTALL_DIR}) -set(elispdir ${prefix}/${ELISP_INSTALL_DIR}) -set(ttffontdir ${prefix}/${FONT_INSTALL_DIR}) -set(macrodir ${prefix}/${MACRO_INSTALL_DIR}) -set(srcdir ${prefix}/${SRC_INSTALL_DIR}) -set(iconpath ${prefix}/${ICON_INSTALL_DIR}) -set(cintincdir ${prefix}/${CINTINC_INSTALL_DIR}) -set(docdir ${prefix}/${DOC_INSTALL_DIR}) -set(testdir ${prefix}/${TEST_INSTALL_DIR}) -set(tutdir ${prefix}/${TUT_INSTALL_DIR}) -set(aclocaldir ${prefix}/${ACLOCAL_INSTALL_DIR}) set(LibSuffix ${SOEXT}) @@ -361,11 +377,11 @@ set(pythonvers ${PYTHON_VERSION}) include(WriteConfigCint) WRITE_CONFIG_CINT( ${CMAKE_CURRENT_BINARY_DIR}/tmp/configcint.h) execute_process(COMMAND cmake -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/tmp/configcint.h ${HEADER_OUTPUT_PATH}/configcint.h) -#install(FILES ${HEADER_OUTPUT_PATH}/configcint.h DESTINATION ${INCLUDE_INSTALL_DIR}) +#install(FILES ${HEADER_OUTPUT_PATH}/configcint.h DESTINATION ${CMAKE_INSTALL_INCDIR}) #---RConfigure.h--------------------------------------------------------------------------------------------- configure_file(${PROJECT_SOURCE_DIR}/config/RConfigure.in include/RConfigure.h) -install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION ${INCLUDE_INSTALL_DIR}) +install(FILES ${CMAKE_BINARY_DIR}/include/RConfigure.h DESTINATION ${CMAKE_INSTALL_INCDIR}) #---Configure and install various files---------------------------------------------------------------------- execute_Process(COMMAND hostname OUTPUT_VARIABLE BuildNodeInfo OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -420,8 +436,8 @@ configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/ROOTConfig.cmake.in ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake @ONLY) install(FILES ${CMAKE_BINARY_DIR}/ROOTConfig-version.cmake ${CMAKE_BINARY_DIR}/ROOTUseFile.cmake - ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake DESTINATION ${CMAKE_INSTALL_DIR}) -install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTINATION ${CMAKE_INSTALL_DIR}) + ${CMAKE_BINARY_DIR}/installtree/ROOTConfig.cmake DESTINATION ${CMAKE_INSTALL_CMAKEDIR}) +install(EXPORT ${CMAKE_PROJECT_NAME}Exports FILE ROOTConfig-targets.cmake DESTINATION ${CMAKE_INSTALL_CMAKEDIR}) #---Especial definitions for root-config et al.-------------------------------------------------------------- @@ -465,17 +481,17 @@ install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/genreflex PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ - DESTINATION ${BIN_INSTALL_DIR}) + DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${CMAKE_BINARY_DIR}/include/RConfigOptions.h ${CMAKE_BINARY_DIR}/include/compiledata.h - DESTINATION ${INCLUDE_INSTALL_DIR}) + DESTINATION ${CMAKE_INSTALL_INCDIR}) install(FILES ${CMAKE_BINARY_DIR}/etc/root.mimes ${CMAKE_BINARY_DIR}/etc/system.rootrc - DESTINATION ${ETC_INSTALL_DIR}) + DESTINATION ${CMAKE_INSTALL_ETCDIR}) -install(FILES ${CMAKE_BINARY_DIR}/root-help.el DESTINATION ${ELISP_INSTALL_DIR}) +install(FILES ${CMAKE_BINARY_DIR}/root-help.el DESTINATION ${CMAKE_INSTALL_ELISPDIR}) endfunction() RootConfigure() diff --git a/cmake/modules/RootInstallDirs.cmake b/cmake/modules/RootInstallDirs.cmake new file mode 100644 index 0000000000000..cbc181acc57be --- /dev/null +++ b/cmake/modules/RootInstallDirs.cmake @@ -0,0 +1,212 @@ +# - Define GNU standard installation directories +# Provides install directory variables as defined for GNU software: +# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html +# Inclusion of this module defines the following variables: +# CMAKE_INSTALL_

- destination for files of a given type +# CMAKE_INSTALL_FULL_ - corresponding absolute path +# where is one of: +# BINDIR - user executables (bin) +# LIBDIR - object code libraries (lib or lib64 or lib/ on Debian) +# INCDIR - C/C++ header files (include) +# ETCDIR - read-only single-machine data (etc) +# DATAROOTDIR - read-only architecture-independent data (share/root) +# DATADIR - read-only architecture-independent data (DATAROOTDIR) +# MANDIR - man documentation (DATAROOTDIR/man) +# MACRODIR - ROOT macros (DATAROOTDIR/macros) +# CINTINCDIR - CINT include files (LIBDIR/macros) +# ICONDIR - icons (DATAROOTDIR/icons) +# SRCDIR - sources (DATAROOTDIR/src) +# FONTDIR - fonts (DATAROOTDIR/fonts) +# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) +# TESTDIR - tests (DOCDIR/test) +# TUTDIR - tutorials (DOCDIR/tutorials) +# ACLOCALDIR - locale-dependent data (DATAROOTDIR/aclocal) +# CMAKEDIR - cmake modules (DATAROOTDIR/cmake) +# ELISPDIR - lisp files (DATAROOTDIR/emacs/site-lisp) +# +# Each CMAKE_INSTALL_ value may be passed to the DESTINATION options of +# install() commands for the corresponding file type. If the includer does +# not define a value the above-shown default will be used and the value will +# appear in the cache for editing by the user. +# Each CMAKE_INSTALL_FULL_ value contains an absolute path constructed +# from the corresponding destination by prepending (if necessary) the value +# of CMAKE_INSTALL_PREFIX. + +#============================================================================= +# Copyright 2011 Nikita Krupen'ko +# Copyright 2011 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if(NOT DEFINED CMAKE_INSTALL_BINDIR) + set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") +endif() + +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + if(gnuinstall) + set(CMAKE_INSTALL_LIBDIR "lib/root" CACHE PATH "object code libraries (lib/root)") + else() + set(CMAKE_INSTALL_LIBDIR "lib" CACHE PATH "object code libraries (lib)") + endif() +endif() + +if(NOT DEFINED CMAKE_INSTALL_CINTINCDIR) + if(gnuinstall) + set(CMAKE_INSTALL_CINTINCDIR "lib/root/cint" CACHE PATH "cint includes and libraries libraries (cint)") + else() + set(CMAKE_INSTALL_CINTINCDIR "cint" CACHE PATH "cint includes and libraries libraries (cint)") + endif() +endif() + +if(NOT DEFINED CMAKE_INSTALL_INCDIR) + if(gnuinstall) + set(CMAKE_INSTALL_INCDIR "include/root" CACHE PATH "C header files (include)") + else() + set(CMAKE_INSTALL_INCDIR "include" CACHE PATH "C header files (include)") + endif() +endif() + +if(NOT DEFINED CMAKE_INSTALL_ETCDIR) + if(gnuinstall) + set(CMAKE_INSTALL_ETCDIR "/etc/root" CACHE PATH "read-only single-machine data (etc)") + else() + set(CMAKE_INSTALL_ETCDIR "etc" CACHE PATH "read-only single-machine data (etc)") + endif() +endif() + +if(gnuinstall) + set(__dataroot__ share/root/) + set(__share__ share/) +endif() + +#----------------------------------------------------------------------------- +# Values whose defaults are relative to DATAROOTDIR. Store empty values in +# the cache and store the defaults in local variables if the cache values are +# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes. + +if(NOT CMAKE_INSTALL_DATADIR) + set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)") + if(gnuinstall) + set(CMAKE_INSTALL_DATADIR "${__share__}root") + else() + set(CMAKE_INSTALL_DATADIR ".") + endif() +endif() + +if(NOT CMAKE_INSTALL_MANDIR) + set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") + set(CMAKE_INSTALL_MANDIR "${__share__}man") +endif() + +if(NOT CMAKE_INSTALL_MACRODIR) + set(CMAKE_INSTALL_MACRODIR "" CACHE PATH "macros documentation (DATAROOTDIR/macros)") + set(CMAKE_INSTALL_MACRODIR "${__dataroot__}macros") +endif() + +if(NOT CMAKE_INSTALL_ICONDIR) + set(CMAKE_INSTALL_ICONDIR "" CACHE PATH "icons (DATAROOTDIR/icons)") + set(CMAKE_INSTALL_ICONDIR "${__dataroot__}icons") +endif() + +if(NOT CMAKE_INSTALL_FONTDIR) + set(CMAKE_INSTALL_FONTDIR "" CACHE PATH "fonts (DATAROOTDIR/fonts)") + set(CMAKE_INSTALL_FONTDIR "${__dataroot__}fonts") +endif() + +if(NOT CMAKE_INSTALL_SRCDIR) + set(CMAKE_INSTALL_SRCDIR "" CACHE PATH "sources (DATAROOTDIR/src)") + set(CMAKE_INSTALL_SRCDIR "${__dataroot__}src") +endif() + +if(NOT CMAKE_INSTALL_ACLOCALDIR) + set(CMAKE_INSTALL_ACLOCALDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/aclocal)") + set(CMAKE_INSTALL_ACLOCALDIR "${__share__}aclocal") +endif() + +if(NOT CMAKE_INSTALL_CMAKEDIR) + set(CMAKE_INSTALL_CMAKEDIR "" CACHE PATH "CMake modules (DATAROOTDIR/cmake)") + set(CMAKE_INSTALL_CMAKEDIR "${__dataroot__}cmake") +endif() + +if(NOT CMAKE_INSTALL_ELISPDIR) + set(CMAKE_INSTALL_ELISPDIR "" CACHE PATH "Lisp files (DATAROOTDIR/emacs/site-lisp)") + set(CMAKE_INSTALL_ELISPDIR "${__share__}emacs/site-lisp") +endif() + +if(NOT CMAKE_INSTALL_DOCDIR) + set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") + if(gnuinstall) + set(CMAKE_INSTALL_DOCDIR "${__share__}doc/root") + else() + set(CMAKE_INSTALL_DOCDIR ".") + endif() +endif() + +if(NOT CMAKE_INSTALL_TESTDIR) + set(CMAKE_INSTALL_TESTDIR "" CACHE PATH "root tests (DOCDIR/test)") + set(CMAKE_INSTALL_TESTDIR "${CMAKE_INSTALL_DOCDIR}/test") +endif() + +if(NOT CMAKE_INSTALL_TUTDIR) + set(CMAKE_INSTALL_TUTDIR "" CACHE PATH "root tutorials (DOCDIR/tutorials)") + set(CMAKE_INSTALL_TUTDIR "${CMAKE_INSTALL_DOCDIR}/tutorials") +endif() + + +#----------------------------------------------------------------------------- + +mark_as_advanced( + CMAKE_INSTALL_BINDIR + CMAKE_INSTALL_LIBDIR + CMAKE_INSTALL_INCDIR + CMAKE_INSTALL_ETCDIR + CMAKE_INSTALL_MANDIR + CMAKE_INSTALL_DATAROOTDIR + CMAKE_INSTALL_DATADIR + CMAKE_INSTALL_MACRODIR + CMAKE_INSTALL_CINTINCDIR + CMAKE_INSTALL_ICONDIR + CMAKE_INSTALL_FONTDIR + CMAKE_INSTALL_SRCDIR + CMAKE_INSTALL_DOCDIR + CMAKE_INSTALL_TESTDIR + CMAKE_INSTALL_TUTDIR + CMAKE_INSTALL_ACLOCALDIR + CMAKE_INSTALL_ELISPDIR + CMAKE_INSTALL_CMAKEDIR + ) + +# Result directories +# +foreach(dir BINDIR + LIBDIR + INCDIR + ETCDIR + MANDIR + DATAROOTDIR + DATADIR + MACRODIR + CINTINCDIR + ICONDIR + FONTDIR + SRCDIR + DOCDIR + TESTDIR + TUTDIR + ACLOCALDIR + ELISPDIR + CMAKEDIR ) + if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}}) + set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") + else() + set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") + endif() +endforeach() diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index ee454dcdcd420..5bb62a5833a15 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -16,21 +16,21 @@ if(WIN32) set(libprefix lib) set(ld_library_path PATH) set(libsuffix .dll) - set(runtimedir ${BIN_INSTALL_DIR}) + set(runtimedir ${CMAKE_INSTALL_BINDIR}) elseif(APPLE) set(ld_library_path DYLD_LIBRARY_PATH) set(ssuffix .csh) set(scomment \#) set(libprefix lib) set(libsuffix .so) - set(runtimedir ${LIB_INSTALL_DIR}) + set(runtimedir ${CMAKE_INSTALL_LIBDIR}) else() set(ld_library_path LD_LIBRARY_PATH) set(ssuffix .csh) set(scomment \#) set(libprefix lib) set(libsuffix .so) - set(runtimedir ${LIB_INSTALL_DIR}) + set(runtimedir ${CMAKE_INSTALL_LIBDIR}) endif() if(soversion) @@ -47,9 +47,15 @@ else() endif() if(APPLE) - set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} - INSTALL_NAME_DIR "@rpath" - BUILD_WITH_INSTALL_RPATH ON) + if(gnuinstall) + set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} + INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" + BUILD_WITH_INSTALL_RPATH ON) + else() + set(ROOT_LIBRARY_PROPERTIES ${ROOT_LIBRARY_PROPERTIES} + INSTALL_NAME_DIR "@rpath" + BUILD_WITH_INSTALL_RPATH ON) + endif() endif() #---Modify the behaviour for local and non-local builds-------------------------------------------- @@ -321,31 +327,31 @@ function(ROOT_LINKER_LIBRARY library) set_target_properties(${library} PROPERTIES LINK_INTERFACE_LIBRARIES "${ARG_DEPENDENCIES}") #----Installation details------------------------------------------------------- if(ARG_CMAKENOEXPORT) - install(TARGETS ${library} RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + install(TARGETS ${library} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) else() install(TARGETS ${library} EXPORT ${CMAKE_PROJECT_NAME}Exports - RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) endif() if(WIN32 AND ARG_TYPE STREQUAL SHARED) if(CMAKE_GENERATOR MATCHES "Visual Studio") install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/lib${library}.pdb CONFIGURATIONS Debug - DESTINATION ${BIN_INSTALL_DIR} + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries) install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/lib${library}.pdb CONFIGURATIONS RelWithDebInfo - DESTINATION ${BIN_INSTALL_DIR} + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries) else() install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/lib${library}.pdb CONFIGURATIONS Debug RelWithDebInfo - DESTINATION ${BIN_INSTALL_DIR} + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries) endif() endif() @@ -362,9 +368,9 @@ function(ROOT_MODULE_LIBRARY library) set_target_properties(${library} PROPERTIES ${ROOT_LIBRARY_PROPERTIES}) target_link_libraries(${library} ${ARG_LIBRARIES}) #----Installation details------------------------------------------------------- - install(TARGETS ${library} RUNTIME DESTINATION ${BIN_INSTALL_DIR} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + install(TARGETS ${library} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) endfunction() @@ -436,7 +442,7 @@ function(ROOT_GENERATE_ROOTMAP library) add_custom_target( ${libprefix}${library}.rootmap ALL DEPENDS ${outfile}) set_target_properties(${libprefix}${library}.rootmap PROPERTIES FOLDER RootMaps ) #---Install the rootmap file------------------------------------ - install(FILES ${outfile} DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries) + install(FILES ${outfile} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) endfunction() #--------------------------------------------------------------------------------------------------- @@ -449,7 +455,7 @@ function(ROOT_INSTALL_HEADERS) set(dirs inc/) endif() foreach(d ${dirs}) - install(DIRECTORY ${d} DESTINATION ${INCLUDE_INSTALL_DIR} + install(DIRECTORY ${d} DESTINATION ${CMAKE_INSTALL_INCDIR} COMPONENT headers PATTERN ".svn" EXCLUDE PATTERN "X11" EXCLUDE @@ -491,9 +497,9 @@ function(ROOT_EXECUTABLE executable) #----Installation details------------------------------------------------------ if(NOT ARG_NOINSTALL) if(ARG_CMAKENOEXPORT) - install(TARGETS ${executable} RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) + install(TARGETS ${executable} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications) else() - install(TARGETS ${executable} EXPORT ${CMAKE_PROJECT_NAME}Exports RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) + install(TARGETS ${executable} EXPORT ${CMAKE_PROJECT_NAME}Exports RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications) endif() endif() endfunction() @@ -507,7 +513,7 @@ function(REFLEX_BUILD_DICTIONARY dictionary headerfiles selectionfile ) add_library(${dictionary}Dict MODULE ${gensrcdict}) target_link_libraries(${dictionary}Dict ${ARG_LIBRARIES} ${ROOT_Reflex_LIBRARY}) #----Installation details------------------------------------------------------- - install(TARGETS ${dictionary}Dict LIBRARY DESTINATION ${LIB_INSTALL_DIR}) + install(TARGETS ${dictionary}Dict LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) set(mergedRootMap ${CMAKE_INSTALL_PREFIX}/${lib}/${CMAKE_PROJECT_NAME}Dict.rootmap) set(srcRootMap ${CMAKE_CURRENT_BINARY_DIR}/${rootmapname}) install(CODE "EXECUTE_PROCESS(COMMAND ${merge_rootmap_cmd} --do-merge --input-file ${srcRootMap} --merged-file ${mergedRootMap})") diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index ce7aaa41a0e2d..b7b1ab9b42bdf 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -77,7 +77,7 @@ if(builtin_lzma) CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND cmake -E copy lib/liblzma.dll /bin/${CMAKE_CFG_INTDIR} BUILD_IN_SOURCE 1) - install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION ${BIN_INSTALL_DIR}) + install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION ${CMAKE_INSTALL_BINDIR}) set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib) set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include) else() diff --git a/cmake/modules/SetUpWindows.cmake b/cmake/modules/SetUpWindows.cmake index 683caef68eb8b..4b5d3968528e9 100644 --- a/cmake/modules/SetUpWindows.cmake +++ b/cmake/modules/SetUpWindows.cmake @@ -31,8 +31,8 @@ endif() if(CMAKE_PROJECT_NAME STREQUAL ROOT) set(CMAKE_CXX_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -D_WIN32") set(CMAKE_C_FLAGS "-nologo -I${CMAKE_SOURCE_DIR}/build/win -FIw32pragma.h -FIsehmap.h ${BLDCFLAGS} -EHsc- -W3 -D_WIN32") - install(FILES ${CMAKE_SOURCE_DIR}/build/win/w32pragma.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT headers) - install(FILES ${CMAKE_SOURCE_DIR}/build/win/sehmap.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT headers) + install(FILES ${CMAKE_SOURCE_DIR}/build/win/w32pragma.h DESTINATION ${CMAKE_INSTALL_INCDIR} COMPONENT headers) + install(FILES ${CMAKE_SOURCE_DIR}/build/win/sehmap.h DESTINATION ${CMAKE_INSTALL_INCDIR} COMPONENT headers) else() set(CMAKE_CXX_FLAGS "-nologo -FIw32pragma.h -FIsehmap.h ${BLDCXXFLAGS} -EHsc- -W3 -wd4244 -D_WIN32") set(CMAKE_C_FLAGS "-nologo -FIw32pragma.h -FIsehmap.h ${BLDCFLAGS} -EHsc- -W3 -D_WIN32") diff --git a/cmake/scripts/CMakeLists.template b/cmake/scripts/CMakeLists.template deleted file mode 100644 index 5b56c3f9c557e..0000000000000 --- a/cmake/scripts/CMakeLists.template +++ /dev/null @@ -1,69 +0,0 @@ -# Build ${libname} -# Define all header and source files which are needed -# to build the MathCore library - -Set(libname ) - -# Find all headers except the LinkDef file and copy -# them to the include subdirectory of the build directory -File(GLOB ${libname}Headers "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h" - ) -List(REMOVE_ITEM ${libname}Headers - "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/inc/LinkDef.h" - ) - -INSTALL_HEADERS("${libname}Headers") - -# Find all source files -File(GLOB ${libname}Source "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cxx" - ) -List(REMOVE_ITEM ${libname}Source - "${CMAKE_CURRENT_SOURCE_DIR}" - ) - -# Define the LinkDef and the output file which are needed -# to create the dictionary. -# Definde the needed include directories and create the Dictionary -Set(LinkDef ${CMAKE_CURRENT_SOURCE_DIR}/inc/LinkDef.h) -Set(Dictionary ${CMAKE_CURRENT_BINARY_DIR}/G__${libname}.cxx) - -Set(INCLUDE_DIRS - ${CMAKE_SOURCE_DIR}/hist/hist/inc - ${CMAKE_SOURCE_DIR}/cint/cint/include - ${CMAKE_SOURCE_DIR}/cint/cint/stl - ${CMAKE_SOURCE_DIR}/cint/cint/lib -) - - -GENERATE_DICTIONARY("${${libname}Headers}" - "${LinkDef}" "${Dictionary}" - "${INCLUDE_DIRS}" "" - ) - -Set(INCLUDE_DIRECTORIES - ${CMAKE_CURRENT_SOURCE_DIR}/inc -# ${CMAKE_SOURCE_DIR}/hist/hist/inc -# ${CMAKE_SOURCE_DIR}/core/meta/inc -# ${CMAKE_SOURCE_DIR}/core/base/inc - ${ROOT_INCLUDE_DIR} - ) - -Set(DEPENDENCIES ) - -GENERATE_ROOTMAP("${LinkDef}" ${libname} ${DEPENDENCIES}) - -include_directories( ${INCLUDE_DIRECTORIES}) - -# Here all objects ar put together into one share library -Add_Library(${libname} SHARED ${${libname}Source} ${Dictionary}) -Target_Link_Libraries(${libname} ${DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT}) -Set_Target_properties(${libname} PROPERTIES ${ROOT_LIBRARY_PROPERTIES}) -Install(TARGETS ${libname} DESTINATION ${LIB_INSTALL_DIR}) - - -# Define all the header files which should be installed when -# doing a "make install" -Install(FILES ${${libname}Headers} DESTINATION ${INCLUDE_INSTALL_DIR}) diff --git a/cmake/scripts/Makefile-comp.in b/cmake/scripts/Makefile-comp.in deleted file mode 100644 index 3ca46585ba21f..0000000000000 --- a/cmake/scripts/Makefile-comp.in +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: makefile -*- -# -# Makefile compiler definitions included by the top Makefile. -# Used to override the compilers specified in the architecture -# specific Makefiles. - -CC ="@CMAKE_C_COMPILER@" -CXX ="@CMAKE_CXX_COMPILER@" -F77 ="@CMAKE_Fortran_COMPILER@" -LD ="@CMAKE_CXX_COMPILER@" diff --git a/cmake/scripts/RConfigOptions.in b/cmake/scripts/RConfigOptions.in deleted file mode 100644 index 4598a382c4e6d..0000000000000 --- a/cmake/scripts/RConfigOptions.in +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ROOT_RConfigOptions -#define ROOT_RConfigOptions - -#define R__CONFIGUREOPTIONS "@RootConfigOptions@" -#define R__CONFIGUREFEATURES "@RootConfigFeatures@" - -#endif diff --git a/cmake/scripts/RConfigure.in b/cmake/scripts/RConfigure.in deleted file mode 100644 index ef1720561a5b2..0000000000000 --- a/cmake/scripts/RConfigure.in +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ROOT_RConfigure -#define ROOT_RConfigure - -/* Configurations file for @ROOT_ARCHITECTURE@ */ -#ifdef R__HAVE_CONFIG -#define ROOTPREFIX "@ROOT_INSTALL_DIR@" -#define ROOTBINDIR "@BIN_INSTALL_DIR@" -#define ROOTLIBDIR "@LIB_INSTALL_DIR@" -#define ROOTINCDIR "@INCLUDE_INSTALL_DIR@" -#define ROOTETCDIR "@ETC_INSTALL_DIR@" -#define ROOTDATADIR "@DATA_INSTALL_DIR@" -#define ROOTDOCDIR "@DOC_INSTALL_DIR@" -#define ROOTMACRODIR "@MACRO_INSTALL_DIR@" -#define ROOTSRCDIR "@SRC_INSTALL_DIR@" -#define ROOTICONPATH "@ICON_INSTALL_DIR@" -#define EXTRAICONPATH "@EXTRA_ICON_INSTALL_DIR@" -#define TTFFONTDIR "@FONT_INSTALL_DIR@" -#define CINTINCDIR "@CINT_INSTALL_DIR@" -#endif - -#cmakedefine R__HAS_SETRESUID /**/ -#cmakedefine R__HAS_MATHMORE /**/ -#cmakedefine R__HAS_PTHREAD /**/ -#cmakedefine R__HAS_XFT /**/ - -#endif diff --git a/cmake/scripts/configcint.h b/cmake/scripts/configcint.h deleted file mode 100644 index 172ac1984692d..0000000000000 --- a/cmake/scripts/configcint.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Generated by cint/Module.mk */ -#define G__CFG_ARCH "macosx64" -#define G__CFG_IMPLIBEXT ".dylib" -#define G__CFG_LDOUT "-o " -#define G__CFG_LIBL "-l@imp@" -#define G__CFG_LIBEXT ".a" -#define G__CFG_MANGLEPATHS "echo " -#define G__CFG_PLATFORMO "" -#define G__CFG_AR "ar qcs" -#define G__CFG_COREVERSION "cint" -#define G__CFG_CC "gcc" -#define G__CFG_CFLAGS "-m64 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -Icint/cint/inc -Icint/cint/src -Icint/cint/src/dict" -#define G__CFG_CMACROS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY" -#define G__CFG_COMP "-c " -#define G__CFG_CPP "g++ -E -C" -#define G__CFG_COUT "-o " -#define G__CFG_COUTEXE "-o " -#define G__CFG_INCP "-I" -#define G__CFG_CXX "g++" -#define G__CFG_CXXFLAGS "-m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -Icint/cint/inc -Icint/cint/src -Icint/cint/src/dict" -#define G__CFG_CXXMACROS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY" -#define G__CFG_LD "g++" -#define G__CFG_LDFLAGS "-O2 -m64 -bind_at_load" -#define G__CFG_LIBP "-L" -#define G__CFG_SOFLAGS "-O2 -dynamiclib -single_module -undefined dynamic_lookup -install_name @rpath/" -#define G__CFG_SOOUT G__CFG_LDOUT -#define G__CFG_OBJEXT ".o" -#define G__CFG_EXEEXT "" -#define G__CFG_SOEXT ".so" -#define G__CFG_DEBUG "" -#define G__CFG_DEFAULTLIBS "-lm -Wl,-rpath,@loader_path/../lib -pthread -ldl" -#define G__CFG_DEFAULTLIBS "-lm -Wl,-rpath,@loader_path/../lib -pthread -ldl" -#define G__CFG_STREAMDIR "" -#define G__CFG_EXPLLINK "no" -#define G__CFG_BUILDREADLINE "" -#define G__CFG_READLINELIBDIR "" -#define G__CFG_READLINEINCDIR "" -#define G__CFG_NEEDCURSES "" -#define G__CFG_RM "rm -f" -#define G__CFG_MV "mv -f" -#define G__CFG_INPUTMODE "root" -#define G__CFG_INPUTMODELOCK "off" -#define G__CFG_MAKEIMPLIB "" -#define G__CFG_CINTSYSDIR "/Users/uhlig/software/root" -#define G__CFG_HAVE_CONFIG "1" -#define CINTSYSDIR "/Users/uhlig/software/root" -#define G__CFG_MAKEIMPLIB "" -#define G__CFG_HAVE_CONFIG "1" diff --git a/cmake/scripts/configcint.in b/cmake/scripts/configcint.in deleted file mode 100644 index d0a33b4385ba5..0000000000000 --- a/cmake/scripts/configcint.in +++ /dev/null @@ -1,92 +0,0 @@ -# Murkily include to build cint/inc/configcint.h (aka $@) - -$(CINTCONF): config/Makefile.$(ARCH) config/Makefile.comp $(CINTCONFMK) - @-rm -f $@__ - @echo '/* Generated by cint/Module.mk */' > $@__ - @( case $(ARCH) in \ - win32) \ - if [ $(VC_MAJOR) -ge 14 ]; then \ - echo '#define G__CFG_ARCH "msvc8"' >> $@__; \ - else \ - echo '#define G__CFG_ARCH "msvc7"' >> $@__; \ - fi && \ - echo '#define G__CFG_LDOUT "-out:"' >> $@__ && \ - echo '#define G__CFG_LIBL "lib@imp@"' >> $@__ && \ - echo '#define G__CFG_LIBEXT ".lib"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".lib"' >> $@__ && \ - echo '#define G__CFG_MANGLEPATHS "cygpath -m "' >> $@__ && \ - echo '#define G__CFG_PLATFORMO "v6_winnt"' >> $@__ && \ - echo '#define G__CFG_AR "lib /OUT:"' >> $@__ ;;\ - *) case $(ARCH) in \ - macosx*) \ - echo '#define G__CFG_ARCH "$(ARCH)"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".dylib"' >> $@__ ;; \ - win32gcc) \ - echo '#define G__CFG_ARCH "cygwin"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".a"' >> $@__ ;; \ - *) \ - echo '#define G__CFG_ARCH "$(ARCH)"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".a"' >> $@__ ;; \ - esac && \ - echo '#define G__CFG_LDOUT "-o "' >> $@__ && \ - echo '#define G__CFG_LIBL "-l@imp@"' >> $@__ && \ - echo '#define G__CFG_LIBEXT ".a"' >> $@__ && \ - echo '#define G__CFG_MANGLEPATHS "echo "' >> $@__ && \ - echo '#define G__CFG_PLATFORMO ""' >> $@__ && \ - echo '#define G__CFG_AR "ar qcs"' >> $@__ ;; \ - esac && \ - echo '#define G__CFG_COREVERSION "$(patsubst cint/%/inc/,%,$(dir $@))"' >> $@__ && \ - echo '#define G__CFG_CC "$(CC)"' >> $@__ && \ - echo '#define G__CFG_CFLAGS "$(CINTCFLAGS)"' >> $@__ && \ - echo '#define G__CFG_CMACROS "$(filter -D%,$(CINTCFLAGS))"' >> $@__ && \ - echo '#define G__CFG_COMP "-c "' >> $@__ && \ - echo '#define G__CFG_CPP "$(CPPPREP)"' >> $@__ && \ - echo '#define G__CFG_COUT "$(CXXOUT)"' >> $@__ && \ - echo '#define G__CFG_COUTEXE "$(CXXOUT)"' >> $@__ && \ - echo '#define G__CFG_INCP "-I"' >> $@__ && \ - echo '#define G__CFG_CXX "$(CXX)"' >> $@__ && \ - echo '#define G__CFG_CXXFLAGS "$(CINTCXXFLAGS)"' >> $@__ && \ - echo '#define G__CFG_CXXMACROS "$(filter -D%,$(CINTCXXFLAGS))"' >> $@__ && \ - echo '#define G__CFG_LD "$(LD)"' >> $@__ && \ - echo '#define G__CFG_LDFLAGS "$(LDFLAGS)"' >> $@__ && \ - echo '#define G__CFG_LIBP "-L"' >> $@__ && \ - echo '#define G__CFG_SOFLAGS "$(SOFLAGS)"' >> $@__ && \ - echo '#define G__CFG_SOOUT G__CFG_LDOUT' >> $@__ && \ - echo '#define G__CFG_OBJEXT ".o"' >> $@__ && \ - echo '#define G__CFG_EXEEXT "$(EXEEXT)"' >> $@__ && \ - echo '#define G__CFG_SOEXT ".$(SOEXT)"' >> $@__ && \ - echo '#define G__CFG_DEBUG "$(DEBUG)"' >> $@__ && \ - echo '#define G__CFG_DEFAULTLIBS "$(SYSLIBS)"' >> $@__ && \ - echo '#define G__CFG_DEFAULTLIBS "$(SYSLIBS)"' >> $@__ && \ - echo '#define G__CFG_STREAMDIR "$(patsubst $(MODDIRS)/%strm.cxx,%,$(filter $(MODDIRS)/%strm.cxx, $(CINTS2)))"' >> $@__ && \ - echo '#define G__CFG_EXPLLINK "$(EXPLICITLINK)"' >> $@__ && \ - echo '#define G__CFG_BUILDREADLINE ""' >> $@__ && \ - echo '#define G__CFG_READLINELIBDIR ""' >> $@__ && \ - echo '#define G__CFG_READLINEINCDIR ""' >> $@__ && \ - echo '#define G__CFG_NEEDCURSES ""' >> $@__ && \ - echo '#define G__CFG_RM "rm -f"' >> $@__ && \ - echo '#define G__CFG_MV "mv -f"' >> $@__ && \ - echo '#define G__CFG_INPUTMODE "root"' >> $@__ && \ - echo '#define G__CFG_INPUTMODELOCK "off"' >> $@__ && \ - echo '#define G__CFG_MAKEIMPLIB ""' >> $@__ && \ - echo '#define G__CFG_CINTSYSDIR "$(PWD)"' >> $@__ && \ - echo '#define G__CFG_HAVE_CONFIG "1"' >> $@__ && \ - echo '#define CINTSYSDIR "$(PWD)"' >> $@__ && \ - echo '#define G__CFG_MAKEIMPLIB ""' >> $@__ && \ - echo '#define G__CFG_HAVE_CONFIG "1"' >> $@__ \ - ) - @(if [ -r $@ ]; then \ - diff $@__ $@ > /dev/null; status=$$?; \ - if [ "$$status" -ne 0 ]; then \ - echo "Running cint/configcint.mk"; \ - echo "Changing $@"; \ - mv $@__ $@; \ - else \ - rm -f $@__; \ - fi \ - else \ - echo "Running cint/configcint.mk"; \ - echo "Making $@"; \ - mv $@__ $@; \ - fi \ - ) diff --git a/cmake/scripts/configcint.mk b/cmake/scripts/configcint.mk deleted file mode 100644 index b787ae5e6bc93..0000000000000 --- a/cmake/scripts/configcint.mk +++ /dev/null @@ -1,100 +0,0 @@ -# Makefile include to build cint[7]/inc/configcint.h (aka $@) - -# Set these variables now for the current value of $(G__CFG_CONF). -# They might be changed (by cint/Module.mk or cint7/Module.mk) later -$(G__CFG_CONF): G__CFG_CXXFLAGS := $(CINTCXXFLAGS) -$(G__CFG_CONF): G__CFG_CFLAGS := $(CINTCFLAGS) -$(G__CFG_CONF): G__CFG_DIR := $(CINTDIR) -$(G__CFG_CONF): G__CFG_CONF := $(CINTCONF) -$(G__CFG_CONF): G__CFG_CONFMK := $(CINTCONFMK) - -$(G__CFG_CONF): config/Makefile.$(ARCH) config/Makefile.comp $(G__CFG_CONFMK) - @-rm -f $@__ - @echo '/* Generated by cint/Module.mk */' > $@__ - @( case $(ARCH) in \ - win32) \ - if [ $(VC_MAJOR) -ge 14 ]; then \ - echo '#define G__CFG_ARCH "msvc8"' >> $@__; \ - else \ - echo '#define G__CFG_ARCH "msvc7"' >> $@__; \ - fi && \ - echo '#define G__CFG_LDOUT "-out:"' >> $@__ && \ - echo '#define G__CFG_LIBL "lib@imp@"' >> $@__ && \ - echo '#define G__CFG_LIBEXT ".lib"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".lib"' >> $@__ && \ - echo '#define G__CFG_MANGLEPATHS "cygpath -m "' >> $@__ && \ - echo '#define G__CFG_PLATFORMO "v6_winnt"' >> $@__ && \ - echo '#define G__CFG_AR "lib /OUT:"' >> $@__ ;;\ - *) case $(ARCH) in \ - macosx*) \ - echo '#define G__CFG_ARCH "$(ARCH)"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".dylib"' >> $@__ ;; \ - win32gcc) \ - echo '#define G__CFG_ARCH "cygwin"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".a"' >> $@__ ;; \ - *) \ - echo '#define G__CFG_ARCH "$(ARCH)"' >> $@__ && \ - echo '#define G__CFG_IMPLIBEXT ".a"' >> $@__ ;; \ - esac && \ - echo '#define G__CFG_LDOUT "-o "' >> $@__ && \ - echo '#define G__CFG_LIBL "-l@imp@"' >> $@__ && \ - echo '#define G__CFG_LIBEXT ".a"' >> $@__ && \ - echo '#define G__CFG_MANGLEPATHS "echo "' >> $@__ && \ - echo '#define G__CFG_PLATFORMO ""' >> $@__ && \ - echo '#define G__CFG_AR "ar qcs"' >> $@__ ;; \ - esac && \ - echo '#define G__CFG_COREVERSION "$(patsubst cint/%/inc/,%,$(dir $@))"' >> $@__ && \ - echo '#define G__CFG_CC "$(CC)"' >> $@__ && \ - echo '#define G__CFG_CFLAGS "$(G__CFG_CFLAGS)"' >> $@__ && \ - echo '#define G__CFG_CMACROS "$(filter -D%,$(G__CFG_CFLAGS))"' >> $@__ && \ - echo '#define G__CFG_COMP "-c "' >> $@__ && \ - echo '#define G__CFG_CPP "$(CPPPREP)"' >> $@__ && \ - echo '#define G__CFG_COUT "$(CXXOUT)"' >> $@__ && \ - echo '#define G__CFG_COUTEXE "$(CXXOUT)"' >> $@__ && \ - echo '#define G__CFG_INCP "-I"' >> $@__ && \ - echo '#define G__CFG_CXX "$(CXX)"' >> $@__ && \ - echo '#define G__CFG_CXXFLAGS "$(G__CFG_CXXFLAGS)"' >> $@__ && \ - echo '#define G__CFG_CXXMACROS "$(filter -D%,$(G__CFG_CXXFLAGS))"' >> $@__ && \ - echo '#define G__CFG_LD "$(LD)"' >> $@__ && \ - echo '#define G__CFG_LDFLAGS "$(LDFLAGS)"' >> $@__ && \ - echo '#define G__CFG_LIBP "-L"' >> $@__ && \ - echo '#define G__CFG_SOFLAGS "$(SOFLAGS)"' >> $@__ && \ - echo '#define G__CFG_SOOUT G__CFG_LDOUT' >> $@__ && \ - echo '#define G__CFG_OBJEXT ".o"' >> $@__ && \ - echo '#define G__CFG_EXEEXT "$(EXEEXT)"' >> $@__ && \ - echo '#define G__CFG_SOEXT ".$(SOEXT)"' >> $@__ && \ - echo '#define G__CFG_DEBUG "$(DEBUG)"' >> $@__ && \ - echo '#define G__CFG_DEFAULTLIBS "$(SYSLIBS)"' >> $@__ && \ - echo '#define G__CFG_DEFAULTLIBS "$(SYSLIBS)"' >> $@__ && \ - echo '#define G__CFG_STREAMDIR "$(patsubst $(MODDIRS)/%strm.cxx,%,$(filter $(MODDIRS)/%strm.cxx, $(CINTS2)))"' >> $@__ && \ - echo '#define G__CFG_EXPLLINK "$(EXPLICITLINK)"' >> $@__ && \ - echo '#define G__CFG_BUILDREADLINE ""' >> $@__ && \ - echo '#define G__CFG_READLINELIBDIR ""' >> $@__ && \ - echo '#define G__CFG_READLINEINCDIR ""' >> $@__ && \ - echo '#define G__CFG_NEEDCURSES ""' >> $@__ && \ - echo '#define G__CFG_RM "rm -f"' >> $@__ && \ - echo '#define G__CFG_MV "mv -f"' >> $@__ && \ - echo '#define G__CFG_INPUTMODE "root"' >> $@__ && \ - echo '#define G__CFG_INPUTMODELOCK "off"' >> $@__ && \ - echo '#define G__CFG_MAKEIMPLIB ""' >> $@__ && \ - echo '#define G__CFG_CINTSYSDIR "$(PWD)"' >> $@__ && \ - echo '#define G__CFG_HAVE_CONFIG "1"' >> $@__ && \ - echo '#define CINTSYSDIR "$(PWD)"' >> $@__ && \ - echo '#define G__CFG_MAKEIMPLIB ""' >> $@__ && \ - echo '#define G__CFG_HAVE_CONFIG "1"' >> $@__ \ - ) - @(if [ -r $@ ]; then \ - diff $@__ $@ > /dev/null; status=$$?; \ - if [ "$$status" -ne 0 ]; then \ - echo "Running cint/configcint.mk"; \ - echo "Changing $@"; \ - mv $@__ $@; \ - else \ - rm -f $@__; \ - fi \ - else \ - echo "Running cint/configcint.mk"; \ - echo "Making $@"; \ - mv $@__ $@; \ - fi \ - ) diff --git a/cmake/scripts/genreflex-rootcint.in b/cmake/scripts/genreflex-rootcint.in deleted file mode 100644 index b34e14b61d333..0000000000000 --- a/cmake/scripts/genreflex-rootcint.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -dir=@libdir@ -python ${dir}/python/genreflex/genreflex-rootcint.py "$@" diff --git a/cmake/scripts/genreflex.final.in b/cmake/scripts/genreflex.final.in deleted file mode 100644 index c7e417e8cab74..0000000000000 --- a/cmake/scripts/genreflex.final.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -dir=@CMAKE_BINARY_DIR@ -python ${dir}/python/genreflex/genreflex.py "$@" diff --git a/cmake/scripts/genreflex.in b/cmake/scripts/genreflex.in deleted file mode 100644 index c7e417e8cab74..0000000000000 --- a/cmake/scripts/genreflex.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -dir=@CMAKE_BINARY_DIR@ -python ${dir}/python/genreflex/genreflex.py "$@" diff --git a/cmake/scripts/memprobe.in b/cmake/scripts/memprobe.in deleted file mode 100644 index d759a49bb0e2f..0000000000000 --- a/cmake/scripts/memprobe.in +++ /dev/null @@ -1,309 +0,0 @@ -#!@perl@ - -################################################################################ -# -# Authors : D.Bertini and M.Ivanov -# Date: 23/10/2000 -# Updated: 10/05/2001 D.Bertini, v2.0 port to gdb5.0 + glibc2.2 -# -# -# To activate the memory checker you have to set in the .rootrc file -# the resource Root.MemCheck to 1 (e.g.: Root.MemCheck: 1) and you -# have to link with libNew.so (e.g. use root-config --new --libs) or -# use rootn.exe. When all this is the case you will find at the end -# of the program execution a file "memcheck.out" in the directory -# where you started your ROOT program. Alternatively you can set -# the resource Root.MemCheckFile to the name of a file to which -# the leak information will be written. The contents of this -# "memcheck.out" file can be analyzed and transformed into printable -# text via the memprobe program (in $ROOTSYS/bin). -# -################################################################################ - -if ( ( $#ARGV < 0 )) { -Usage(); -} - -use Getopt::Std; - -getopt "h,e,m,d,f"; -#Usage("exec file is mandatory !\n") if ( !($opt_h or $opt_e) ); - -if ( $opt_h ) { Usage();} -if ( $opt_e ) { $ExeFile=$opt_e; - }else { - if (!$opt_h){ Usage("an exec file must be provided !\n");} - } -if ( $opt_m ) { $MemStatFile=$opt_m; - }else{ - $MemStatFile="memcheck.out"; - } -if ( $opt_d ) { $MemDescFile=$opt_d; - }else{ - $MemDescFile="memcheckdesc.out"; - } - -if ( $opt_f ) { $MemFiltFile=$opt_f; - }else{ - $MemFiltFile="analfilter"; - } - - -sub Usage -{ - my ($txt) = @_; - - print "MemProbe v2.0 Usage:\n"; - print "\t $0 -e exec-file [options] [files] \n "; - print "\t-e \t\t\tname of analyzed program\n"; - print "Options: \n"; - print "\t-h \t\t\tthis usage help\n"; - print "\t-m \t\tname of analyzed program output file\n"; - print "\t-d \t\tname of the stat description file\n"; - print "\t-f \t\tname of the filter file\n"; - print "\nWarning: $txt\n" if $txt; - - exit 2; -} - - -# old version -#$ExeFile = shift @ARGV; -#$MemStatFile = $#ARGV >= 0 ? shift @ARGV : "memcheck.out"; - -open (MEMSTAT, $MemStatFile) or die "-E- Could not open leaks data file $MemStatFile: $!"; - -if ($#ARGV >= 0) { - $BreakOn = shift @ARGV; - # Rest in @ARGV are program arguments -} - - -############################################################################## -# Read filter expression -############################################################################## - -open (FILTERFILE, $MemFiltFile); -@FILTER = ; -close (FILTERFILE); -for ($j = 0; $j <= $#FILTER; ++$j){ - chop $FILTER[$j]; - # print $FILTER[$j]; -} - -############################################################################## -# Find leak adresses -############################################################################## - -$n = $u = 0; -$nfull = $ufull = 0; - -while () { - # remove newline - chop $_ ; - - if (/\s*(stack:)\s*/) { - $addrfull = $'; #obtain stack info - $_ = $addrfull; - s/(st)//g; - s/(0x)/:0x/g; - @arr = split(/:/); #obtain different leak points - for ($i = 1; $i < $#arr; ++$i){ - $addr = $arr[$i]; - $u++ if not exists $Size{$addr}; - $Size{$addr} += 0; - $n++; - } - } -} -close (MEMSTAT); - - -############################################################################## -# FIND debug info for addresses - information stored -# in file leak.desc.C -############################################################################## - - -# redirect standard output to the trash -open (STDERR,">/dev/null"); - -# Redirect list of commands to a file -# using unix pipes (needed for RH.7.1 & gdb5.0) - -open (myFile,">commands"); - -# Change set listsize 2 to something else to show more lines -print myFile "set prompt\nset listsize 1\nset height 0\nset verbose off\n"; - - -if (defined($BreakOn)) { - print myFile "break $BreakOn\n"; - print myFile "run ", join(" ", @ARGV), " \n"; -} -else{ - print myFile "break main \n "; - print myFile "run ", join(" ", @ARGV), " \n"; -} - -foreach (sort keys %Size) { - print myFile "l \*$_\n "; -} - -if (defined($BreakOn)) { - print myFile "kill\n"; -} -close (myFile); - -############################################################################## -# Calling now gdb services in batch mode using -# dumped list of commands. -# ==> works with gdb-4.18 gdb-5.0 release versions -############################################################################## - - -open (PIPE, "| gdb -n -q $ExeFile < commands > $MemDescFile") -or die "-E- Cannot start gdb !!!"; -close (PIPE); - - - -############################################################################## -# ASIGN debug info to address -############################################################################## - -open (DBGinfo, $MemDescFile) or die "-E- Could not open desc file $MemDescFile: $!"; -$addr =0; -while (){ - # if (/(0x[0-9a-f]+)\s*/){ - if (/(^0x[0-9a-f]+)/){ - $addr = $1; - #print $addr; - /is in /; - # print $'; - # print "\n"; - $filename{$addr} =$'; - # print "$addr $filename{$addr}\n"; - }else{ - $line{$addr} = $_ if ! /^\s*l/; - } - for ($j = 0; $j <= $#FILTER; ++$j){ - if ( ( $line{$addr} =~ /(${FILTER[$j]})/ ) || - ( $filename{$addr} =~ /(${FILTER[$j]})/ )){ - $line{$addr} = "filtered"; -} -} - -} -close (DBGinfo); - -############################################################################## -# FIND unique leak stack sequences -############################################################################## - -open (MEMSTAT, $MemStatFile) or die "-E- Could not open leaks data file $MemStatFile: $!"; - -while () { - # remove newline - chop $_ ; - if (/\s*(stack:)\s*/) { - $addrfull = $'; #obtain stack info - $info =$`; - $info =~ s/size //; #obtain mem info for given stack sequence - $_ = $addrfull; - s/(st)//g; - s/(0x)/:0x/g; - s/ //g; - @arr = split(/:/); #obtain leak points - $addrfull ="stack"; - $FilterOut=0; - for ($i = 1; ($i <= $#arr)&&($FilterOut==0); ++$i){ - $addr = $arr[$i]; - if ( $line{$addr} =~ /filtered/) - { - $FilterOut=1; - } - if ( $filename{$addr} =~ /\)/) - { - $addrfull .= ":"; - $addrfull .= $addr; - } - } - if ($FilterOut==0){ - $_= $info; - @meminfo = split(/:/); - $ufull++ if not exists $Sizefull{$addrfull}; - $SizeTotal{$addrfull} += $meminfo[1]; - $CountTotal{$addrfull}+= $meminfo[0]; - $SizeLeak{$addrfull} += $meminfo[3]; - $CountLeak{$addrfull}+= $meminfo[2]; - $nfull++; - } - } -} - -print STDERR "total memory corrupted at point==> ($nfull) \n"; -print STDERR "unique allocations ==> ($ufull) \n"; - -close (MEMSTAT); - -############################################################################## -# PRINT output leak information to leak.info.C output file -############################################################################## - - -open (LEAKinfo,">leak.info"); -open (MULTI,">multidelete.info"); -open (MEMSTAT,">memcheck.info"); - -# sort by size of leak -sub bysize { - $SizeLeak{$b} <=> $SizeLeak{$a}; # presuming integers -} - -sub bysizetotal { - $SizeTotal{$b} <=> $SizeTotal{$a}; # presuming integers -} - -foreach (sort bysizetotal keys %SizeTotal) { - print MEMSTAT "Count: $CountTotal{$_}($CountLeak{$_}) Size: $SizeTotal{$_}($SizeLeak{$_}) \n"; - s/stack://g; - @arr = split(/:/); #obtain leak points - for ($i = 0; $i <= $#arr; ++$i){ - $addr = $arr[$i]; - print MEMSTAT "$filename{$addr}$line{$addr}"; - } - print MEMSTAT "\n\n"; -} - - -foreach (sort bysize keys %SizeLeak) { - if ($CountLeak{$_}<0){ - print MULTI "Multiple deallocation :$CountLeak{$_}\n"; - s/stack://g; - @arr = split(/:/); #obtain leak points - for ($i = 0; $i <= $#arr; ++$i){ - $addr = $arr[$i]; - print MULTI "$filename{$addr}$line{$addr}"; - } - print MULTI "\n\n"; - } - if ($SizeLeak{$_}!=0){ - print LEAKinfo "Leaked allocations: $CountLeak{$_} \t Leaked size: $SizeLeak{$_} \n"; - s/stack://g; - @arr = split(/:/); #obtain leak points - for ($i = 0; $i <= $#arr; ++$i){ - $addr = $arr[$i]; - print LEAKinfo "$filename{$addr}$line{$addr}"; - } - print LEAKinfo "\n\n"; - } -} -close(LEAKinfo); -close(MULTI); -close(MEMSTAT); - -$remove = 'rm -rf commands'; -exec $remove; -die " -E- no commands file !"; - diff --git a/cmake/scripts/root-config.in b/cmake/scripts/root-config.in deleted file mode 100644 index 595727c112a6f..0000000000000 --- a/cmake/scripts/root-config.in +++ /dev/null @@ -1,824 +0,0 @@ -#!/bin/sh -# -*- sh-indentation: 3 -*- -# This script returns the machine dependent compile options needed -# to compile and link applications using the ROOT libraries. -# -# Author: Fons Rademakers, 06/06/99 - -progdir=`dirname $0` -runningdir=`pwd` -if echo $progdir | grep "^/" > /dev/null 2>& 1 || \ - echo $progdir | grep "^~" > /dev/null 2>& 1; then - # absolute path - fullpath=$progdir -else - # relative path - fullpath=$runningdir/$progdir -fi -ROOTSYS=`dirname $fullpath` - -arch=@ROOT_ARCHITECTURE@ -platform=@ROOT_PLATFORM@ -bindir=@BIN_INSTALL_DIR@ -libdir=@LIB_INSTALL_DIR@ -incdir=@INCLUDE_INSTALL_DIR@ -etcdir=@ETC_INSTALL_DIR@ -features="@installed_options_list@" -configargs="@ROOT_CONFIGARGS@" -altcc="@CMAKE_C_COMPILER@" -altcxx="@CMAKE_CXX_COMPILER@" -altf77="@CMAKE_Fortran_COMPILER@" -altld="@CMAKE_CXX_COMPILER@" -dicttype=@ROOT_DICTTYPE@ -zliblib=@zliblib@ - -if test "$platform" = "win32"; then - if [ "x$ROOTSYS" != "x" ]; then - unixROOTSYS=`cygpath -u $ROOTSYS` - else - unixROOTSYS=. - fi - bindir=$unixROOTSYS/bin - libdir=$unixROOTSYS/lib - incdir=$unixROOTSYS/include - etcdir=$unixROOTSYS/etc -fi - -### ROOT libraries ### - -newlib="-lNew" -rootlibs="-lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree \ - -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread $zliblib" -rootglibs="-lGui" - -if test "$dicttype" = "reflex" || test "$dicttype" = "gccxml"; then - rootlibs="$rootlibs -lReflex" -fi - -if test "$platform" = "win32"; then - rootulibs="-include:_G__cpp_setupG__Net \ - -include:_G__cpp_setupG__IO \ - -include:_G__cpp_setupG__Hist \ - -include:_G__cpp_setupG__Graf \ - -include:_G__cpp_setupG__G3D \ - -include:_G__cpp_setupG__GPad \ - -include:_G__cpp_setupG__Tree \ - -include:_G__cpp_setupG__Thread \ - -include:_G__cpp_setupG__Rint \ - -include:_G__cpp_setupG__PostScript \ - -include:_G__cpp_setupG__Matrix \ - -include:_G__cpp_setupG__Physics" - rootuglibs="-include:_G__cpp_setupG__Gui1" -elif test "$platform" = "aix5"; then - rootulibs="-Wl,-u,.G__cpp_setupG__Net \ - -Wl,-u,.G__cpp_setupG__IO \ - -Wl,-u,.G__cpp_setupG__Hist \ - -Wl,-u,.G__cpp_setupG__Graf \ - -Wl,-u,.G__cpp_setupG__G3D \ - -Wl,-u,.G__cpp_setupG__GPad \ - -Wl,-u,.G__cpp_setupG__Tree \ - -Wl,-u,.G__cpp_setupG__Thread \ - -Wl,-u,.G__cpp_setupG__Rint \ - -Wl,-u,.G__cpp_setupG__PostScript \ - -Wl,-u,.G__cpp_setupG__Matrix \ - -Wl,-u,.G__cpp_setupG__Physics" - rootuglibs="-Wl,-u,.G__cpp_setupG__Gui1" -else - rootulibs="-Wl,-u,_G__cpp_setupG__Net \ - -Wl,-u,_G__cpp_setupG__IO \ - -Wl,-u,_G__cpp_setupG__Hist \ - -Wl,-u,_G__cpp_setupG__Graf \ - -Wl,-u,_G__cpp_setupG__G3D \ - -Wl,-u,_G__cpp_setupG__GPad \ - -Wl,-u,_G__cpp_setupG__Tree \ - -Wl,-u,_G__cpp_setupG__Thread \ - -Wl,-u,_G__cpp_setupG__Rint \ - -Wl,-u,_G__cpp_setupG__PostScript \ - -Wl,-u,_G__cpp_setupG__Matrix \ - -Wl,-u,_G__cpp_setupG__Physics" - rootuglibs="-Wl,-u,_G__cpp_setupG__Gui1" -fi - -### machine dependent settings ### - -case $arch in -hpux) - #HP-UX with CC - auxcflags="+a1 +Z" - auxlibs="-lm -ldld" - ;; -hpuxacc | hpuxia64acc) - # HP-UX 10.x with aCC - auxcflags= - auxlibs="-lm -ldld" - ;; -hpuxgcc) - # HP-UX 10.x with g++ - auxcflags= - auxlibs="-lm -ldld" - ;; -hurddeb) - # Debian GNU/Hurd - auxcflags= - auxlibs="-lnsl -lm -ldl -rdynamic" - ;; -aix | aix5) - # IBM AIX - auxcflags="-qnoro -qnoroconst -qmaxmem=-1" - auxlibs= - forcelibs=$rootulibs - forceglibs=$rootuglibs - ;; -aixgcc) - # IBM AIX with g++ - auxcflags="-fsigned-char" - auxlibs= - forcelibs=$rootulibs - forceglibs=$rootuglibs - ;; -solaris) - # Solaris - auxcflags= - auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl -lsunmath" - ;; -solarisgcc) - # Solaris g++ 2.8.x - auxcflags= - auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl" - ;; -solarisCC5) - # Solaris CC 5.0 - auxcflags= - auxlibs="-lm -ldl -lnsl -lsocket" - ;; -solariskcc) - # Solaris KCC - auxcflags= - auxlibs="-L/usr/ccs/lib -lgen -lm -ldl -lsocket -lnsl" - ;; -solarisx86) - # Solaris CC on Intel - auxcflags= - auxlibs="-L/usr/ccs/lib -lm -lsocket -lgen -ldl" - ;; -sgicc) - # SGI - auxcflags="-LANG:std" - auxlibs="-lm -ldl" - ;; -sgicc64) - # SGI - auxcflags="-64 -LANG:std" - auxlibs="-lm" - ;; -sgigcc) - # SGI 6.x with gcc - auxcflags="-fsigned-char" - auxlibs="-lgen -lstdc++ -lm -ldl" - ;; -sgin32gcc) - # SGI 6.x with gcc with n32 ABI - auxcflags="-fsigned-char" - auxlibs="-lm -ldl" - ;; -sgikcc) - # SGI with KCC - auxcflags="--signed_chars --display_error_number \ - --diag_suppress 68 --diag_suppress 191 --diag_suppress 837" - auxlibs="-lm -ldl" - ;; -alphagcc) - # Alpha/OSF with g++ - auxcflags= - auxlibs="-lg++ -lm" - ;; -alphagcc) - # Alpha/OSF with gcc - auxcflags="-mcpu=ev5 -D__osf__ -D__alpha" - auxlibs="-ltermcap -lm" - ;; -alphakcc) - # Alpha/OSF with kai compiler (not yet valid) - auxcflags="-mcpu=ev5 -D__osf__ -D__alpha" - auxlibs="-ltermcap -lm" - ;; -alphacxx6) - # Alpha/OSF with cxx6 - auxcflags="-tlocal -D__osf__ -D__alpha -D_USE_STD_IOSTREAM" - auxlibs="-lm" - ;; -alphacxx) - # Alpha/OSF with cxx5 - auxcflags="-oldcxx -D__osf__ -D__alpha" - auxlibs="-lm" - ;; -linuxrh42 | linuxrh51) - # Linux with gcc 2.7.2.x - auxcflags= - auxlibs="-lg++ -lm -ldl -rdynamic" - ;; -linux) - # Linux with gcc >= 3.x - auxcflags="-m32" - auxldflags="-m32" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxmips) - # Linux on mips with gcc >= 3.x - auxcflags="-mapi=32" - auxldflags="-mapi=32" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxdeb | linuxsuse6) - # Linux with gcc on Debian and SuSE - auxcflags= - auxlibs="-lm -ldl -rdynamic" - ;; -linuxdeb2ppc) - # Debian/Linux on PPC - auxcflags=-fsigned-char - auxlibs="-lnsl -lm -ldl -rdynamic" - ;; -linuxkcc) - # Linux with the KAI compiler - auxcflags="--signed_chars -D_EXTERN_INLINE=inline --diag_suppress 191" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxhppa) - # Linux on hppa with the GCC compiler - auxcflags= - auxldflags= - auxlibs="-lm -ldl -rdynamic" - ;; -linuxicc) - # Linux with the Intel icc compiler - auxcflags= - auxlibs="-lm -ldl" - ;; -linuxppcgcc) - # PPC Linux with gcc - auxcflags="-fsigned-char -I/usr/X11/include" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxppc64gcc) - # PPC64 (64 bit mode) Linux with gcc 3.x - auxcflags="-m64 -fsigned-char" - auxldflags="-m64" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxia64gcc) - # Itanium Linux with gcc 2.x/3.x - auxcflags= - auxlibs="-lm -ldl -rdynamic" - ;; -linuxia64sgi) - # Itanium Linux with SGI compiler - auxcflags= - auxlibs="-lm -ldl" - ;; -linuxia64ecc) - # Itanium Linux with Intel ecc compiler - auxcflags= - auxlibs="-lm -ldl" - ;; -linuxx8664gcc) - # AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x - auxcflags="-m64" - auxldflags="-m64" - auxlibs="-lm -ldl -rdynamic" - ;; -linuxx8664icc) - # AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc - auxcflags= - auxlibs="-lm -ldl" - ;; -linuxalphagcc) - # Alpha Linux with gcc - auxcflags= - auxlibs="-lm -ldl -rdynamic" - ;; -linuxarm) - # ARM Linux with gcc - auxcflags="-fsigned-char" - auxlibs="-lm -ldl -rdynamic" - ;; -mklinux) - # MkLinux with libc5 - auxcflags="-fsigned-char -I/usr/X11/include -I/usr/include/g++" - auxlibs="-lg++ -lm -ldl -rdynamic" - ;; -freebsd) - # FreeBSD with libc5 - auxcflags= - auxlibs="-lm -lg++" - ;; -freebsd4) - # FreeBSD 4 with glibc - auxcflags= - auxlibs="-lm -lstdc++" - ;; -freebsd5) - # FreeBSD 5 with glibc - auxcflags= - auxlibs="-lm -lstdc++" - ;; -openbsd) - # OpenBSD with libc - auxcflags= - auxlibs="-lm -lstdc++" - ;; -macosx) - # MacOS X with gcc (GNU cc v3.1) and possible fink (fink.sf.net) - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - # cannot find the one linked to libGraf if relocated after built - rootlibs="$rootlibs -lfreetype" - if [ $macosx_minor -le 3 ]; then - finkdir=`which fink 2>&1 | sed -ne "s/\/bin\/fink//p"` - auxcflags=`[ -d ${finkdir}/include ] && echo -I${finkdir}/include` - auxcflags="-Wno-long-double $auxcflags" - auxlibs="-lm `[ -d ${finkdir}/lib ] && echo -L${finkdir}/lib` -ldl" - forcelibs=$rootulibs - forceglibs=$rootuglibs - else - auxcflags= - auxlibs="-lm -ldl" - fi - ;; -macosxicc) - # MacOS X with Intel icc compiler - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - # cannot find the one linked to libGraf if relocated after built - rootlibs="$rootlibs -lfreetype" - auxcflags= - auxlibs="-lm -ldl" - ;; -macosx64) - # MacOS X with gcc (GNU cc v4.x) in 64 bit mode - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - # cannot find the one linked to libGraf if relocated after built - rootlibs="$rootlibs -lfreetype" - auxcflags="-m64" - auxldflags="-m64" - auxlibs="-lm -ldl" - ;; -macosxxlc) - # MacOS X with IBM xl compiler and possible fink (fink.sf.net) - macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` - # cannot find the one linked to libGraf if relocated after built - rootlibs="$rootlibs -lfreetype" - if [ $macosx_minor -le 3 ]; then - finkdir=`which fink 2>&1 | sed -ne "s/\/bin\/fink//p"` - auxcflags=`[ -d ${finkdir}/include ] && echo -I${finkdir}/include` - auxlibs="-lm `[ -d ${finkdir}/lib ] && echo -L${finkdir}/lib` -ldl" - forcelibs=$rootulibs - forceglibs=$rootuglibs - else - auxcflags= - auxlibs="-lm -ldl" - fi - ;; -hiux) - # Hitachi HIUX - auxcflags= - auxlibs="-lm -ldld" - ;; -win32) - # Win32 - auxcflags="-MD" - if test "x@winrtdebug@" = "xTRUE"; then - auxcflags="-MDd" - fi - VC_MAJOR=`unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $8 }' | cut -d'.' -f1` - if test "$VC_MAJOR" != "" && test $VC_MAJOR -gt 13; then - auxcflags="$auxcflags -EHs -GR" - else - auxcflags="$auxcflags -GR -GX -G5" - fi - auxlibs= - forcelibs=$rootulibs - forceglibs=$rootuglibs - ;; -win32gcc) - # Win32 with cygwin gcc - auxcflags= - auxlibs= - forcelibs=$rootulibs - forceglibs=$rootuglibs - ;; -*) - echo "root-config: \"$arch\" invalid architecture" - echo "Please report to rootdev@cern.ch" - exit 1 - ;; -esac - - -### compiler dependent settings ### - -case $arch in -*kcc) - ex="" - for f in $features ; do - if test "x$f" = "xthread" ; then - auxcflags="--thread_safe $auxcflags" - auxldflags="--thread_safe $auxldflags" - fi - if test "x$f" = "xexceptions" ; then - ex="yes" - fi - done - if test "x$ex" = "x" ; then - auxcflags="--no_exceptions $auxcflags" - auxldflags="--no_exceptions $auxldflags" - else - auxcflags="--exceptions $auxcflags" - auxldflags="--exceptions $auxldflags" - fi - ;; -freebsd* | openbsd* | linux*) - for f in $features ; do - if test "x$f" = "xthread" ; then - auxcflags="-pthread $auxcflags" - auxlibs="-pthread $auxlibs" - fi - if test "x$f" = "xrpath" ; then - auxlibs="-Wl,-rpath,$libdir $auxlibs" - fi - done - ;; -macosx*) - for f in $features ; do - if test "x$f" = "xthread" ; then - if [ $macosx_minor -ge 5 ]; then - auxcflags="-D_REENTRANT -pthread $auxcflags" - auxlibs="-pthread $auxlibs" - else - auxcflags="-D_REENTRANT $auxcflags" - auxlibs="-lpthread $auxlibs" - fi - fi - if test "x$f" = "xrpath" ; then - if [ $macosx_minor -ge 5 ]; then - auxlibs="-Wl,-rpath,$libdir $auxlibs" - fi - fi - done - ;; -hpuxacc | hpuxia64acc) - for f in $features ; do - if test "x$f" = "xthread" ; then - auxcflags="-mt $auxcflags" - auxlibs="-mt $auxlibs" - fi - done - ;; -win32) - ;; -*) - for f in $features ; do - if test "x$f" = "xthread" ; then - auxcflags="-D_REENTRANT $auxcflags" - auxlibs="-lpthread $auxlibs" - fi - done - ;; -esac - -### end of machine and compiler dependent settings ### -nostubs=no #TODO: Don't know what this is @no_stubs@, so set it to no -nostubstest=no #TODO: Don't know what this is @no_stubs_test@, so set it to no - - -prefix=@ROOT_INSTALL_DIR@ -if test "$platform" = "win32" && test "$prefix" != ""; then - prefix=`cygpath -u $prefix` -fi -exec_prefix=${prefix} -exec_prefix_set=no -new_set=no -libsout=no -noauxlibs=no -noauxcflags=no -noldflags=no - -usage="\ -Usage: root-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]\ - [--cflags] [--auxcflags] [--ldflags] [--new] [--nonew] [--libs]\ - [--glibs] [--bindir] [--libdir] [--incdir] [--etcdir] [--noauxcflags] [--noauxlibs]\ - [--noldflags] [--has-] [--arch] [--platform] [--dicttype]\ - [--config] [--features] [--svn-revision] [--python-version]\ - [--cc] [--cxx] [--f77] [--ld ] [--nostubs] [--nostubstest] [--help]" - -if test $# -eq 0; then - echo "${usage}" 1>&2 - exit 1 -fi - -out="" - -while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --arch) - ### Output the arcitecture (compiler/OS combination) - out="$out $arch" - ;; - --platform) - ### Output the platform (OS) - out="$out $platform" - ;; - --has-*) - ### Check for feature - f=`echo $1 | sed 's/--has-//'` - for c in $features ; do - if test "x$c" = "x$f" ; then - out="$out yes" - break - fi - c="" - done - if test "x$c" = "x" ; then - out="$out no" - fi - ;; - --prefix=*) - ### Set the prefix - if test "$platform" = "win32"; then - ### We need to expand the path to backslash seperated path - optarg=`cygpath -u $optarg` - fi - prefix=$optarg - bindir=${prefix}/bin - libdir=${prefix}/lib - incdir=${prefix}/include - if test $exec_prefix_set = no ; then - exec_prefix=$optarg - fi - ;; - --prefix) - ### Output the prefix - out="$out $prefix" - ;; - --exec-prefix=*) - ### Set the exec-prefix - if test "$platform" = "win32"; then - ### We need to expand the path to backslash seperated path - optarg=`cygpath -u $optarg` - fi - exec_prefix=$optarg - exec_prefix_set=yes - bindir=${exec_prefix}/bin - libdir=${exec_prefix}/lib - ;; - --exec-prefix) - ### Output the exec-prefix - out="$out $prefix" - ;; - --nonew) - ### Don't use the libNew library - new_set="no" - ;; - --new) - ### Use the libNew library - new_set="yes" - ;; - --noauxlibs) - noauxlibs="yes" - ;; - --noauxcflags) - noauxcflags="yes" - ;; - --noldflags) - noldflags="yes" - ;; - --version) - ### Output the version number. If RVersion.h can not be found, give up. - if test -r ${incdir}/RVersion.h; then - out="$out `sed -n 's,.*ROOT_RELEASE *\"\(.*\)\".*,\1,p' < ${incdir}/RVersion.h`" - else - echo "cannot read ${incdir}/RVersion.h" - exit 1 - fi - ;; - --svn-revision) - ### Output the version number. If RVersion.h can not be found, give up. - if test -r ${incdir}/RVersion.h; then - out="$out `sed -n 's,.*ROOT_SVN_REVISION *\([0-9]*\).*,\1,p' < ${incdir}/RVersion.h`" - else - echo "cannot read ${incdir}/RVersion.h" - exit 1 - fi - ;; - --python-version) - out="$out @PYTHON_VERSION@" - ;; - --cflags) - ### Output the compiler flags - if test ${incdir} != /usr/include; then - ### In case we're on a Win32 system, we need to expand the - ### path to a backslash seperated path - if test "$platform" = "win32"; then - includes=-I\'`cygpath -w ${incdir}`\' - else - includes=-I${incdir} - fi - fi - if test "x$noauxcflags" = "xyes" ; then - out="$out $includes" - else - out="$out ${auxcflags} $includes" - fi - ;; - --auxcflags) - ### Output auxiliary compiler flags - out="$out $auxcflags" - ;; - --ldflags) - ### Output linker flags - out="$out $auxldflags" - ;; - --libs) - ### Output regular ROOT libraries. If the user said --glibs --libs, - ### We've already output the libraries, so we skip this section - if test "x$libsout" = "xyes" ; then - shift - continue - fi - ### Set the flag - libsout="yes" - ### See if we need the new library - if test "x$new_set" = "xyes"; then - libs="${newlib} ${rootlibs}" - else - libs=${rootlibs} - fi - ### If we're on a win32 system, we need to change the -l prefix - ### into a .lib suffix, and expand the paths to a backslash - ### separated path. - if test "$platform" = "win32"; then - nlibs=`echo $libs | sed "s@-l\([a-zA-Z0-9]*\)@${libdir}/lib\1.lib@g"` - libs= - for i in $nlibs; do - libs="$libs '`cygpath -w $i`'" - done - else - if test "x$noldflags" = "xno" ; then - out="$out -L${libdir}" - fi - fi - if test "x$noauxlibs" = "xyes" ; then - out="$out $forcelibs $libs" - else - out="$out $forcelibs $libs ${auxlibs}" - fi - ;; - --glibs) - ### Output graphics and normal libraries - ### If the user said --libs --glibs, we don't need to add the - ### regular ROOT libraries. - glibsonly="no" - if test "x$libsout" = "xno" ; then - ### Set the flag - libsout="yes" - if test "x$new_set" = "xyes" ; then - glibs="${newlib} ${rootlibs} ${rootglibs}" - else - glibs="${rootlibs} ${rootglibs}" - fi - else - glibs="${rootglibs}" - glibsonly="yes" - fi - ### If we're on a win32 system, we need to change the -l prefix - ### into a .lib suffix, and expand the paths to a backslash - ### separated path. - if test "$platform" = "win32"; then - nlibs=`echo $glibs | sed "s@-l\([a-zA-Z0-9]*\)@${libdir}/lib\1.lib@g"` - glibs= - for i in $nlibs; do - glibs="$glibs '`cygpath -w $i`'" - done - else - if test "x$noldflags" = "xno" ; then - out="$out -L${libdir}" - fi - fi - if test "x$glibsonly" = "xyes" ; then - out="$out $forceglibs $glibs" - else - if test "x$noauxlibs" = "xyes" ; then - out="$out $forcelibs $forceglibs $glibs" - else - out="$out $forcelibs $forceglibs $glibs ${auxlibs}" - fi - fi - ;; - --auxlibs) - ### output the auxiliary libraries - out="$out $auxlibs" - ;; - --bindir) - ### output the executable directory - out="$out $bindir" - ;; - --libdir) - ### output the library directory - out="$out $libdir" - ;; - --incdir) - ### output the header directory - out="$out $incdir" - ;; - --etcdir) - ### output the etc directory - out="$out $etcdir" - ;; - --config) - ### output the configure arguments - out="$out $configargs" - ;; - --features) - ### output all supported features - out="$out$features" # no space, features starts with space - ;; - --dicttype) - ### output the dictionary type - out="$out $dicttype" - ;; - --cc) - ### output used C compiler - out="$out $altcc" - ;; - --cxx) - ### output used C++ compiler - out="$out $altcxx" - ;; - --f77) - ### output used Fortran compiler - out="$out $altf77" - ;; - --ld) - ### output used Linker - out="$out $altld" - ;; - --nostubs) - ### Output the prefix - out="$out $nostubs" - ;; - --nostubstest) - ### Output the prefix - out="$out $nostubstest" - ;; - --help) - ### Print a help message - echo "Usage: `basename $0` [options]" - echo "" - echo " --arch Print the architecture (compiler/OS)" - echo " --platform Print the platform (OS)" - echo " --prefix[=dir] Print or set prefix" - echo " --exec-prefix[=dir] Print or set execution prefix" - echo " --libs Print regular ROOT libraries" - echo " --glibs Print regular + GUI ROOT libraries" - echo " --cflags Print compiler flags and header path" - echo " --ldflags Print linker flags" - echo " --bindir Print the executable directory" - echo " --libdir Print the library directory" - echo " --incdir Print the header directory" - echo " --auxlibs Print auxiliary libraries" - echo " --auxcflags Print auxiliary compiler flags" - echo " --[no]new Turn on[off] use of libNew.so" - echo " --noauxlibs Do not print auxiliary/system libraries" - echo " --noauxcflags Do not print auxiliary compiler flags" - echo " --noldflags Do not print linker flags" - echo " --config Print arguments used for ./configure" - echo " --features Print list of all supported features" - echo " --has- Test if is compiled in" - echo " --dicttype Print dictionary generator being used" - echo " --version Print the ROOT version" - echo " --svn-revision Print the ROOT SVN revision number" - echo " --python-version Print the Python version used by ROOT" - echo " --cc Print alternative C compiler specified when ROOT was built" - echo " --cxx Print alternative C++ compiler specified when ROOT was built" - echo " --f77 Print alternative Fortran compiler specified when ROOT was built" - echo " --ld Print alternative Linker specified when ROOT was built" - echo " --nostubs Print yes if we are using the stubless calls" - echo " --nostubstest Print yes if we are using the stubless calls (in test mode)" - echo " --help Print this message" - exit 0 - ;; - *) - ### Give an error - echo "Unknown argument \"$1\"!" 1>&2 - echo "${usage}" 1>&2 - exit 1 - ;; - esac - shift -done - -### Output the stuff -echo $out diff --git a/cmake/scripts/rootrc.in b/cmake/scripts/rootrc.in deleted file mode 100644 index fc0792e7ee705..0000000000000 --- a/cmake/scripts/rootrc.in +++ /dev/null @@ -1,514 +0,0 @@ -# @(#)root/config:$Id: rootrc.in 24458 2008-06-21 11:56:48Z rdm $ -# Author: Fons Rademakers 22/09/95 - -# ROOT Environment settings are handled via the class TEnv. To see -# which values are active do: gEnv->Print(). - -# Path used by dynamic loader to find shared libraries. -# This path will be prepended to the (DY)LD_LIBRARY_PATH. -# Paths are different for Unix and Windows. The example shows the defaults -# for all ROOT applications for either Unix or Windows. -Unix.*.Root.DynamicPath: .:@LIB_INSTALL_DIR@: -WinNT.*.Root.DynamicPath: .;@bBIN_INSTALL_DIR@;$(PATH); - -# Path used to find macros. -# Paths are different for Unix and Windows. The example shows the defaults -# for all ROOT applications for either Unix or Windows. -Unix.*.Root.MacroPath: .:@MACRO_INSTALL_DIR@: -WinNT.*.Root.MacroPath: .;@MACRO_INSTALL_DIR@; - -# Path used to find plugin macros. -# Paths are different for Unix and Windows. The example shows the defaults -# for all ROOT applications for either Unix or Windows. -Unix.*.Root.PluginPath: :@ETC_INSTALL_DIR@/plugins: -WinNT.*.Root.PluginPath: ;@ETC_INSTALL_DIR@/plugins; - -# Path where to look for TrueType fonts. -Unix.*.Root.UseTTFonts: true -*.*.Root.TTFontPath: @FONT_INSTALL_DIR@ - -# Use Net* API functions. -WinNT.UseNetAPI: true - -# Use thread library (if exists). -Unix.*.Root.UseThreads: false - -# Select the compression algorithm (0=old zlib, 1=new zlib) -# Note, setting this to `0' may be a security vulnerability. -Root.ZipMode: 1 - -# Show where item is found in the specified path. -Root.ShowPath: false - -# Activate memory statistics (size and cnt is used to trap allocation of -# blocks of a certain size after cnt times). -Root.MemStat: 0 -Root.MemStat.size: -1 -Root.MemStat.cnt: -1 -Root.ObjectStat: 0 - -# Activate memory leak checker (use in conjunction with $ROOTSYS/bin/memprobe). -# Currently only works on Linux with gcc. -Root.MemCheck: 0 -Root.MemCheckFile: memcheck.out - -# Global debug mode. When >0 turns on progressively more details debugging. -Root.Debug: 0 -Root.Stacktrace: yes - -# Ignore errors lower than the ignore level. Possible values: -# Print, Info, Warning, Error, Break, SysError and Fatal. -Root.ErrorIgnoreLevel: Print - -# Settings for X11 behaviour. -X11.Sync: no -X11.FindBestVisual: yes -X11.UseXft: no -X11.XInitThread: yes - -# Settings for Win32 behavior. -Win32.UseSysPointers: no - -# Default editor. -Unix.*.Editor: vi -WinNT.*.Editor: notepad - -# Default 3d Viewer. -# By default 3-D views are shown in the pad, -# if the next line is activated, the default viewer will be OpenGL. -#Viewer3D.DefaultDrawOption: ogl - -# Default Fitter (current choices are Minuit and Fumili). -Root.Fitter: Minuit - -# Specify list of file endings which TTabCom (TAB completion) should ignore. -#TabCom.FileIgnore: .cpp:.h:.cmz - -# TCanvas specific settings. Opaque move and resize show full pad during -# the operation instead of only the outline. Especially for resize you'll -# need serious CPU power. UseScreenFactor=true means to size canvas according -# to size of screen, so a canvas still looks good on a low resolution -# laptop screen without having to change canvas size in macros. -# HighLightColor 2 = red. ShowEventStatus allows the event status bar to -# be turned on by default. AutoExec allows TExec objects to be executed -# on mouse and key events. -Canvas.MoveOpaque: false -Canvas.ResizeOpaque: false -Canvas.UseScreenFactor: true -Canvas.HighLightColor: 2 -Canvas.ShowEventStatus: false -Canvas.ShowToolBar: false -Canvas.ShowEditor: false -Canvas.AutoExec: true -Canvas.PrintDirectory . -#set the default precision when writing floating point numbers in TCanvas::SaveSource -Canvas.SavePrecision 7 - -# Printer settings. -#WinNT.*.Print.Command: AcroRd32.exe -#Unix.*.Print.Command: a2ps -P%p --landscape --columns=2 --margin=30 -rf8.0 %f -#Print.Printer: 32-rb20-hp -#Print.Directory: . -#Print.FileType: pdf - -# Default histogram binnings for TTree::Draw(). -Hist.Binning.1D.x: 100 - -Hist.Binning.2D.x: 40 -Hist.Binning.2D.y: 40 -Hist.Binning.2D.Prof: 100 - -Hist.Binning.3D.x: 20 -Hist.Binning.3D.y: 20 -Hist.Binning.3D.z: 20 -Hist.Binning.3D.Profx: 100 -Hist.Binning.3D.Profy: 100 - -# Default statistics parameters names. -Hist.Stats.Entries Entries -Hist.Stats.Mean Mean -Hist.Stats.MeanX Mean x -Hist.Stats.MeanY Mean y -Hist.Stats.RMS RMS -Hist.Stats.RMSX RMS x -Hist.Stats.RMSY RMS y -Hist.Stats.Underflow Underflow -Hist.Stats.Overflow Overflow -Hist.Stats.Integral Integral -Hist.Stats.Skewness Skewness -Hist.Stats.SkewnessX Skewness x -Hist.Stats.SkewnessY Skewness y -Hist.Stats.Kurtosis Kurtosis -Hist.Stats.KurtosisX Kurtosis x -Hist.Stats.KurtosisY Kurtosis y - -# THtml specific settings (for more see doc of THtml class). -Root.Html.SourceDir: . -Root.Html.Root: http://root.cern.ch/root/html -Root.Html.ViewCVS: http://root.cern.ch/viewcvs/trunk/%f?view=log -Root.Html.Search: http://www.google.com/search?q=%s+site%3A%u+-site%3A%u%2Fsrc%2F+-site%3A%u%2Fexamples%2F -#Root.Html.OutputDir: htmldoc/ -#Root.Html.Homepage: -#Root.Html.Header: -#Root.Html.Footer: -#Root.Html.Description: //____________________ -#Root.Html.Author: // Author: -#Root.Html.LastUpdate: // @(#) -#Root.Html.Copyright: * Copyright - -# GUI specific settings. -Gui.Backend: native -Gui.Factory: native -Gui.DefaultFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.MenuFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.MenuHiFont: -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.DocFixedFont: -*-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.DocPropFont: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1 -Gui.IconFont: -*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 -Gui.StatusFont: -*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1 -Gui.BackgroundColor: #c0c0c0 -Gui.ForegroundColor: black -Gui.SelectBackgroundColor: #000080 -Gui.SelectForegroundColor: white -Gui.DocumentBackgroundColor: white -Gui.DocumentForegroundColor: black -Gui.TooltipBackgroundColor: LightYellow -Gui.TooltipForegroundColor: black -Gui.IconPath: $(HOME)/icons:@ICON_INSTALL_DIR@:. -Gui.MimeTypeFile: $(HOME)/.root.mimes -# If above does not exists defaults to this: -#Gui.MimeTypeFile: @ETC_INSTALL_DIR@/root.mimes -Browser.Name: TRootBrowserLite -# Browser Options (plugins) -# F: File browser E: Text Editor H: HTML browser -# C: Canvas I: I/O redirection P: Proof G: GL viewer -Browser.Options: FECI -# Can be either small, big, list, details -Browser.IconStyle: small -# Can be either name, type, size, date -Browser.SortBy: name -Browser.GroupView: 10000 -Browser.ShowHidden: no -Browser.AutoThumbnail: yes - -# Rint (interactive ROOT executable) specific alias, logon and logoff macros. -Rint.Load: rootalias.C -Rint.Logon: rootlogon.C -Rint.Logoff: rootlogoff.C -# Record session commands, set to "-" to turn off command recording. -Rint.History: $(HOME)/.root_hist -# History file size, once HistSize is reached remove all but HistSave entries, -# set to 0 to turn off command recording. -# Can be overridden by environment variable ROOT_HIST=size[:save], -# the ":save" part is optional. -# Rint.HistSize: 500 -# Set to -1 for sensible default (80% of HistSize), set to 0 to disable history. -# Rint.HistSave: 400 -# Print a single line welcome message instead of the default verbose version -# Rint.WelcomeLite: no -# When the interactive ROOT starts, it can automatically load some frequently -# used includes. However, this introduces several overheads -# - A long list of CINT and system files will be kept open during the session -# - The initialisation takes more time (noticeable when using gdb or valgrind) -# - Memory overhead of about 5 Mbytes (1/3 of the base ROOT executable) when -# including -# You can set the variable below to 0 to disable the loading of these -# includes at startup. You can set the variable to 1 (default) to load -# only , and . You can set it to 2 to -# load in addition and . We strongly recommend setting -# the variable to 2 if your scripts include and you execute -# your scripts multiple times. -Rint.Includes: 1 - -# CINT: use wrappers for calls (larger dictionaries). -# Only checked if configured with --no-stubs-test; defaults to "use wrappers": -# Cint.EnableWrappers: 1 - -# ACLiC customization. -# ACLiC.Linkdef specifies the suffix that will be added to the script name to -# try to locate a custom linkdef file when generating the dictionary. -ACLiC.Linkdef: _linkdef -# Set a top directory for storing the libraries produced by ACLiC. -#ACLiC.BuildDir: /where/I/would/like/my/compiled/scripts -# Add additional include directives for ACLiC compilations. -#ACLiC.IncludePaths: -I/where/the/includes/are - -# PROOF related variables -# -# PROOF debug options. -# Proof.DebugLevel: 0 -# Proof.DebugMask: -1 -# -# PROOF GDB hooks -# allows a debugger to be attached early in the startup phase of proofserv -# 0 - don't wait -# 1 - master proofserv enters wait loop -# 2 - slave proofserv enters wait loop -# 3 - any proofserv enters wait loop -# -# Proof.GdbHook: 0 -# -# -# On the master enable parallel startup of workers using threads -# Proof.ParallelStartup: no -# -# Proof.StatsHist: no -# Proof.StatsTrace: no -# Proof.SlaveStatsTrace: no -# -# Proof.CondorHome: /opt/condor -# Proof.CondorConfig: /opt/condor/etc/condor_config -# -# PEAC.GmUrl: http://somewhere:8080/clarens/ -# PEAC.LmUrl: http://elsewhere:8080/clarens/ - -# Certificate and key -# Clarens.CertFile: $(HOME)/.globus/usercert.pem -# Clarens.KeyFile: $(HOME)/.globus/userkey.pem - -# Variables related to authentication to rootd and proofd. -# -# Default authentication method for rootd and proofd. -# These are supported for backward compatibility but have a very -# low priority. System defaults are generated by configure as a list -# in system.rootauthrc in $ROOTSYS/etc/ or /etc/root; the file -# $HOME/.rootauthrc can be used to override the system defaults. -# (0=UsrPwd, 1=SRP, 2=Krb5, 3=Globus,4=SSH, 5=UidGid) -Rootd.Authentication: 0 -Proofd.Authentication: 0 - -# Connection is shutdown at timeout expiration. Timeout is in seconds. -# Negotiation cannot be attempted at low level (i.e. inside -# TAuthenticate::Authenticate()) because of synchronization -# problems with the server. -# At higher level, TAuthenticate::HasTimedOut() gives information -# about timeout: 0 = no timeout; 1 = timeout, no methods left; -# 2 = timeout, still methods to be tried . -# Caller should decide about an additional attempt. -# Timeout disabled (< 0) by default. Can be changed on-the-fly -# with the static method TAuthenticate::SetTimeOut(to_value) -# -# Auth.Timeout: -1 - -# Password dialog box. -# Set to 0 if you do not want a dialog box to be popped-up -# when a password is requested. -# Default is 1. -# -# Auth.UsePasswdDialogBox: 0 - -# Set this to 1 if you want full SRP authentication in PROOF -# (Client-to-Master and Master-to-Slave). -Proofd.SendSRPPwd: 0 - -# Set this to 1 to use SSH authentication in PROOF servers -# (Master-to-Slave or Slaves-to-DataServers). This is switched -# off by default because credentials forwarding for SSH is not -# controlled by the system; however the user may have other -# ways to guarantee it, so it may want to switch it on. -ProofServ.UseSSH: 0 - -# Default login name (if not defined is taken from $(HOME)). -#UsrPwd.Login: qwerty -#SRP.Login: qwerty -#Krb5.Login: qwerty@LOCAL.DOM.AIN -#Globus.Login: cd:~/.globus cf:usercert.pem kf:userkey.pem ad:/etc/grid-security/certificates -#SSH.Login: qwerty -#UidGid.Login: qwerty - -# To be prompted for login information. -#UsrPwd.LoginPrompt: yes -#SRP.LoginPrompt: yes -#Krb5.LoginPrompt: yes -#Globus.LoginPrompt: yes -#SSH.LoginPrompt: yes -#UidGid.LoginPrompt: yes - -# To reuse established security context. -UsrPwd.ReUse: yes -SRP.ReUse: no -Krb5.ReUse: no -Globus.ReUse: yes -SSH.ReUse: yes - -# Duration validity of the sec context for UsrPwd, SRP and SSH. -# Format: : (default 24:00) -#UsrPwd.Valid: 24:00 -#SRP.Valid: 24:00 -#SSH.Valid: 24:00 - -# To control password encryption for UsrPwd authentication. -UsrPwd.Crypt: yes - -# Globus miscellanea. -# Globus Proxy duration: HH:MM (ex 12:15 for 12 hours and 15 min) -# 'default' for system default. -Globus.ProxyDuration: default -#Globus.ProxyDuration: 14 -# Number of bits for the initial key. -Globus.ProxyKeyBits: 1024 - -# Path to alternative 'ssh' (to override $PATH if ever needed). -#SSH.ExecDir: /usr/bin - -# In case of error, SSH returns 1 (or 256 = 0x100). -# To trap those errors for which one should retry, error printouts -# must be parsed; any substring found under the Env SSH.ErrorRetry -# triggers a retry condition; strings can be added here -# in the form (including double quotes): -# +SSH.ErrorRetry: "" -# This is what one usually gets if the server has reached the maximum -# number of sshd daemons (defined by MaxStartups in sshd_config); -# this is a typical case in which one should retry. -SSH.ErrorRetry: "Connection closed by remote host" -# Max number of retries for SSH in case of retry error (see above). -SSH.MaxRetry: 100 - -# Type of key to be used for RSA encryption: -# 0 = local; 1 = SSL (default if openssl available). -RSA.KeyType: 1 - -# In case of 'RSA.KeyType: 1' this specifies the number of bits to -# be used for the Blowfish key used to encrypt the exchanged information -# Default 256, minimum 128, maximum 15912. -#SSL.BFBits: 256 - -# Server authentication in TServerSocket. -# -# General: file with server access rules -#SrvAuth.DaemonRc: /etc/root/system.daemonrc -# -# UsrPwd: check of host equivalence via /etc/hosts.equiv or $HOME/.rhosts. -#SrvAuth.CheckHostsEquivalence: 1 -# -# SRP: pass file (default $HOME/.srootdpass). -#SrvAuth.SRPpassfile: $HOME/.srootdpass -# -# Globus/GSI: hostcert configuration file. -#SrvAuth.HostCert: /etc/root/hostcert.conf -# Globus/GSI: gridmap file. -#SrvAuth.GridMap: /etc/grid-security/grid-mapfile -# -# SSH: port for the sshd daemon. -#SrvAuth.SshdPort: 22 - -# Force file opening via TNetFile (TXNetFile) if a hostname is specified -# in the Url. -# By default, for local files TFile::Open() invokes directly TFile -#TFile.ForceRemote: yes - -# Control the action to be taken when opening an existing ROOT file which -# looks corrupted; by default an attempt to recover the file is made; if -# this variable is set to no the file is just flagged as zombie. -#TFile.Recover: no - -# Control the usage of asynchronous reading capabilities eventually -# supported by the underlying TFile implementation. Default is yes. -#TFile.AsyncReading: no - -# Special cases for the TUrl parser, where the special cases are parsed -# in a protocol + file part, like rfio:host:/path/file.root, -# castor:/path/file.root or /alien/path/file.root. -# In case the file namespace descriptor ends with - the namespace -# is not a part of the filename. -# Extend in private .rootrc with a +Url.Special line. -Url.Special: file: rfio: hpss: castor: gfal: dcache: -+Url.Special: /alien/- /castor/ - -# PROOF XRD client variables -# Debug level (<0 : errors, 0 : minimal, 1 : low, 2 : medium, 3 : high) [-1] -# XProof.Debug: 0 -# Socket read timeout [in secs: default 10 secs] -# XProof.ReadTimeout: 10 - -# The following env vars are handled by TXNetFile and related classes -# (module netx, libNetx.so). -# -# XNet.ConnectTimeout - maximum time to wait before server's -# response on a connect [10 s] -# XNet.RequestTimeout - maximum time to wait before considering -# a read/write failure [60 s] -# XNet.ConnectDomainAllowRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is granted access to for the -# first connection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.ConnectDomainDenyRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is denied access to for the -# first connection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.RedirDomainAllowRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is granted access to for a -# redirection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.RedirDomainDenyRE -# - sequence of TRegexp regular expressions -# separated by a |. -# A domain is denied access to for a -# redirection if it matches one of these -# regexps. Example: -# slac.stanford.edu|pd.infn.it|fe.infn.it -# XNet.MaxRedirectCount - maximum number of redirections from -# server [255] -# XNet.Debug - log verbosity level -# (0=nothing, -# 1=messages of interest to the user, -# 2=messages of interest to the developers -# (includes also user messages), -# 3=dump of all sent/received data buffers -# (includes also user and developers -# messages). [0] -# XNet.ReconnectTimeout - sleep-time before going back to the -# load balancer (or rebouncing to the same -# failing host) after a read/write error -# [10 s] -# XNet.ReadAheadSize - read ahead value, in bytes, to use with the XrdClient -# internal caching scheme -# Generally not much useful together with the TFile cache, -# which will disable the readahead as soon it starts operating, -# i.e. requesting async data through XrdClient. -# Note that we cannot suppose that the TFile cache -# will start working at the beginning of the data processing. -# Setting a read ahead size > 0 will involve this phase, -# sometimes it could be an advantage, sometimes not. -# If > 0, TXNetFile will switch it on again if it sees that -# synchronous ReadBuffer requests are issued again - -XNet.ReadAheadSize: 500000 - -# XNet.ReadCacheSize - Default read cache size inside XrdClient, in bytes. -# TXNetFile/TFileReadCache automatically sets this to a -# 'correct' value when needed. -# Set a value here to override a *minimum* -# size. It is not preallocated. -# TFile/TXNetFile can anyway make it grow -# automatically when needed. - -XNet.ReadCacheSize: 10000000 - -# XNet.FirstConnectMaxCnt -# - Number of connect retries to the first host -# XNet.PrintTAG - Print a particular string the developers -# can choose to quickly recognize the -# version at run time [0] -# -# XNet.ParStreamsPerPhyConn -# - Number of additional TCP streams to use per -# each physical connection -# 0=monostream mode -# 1-15=multistream mode - -XNet.ParStreamsPerPhyConn: 0 - -# Example of custom setting for the Rint application (root.exe). -# This overrides the default specified above for a generic application. -# Color 5 is yellow. -Rint.Canvas.HighLightColor: 5 diff --git a/cmake/scripts/testsingle.cxx.in b/cmake/scripts/testsingle.cxx.in deleted file mode 100644 index 0cfb81dc0d185..0000000000000 --- a/cmake/scripts/testsingle.cxx.in +++ /dev/null @@ -1,1553 +0,0 @@ -#! @CMAKE_BINARY_DIR@/bin/ -/* /% C++ %/ */ -/*********************************************************************** - * cint (C/C++ interpreter) - ************************************************************************ - * C++ Script testcint.cxx - ************************************************************************ - * Description: - * Automatic test suite of cint - ************************************************************************ - * Copyright(c) 2002~2004 Masaharu Goto - * - * For the licensing terms see the file COPYING - * - ************************************************************************/ -// Usage: -// $ cint testall.cxx - -#include -#ifdef G__ROOT -#include "@CMAKE_BINARY_DIR@/include/configcint.h" -#else -#include "../inc/configcint.h" -#endif - -#ifndef G__VISUAL // ??? fprintf crashes if stdfunc.dll is loaded ??? -#include -#include -#endif - -#ifdef DEBUG2 -#ifndef DEBUG -#define DEBUG -#endif -#endif - -char* debug = 0; -bool bKeepOnGoing = false; -bool bIgnoreDiffErrors = false; -bool bHideKnownErrors = false; -#ifndef DEBUG -bool debugMode = false; -#else -bool debugMode = true; -#endif - -#include - -const char *shellSeparator = "&&"; - -#ifdef G__ROOT -// ROOT disable the autoloading of the standard header from the compiled -// dictionary (see G__autoload_stdheader) however the cint test requires it -std::string mkcintoption = " -Z1 "; -std::string cintoption = " -Z1 -I@CMAKE_BINARY_DIR@/include -I@CMAKE_BINARY_DIR@/cint/cint/include "; -#else -std::string mkcintoption = ""; -std::string cintoption = ""; -#endif // G__ROOT -std::string compileroption = ""; -std::string prefixcmd = ""; - -enum ELanguage { - kLangUnknown, - kLangC, - kLangCXX -}; - -//______________________________________________________________________________ -int clear(const char* fname) -{ - // -- Erase a file. - FILE* fp = fopen(fname, "w"); - fclose(fp); - return 0; -} - -//______________________________________________________________________________ -int exist(const char* fname) -{ - // -- Check if a file exists. - FILE* fp = fopen(fname, "r"); - if (fp) { - fclose(fp); - return 1; - } - return 0; -} - -//______________________________________________________________________________ -int rm(const char* fname) -{ - // -- Delete a file. - int stat; - do { - stat = remove(fname); - } - while (exist(fname)); - return stat; -} - -//______________________________________________________________________________ -char *cleanAndCreateDirectory(const char *tname) -{ - // Create an empty directory with the same name, without extension - // as the test. - - char com[4096]; - - char *dir = new char[strlen(tname)+1]; - strcpy(dir,tname); - char *cursor = strstr(dir,"."); - if (cursor) { - *cursor = '\0'; - }; - - char com[4096]; - - sprintf(com,"rm -rf %s",dir); - run(com); - sprintf(com,"mkdir %s",dir); - run(com); - - return dir; -} - -//______________________________________________________________________________ -void cleanDirectory(const char* dir) -{ - // Delete a test directory - char com[4096]; - sprintf(com,"rm -rf %s",dir); - run(com); -} - -//______________________________________________________________________________ -int cat(FILE* fout, const char* fname) -{ - // -- Display a file on a given output file. - FILE* fp = fopen(fname, "r"); - char b1[4096]; - while (fgets(b1, 4096, fp)) { - fprintf(fout, "%s", b1); - } - fclose(fp); - return 0; -} - -//______________________________________________________________________________ -int run(const char* com, bool show_when_debug = true) -{ - // -- Run a system command. - if (debugMode && show_when_debug) printf("%s\n", com); - - //printf("%s\n", com); - fflush(stdout); - int ret = system(com); - if (ret) { - printf("FAILED with code %d: %s\n", ret, com); - if (!bKeepOnGoing) { - exit(ret); - } - } - return ret; -} - -//______________________________________________________________________________ -int readahead(FILE* fp, const char* b, const int ahead = 10) -{ - // -- FIXME: Describe this function! - if (!fp) { - return 0; - } - int result = 0; - fpos_t p; - fgetpos(fp, &p); - char buf[4096]; - int a = 0; - for (int i = 0; i < ahead; ++i) { - char* c = fgets(buf, 4096, fp); - ++a; - if (!c) { - break; - } - if (!strcmp(b, buf)) { - result = a; - break; - } - } - fsetpos(fp, &p); - return result; -} - -//______________________________________________________________________________ -void outdiff(FILE* fp, FILE* fpi, int a, const char* b, int& l, const char* m) -{ - // -- FIXME: Describe this function! - for (int i = 0; i < a; i++) { - fprintf(fp, "%3d%s %s", l, m, b); - if (!fpi) { - break; - } - char* c = fgets((char*) b, 400, fpi); - ++l; - if (!c) { - break; - } - } -} - -//______________________________________________________________________________ -void checkdiff(FILE* fp, FILE* fp1, FILE* fp2, char* b1, const char* b2, int& l1, int& l2, const char* m1, const char* m2) -{ - // -- FIXME: Describe this function! - int a1 = readahead(fp1, b2); - int a2 = readahead(fp2, b1); - if (a1 && a2) { - if (a1 <= a2) { - outdiff(fp, fp1, a1, b1, l1, m1); - } - else { - outdiff(fp, fp2, a2, b2, l2, m2); - } - } - else if (a1) { - outdiff(fp, fp1, a1, b1, l1, m1); - } - else if (a2) { - outdiff(fp, fp2, a2, b2, l2, m2); - } - else { - fprintf(fp, "%3d%s %s", l1, m1, b1); - fprintf(fp, "%3d%s %s", l2, m2, b2); - } -} - -//______________________________________________________________________________ -int diff(const char* title, const char* f1, const char* f2, const char* out, const char* macro = "", const char* m1 = ">", const char* m2 = "<") -{ - // -- FIXME: Describe this function! - FILE* fp = fopen(out, "a"); - FILE* fp1 = fopen(f1, "r"); - FILE* fp2 = fopen(f2, "r"); - char b1[4096]; - char b2[4096]; - char* c1 = 0; - char* c2 = 0; - int l1 = 0; - int l2 = 0; - fprintf(fp, "%s %s\n", title, macro); - for (;;) { - if (fp1) { - c1 = fgets(b1, 4096, fp1); - ++l1; - } - else { - c1 = 0; - } - if (fp2) { - c2 = fgets(b2, 4096, fp2); - ++l2; - } - else { - c2 = 0; - } - if (c1 && c2) { - if (strcmp(b1, b2)) { - // -- -#ifndef G__VISUAL - checkdiff(fp, fp1, fp2, b1, b2, l1, l2, m1, m2); -#else // G__VISUAL - fprintf(fp, "%3d%s %s", l1, m1, b1); - fprintf(fp, "%3d%s %s", l2, m2, b2); -#endif // G__VISUAL - // -- - } - } - else if (c1) { - fprintf(fp, "%3d%s %s", l1, m1, b1); - } - else if (c2) { - fprintf(fp, "%3d%s %s", l2, m2, b2); - } - else { - break; - } - } - if (fp2) { - fclose(fp2); - } - if (fp1) { - fclose(fp1); - } - if (fp) { - fclose(fp); - } - return 0; -} - -//______________________________________________________________________________ -int ediff(const char* title, const char* macro, const char* dfile, const char* compiled = "compiled") -{ - // -- Call the system diff to compare 2 files (dfile and compiled). - FILE* fp = fopen(dfile, "a"); - fprintf(fp, "%s %s\n", title, macro); - fclose(fp); - char com[4096]; -#if G__VISUAL - const char* extraoption = "--strip-trailing-cr "; -#else // G__VISUAL - const char* extraoption = ""; -#endif // G__VISUAL - sprintf(com, "diff %s --old-group-format=\"%s %s:%%c'\\012'%%<\" --new-group-format=\"%s interpreted:%%c'\\012'%%>\" --unchanged-line-format=\"\" --old-line-format=\" %%3dn: %%L\" --new-line-format=\" %%3dn: %%L\" %s interpreted>> %s", extraoption, title, compiled, title, compiled, dfile); - int ret; - if (bIgnoreDiffErrors) { - // for now we want to continue despite diffs in the text - ret = system(com); - } else { - ret = run(com,false); - } - return ret; -} - -//______________________________________________________________________________ -bool check_skip(const char* sname) -{ - // -- FIXME: Describe this function! - if (debug) { - if (debug[0] == '+') { - if (debug[1] == '+') { - if (!strcmp(debug + 2, sname)) { - debug = 0; - } - return true; - } - else { - if (strcmp(debug + 1, sname)) { - return true; - } - else { - debug = 0; - } - } - } - else - if (strcmp(debug, sname)) { - return true; - } -#ifdef CONTINUE_TEST - else { - debug = 0; - } -#endif // CONTINUE_TEST - } - return false; -} - -//______________________________________________________________________________ -int buildDictionaryLibrary(ELanguage lang, const char *dir, const char* sname, const char* macro, const char* src, const char *suffix = "") -{ - // Generate the shared library with a dictionary for the test. - // Run makecint then run the generate makefile. - - char com[4096]; - - const char *hopt = lang == kLangCXX ? "H" : "h"; - - sprintf(com, "cd %s %s makecint -mk Makefile%s %s -dl test%s.dll %s -%s ../%s %s", - dir, shellSeparator, suffix, mkcintoption.c_str(), suffix, macro, hopt, sname, src); - run(com); - sprintf(com, "cd %s %s make -f Makefile%s",dir,shellSeparator,suffix); - run(com); - -} - - -//______________________________________________________________________________ -int ci(ELanguage lang, const char* sname, const char* dfile, const char* cflags = "", const char* exsname = "", const char* cintopt = "", const char *dir = ".") -{ - // -- Compare compiled and interpreted result. - if (check_skip(sname)) { - return 0; - } - printf("%s %s %s\n", sname, cflags, exsname); - char exename[4096]; - strcpy(exename, sname); - char* posExt = strrchr(exename, '.'); - if (posExt) { - strcpy(posExt, ".exe"); - } - // compile source - const char* comp = 0; - const char* flags = 0; - const char* macros = 0; - const char* ldflags = 0; - const char* link = ""; - if (lang == kLangC) { - comp = G__CFG_CC; - flags = G__CFG_CFLAGS; - ldflags = G__CFG_LDFLAGS; - macros = G__CFG_CMACROS; - } - else if (lang == kLangCXX) { - comp = G__CFG_CXX; - flags = G__CFG_CXXFLAGS; - ldflags = G__CFG_LDFLAGS; - macros = G__CFG_CXXMACROS; - } - else { - printf("ERROR in ci: language is not set!\n"); - return 0; - } -#if defined(G__WIN32) - link = "/link"; -#endif - char com[4096]; - sprintf(com, "%s -Dcompiled %s %s %s %s %s %s %s%s %s %s", comp, cflags, - compileroption.c_str(), - flags, macros, sname, exsname, G__CFG_COUTEXE, exename, link, ldflags); - //fprintf(stderr, "ci: run: %s\n", com); - run(com); - // run compiled program -#ifdef G__WIN32 - sprintf(com, ".\\%s > compiled", exename); -#else // G__WIN32 - sprintf(com, "./%s > compiled", exename); -#endif // G__WIN32 - //fprintf(stderr, "ci: run: %s\n", com); - run(com); -#ifdef DEBUG2 - //fprintf(stderr, "ci: run: %s\n", exename); - run(exename); -#endif // DEBUG2 -#ifndef DEBUG - //fprintf(stderr, "ci: rm %s\n", exename); - rm(exename); -#endif // DEBUG -#if defined(G__WIN32) || defined(G__CYGWIN) - if (posExt) { - strcpy(posExt, ".obj"); - } - rm(exename); - if (posExt) { - strcpy(posExt, ".exe.manifest"); - } - rm(exename); - if (posExt) { - strcpy(posExt, ".pdb"); - } - rm(exename); -#endif // G__WIN32 || G__CYGWIN -#ifdef G__BORLAND - if (posExt) { - strcpy(posExt, ".tds"); - } - rm(exename); -#endif - // run interpreted program - sprintf(com, "%s @CintName@ -I%s %s %s -Dinterp %s %s %s %s > interpreted", prefixcmd.c_str(), dir, cintoption.c_str(), debug ? "-DDEBUG" : "", cintopt, cflags, exsname, sname); - //fprintf(stderr, "ci: run: %s\n", com); - run(com); - int ret = ediff(sname, cflags, dfile); -#ifndef DEBUG - //fprintf(stderr, "ci: rm %s\n", "compiled"); - rm("compiled"); - //fprintf(stderr, "ci: rm %s\n", "interpreted"); - rm("interpreted"); -#endif // DEBUG - return ret; -} - -//______________________________________________________________________________ -int io(const char* sname, const char* old, const char*dfile, const char* macro = "") -{ - // -- Check output of interpreted program. - if (check_skip(sname)) { - return 0; - } - printf("%s\n", sname); - // run interpreted program - char com[4096]; - sprintf(com, "%s @CintName@ %s %s %s > interpreted", prefixcmd.c_str(), cintoption.c_str(), macro, sname); - run(com); - int ret = ediff(sname, "", dfile, old); - //diff(sname, old, "interpreted", dfile, "", "o", "i"); - rm("interpreted"); - return ret; -} - -//______________________________________________________________________________ -int mkc(ELanguage lang, const char* sname, const char* dfile, const char* macro = "", const char* src = "") -{ - // -- Check difference in output between compiled and interpreted code, with dictionary. - if (check_skip(sname)) { - return 0; - } - printf("%s\n", sname); - - char *dir = cleanAndCreateDirectory(sname); - buildDictionaryLibrary(kLangCXX, dir, sname, macro, src); - - char com[4096]; - // run interpreted program - sprintf(com, "-DHNAME=\\\"%s\\\" -DDNAME=\\\"%s/test.dll\\\"", sname,dir); - int ret = ci(lang, "mkcmain.cxx", dfile, com, "", "", dir); -#ifndef DEBUG - cleanDirectory(dir); -#endif // DEBUG - delete [] dir; - return ret; -} - -//______________________________________________________________________________ -int mkco(ELanguage lang, const char* sname, const char* hname, const char* old, const char* dfile, const char* macro = "", const char* src = "", const char* cintopt = "") -{ - // -- Check output of interpreted code, with dictionary. - if (check_skip(sname)) { - return 0; - } - printf("%s\n", sname); - char *dir = cleanAndCreateDirectory(sname); - buildDictionaryLibrary(lang, dir, hname, macro, src); - - // run interpreted program - char imacro[4096]; - sprintf(imacro, "%s -Dmakecint", macro); - int ret = io(sname, old, dfile, imacro); - -#ifndef DEBUG - cleanDirectory(dir); -#endif // DEBUG - delete [] dir; - return ret; -} - -//______________________________________________________________________________ -int mkci(ELanguage lang, const char* sname, const char* hname, const char* dfile, const char* macro = "", const char* src = "", const char* cintopt = "") -{ - // -- Check difference in output of compiled and interpreted code, with dictionary. - if (check_skip(sname)) { - return 0; - } - printf("%s\n", sname); - char *dir = cleanAndCreateDirectory(sname); - buildDictionaryLibrary(lang, dir, hname, macro, src); - - // run interpreted program - char imacro[4096]; - sprintf(imacro, "%s -Dmakecint", macro); - int ret = ci(lang, sname, dfile, imacro, "", cintopt, dir); - -#ifndef DEBUG - cleanDirectory(dir); - #endif // DEBUG - delete [] dir; - return ret; -} - -//______________________________________________________________________________ -int mkciN(ELanguage lang, const char* sname, const char* hname1, const char* dfile, const char* macro = "", const char* hname2 = "", const char* hname3 = "") -{ - // -- Check difference in output between compiled and interpreted code, with up to three dictionaries. - if (check_skip(sname)) { - return 0; - } - printf("%s\n", sname); - - char *dir = cleanAndCreateDirectory( sname ); - buildDictionaryLibrary(lang, dir, hname1, macro, "", "1"); - if (hname2[0]) buildDictionaryLibrary(lang, dir, hname2, macro, "", "2"); - if (hname3[0]) buildDictionaryLibrary(lang, dir, hname3, macro, "", "3"); - - // run interpreted program - char imacro[4096]; - sprintf(imacro, "%s -Dmakecint2", macro); - int ret = ci(lang, sname, dfile, imacro, "", "", dir); -#ifndef DEBUG - cleanDirectory( dir ); -#endif // DEBUG - delete [] dir; - return ret; -} - -//______________________________________________________________________________ -int testn(ELanguage lang, const char* hdr, int* num, const char* ext, const char* dfile, const char* macro = "") -{ - // -- Test series of files with enumerated suffix. - char sname[4096]; - int ret = 0; - int i = 0; - while (num[i] != -1) { - sprintf(sname, "%s%d%s", hdr, num[i], ext); - ret += ci(lang, sname, dfile, macro); - ++i; - } - return ret; -} - -//______________________________________________________________________________ -int main(int argc, char** argv) -{ - // Put this default first so it can be - // over-ridden - cintoption += " -O0 "; - - const char* difffile = "testdiff.txt"; - const char* filename; - - for (int i=0;i \n",argv[0]); - return 1; - } - - - if (!strcmp("-f", argv[1])) { - filename = argv[2]; - /* - filename = argv[3]; - cout<<"Long: "< \n",argv[0]); - return 1; - } - - clear(difffile); - -int ret = 0; - - if (!strcmp("simple01.cxx", filename)) { - fprintf(stderr,"Bin hier.\n"); - ret += io("simple01.cxx","simple01.ref",difffile,"-DTARGET=\\\"simple01.cxx\\\""); - } - else if (!strcmp("simple10.cxx", filename)) { - ret += ci(kLangCXX, "simple10.cxx", difffile); - } - else if (!strcmp("simple11.cxx", filename)) { - ret += ci(kLangCXX, "simple11.cxx", difffile); - ret += mkci(kLangCXX, "simple11.cxx", "simple11.cxx", difffile); - } - else if (!strcmp("simple12.cxx", filename)) { - ret += io("simple12.cxx", "simple12.ref", difffile); - } - else if (!strcmp("simple13.cxx", filename)) { - ret += io("simple13.cxx", "simple13.ref", difffile); - } - else if (!strcmp("simple14.cxx", filename)) { - ret += ci(kLangCXX, "simple14.cxx", difffile); - } - else if (!strcmp("simple15.cxx", filename)) { - ret += ci(kLangCXX, "simple15.cxx", difffile); - } - else if (!strcmp("simple16.cxx", filename)) { - ret += ci(kLangCXX, "simple16.cxx", difffile); - } - else if (!strcmp("simple17.cxx", filename)) { - ret += ci(kLangCXX, "simple17.cxx", difffile); - } - else if (!strcmp("simple18.cxx", filename)) { - ret += ci(kLangCXX, "simple18.cxx", difffile); - } - else if (!strcmp("simple19.cxx", filename)) { - ret += ci(kLangCXX, "simple19.cxx", difffile); - } - else if (!strcmp("simple20.cxx", filename)) { - ret += io("simple20.cxx", "simple20.ref", difffile); - } - else if (!strcmp("simple21.cxx", filename)) { - ret += io("simple21.cxx", "simple21.ref", difffile); - } - else if (!strcmp("simple22.cxx", filename)) { - ret += io("simple22.cxx", "simple22.ref", difffile); - } - else if (!strcmp("simple23.cxx", filename)) { - ret += io("simple23.cxx", "simple23.ref", difffile); - } - else if (!strcmp("simple24.cxx", filename)) { - ret += io("simple24.cxx", "simple24.ref", difffile); - } - else if (!strcmp("simple25.cxx", filename)) { - ret += mkci(kLangCXX,"simple25.cxx","simple25.h",difffile); - } - else if (!strcmp("cpp0.cxx", filename)) { - ret += ci(kLangCXX, "cpp0.cxx", difffile); - } - else if (!strcmp("cpp1.cxx", filename)) { - ret += ci(kLangCXX, "cpp1.cxx", difffile); - } - else if (!strcmp("cpp2.cxx", filename)) { - ret += ci(kLangCXX, "cpp2.cxx", difffile); - } - else if (!strcmp("cpp3.cxx", filename)) { - ret += ci(kLangCXX, "cpp3.cxx", difffile); - } - else if (!strcmp("cpp4.cxx", filename)) { - ret += ci(kLangCXX, "cpp4.cxx", difffile); - } - else if (!strcmp("cpp5.cxx", filename)) { - ret += ci(kLangCXX, "cpp5.cxx", difffile); - } - else if (!strcmp("cpp6.cxx", filename)) { - ret += ci(kLangCXX, "cpp6.cxx", difffile); - } - else if (!strcmp("cpp8.cxx", filename)) { - ret += ci(kLangCXX, "cpp8.cxx", difffile); - } - else if (!strcmp("bool01.cxx", filename)) { - ret += ci(kLangCXX, "bool01.cxx", difffile); - } - else if (!strcmp("switch.cxx", filename)) { - ret += ci(kLangCXX, "switch.cxx", difffile); - } - else if (!strcmp("refassign.cxx", filename)) { - ret += ci(kLangCXX, "refassign.cxx", difffile); - } - else if (!strcmp("ostream.cxx", filename)) { - // cout << pointer - ret += ci(kLangCXX, "ostream.cxx", difffile); - } - else if (!strcmp("setw0.cxx", filename)) { - ret += ci(kLangCXX, "setw0.cxx", difffile); - } - else if (!strcmp("inherit0.cxx", filename)) { - ret += ci(kLangCXX, "inherit0.cxx", difffile); - } - else if (!strcmp("inherit1.cxx", filename)) { - ret += ci(kLangCXX, "inherit1.cxx", difffile); - } - else if (!strcmp("inherit2.cxx", filename)) { - ret += ci(kLangCXX, "inherit2.cxx", difffile); - } - else if (!strcmp("virtualfunc0.cxx", filename)) { - ret += ci(kLangCXX, "virtualfunc0.cxx", difffile); - } - else if (!strcmp("virtualfunc1.cxx", filename)) { - ret += ci(kLangCXX, "virtualfunc1.cxx", difffile); - } - else if (!strcmp("virtualfunc2.cxx", filename)) { - ret += ci(kLangCXX, "virtualfunc2.cxx", difffile); - } - else if (!strcmp("oprovld0.cxx", filename)) { - ret += ci(kLangCXX, "oprovld0.cxx", difffile); - } - else if (!strcmp("oprovld2.cxx", filename)) { - ret += ci(kLangCXX, "oprovld2.cxx", difffile); - } - else if (!strcmp("constary.cxx", filename)) { - ret += ci(kLangCXX, "constary.cxx", difffile); - } - else if (!strcmp("const.cxx", filename)) { - ret += ci(kLangCXX, "const.cxx", difffile); - } - else if (!strcmp("scope0.cxx", filename)) { - ret += ci(kLangCXX, "scope0.cxx", difffile); - } - else if (!strcmp("idxscope0.cxx", filename)) { - ret += ci(kLangCXX, "idxscope0.cxx", difffile); - } - else if (!strcmp("access0.cxx", filename)) { - ret += ci(kLangCXX, "access0.cxx", difffile); - } - else if (!strcmp("staticmem0.cxx", filename)) { - ret += ci(kLangCXX, "staticmem0.cxx", difffile); - } - else if (!strcmp("staticmem1.cxx", filename)) { - ret += ci(kLangCXX, "staticmem1.cxx", difffile); - } - else if (!strcmp("staticary.cxx", filename)) { - ret += ci(kLangCXX, "staticary.cxx", difffile); - } - else if (!strcmp("static_object.cxx", filename)) { - ret += ci(kLangCXX, "static_object.cxx", difffile); - } - else if (!strcmp("static_string.cxx", filename)) { - ret += ci(kLangCXX, "static_string.cxx", difffile); - } - else if (!strcmp("static_call.cxx", filename)) { - ret += ci(kLangCXX, "static_call.cxx", difffile); - } - else if (!strcmp("minexam.cxx", filename)) { - ret += ci(kLangCXX, "minexam.cxx", difffile); - } - else if (!strcmp("btmplt.cxx", filename)) { - ret += ci(kLangCXX, "btmplt.cxx", difffile); - } - else if (!strcmp("loopcompile1.cxx", filename)) { - ret += ci(kLangCXX, "loopcompile1.cxx", difffile); - } - else if (!strcmp("loopcompile2.cxx", filename)) { - ret += ci(kLangCXX, "loopcompile2.cxx", difffile); - } - else if (!strcmp("loopcompile3.cxx", filename)) { - ret += ci(kLangCXX, "loopcompile3.cxx", difffile); - } - else if (!strcmp("loopcompile4.cxx", filename)) { - ret += ci(kLangCXX, "loopcompile4.cxx", difffile); - } - else if (!strcmp("loopcompile5.cxx", filename)) { - ret += ci(kLangCXX, "loopcompile5.cxx", difffile); - } - else if (!strcmp("mfstatic.cxx", filename)) { - ret += ci(kLangCXX, "mfstatic.cxx", difffile); - } - else if (!strcmp("new0.cxx", filename)) { - ret += ci(kLangCXX, "new0.cxx", difffile); - } - else if (!strcmp("template0.cxx", filename)) { - ret += ci(kLangCXX, "template0.cxx", difffile); - } - else if (!strcmp("template1.cxx", filename)) { - ret += ci(kLangCXX, "template1.cxx", difffile); - } - else if (!strcmp("template2.cxx", filename)) { - ret += ci(kLangCXX, "template2.cxx", difffile); - } - else if (!strcmp("template3.cxx", filename)) { - ret += io("template3.cxx", "template3.ref", difffile); - } - else if (!strcmp("template4.cxx", filename)) { - ret += ci(kLangCXX, "template4.cxx", difffile); - } - else if (!strcmp("template5.cxx", filename)) { - #if defined(G__MSC_VER)&&(G__MSC_VER<=1200) - ret += 0; - #else - ret += ci(kLangCXX, "template5.cxx", difffile); - #endif // G__MSC__VER && (G__MSC_VER <= 1200) - } - else if (!strcmp("template6.cxx", filename)) { - ret += ci(kLangCXX, "template6.cxx", difffile); - } - else if (!strcmp("minherit0.cxx", filename)) { - ret += ci(kLangCXX, "minherit0.cxx", difffile); - } - else if (!strcmp("enumscope.cxx", filename)) { - ret += ci(kLangCXX, "enumscope.cxx", difffile); - } - else if (!strcmp("baseconv0.cxx", filename)) { - ret += ci(kLangCXX, "baseconv0.cxx", difffile); - } - else if (!strcmp("friend0.cxx", filename)) { - ret += ci(kLangCXX, "friend0.cxx", difffile); - } - else if (!strcmp("anonunion.cxx", filename)) { - ret += ci(kLangCXX, "anonunion.cxx", difffile); - } - else if (!strcmp("init1.cxx", filename)) { - ret += ci(kLangCXX, "init1.cxx", difffile); - } - else if (!strcmp("init2.cxx", filename)) { - ret += ci(kLangCXX, "init2.cxx", difffile); - } - else if (!strcmp("include.cxx", filename)) { - ret += ci(kLangCXX, "include.cxx", difffile); - } - else if (!strcmp("eh1.cxx", filename)) { - ret += ci(kLangCXX, "eh1.cxx", difffile); - } - else if (!strcmp("ifs.cxx", filename)) { - ret += ci(kLangCXX, "ifs.cxx", difffile); - } - else if (!strcmp("bitfield.cxx", filename)) { - ret += ci(kLangCXX, "bitfield.cxx", difffile); - } - else if (!strcmp("cout1.cxx", filename)) { - ret += ci(kLangCXX, "cout1.cxx", difffile); - } - else if (!strcmp("longlong.cxx", filename)) { - ret += ci(kLangCXX, "longlong.cxx", difffile); - } - else if (!strcmp("explicitdtor.cxx", filename)) { - //fails due to base class dtor - ret += ci(kLangCXX, "explicitdtor.cxx", difffile); - } - else if (!strcmp("nick3.cxx", filename)) { - ret += ci(kLangCXX, "nick3.cxx", difffile); - } - else if (!strcmp("nick4.cxx", filename)) { - ret += ci(kLangCXX, "nick4.cxx", difffile); - ret += ci(kLangCXX, "nick4.cxx", difffile, "-DDEST"); - } - else if (!strcmp("telea0.cxx", filename)) { - ret += ci(kLangCXX, "telea0.cxx", difffile); - } - else if (!strcmp("telea1.cxx", filename)) { - ret += ci(kLangCXX, "telea1.cxx", difffile); - } - else if (!strcmp("telea2.cxx", filename)) { - ret += ci(kLangCXX, "telea2.cxx", difffile); - } - else if (!strcmp("telea3.cxx", filename)) { - ret += ci(kLangCXX, "telea3.cxx", difffile); - } - else if (!strcmp("telea5.cxx", filename)) { - ret += ci(kLangCXX, "telea5.cxx", difffile); - } - else if (!strcmp("telea6.cxx", filename)) { - ret += ci(kLangCXX, "telea6.cxx", difffile); - } - else if (!strcmp("telea7.cxx", filename)) { - ret += ci(kLangCXX, "telea7.cxx", difffile); - } - else if (!strcmp("fwdtmplt.cxx", filename)) { - ret += ci(kLangCXX, "fwdtmplt.cxx", difffile); - } - else if (!strcmp("VPersonTest.cxx", filename)) { - ret += ci(kLangCXX, "VPersonTest.cxx", difffile); - } - else if (!strcmp("convopr0.cxx", filename)) { - ret += ci(kLangCXX, "convopr0.cxx", difffile); - } - else if (!strcmp("nstmplt1.cxx", filename)) { - ret += ci(kLangCXX, "nstmplt1.cxx", difffile); - } - else if (!strcmp("aoki0.cxx", filename)) { - ret += ci(kLangCXX, "aoki0.cxx", difffile); - } - else if (!strcmp("borg1.cxx", filename)) { - ret += ci(kLangCXX, "borg1.cxx", difffile); - } - else if (!strcmp("borg2.cxx", filename)) { - ret += ci(kLangCXX, "borg2.cxx", difffile); - } - else if (!strcmp("bruce1.cxx", filename)) { - // This test currently fails because the char** argument is - // registered as a char *& - ret += ci(kLangCXX, "bruce1.cxx", difffile); - } - else if (!strcmp("fons3.cxx", filename)) { - ret += ci(kLangCXX, "fons3.cxx", difffile); - } - else if (!strcmp("Test0.cxx", filename)) { - ret += ci(kLangCXX, "Test0.cxx", difffile, "", "MyString.cxx"); - } - else if (!strcmp("Test1.cxx", filename)) { - ret += ci(kLangCXX, "Test1.cxx", difffile, "", "Complex.cxx MyString.cxx"); - } - else if (!strcmp("delete0.cxx", filename)) { - ret += ci(kLangCXX, "delete0.cxx", difffile); - } - else if (!strcmp("pb19.cxx", filename)) { - ret += ci(kLangCXX, "pb19.cxx", difffile); - } - else if (!strcmp("autocc.cxx", filename)) { - #ifdef AUTOCC - ret += ci(kLangCXX, "autocc.cxx", difffile); - system("rm G__*"); - #else - ret += 0; - #endif // AUTOCC - } - else if (!strcmp("maincmplx.cxx", filename)) { - ret += ci(kLangCXX, "maincmplx.cxx", difffile, "", "complex1.cxx"); - } - else if (!strcmp("funcmacro.cxx", filename)) { - ret += ci(kLangCXX, "funcmacro.cxx", difffile); - } - else if (!strcmp("template.cxx", filename)) { - ret += ci(kLangCXX, "template.cxx", difffile); - ret += mkci(kLangCXX, "template.cxx", "template.h", difffile); - } - else if (!strcmp("vase.cxx", filename)) { - ret += ci(kLangCXX, "vbase.cxx", difffile); - ret += mkci(kLangCXX, "vbase.cxx", "vbase.h", difffile); - } - else if (!strcmp("vbase1.cxx", filename)) { - ret += ci(kLangCXX, "vbase1.cxx", difffile); - ret += mkci(kLangCXX, "vbase1.cxx", "vbase1.h", difffile); - } - else if (!strcmp("t674.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - // Problem with VC++6.0 - ret += mkci(kLangCXX, "t674.cxx", "t674.h", difffile); - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t648.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - // long long has problem with BC++5.5 - // also with VC++6.0 bug different - ret += ci(kLangCXX, "t648.cxx", difffile); - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t977.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - // VC++ problem is known - ret += mkci(kLangCXX,"t977.cxx","t977.h",difffile); - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t980.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - // problem with BC++5.5 - ret += ci(kLangCXX, "t980.cxx", difffile); - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t1030.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - #if (G__GNUC==2) - // works only with gcc2.96 - ret += mkci(kLangCXX, "t1030.cxx", "t1030.h", difffile); - ret += mkci(kLangCXX,"t1030.cxx","t1030.h",difffile,"","","-Y0"); - #else - ret += 0; - #endif // G__GNUC == 2 - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t1031.cxx", filename)) { - #define PROBLEM - #if defined(PROBLEM) && (!defined(G__WIN32) || defined(FORCEWIN32)) - #if (G__GNUC==2) - // works only with gcc2.96 - ret += mkci(kLangCXX, "t1031.cxx", "t1031.h", difffile); - ret += mkci(kLangCXX,"t1031.cxx","t1031.h",difffile,"","","-Y0"); - #else - ret += 0; - #endif // G__GNUC == 2 - #else - ret += 0; - #endif // PROBLEM && (!G__WIN32 || FORCEWIN32) - } - else if (!strcmp("t215.cxx", filename)) { - ret += ci(kLangCXX, "t215.cxx", difffile); - } - else if (!strcmp("t358.cxx", filename)) { - ret += ci(kLangCXX, "t358.cxx", difffile); - } - else if (!strcmp("t488.cxx", filename)) { - ret += ci(kLangCXX, "t488.cxx", difffile); - } - else if (!strcmp("t516.cxx", filename)) { - ret += ci(kLangCXX, "t516.cxx", difffile); - } - else if (!strcmp("t603.cxx", filename)) { - ret += ci(kLangCXX, "t603.cxx", difffile); - } - else if (!strcmp("t627.cxx", filename)) { - ret += ci(kLangCXX, "t627.cxx", difffile); - ret += mkci(kLangCXX, "t627.cxx", "t627.h", difffile); - } - else if (!strcmp("t630.cxx", filename)) { - ret += ci(kLangCXX, "t630.cxx", difffile); - } - else if (!strcmp("t633.cxx", filename)) { - ret += ci(kLangCXX, "t633.cxx", difffile); - ret += mkci(kLangCXX, "t633.cxx", "t633.h", difffile); - } - else if (!strcmp("t634.cxx", filename)) { - ret += ci(kLangCXX, "t634.cxx", difffile); - } - else if (!strcmp("t674.cxx", filename)) { - ret += ci(kLangCXX, "t674.cxx", difffile, "-DINTERPRET"); - } - else if (!strcmp("t676.cxx", filename)) { - #if !defined(G__WIN32) && !defined(G__CYGWIN) && !defined(G__APPLE) - //recursive call stack too deep for Visual C++ - ret += ci(kLangCXX, "t676.cxx", difffile); - #endif // !G__WIN32 && !G__CYGWIN && !G__APPLE - } - else if (!strcmp("t694.cxx", filename)) { - ret += mkci(kLangCXX, "t694.cxx", "t694.h", difffile); - //fails due to default param - ret += ci(kLangCXX, "t694.cxx", difffile, "-DINTERPRET"); - } - else if (!strcmp("t695.cxx", filename)) { - //fails due to tmplt specialization - ret += ci(kLangCXX, "t695.cxx", difffile); - } - else if (!strcmp("t705.cxx", filename)) { - ret += mkci(kLangCXX, "t705.cxx", "t705.h", difffile); - ret += ci(kLangCXX, "t705.cxx", difffile, "-DINTERPRET"); - } - else if (!strcmp("t714.cxx", filename)) { - ret += ci(kLangCXX, "t714.cxx", difffile); - } - else if (!strcmp("t733.cxx", filename)) { - ret += io("t733.cxx", "t733.ref", difffile); - } - else if (!strcmp("t749.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - //NOT WORKING: in debug mode on WINDOWS! - ret += ci(kLangCXX,"t749.cxx",difffile); - #endif // !G__WIN32 || FORCEWIN32 - } - else if (!strcmp("t751.cxx", filename)) { - ret += ci(kLangCXX, "t751.cxx", difffile); - } - else if (!strcmp("t764.cxx", filename)) { - ret += ci(kLangCXX, "t764.cxx", difffile); - } - else if (!strcmp("t767.cxx", filename)) { - ret += ci(kLangCXX, "t767.cxx", difffile); - } - else if (!strcmp("t776.cxx", filename)) { - ret += ci(kLangCXX, "t776.cxx", difffile); - } - else if (!strcmp("t777.cxx", filename)) { - ret += ci(kLangCXX, "t777.cxx", difffile); - } - else if (!strcmp("t784.cxx", filename)) { - ret += ci(kLangCXX, "t784.cxx", difffile); - } - else if (!strcmp("t825.cxx", filename)) { - ret += ci(kLangCXX, "t825.cxx", difffile); - } - else if (!strcmp("t910.cxx", filename)) { - ret += ci(kLangCXX, "t910.cxx", difffile); - } - else if (!strcmp("t916.cxx", filename)) { - ret += ci(kLangCXX, "t916.cxx", difffile); - } - else if (!strcmp("t927.cxx", filename)) { - #if !defined(G__VISUAL) || defined(FORCEWIN32) - #if G__CINTVERSION < 70000000 - ret += io("t927.cxx","t927.ref5",difffile); - #else - ret += io("t927.cxx","t927.ref",difffile); - #endif - #endif // !G__VISUAL || FORCEWIN32 - } - else if (!strcmp("t928.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += mkciN(kLangCXX, "t928.cxx", "t928.h", difffile, "", "t928a.h", "t928b.h"); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t930.cxx", filename)) { - ret += ci(kLangCXX, "t930.cxx", difffile); - } - else if (!strcmp("t938.cxx", filename)) { - ret += ci(kLangCXX, "t938.cxx", difffile); - } - else if (!strcmp("t958.cxx", filename)) { - ret += ci(kLangCXX, "t958.cxx", difffile); - } - else if (!strcmp("t959.cxx", filename)) { - ret += ci(kLangCXX, "t959.cxx", difffile); - } - else if (!strcmp("t961.cxx", filename)) { - ret += mkci(kLangCXX, "t961.cxx", "t961.h", difffile); - //mkc(kLangCXX,"t961.h",difffile); - } - else if (!strcmp("t963.cxx", filename)) { - //Borland C++5.5 has a problem - //with reverse_iterator::reference - ret += ci(kLangCXX, "t963.cxx", difffile); - } - else if (!strcmp("t966.cxx", filename)) { - #ifdef G__P2F - ret += mkci(kLangCXX, "t966.cxx", "t966.h", difffile); - #endif // G__P2F - } - else if (!strcmp("t968.cxx", filename)) { - // problem with BC++5.5 & VC++6.0 - ret += mkci(kLangCXX, "t968.cxx", "t968.h", difffile); - } - else if (!strcmp("t970.cxx", filename)) { - ret += mkci(kLangCXX, "t970.cxx", "t970.h", difffile); - } - else if (!strcmp("t972.cxx", filename)) { - ret += mkciN(kLangCXX, "t972.cxx", "t972a.h", difffile, "", "t972b.h"); - } - else if (!strcmp("t980.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += mkci(kLangCXX, "t980.cxx", "t980.h", difffile); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t986.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += ci(kLangCXX, "t986.cxx", difffile, "-DTEST"); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t987.cxx", filename)) { - ret += mkci(kLangCXX, "t987.cxx", "t987.h", difffile); - } - else if (!strcmp("t991.cxx", filename)) { - ret += mkciN(kLangCXX, "t991.cxx", "t991a.h", difffile, "", "t991b.h", "t991c.h"); - } - else if (!strcmp("t992.cxx", filename)) { - ret += mkci(kLangCXX, "t992.cxx", "t992.h", difffile); // problem gcc3.2 - } - else if (!strcmp("maptest.cxx", filename)) { - ret += mkci(kLangCXX, "maptest.cxx", "maptest.h", difffile); // problem icc - } - else if (!strcmp("t993.c", filename)) { - ret += mkci(kLangC, "t993.c", "t993.h", difffile); - } - else if (!strcmp("t995.cxx", filename)) { - ret += mkci(kLangCXX, "t995.cxx", "t995.h", difffile); - } - else if (!strcmp("t996.cxx", filename)) { - ret += mkci(kLangCXX, "t996.cxx", "t996.h", difffile); - } - else if (!strcmp("t998.cxx", filename)) { - ret += ci(kLangCXX, "t998.cxx", difffile); - } - else if (!strcmp("t1002.cxx", filename)) { - ret += mkci(kLangCXX, "t1002.cxx", "t1002.h", difffile); - } - else if (!strcmp("t1004.cxx", filename)) { - ret += ci(kLangCXX, "t1004.cxx", difffile); - } - else if (!strcmp("t1011.cxx", filename)) { - ret += ci(kLangCXX, "t1011.cxx", difffile); - ret += mkci(kLangCXX, "t1011.cxx", "t1011.h", difffile); - } - else if (!strcmp("t1015.cxx", filename)) { - ret += ci(kLangCXX, "t1015.cxx", difffile); - } - else if (!strcmp("t1016.cxx", filename)) { - ret += ci(kLangCXX, "t1016.cxx", difffile); - ret += mkci(kLangCXX, "t1016.cxx", "t1016.h", difffile); - } - else if (!strcmp("t1023.cxx", filename)) { - ret += ci(kLangCXX, "t1023.cxx", difffile); - } - else if (!strcmp("t1024.cxx", filename)) { - ret += ci(kLangCXX, "t1024.cxx", difffile); - ret += mkci(kLangCXX, "t1024.cxx", "t1024.h", difffile); - } - else if (!strcmp("t1025.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += mkci(kLangCXX, "t1025.cxx", "t1025.h", difffile); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t1026.cxx", filename)) { - ret += ci(kLangCXX, "t1026.cxx", difffile); // problem with BC++5.5 - ret += mkci(kLangCXX, "t1026.cxx", "t1026.h", difffile); - } - else if (!strcmp("t1027.cxx", filename)) { - ret += io("t1027.cxx", "t1027.ref", difffile); - //ret += ci(kLangCXX,"t1027.cxx",difffile); // problem with BC++5.5 - //ret += mkci(kLangCXX,"t1027.cxx","t1027.h",difffile); - } - else if (!strcmp("t1032.cxx", filename)) { - ret += ci(kLangCXX, "t1032.cxx", difffile); - ret += ci(kLangCXX, "t1032.cxx", difffile); - } - else if (!strcmp("t1034a.cxx", filename)) { - ret += ci(kLangCXX, "t1034a.cxx", difffile); - } - else if (!strcmp("t1034.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - if (sizeof(long double)==16) { - // sizeof(long double)==16 - ret += io("t1034.cxx", "t1034.ref64", difffile); - } else if (sizeof(long)==4) { - // sizeof(long double)==12 - ret += io("t1034.cxx", "t1034.ref", difffile); - } else if (sizeof(void*)==8) { - // sizeof(long double)==16 - ret += io("t1034.cxx", "t1034.ref64", difffile); - } else { - // sizeof(long double)==12 - ret += io("t1034.cxx", "t1034.refXX", difffile); - } - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t1035.cxx", filename)) { - ret += ci(kLangCXX, "t1035.cxx", difffile); - ret += mkci(kLangCXX, "t1035.cxx", "t1035.h", difffile); - } - else if (!strcmp("t1036.cxx", filename)) { - ret += ci(kLangCXX, "t1036.cxx", difffile); - } - else if (!strcmp("t1040.cxx", filename)) { - ret += mkci(kLangCXX, "t1040.cxx", "t1040.h", difffile); // gcc3.2 has problem - } - else if (!strcmp("t1042.cxx", filename)) { - ret += io("t1042.cxx", "t1042.ref", difffile); - } - else if (!strcmp("t1046.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += ci(kLangCXX,"t1046.cxx",difffile); - ret += mkci(kLangCXX,"t1046.cxx","t1046.h",difffile); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t1047.cxx", filename)) { - ret += ci(kLangCXX, "t1047.cxx", difffile); - ret += mkci(kLangCXX, "t1047.cxx", "t1047.h", difffile); - } - else if (!strcmp("t1048.cxx", filename)) { - ret += ci(kLangCXX, "t1048.cxx", difffile); - ret += mkci(kLangCXX, "t1048.cxx", "t1048.h", difffile, "-I.. -I../../inc -I../../src -I../../reflex/inc"); - } - else if (!strcmp("t1049.cxx", filename)) { - ret += ci(kLangCXX, "t1049.cxx", difffile); - } - else if (!strcmp("t1054.cxx", filename)) { - ret += ci(kLangCXX, "t1054.cxx", difffile); - } - else if (!strcmp("t1055.cxx", filename)) { - ret += ci(kLangCXX, "t1055.cxx", difffile); - } - else if (!strcmp("t1061.cxx", filename)) { - ret += mkci(kLangCXX, "t1061.cxx", "t1061.h", difffile); - } - else if (!strcmp("t1062.cxx", filename)) { - #if !defined(G__WIN32) || defined(FORCEWIN32) - ret += mkci(kLangCXX, "t1062.cxx", "t1062.h", difffile); - #endif // !G__WIN32 | FORCEWIN32 - } - else if (!strcmp("t1067.cxx", filename)) { - ret += ci(kLangCXX, "t1067.cxx", difffile); - ret += mkci(kLangCXX, "t1067.cxx", "t1067.h", difffile); - } - else if (!strcmp("t1068.cxx", filename)) { - ret += ci(kLangCXX, "t1068.cxx", difffile); - ret += mkci(kLangCXX, "t1068.cxx", "t1068.h", difffile); - } - else if (!strcmp("t1079.cxx", filename)) { - ret += ci(kLangCXX, "t1079.cxx", difffile); - ret += mkci(kLangCXX, "t1079.cxx", "t1079.h", difffile); - } - else if (!strcmp("t1084.cxx", filename)) { - ret += ci(kLangCXX, "t1084.cxx", difffile); - } - else if (!strcmp("t1085.cxx", filename)) { - ret += ci(kLangCXX, "t1085.cxx", difffile); - } - else if (!strcmp("t1086.cxx", filename)) { - ret += ci(kLangCXX, "t1086.cxx", difffile); - } - else if (!strcmp("t1088.cxx", filename)) { - ret += ci(kLangCXX, "t1088.cxx", difffile); - } - else if (!strcmp("t1094.cxx", filename)) { - ret += ci(kLangCXX, "t1094.cxx", difffile); - } - else if (!strcmp("t1101.cxx", filename)) { - ret += ci(kLangCXX, "t1101.cxx", difffile); - } - else if (!strcmp("t1115.cxx", filename)) { - ret += mkci(kLangCXX, "t1115.cxx", "t1115.h", difffile); - } - else if (!strcmp("t1124.cxx", filename)) { - ret += ci(kLangCXX, "t1124.cxx", difffile); - } - else if (!strcmp("t1125.cxx", filename)) { - ret += ci(kLangCXX, "t1125.cxx", difffile); - } - else if (!strcmp("t1126.cxx", filename)) { - ret += ci(kLangCXX, "t1126.cxx", difffile); - } - else if (!strcmp("t1127.cxx", filename)) { - #if !defined(G__APPLE) - // This not work on macos and on 64bit linux because of var_arg - if (sizeof(void*)<8 || (G__CINTVERSION > 70000000) ) { - ret += ci(kLangCXX, "t1127.cxx", difffile); - ret += mkci(kLangCXX, "t1127.cxx", "t1127.h", difffile); // - } - #endif // !G__APPLE - } - else if (!strcmp("t1128.cxx", filename)) { - ret += ci(kLangCXX, "t1128.cxx", difffile); // looks to me gcc3.2 has a bug - } - else if (!strcmp("t1129.cxx", filename)) { - ret += ci(kLangCXX, "t1129.cxx", difffile); // g++3.2 fails - } - else if (!strcmp("t1134.cxx", filename)) { - ret += ci(kLangCXX, "t1134.cxx", difffile); - } - else if (!strcmp("t1136.cxx", filename)) { - ret += ci(kLangCXX, "t1136.cxx", difffile); - } - else if (!strcmp("t1140.cxx", filename)) { - ret += ci(kLangCXX, "t1140.cxx", difffile); - } - else if (!strcmp("t1144.cxx", filename)) { - ret += ci(kLangCXX,"t1144.cxx",difffile); - ret += ci(kLangCXX,"t1144.cxx",difffile,"","","-Y0"); - ret += ci(kLangCXX,"t1144.cxx",difffile,"","","-Y1"); - } - else if (!strcmp("t1148.cxx", filename)) { - ret += ci(kLangCXX, "t1148.cxx", difffile); - } - else if (!strcmp("t1157.cxx", filename)) { - ret += ci(kLangCXX, "t1157.cxx", difffile); - } - else if (!strcmp("t1158.cxx", filename)) { - ret += ci(kLangCXX, "t1158.cxx", difffile); - } - else if (!strcmp("t1160.cxx", filename)) { - ret += ci(kLangCXX, "t1160.cxx", difffile); - } - else if (!strcmp("aryinit0.cxx", filename)) { - ret += ci(kLangCXX, "aryinit0.cxx", difffile); - } - else if (!strcmp("aryinit1.cxx", filename)) { - ret += ci(kLangCXX, "aryinit1.cxx", difffile); - } - else if (!strcmp("t1164.cxx", filename)) { - ret += ci(kLangCXX, "t1164.cxx", difffile); - } - else if (!strcmp("t1165.cxx", filename)) { - ret += ci(kLangCXX, "t1165.cxx", difffile); - } - else if (!strcmp("t1178.cxx", filename)) { - ret += ci(kLangCXX, "t1178.cxx", difffile); - } - else if (!strcmp("t1187.cxx", filename)) { - ret += mkci(kLangCXX, "t1187.cxx", "t1187.h", difffile); - } - else if (!strcmp("t1192.cxx", filename)) { - ret += ci(kLangCXX, "t1192.cxx", difffile); - } - else if (!strcmp("t1193.cxx", filename)) { - ret += mkci(kLangCXX, "t1193.cxx", "t1193.h", difffile); - } - else if (!strcmp("t1203.cxx", filename)) { - ret += ci(kLangCXX, "t1203.cxx", difffile); - } - else if (!strcmp("t1205.cxx", filename)) { - ret += ci(kLangCXX, "t1205.cxx", difffile); - ret += mkci(kLangCXX, "t1205.cxx", "t1205.h", difffile); - } - else if (!strcmp("t1213.cxx", filename)) { - ret += ci(kLangCXX, "t1213.cxx", difffile); - } - else if (!strcmp("t1214.cxx", filename)) { - ret += ci(kLangCXX, "t1214.cxx", difffile); - } - else if (!strcmp("t1215.cxx", filename)) { - ret += ci(kLangCXX, "t1215.cxx", difffile); - ret += mkci(kLangCXX, "t1215.cxx", "t1215.h", difffile); - } - else if (!strcmp("t1221.cxx", filename)) { - ret += ci(kLangCXX, "t1221.cxx", difffile); - } - else if (!strcmp("t1222.cxx", filename)) { - ret += ci(kLangCXX, "t1222.cxx", difffile); - } - else if (!strcmp("t1223.cxx", filename)) { - ret += ci(kLangCXX, "t1223.cxx", difffile); - } - else if (!strcmp("t1224.cxx", filename)) { - ret += ci(kLangCXX, "t1224.cxx", difffile); - } - else if (!strcmp("t1228.cxx", filename)) { - ret += io("t1228.cxx", "t1228.ref", difffile); - } - else if (!strcmp("t1247.cxx", filename)) { - ret += mkciN(kLangCXX, "t1247.cxx", "t1247.h", difffile, "", "t1247a.h"); - } - else if (!strcmp("t1276.cxx", filename)) { - ret += mkci(kLangCXX, "t1276.cxx", "t1276.h", difffile); - } - else if (!strcmp("t1277.cxx", filename)) { - // works only with gcc2.96 - ret += mkci(kLangCXX, "t1277.cxx", "t1277.h", difffile); - } - else if (!strcmp("t1278.cxx", filename)) { - ret += ci(kLangCXX, "t1278.cxx", difffile); - } - else if (!strcmp("t1279.cxx", filename)) { - ret += ci(kLangCXX, "t1279.cxx", difffile); - } - else if (!strcmp("t1280.cxx", filename)) { - ret += ci(kLangCXX, "t1280.cxx", difffile); - } - else if (!strcmp("t1281.cxx", filename)) { - ret += ci(kLangCXX, "t1281.cxx", difffile); - } - else if (!strcmp("t1282.cxx", filename)) { - ret += ci(kLangCXX, "t1282.cxx", difffile); - } - else if (!strcmp("t1283.cxx", filename)) { - ret += ci(kLangCXX, "t1283.cxx", difffile); - } - else if (!strcmp("t1284.cxx", filename)) { - ret += ci(kLangCXX, "t1284.cxx", difffile); - } - else if (!strcmp("t1286.cxx", filename)) { - #if G__CINTVERSION > 70000000 - ret += ci(kLangCXX, "t1286.cxx", difffile); - #endif - } - else if (!strcmp("postinc.cxx", filename)) { - ret += ci(kLangCXX, "postinc.cxx", difffile); - } - else if (!strcmp("selfreference.cxx", filename)) { - ret += mkci(kLangCXX, "selfreference.cxx", "selfreference.h", difffile); - } - else if (!strcmp("abstract.cxx", filename)) { - ret += ci(kLangCXX, "abstract.cxx", difffile); - } - else if (!strcmp("TExeception.cxx", filename)) { - ret += ci(kLangCXX, "TException.cxx", difffile); - } - else if (!strcmp("enums.cxx", filename)) { - ret += mkci(kLangCXX, "enums.cxx", "enums.h", difffile); - } - else if (!strcmp("classinfo.cxx", filename)) { - ret += io("classinfo.cxx", "classinfo.ref", difffile); - } - else if (!strcmp("iostream_state.cxx", filename)) { - ret += ci(kLangCXX, "iostream_state.cxx", difffile); - } - else { - fprintf(stderr,"The test %s is not supported.\n",filename); - ret += 1; - } - - if (0==ret) { - fprintf(stderr,"The test %s succeed.\n",filename); - return ret; - } else { - fprintf(stderr,"The test %s fail.\n",filename); - return ret; - } -} - -/* - * Local Variables: - * c-tab-always-indent:nil - * c-indent-level:3 - * c-continued-statement-offset:3 - * c-brace-offset:-3 - * c-brace-imaginary-offset:0 - * c-argdecl-indent:0 - * c-label-offset:-3 - * compile-command:"make -k" - * End: - */ diff --git a/cmake/scripts/thisroot.sh b/cmake/scripts/thisroot.sh deleted file mode 100755 index 7a03e9bd49fcb..0000000000000 --- a/cmake/scripts/thisroot.sh +++ /dev/null @@ -1,67 +0,0 @@ -# Source this script to set up the ROOT build that this script is part of. -# -# Conveniently an alias like this can be defined in .bashrc: -# alias thisroot=". bin/thisroot.sh" -# -# This script if for the bash like shells, see thisroot.csh for csh like shells. -# -# Author: Fons Rademakers, 18/8/2006 - -if [ "x${BASH_ARGV[0]}" = "x" ]; then - if [ ! -f bin/thisroot.sh ]; then - echo ERROR: must "cd where/root/is" before calling ". bin/thisroot.sh" for this version of bash! - ROOTSYS=; export ROOTSYS - return - fi - ROOTSYS="$PWD"; export ROOTSYS -else - # get param to "." - THIS=$(dirname ${BASH_ARGV[0]}) - ROOTSYS=$(cd ${THIS}/..;pwd); export ROOTSYS -fi - -if [ -z "${PATH}" ]; then - PATH=@bindir@; export PATH -else - PATH=@bindir@:$PATH; export PATH -fi - -if [ -z "${LD_LIBRARY_PATH}" ]; then - LD_LIBRARY_PATH=@libdir@; export LD_LIBRARY_PATH # Linux, ELF HP-UX -else - LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH -fi - -if [ -z "${DYLD_LIBRARY_PATH}" ]; then - DYLD_LIBRARY_PATH=@libdir@; export DYLD_LIBRARY_PATH # Mac OS X -else - DYLD_LIBRARY_PATH=@libdir@:$DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH -fi - -if [ -z "${SHLIB_PATH}" ]; then - SHLIB_PATH=@libdir@; export SHLIB_PATH # legacy HP-UX -else - SHLIB_PATH=@libdir@:$SHLIB_PATH; export SHLIB_PATH -fi - -if [ -z "${LIBPATH}" ]; then - LIBPATH=@libdir@; export LIBPATH # AIX -else - LIBPATH=@libdir@:$LIBPATH; export LIBPATH -fi - -if [ -z "${PYTHONPATH}" ]; then - PYTHONPATH=@libdir@; export PYTHONPATH -else - PYTHONPATH=@libdir@:$PYTHONPATH; export PYTHONPATH -fi - -if [ -z "${MANPATH}" ]; then - MANPATH=`dirname @mandir@`; export MANPATH -else - MANPATH=`dirname @mandir@`:$MANPATH; export MANPATH -fi - -if [ "x`root-config --arch | grep -v win32gcc | grep -i win32`" != "x" ]; then - ROOTSYS="`cygpath -w $ROOTSYS`" -fi diff --git a/core/lzma/CMakeLists.txt b/core/lzma/CMakeLists.txt index a59c0d5cba555..551e946bb5ca5 100644 --- a/core/lzma/CMakeLists.txt +++ b/core/lzma/CMakeLists.txt @@ -16,5 +16,5 @@ list(APPEND LibCore_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/inc) set(LibCore_SRCS ${LibCore_SRCS} PARENT_SCOPE) set(LibCore_INCLUDE_DIRS ${LibCore_INCLUDE} PARENT_SCOPE) -install(FILES ${LZMA_headers} DESTINATION ${INCLUDE_INSTALL_DIR}) +install(FILES ${LZMA_headers} DESTINATION ${CMAKE_INSTALL_INCDIR}) diff --git a/core/zip/CMakeLists.txt b/core/zip/CMakeLists.txt index 4c8c563dfcc4a..0593770e0bce1 100644 --- a/core/zip/CMakeLists.txt +++ b/core/zip/CMakeLists.txt @@ -62,7 +62,7 @@ endif() # Define all the header files which should be installed when # doing a "make install" -install(FILES ${ZLIB_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}) +install(FILES ${ZLIB_HEADERS} DESTINATION ${CMAKE_INSTALL_INCDIR}) set_property(GLOBAL APPEND PROPERTY ROOT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/inc) # Add all source files of this subdirectory to the source files diff --git a/graf2d/asimage/BuildAfterImage.cmake b/graf2d/asimage/BuildAfterImage.cmake index c46aa80c2de0f..e2f1ae127971d 100644 --- a/graf2d/asimage/BuildAfterImage.cmake +++ b/graf2d/asimage/BuildAfterImage.cmake @@ -117,4 +117,4 @@ if(builtin_freetype) add_dependencies(AFTERIMAGE FREETYPE) endif() -install(FILES ${afterimagelib} DESTINATION ${LIB_INSTALL_DIR}) +install(FILES ${afterimagelib} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/graf2d/freetype/CMakeLists.txt b/graf2d/freetype/CMakeLists.txt index 3c2e3d93fdb64..45b8e113c2365 100644 --- a/graf2d/freetype/CMakeLists.txt +++ b/graf2d/freetype/CMakeLists.txt @@ -110,4 +110,4 @@ endif() # build directory. add_custom_target(FREETYPE DEPENDS ${freetypelib}) set_target_properties(FREETYPE PROPERTIES FOLDER Builtins) -install(FILES ${freetypelib} DESTINATION ${LIB_INSTALL_DIR}) +install(FILES ${freetypelib} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/graf2d/win32gdk/CMakeLists.txt b/graf2d/win32gdk/CMakeLists.txt index 74a658c508d23..b1b348e320238 100644 --- a/graf2d/win32gdk/CMakeLists.txt +++ b/graf2d/win32gdk/CMakeLists.txt @@ -105,6 +105,6 @@ endif() install(FILES ${gdkdlla} ${glibdlla} ${iconvdlla} - DESTINATION ${BIN_INSTALL_DIR}) + DESTINATION ${CMAKE_INSTALL_BINDIR}) ROOT_INSTALL_HEADERS() diff --git a/roofit/histfactory/CMakeLists.txt b/roofit/histfactory/CMakeLists.txt index 89e51ff0069f9..ee552f99ec66f 100644 --- a/roofit/histfactory/CMakeLists.txt +++ b/roofit/histfactory/CMakeLists.txt @@ -17,6 +17,6 @@ ROOT_EXECUTABLE(hist2workspace MakeModelAndMeasurements.cxx hist2workspace.cxx Graf Gpad Minuit Foam RooStats XMLParser) #ROOT_INSTALL_HEADERS() -install(DIRECTORY inc/RooStats/HistFactory/ DESTINATION ${INCLUDE_INSTALL_DIR}/RooStats/HistFactory +install(DIRECTORY inc/RooStats/HistFactory/ DESTINATION ${CMAKE_INSTALL_INCDIR}/RooStats/HistFactory PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) diff --git a/roofit/roostats/CMakeLists.txt b/roofit/roostats/CMakeLists.txt index 5b6c79494ffa3..ded75865654e2 100644 --- a/roofit/roostats/CMakeLists.txt +++ b/roofit/roostats/CMakeLists.txt @@ -10,7 +10,7 @@ ROOT_LINKER_LIBRARY(RooStats *.cxx G__RooStats.cxx LIBRARIES Core Cint DEPENDENCIES RooFit RooFitCore Tree RIO Hist Matrix MathCore Minuit Foam Graf Gpad ) #ROOT_INSTALL_HEADERS() -install(DIRECTORY inc/RooStats/ DESTINATION ${INCLUDE_INSTALL_DIR}/RooStats +install(DIRECTORY inc/RooStats/ DESTINATION ${CMAKE_INSTALL_INCDIR}/RooStats COMPONENT headers PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) diff --git a/rootx/CMakeLists.txt b/rootx/CMakeLists.txt index eb970ec51b796..9f960796a2080 100644 --- a/rootx/CMakeLists.txt +++ b/rootx/CMakeLists.txt @@ -13,5 +13,5 @@ elseif(cocoa) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root.exe ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root) add_dependencies(root root.exe) install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root - DESTINATION ${BIN_INSTALL_DIR} COMPONENT applications) + DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT applications) endif() diff --git a/tmva/CMakeLists.txt b/tmva/CMakeLists.txt index 9604f1f09ad14..8183c7eb8e74b 100644 --- a/tmva/CMakeLists.txt +++ b/tmva/CMakeLists.txt @@ -59,11 +59,11 @@ ROOT_GENERATE_ROOTMAP(TMVA LINKDEF LinkDef1.h LinkDef2.h LinkDef3.h LinkDef4.h ROOT_LINKER_LIBRARY(TMVA *.cxx G__TMVA1.cxx G__TMVA2.cxx G__TMVA3.cxx G__TMVA4.cxx LIBRARIES Core Cint DEPENDENCIES RIO Hist Tree MLP Minuit XMLIO) -install(DIRECTORY inc/TMVA/ DESTINATION ${INCLUDE_INSTALL_DIR}/TMVA +install(DIRECTORY inc/TMVA/ DESTINATION ${CMAKE_INSTALL_INCDIR}/TMVA PATTERN ".svn" EXCLUDE REGEX "LinkDef" EXCLUDE ) #if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX) -# install(DIRECTORY test DESTINATION ${DOC_INSTALL_DIR}/tmva PATTERN ".svn" EXCLUDE) +# install(DIRECTORY test DESTINATION ${CMAKE_INSTALL_DOCDIR}/tmva PATTERN ".svn" EXCLUDE) #endif() From d52f0f18088dbab3782195ace34fb75e257817d8 Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 29 Nov 2013 17:35:43 +0100 Subject: [PATCH 69/85] Fix for ROOT-5782 (CMake) --- net/net/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net/CMakeLists.txt b/net/net/CMakeLists.txt index dd2ffc91d7300..4ffa1cc4a0da1 100644 --- a/net/net/CMakeLists.txt +++ b/net/net/CMakeLists.txt @@ -18,7 +18,7 @@ else() add_definitions(-DR__SSL) endif() -if(NOT ssl AND NOT CRYPTLIBS) +if(NOT ssl OR NOT CRYPTLIBS) list(REMOVE_ITEM headers TS3HTTPRequest.h) list(REMOVE_ITEM headers TS3WebFile.h) list(REMOVE_ITEM sources TS3HTTPRequest.cxx) From 2a9389b23acb623654ac0267086f78a53cc9435e Mon Sep 17 00:00:00 2001 From: Pere Mato Date: Fri, 29 Nov 2013 18:52:45 +0100 Subject: [PATCH 70/85] Fix for ROOT-5789 --- graf3d/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graf3d/CMakeLists.txt b/graf3d/CMakeLists.txt index fde5b9d95fb44..d9f67c32e66cd 100644 --- a/graf3d/CMakeLists.txt +++ b/graf3d/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(g3d) # special CMakeLists.txt -if(NOT WIN32) +if(NOT WIN32 AND x11) add_subdirectory(x3d) # special CMakeLists.txt endif() if (opengl) From 7cc66162bfc23116560c98ff0ff578bc2f21fcd3 Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Sun, 1 Dec 2013 11:58:21 +0100 Subject: [PATCH 71/85] make version v5-34-13. --- build/version_number | 2 +- core/base/inc/RVersion.h | 10 +++++----- doc/v534/index.html | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/version_number b/build/version_number index 6f1e9fcb52918..5f8507a3248c4 100644 --- a/build/version_number +++ b/build/version_number @@ -1 +1 @@ -5.34/12 +5.34/13 diff --git a/core/base/inc/RVersion.h b/core/base/inc/RVersion.h index 13f9f2dae47ee..71e12d23d4ae0 100644 --- a/core/base/inc/RVersion.h +++ b/core/base/inc/RVersion.h @@ -14,13 +14,13 @@ * */ -#define ROOT_RELEASE "5.34/12" -#define ROOT_RELEASE_DATE "Nov 16 2013" -#define ROOT_RELEASE_TIME "16:33:37" +#define ROOT_RELEASE "5.34/13" +#define ROOT_RELEASE_DATE "Nov 30 2013" +#define ROOT_RELEASE_TIME "23:01:20" #define ROOT_SVN_REVISION 49361 -#define ROOT_GIT_COMMIT "v5-34-11-49-gafa5f25" +#define ROOT_GIT_COMMIT "v5-34-12-50-g2a9389b" #define ROOT_GIT_BRANCH "heads/v5-34-00-patches" -#define ROOT_VERSION_CODE 336396 +#define ROOT_VERSION_CODE 336397 #define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #endif diff --git a/doc/v534/index.html b/doc/v534/index.html index 23245d03714b1..b85c23e0c8433 100644 --- a/doc/v534/index.html +++ b/doc/v534/index.html @@ -8,7 +8,7 @@ -ROOT Version 5.34/12 Release Notes +ROOT Version 5.34/13 Release Notes From ae64e60411909d3012b084412d3a930cad3697c0 Mon Sep 17 00:00:00 2001 From: Wouter Verkerke Date: Mon, 2 Dec 2013 10:14:35 +0100 Subject: [PATCH 72/85] o RooTrace - Minor cosmetics in object count reporting o tutorials/roofit/rf507_debugtools.C - Switch to new reporting function --- roofit/roofitcore/src/RooTrace.cxx | 6 +++--- tutorials/roofit/rf507_debugtools.C | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roofit/roofitcore/src/RooTrace.cxx b/roofit/roofitcore/src/RooTrace.cxx index 4be78bcf3efc1..b0c93f112665d 100644 --- a/roofit/roofitcore/src/RooTrace.cxx +++ b/roofit/roofitcore/src/RooTrace.cxx @@ -207,17 +207,17 @@ void RooTrace::printObjectCounts() Double_t total(0) ; for (map::iterator iter = _objectCount.begin() ; iter != _objectCount.end() ; ++iter) { Double_t tot= 1.0*(iter->first->Size()*iter->second)/(1024*1024) ; - cout << " class " << iter->first->GetName() << " count = " << iter->second << " sizeof = " << iter->first->Size() << " total memory = " << Form("%5.1f",tot) << " Mb" << endl ; + cout << " class " << iter->first->GetName() << " count = " << iter->second << " sizeof = " << iter->first->Size() << " total memory = " << Form("%5.2f",tot) << " Mb" << endl ; total+=tot ; } for (map::iterator iter = _specialCount.begin() ; iter != _specialCount.end() ; ++iter) { int size = _specialSize[iter->first] ; Double_t tot=1.0*(size*iter->second)/(1024*1024) ; - cout << " special " << iter->first << " count = " << iter->second << " sizeof = " << size << " total memory = " << Form("%5.1f",tot) << " Mb" << endl ; + cout << " speeial " << iter->first << " count = " << iter->second << " sizeof = " << size << " total memory = " << Form("%5.2f",tot) << " Mb" << endl ; total+=tot ; } - cout << "grand total memory = " << total << endl ; + cout << "Grand total memory = " << Form("%5.2f",total) << " Mb" << endl ; } diff --git a/tutorials/roofit/rf507_debugtools.C b/tutorials/roofit/rf507_debugtools.C index bf5f46fb2f0b8..5bad673a6f062 100644 --- a/tutorials/roofit/rf507_debugtools.C +++ b/tutorials/roofit/rf507_debugtools.C @@ -55,7 +55,7 @@ void rf507_debugtools() RooAddPdf model("model","model",RooArgSet(gauss,poly),f) ; // Show object added to memory since marker - RooTrace::dump(cout,kTRUE) ; + RooTrace::printObjectCounts() ; // Since verbose mode is still on, you will see messages // pertaining to destructor calls of all RooFit objects From 2c1cbb3a58024c46a419b92e727f6c5ecaed420c Mon Sep 17 00:00:00 2001 From: Wouter Verkerke Date: Mon, 2 Dec 2013 14:42:34 +0100 Subject: [PATCH 73/85] o RooRealSumPdf - Modify BinnedLikelihood optimization to take only effect after it is activated by RooNLLVar o RooNLLVar - Activate BinnedLikelihood for the purpose of disabling normalization only when it is correspondingly used as a BinnedLikelihood in RooNLLVar o RooCustomizer, RooWorkspace - Don't override 'origName' string label, if it is already set o RooFormulaVar - Always forward a redirectServers() to changeDependents inside the formula, even if it wasn't created yet (in which case it is done here) o RooFormula - Process changes in variable name and remap to original names encoded in string attributes o RooTrace - Reorganize code to protect agains static destruction order fiasco --- roofit/roofitcore/inc/RooRealSumPdf.h | 2 +- roofit/roofitcore/inc/RooTrace.h | 39 +++++----- roofit/roofitcore/src/RooCustomizer.cxx | 17 ++++- roofit/roofitcore/src/RooFormula.cxx | 12 +++- roofit/roofitcore/src/RooFormulaVar.cxx | 8 ++- roofit/roofitcore/src/RooNLLVar.cxx | 3 + roofit/roofitcore/src/RooRealSumPdf.cxx | 15 +--- roofit/roofitcore/src/RooTrace.cxx | 95 +++++++++++++++++++------ roofit/roofitcore/src/RooWorkspace.cxx | 20 ++++-- 9 files changed, 146 insertions(+), 65 deletions(-) diff --git a/roofit/roofitcore/inc/RooRealSumPdf.h b/roofit/roofitcore/inc/RooRealSumPdf.h index 3538d16dfd94a..8a0a2e81a3490 100644 --- a/roofit/roofitcore/inc/RooRealSumPdf.h +++ b/roofit/roofitcore/inc/RooRealSumPdf.h @@ -52,7 +52,7 @@ class RooRealSumPdf : public RooAbsPdf { return expectedEvents(&nset) ; } - virtual Bool_t selfNormalized() const { return getAttribute("BinnedLikelihood") ; } + virtual Bool_t selfNormalized() const { return getAttribute("BinnedLikelihoodActive") ; } void printMetaArgs(std::ostream& os) const ; diff --git a/roofit/roofitcore/inc/RooTrace.h b/roofit/roofitcore/inc/RooTrace.h index 5e35ae8dfc65f..7fc0e86c688c1 100644 --- a/roofit/roofitcore/inc/RooTrace.h +++ b/roofit/roofitcore/inc/RooTrace.h @@ -28,7 +28,7 @@ class RooTrace { public: - + RooTrace() ; virtual ~RooTrace() {} ; static void create(const TObject* obj) ; @@ -36,7 +36,6 @@ class RooTrace { static void createSpecial(const char* name, int size) ; static void destroySpecial(const char* name) ; - static void active(Bool_t flag) ; static void verbose(Bool_t flag) ; @@ -50,28 +49,36 @@ class RooTrace { static void callgrind_zero() ; static void callgrind_dump() ; + static RooTrace& instance() ; protected: - static void create2(const TObject* obj) ; - static void destroy2(const TObject* obj) ; + static RooTrace* _instance ; - static void create3(const TObject* obj) ; - static void destroy3(const TObject* obj) ; + void dump3(std::ostream&, Bool_t sinceMarked) ; - void addPad(const TObject* ref, Bool_t doPad) ; - Bool_t removePad(const TObject* ref) ; + void mark3() ; + void printObjectCounts3() ; - static Bool_t _active ; - static Bool_t _verbose ; - - static RooLinkedList _list ; - static RooLinkedList _markList ; + void create2(const TObject* obj) ; + void destroy2(const TObject* obj) ; - static std::map _objectCount ; + void create3(const TObject* obj) ; + void destroy3(const TObject* obj) ; + + void createSpecial3(const char* name, int size) ; + void destroySpecial3(const char* name) ; + + void addPad(const TObject* ref, Bool_t doPad) ; + Bool_t removePad(const TObject* ref) ; - static std::map _specialCount ; - static std::map _specialSize ; + Bool_t _active ; + Bool_t _verbose ; + RooLinkedList _list ; + RooLinkedList _markList ; + std::map _objectCount ; + std::map _specialCount ; + std::map _specialSize ; ClassDef(RooTrace,0) // Memory tracer utility for RooFit objects }; diff --git a/roofit/roofitcore/src/RooCustomizer.cxx b/roofit/roofitcore/src/RooCustomizer.cxx index 38b2311d8e2f4..3d5fe86ed0e40 100644 --- a/roofit/roofitcore/src/RooCustomizer.cxx +++ b/roofit/roofitcore/src/RooCustomizer.cxx @@ -441,7 +441,12 @@ RooAbsArg* RooCustomizer::doBuild(const char* masterCatState, Bool_t verbose) TString nameAttrib("ORIGNAME:") ; nameAttrib.Append(node->GetName()) ; specNode->setAttribute(nameAttrib) ; - specNode->setStringAttribute("ORIGNAME",node->GetName()) ; + + if (!specNode->getStringAttribute("origName")) { + specNode->setStringAttribute("origName",node->GetName()) ; + } + + } else { @@ -464,7 +469,10 @@ RooAbsArg* RooCustomizer::doBuild(const char* masterCatState, Bool_t verbose) TString nameAttrib("ORIGNAME:") ; nameAttrib.Append(node->GetName()) ; clone->setAttribute(nameAttrib) ; - //specNode->setStringAttribute("ORIGNAME",node->GetName()) ; + + if (!clone->getStringAttribute("origName")) { + clone->setStringAttribute("origName",node->GetName()) ; + } // Add to one-time use list and life-time use list clonedMasterNodes.add(*clone) ; @@ -554,7 +562,10 @@ RooAbsArg* RooCustomizer::doBuild(const char* masterCatState, Bool_t verbose) TString nameAttrib("ORIGNAME:") ; nameAttrib.Append(branch->GetName()) ; clone->setAttribute(nameAttrib) ; - clone->setStringAttribute("ORIGNAME",branch->GetName()) ; + + if (!clone->getStringAttribute("origName")) { + clone->setStringAttribute("origName",branch->GetName()) ; + } clonedMasterBranches.add(*clone) ; diff --git a/roofit/roofitcore/src/RooFormula.cxx b/roofit/roofitcore/src/RooFormula.cxx index 2463dc389878a..dd97a21510a3b 100644 --- a/roofit/roofitcore/src/RooFormula.cxx +++ b/roofit/roofitcore/src/RooFormula.cxx @@ -40,6 +40,7 @@ #include "RooAbsCategory.h" #include "RooArgList.h" #include "RooMsgService.h" +#include "RooTrace.h" using namespace std; @@ -51,6 +52,7 @@ RooFormula::RooFormula() : TFormula(), _nset(0) { // Default constructor // coverity[UNINIT_CTOR] + TRACE_CREATE } @@ -76,6 +78,7 @@ RooFormula::RooFormula(const char* name, const char* formula, const RooArgList& _isOK = kFALSE ; return ; } + TRACE_CREATE } @@ -98,6 +101,7 @@ RooFormula::RooFormula(const RooFormula& other, const char* name) : Compile() ; _compiled=kTRUE ; + TRACE_CREATE } @@ -129,6 +133,7 @@ RooFormula::~RooFormula() // Destructor _labelList.Delete() ; + TRACE_DESTROY } @@ -186,7 +191,7 @@ Bool_t RooFormula::changeDependents(const RooAbsCollection& newDeps, Bool_t must // Change used variables to those with the same name in given list // If mustReplaceAll is true and error is generated if one of the // elements of newDeps is not found as a server - + //Change current servers to new servers with the same name given in list Bool_t errorStat(kFALSE) ; int i ; @@ -208,6 +213,11 @@ Bool_t RooFormula::changeDependents(const RooAbsCollection& newDeps, Bool_t must RooAbsReal* replace = (RooAbsReal*) arg->findNewServer(newDeps,nameChange) ; if (replace) { _origList.Replace(arg,replace) ; + if (arg->getStringAttribute("origName")) { + replace->setStringAttribute("origName",arg->getStringAttribute("origName")) ; + } else { + replace->setStringAttribute("origName",arg->GetName()) ; + } } else if (mustReplaceAll) { errorStat = kTRUE ; } diff --git a/roofit/roofitcore/src/RooFormulaVar.cxx b/roofit/roofitcore/src/RooFormulaVar.cxx index 95b11f4b79f81..b5c99bf330582 100644 --- a/roofit/roofitcore/src/RooFormulaVar.cxx +++ b/roofit/roofitcore/src/RooFormulaVar.cxx @@ -46,7 +46,7 @@ #include "RooNLLVar.h" #include "RooChi2Var.h" #include "RooMsgService.h" - +#include "RooTrace.h" using namespace std; @@ -66,6 +66,7 @@ RooFormulaVar::RooFormulaVar(const char *name, const char *title, const char* in _actualVars.add(dependents) ; if (_actualVars.getSize()==0) _value = traceEval(0) ; + TRACE_CREATE } @@ -81,6 +82,7 @@ RooFormulaVar::RooFormulaVar(const char *name, const char *title, const RooArgLi _actualVars.add(dependents) ; if (_actualVars.getSize()==0) _value = traceEval(0) ; + TRACE_CREATE } @@ -92,6 +94,7 @@ RooFormulaVar::RooFormulaVar(const RooFormulaVar& other, const char* name) : _formula(0), _formExpr(other._formExpr) { // Copy constructor + TRACE_CREATE } @@ -102,6 +105,7 @@ RooFormulaVar::~RooFormulaVar() // Destructor if (_formula) delete _formula ; + TRACE_DESTROY } @@ -141,7 +145,7 @@ Bool_t RooFormulaVar::isValidReal(Double_t /*value*/, Bool_t /*printError*/) con Bool_t RooFormulaVar::redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t /*isRecursive*/) { // Propagate server change information to embedded RooFormula object - return _formula ? _formula->changeDependents(newServerList,mustReplaceAll,nameChange) : kFALSE ; + return formula().changeDependents(newServerList,mustReplaceAll,nameChange) ; } diff --git a/roofit/roofitcore/src/RooNLLVar.cxx b/roofit/roofitcore/src/RooNLLVar.cxx index 5b1dc3713717b..1de5d53d08325 100644 --- a/roofit/roofitcore/src/RooNLLVar.cxx +++ b/roofit/roofitcore/src/RooNLLVar.cxx @@ -115,6 +115,9 @@ RooNLLVar::RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbs // Retrieve and cache bin widths needed to convert unnormalized binnedPdf values back to yields if (_binnedPdf) { + + // The Active label will disable pdf integral calculations + _binnedPdf->setAttribute("BinnedLikelihoodActive") ; RooArgSet* obs = _funcClone->getObservables(_dataClone) ; if (obs->getSize()!=1) { diff --git a/roofit/roofitcore/src/RooRealSumPdf.cxx b/roofit/roofitcore/src/RooRealSumPdf.cxx index ebb7ea51b1ab2..1f302f0a45384 100644 --- a/roofit/roofitcore/src/RooRealSumPdf.cxx +++ b/roofit/roofitcore/src/RooRealSumPdf.cxx @@ -458,25 +458,14 @@ Double_t RooRealSumPdf::analyticalIntegralWN(Int_t code, const RooArgSet* normSe //_____________________________________________________________________________ Double_t RooRealSumPdf::expectedEvents(const RooArgSet* nset) const { - Double_t n(0) ; - if (getAttribute("BinnedLikelihood")) { - - // need special handling as default integral is disabled - const_cast(this)->setAttribute("BinnedLikelihood",kFALSE) ; - RooAbsReal* integral = createIntegral(*nset) ; - n = integral->getVal() ; - delete integral ; - const_cast(this)->setAttribute("BinnedLikelihood") ; - - } else { - n = getNorm(nset) ; - } + Double_t n = getNorm(nset) ; if (n<0) { logEvalError("Expected number of events is negative") ; } return n ; } + //_____________________________________________________________________________ std::list* RooRealSumPdf::binBoundaries(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const { diff --git a/roofit/roofitcore/src/RooTrace.cxx b/roofit/roofitcore/src/RooTrace.cxx index b0c93f112665d..5cbfdb9456dd1 100644 --- a/roofit/roofitcore/src/RooTrace.cxx +++ b/roofit/roofitcore/src/RooTrace.cxx @@ -42,22 +42,32 @@ using namespace std; ClassImp(RooTrace) ; +RooTrace* RooTrace::_instance=0 ; -Bool_t RooTrace::_active(kFALSE) ; -Bool_t RooTrace::_verbose(kFALSE) ; -RooLinkedList RooTrace::_list ; -RooLinkedList RooTrace::_markList ; -map RooTrace::_objectCount ; -map RooTrace::_specialCount ; -map RooTrace::_specialSize ; + + +//_____________________________________________________________________________ +RooTrace& RooTrace::instance() +{ + if (_instance==0) _instance = new RooTrace() ; + return *_instance ; +} + + +//_____________________________________________________________________________ +RooTrace::RooTrace() : _active(kFALSE), _verbose(kFALSE) +{ +} //_____________________________________________________________________________ void RooTrace::create(const TObject* obj) { // Register creation of object 'obj' - - if (_active) create3(obj) ; + RooTrace& instance = RooTrace::instance() ; + if (instance._active) { + instance.create3(obj) ; + } } @@ -65,17 +75,19 @@ void RooTrace::create(const TObject* obj) void RooTrace::destroy(const TObject* obj) { // Register deletion of object 'obj' - - if (_active) destroy3(obj) ; + RooTrace& instance = RooTrace::instance() ; + if (instance._active) { + instance.destroy3(obj) ; + } } //_____________________________________________________________________________ void RooTrace::createSpecial(const char* name, int size) { - if (_active) { - _specialCount[name]++ ; - _specialSize[name] = size ; + RooTrace& instance = RooTrace::instance() ; + if (instance._active) { + instance.createSpecial3(name,size) ; } } @@ -83,19 +95,36 @@ void RooTrace::createSpecial(const char* name, int size) //_____________________________________________________________________________ void RooTrace::destroySpecial(const char* name) { - if (_active) { - _specialCount[name]++ ; + RooTrace& instance = RooTrace::instance() ; + if (instance._active) { + instance.destroySpecial3(name) ; } } +//_____________________________________________________________________________ +void RooTrace::createSpecial3(const char* name, int size) +{ + _specialCount[name]++ ; + _specialSize[name] = size ; +} + + +//_____________________________________________________________________________ +void RooTrace::destroySpecial3(const char* name) +{ + _specialCount[name]-- ; +} + + + //_____________________________________________________________________________ void RooTrace::active(Bool_t flag) { // If flag is true, memory tracing is activated - - _active = flag ; + + RooTrace::instance()._active = flag ; } @@ -105,11 +134,13 @@ void RooTrace::verbose(Bool_t flag) // If flag is true, a message will be printed at each // object creation or deletion - _verbose = flag ; + RooTrace::instance()._verbose = flag ; } + + //_____________________________________________________________________________ void RooTrace::create2(const TObject* obj) { @@ -158,10 +189,18 @@ void RooTrace::destroy3(const TObject* obj) +//_____________________________________________________________________________ +void RooTrace::mark() +{ + // Put marker in object list, that allows to dump contents of list + // relative to this marker + RooTrace::instance().mark3() ; +} + //_____________________________________________________________________________ -void RooTrace::mark() +void RooTrace::mark3() { // Put marker in object list, that allows to dump contents of list // relative to this marker @@ -175,12 +214,19 @@ void RooTrace::mark() void RooTrace::dump() { // Dump contents of object registry to stdout - dump(cout,kFALSE) ; + RooTrace::instance().dump3(cout,kFALSE) ; } //_____________________________________________________________________________ void RooTrace::dump(ostream& os, Bool_t sinceMarked) +{ + RooTrace::instance().dump3(os,sinceMarked) ; +} + + +//_____________________________________________________________________________ +void RooTrace::dump3(ostream& os, Bool_t sinceMarked) { // Dump contents of object register to stream 'os'. If sinceMarked is // true, only object created after the last call to mark() are shown. @@ -200,9 +246,14 @@ void RooTrace::dump(ostream& os, Bool_t sinceMarked) } - //_____________________________________________________________________________ void RooTrace::printObjectCounts() +{ + RooTrace::instance().printObjectCounts3() ; +} + +//_____________________________________________________________________________ +void RooTrace::printObjectCounts3() { Double_t total(0) ; for (map::iterator iter = _objectCount.begin() ; iter != _objectCount.end() ; ++iter) { diff --git a/roofit/roofitcore/src/RooWorkspace.cxx b/roofit/roofitcore/src/RooWorkspace.cxx index 53cc39ecf5513..2707eec2214c1 100644 --- a/roofit/roofitcore/src/RooWorkspace.cxx +++ b/roofit/roofitcore/src/RooWorkspace.cxx @@ -525,8 +525,10 @@ Bool_t RooWorkspace::import(const RooAbsArg& inArg, cnode2->SetTitle(Form("%s (%s)",cnode2->GetTitle(),suffix)) ; string tag = Form("ORIGNAME:%s",origName.c_str()) ; cnode2->setAttribute(tag.c_str()) ; - string tag2 = Form("%s",origName.c_str()) ; - cnode2->setStringAttribute("origName",tag2.c_str()) ; + if (!cnode2->getStringAttribute("origName")) { + string tag2 = Form("%s",origName.c_str()) ; + cnode2->setStringAttribute("origName",tag2.c_str()) ; + } // Save name of new top level node for later use if (cnode2==cloneTop) { @@ -550,9 +552,11 @@ Bool_t RooWorkspace::import(const RooAbsArg& inArg, string origName = cnode->GetName() ; RooAbsArg* wsnode = _allOwnedNodes.find(origName.c_str()) ; if (wsnode) { - - wsnode->setStringAttribute("origName",wsnode->GetName()) ; - + + if (!wsnode->getStringAttribute("origName")) { + wsnode->setStringAttribute("origName",wsnode->GetName()) ; + } + if (!_allOwnedNodes.find(Form("%s_%s",cnode->GetName(),suffix))) { wsnode->SetName(Form("%s_%s",cnode->GetName(),suffix)) ; wsnode->SetTitle(Form("%s (%s)",cnode->GetTitle(),suffix)) ; @@ -597,8 +601,10 @@ Bool_t RooWorkspace::import(const RooAbsArg& inArg, cnode->SetName(varMap[cnode->GetName()].c_str()) ; string tag = Form("ORIGNAME:%s",origName.c_str()) ; cnode->setAttribute(tag.c_str()) ; - string tag2 = Form("%s",origName.c_str()) ; - cnode->setStringAttribute("origName",tag2.c_str()) ; + if (!cnode->getStringAttribute("origName")) { + string tag2 = Form("%s",origName.c_str()) ; + cnode->setStringAttribute("origName",tag2.c_str()) ; + } if (!silence) { coutI(ObjectHandling) << "RooWorkspace::import(" << GetName() << ") Changing name of variable " From b4df307bf4123467dae604fabffa5c9b617472dc Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Tue, 3 Dec 2013 10:11:32 +0100 Subject: [PATCH 74/85] ignore some test/ios Xcode project files. --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index a19942099f95a..14b0da0a3644b 100644 --- a/.gitignore +++ b/.gitignore @@ -435,6 +435,12 @@ cint/cint/src/loadfile_tmp.cxx /test/RootShower/RootShowerDict.cxx /test/RootShower/RootShowerDict.h +# /test/ios/ +/test/ios/RootBrowser/RootBrowser.xcodeproj/xcuserdata +/test/ios/RootBrowser/RootBrowser.xcodeproj/project.xcworkspace +/test/ios/Tutorials/Tutorials.xcodeproj/xcuserdata +/test/ios/Tutorials/Tutorials.xcodeproj/project.xcworkspace + # /tutorials/ /tutorials/hsimple.root /tutorials/na49.root From b3583bae8860176ed99a41feccde1a91cb6b6e69 Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Tue, 3 Dec 2013 10:12:40 +0100 Subject: [PATCH 75/85] remove the -fvisibility-inlines-hidden option, which causes a bunch of warnings during linking. --- config/Makefile.ios | 4 ++-- config/Makefile.iossim | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/Makefile.ios b/config/Makefile.ios index d65bf7c593326..a75cd70183062 100644 --- a/config/Makefile.ios +++ b/config/Makefile.ios @@ -33,12 +33,12 @@ CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ - -fsigned-char -fno-common -fvisibility-inlines-hidden \ + -fsigned-char -fno-common \ $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) CINTCXXFLAGS = -arch armv7 -pipe -W -Wall -Woverloaded-virtual \ - -fsigned-char -fno-common -fvisibility-inlines-hidden \ + -fsigned-char -fno-common \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL \ -DG__STD_EXCEPTION $(CXX11FLAGS) \ diff --git a/config/Makefile.iossim b/config/Makefile.iossim index 95038be04e275..990dc1b733013 100644 --- a/config/Makefile.iossim +++ b/config/Makefile.iossim @@ -33,12 +33,12 @@ CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch i386 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ - -fsigned-char -fno-common -fvisibility-inlines-hidden \ + -fsigned-char -fno-common \ $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch i386 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) CINTCXXFLAGS = -arch i386 -pipe -W -Wall -Woverloaded-virtual \ - -fsigned-char -fno-common -fvisibility-inlines-hidden \ + -fsigned-char -fno-common \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL \ -DG__STD_EXCEPTION $(CXX11FLAGS) \ From b059d494b15164a497a3f7f9e49d8bb0c52af5ad Mon Sep 17 00:00:00 2001 From: Fons Rademakers Date: Tue, 3 Dec 2013 10:13:14 +0100 Subject: [PATCH 76/85] update to iOS7 as default SDK and some other updates. --- .../RootBrowser.xcodeproj/project.pbxproj | 34 +++++++++++++++---- .../root_browser/root_browser-Info.plist | 34 ++++++++++--------- .../Tutorials.xcodeproj/project.pbxproj | 13 +++++-- 3 files changed, 57 insertions(+), 24 deletions(-) diff --git a/test/ios/RootBrowser/RootBrowser.xcodeproj/project.pbxproj b/test/ios/RootBrowser/RootBrowser.xcodeproj/project.pbxproj index a1b155cdfa74f..5e244326545e0 100644 --- a/test/ios/RootBrowser/RootBrowser.xcodeproj/project.pbxproj +++ b/test/ios/RootBrowser/RootBrowser.xcodeproj/project.pbxproj @@ -337,7 +337,6 @@ isa = PBXGroup; children = ( 706241CC1435F84400202121 /* Custom controls */, - 70360B19142C7AC6001F77E1 /* MessageUI.framework */, 70E0B5E31414E4B80077E4A8 /* General */, 70E0B5D81414E2B50077E4A8 /* Top level view controllers */, 70E0B5D41414E0F10077E4A8 /* Object Inspector */, @@ -358,6 +357,7 @@ 7077901C13FE50EB00C0FFA1 /* Frameworks */ = { isa = PBXGroup; children = ( + 70360B19142C7AC6001F77E1 /* MessageUI.framework */, 7077908F13FE973A00C0FFA1 /* CoreText.framework */, 7077908D13FE972D00C0FFA1 /* QuartzCore.framework */, 7077901D13FE50EB00C0FFA1 /* UIKit.framework */, @@ -684,7 +684,8 @@ 7077901013FE50EB00C0FFA1 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0420; + LastUpgradeCheck = 0500; + ORGANIZATIONNAME = CERN; }; buildConfigurationList = 7077901313FE50EB00C0FFA1 /* Build configuration list for PBXProject "RootBrowser" */; compatibilityVersion = "Xcode 3.2"; @@ -853,18 +854,29 @@ 7077903213FE50EB00C0FFA1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; + ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ../../../hist/hist/src/G__Hist.o; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = 2; @@ -874,13 +886,22 @@ 7077903313FE50EB00C0FFA1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 5.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; @@ -902,7 +923,7 @@ GCC_PREFIX_HEADER = "root_browser/RootBrowser-Prefix.pch"; HEADER_SEARCH_PATHS = ../../../include; INFOPLIST_FILE = "root_browser/root_browser-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ../../../lib; OTHER_LDFLAGS = ( ../../../hist/hist/src/G__Hist.o, @@ -923,11 +944,12 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; + GCC_INLINES_ARE_PRIVATE_EXTERN = YES; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = "root_browser/RootBrowser-Prefix.pch"; HEADER_SEARCH_PATHS = ../../../include; INFOPLIST_FILE = "root_browser/root_browser-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ../../../lib; OTHER_LDFLAGS = ( ../../../hist/hist/src/G__Hist.o, diff --git a/test/ios/RootBrowser/root_browser/root_browser-Info.plist b/test/ios/RootBrowser/root_browser/root_browser-Info.plist index 192990744f9cd..20f0463ebb00f 100644 --- a/test/ios/RootBrowser/root_browser/root_browser-Info.plist +++ b/test/ios/RootBrowser/root_browser/root_browser-Info.plist @@ -6,12 +6,29 @@ en CFBundleDisplayName ${PRODUCT_NAME} + CFBundleDocumentTypes + + + CFBundleTypeIconFiles + + CFBundleTypeName + ROOT + CFBundleTypeRole + Viewer + LSHandlerRank + Owner + LSItemContentTypes + + ch.cern.root + + + CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile app_icon.png CFBundleIdentifier - ROOT.${PRODUCT_NAME:rfc1034identifier} + ch.cern.ROOTBrowser CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -37,21 +54,6 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - CFBundleDocumentTypes - - - CFBundleTypeName - Root - LSHandlerRank - Owner - CFBundleTypeRole - Viewer - LSItemContentTypes - - ch.cern.root - - - UTExportedTypeDeclarations diff --git a/test/ios/Tutorials/Tutorials.xcodeproj/project.pbxproj b/test/ios/Tutorials/Tutorials.xcodeproj/project.pbxproj index 0cec8766b96f4..9a0649735849c 100644 --- a/test/ios/Tutorials/Tutorials.xcodeproj/project.pbxproj +++ b/test/ios/Tutorials/Tutorials.xcodeproj/project.pbxproj @@ -368,6 +368,12 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0420; + ORGANIZATIONNAME = CERN; + TargetAttributes = { + 70BA9B3E13C5F89100102BC9 = { + DevelopmentTeam = V5WJKFTQN5; + }; + }; }; buildConfigurationList = 70BA9B3913C5F89100102BC9 /* Build configuration list for PBXProject "Tutorials" */; compatibilityVersion = "Xcode 3.2"; @@ -536,13 +542,15 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Tutorials/Tutorials-Prefix.pch"; "HEADER_SEARCH_PATHS[arch=*]" = ../../../include; INFOPLIST_FILE = "Tutorials/Tutorials-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ../../../lib; "LIBRARY_SEARCH_PATHS[arch=*]" = "$(inherited)"; OTHER_LDFLAGS = ( @@ -565,12 +573,13 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Tutorials/Tutorials-Prefix.pch"; "HEADER_SEARCH_PATHS[arch=*]" = ../../../include; INFOPLIST_FILE = "Tutorials/Tutorials-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LIBRARY_SEARCH_PATHS = ../../../lib; "LIBRARY_SEARCH_PATHS[arch=*]" = "$(inherited)"; OTHER_LDFLAGS = ( From 0ad8166c384e5f57321f1266e87f8577edc3baad Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Tue, 3 Dec 2013 11:22:44 +0100 Subject: [PATCH 77/85] Add the text editor --- gui/ged/inc/LinkDef.h | 1 + gui/ged/inc/TTextEditor.h | 63 ++++++++++++++ gui/ged/src/TTextEditor.cxx | 163 ++++++++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 gui/ged/inc/TTextEditor.h create mode 100644 gui/ged/src/TTextEditor.cxx diff --git a/gui/ged/inc/LinkDef.h b/gui/ged/inc/LinkDef.h index bbdf2dd32dd55..b66387df5e680 100644 --- a/gui/ged/inc/LinkDef.h +++ b/gui/ged/inc/LinkDef.h @@ -25,6 +25,7 @@ #pragma link C++ class TAxisEditor; #pragma link C++ class TFrameEditor; #pragma link C++ class TGraphEditor; +#pragma link C++ class TTextEditor; #pragma link C++ class TPieEditor; #pragma link C++ class TPieSliceEditor; #pragma link C++ class TH1Editor; diff --git a/gui/ged/inc/TTextEditor.h b/gui/ged/inc/TTextEditor.h new file mode 100644 index 0000000000000..16e6a869f5c02 --- /dev/null +++ b/gui/ged/inc/TTextEditor.h @@ -0,0 +1,63 @@ +// Author: Olivier Couet 22/12/2013 + +/************************************************************************* + * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. * + * All rights reserved. * + * * + * For the licensing terms see $ROOTSYS/LICENSE. * + * For the list of contributors see $ROOTSYS/README/CREDITS. * + *************************************************************************/ + + +////////////////////////////////////////////////////////////////////////// +// // +// TTextEditor // +// // +// Editor for changing TText's and TLatex's attributes. // +// // +////////////////////////////////////////////////////////////////////////// + +#ifndef ROOT_TTextEditor +#define ROOT_TTextEditor +#ifndef ROOT_TGedFrame +#include "TGedFrame.h" +#endif + +class TText; +class TGTextEntry; +class TGNumberEntry; + +class TTextEditor : public TGedFrame { + +private: + TText *fEditedText; + +protected: + TGTextEntry *fText; // Text + TGNumberEntry *fAngle; // Text's angle + TGNumberEntry *fSize; // Text's angle + TGNumberEntry *fXpos; // Text's X position + TGNumberEntry *fYpos; // Text's Y position + + void ConnectSignals2Slots(); + +public: + TTextEditor(const TGWindow *p = 0, + Int_t width = 140, Int_t height = 30, + UInt_t options = kChildFrame, + Pixel_t back = GetDefaultFrameBackground()); + ~TTextEditor(); + + void SetModel(TObject *); + + void DoAngle(); + void DoSize(); + void DoText(const char*); + void DoXpos(); + void DoYpos(); + + ClassDef(TTextEditor,0) // text editor +}; + +#endif // ROOT_TTextEditor + diff --git a/gui/ged/src/TTextEditor.cxx b/gui/ged/src/TTextEditor.cxx new file mode 100644 index 0000000000000..d8137af5ada1a --- /dev/null +++ b/gui/ged/src/TTextEditor.cxx @@ -0,0 +1,163 @@ +#include "TTextEditor.h" +#include "TText.h" +#include "TGTextEntry.h" +#include "TGNumberEntry.h" +#include "TGLabel.h" + +ClassImp(TTextEditor) + + +enum ELatexID{ + kText_Text = 0, kText_Xpos, kText_Ypos, kText_Angle, kText_Size +}; + + +//______________________________________________________________________________ +TTextEditor::TTextEditor(const TGWindow *p, + Int_t width, Int_t height, + UInt_t options, Pixel_t back) + : TGedFrame(p, width, height, options | kVerticalFrame, back) +{ + // TTextEditor constructor. + + fText = 0; + + // start initializing the window components + MakeTitle("Text String"); + + fText = new TGTextEntry(this, new TGTextBuffer(50), kText_Text); + fText->Resize(135, fText->GetDefaultHeight()); + fText->SetToolTipText("Enter the text string"); + AddFrame(fText, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5)); + + TGCompositeFrame *f1 = new TGCompositeFrame(this, 120, 20, kHorizontalFrame); + TGLabel *lbl1 = new TGLabel(f1,"X Position"); + fXpos = new TGNumberEntry(f1, 4, 2, kText_Xpos, TGNumberEntry::kNESRealTwo, + TGNumberEntry::kNEANonNegative); + fXpos->Resize(50, 20); + f1->AddFrame(lbl1, new TGLayoutHints(kLHintsLeft,1, 1, 1, 1)); + f1->AddFrame(fXpos, new TGLayoutHints(kLHintsLeft, 7, 1, 1, 1)); + AddFrame(f1, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); + + TGCompositeFrame *f2 = new TGCompositeFrame(this, 120, 20, kHorizontalFrame); + TGLabel *lbl2 = new TGLabel(f2,"Y Position"); + fYpos = new TGNumberEntry(f2, 4, 2, kText_Ypos, TGNumberEntry::kNESRealTwo, + TGNumberEntry::kNEANonNegative); + fYpos->Resize(50, 20); + f2->AddFrame(lbl2, new TGLayoutHints(kLHintsLeft,1, 1, 1, 1)); + f2->AddFrame(fYpos, new TGLayoutHints(kLHintsLeft, 7, 1, 1, 1)); + AddFrame(f2, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); + + TGCompositeFrame *f3 = new TGCompositeFrame(this, 120, 20, kHorizontalFrame); + TGLabel *lbl3 = new TGLabel(f3,"Text Angle"); + fAngle = new TGNumberEntry(f3, 4, 2, kText_Angle, TGNumberEntry::kNESInteger, + TGNumberEntry::kNEANonNegative); + fAngle->Resize(50, 20); + f3->AddFrame(lbl3, new TGLayoutHints(kLHintsLeft,1, 1, 1, 1)); + f3->AddFrame(fAngle, new TGLayoutHints(kLHintsLeft, 7, 1, 1, 1)); + AddFrame(f3, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); + + TGCompositeFrame *f4 = new TGCompositeFrame(this, 120, 20, kHorizontalFrame); + TGLabel *lbl4 = new TGLabel(f4,"Text Size"); + fSize = new TGNumberEntry(f4, 4, 2, kText_Size, TGNumberEntry::kNESRealTwo, + TGNumberEntry::kNEANonNegative); + fSize->Resize(50, 20); + f4->AddFrame(lbl4, new TGLayoutHints(kLHintsLeft,1, 1, 1, 1)); + f4->AddFrame(fSize, new TGLayoutHints(kLHintsLeft, 7, 1, 1, 1)); + AddFrame(f4, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1)); +} + + +//______________________________________________________________________________ +TTextEditor::~TTextEditor() +{ + // TTextEditor destructor. +} + + +//______________________________________________________________________________ +void TTextEditor::SetModel(TObject *obj) +{ + // Set model. + + fEditedText = (TText*) (obj); + + fAvoidSignal = kTRUE; + fText->SetText(fEditedText->GetTitle()); + fXpos->SetNumber(fEditedText->GetX()); + fYpos->SetNumber(fEditedText->GetY()); + fAngle->SetNumber(fEditedText->GetTextAngle()); + fSize->SetNumber(fEditedText->GetTextSize()); + + if (fInit) ConnectSignals2Slots(); + fAvoidSignal = kFALSE; +} + + +//_____________________________________________________________________________ +void TTextEditor::ConnectSignals2Slots() +{ + // Connect signals to slots. + + fText->Connect("TextChanged(const char *)","TTextEditor",this,"DoText(const char *)"); + fXpos->Connect("ValueSet(Long_t)", "TTextEditor", this, "DoXpos()"); + fYpos->Connect("ValueSet(Long_t)", "TTextEditor", this, "DoYpos()"); + fAngle->Connect("ValueSet(Long_t)", "TTextEditor", this, "DoAngle()"); + fSize->Connect("ValueSet(Long_t)", "TTextEditor", this, "DoSize()"); + + fInit = kFALSE; // connect the slots to the signals only once +} + +//______________________________________________________________________________ +void TTextEditor::DoAngle() +{ + // Slot for setting the text Angle. + + if (fAvoidSignal) return; + fEditedText->SetTextAngle(fAngle->GetNumber()); + Update(); +} + + +//______________________________________________________________________________ +void TTextEditor::DoSize() +{ + // Slot for setting the text Size. + + if (fAvoidSignal) return; + fEditedText->SetTextSize(fSize->GetNumber()); + Update(); +} + + +//______________________________________________________________________________ +void TTextEditor::DoText(const char *text) +{ + // Slot for setting the text string. + + if (fAvoidSignal) return; + fEditedText->SetTitle(text); + Update(); +} + + +//______________________________________________________________________________ +void TTextEditor::DoXpos() +{ + // Slot for setting the text X position. + + if (fAvoidSignal) return; + fEditedText->SetX(fXpos->GetNumber()); + Update(); +} + + +//______________________________________________________________________________ +void TTextEditor::DoYpos() +{ + // Slot for setting the text Y position. + + if (fAvoidSignal) return; + fEditedText->SetY(fYpos->GetNumber()); + Update(); +} \ No newline at end of file From 27ba1063f85f161ee55f8a3534845c08be62ce16 Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Mon, 2 Dec 2013 21:18:39 +0100 Subject: [PATCH 78/85] Add a protection for creating the Minimizer and DistSampler with the plugin manager in multithreads (thanks for Andreas, see ROOT-5335) --- math/mathcore/src/Factory.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/math/mathcore/src/Factory.cxx b/math/mathcore/src/Factory.cxx index c9216f0cc7d69..f14d71b7aa7d5 100644 --- a/math/mathcore/src/Factory.cxx +++ b/math/mathcore/src/Factory.cxx @@ -21,10 +21,17 @@ #include "Math/DistSampler.h" #include "Math/DistSamplerOptions.h" +// uncomment these if you dont want to use the plugin manager +// but you need to link also the needed minimization libraries (e.g Minuit and/or Minuit2) +// #define MATH_NO_PLUGIN_MANAGER +// #define HAS_MINUIT +// #define HAS_MINUIT2 + #ifndef MATH_NO_PLUGIN_MANAGER // use ROOT Plug-in manager #include "TPluginManager.h" #include "TROOT.h" +#include "TVirtualMutex.h" #else // all the minimizer implementation classes //#define HAS_MINUIT2 @@ -76,6 +83,8 @@ ROOT::Math::Minimizer * ROOT::Math::Factory::CreateMinimizer(const std::string & if (minimizerType.empty() ) minim = ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_str(); + R__LOCKGUARD2(gROOTMutex); + // create Minimizer using the PM TPluginHandler *h; //gDebug = 3; @@ -128,7 +137,7 @@ ROOT::Math::Minimizer * ROOT::Math::Factory::CreateMinimizer(const std::string & #ifdef HAS_MINUIT // use TMinuit if (minimizerType == "Minuit" || minimizerType == "TMinuit") - min = new ROOT::Fit::TMinuitMinimizer(algoType.c_str()); + min = new TMinuitMinimizer(algoType.c_str()); #endif #ifdef R__HAS_MATHMORE From 7370e619de1db56218e687620b7b7b8ee83646fa Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Mon, 2 Dec 2013 21:19:55 +0100 Subject: [PATCH 79/85] Fix also the DistSampler --- math/mathcore/src/Factory.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/math/mathcore/src/Factory.cxx b/math/mathcore/src/Factory.cxx index f14d71b7aa7d5..49d47646534e7 100644 --- a/math/mathcore/src/Factory.cxx +++ b/math/mathcore/src/Factory.cxx @@ -173,6 +173,8 @@ ROOT::Math::DistSampler * ROOT::Math::Factory::CreateDistSampler(const std::stri const char * typeName = type.c_str(); if (type.empty() ) typeName = ROOT::Math::DistSamplerOptions::DefaultSampler().c_str(); + R__LOCKGUARD2(gROOTMutex); + TPluginManager *pm = gROOT->GetPluginManager(); assert(pm != 0); TPluginHandler *h = pm->FindHandler("ROOT::Math::DistSampler", typeName ); From bbb467a43a23bffac91137b30a8301d89059ef40 Mon Sep 17 00:00:00 2001 From: Lorenzo Moneta Date: Tue, 3 Dec 2013 16:34:18 +0100 Subject: [PATCH 80/85] Fix TH1::Smooth for histograms with less than 3 bins (ROOT-5307) --- hist/hist/src/TH1.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index fafd080e8f19f..a6deed3f62c54 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -6165,6 +6165,11 @@ void TH1::SmoothArray(Int_t nn, Double_t *xx, Int_t ntimes) // based on algorithm 353QH twice presented by J. Friedman // in Proc.of the 1974 CERN School of Computing, Norway, 11-24 August, 1974. + if (nn < 3 ) { + if (gROOT) gROOT->Error("SmoothArray","Need at least 3 points for smoothing: n = %d",nn); + return; + } + Int_t ii, jj, ik, jk, kk, nn2; Double_t hh[6] = {0,0,0,0,0,0}; Double_t *yy = new Double_t[nn]; @@ -6335,10 +6340,15 @@ void TH1::Smooth(Int_t ntimes, Option_t *option) Error("Smooth","Smooth only supported for 1-d histograms"); return; } + Int_t nbins = fXaxis.GetNbins(); + if (nbins < 3) { + Error("Smooth","Smooth only supported for histograms with >= 3 bins. Nbins = %d",nbins); + return; + } + // delete buffer if it is there since it will become invalid if (fBuffer) BufferEmpty(1); - Int_t nbins = fXaxis.GetNbins(); Int_t firstbin = 1, lastbin = nbins; TString opt = option; opt.ToLower(); From 06b097844786b712b6800122e7de5f815851add7 Mon Sep 17 00:00:00 2001 From: Olivier Couet Date: Tue, 3 Dec 2013 17:10:57 +0100 Subject: [PATCH 81/85] fix ROOT-5241 by implementing the option 'noclear'. --- hist/hist/src/THStack.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hist/hist/src/THStack.cxx b/hist/hist/src/THStack.cxx index 115b58041287b..d2bc2f22fff3a 100644 --- a/hist/hist/src/THStack.cxx +++ b/hist/hist/src/THStack.cxx @@ -567,7 +567,7 @@ Long64_t THStack::Merge(TCollection* li, TFileMergeInfo * /* info */) { // Merge the THStack in the TList into this stack. // Returns the total number of histograms in the result or -1 in case of an error. - + if (li==0 || li->GetEntries()==0) { return fHists->GetEntries(); } @@ -614,6 +614,12 @@ void THStack::Paint(Option_t *option) // a number of pads equal to the number of histograms and each histogram // is paint into a separate pad. // + // By default the background of the histograms is erased before drawing the + // histograms. The option "noclear" avoid this behaviour. This is useful + // when drawing a THStack on top of an other plot. If the patterns used to + // draw the histograms in the stack are transparents, then the plot behind + // will be visible. + // // See THistPainter::Paint for a list of valid options. if (!fHists) return; @@ -626,6 +632,11 @@ void THStack::Paint(Option_t *option) lsame = kTRUE; opt.ReplaceAll("same",""); } + Bool_t lclear = kTRUE; + if (opt.Contains("noclear")) { + lclear = kFALSE; + opt.ReplaceAll("noclear",""); + } if (opt.Contains("pads")) { Int_t npads = fHists->GetSize(); TVirtualPad *padsav = gPad; @@ -797,7 +808,7 @@ void THStack::Paint(Option_t *option) snprintf(loption,31,"%ssame%s",noption,lnk->GetOption()); } h1 = (TH1*)fStack->At(nhists-i-1); - if (i>0) { + if (i>0 && lclear) { // Erase before drawing the histogram h1col = h1->GetFillColor(); h1fill = h1->GetFillStyle(); @@ -806,7 +817,7 @@ void THStack::Paint(Option_t *option) h1->Paint(loption); static TClassRef clTFrame = TClass::GetClass("TFrame",kFALSE); TAttFill *frameFill = (TAttFill*)clTFrame->DynamicCast(TAttFill::Class(),gPad->GetFrame()); - if (frameFill) { + if (frameFill) { h1->SetFillColor(frameFill->GetFillColor()); h1->SetFillStyle(frameFill->GetFillStyle()); } From 31803c32891c6c9321ea2d496c01f5f772f8d829 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Thu, 28 Nov 2013 15:54:17 +0100 Subject: [PATCH 82/85] Do not ignore Mode and ForceUpdate in AliEn dsets --- proof/proof/src/TDataSetManagerAliEn.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/proof/proof/src/TDataSetManagerAliEn.cxx b/proof/proof/src/TDataSetManagerAliEn.cxx index 97dd37febd959..dea06f8c88608 100644 --- a/proof/proof/src/TDataSetManagerAliEn.cxx +++ b/proof/proof/src/TDataSetManagerAliEn.cxx @@ -546,6 +546,14 @@ Bool_t TDataSetManagerAliEn::ParseCustomFindUri(TString &uri, // part is known ("Find;") and stripped TString checkUri = uri(5, uri.Length()); + // Mode and ForceUpdate (strip them from the check string) + TPMERegexp reMode("(^|;)(Mode=[A-Za-z]+)(;|$)"); + if (reMode.Match(uri) == 4) + checkUri.ReplaceAll(reMode[2], ""); + TPMERegexp reForceUpdate("(^|;)(ForceUpdate)(;|$)"); + if (reForceUpdate.Match(uri) == 4) + checkUri.ReplaceAll(reForceUpdate[2], ""); + // Base path TPMERegexp reBasePath("(^|;)(BasePath=([^; ]+))(;|$)"); if (reBasePath.Match(uri) != 5) { @@ -619,6 +627,14 @@ Bool_t TDataSetManagerAliEn::ParseOfficialDataUri(TString &uri, Bool_t sim, checkUri = uri(idx, uri.Length()); } + // Mode and ForceUpdate (strip them from the check string) + TPMERegexp reMode("(^|;)(Mode=[A-Za-z]+)(;|$)"); + if (reMode.Match(uri) == 4) + checkUri.ReplaceAll(reMode[2], ""); + TPMERegexp reForceUpdate("(^|;)(ForceUpdate)(;|$)"); + if (reForceUpdate.Match(uri) == 4) + checkUri.ReplaceAll(reForceUpdate[2], ""); + // // Parse LHC period // From 8512db8e93612274ed9064c23354d54365a21e13 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Thu, 28 Nov 2013 15:56:18 +0100 Subject: [PATCH 83/85] Hidden interface by making a method protected --- proof/proof/inc/TDataSetManagerAliEn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proof/proof/inc/TDataSetManagerAliEn.h b/proof/proof/inc/TDataSetManagerAliEn.h index 45a117f4b2ce0..dc6213013b2ba 100644 --- a/proof/proof/inc/TDataSetManagerAliEn.h +++ b/proof/proof/inc/TDataSetManagerAliEn.h @@ -116,6 +116,8 @@ class TDataSetManagerAliEn : public TDataSetManager { virtual void Init(TString cacheDir, TString urlTpl, ULong_t cacheExpire_s); + virtual TList *GetFindCommandsFromUri(TString &uri, EDataMode &dataMode, Bool_t &forceUpdate); + public: TDataSetManagerAliEn() : TDataSetManager(0, 0, 0) {} @@ -123,8 +125,6 @@ class TDataSetManagerAliEn : public TDataSetManager { ULong_t cacheExpire_s); TDataSetManagerAliEn(const char *, const char *, const char *cfgStr); - virtual TList *GetFindCommandsFromUri(TString &uri, EDataMode &dataMode, Bool_t &forceUpdate); - virtual ~TDataSetManagerAliEn(); virtual TFileCollection *GetDataSet(const char *uri, const char * = 0); virtual Bool_t ExistsDataSet(const char *uri); From 53ae2a0a17ac7a09e1bc76f78fab5c38ceadeee6 Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Thu, 28 Nov 2013 16:34:05 +0100 Subject: [PATCH 84/85] Faster AliEn dir verification code --- proof/proof/src/TDataSetManagerAliEn.cxx | 58 ++++++++++++------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/proof/proof/src/TDataSetManagerAliEn.cxx b/proof/proof/src/TDataSetManagerAliEn.cxx index dea06f8c88608..fc7ea0e735a61 100644 --- a/proof/proof/src/TDataSetManagerAliEn.cxx +++ b/proof/proof/src/TDataSetManagerAliEn.cxx @@ -451,35 +451,43 @@ TList *TDataSetManagerAliEn::GetFindCommandsFromUri(TString &uri, findCommands = new TList(); findCommands->SetOwner(kTRUE); + TString basePathSim; + + if (sim) { + // Montecarlo init. + // Check whether this period is in /alice/sim/ or in + // /alice/sim// and act properly, since naming convention + // is unclear! + if (!gGrid) { + TGrid::Connect("alien:"); + if (!gGrid) { + delete findCommands; + delete runList; + return NULL; + } + } + + // Check once for all + basePathSim.Form("/alice/sim/%s", lhcPeriod.Data()); // no year + if (!gGrid->Cd(basePathSim.Data())) { + basePathSim.Form("/alice/sim/%d/%s", year, lhcPeriod.Data()); + } + } + else { + // Real data init. + // Parse the pass string: if it starts with a number, prepend "pass" + if ((pass[0] >= '0') && (pass[0] <= '9')) pass.Prepend("pass"); + } + for (UInt_t i=0; isize(); i++) { // Here we need to assemble the find string TString basePath, fileName, temp; if (sim) { - - // // Montecarlo - // - - // Check whether this period is in /alice/sim/ or in - // /alice/sim// and act properly, since naming convention - // is unclear! - if (!gGrid) { - TGrid::Connect("alien:"); - if (!gGrid) { - delete findCommands; - delete runList; - return NULL; - } - } - - basePath.Form("/alice/sim/%s", lhcPeriod.Data()); // no year - if (!gGrid->Cd(basePath.Data())) { - basePath.Form("/alice/sim/%d/%s", year, lhcPeriod.Data()); - } temp.Form("/%06d", runList->at(i)); - basePath.Append(temp); + basePath = basePathSim + temp; if (!esd) { temp.Form("/AOD%03d", aodNum); @@ -487,15 +495,7 @@ TList *TDataSetManagerAliEn::GetFindCommandsFromUri(TString &uri, } } else { - - // // Real data - // - - // Parse the pass string: if it starts with a number, prepend "pass" - if ((pass[0] >= '0') && (pass[0] <= '9')) pass.Prepend("pass"); - - // Data basePath.Form("/alice/data/%d/%s/%09d/ESDs/%s", year, lhcPeriod.Data(), runList->at(i), pass.Data()); if (esd) { From 3fe05df234e6f7b8945f05784d9996cf897630aa Mon Sep 17 00:00:00 2001 From: Dario Berzano Date: Fri, 29 Nov 2013 01:35:45 +0100 Subject: [PATCH 85/85] Improved AliEn dataset retrieval with run ranges Since run ranges usually contain many "holes", yet they are more convenient to use than specifying a list of runs manually, a preventive check to prune invalid run numbers is performed: AliEn queries on non-existing runs are consequently avoided. --- proof/proof/src/TDataSetManagerAliEn.cxx | 72 +++++++++++++++++++----- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/proof/proof/src/TDataSetManagerAliEn.cxx b/proof/proof/src/TDataSetManagerAliEn.cxx index fc7ea0e735a61..0843295405209 100644 --- a/proof/proof/src/TDataSetManagerAliEn.cxx +++ b/proof/proof/src/TDataSetManagerAliEn.cxx @@ -451,43 +451,85 @@ TList *TDataSetManagerAliEn::GetFindCommandsFromUri(TString &uri, findCommands = new TList(); findCommands->SetOwner(kTRUE); - TString basePathSim; + TString basePathRun; + + if (!gGrid) { + TGrid::Connect("alien:"); + if (!gGrid) { + delete findCommands; + delete runList; + return NULL; + } + } if (sim) { // Montecarlo init. // Check whether this period is in /alice/sim/ or in // /alice/sim// and act properly, since naming convention // is unclear! - if (!gGrid) { - TGrid::Connect("alien:"); - if (!gGrid) { - delete findCommands; - delete runList; - return NULL; - } - } // Check once for all - basePathSim.Form("/alice/sim/%s", lhcPeriod.Data()); // no year - if (!gGrid->Cd(basePathSim.Data())) { - basePathSim.Form("/alice/sim/%d/%s", year, lhcPeriod.Data()); + basePathRun.Form("/alice/sim/%s", lhcPeriod.Data()); // no year + if (!gGrid->Cd(basePathRun.Data())) { + basePathRun.Form("/alice/sim/%d/%s", year, lhcPeriod.Data()); } } else { // Real data init. // Parse the pass string: if it starts with a number, prepend "pass" if ((pass[0] >= '0') && (pass[0] <= '9')) pass.Prepend("pass"); + basePathRun.Form("/alice/data/%d/%s", year, lhcPeriod.Data()); + } + + // Form a list of valid runs (to avoid unnecessary queries when run ranges + // are specified) + std::vector validRuns; + { + TGridResult *validRunDirs = gGrid->Ls( basePathRun.Data() ); + if (!validRunDirs) return NULL; + + TIter nrd(validRunDirs); + TMap *dir; + TObjString *os; + validRuns.resize( (size_t)(validRunDirs->GetEntries()) ); + + while (( dir = dynamic_cast(nrd()) ) != NULL) { + os = dynamic_cast( dir->GetValue("name") ); + if (!os) continue; + Int_t run = (os->String()).Atoi(); + if (run > 0) validRuns.push_back(run); + } } for (UInt_t i=0; isize(); i++) { + // Check if current run is valid + Bool_t valid = kFALSE; + for (UInt_t j=0; j=1) { + Warning("TDataSetManagerAliEn::GetFindCommandsFromUri", + "Avoiding unnecessary find on run %d: not found", (*runList)[i]); + //} + continue; + } + else { + Info("TDataSetManagerAliEn::GetFindCommandsFromUri", + "Run found: %d", (*runList)[i]); + } + // Here we need to assemble the find string TString basePath, fileName, temp; if (sim) { // Montecarlo temp.Form("/%06d", runList->at(i)); - basePath = basePathSim + temp; + basePath = basePathRun + temp; if (!esd) { temp.Form("/AOD%03d", aodNum); @@ -496,8 +538,8 @@ TList *TDataSetManagerAliEn::GetFindCommandsFromUri(TString &uri, } else { // Real data - basePath.Form("/alice/data/%d/%s/%09d/ESDs/%s", year, - lhcPeriod.Data(), runList->at(i), pass.Data()); + temp.Form("/%09d/ESDs/%s", runList->at(i), pass.Data()); + basePath = basePathRun + temp; if (esd) { basePath.Append("/*.*"); }