diff --git a/.github/workflows/ci-buildmatrix-cpp17.yml b/.github/workflows/ci-buildmatrix-cpp17.yml index 12233c65..d2dfc038 100644 --- a/.github/workflows/ci-buildmatrix-cpp17.yml +++ b/.github/workflows/ci-buildmatrix-cpp17.yml @@ -7,7 +7,57 @@ on: workflow_dispatch: jobs: + prepare: + name: Download and cache source files + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Cache VBF tarball + id: vbf-cache + uses: actions/cache@v5 + with: + path: VBF.tar.gz + key: vbf-tarball-${{ hashFiles('.github/workflows/ci-buildmatrix-cpp17.yml') }} + restore-keys: | + vbf-tarball- + + - name: Download VBF tarball + if: steps.vbf-cache.outputs.cache-hit != 'true' + run: | + curl -L --retry 3 --retry-delay 3 https://syncandshare.desy.de/index.php/s/${{ secrets.VBFcpp17 }}/download -o VBF.tar.gz + + - name: Cache SOFA tarball + id: sofa-cache + uses: actions/cache@v5 + with: + path: sofa.tar.gz + key: sofa-tarball-${{ hashFiles('.github/workflows/ci-buildmatrix-cpp17.yml') }} + restore-keys: | + sofa-tarball- + + - name: Download SOFA tarball + if: steps.sofa-cache.outputs.cache-hit != 'true' + run: | + curl -L --retry 3 --retry-delay 3 https://syncandshare.desy.de/index.php/s/${{ secrets.SOFA20231011 }}/download -o sofa.tar.gz + + - name: Upload VBF tarball artifact + uses: actions/upload-artifact@v7 + with: + name: vbf-tarball + path: VBF.tar.gz + retention-days: 30 + + - name: Upload SOFA tarball artifact + uses: actions/upload-artifact@v7 + with: + name: sofa-tarball + path: sofa.tar.gz + retention-days: 30 + build: + needs: prepare strategy: matrix: os: [ubuntu-latest] @@ -15,6 +65,7 @@ jobs: - "rootproject/root:latest" - "rootproject/root:6.26.06-ubuntu22.04" - "rootproject/root:6.32.04-ubuntu24.04" + - "rootproject/root:6.38.00-ubuntu25.10" runs-on: ${{ matrix.os }} container: ${{ matrix.root }} @@ -25,17 +76,30 @@ jobs: run: | apt-get update && apt-get install -y libopenblas-dev - - name: vbf + - name: Download VBF tarball + uses: actions/download-artifact@v8 + with: + name: vbf-tarball + path: . + + - name: Build and install VBF run: | - curl -L --retry 3 --retry-delay 3 https://syncandshare.desy.de/index.php/s/${{ secrets.VBFcpp17 }}/download -o VBF.tar.gz - mkdir VBF && tar -xzf VBF.tar.gz -C VBF --strip-components=1 + mkdir -p VBF && tar -xzf VBF.tar.gz -C VBF --strip-components=1 cd VBF && ./configure --prefix=$(echo $GITHUB_WORKSPACE)/VBF make make install - - name: sofa + - name: Download SOFA tarball + uses: actions/download-artifact@v8 + with: + name: sofa-tarball + path: . + + - name: Extract SOFA run: | - curl -L --retry 3 --retry-delay 3 https://syncandshare.desy.de/index.php/s/${{ secrets.SOFA20231011 }}/download -o sofa/sofa.tar.gz + export EVNDISPSYS=$(echo $GITHUB_WORKSPACE) + mkdir -p "${EVNDISPSYS}/sofa" + cp sofa.tar.gz "${EVNDISPSYS}/sofa/sofa.tar.gz" ./install_sofa.sh - name: eventdisplay @@ -45,5 +109,5 @@ jobs: export VBFSYS=$(echo $GITHUB_WORKSPACE)/VBF export LD_LIBRARY_PATH="${EVNDISPSYS}/obj:${EVNDISPSYS}/lib:${LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="${VBFSYS}/lib:${LD_LIBRARY_PATH}" - export SOFASYS=/sofa + export SOFASYS="${EVNDISPSYS}/sofa" make -j 4 VTS diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index c8ba052a..3f40d86d 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -1,4 +1,4 @@ -ARG ROOT_VERSION=6.32.04-ubuntu24.04 +ARG ROOT_VERSION=6.38.00-ubuntu25.10 FROM rootproject/root:${ROOT_VERSION} AS build ARG VBF_VERSION=0.3.4 ARG BUILD_BRANCH=main diff --git a/docs/changes/358.maintenance.md b/docs/changes/358.maintenance.md new file mode 100644 index 00000000..bbde6d5a --- /dev/null +++ b/docs/changes/358.maintenance.md @@ -0,0 +1 @@ +Updates to allow for compilation with ROOT >=v6.38. Adjustment of CI. diff --git a/src/CData.cpp b/src/CData.cpp index 6a4a3b12..62a5a3cd 100644 --- a/src/CData.cpp +++ b/src/CData.cpp @@ -1094,6 +1094,7 @@ TTree* CData::getXGBTree( string file_name, string file_suffix, string tree_name cout << "(this might be ok if no XGB analysis results are requested)" << endl; return 0; } + cout << "CData: opened XGB file " << file_name << endl; fXGBFiles.push_back( iFile ); TTree* iXGB_tree = ( TTree* )iFile->Get( tree_name.c_str() ); diff --git a/src/VPlotAnasumHistograms.cpp b/src/VPlotAnasumHistograms.cpp index 39eb3a9b..f56f34b5 100644 --- a/src/VPlotAnasumHistograms.cpp +++ b/src/VPlotAnasumHistograms.cpp @@ -245,7 +245,7 @@ void VPlotAnasumHistograms::plot_mscPlots( int irebin, double xmin, double xmax, VDouble_gauss* fdouble_gauss = new VDouble_gauss(); - TF1* hmscw_diff_fit = new TF1( hname, fdouble_gauss, -1.5, 1.5, 4, "VDouble_gauss" ); + TF1* hmscw_diff_fit = new TF1( hname, fdouble_gauss, -1.5, 1.5, 4 ); //TF1 *hmscw_diff_fit = new TF1( hname,double_gauss, -1.5, 1.5, 4); hmscw_diff_fit->SetParameter( 0, hmscw_diff->GetMaximum() ); hmscw_diff_fit->SetParameter( 1, 0. ); @@ -286,7 +286,7 @@ void VPlotAnasumHistograms::plot_mscPlots( int irebin, double xmin, double xmax, hmscl_diff->Draw( "hist e " ); sprintf( hname, "%s_fit", hmscl_diff->GetName() ); - TF1* hmscl_diff_fit = new TF1( hname, fdouble_gauss, -1.5, 2.5, 4, "VDouble_gauss" ); + TF1* hmscl_diff_fit = new TF1( hname, fdouble_gauss, -1.5, 2.5, 4 ); hmscl_diff_fit->SetParameter( 0, hmscl_diff->GetMaximum() ); hmscl_diff_fit->SetParameter( 1, 0. ); hmscl_diff_fit->SetParameter( 2, 0.3 ); diff --git a/src/VStereoAnalysis.cpp b/src/VStereoAnalysis.cpp index 3efe644b..fd35edca 100644 --- a/src/VStereoAnalysis.cpp +++ b/src/VStereoAnalysis.cpp @@ -1982,7 +1982,7 @@ CData* VStereoAnalysis::getDataFromFile( int i_runNumber ) false, iFileName, ( fRunPara->fEnergyReconstructionMethod == 2 || fRunPara->fDirectionReconstructionMethod == 2 ) - ? fRunPara->fXGB_stereo_file_suffix : "", + ? fRunPara->fXGB_stereo_file_suffix : "", "" // GH XGB tree loaded later, after analysis type is known from cut file ); // read current (major) epoch from data file diff --git a/src/makeEffectiveArea.cpp b/src/makeEffectiveArea.cpp index fbf790b3..63ec890b 100644 --- a/src/makeEffectiveArea.cpp +++ b/src/makeEffectiveArea.cpp @@ -181,7 +181,7 @@ int main( int argc, char* argv[] ) } const bool i_need_stereo_xgb = ( fRunPara->fEnergyReconstructionMethod == 2 - || fRunPara->fDirectionReconstructionMethod == 2 ); + || fRunPara->fDirectionReconstructionMethod == 2 ); CData d( c, true, false, fRunPara->fdatafile, i_need_stereo_xgb ? fRunPara->fXGB_stereo_file_suffix : "", fCuts->useXGBoostCuts() ? fRunPara->fXGB_gh_file_suffix : "" ); diff --git a/src/printRunParameter.cpp b/src/printRunParameter.cpp index 1c5474df..b37d3501 100644 --- a/src/printRunParameter.cpp +++ b/src/printRunParameter.cpp @@ -103,7 +103,7 @@ bool readRunParameter( TFile* fIn, string iPara ) iPara.find( "updated-runinfo" ) != string::npos ) << "\t"; cout << fPar->getInstrumentEpoch( true ) << "\t"; cout << fPar->getAtmosphereID( iPara.find( "updated-runinfo" ) != string::npos ) << "\t"; - if (fPar->fDBRunType.size() > 0 ) cout << fPar->fDBRunType << "\t"; + if( fPar->fDBRunType.size() > 0 ) cout << fPar->fDBRunType << "\t"; else cout << "no_db_runtype \t"; for( unsigned int i = 0; i < fPar->fTelToAnalyze.size(); i++ ) {