diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be995ba51..89b6087f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: env: ROOT_VERSION: 'v6-32-02' ITK_VERSION: 'v5.4.2' - GEANT4_VERSION: 'v11.3.0' + GEANT4_VERSION: 'v11.4.0' ROOT_DIR: $(HOME)/software/root GEANT4_DIR: $(HOME)/software/geant4 @@ -41,8 +41,8 @@ jobs: uses: actions/cache@v3 with: path: ~/software - key: ${{ matrix.os }}-geant4-${{ env.GEANT4_VERSION }}-root-${{ env.ROOT_VERSION }}-build1 - restore-keys: ${{ matrix.os }}-geant4-${{ env.GEANT4_VERSION }}-root-${{ env.ROOT_VERSION }}-build1 + key: ${{ matrix.os }}-geant4-${{ env.GEANT4_VERSION }}-root-${{ env.ROOT_VERSION }}-qt6-build1 + restore-keys: ${{ matrix.os }}-geant4-${{ env.GEANT4_VERSION }}-root-${{ env.ROOT_VERSION }}-qt6-build1 - name: Install dependencies run: | if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then @@ -56,8 +56,10 @@ jobs: libxpm-dev \ libxft-dev \ libxext-dev \ - qtbase5-dev \ - qt5-qmake \ + qt6-base-dev \ + qt6-base-dev-tools \ + qt6-tools-dev \ + qt6-tools-dev-tools \ git \ cmake \ libssl-dev \ @@ -66,22 +68,14 @@ jobs: libfftw3-dev gcc -v elif [ "${{ matrix.os }}" == "macos-latest" ]; then - brew install python@3.12 || true - brew link --overwrite python@3.12 - #brew update - brew cleanup - brew config - #rm -rf /usr/local/bin/python3.11-config /usr/local/bin/2to3-3.11 /usr/local/bin/idle3.11 /usr/local/bin/pydoc3.11 /usr/local/bin/python3.11 - #rm -rf /usr/local/bin/python3-config /usr/local/bin/2to3 /usr/local/bin/idle3 /usr/local/bin/pydoc3 /usr/local/bin/python3 - brew install --force --verbose --overwrite --debug qt5 \ - ccache \ - tbb \ - xrootd \ - fftw - brew link qt5 --force && sudo ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs && sudo ln -s /usr/local/opt/qt/plugins /usr/local/plugins - export PATH=/usr/local/opt/qt/bin:$PATH - export LDFLAGS="-L/usr/local/opt/qt/lib -L/usr/local/opt/llvm/lib" - export CPPFLAGS="-I/usr/local/opt/qt/include -I/usr/local/opt/llvm/include -fopenmp" + + brew update || true + brew install cmake ccache tbb xrootd fftw qt python@3.12 || true + #brew link --overwrite --force python@3.12 || true + export Qt6_DIR="$(brew --prefix qt)/lib/cmake/Qt6" + export CMAKE_PREFIX_PATH="$(brew --prefix qt)" + echo "Qt6_DIR=$Qt6_DIR" + ls "$Qt6_DIR" fi cd $HOME/ mkdir -p software option_dependencies @@ -92,16 +86,34 @@ jobs: cd $HOME/software mkdir root cd root - mkdir src bin install + mkdir -p src bin install git clone --branch $ROOT_VERSION https://github.com/root-project/root.git --depth 1 src + rm -rf bin + mkdir -p bin cd bin cmake ../src -DCMAKE_CXX_STANDARD=17 \ -Dpython=OFF \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ -Dpyroot=OFF \ -Dclad=OFF \ -Dxrootd=OFF \ + -Dvdt=OFF \ + -Dbuiltin_vdt=OFF \ + -Dqt6=OFF \ + -Dqt5=OFF \ + -Dwebgui=OFF \ + -Dx11=OFF \ + -Droofit=OFF \ + -Dtmva=OFF \ + -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \ -DCMAKE_INSTALL_PREFIX=$HOME/software/root/install - make -j4 install + #grep -i vdt CMakeCache.txt || true + make -j4 install || true + #echo "===== VDT CONFIGURE STDOUT =====" + #cat /Users/runner/software/root/bin/VDT-prefix/src/VDT-stamp/VDT-configure-out.log || true + #echo "===== VDT CONFIGURE STDERR =====" + #cat /Users/runner/software/root/bin/VDT-prefix/src/VDT-stamp/VDT-configure-err.log || true + #exit 1 cd .. rm -rf bin src fi @@ -116,8 +128,10 @@ jobs: cd bin cmake -DGEANT4_INSTALL_DATA=ON \ -DGEANT4_BUILD_MULTITHREADED=OFF \ + -DGEANT4_USE_QT=ON \ -DGEANT4_INSTALL_DATADIR=$HOME/software/geant4/data \ -DCMAKE_INSTALL_PREFIX=$HOME/software/geant4/install \ + -DQt6_DIR="$Qt6_DIR" \ ../src make -j4 install cd .. diff --git a/CMakeLists.txt b/CMakeLists.txt index e009bc4b5..4cf7affb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,8 +98,8 @@ STRING(REGEX REPLACE "(.*)[.](.*)[.](.*)" "\\3" G4VERSION_PATCH ${Geant4_VERSION #MESSAGE(${G4VERSION_MAJOR}) #MESSAGE(${G4VERSION_MINOR}) #MESSAGE(${G4VERSION_PATCH}) -IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 11.3) - MESSAGE("Warning! This GATE version is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 11.3 distribution instead.") +IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 11.4.0) + MESSAGE("Warning! This GATE version is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 11.4.0 distribution instead.") ENDIF() #========================================================= @@ -312,13 +312,13 @@ MESSAGE("Your current Geant4 version is ${Geant4_VERSION}") #========================================================= # Display message about this version -MESSAGE("IMPORTANT! This version of GATE (9.4.1) has still some traces of passage for new digitizer.") +MESSAGE("IMPORTANT! This version of GATE (9.4.2) has still some traces of passage for new digitizer.") MESSAGE("Please, be aware that some of functionalities are NOT YET re-implemented: ") MESSAGE("- Output: Sinogram, Ecat7, LMF") MESSAGE("- ARF may work not properly yet") MESSAGE("We apologize for this inconvenience and kindly ask for your patience.") MESSAGE("This functionalities will be added during 2025.") -MESSAGE("Meanwhile, please, use Gate 9.4") +MESSAGE("Meanwhile, please, use Gate 9.2") diff --git a/Gate.cc b/Gate.cc index baca74917..b906f184f 100644 --- a/Gate.cc +++ b/Gate.cc @@ -158,7 +158,7 @@ void welcome() { GateMessage("Core", 0, G4endl); GateMessage("Core", 0, "*******************************************************" << G4endl); - GateMessage("Core", 0, " GATE version 9.4.1 (2025)" << G4endl); + GateMessage("Core", 0, " GATE version 9.4.2 (2026)" << G4endl); GateMessage("Core", 0, " Copyright : OpenGATE Collaboration" << G4endl); GateMessage("Core", 0, " Reference : Phys. Med. Biol. 49(19) 4543-4561 2004 " << G4endl); GateMessage("Core", 0, " Reference : Phys. Med. Biol. 56(4) 881-901 2011 " << G4endl); @@ -256,7 +256,7 @@ int main( int argc, char* argv[] ) break; case 'v': ss << G4VERSION_MAJOR << "." << G4VERSION_MINOR << "." << G4VERSION_PATCH; - std::cout << "Gate version is 9.4.1; Geant4 version is " << ss.str() << std::endl; + std::cout << "Gate version is 9.4.2; Geant4 version is " << ss.str() << std::endl; exit(0); break; case 'a': diff --git a/cluster_tools/jobsplitter/src/GateMacfileParser.cc b/cluster_tools/jobsplitter/src/GateMacfileParser.cc index bc45838f8..5db1add59 100644 --- a/cluster_tools/jobsplitter/src/GateMacfileParser.cc +++ b/cluster_tools/jobsplitter/src/GateMacfileParser.cc @@ -107,8 +107,7 @@ G4int GateMacfileParser::GenerateResolvedMacros(G4String directory) i_str<=10 && j%(nSplits/10)==0) cout<<100*j/nSplits<<"% "<SetEnergyFin(-1); - m_outputDigi->SetEnergyIniTrack(-1); - std::vector dist; - std::vector index4ClustSameVol; + m_outputDigi = new GateDigi(*inputDigi); + m_outputDigi->SetEnergyFin(-1); + m_outputDigi->SetEnergyIniTrack(-1); + std::vector dist; + std::vector index4ClustSameVol; if(OutputDigiCollectionVector->empty()){ m_OutputDigiCollection->insert(m_outputDigi); diff --git a/source/digits_hits/src/GateDoIModels.cc b/source/digits_hits/src/GateDoIModels.cc index 36c39e85c..277f937ce 100644 --- a/source/digits_hits/src/GateDoIModels.cc +++ b/source/digits_hits/src/GateDoIModels.cc @@ -117,7 +117,7 @@ void GateDoIModels::Digitize() return; } - GateDigi* m_outputDigi = new GateDigi(*inputDigi); + m_outputDigi = new GateDigi(*inputDigi); if (flgCorrectAxis==1) { diff --git a/source/digits_hits/src/GateEnergyFraming.cc b/source/digits_hits/src/GateEnergyFraming.cc index 5516caddf..eef94d029 100755 --- a/source/digits_hits/src/GateEnergyFraming.cc +++ b/source/digits_hits/src/GateEnergyFraming.cc @@ -93,7 +93,7 @@ void GateEnergyFraming::Digitize() { G4double energy = 0; inputDigi=(*IDC)[i]; - GateDigi* m_outputDigi = new GateDigi(*inputDigi); + m_outputDigi = new GateDigi(*inputDigi); if( m_EnergyFramingLaw != 0 ){ diff --git a/source/digits_hits/src/GateTimeDelay.cc b/source/digits_hits/src/GateTimeDelay.cc index fffcf4b06..c3f21eba4 100755 --- a/source/digits_hits/src/GateTimeDelay.cc +++ b/source/digits_hits/src/GateTimeDelay.cc @@ -76,7 +76,7 @@ void GateTimeDelay::Digitize() { inputDigi=(*IDC)[i]; - GateDigi* m_outputDigi = new GateDigi(*inputDigi); + m_outputDigi = new GateDigi(*inputDigi); m_outputDigi->SetTime(inputDigi->GetTime()+ m_TimeDelay); diff --git a/source/externals/itk-mhd/CMakeLists.txt b/source/externals/itk-mhd/CMakeLists.txt index c070b9228..040c61e87 100644 --- a/source/externals/itk-mhd/CMakeLists.txt +++ b/source/externals/itk-mhd/CMakeLists.txt @@ -1,5 +1,5 @@ PROJECT(testmhd) -CMAKE_MINIMUM_REQUIRED (VERSION 2.4) +CMAKE_MINIMUM_REQUIRED (VERSION 3.6) IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0003 NEW) ENDIF(COMMAND CMAKE_POLICY)