Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions release_tests/montecarlo/irf_plotting/irf_plotting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion release_tests/sources/Crab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for
Combine files using pre-processed anasum files and run list generated in step before:

```bash
./anasum_yearly.sh <runparameter file> <anasum-run-wise directory>
./anasum_from_runlists.sh <run-parameter file> <anasum-run-wise directory>
```

## Plotting
Expand Down
2 changes: 2 additions & 0 deletions release_tests/sources/Crab/plot_energy_spectra.C
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "TF1.h"

R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so)

#include "../../utilities/parameters.C"
#include "../../utilities/printutilities.C"

Expand Down
2 changes: 2 additions & 0 deletions release_tests/sources/Crab/plot_lightcurves.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <string>
#include <vector>

R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so)

#include "../../utilities/parameters.C"
#include "../../utilities/printutilities.C"

Expand Down
1 change: 1 addition & 0 deletions release_tests/sources/Crab/plot_sensitivity.C
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

#include <string>
R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so)

#include "../../utilities/parameters.C"
#include "../../utilities/printutilities.C"
Expand Down
2 changes: 2 additions & 0 deletions release_tests/sources/Crab/plot_skymaps.C
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <string>
#include <vector>

R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so)

#include "../../utilities/parameters.C"
#include "../../utilities/printutilities.C"

Expand Down
24 changes: 19 additions & 5 deletions release_tests/utilities/parameters.C
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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 )
Expand All @@ -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;
}

Expand Down
Loading