-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into develop/WCSim_v11.0
- Loading branch information
Showing
13 changed files
with
341 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Doxygen | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main, master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
|
||
Doxygen: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Make docs folder | ||
run: mkdir docs-output | ||
|
||
# Runs a single command using the runners shell | ||
- name: Doxygen Action | ||
uses: mattnotmitt/[email protected] | ||
|
||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs-output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build on push | ||
|
||
on: [pull_request] | ||
|
||
|
||
|
||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: false | ||
pull: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
ssh: | | ||
default=${{ env.SSH_AUTH_SOCK }} | ||
# - name: Build the Docker image | ||
# run: docker build . --file Dockerfile --tag ghcr.io/hyperk/geant4:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build on push | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
tags: ['*'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
|
||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
pull: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
ssh: | | ||
default=${{ env.SSH_AUTH_SOCK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,8 @@ appWCTESingleEvent | |
appIWCDSingleEvent | ||
|
||
# root file | ||
*.root | ||
*.root | ||
|
||
.idea | ||
build-* | ||
install-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Minimum cmake verison 3.1 required for the variable CMAKE_CXX_STANDARD | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
|
||
set(PROJECT_NAME MDT) | ||
|
||
list(APPEND CMAKE_MODULE_PATH | ||
$ENV{HK_PILOT_DIR}/cmake | ||
) | ||
include(GetVersionGit) | ||
MESSAGE("Preparing project ${PROJECT_NAME} version ${PROJECT_VERSION}" ) | ||
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION}) | ||
include(HKPackageBuilder) | ||
hkbuilder_prepare_project() | ||
set( PUBLIC_EXT_LIBS ) | ||
hk_check_dependencies() | ||
|
||
add_definitions(-DHYBRIDWCSIM) | ||
# manually include WCSim libraries | ||
list( APPEND PUBLIC_EXT_LIBS | ||
WCSim::WCSimRoot | ||
WCSim::WCSimCore | ||
) | ||
|
||
include_directories(BEFORE | ||
${PROJECT_SOURCE_DIR}/cpp/include | ||
${PROJECT_SOURCE_DIR}/app/utilities/include | ||
|
||
) | ||
add_subdirectory(cpp) | ||
add_subdirectory(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ghcr.io/hyperk/hk-meta-externals:latest | ||
|
||
COPY . /usr/local/hk/MDT | ||
|
||
RUN --mount=type=ssh mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
|
||
WORKDIR /usr/local/hk | ||
RUN --mount=type=ssh . /usr/local/hk/hk-pilot/setup.sh &&\ | ||
hkp install MDT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#${ PROJECT_NAME } Config.cmake | ||
|
||
get_filename_component($ { PROJECT_NAME } _CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
|
||
include("${${PROJECT_NAME}_CMAKE_DIR}/${PROJECT_NAME}_Library_Targets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
add_subdirectory(utilities/WCRootData) | ||
add_subdirectory(application) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
################# | ||
#Response library | ||
################# | ||
|
||
set (SRC | ||
PMTResponse3inchR12199_02.cc | ||
) | ||
|
||
set (HEADERS | ||
PMTResponse3inchR12199_02.h | ||
) | ||
|
||
|
||
pbuilder_library( | ||
TARGET PMTResponse | ||
SOURCES ${SRC} | ||
PROJECT_LIBRARIES MDT | ||
PUBLIC_EXTERNAL_LIBRARIES ${PUBLIC_EXT_LIBS} | ||
PRIVATE_EXTERNAL_LIBRARIES ${PRIVATE_EXT_LIBS} | ||
) | ||
|
||
pbuilder_install_headers(${HEADERS}) | ||
|
||
################# | ||
#Executables | ||
################# | ||
set(exe_sources | ||
appWCTESingleEvent.cc | ||
) | ||
|
||
pbuilder_executables( | ||
SOURCES ${exe_sources} | ||
TARGETS_VAR programs | ||
PROJECT_LIBRARIES WCRootData MDT PMTResponse | ||
PUBLIC_EXTERNAL_LIBRARIES ${PUBLIC_EXT_LIBS} | ||
PRIVATE_EXTERNAL_LIBRARIES ${PRIVATE_EXT_LIBS} | ||
) | ||
|
||
######### | ||
# target exportation | ||
######### | ||
|
||
pbuilder_component_install_and_export( | ||
COMPONENT Executable Libraries | ||
LIBTARGETS PMTResponse | ||
EXETARGETS ${programs} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
include_directories(BEFORE | ||
${PROJECT_SOURCE_DIR}/app/utilities/WCRootData/include | ||
) | ||
|
||
# Don't include Utilities | ||
#file(GLOB_RECURSE SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp") | ||
#file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h") | ||
|
||
set (SRC | ||
src/BeamTiming.cc | ||
src/SpillAnalyzer.cc | ||
src/WCRootData.cc | ||
src/WCRootDataBeamBkg.cc | ||
src/WCRootDataIDNuInt.cc | ||
src/WCRootDataNuInt.cc | ||
src/WCRootDataPileUpSpill.cc | ||
) | ||
set (HEADERS | ||
include/BeamTiming.h | ||
include/SpillAnalyzer.h | ||
include/WCRootData.h | ||
include/WCRootDataBeamBkg.h | ||
include/WCRootDataIDNuInt.h | ||
include/WCRootDataNuInt.h | ||
include/WCRootDataPileUpSpill.h | ||
) | ||
|
||
pbuilder_library( | ||
TARGET WCRootData | ||
SOURCES ${SRC} | ||
PROJECT_LIBRARIES MDT | ||
PUBLIC_EXTERNAL_LIBRARIES ${PUBLIC_EXT_LIBS} | ||
PRIVATE_EXTERNAL_LIBRARIES ${PRIVATE_EXT_LIBS} | ||
) | ||
|
||
pbuilder_install_headers(${HEADERS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
set (SRC | ||
src/Configuration.cc | ||
src/HitDigitizer.cc | ||
src/HitTube.cc | ||
src/HitTubeCollection.cc | ||
src/MDTManager.cc | ||
src/MTRandom.cc | ||
src/PMTAfterpulse.cc | ||
src/PMTNoise.cc | ||
src/PMTResponse.cc | ||
src/TriggerAlgo.cc | ||
src/TriggerInfo.cc | ||
src/TrueHit.cc | ||
) | ||
set (HEADERS | ||
include/Configuration.h | ||
include/HitDigitizer.h | ||
include/HitTube.h | ||
include/HitTubeCollection.h | ||
include/MDTManager.h | ||
include/MTRandom.h | ||
include/PMTAfterpulse.h | ||
include/PMTNoise.h | ||
include/PMTResponse.h | ||
include/TriggerAlgo.h | ||
include/TriggerInfo.h | ||
include/TrueHit.h | ||
) | ||
|
||
pbuilder_library( | ||
TARGET MDT | ||
SOURCES ${SRC} | ||
PUBLIC_EXTERNAL_LIBRARIES ${PUBLIC_EXT_LIBS} | ||
PRIVATE_EXTERNAL_LIBRARIES ${PRIVATE_EXT_LIBS} | ||
) | ||
|
||
|
||
pbuilder_component_install_and_export( | ||
COMPONENT Library | ||
LIBTARGETS MDT | ||
) | ||
|
||
pbuilder_install_headers(${HEADERS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
hk_package(ROOT *) | ||
hk_package(WCSim *) # 1.11.1 needed for hybrid WCSim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from hkpilot.utils.cmake import CMake | ||
|
||
|
||
class MDT(CMake): | ||
|
||
def __init__(self, path): | ||
super().__init__(path) | ||
self._package_name = "MDT" |