From db1b652433071afbba68187156f4add3fe166136 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Wed, 22 Jul 2026 17:34:41 +0200 Subject: [PATCH 1/4] [roottest] Replace a test dependency with a fixture. Fixtures run even when the setup test is not selected, whereas dependencies only have an effect when setup and main test are selected. --- roottest/cling/specialobj/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roottest/cling/specialobj/CMakeLists.txt b/roottest/cling/specialobj/CMakeLists.txt index 1b810989e50d1..0e5f06a232ed5 100644 --- a/roottest/cling/specialobj/CMakeLists.txt +++ b/roottest/cling/specialobj/CMakeLists.txt @@ -5,6 +5,7 @@ ROOTTEST_ADD_TEST(assertGPad ROOTTEST_ADD_TEST(stlwrite MACRO write.C + FIXTURES_SETUP cling-specialobj-stlwrite LABELS roottest regression cling) ROOTTEST_ADD_TEST(argtwice @@ -14,7 +15,7 @@ ROOTTEST_ADD_TEST(argtwice ROOTTEST_ADD_TEST(stlProxies MACRO runstlProxies.C OUTREF stlProxies.ref - DEPENDS stlwrite + FIXTURES_REQUIRED cling-specialobj-stlwrite LABELS roottest regression cling) if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64.*|x86.*|amd64.*|AMD64.*|i686.*|i386.*") From 51df82f9f49b75bf1f0a2177dc0797f962efc4fe Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 14 Jul 2026 15:08:42 +0200 Subject: [PATCH 2/4] [math/tmva] Clean up files that unnecessarily include TEventList. Also remove further includes that were unused. --- math/mlp/inc/TMultiLayerPerceptron.h | 2 +- math/mlp/src/TMultiLayerPerceptron.cxx | 1 + tmva/tmva/src/Classification.cxx | 1 - tmva/tmva/src/DataInputHandler.cxx | 3 --- tmva/tmva/src/DataSetFactory.cxx | 9 --------- tmva/tmva/src/DataSetInfo.cxx | 8 ++------ tmva/tmva/src/Factory.cxx | 13 +++++-------- tmva/tmva/src/MethodTMlpANN.cxx | 3 --- 8 files changed, 9 insertions(+), 31 deletions(-) diff --git a/math/mlp/inc/TMultiLayerPerceptron.h b/math/mlp/inc/TMultiLayerPerceptron.h index 36d5d01d34aab..1c423321091da 100644 --- a/math/mlp/inc/TMultiLayerPerceptron.h +++ b/math/mlp/inc/TMultiLayerPerceptron.h @@ -15,8 +15,8 @@ #include "TObject.h" #include "TString.h" #include "TObjArray.h" -#include "TMatrixD.h" #include "TNeuron.h" +#include "TMatrixDfwd.h" class TTree; class TEventList; diff --git a/math/mlp/src/TMultiLayerPerceptron.cxx b/math/mlp/src/TMultiLayerPerceptron.cxx index 87a6068a1c348..4683272659768 100644 --- a/math/mlp/src/TMultiLayerPerceptron.cxx +++ b/math/mlp/src/TMultiLayerPerceptron.cxx @@ -242,6 +242,7 @@ neurons, hidden layers and inputs/outputs that does not apply to TMultiLayerPerc #include "TH2.h" #include "TGraph.h" #include "TLegend.h" +#include "TMatrixD.h" #include "TMultiGraph.h" #include "TDirectory.h" #include "TSystem.h" diff --git a/tmva/tmva/src/Classification.cxx b/tmva/tmva/src/Classification.cxx index 58b21238dc63a..8a8ec50f03280 100644 --- a/tmva/tmva/src/Classification.cxx +++ b/tmva/tmva/src/Classification.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/tmva/tmva/src/DataInputHandler.cxx b/tmva/tmva/src/DataInputHandler.cxx index bde79ed57e965..2c725b85aa03f 100644 --- a/tmva/tmva/src/DataInputHandler.cxx +++ b/tmva/tmva/src/DataInputHandler.cxx @@ -36,12 +36,9 @@ Class that contains all the data information. #include "TMVA/DataLoader.h" #include "TMVA/MsgLogger.h" #include "TMVA/Types.h" -#include "TEventList.h" #include "TCut.h" #include "TTree.h" -#include "TMVA/Configurable.h" - #include #include diff --git a/tmva/tmva/src/DataSetFactory.cxx b/tmva/tmva/src/DataSetFactory.cxx index 8b09d1bb9eb14..96d9b2e85d334 100644 --- a/tmva/tmva/src/DataSetFactory.cxx +++ b/tmva/tmva/src/DataSetFactory.cxx @@ -41,26 +41,17 @@ Class that contains all the data information #include #include -#include -#include -#include #include "TMVA/DataSetFactory.h" -#include "TEventList.h" #include "TFile.h" #include "TRandom3.h" -#include "TMatrixF.h" -#include "TVectorF.h" #include "TMath.h" #include "TTree.h" #include "TBranch.h" #include "TMVA/MsgLogger.h" #include "TMVA/Configurable.h" -#include "TMVA/VariableIdentityTransform.h" -#include "TMVA/VariableDecorrTransform.h" -#include "TMVA/VariablePCATransform.h" #include "TMVA/DataSet.h" #include "TMVA/DataSetInfo.h" #include "TMVA/DataInputHandler.h" diff --git a/tmva/tmva/src/DataSetInfo.cxx b/tmva/tmva/src/DataSetInfo.cxx index 651f1e6b9b99d..6edf91cde5076 100644 --- a/tmva/tmva/src/DataSetInfo.cxx +++ b/tmva/tmva/src/DataSetInfo.cxx @@ -31,14 +31,8 @@ Class that contains all the data information. */ -#include - -#include "TEventList.h" #include "TH2.h" -#include "TRandom3.h" #include "TMatrixF.h" -#include "TVectorF.h" -#include "TROOT.h" #include "TMVA/MsgLogger.h" #include "TMVA/Tools.h" @@ -50,6 +44,8 @@ Class that contains all the data information. #include "TMVA/Types.h" #include "TMVA/VariableInfo.h" +#include + //////////////////////////////////////////////////////////////////////////////// /// constructor diff --git a/tmva/tmva/src/Factory.cxx b/tmva/tmva/src/Factory.cxx index 278730bbef214..42f3081621be6 100644 --- a/tmva/tmva/src/Factory.cxx +++ b/tmva/tmva/src/Factory.cxx @@ -71,26 +71,23 @@ evaluation phases. #include "TMVA/ResultsClassification.h" #include "TMVA/ResultsRegression.h" #include "TMVA/ResultsMulticlass.h" -#include -#include -#include #include "TMVA/Types.h" #include "TROOT.h" #include "TFile.h" -#include "TLeaf.h" -#include "TEventList.h" #include "TH2.h" #include "TGraph.h" #include "TStyle.h" -#include "TMatrixF.h" -#include "TMatrixDSym.h" -#include "TMultiGraph.h" #include "TPrincipal.h" #include "TMath.h" #include "TSystem.h" #include "TCanvas.h" +#include "TMultiGraph.h" + +#include +#include +#include const Int_t MinNoTrainingEvents = 10; // const Int_t MinNoTestEvents = 1; diff --git a/tmva/tmva/src/MethodTMlpANN.cxx b/tmva/tmva/src/MethodTMlpANN.cxx index f67da9507ba78..39b6b8abf2dad 100644 --- a/tmva/tmva/src/MethodTMlpANN.cxx +++ b/tmva/tmva/src/MethodTMlpANN.cxx @@ -46,7 +46,6 @@ for details on this ANN. #include "TMVA/MethodTMlpANN.h" #include "TMVA/Config.h" -#include "TMVA/Configurable.h" #include "TMVA/DataSet.h" #include "TMVA/DataSetInfo.h" #include "TMVA/IMethod.h" @@ -58,8 +57,6 @@ for details on this ANN. #include "TMVA/ClassifierFactory.h" #include "TMVA/Tools.h" -#include "TLeaf.h" -#include "TEventList.h" #include "TROOT.h" #include "TMultiLayerPerceptron.h" #include "ThreadLocalStorage.h" From 1109e3ce82acf5c2eabe044d5b64fc5718e2d9ae Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 14 Jul 2026 15:12:07 +0200 Subject: [PATCH 3/4] [NFC] Remove dead mentions of TEventList. --- roottest/root/tree/cache/variableCluster.C | 19 +++---------------- tree/treeplayer/src/TTreePlayer.cxx | 2 -- tree/treeviewer/src/TSpider.cxx | 2 -- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/roottest/root/tree/cache/variableCluster.C b/roottest/root/tree/cache/variableCluster.C index a712392e5feb6..de107e8a40324 100644 --- a/roottest/root/tree/cache/variableCluster.C +++ b/roottest/root/tree/cache/variableCluster.C @@ -220,26 +220,13 @@ Long64_t checkBoundary(TTree *tree, Long64_t entry) TTree::TClusterIterator clusterIter = tree->GetClusterIterator(entry); fEntryCurrent = clusterIter(); fEntryNext = clusterIter.GetNextEntry(); - + // fprintf(stdout,"finds = %lld %lld\n",fEntryCurrent,fEntryNext); - + if (fEntryCurrent < fEntryMin) fEntryCurrent = fEntryMin; if (fEntryMax <= 0) fEntryMax = tree->GetEntries(); if (fEntryNext > fEntryMax) fEntryNext = fEntryMax; - - // Check if owner has a TEventList set. If yes we optimize for this - // Special case reading only the baskets containing entries in the - // list. -// TEventList *elist = fOwner->GetEventList(); -// Long64_t chainOffset = 0; -// if (elist) { -// if (fOwner->IsA() ==TChain::Class()) { -// TChain *chain = (TChain*)fOwner; -// Int_t t = chain->GetTreeNumber(); -// chainOffset = chain->GetTreeOffset()[t]; -// } -// } - + Int_t flushIntervals = 0; Long64_t minEntry = fEntryCurrent; Long64_t prevNtot; diff --git a/tree/treeplayer/src/TTreePlayer.cxx b/tree/treeplayer/src/TTreePlayer.cxx index 4065337e4d956..6decc11d535fb 100644 --- a/tree/treeplayer/src/TTreePlayer.cxx +++ b/tree/treeplayer/src/TTreePlayer.cxx @@ -622,8 +622,6 @@ Long64_t TTreePlayer::GetEntriesToProcess(Long64_t firstentry, Long64_t nentries lastentry = fTree->GetEntriesFriend() - 1; nentries = lastentry - firstentry + 1; } - //TEventList *elist = fTree->GetEventList(); - //if (elist && elist->GetN() < nentries) nentries = elist->GetN(); TEntryList *elist = fTree->GetEntryList(); if (elist && elist->GetN() < nentries) nentries = elist->GetN(); return nentries; diff --git a/tree/treeviewer/src/TSpider.cxx b/tree/treeviewer/src/TSpider.cxx index 4b8bd6b06c7c9..205939bb3bd3d 100644 --- a/tree/treeviewer/src/TSpider.cxx +++ b/tree/treeviewer/src/TSpider.cxx @@ -730,8 +730,6 @@ Long64_t TSpider::GetEntriesToProcess(Long64_t firstentry, Long64_t nentries) co lastentry = fTree->GetEntriesFriend() - 1; nentries = lastentry - firstentry + 1; } - //TEventList *elist = fTree->GetEventList(); - //if (elist && elist->GetN() < nentries) nentries = elist->GetN(); TEntryList *elist = fTree->GetEntryList(); if (elist && elist->GetN() < nentries) nentries = elist->GetN(); return nentries; From adbe15ba270ebefe6542f5a09b8ccda39cd36084 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Tue, 14 Jul 2026 13:54:36 +0200 Subject: [PATCH 4/4] [tree] Small cleanups in TEventList. - Remove unused headers. - Use member initialisers to clean up constructors. - Apply clang-tidy/clang-format fixes for member init. --- tree/tree/inc/TEventList.h | 14 ++++++------- tree/tree/src/TEventList.cxx | 38 +++++++++--------------------------- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/tree/tree/inc/TEventList.h b/tree/tree/inc/TEventList.h index cf2a7a616fa65..2bbc1fc85876c 100644 --- a/tree/tree/inc/TEventList.h +++ b/tree/tree/inc/TEventList.h @@ -31,15 +31,15 @@ class TCollection; class TEventList : public TNamed { protected: - Int_t fN; ///< Number of elements in the list - Int_t fSize; ///< Size of array - Int_t fDelta; ///< Increment size - bool fReapply; ///< If true, TTree::Draw will 'reapply' the original cut - Long64_t *fList; ///<[fN]Array of elements - TDirectory *fDirectory; /// 100) fSize = initsize; else fSize = 100; if (delta > 100) fDelta = delta; @@ -90,12 +72,10 @@ TEventList::TEventList(const char *name, const char *title, Int_t initsize, Int_ //////////////////////////////////////////////////////////////////////////////// /// Copy constructor. -TEventList::TEventList(const TEventList &list) : TNamed(list) +TEventList::TEventList(const TEventList &list) + : TNamed(list), fN(list.fN), fSize(list.fSize), fDelta(list.fDelta), fList(new Long64_t[fSize]) { - fN = list.fN; - fSize = list.fSize; - fDelta = list.fDelta; - fList = new Long64_t[fSize]; + for (Int_t i=0; iRemove(this); - fDirectory = nullptr; + delete[] fList; + if (fDirectory) + fDirectory->Remove(this); } ////////////////////////////////////////////////////////////////////////////////