From 0bc5536bac094409b8864b9989611bf1549f2026 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 31 Jul 2025 09:57:42 +0200 Subject: [PATCH 1/7] [core] default error handler: print info to stdout instead of stderr Fixes https://github.com/root-project/root/issues/19479 --- core/base/src/TErrorDefaultHandler.cxx | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/core/base/src/TErrorDefaultHandler.cxx b/core/base/src/TErrorDefaultHandler.cxx index dc5cfbea4d54d..54a80a0febd59 100644 --- a/core/base/src/TErrorDefaultHandler.cxx +++ b/core/base/src/TErrorDefaultHandler.cxx @@ -53,8 +53,8 @@ void ReleaseDefaultErrorHandler() } // ROOT namespace -/// Print debugging message to stderr and, on Windows, to the system debugger. -static void DebugPrint(const char *fmt, ...) +/// Print debugging message to outstream (stdout or stderr) and, on Windows, to the system debugger. +static void DebugPrint(FILE *outstream, const char *fmt, ...) { TTHREAD_TLS(Int_t) buf_size = 2048; TTHREAD_TLS(char*) buf = nullptr; @@ -86,7 +86,7 @@ static void DebugPrint(const char *fmt, ...) std::lock_guard guard(*GetErrorMutex()); const char *toprint = buf; // Work around for older platform where we use TThreadTLSWrapper - fprintf(stderr, "%s", toprint); + fprintf(outstream, "%s", toprint); #ifdef WIN32 ::OutputDebugString(buf); @@ -94,11 +94,13 @@ static void DebugPrint(const char *fmt, ...) } -/// The default error handler function. It prints the message on stderr and -/// if abort is set it aborts the application. Replaces the minimal error handler -/// of TError.h as part of the gROOT construction. TError's minimal handler is put +/// The default error handler function. It prints the message and +/// if abort is set it aborts the application. Replaces the minimal error handler +/// of TError.h as part of the gROOT construction. TError's minimal handler is put /// back in place during the gROOT destruction. -/// @note `abort()` is only called if `abort_bool` is `true` and `level < gErrorIgnoreLevel` +/// The error message is printed to stdout if the error level is lower than kWarning +/// and to stderr if it's equal or higher; see TError.h. +/// @note `abort()` is only called if `abort_bool` is `true` and `level >= gErrorIgnoreLevel` void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg) { if (gErrorIgnoreLevel == kUnset) { @@ -160,9 +162,10 @@ void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, c else smsg = std::string(type) + " in <" + location + ">: " + msg; - DebugPrint("%s\n", smsg.c_str()); + auto outstream = level >= kWarning ? stderr : stdout; + DebugPrint(outstream, "%s\n", smsg.c_str()); - fflush(stderr); + fflush(outstream); if (abort_bool) { #ifdef __APPLE__ @@ -170,8 +173,8 @@ void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, c delete [] __crashreporter_info__; __crashreporter_info__ = strdup(smsg.c_str()); #endif - - DebugPrint("aborting\n"); + // Since we abort, here we force stderr independently of the level + DebugPrint(stderr, "aborting\n"); fflush(stderr); if (gSystem) { gSystem->StackTrace(); From e267b4e5223b0f4b2b2713aa0a079f51c20e3692 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 31 Jul 2025 11:25:29 +0200 Subject: [PATCH 2/7] [test] move Info outputs to stdout --- roottest/python/JupyROOT/ROOT_kernel.ipynb | 2 +- roottest/python/JupyROOT/simpleCppMagic.ipynb | 2 +- roottest/python/JupyROOT/thread_local.ipynb | 2 +- .../root/dataframe/test_progressiveCSV.sh | 2 +- roottest/root/io/directory/CMakeLists.txt | 2 +- roottest/root/tree/addresses/memleak.ref | 2 +- roottest/root/tree/cache/assertTooSmall.eref | 33 ------------------- roottest/root/tree/cache/assertTooSmall.ref | 33 +++++++++++++++++++ .../root/tree/cache/execperfstattest.eref | 2 -- .../root/tree/cache/execperfstattestLZ4.oref | 2 ++ .../root/tree/cache/execperfstattestZLIB.oref | 2 ++ roottest/root/tree/reader/assertIntroTut.ref | 1 - roottest/root/tree/selector/execLHEF.ref | 2 +- .../treeformula/string/execAliasString.ref | 2 +- roottest/root/treeproxy/valdim3.ref | 2 +- 15 files changed, 46 insertions(+), 45 deletions(-) diff --git a/roottest/python/JupyROOT/ROOT_kernel.ipynb b/roottest/python/JupyROOT/ROOT_kernel.ipynb index ade90d23a76d5..6b29d869c94de 100644 --- a/roottest/python/JupyROOT/ROOT_kernel.ipynb +++ b/roottest/python/JupyROOT/ROOT_kernel.ipynb @@ -54,7 +54,7 @@ }, "outputs": [ { - "name": "stderr", + "name": "stdout", "output_type": "stream", "text": [ "Info in : creating shared library /Users/danilopiparo/RootDevel/Root6/head/roottest/python/JupyROOT/fa9a055b_C.so\n" diff --git a/roottest/python/JupyROOT/simpleCppMagic.ipynb b/roottest/python/JupyROOT/simpleCppMagic.ipynb index 7f6bd7f53a280..58902c7835112 100644 --- a/roottest/python/JupyROOT/simpleCppMagic.ipynb +++ b/roottest/python/JupyROOT/simpleCppMagic.ipynb @@ -53,7 +53,7 @@ }, "outputs": [ { - "name": "stderr", + "name": "stdout", "output_type": "stream", "text": [ "Info in : creating shared library /home/etejedor/devel/master/roottest/python/JupyROOT/d74d5882_C.so\n" diff --git a/roottest/python/JupyROOT/thread_local.ipynb b/roottest/python/JupyROOT/thread_local.ipynb index 13cf816503259..f3ca324512915 100644 --- a/roottest/python/JupyROOT/thread_local.ipynb +++ b/roottest/python/JupyROOT/thread_local.ipynb @@ -6,7 +6,7 @@ "metadata": {}, "outputs": [ { - "name": "stderr", + "name": "stdout", "output_type": "stream", "text": [ "Info in : creating shared library /home/dpiparo/RootDevel/Root6/head/build/ddcf9c12_C.so\n" diff --git a/roottest/root/dataframe/test_progressiveCSV.sh b/roottest/root/dataframe/test_progressiveCSV.sh index 454a23be56173..21c3a39af7e6e 100755 --- a/roottest/root/dataframe/test_progressiveCSV.sh +++ b/roottest/root/dataframe/test_progressiveCSV.sh @@ -7,5 +7,5 @@ ROOTDEBUG=1 ./$TESTNAME 1>${TESTNAME}.out 2>${TESTNAME}.err # Print only messages about lines being read from CSV file cat ${TESTNAME}.out | grep "Total num lines" -cat ${TESTNAME}.err | grep "GetEntryRanges" +cat ${TESTNAME}.out | grep "GetEntryRanges" diff --git a/roottest/root/io/directory/CMakeLists.txt b/roottest/root/io/directory/CMakeLists.txt index 466d0119cf7d8..be3135a8cdb6a 100644 --- a/roottest/root/io/directory/CMakeLists.txt +++ b/roottest/root/io/directory/CMakeLists.txt @@ -5,7 +5,7 @@ ROOTTEST_ADD_TEST(assertCycleParsing ROOTTEST_ADD_TEST(assertSubdirAndTree MACRO assertSubdirAndTree.C COPY_TO_BUILDDIR Collision12-ANNPID.root - ERRREF assertSubdirAndTree.ref) + OUTREF assertSubdirAndTree.ref) ROOTTEST_ADD_TEST(cd MACRO runcd.C diff --git a/roottest/root/tree/addresses/memleak.ref b/roottest/root/tree/addresses/memleak.ref index ee4397727f5e4..5c1f412431358 100644 --- a/roottest/root/tree/addresses/memleak.ref +++ b/roottest/root/tree/addresses/memleak.ref @@ -97,6 +97,7 @@ Processing runmemleak.C+... *Baskets : 2 : Basket Size= 32000 bytes Compression= 77.22 * *............................................................................* Info in : branch has 2 entries +Executing TMyData::~TMyData() Info in : fSmoothMonoM->IsOwner(): 1 Info in : fSmoothMonoM->par(caff)->fSmoothL->IsOwner(): 1 Info in : fSmoothMonoM->par(corchg2)->fSmoothL->IsOwner(): 1 @@ -170,4 +171,3 @@ Executing TMyData::~TMyData() Executing TMyData::~TMyData() Executing TMyData::~TMyData() Executing TMyData::~TMyData() -Executing TMyData::~TMyData() diff --git a/roottest/root/tree/cache/assertTooSmall.eref b/roottest/root/tree/cache/assertTooSmall.eref index b3a5d96594469..e69de29bb2d1d 100644 --- a/roottest/root/tree/cache/assertTooSmall.eref +++ b/roottest/root/tree/cache/assertTooSmall.eref @@ -1,33 +0,0 @@ -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t2.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created -Info in : ROOT file t1.root has been created diff --git a/roottest/root/tree/cache/assertTooSmall.ref b/roottest/root/tree/cache/assertTooSmall.ref index 2b1dcfefbaf30..04ddcfaffb2aa 100644 --- a/roottest/root/tree/cache/assertTooSmall.ref +++ b/roottest/root/tree/cache/assertTooSmall.ref @@ -56,6 +56,7 @@ ReadCP = inf MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -127,6 +128,7 @@ ReadCP = inf MBytes/s br=1 v1 read not cached: br=1 v1 cached more than once: br=1 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -201,6 +203,7 @@ ReadCP = inf MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 36 37 38 39 44 45 46 47 52 53 54 55 60 61 62 63 68 69 70 71 76 77 78 79 84 85 86 87 92 93 94 95 100 101 102 103 108 109 110 111 116 117 118 119 124 125 126 127 132 133 134 135 140 141 142 143 148 149 150 151 156 157 158 159 164 165 166 167 172 173 174 175 180 181 182 183 188 189 190 191 196 197 198 199 204 205 206 207 212 213 214 215 220 221 222 223 228 229 230 231 236 237 238 239 244 245 246 247 252 253 254 255 260 261 262 263 268 269 270 271 276 277 278 279 284 285 286 287 292 293 294 295 300 301 302 303 308 309 310 311 316 317 318 319 324 325 326 327 332 333 334 335 340 341 342 343 348 349 350 351 356 357 358 359 364 365 366 367 372 373 374 375 380 381 382 383 388 389 390 391 396 397 398 399 404 405 406 407 412 413 414 415 420 421 422 423 428 429 430 431 436 437 438 439 444 445 446 447 452 453 454 455 460 461 462 463 468 469 470 471 476 477 478 479 +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -272,6 +275,7 @@ ReadCP = inf MBytes/s br=1 v2 read not cached: br=1 v2 cached more than once: br=1 v2 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -346,6 +350,7 @@ ReadCP = 485.764 MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -417,6 +422,7 @@ ReadCP = 249.300 MBytes/s br=1 v1 read not cached: br=1 v1 cached more than once: br=1 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -491,6 +497,7 @@ ReadCP = 364.323 MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -562,6 +569,7 @@ ReadCP = inf MBytes/s br=1 v2 read not cached: br=1 v2 cached more than once: br=1 v2 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t1 : * *Entries : 3000 : Total = 14588719 bytes File Size = 14588719 * @@ -649,6 +657,7 @@ ReadCP = 312.921 MBytes/s br=4 v2c read not cached: br=4 v2c cached more than once: br=4 v2c cached but not used: +Info in : ROOT file t2.root has been created Cache size 2 for t2: 45000 zipbytes=6258420 largeWithSkip: Running test: skip=1 split=1 wrongOrder=1 ****************************************************************************** @@ -706,6 +715,7 @@ ReadCP = inf MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14595449 bytes File Size = 14595449 * @@ -780,6 +790,7 @@ ReadCP = inf MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: 4 5 6 7 11 12 13 14 18 19 20 21 26 27 28 33 34 35 40 41 42 47 48 49 54 55 56 57 61 62 63 64 68 69 70 71 76 77 78 83 84 85 90 91 92 97 98 99 104 105 106 107 111 112 113 114 118 119 120 121 126 127 128 133 134 135 140 141 142 147 148 149 154 155 156 157 161 162 163 164 168 169 170 171 176 177 178 183 184 185 190 191 192 197 198 199 204 205 206 207 211 212 213 214 219 220 221 222 226 227 228 229 233 234 235 236 241 242 243 248 249 250 255 256 257 262 263 264 269 270 271 272 276 277 278 279 283 284 285 286 291 292 293 298 299 300 305 306 307 312 313 314 319 320 321 322 326 327 328 329 333 334 335 336 341 342 343 348 349 350 355 356 357 362 363 364 369 370 371 372 376 377 378 379 383 384 385 386 391 392 393 398 399 400 405 406 407 412 413 414 419 420 421 422 426 427 428 429 +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14595449 bytes File Size = 14595449 * @@ -854,6 +865,7 @@ ReadCP = inf MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14583569 bytes File Size = 14583569 * @@ -928,6 +940,7 @@ ReadCP = 1000.430 MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: 4 5 6 7 11 12 13 14 18 19 20 21 26 27 28 33 34 35 40 41 42 47 48 49 54 55 56 57 61 62 63 64 68 69 70 71 76 77 78 83 84 85 90 91 92 97 98 99 104 105 106 107 111 112 113 114 118 119 120 121 126 127 128 133 134 135 140 141 142 147 148 149 154 155 156 157 161 162 163 164 168 169 170 171 176 177 178 183 184 185 190 191 192 197 198 199 204 205 206 207 211 212 213 214 219 220 221 222 226 227 228 229 233 234 235 236 241 242 243 248 249 250 255 256 257 262 263 264 269 270 271 272 276 277 278 279 283 284 285 286 291 292 293 298 299 300 305 306 307 312 313 314 319 320 321 322 326 327 328 329 333 334 335 336 341 342 343 348 349 350 355 356 357 362 363 364 369 370 371 372 376 377 378 379 383 384 385 386 391 392 393 398 399 400 405 406 407 412 413 414 419 420 421 422 426 427 428 429 +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14583569 bytes File Size = 14583569 * @@ -1002,6 +1015,7 @@ ReadCP = 364.449 MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14595449 bytes File Size = 14595449 * @@ -1076,6 +1090,7 @@ ReadCP = 485.932 MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14595449 bytes File Size = 14595449 * @@ -1150,6 +1165,7 @@ ReadCP = 485.632 MBytes/s br=2 v1 read not cached: br=2 v1 cached more than once: br=2 v1 cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14583569 bytes File Size = 14583569 * @@ -1224,6 +1240,7 @@ ReadCP = 364.224 MBytes/s br=2 vlarge read not cached: br=2 vlarge cached more than once: br=2 vlarge cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 14583569 bytes File Size = 14583569 * @@ -1347,6 +1364,7 @@ ReadCP = 415.520 MBytes/s br=9 v2e read not cached: br=9 v2e cached more than once: br=9 v2e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12483873 bytes File Size = 12483873 * @@ -1498,6 +1516,7 @@ ReadCP = 1246.560 MBytes/s br=9 v2e read not cached: br=9 v2e cached more than once: br=9 v2e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12483873 bytes File Size = 12483873 * @@ -1649,6 +1668,7 @@ ReadCP = 250.224 MBytes/s br=9 v2e read not cached: br=9 v2e cached more than once: br=9 v2e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12543873 bytes File Size = 12543873 * @@ -1800,6 +1820,7 @@ ReadCP = 625.560 MBytes/s br=9 v2e read not cached: br=9 v2e cached more than once: br=9 v2e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12543873 bytes File Size = 12543873 * @@ -1951,6 +1972,7 @@ ReadCP = 311.640 MBytes/s br=9 v1e read not cached: br=9 v1e cached more than once: br=9 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12483873 bytes File Size = 12483873 * @@ -2102,6 +2124,7 @@ ReadCP = 1246.560 MBytes/s br=9 v1e read not cached: br=9 v1e cached more than once: br=9 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12483873 bytes File Size = 12483873 * @@ -2253,6 +2276,7 @@ ReadCP = 375.336 MBytes/s br=9 v1e read not cached: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 br=9 v1e cached more than once: br=9 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12543873 bytes File Size = 12543873 * @@ -2404,6 +2428,7 @@ ReadCP = 375.336 MBytes/s br=9 v1e read not cached: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 br=9 v1e cached more than once: br=9 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 12543873 bytes File Size = 12543873 * @@ -2562,6 +2587,7 @@ ReadCP = 409.092 MBytes/s br=10 vlarge read not cached: br=10 vlarge cached more than once: br=10 vlarge cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24575679 bytes File Size = 24575679 * @@ -2724,6 +2750,7 @@ ReadCP = 1947.366 MBytes/s br=10 vlarge read not cached: br=10 vlarge cached more than once: br=10 vlarge cached but not used: 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 36 37 38 39 44 45 46 47 52 53 54 55 60 61 62 63 68 69 70 71 76 77 78 79 84 85 86 87 92 93 94 95 100 101 102 103 108 109 110 111 116 117 118 119 124 125 126 127 132 133 134 135 140 141 142 143 148 149 150 151 156 157 158 159 164 165 166 167 172 173 174 175 180 181 182 183 188 189 190 191 196 197 198 199 204 205 206 207 212 213 214 215 220 221 222 223 228 229 230 231 236 237 238 239 244 245 246 247 252 253 254 255 260 261 262 263 268 269 270 271 276 277 278 279 284 285 286 287 292 293 294 295 300 301 302 303 308 309 310 311 316 317 318 319 324 325 326 327 332 333 334 335 340 341 342 343 348 349 350 351 356 357 358 359 364 365 366 367 372 373 374 375 380 381 382 383 388 389 390 391 396 397 398 399 404 405 406 407 412 413 414 415 420 421 422 423 428 429 430 431 436 437 438 439 444 445 446 447 452 453 454 455 460 461 462 463 468 469 470 471 476 477 478 479 +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24575679 bytes File Size = 24575679 * @@ -2886,6 +2913,7 @@ ReadCP = 351.302 MBytes/s br=10 vlarge read not cached: 0 1 2 3 4 5 6 8 9 10 11 12 13 14 16 17 18 19 20 21 22 24 25 26 27 28 29 30 32 33 34 35 36 37 38 40 41 42 43 44 45 46 48 49 50 51 52 53 54 56 57 58 59 60 61 62 64 65 66 67 68 69 70 72 73 74 75 76 77 78 80 81 82 83 84 85 86 88 89 90 91 92 93 94 96 97 98 99 100 101 102 104 105 106 107 108 109 110 112 113 114 115 116 117 118 120 121 122 123 124 125 126 128 129 130 131 132 133 134 136 137 138 139 140 141 142 144 145 146 147 148 149 150 152 153 154 155 156 157 158 160 161 162 163 164 165 166 168 169 170 171 172 173 174 176 177 178 179 180 181 182 184 185 186 187 188 189 190 192 193 194 195 196 197 198 200 201 202 203 204 205 206 208 209 210 211 212 213 214 216 217 218 219 220 221 222 224 225 226 227 228 229 230 232 233 234 235 236 237 238 240 241 242 243 244 245 246 248 249 250 251 252 253 254 256 257 258 259 260 261 262 264 265 266 267 268 269 270 272 273 274 275 276 277 278 280 281 282 283 284 285 286 288 289 290 291 292 293 294 296 297 298 299 300 301 302 304 305 306 307 308 309 310 312 313 314 315 316 317 318 320 321 322 323 324 325 326 328 329 330 331 332 333 334 336 337 338 339 340 341 342 344 345 346 347 348 349 350 352 353 354 355 356 357 358 360 361 362 363 364 365 366 368 369 370 371 372 373 374 376 377 378 379 380 381 382 384 385 386 387 388 389 390 392 393 394 395 396 397 398 400 401 402 403 404 405 406 408 409 410 411 412 413 414 416 417 418 419 420 421 422 424 425 426 427 428 429 430 432 433 434 435 436 437 438 440 441 442 443 444 445 446 448 449 450 451 452 453 454 456 457 458 459 460 461 462 464 465 466 467 468 469 470 472 473 474 475 476 477 478 br=10 vlarge cached more than once: br=10 vlarge cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24635679 bytes File Size = 24635679 * @@ -3048,6 +3076,7 @@ ReadCP = 819.180 MBytes/s br=10 vlarge read not cached: 3 11 19 27 35 43 51 59 67 75 83 91 99 107 115 123 131 139 147 155 163 171 179 187 195 203 211 219 227 235 243 251 259 267 275 283 291 299 307 315 323 331 339 347 355 363 371 379 387 395 403 411 419 427 435 443 451 459 467 475 br=10 vlarge cached more than once: br=10 vlarge cached but not used: 7 15 23 31 39 47 55 63 71 79 87 95 103 111 119 127 135 143 151 159 167 175 183 191 199 207 215 223 231 239 247 255 263 271 279 287 295 303 311 319 327 335 343 351 359 367 375 383 391 399 407 415 423 431 439 447 455 463 471 479 +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24635679 bytes File Size = 24635679 * @@ -3210,6 +3239,7 @@ ReadCP = 409.092 MBytes/s br=10 v1e read not cached: br=10 v1e cached more than once: br=10 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24575679 bytes File Size = 24575679 * @@ -3372,6 +3402,7 @@ ReadCP = 973.683 MBytes/s br=10 v1e read not cached: br=10 v1e cached more than once: br=10 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24575679 bytes File Size = 24575679 * @@ -3534,6 +3565,7 @@ ReadCP = 270.934 MBytes/s br=10 v1e read not cached: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 br=10 v1e cached more than once: br=10 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24635679 bytes File Size = 24635679 * @@ -3696,6 +3728,7 @@ ReadCP = 414.931 MBytes/s br=10 v1e read not cached: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 br=10 v1e cached more than once: br=10 v1e cached but not used: +Info in : ROOT file t1.root has been created ****************************************************************************** *Tree :t2 : * *Entries : 3000 : Total = 24635679 bytes File Size = 24635679 * diff --git a/roottest/root/tree/cache/execperfstattest.eref b/roottest/root/tree/cache/execperfstattest.eref index eeb06b93592bc..e69de29bb2d1d 100644 --- a/roottest/root/tree/cache/execperfstattest.eref +++ b/roottest/root/tree/cache/execperfstattest.eref @@ -1,2 +0,0 @@ -Info in : ROOT file tree1ps.root has been created -Info in : ROOT file tree2ps.root has been created diff --git a/roottest/root/tree/cache/execperfstattestLZ4.oref b/roottest/root/tree/cache/execperfstattestLZ4.oref index 9e2051df6ce33..b5e351dfb474d 100644 --- a/roottest/root/tree/cache/execperfstattestLZ4.oref +++ b/roottest/root/tree/cache/execperfstattestLZ4.oref @@ -1,5 +1,7 @@ Processing execperfstattest.C... +Info in : ROOT file tree1ps.root has been created +Info in : ROOT file tree2ps.root has been created 9 9 (int) 0 diff --git a/roottest/root/tree/cache/execperfstattestZLIB.oref b/roottest/root/tree/cache/execperfstattestZLIB.oref index fede18ca2b150..28b40eb4273fa 100644 --- a/roottest/root/tree/cache/execperfstattestZLIB.oref +++ b/roottest/root/tree/cache/execperfstattestZLIB.oref @@ -1,5 +1,7 @@ Processing execperfstattest.C... +Info in : ROOT file tree1ps.root has been created +Info in : ROOT file tree2ps.root has been created 7 8 (int) 0 diff --git a/roottest/root/tree/reader/assertIntroTut.ref b/roottest/root/tree/reader/assertIntroTut.ref index 09255a557f6b0..78df82535b9e7 100644 --- a/roottest/root/tree/reader/assertIntroTut.ref +++ b/roottest/root/tree/reader/assertIntroTut.ref @@ -1,4 +1,3 @@ Warning in : no dictionary for class EventData is available Warning in : no dictionary for class Particle is available -Info in : created default TCanvas with name c1 Error in : Error registering reader for fEventSize: TTreeReaderValue/Array objects must be created before the call to Next() / SetEntry() / SetLocalEntry(), or after TTreeReader::Restart()! diff --git a/roottest/root/tree/selector/execLHEF.ref b/roottest/root/tree/selector/execLHEF.ref index 345d9c8eaac38..b8a3f262358ac 100644 --- a/roottest/root/tree/selector/execLHEF.ref +++ b/roottest/root/tree/selector/execLHEF.ref @@ -10,10 +10,10 @@ reader all=79618 zero=60000 low=9599 high=10019 legacySelector Info in : Files: lhef_leg_sel_gen.h and lhef_leg_sel_gen.C generated from TTree: LHEF -Info in : Files: lhef_mc_gen.h and lhef_mc_gen.C generated from TTree: LHEF all=79618 zero=60000 low=9599 high=10019 selector all=79618 zero=60000 low=9599 high=10019 makeClass +Info in : Files: lhef_mc_gen.h and lhef_mc_gen.C generated from TTree: LHEF all=79618 zero=60000 low=9599 high=10019 (int) 0 diff --git a/roottest/root/treeformula/string/execAliasString.ref b/roottest/root/treeformula/string/execAliasString.ref index 6b4dc1dbe73c2..c1370cc9c0c93 100644 --- a/roottest/root/treeformula/string/execAliasString.ref +++ b/roottest/root/treeformula/string/execAliasString.ref @@ -1,12 +1,12 @@ Processing execAliasString.C... -Info in : created default TCanvas with name c1 ************************************ * Row * name.name * count.cou * ************************************ * 0 * 16A * 3 * * 1 * 17B * 2 * ************************************ +Info in : created default TCanvas with name c1 ************************ * Row * first?nam * ************************ diff --git a/roottest/root/treeproxy/valdim3.ref b/roottest/root/treeproxy/valdim3.ref index fbe1d9ec56be2..37a419959ed61 100644 --- a/roottest/root/treeproxy/valdim3.ref +++ b/roottest/root/treeproxy/valdim3.ref @@ -1,6 +1,5 @@ Processing runvaldim3.C... -Info in : created default TCanvas with name c1 ntracks = 2 trs[0].a = 0 trs[0].bb[0] = 0.000000 @@ -61,3 +60,4 @@ a[1][2][0] = 120 a[1][2][1] = 121 a[1][2][2] = 122 a[1][2][3] = 123 +Info in : created default TCanvas with name c1 From 87a834036a65e674c334d16e96f142745effd666 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Thu, 31 Jul 2025 12:02:48 +0200 Subject: [PATCH 3/7] [test] further fixes --- roottest/python/JupyROOT/ROOT_kernel.ipynb | 10 +--------- roottest/python/JupyROOT/simpleCppMagic.ipynb | 10 +--------- roottest/python/JupyROOT/thread_local.ipynb | 10 +--------- roottest/root/multicore/ttree_read_imt.sh | 4 ++-- roottest/root/treeproxy/execsearch.ref | 2 +- 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/roottest/python/JupyROOT/ROOT_kernel.ipynb b/roottest/python/JupyROOT/ROOT_kernel.ipynb index 6b29d869c94de..3fee7998e40d2 100644 --- a/roottest/python/JupyROOT/ROOT_kernel.ipynb +++ b/roottest/python/JupyROOT/ROOT_kernel.ipynb @@ -52,15 +52,7 @@ "metadata": { "collapsed": false }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Info in : creating shared library /Users/danilopiparo/RootDevel/Root6/head/roottest/python/JupyROOT/fa9a055b_C.so\n" - ] - } - ], + "outputs": [], "source": [ "%%cpp -a\n", "#include \n", diff --git a/roottest/python/JupyROOT/simpleCppMagic.ipynb b/roottest/python/JupyROOT/simpleCppMagic.ipynb index 58902c7835112..ab9dd92aad513 100644 --- a/roottest/python/JupyROOT/simpleCppMagic.ipynb +++ b/roottest/python/JupyROOT/simpleCppMagic.ipynb @@ -51,15 +51,7 @@ "metadata": { "collapsed": false }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Info in : creating shared library /home/etejedor/devel/master/roottest/python/JupyROOT/d74d5882_C.so\n" - ] - } - ], + "outputs": [], "source": [ "%%cpp -a\n", "int g(){return 3;};" diff --git a/roottest/python/JupyROOT/thread_local.ipynb b/roottest/python/JupyROOT/thread_local.ipynb index f3ca324512915..29179cb0e91e2 100644 --- a/roottest/python/JupyROOT/thread_local.ipynb +++ b/roottest/python/JupyROOT/thread_local.ipynb @@ -4,15 +4,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Info in : creating shared library /home/dpiparo/RootDevel/Root6/head/build/ddcf9c12_C.so\n" - ] - } - ], + "outputs": [], "source": [ "%%cpp -a\n", "\n", diff --git a/roottest/root/multicore/ttree_read_imt.sh b/roottest/root/multicore/ttree_read_imt.sh index 51b03b3070d07..1882967a5aad7 100755 --- a/roottest/root/multicore/ttree_read_imt.sh +++ b/roottest/root/multicore/ttree_read_imt.sh @@ -21,8 +21,8 @@ else cat ${TESTNAME}.err fi -# Print IMT messages from the application -cat ${TESTNAME}.out | grep -e " \[IMT\]" +# Print last 100 IMT messages from the application +cat ${TESTNAME}.out | grep -e " \[IMT\]" | tail -n 100 grep -v -e "Info in" -e 'HEAD http' -e 'GET http' -e 'Host:' -e 'User-Agent:' -e 'Range: ' -e '^\s*$' ${TESTNAME}.err | cat > /dev/stderr diff --git a/roottest/root/treeproxy/execsearch.ref b/roottest/root/treeproxy/execsearch.ref index 0dabeccdcf2a1..9e162ef0d92bb 100644 --- a/roottest/root/treeproxy/execsearch.ref +++ b/roottest/root/treeproxy/execsearch.ref @@ -3,7 +3,7 @@ Processing execsearch.C... Warning in : no dictionary for class ND::P0D::NueEvtInfo is available Warning in : no dictionary for class ND::P0D::TVertex is available Warning in : no dictionary for class ND::P0D::TPID is available -Info in : created default TCanvas with name c1 trajPos.fP.fX[1]=635.86 trajPos.fP[1].fX=635.86 trajPos[1].fP.fX=635.86 +Info in : created default TCanvas with name c1 From c13aee9164b5c9712926945d73ff73850fb6b53c Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Fri, 1 Aug 2025 08:46:21 +0200 Subject: [PATCH 4/7] [core] make the limit between stderr and stdout configurable --- core/base/src/TErrorDefaultHandler.cxx | 2 +- core/foundation/inc/TError.h | 1 + core/foundation/src/TError.cxx | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/base/src/TErrorDefaultHandler.cxx b/core/base/src/TErrorDefaultHandler.cxx index 54a80a0febd59..931ce6057de87 100644 --- a/core/base/src/TErrorDefaultHandler.cxx +++ b/core/base/src/TErrorDefaultHandler.cxx @@ -162,7 +162,7 @@ void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, c else smsg = std::string(type) + " in <" + location + ">: " + msg; - auto outstream = level >= kWarning ? stderr : stdout; + auto outstream = level >= gErrorStreamLevel ? stderr : stdout; DebugPrint(outstream, "%s\n", smsg.c_str()); fflush(outstream); diff --git a/core/foundation/inc/TError.h b/core/foundation/inc/TError.h index f1f249207f404..70c38b978d02e 100644 --- a/core/foundation/inc/TError.h +++ b/core/foundation/inc/TError.h @@ -137,6 +137,7 @@ R__EXTERN const char *kCheckMsg; ::Warning("", kCheckMsg, _QUOTE_(e), __LINE__, __FILE__); \ } while (false) +R__EXTERN Int_t gErrorStreamLevel; ///< errors with level below this value will be streamed to `stdout`, if greater or equal, to `stderr`. Default is `kWarning`. R__EXTERN Int_t gErrorIgnoreLevel; R__EXTERN Int_t gErrorAbortLevel; R__EXTERN Bool_t gPrintViaErrorHandler; diff --git a/core/foundation/src/TError.cxx b/core/foundation/src/TError.cxx index 8f27b76c5d72b..7c084d249758e 100644 --- a/core/foundation/src/TError.cxx +++ b/core/foundation/src/TError.cxx @@ -28,6 +28,7 @@ to be replaced by the proper DefaultErrorHandler() #include #include +Int_t gErrorStreamLevel = kWarning; Int_t gErrorIgnoreLevel = kUnset; Int_t gErrorAbortLevel = kSysError+1; Bool_t gPrintViaErrorHandler = kFALSE; From 15b5d0f8951e9633a85ee722d61fa91b797f4dab Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Fri, 1 Aug 2025 08:52:44 +0200 Subject: [PATCH 5/7] [roottest] fix logs --- roottest/root/io/directory/assertSubdirAndTree.ref | 1 - roottest/root/multicore/ttree_read_imt.cpp | 3 ++- roottest/root/multicore/ttree_read_imt.sh | 2 +- roottest/root/treeformula/stl/assertSparseSelection.ref | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/roottest/root/io/directory/assertSubdirAndTree.ref b/roottest/root/io/directory/assertSubdirAndTree.ref index 2dd7d1f8e4b9c..e69de29bb2d1d 100644 --- a/roottest/root/io/directory/assertSubdirAndTree.ref +++ b/roottest/root/io/directory/assertSubdirAndTree.ref @@ -1 +0,0 @@ -Info in : created default TCanvas with name c1 diff --git a/roottest/root/multicore/ttree_read_imt.cpp b/roottest/root/multicore/ttree_read_imt.cpp index f34ad9416a84b..0bf11c98ee1f1 100644 --- a/roottest/root/multicore/ttree_read_imt.cpp +++ b/roottest/root/multicore/ttree_read_imt.cpp @@ -1,5 +1,6 @@ #include "ROOT/TThreadExecutor.hxx" #include "TBranch.h" +#include "TError.h" #include "TFile.h" #include "TROOT.h" #include "TSystem.h" @@ -82,7 +83,7 @@ Int_t ReadTree(TTree *tree, Int_t nentries, bool reuse) int main(int argc, char** argv) { - + gErrorStreamLevel = kUnset; auto options = parseOptions(argc, argv); const int nthreads = std::get<0>(options); diff --git a/roottest/root/multicore/ttree_read_imt.sh b/roottest/root/multicore/ttree_read_imt.sh index 1882967a5aad7..822bc31c31fd2 100755 --- a/roottest/root/multicore/ttree_read_imt.sh +++ b/roottest/root/multicore/ttree_read_imt.sh @@ -22,7 +22,7 @@ else fi # Print last 100 IMT messages from the application -cat ${TESTNAME}.out | grep -e " \[IMT\]" | tail -n 100 +cat ${TESTNAME}.out | grep -e " \[IMT\]" grep -v -e "Info in" -e 'HEAD http' -e 'GET http' -e 'Host:' -e 'User-Agent:' -e 'Range: ' -e '^\s*$' ${TESTNAME}.err | cat > /dev/stderr diff --git a/roottest/root/treeformula/stl/assertSparseSelection.ref b/roottest/root/treeformula/stl/assertSparseSelection.ref index 2dd7d1f8e4b9c..e69de29bb2d1d 100644 --- a/roottest/root/treeformula/stl/assertSparseSelection.ref +++ b/roottest/root/treeformula/stl/assertSparseSelection.ref @@ -1 +0,0 @@ -Info in : created default TCanvas with name c1 From 3361f8248b53db67babbbd631fae22fad7343905 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Fri, 1 Aug 2025 09:02:17 +0200 Subject: [PATCH 6/7] [nfc] remnant --- roottest/root/multicore/ttree_read_imt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roottest/root/multicore/ttree_read_imt.sh b/roottest/root/multicore/ttree_read_imt.sh index 822bc31c31fd2..51b03b3070d07 100755 --- a/roottest/root/multicore/ttree_read_imt.sh +++ b/roottest/root/multicore/ttree_read_imt.sh @@ -21,7 +21,7 @@ else cat ${TESTNAME}.err fi -# Print last 100 IMT messages from the application +# Print IMT messages from the application cat ${TESTNAME}.out | grep -e " \[IMT\]" grep -v -e "Info in" -e 'HEAD http' -e 'GET http' -e 'Host:' -e 'User-Agent:' -e 'Range: ' -e '^\s*$' ${TESTNAME}.err | cat > /dev/stderr From 9f5645db7d525e17f496f8b1d811e2d7ec555254 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Fri, 1 Aug 2025 12:36:53 +0200 Subject: [PATCH 7/7] [jupyroot] restore message will fail on mac though --- roottest/python/JupyROOT/ROOT_kernel.ipynb | 9 ++++++++- roottest/python/JupyROOT/simpleCppMagic.ipynb | 9 ++++++++- roottest/python/JupyROOT/thread_local.ipynb | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/roottest/python/JupyROOT/ROOT_kernel.ipynb b/roottest/python/JupyROOT/ROOT_kernel.ipynb index 3fee7998e40d2..1ae05deb9bb90 100644 --- a/roottest/python/JupyROOT/ROOT_kernel.ipynb +++ b/roottest/python/JupyROOT/ROOT_kernel.ipynb @@ -52,7 +52,14 @@ "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ] + } + ], "source": [ "%%cpp -a\n", "#include \n", diff --git a/roottest/python/JupyROOT/simpleCppMagic.ipynb b/roottest/python/JupyROOT/simpleCppMagic.ipynb index ab9dd92aad513..9749cd03600e1 100644 --- a/roottest/python/JupyROOT/simpleCppMagic.ipynb +++ b/roottest/python/JupyROOT/simpleCppMagic.ipynb @@ -51,7 +51,14 @@ "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ] + } + ], "source": [ "%%cpp -a\n", "int g(){return 3;};" diff --git a/roottest/python/JupyROOT/thread_local.ipynb b/roottest/python/JupyROOT/thread_local.ipynb index 29179cb0e91e2..0ca297b112f8e 100644 --- a/roottest/python/JupyROOT/thread_local.ipynb +++ b/roottest/python/JupyROOT/thread_local.ipynb @@ -4,7 +4,14 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ] + } + ], "source": [ "%%cpp -a\n", "\n",