From 2fc3fe8b51c2863727b1f3968b75d8d0fff54663 Mon Sep 17 00:00:00 2001 From: Gernot Maier Date: Mon, 1 Jun 2026 20:29:43 +0200 Subject: [PATCH 1/6] readme fix --- release_tests/sources/Crab/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_tests/sources/Crab/README.md b/release_tests/sources/Crab/README.md index 34f56af..b1c9330 100644 --- a/release_tests/sources/Crab/README.md +++ b/release_tests/sources/Crab/README.md @@ -43,7 +43,7 @@ for Combine files using pre-processed anasum files and run list generated in step before: ```bash -./anasum_yearly.sh +./anasum_from_runlists.sh ``` ## Plotting From cf58d59dbef8c7a3ddba73ced0cd7b3ec7ddaf9a Mon Sep 17 00:00:00 2001 From: Gernot Maier Date: Mon, 1 Jun 2026 20:35:32 +0200 Subject: [PATCH 2/6] add warning --- release_tests/montecarlo/irf_plotting/irf_plotting.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release_tests/montecarlo/irf_plotting/irf_plotting.sh b/release_tests/montecarlo/irf_plotting/irf_plotting.sh index 02ddf03..7a41c35 100755 --- a/release_tests/montecarlo/irf_plotting/irf_plotting.sh +++ b/release_tests/montecarlo/irf_plotting/irf_plotting.sh @@ -18,6 +18,7 @@ CUT="NTel3-PointSource-Hard-TMVA-BDT" CUT="NTel2-PointSource-Soft-TMVA-BDT" CUT="NTel2-PointSource-Moderate-TMVA-BDT" CUT="NTel2-PointSource-Moderate" +echo "WARNING: CUT is hardwired to $CUT (for now)" # Comparison plots - version and simtype hardwired COMPAREVERSION="v492" COMPARESIMTYPE="CARE_202404" From b1c5b95646eab53afe5b7173fae67a61df976131 Mon Sep 17 00:00:00 2001 From: Gernot Maier Date: Tue, 2 Jun 2026 10:01:08 +0200 Subject: [PATCH 3/6] R__LOAD --- release_tests/utilities/parameters.C | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/release_tests/utilities/parameters.C b/release_tests/utilities/parameters.C index a6880a8..cf49eeb 100644 --- a/release_tests/utilities/parameters.C +++ b/release_tests/utilities/parameters.C @@ -17,8 +17,9 @@ * Helper for ROOT macros: load libVAnaSum from environment. * Search order: * 1) $VERITAS_VANASUM_LIBRARY - * 2) $EVNDISP/lib/libVAnaSum.so - * 3) ROOT library path via "libVAnaSum.so" + * 2) $EVNDISPSYS/lib/libVAnaSum.so + * 3) $EVNDISP/lib/libVAnaSum.so + * 4) ROOT library path via "libVAnaSum.so" */ bool loadVAnaSumLibrary() { @@ -35,6 +36,14 @@ bool loadVAnaSumLibrary() iLibPath = iEnvLib; } if( iLibPath.size() == 0 ) + { + const char* iEvndispSys = gSystem->Getenv( "EVNDISPSYS" ); + if( iEvndispSys ) + { + iLibPath = string( iEvndispSys ) + "/lib/libVAnaSum.so"; + } + } + if( iLibPath.size() == 0 ) { const char* iEvndisp = gSystem->Getenv( "EVNDISP" ); if( iEvndisp ) @@ -45,21 +54,26 @@ bool loadVAnaSumLibrary() if( iLibPath.size() > 0 && !gSystem->AccessPathName( iLibPath.c_str() ) ) { - if( gSystem->Load( iLibPath.c_str() ) >= 0 ) + // Use gROOT->ProcessLine to properly load the library and its dictionaries + string loadCmd = "R__LOAD_LIBRARY(" + iLibPath + ");"; + int result = gROOT->ProcessLine( loadCmd.c_str() ); + if( result >= 0 ) { iLibraryLoaded = true; return true; } } - if( gSystem->Load( "libVAnaSum.so" ) >= 0 ) + // Try with just the library name + int result = gROOT->ProcessLine( "R__LOAD_LIBRARY(libVAnaSum.so);" ); + if( result >= 0 ) { iLibraryLoaded = true; return true; } cout << "Error: unable to load libVAnaSum.so. " - << "Set VERITAS_VANASUM_LIBRARY or EVNDISP." << endl; + << "Set VERITAS_VANASUM_LIBRARY, EVNDISPSYS, or EVNDISP." << endl; return false; } From 9598b166938bb20395d055eff1e2f5b3bfaae5d7 Mon Sep 17 00:00:00 2001 From: Gernot Maier Date: Tue, 2 Jun 2026 15:01:54 +0200 Subject: [PATCH 4/6] debugging --- release_tests/utilities/parameters.C | 36 ++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/release_tests/utilities/parameters.C b/release_tests/utilities/parameters.C index cf49eeb..af8db58 100644 --- a/release_tests/utilities/parameters.C +++ b/release_tests/utilities/parameters.C @@ -34,6 +34,7 @@ bool loadVAnaSumLibrary() if( iEnvLib ) { iLibPath = iEnvLib; + cout << "DEBUG: Found VERITAS_VANASUM_LIBRARY=" << iLibPath << endl; } if( iLibPath.size() == 0 ) { @@ -41,6 +42,7 @@ bool loadVAnaSumLibrary() if( iEvndispSys ) { iLibPath = string( iEvndispSys ) + "/lib/libVAnaSum.so"; + cout << "DEBUG: Using EVNDISPSYS, iLibPath=" << iLibPath << endl; } } if( iLibPath.size() == 0 ) @@ -49,26 +51,46 @@ bool loadVAnaSumLibrary() if( iEvndisp ) { iLibPath = string( iEvndisp ) + "/lib/libVAnaSum.so"; + cout << "DEBUG: Using EVNDISP, iLibPath=" << iLibPath << endl; } } - if( iLibPath.size() > 0 && !gSystem->AccessPathName( iLibPath.c_str() ) ) + if( iLibPath.size() > 0 ) { - // Use gROOT->ProcessLine to properly load the library and its dictionaries - string loadCmd = "R__LOAD_LIBRARY(" + iLibPath + ");"; - int result = gROOT->ProcessLine( loadCmd.c_str() ); - if( result >= 0 ) + cout << "DEBUG: Checking if library exists: " << iLibPath << endl; + if( !gSystem->AccessPathName( iLibPath.c_str() ) ) { - iLibraryLoaded = true; - return true; + cout << "DEBUG: Library file exists, attempting to load with R__LOAD_LIBRARY" << endl; + // Use gROOT->ProcessLine to properly load the library and its dictionaries + string loadCmd = "R__LOAD_LIBRARY(" + iLibPath + ");"; + cout << "DEBUG: Executing: " << loadCmd << endl; + int result = gROOT->ProcessLine( loadCmd.c_str() ); + cout << "DEBUG: ProcessLine result: " << result << endl; + if( result >= 0 ) + { + iLibraryLoaded = true; + cout << "DEBUG: Successfully loaded library from " << iLibPath << endl; + return true; + } } + else + { + cout << "DEBUG: Library file does NOT exist: " << iLibPath << endl; + } + } + else + { + cout << "DEBUG: No library path determined from environment variables" << endl; } // Try with just the library name + cout << "DEBUG: Trying to load libVAnaSum.so from ROOT library path" << endl; int result = gROOT->ProcessLine( "R__LOAD_LIBRARY(libVAnaSum.so);" ); + cout << "DEBUG: ProcessLine result for libVAnaSum.so: " << result << endl; if( result >= 0 ) { iLibraryLoaded = true; + cout << "DEBUG: Successfully loaded libVAnaSum.so from ROOT library path" << endl; return true; } From 18f3b486223805bf4f764e1d46a66ea585ec0ecd Mon Sep 17 00:00:00 2001 From: Gernot Maier Date: Tue, 2 Jun 2026 15:25:13 +0200 Subject: [PATCH 5/6] library path --- .../sources/Crab/plot_energy_spectra.C | 4 +++ release_tests/utilities/parameters.C | 36 ++++--------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/release_tests/sources/Crab/plot_energy_spectra.C b/release_tests/sources/Crab/plot_energy_spectra.C index 3fc3e6d..8ab721c 100644 --- a/release_tests/sources/Crab/plot_energy_spectra.C +++ b/release_tests/sources/Crab/plot_energy_spectra.C @@ -14,6 +14,10 @@ #include "TF1.h" +// Load VAnaSum library - must be before any usage of VEnergySpectrum +// ROOT expands environment variables in R__LOAD_LIBRARY paths +R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so) + #include "../../utilities/parameters.C" #include "../../utilities/printutilities.C" diff --git a/release_tests/utilities/parameters.C b/release_tests/utilities/parameters.C index af8db58..cf49eeb 100644 --- a/release_tests/utilities/parameters.C +++ b/release_tests/utilities/parameters.C @@ -34,7 +34,6 @@ bool loadVAnaSumLibrary() if( iEnvLib ) { iLibPath = iEnvLib; - cout << "DEBUG: Found VERITAS_VANASUM_LIBRARY=" << iLibPath << endl; } if( iLibPath.size() == 0 ) { @@ -42,7 +41,6 @@ bool loadVAnaSumLibrary() if( iEvndispSys ) { iLibPath = string( iEvndispSys ) + "/lib/libVAnaSum.so"; - cout << "DEBUG: Using EVNDISPSYS, iLibPath=" << iLibPath << endl; } } if( iLibPath.size() == 0 ) @@ -51,46 +49,26 @@ bool loadVAnaSumLibrary() if( iEvndisp ) { iLibPath = string( iEvndisp ) + "/lib/libVAnaSum.so"; - cout << "DEBUG: Using EVNDISP, iLibPath=" << iLibPath << endl; } } - if( iLibPath.size() > 0 ) + if( iLibPath.size() > 0 && !gSystem->AccessPathName( iLibPath.c_str() ) ) { - cout << "DEBUG: Checking if library exists: " << iLibPath << endl; - if( !gSystem->AccessPathName( iLibPath.c_str() ) ) + // Use gROOT->ProcessLine to properly load the library and its dictionaries + string loadCmd = "R__LOAD_LIBRARY(" + iLibPath + ");"; + int result = gROOT->ProcessLine( loadCmd.c_str() ); + if( result >= 0 ) { - cout << "DEBUG: Library file exists, attempting to load with R__LOAD_LIBRARY" << endl; - // Use gROOT->ProcessLine to properly load the library and its dictionaries - string loadCmd = "R__LOAD_LIBRARY(" + iLibPath + ");"; - cout << "DEBUG: Executing: " << loadCmd << endl; - int result = gROOT->ProcessLine( loadCmd.c_str() ); - cout << "DEBUG: ProcessLine result: " << result << endl; - if( result >= 0 ) - { - iLibraryLoaded = true; - cout << "DEBUG: Successfully loaded library from " << iLibPath << endl; - return true; - } + iLibraryLoaded = true; + return true; } - else - { - cout << "DEBUG: Library file does NOT exist: " << iLibPath << endl; - } - } - else - { - cout << "DEBUG: No library path determined from environment variables" << endl; } // Try with just the library name - cout << "DEBUG: Trying to load libVAnaSum.so from ROOT library path" << endl; int result = gROOT->ProcessLine( "R__LOAD_LIBRARY(libVAnaSum.so);" ); - cout << "DEBUG: ProcessLine result for libVAnaSum.so: " << result << endl; if( result >= 0 ) { iLibraryLoaded = true; - cout << "DEBUG: Successfully loaded libVAnaSum.so from ROOT library path" << endl; return true; } From e576709dccfd68a329cff5f26c2b4caf67d8a074 Mon Sep 17 00:00:00 2001 From: GernotMaier Date: Tue, 2 Jun 2026 15:39:49 +0200 Subject: [PATCH 6/6] setting of library path --- release_tests/sources/Crab/plot_energy_spectra.C | 2 -- release_tests/sources/Crab/plot_lightcurves.C | 2 ++ release_tests/sources/Crab/plot_sensitivity.C | 1 + release_tests/sources/Crab/plot_skymaps.C | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/release_tests/sources/Crab/plot_energy_spectra.C b/release_tests/sources/Crab/plot_energy_spectra.C index 8ab721c..882d484 100644 --- a/release_tests/sources/Crab/plot_energy_spectra.C +++ b/release_tests/sources/Crab/plot_energy_spectra.C @@ -14,8 +14,6 @@ #include "TF1.h" -// Load VAnaSum library - must be before any usage of VEnergySpectrum -// ROOT expands environment variables in R__LOAD_LIBRARY paths R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so) #include "../../utilities/parameters.C" diff --git a/release_tests/sources/Crab/plot_lightcurves.C b/release_tests/sources/Crab/plot_lightcurves.C index 458f068..5b341a7 100644 --- a/release_tests/sources/Crab/plot_lightcurves.C +++ b/release_tests/sources/Crab/plot_lightcurves.C @@ -13,6 +13,8 @@ #include #include +R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so) + #include "../../utilities/parameters.C" #include "../../utilities/printutilities.C" diff --git a/release_tests/sources/Crab/plot_sensitivity.C b/release_tests/sources/Crab/plot_sensitivity.C index b8c4fd8..84de9dd 100644 --- a/release_tests/sources/Crab/plot_sensitivity.C +++ b/release_tests/sources/Crab/plot_sensitivity.C @@ -4,6 +4,7 @@ */ #include +R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so) #include "../../utilities/parameters.C" #include "../../utilities/printutilities.C" diff --git a/release_tests/sources/Crab/plot_skymaps.C b/release_tests/sources/Crab/plot_skymaps.C index 98d905a..5c8fda3 100644 --- a/release_tests/sources/Crab/plot_skymaps.C +++ b/release_tests/sources/Crab/plot_skymaps.C @@ -11,6 +11,8 @@ #include #include +R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so) + #include "../../utilities/parameters.C" #include "../../utilities/printutilities.C"