mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 00:37:13 +02:00
Compare commits
152 Commits
dev/fix/ra
...
developer_
Author | SHA1 | Date | |
---|---|---|---|
403d10b668 | |||
246ac90f71 | |||
4760648d87 | |||
4f184ddf40 | |||
68dcfca74e | |||
5b7ab5a810 | |||
1dd361a343 | |||
fed362e843 | |||
91a628cd6c | |||
9637d0602f | |||
70acfbf4ac | |||
a4850892e0 | |||
23849338e6 | |||
1d0de6876e | |||
28d7e8c07a | |||
9dfd388927 | |||
eb7108b837 | |||
04a2272937 | |||
f7b3ef2cdc | |||
abf364765c | |||
2ebbd0d7cd | |||
111b421476 | |||
74be5b5c7c | |||
260cb96f64 | |||
530feca830 | |||
bfb59d650b | |||
ea17a640cf | |||
0755de309e | |||
59b04ad6e8 | |||
a48820059d | |||
a2499c96d6 | |||
cd46f59b99 | |||
598e9f6708 | |||
2f23e4610d | |||
3c58039502 | |||
818ad608d9 | |||
35d2b274f4 | |||
47cf462f3d | |||
f772434072 | |||
bb7459d36b | |||
9e96f8b150 | |||
76c0f7a757 | |||
2e4eec0c8a | |||
8627f5e97b | |||
b02feceb2c | |||
31a20d4f6c | |||
23c855acbc | |||
0efee0c96d | |||
0aafde730e | |||
77785fa89b | |||
d80ea2269f | |||
3f83e37e6b | |||
166a78a2a5 | |||
9413efa9e5 | |||
70b0ae2ae8 | |||
6644406535 | |||
faf2714a60 | |||
670d9415e6 | |||
f6e2d358f9 | |||
d196eb5a2e | |||
e59940aa01 | |||
a6c0879de7 | |||
390ceb02d8 | |||
9854500a6f | |||
e534cc0f25 | |||
0a6030aa3e | |||
449c5119a4 | |||
643ea39670 | |||
d87855004f | |||
04cbe9924e | |||
6e8cf179c7 | |||
f848c00799 | |||
130f6746e3 | |||
d07f867630 | |||
dc9fb51a89 | |||
0973580670 | |||
bf216f55c6 | |||
937acd1138 | |||
e280742a6c | |||
7e913b3385 | |||
aa60a434e9 | |||
251f08767b | |||
4ff34a22d3 | |||
d0151153fb | |||
23658764a0 | |||
50e606bb8b | |||
bbaeeebaef | |||
0932869b4c | |||
eb2b093130 | |||
cffe020a6f | |||
e7bf408a21 | |||
9ae051c081 | |||
3c8130aca2 | |||
136829f70a | |||
4ff2e18c6a | |||
c7ee7f3af4 | |||
783c355784 | |||
2d5b28d500 | |||
e33e6546b0 | |||
e42cb6e8ff | |||
0e3e2df899 | |||
dfd25f1993 | |||
72e3b58c09 | |||
cca9c5249d | |||
e04d1e28f9 | |||
c1ddb84bc0 | |||
0891e66bbe | |||
cd905e96f3 | |||
b096cf8dd3 | |||
4da9bc0813 | |||
5f8d8a8c0b | |||
954db79c36 | |||
9380fd1be8 | |||
609c754b23 | |||
3fee6b792d | |||
c38b46df59 | |||
fd0bbf8170 | |||
c4c88c50d1 | |||
25d282717c | |||
5173f26bf8 | |||
565cad0fca | |||
765bbdc295 | |||
ea8efa64b2 | |||
b8cd465a12 | |||
e8f81e618d | |||
dec072c090 | |||
dfb298aaeb | |||
bc5c40d13b | |||
146d2aed19 | |||
47d381d299 | |||
0d552d6f75 | |||
1f56374496 | |||
ef61e62238 | |||
52865930c2 | |||
44d6ff6d2e | |||
5690a61284 | |||
22fb8763be | |||
1b7ea707ae | |||
49ebaf5c81 | |||
f62cc229f9 | |||
1bffa4a86d | |||
b0ce167471 | |||
137c29c52e | |||
2bc6e16887 | |||
315bf6eb5d | |||
a6ff0fc794 | |||
9906c5886c | |||
718682aec8 | |||
66f87b0f51 | |||
079d519e96 | |||
d720a8e338 | |||
2e466c7a73 |
BIN
.CMakeLists.txt.swp
Normal file
BIN
.CMakeLists.txt.swp
Normal file
Binary file not shown.
@ -2,6 +2,6 @@ BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
|
||||
UseTab: Never
|
||||
ColumnLimit: 80
|
||||
ColumnLimit: 120
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveMacros: true
|
75
.clang-tidy
75
.clang-tidy
@ -1,35 +1,50 @@
|
||||
|
||||
---
|
||||
Checks: '*,
|
||||
-altera-*,
|
||||
-android-cloexec-fopen,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-fuchsia*,
|
||||
-readability-else-after-return,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-identifier-length,
|
||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-llvm-header-guard,
|
||||
-modernize-use-nodiscard,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-readability-static-accessed-through-instance,
|
||||
-readability-braces-around-statements,
|
||||
-readability-isolate-declaration,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-identifier-length,
|
||||
-readability-identifier-naming,
|
||||
-hicpp-signed-bitwise,
|
||||
-hicpp-no-array-decay,
|
||||
-hicpp-braces-around-statements,
|
||||
-google-runtime-references,
|
||||
-google-readability-todo,
|
||||
-google-readability-braces-around-statements,
|
||||
-modernize-use-trailing-return-type,
|
||||
-llvmlibc-*'
|
||||
Checks: '*,
|
||||
-abseil-*
|
||||
-readability-magic-numbers,
|
||||
-misc-include-cleaner,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-hicpp-special-member-functions,
|
||||
-cert-err33-c,
|
||||
-modernize-pass-by-value,
|
||||
-altera-*,
|
||||
-android-cloexec-fopen,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-fuchsia*,
|
||||
-readability-else-after-return,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-identifier-length,
|
||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-llvm-header-guard,
|
||||
-modernize-use-nodiscard,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-readability-static-accessed-through-instance,
|
||||
-readability-braces-around-statements,
|
||||
-readability-isolate-declaration,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-identifier-length,
|
||||
-readability-identifier-naming,
|
||||
-hicpp-signed-bitwise,
|
||||
-hicpp-no-array-decay,
|
||||
-hicpp-braces-around-statements,
|
||||
-google-runtime-references,
|
||||
-google-readability-todo,
|
||||
-google-readability-braces-around-statements,
|
||||
-modernize-use-trailing-return-type,
|
||||
-llvmlibc-*
|
||||
'
|
||||
|
||||
HeaderFilterRegex: \.hpp
|
||||
HeaderFilterRegex: '*.hpp'
|
||||
ImplementationFileExtensions: [cpp]
|
||||
AnalyzeTemporaryDtors: false
|
||||
WarningsAsErrors: '*,
|
||||
-bugprone-implicit-widening-of-multiplication-result'
|
||||
FormatStyle: none
|
||||
CheckOptions:
|
||||
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
|
||||
|
103
.clang-uml
Normal file
103
.clang-uml
Normal file
@ -0,0 +1,103 @@
|
||||
compilation_database_dir: ./build
|
||||
output_directory: docs/diagrams
|
||||
|
||||
diagrams:
|
||||
aare_class:
|
||||
type: class
|
||||
using_namespace: aare
|
||||
include:
|
||||
namespaces:
|
||||
- aare
|
||||
exclude:
|
||||
element_types:
|
||||
- enum
|
||||
access:
|
||||
- private
|
||||
- protected
|
||||
- public
|
||||
glob:
|
||||
- core/src/*.cpp
|
||||
- file_io/src/*.cpp
|
||||
- network_io/src/*.cpp
|
||||
- utils/src/*.cpp
|
||||
|
||||
aare_class_simplified:
|
||||
type: class
|
||||
using_namespace: aare
|
||||
include:
|
||||
context:
|
||||
- match:
|
||||
radius: 1
|
||||
pattern: aare::FileInterface
|
||||
- match:
|
||||
radius: 2
|
||||
pattern: aare::ZmqSocket
|
||||
- match:
|
||||
radius: 2
|
||||
pattern: aare::Frame
|
||||
namespaces:
|
||||
- aare
|
||||
exclude:
|
||||
elements:
|
||||
- aare::xy
|
||||
element_types:
|
||||
- enum
|
||||
access:
|
||||
- private
|
||||
- protected
|
||||
- public
|
||||
glob:
|
||||
- core/src/*.cpp
|
||||
- file_io/src/*.cpp
|
||||
- network_io/src/*.cpp
|
||||
- utils/src/*.cpp
|
||||
|
||||
# aare_package:
|
||||
# type: package
|
||||
# package_type: directory
|
||||
|
||||
# include:
|
||||
# paths:
|
||||
# - core
|
||||
# - file_io
|
||||
# - network_io
|
||||
# - utils
|
||||
# - tests
|
||||
|
||||
file_io_class:
|
||||
type: class
|
||||
# generate_packages: true
|
||||
# package_type: directory
|
||||
include:
|
||||
context:
|
||||
- aare::FileInterface
|
||||
- aare::File
|
||||
namespaces:
|
||||
- aare
|
||||
# relationships:
|
||||
# - inheritance
|
||||
|
||||
glob:
|
||||
- file_io/src/*.cpp
|
||||
|
||||
network_io_class:
|
||||
type: class
|
||||
include:
|
||||
paths:
|
||||
- network_io/include/aare/network_io/*.hpp
|
||||
- core/include/aare/core/Frame.hpp
|
||||
namespaces:
|
||||
- aare
|
||||
glob:
|
||||
- network_io/src/*.cpp
|
||||
|
||||
core_class:
|
||||
type: class
|
||||
include:
|
||||
paths:
|
||||
- core/include/aare/core/*.hpp
|
||||
namespaces:
|
||||
- aare
|
||||
glob:
|
||||
- core/src/*.cpp
|
||||
|
File diff suppressed because it is too large
Load Diff
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.ipynb -linguist-detectable
|
@ -1,58 +0,0 @@
|
||||
name: Build the package using cmake then documentation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ]
|
||||
python-version: ["3.12", ]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup dev env
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install cmake gcc g++
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
environment-file: etc/dev-env.yml
|
||||
miniforge-version: latest
|
||||
channels: conda-forge
|
||||
conda-remove-defaults: "true"
|
||||
|
||||
- name: Build library
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_DOCS=ON
|
||||
make -j 2
|
||||
make docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
name: Build on RHEL8
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: gitea.psi.ch/images/rhel8-developer-gitea-actions
|
||||
steps:
|
||||
# workaround until actions/checkout@v4 is available for RH8
|
||||
# - uses: actions/checkout@v4
|
||||
- name: Clone repository
|
||||
run: |
|
||||
echo Cloning ${{ github.ref_name }}
|
||||
git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git --branch=${{ github.ref_name }} .
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dnf install -y cmake python3.12 python3.12-devel python3.12-pip
|
||||
|
||||
- name: Build library
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON -DPython_FIND_VIRTUALENV=FIRST
|
||||
make -j 2
|
||||
|
||||
- name: C++ unit tests
|
||||
working-directory: ${{gitea.workspace}}/build
|
||||
run: ctest
|
@ -1,31 +0,0 @@
|
||||
name: Build on RHEL9
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: gitea.psi.ch/images/rhel9-developer-gitea-actions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dnf install -y cmake python3.12 python3.12-devel python3.12-pip
|
||||
|
||||
- name: Build library
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake .. -DAARE_PYTHON_BINDINGS=ON -DAARE_TESTS=ON
|
||||
make -j 2
|
||||
|
||||
- name: C++ unit tests
|
||||
working-directory: ${{gitea.workspace}}/build
|
||||
run: ctest
|
42
.github/workflows/build_and_deploy_conda.yml
vendored
42
.github/workflows/build_and_deploy_conda.yml
vendored
@ -1,42 +0,0 @@
|
||||
name: Build pkgs and deploy if on main
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||
python-version: ["3.12",]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
# The setup-miniconda action needs this to activate miniconda
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
environment-file: etc/dev-env.yml
|
||||
miniforge-version: latest
|
||||
channels: conda-forge
|
||||
conda-remove-defaults: "true"
|
||||
|
||||
- name: Enable upload
|
||||
run: conda config --set anaconda_upload yes
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
|
||||
run: conda build conda-recipe --user slsdetectorgroup --token ${CONDA_TOKEN}
|
||||
|
41
.github/workflows/build_conda.yml
vendored
41
.github/workflows/build_conda.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: Build pkgs and deploy if on main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- developer
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||
python-version: ["3.12",]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
# The setup-miniconda action needs this to activate miniconda
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
environment-file: etc/dev-env.yml
|
||||
miniforge-version: latest
|
||||
channels: conda-forge
|
||||
conda-remove-defaults: "true"
|
||||
|
||||
|
||||
- name: Disable upload
|
||||
run: conda config --set anaconda_upload no
|
||||
|
||||
- name: Build
|
||||
run: conda build conda-recipe
|
||||
|
69
.github/workflows/build_docs.yml
vendored
69
.github/workflows/build_docs.yml
vendored
@ -1,69 +0,0 @@
|
||||
name: Build the package using cmake then documentation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ]
|
||||
python-version: ["3.12",]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash -l {0}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get conda
|
||||
uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
environment-file: etc/dev-env.yml
|
||||
miniforge-version: latest
|
||||
channels: conda-forge
|
||||
conda-remove-defaults: "true"
|
||||
|
||||
- name: Build library
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DAARE_SYSTEM_LIBRARIES=ON -DAARE_DOCS=ON
|
||||
make -j 2
|
||||
make docs
|
||||
|
||||
- name: Upload static files as artifact
|
||||
id: deployment
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: build/docs/html/
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' )
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
|
||||
|
||||
|
64
.github/workflows/build_wheel.yml
vendored
64
.github/workflows/build_wheel.yml
vendored
@ -1,64 +0,0 @@
|
||||
name: Build wheel
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
|
||||
jobs:
|
||||
build_wheels:
|
||||
name: Build wheels on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest,]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build wheels
|
||||
run: pipx run cibuildwheel==2.23.0
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||
path: ./wheelhouse/*.whl
|
||||
|
||||
build_sdist:
|
||||
name: Build source distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build sdist
|
||||
run: pipx run build --sdist
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cibw-sdist
|
||||
path: dist/*.tar.gz
|
||||
|
||||
upload_pypi:
|
||||
needs: [build_wheels, build_sdist]
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
|
||||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
# unpacks all CIBW artifacts into dist/
|
||||
pattern: cibw-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
98
.github/workflows/common-workflow.yml
vendored
Normal file
98
.github/workflows/common-workflow.yml
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
name: Build and run tests
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
use-system-libraries: # the variable you can use in place of a matrix
|
||||
required: true
|
||||
type: string
|
||||
default: OFF
|
||||
build-type:
|
||||
required: true
|
||||
type: string
|
||||
default: Debug
|
||||
use-python-bindings:
|
||||
required: true
|
||||
type: string
|
||||
default: OFF
|
||||
os:
|
||||
required: true
|
||||
type: string
|
||||
default: ubuntu-latest
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: "Build and test[os: ${{ inputs.os }}, build-type: ${{ inputs.build-type }}, use-system-libraries: ${{ inputs.use-system-libraries }}, use-python-bindings: ${{ inputs.use-python-bindings }}]"
|
||||
runs-on: ${{ inputs.os }}
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
JOB_CONTEXT: ${{ toJson(job) }}
|
||||
STEPS_CONTEXT: ${{ toJson(steps) }}
|
||||
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
echo "$JOB_CONTEXT"
|
||||
echo "$STEPS_CONTEXT"
|
||||
echo "$RUNNER_CONTEXT"
|
||||
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables
|
||||
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables
|
||||
echo "The run id is: $GITHUB_RUN_ID"
|
||||
echo "The GitHub Actor's username is: $GITHUB_ACTOR"
|
||||
echo "GitHub SHA: $GITHUB_SHA"
|
||||
|
||||
- name: print inputs
|
||||
run: |
|
||||
echo "use-system-libraries: ${{inputs.use-system-libraries}}"
|
||||
echo "build-type: ${{inputs.build-type}}"
|
||||
echo "use-python-bindings: ${{inputs.use-python-bindings}}"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
with:
|
||||
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
|
||||
environment-file: aare-environment.yml
|
||||
init-shell: bash
|
||||
cache-environment: true
|
||||
post-cleanup: 'all'
|
||||
|
||||
- name: build
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${{inputs.build-type}} -DAARE_PYTHON_BINDINGS=${{inputs.use-python-bindings}} -DAARE_SYSTEM_LIBRARIES=${{inputs.use-system-libraries}}
|
||||
cmake --build . -j
|
||||
- name: run tests
|
||||
run: |
|
||||
cd build/
|
||||
./run_tests
|
||||
if: ${{ inputs.os != 'windows-latest' }}
|
||||
- name: run tests
|
||||
run: |
|
||||
cd build/
|
||||
dir
|
||||
cd Debug/
|
||||
dir
|
||||
start run_tests.exe
|
||||
# start /B /WAIT "run_tests.exe"
|
||||
if: ${{ inputs.os == 'windows-latest' }}
|
||||
- name: run examples
|
||||
if: ${{ inputs.os != 'windows-latest' }}
|
||||
# find all examples in build/examples and run them
|
||||
run: |
|
||||
pwd
|
||||
export AARE_ROOT_DIR="$PWD"
|
||||
ls build/examples/*_example
|
||||
# examples to run
|
||||
cd build/examples
|
||||
examples=(raw_example json_example logger_example multiport_example mythen_example)
|
||||
examples+=(numpy_read_example numpy_write_example)
|
||||
for example in "${examples[@]}"; do
|
||||
echo "Running example: $example"
|
||||
./$example
|
||||
done
|
||||
|
||||
|
||||
|
33
.github/workflows/config.yml
vendored
Normal file
33
.github/workflows/config.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# config file to run multiple jobs in parallel with matrix strategy
|
||||
name: Config Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
# super important if you want to see all results, even if one fails
|
||||
# fail-fast is true by default
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
|
||||
build-type: ["Release", "Debug"]
|
||||
use-system-libraries: ["ON", "OFF"]
|
||||
use-python-bindings: ["OFF", "ON"]
|
||||
exclude:
|
||||
# excludes combinations that are not supported
|
||||
- os: "windows-latest"
|
||||
build-type: "Release" # TODO: fix this
|
||||
- os: "windows-latest"
|
||||
build-type: "Debug"
|
||||
use-system-libraries: "ON" # different _ITERATOR_DEBUG_LEVEL for system libraries
|
||||
|
||||
uses: ./.github/workflows/common-workflow.yml # calls the one above
|
||||
with:
|
||||
use-system-libraries: ${{ matrix.use-system-libraries }}
|
||||
build-type: ${{ matrix.build-type }}
|
||||
use-python-bindings: ${{ matrix.use-python-bindings }}
|
||||
os: ${{ matrix.os }}
|
||||
secrets: inherit
|
||||
|
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
install/
|
||||
.vscode
|
||||
.env
|
||||
.env.dev
|
||||
.cproject
|
||||
.project
|
||||
bin/
|
||||
@ -9,17 +11,10 @@ bin/
|
||||
*.toc
|
||||
*.o
|
||||
*.so
|
||||
.*
|
||||
build/
|
||||
build/**
|
||||
RELEASE.txt
|
||||
Testing/
|
||||
|
||||
ctbDict.cpp
|
||||
ctbDict.h
|
||||
|
||||
wheelhouse/
|
||||
dist/
|
||||
|
||||
*.pyc
|
||||
*/__pycache__/*
|
||||
|
||||
|
6
.ipynb_checkpoints/Untitled-checkpoint.ipynb
Normal file
6
.ipynb_checkpoints/Untitled-checkpoint.ipynb
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cells": [],
|
||||
"metadata": {},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
455
CMakeLists.txt
455
CMakeLists.txt
@ -1,32 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17) #TODO! Global or per target?
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
project(aare
|
||||
VERSION 0.1
|
||||
DESCRIPTION "Data processing library for PSI detectors"
|
||||
HOMEPAGE_URL "https://github.com/slsdetectorgroup/aare"
|
||||
LANGUAGES C CXX
|
||||
)
|
||||
|
||||
# Read VERSION file into project version
|
||||
set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/VERSION")
|
||||
file(READ "${VERSION_FILE}" VERSION_CONTENT)
|
||||
string(STRIP "${VERSION_CONTENT}" PROJECT_VERSION_STRING)
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION_STRING})
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
message(STATUS "Building from git hash: ${GIT_HASH}")
|
||||
|
||||
if (${CMAKE_VERSION} VERSION_GREATER "3.24")
|
||||
cmake_policy(SET CMP0135 NEW) #Fetch content download timestamp
|
||||
endif()
|
||||
cmake_policy(SET CMP0135 NEW)
|
||||
cmake_policy(SET CMP0079 NEW)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@ -34,37 +19,23 @@ include(FetchContent)
|
||||
|
||||
#Set default build type if none was specified
|
||||
include(cmake/helpers.cmake)
|
||||
|
||||
|
||||
default_build_type("Release")
|
||||
set_std_fs_lib()
|
||||
message(STATUS "Extra linking to fs lib:${STD_FS_LIB}")
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
|
||||
# General options
|
||||
option(AARE_PYTHON_BINDINGS "Build python bindings" OFF)
|
||||
option(AARE_TESTS "Build tests" OFF)
|
||||
option(AARE_BENCHMARKS "Build benchmarks" OFF)
|
||||
option(AARE_EXAMPLES "Build examples" OFF)
|
||||
option(AARE_USE_WARNINGS "Enable warnings" ON)
|
||||
option(AARE_PYTHON_BINDINGS "Build python bindings" ON)
|
||||
option(AARE_TESTS "Build tests" ON)
|
||||
option(AARE_EXAMPLES "Build examples" ON)
|
||||
option(AARE_IN_GITHUB_ACTIONS "Running in Github Actions" OFF)
|
||||
option(AARE_DOCS "Build documentation" OFF)
|
||||
option(AARE_VERBOSE "Verbose output" OFF)
|
||||
option(AARE_CUSTOM_ASSERT "Use custom assert" OFF)
|
||||
option(AARE_INSTALL_PYTHONEXT "Install the python extension in the install tree under CMAKE_INSTALL_PREFIX/aare/" OFF)
|
||||
option(AARE_ASAN "Enable AddressSanitizer" OFF)
|
||||
|
||||
# Configure which of the dependencies to use FetchContent for
|
||||
option(AARE_FETCH_FMT "Use FetchContent to download fmt" ON)
|
||||
option(AARE_FETCH_PYBIND11 "Use FetchContent to download pybind11" ON)
|
||||
option(AARE_FETCH_CATCH "Use FetchContent to download catch2" ON)
|
||||
option(AARE_FETCH_JSON "Use FetchContent to download nlohmann::json" ON)
|
||||
option(AARE_FETCH_ZMQ "Use FetchContent to download libzmq" ON)
|
||||
option(AARE_FETCH_LMFIT "Use FetchContent to download lmfit" ON)
|
||||
option(ENABLE_DRAFTS "Enable zmq drafts (depends on gnutls or nss)" OFF)
|
||||
|
||||
|
||||
#Convenience option to use system libraries only (no FetchContent)
|
||||
#Convenience option to use system libraries
|
||||
option(AARE_SYSTEM_LIBRARIES "Use system libraries" OFF)
|
||||
if(AARE_SYSTEM_LIBRARIES)
|
||||
message(STATUS "Build using system libraries")
|
||||
@ -73,100 +44,19 @@ if(AARE_SYSTEM_LIBRARIES)
|
||||
set(AARE_FETCH_CATCH OFF CACHE BOOL "Disabled FetchContent for catch2" FORCE)
|
||||
set(AARE_FETCH_JSON OFF CACHE BOOL "Disabled FetchContent for nlohmann::json" FORCE)
|
||||
set(AARE_FETCH_ZMQ OFF CACHE BOOL "Disabled FetchContent for libzmq" FORCE)
|
||||
# Still fetch lmfit when setting AARE_SYSTEM_LIBRARIES since this is not available
|
||||
# on conda-forge
|
||||
endif()
|
||||
|
||||
if(AARE_VERBOSE)
|
||||
add_compile_definitions(AARE_VERBOSE)
|
||||
add_compile_definitions(AARE_LOG_LEVEL=aare::logDEBUG5)
|
||||
else()
|
||||
add_compile_definitions(AARE_LOG_LEVEL=aare::logERROR)
|
||||
endif()
|
||||
|
||||
if(AARE_CUSTOM_ASSERT)
|
||||
add_compile_definitions(AARE_CUSTOM_ASSERT)
|
||||
endif()
|
||||
|
||||
if(AARE_BENCHMARKS)
|
||||
add_subdirectory(benchmarks)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if(AARE_FETCH_LMFIT)
|
||||
#TODO! Should we fetch lmfit from the web or inlcude a tar.gz in the repo?
|
||||
set(LMFIT_PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/lmfit.patch)
|
||||
|
||||
# For cmake < 3.28 we can't supply EXCLUDE_FROM_ALL to FetchContent_Declare
|
||||
# so we need this workaround
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.28")
|
||||
FetchContent_Declare(
|
||||
lmfit
|
||||
GIT_REPOSITORY https://jugit.fz-juelich.de/mlz/lmfit.git
|
||||
GIT_TAG main
|
||||
PATCH_COMMAND ${LMFIT_PATCH_COMMAND}
|
||||
UPDATE_DISCONNECTED 1
|
||||
)
|
||||
else()
|
||||
FetchContent_Declare(
|
||||
lmfit
|
||||
GIT_REPOSITORY https://jugit.fz-juelich.de/mlz/lmfit.git
|
||||
GIT_TAG main
|
||||
PATCH_COMMAND ${LMFIT_PATCH_COMMAND}
|
||||
UPDATE_DISCONNECTED 1
|
||||
EXCLUDE_FROM_ALL 1
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
#Disable what we don't need from lmfit
|
||||
set(BUILD_TESTING OFF CACHE BOOL "")
|
||||
set(LMFIT_CPPTEST OFF CACHE BOOL "")
|
||||
set(LIB_MAN OFF CACHE BOOL "")
|
||||
set(LMFIT_CPPTEST OFF CACHE BOOL "")
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
|
||||
|
||||
if (${CMAKE_VERSION} VERSION_LESS "3.28")
|
||||
if(NOT lmfit_POPULATED)
|
||||
FetchContent_Populate(lmfit)
|
||||
add_subdirectory(${lmfit_SOURCE_DIR} ${lmfit_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
else()
|
||||
FetchContent_MakeAvailable(lmfit)
|
||||
endif()
|
||||
|
||||
set_property(TARGET lmfit PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
else()
|
||||
find_package(lmfit REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
if(AARE_FETCH_ZMQ)
|
||||
# Fetchcontent_Declare is deprecated need to find a way to update this
|
||||
# for now setting the policy to old is enough
|
||||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
|
||||
cmake_policy(SET CMP0169 OLD)
|
||||
endif()
|
||||
set(ZMQ_PATCH_COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/libzmq_cmake_version.patch)
|
||||
|
||||
FetchContent_Declare(
|
||||
libzmq
|
||||
GIT_REPOSITORY https://github.com/zeromq/libzmq.git
|
||||
GIT_TAG v4.3.4
|
||||
PATCH_COMMAND ${ZMQ_PATCH_COMMAND}
|
||||
UPDATE_DISCONNECTED 1
|
||||
)
|
||||
# Disable unwanted options from libzmq
|
||||
set(BUILD_TESTS OFF CACHE BOOL "Switch off libzmq test build")
|
||||
set(BUILD_SHARED OFF CACHE BOOL "Switch off libzmq shared libs")
|
||||
set(WITH_PERF_TOOL OFF CACHE BOOL "")
|
||||
set(ENABLE_CPACK OFF CACHE BOOL "")
|
||||
set(ENABLE_CLANG OFF CACHE BOOL "")
|
||||
set(ENABLE_CURVE OFF CACHE BOOL "")
|
||||
set(ENABLE_DRAFTS OFF CACHE BOOL "")
|
||||
|
||||
# TODO! Verify that this is what we want to do in aare
|
||||
# Using GetProperties and Populate to be able to exclude zmq
|
||||
# from install (not possible with FetchContent_MakeAvailable(libzmq))
|
||||
@ -175,6 +65,7 @@ if(AARE_FETCH_ZMQ)
|
||||
FetchContent_Populate(libzmq)
|
||||
add_subdirectory(${libzmq_SOURCE_DIR} ${libzmq_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
else()
|
||||
find_package(ZeroMQ 4 REQUIRED)
|
||||
endif()
|
||||
@ -189,71 +80,16 @@ if (AARE_FETCH_FMT)
|
||||
GIT_PROGRESS TRUE
|
||||
USES_TERMINAL_DOWNLOAD TRUE
|
||||
)
|
||||
set(FMT_INSTALL ON CACHE BOOL "")
|
||||
# set(FMT_CMAKE_DIR "")
|
||||
FetchContent_MakeAvailable(fmt)
|
||||
set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
install(TARGETS fmt
|
||||
EXPORT ${project}-targets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
else()
|
||||
find_package(fmt 6 REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
if (AARE_FETCH_JSON)
|
||||
FetchContent_Declare(
|
||||
json
|
||||
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
|
||||
)
|
||||
set(JSON_Install ON CACHE BOOL "")
|
||||
FetchContent_MakeAvailable(json)
|
||||
set(NLOHMANN_JSON_TARGET_NAME nlohmann_json)
|
||||
|
||||
install(
|
||||
TARGETS nlohmann_json
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
)
|
||||
message(STATUS "target: ${NLOHMANN_JSON_TARGET_NAME}")
|
||||
else()
|
||||
find_package(nlohmann_json 3.11.3 REQUIRED)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# If conda build, always set lib dir to 'lib'
|
||||
if($ENV{CONDA_BUILD})
|
||||
set(CMAKE_INSTALL_LIBDIR "lib")
|
||||
endif()
|
||||
|
||||
# Set lower / upper case project names
|
||||
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
|
||||
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
|
||||
|
||||
|
||||
# Set targets export name (used by slsDetectorPackage and dependencies)
|
||||
set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
|
||||
set(namespace "aare::")
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
# Check if project is being used directly or via add_subdirectory
|
||||
set(AARE_MASTER_PROJECT OFF)
|
||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
set(AARE_MASTER_PROJECT ON)
|
||||
endif()
|
||||
|
||||
add_library(aare_compiler_flags INTERFACE)
|
||||
target_compile_features(aare_compiler_flags INTERFACE cxx_std_17)
|
||||
|
||||
if(AARE_PYTHON_BINDINGS)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
#################
|
||||
# MSVC specific #
|
||||
#################
|
||||
@ -295,208 +131,94 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_compile_options(aare_compiler_flags INTERFACE -O3)
|
||||
else()
|
||||
message(STATUS "Debug build")
|
||||
target_compile_options(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-Og
|
||||
-ggdb3
|
||||
# -D_GLIBCXX_DEBUG # causes errors with boost
|
||||
-D_GLIBCXX_DEBUG_PEDANTIC
|
||||
)
|
||||
|
||||
if (NOT AARE_PYTHON_BINDINGS)
|
||||
target_compile_options(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-fdiagnostics-parseable-fixits
|
||||
# -fdiagnostics-generate-patch
|
||||
-fdiagnostics-show-template-tree
|
||||
-fsanitize=address,undefined,pointer-compare
|
||||
-fno-sanitize-recover
|
||||
# -D_FORTIFY_SOURCE=2 # not needed for debug builds
|
||||
# -fstack-protector # cause errors wih folly? (ProducerConsumerQueue.hpp)
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-fdiagnostics-parseable-fixits
|
||||
# -fdiagnostics-generate-patch
|
||||
-fdiagnostics-show-template-tree
|
||||
-fsanitize=address,undefined,pointer-compare
|
||||
-fno-sanitize-recover
|
||||
# -D_FORTIFY_SOURCE=2
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# Common flags for GCC and Clang
|
||||
target_compile_options(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-Wall
|
||||
-Wextra
|
||||
-pedantic
|
||||
-Wshadow
|
||||
-Wold-style-cast
|
||||
-Wnon-virtual-dtor
|
||||
-Woverloaded-virtual
|
||||
-Wdouble-promotion
|
||||
-Wformat=2
|
||||
-Wredundant-decls
|
||||
-Wvla
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type #important can cause segfault in optimzed builds
|
||||
)
|
||||
if(AARE_USE_WARNINGS)
|
||||
target_compile_options(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-Wall
|
||||
-Wextra
|
||||
-pedantic
|
||||
-Wshadow
|
||||
-Wnon-virtual-dtor
|
||||
-Woverloaded-virtual
|
||||
-Wdouble-promotion
|
||||
-Wformat=2
|
||||
-Wredundant-decls
|
||||
-Wvla
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type #important can cause segfault in optimzed builds
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
endif() #GCC/Clang specific
|
||||
|
||||
|
||||
if(AARE_ASAN)
|
||||
message(STATUS "AddressSanitizer enabled")
|
||||
target_compile_options(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-fsanitize=address,undefined,pointer-compare
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
target_link_libraries(
|
||||
aare_compiler_flags
|
||||
INTERFACE
|
||||
-fsanitize=address,undefined,pointer-compare
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(AARE_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
target_compile_definitions(tests PRIVATE AARE_TESTS)
|
||||
endif()
|
||||
|
||||
###------------------------------------------------------------------------------MAIN LIBRARY
|
||||
###------------------------------------------------------------------------------------------
|
||||
add_subdirectory(src)
|
||||
|
||||
set(PUBLICHEADERS
|
||||
include/aare/ArrayExpr.hpp
|
||||
include/aare/CalculateEta.hpp
|
||||
include/aare/Cluster.hpp
|
||||
include/aare/ClusterFinder.hpp
|
||||
include/aare/ClusterFile.hpp
|
||||
include/aare/CtbRawFile.hpp
|
||||
include/aare/ClusterVector.hpp
|
||||
include/aare/decode.hpp
|
||||
include/aare/defs.hpp
|
||||
include/aare/Dtype.hpp
|
||||
include/aare/File.hpp
|
||||
include/aare/Fit.hpp
|
||||
include/aare/FileInterface.hpp
|
||||
include/aare/FilePtr.hpp
|
||||
include/aare/Frame.hpp
|
||||
include/aare/GainMap.hpp
|
||||
include/aare/DetectorGeometry.hpp
|
||||
include/aare/JungfrauDataFile.hpp
|
||||
include/aare/NDArray.hpp
|
||||
include/aare/NDView.hpp
|
||||
include/aare/NumpyFile.hpp
|
||||
include/aare/NumpyHelpers.hpp
|
||||
include/aare/Pedestal.hpp
|
||||
include/aare/PixelMap.hpp
|
||||
include/aare/RawFile.hpp
|
||||
include/aare/RawMasterFile.hpp
|
||||
include/aare/RawSubFile.hpp
|
||||
include/aare/VarClusterFinder.hpp
|
||||
include/aare/utils/task.hpp
|
||||
|
||||
#Overall target to link to when using the library
|
||||
add_library(aare INTERFACE)
|
||||
target_link_libraries(aare INTERFACE core file_io utils network_io processing aare_compiler_flags)
|
||||
target_include_directories(aare INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
|
||||
set(SourceFiles
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/CtbRawFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/defs.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Dtype.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/decode.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Frame.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/File.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/FilePtr.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Fit.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/DetectorGeometry.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/JungfrauDataFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyHelpers.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Interpolator.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/PixelMap.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawSubFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawMasterFile.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/task.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/ifstream_helpers.cpp
|
||||
)
|
||||
|
||||
add_library(aare_core STATIC ${SourceFiles})
|
||||
target_include_directories(aare_core PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
target_link_libraries(
|
||||
aare_core
|
||||
PUBLIC
|
||||
fmt::fmt
|
||||
nlohmann_json::nlohmann_json
|
||||
${STD_FS_LIB} # from helpers.cmake
|
||||
PRIVATE
|
||||
aare_compiler_flags
|
||||
Threads::Threads
|
||||
$<BUILD_INTERFACE:lmfit>
|
||||
|
||||
)
|
||||
|
||||
if(AARE_TESTS)
|
||||
target_compile_definitions(aare_core PRIVATE AARE_TESTS)
|
||||
endif()
|
||||
|
||||
set_target_properties(aare_core PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
PUBLIC_HEADER "${PUBLICHEADERS}"
|
||||
)
|
||||
|
||||
if (AARE_PYTHON_BINDINGS)
|
||||
set_property(TARGET aare_core PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
if(AARE_TESTS)
|
||||
set(TestSources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/algorithm.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/defs.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/decode.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Dtype.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Frame.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/DetectorGeometry.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawMasterFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NDArray.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NDView.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFinder.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterVector.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Cluster.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/CalculateEta.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/ClusterFinderMT.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Pedestal.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/JungfrauDataFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/NumpyHelpers.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/RawSubFile.test.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/task.test.cpp
|
||||
|
||||
)
|
||||
target_sources(tests PRIVATE ${TestSources} )
|
||||
endif()
|
||||
add_subdirectory(examples)
|
||||
|
||||
|
||||
|
||||
###------------------------------------------------------------------------------------------
|
||||
###------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
if(AARE_MASTER_PROJECT)
|
||||
install(TARGETS aare_core aare_compiler_flags
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/aare
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_INSTALL_RPATH $ORIGIN)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
|
||||
# #Overall target to link to when using the library
|
||||
# add_library(aare INTERFACE)
|
||||
# target_link_libraries(aare INTERFACE aare_core aare_compiler_flags)
|
||||
# target_include_directories(aare INTERFACE
|
||||
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
# $<INSTALL_INTERFACE:include>
|
||||
# )
|
||||
|
||||
# add_subdirectory(examples)
|
||||
|
||||
if(AARE_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif()
|
||||
|
||||
|
||||
# custom target to run check formatting with clang-format
|
||||
add_custom_target(
|
||||
@ -525,14 +247,9 @@ endif()
|
||||
|
||||
add_custom_target(
|
||||
clang-tidy
|
||||
COMMAND find \( -path "./src/*" -a -not -path "./src/python/*" -a \( -name "*.cpp" -not -name "*.test.cpp" \) \) -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
|
||||
COMMAND find \( -path "./src/*" -a -not -path "./src/python/*" -a \( -name "*.cpp" -not -name "*.test.cpp"\) \) -not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c "${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "linting with clang-tidy"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
if(AARE_MASTER_PROJECT)
|
||||
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
||||
set(PROJECT_LIBRARIES aare-core aare-compiler-flags )
|
||||
include(cmake/package_config.cmake)
|
||||
endif()
|
||||
|
17
COPYING
Normal file
17
COPYING
Normal file
@ -0,0 +1,17 @@
|
||||
The Aare Package is provided under:
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
Being under the terms of the GNU Lesser General Public License version 3 or later,
|
||||
according with:
|
||||
|
||||
LICENSES/LGPL-3.0
|
||||
|
||||
Source code under the Apache 2.0 License have the SPDX Identifier and are
|
||||
according with:
|
||||
|
||||
LICENSES/ThirdParty/Apache-2.0
|
||||
|
||||
All contributions to the Aare Package are subject to this COPYING file.
|
||||
|
||||
|
688
LICENSES/GPL-3.0
Normal file
688
LICENSES/GPL-3.0
Normal file
@ -0,0 +1,688 @@
|
||||
Valid-License-Identifier: GPL-3.0
|
||||
Valid-License-Identifier: GPL-3.0+
|
||||
SPDX-URL: https://spdx.org/licenses/GPL-3.0-or-later.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
|
||||
SPDX-License-Identifier: GPL-3.0
|
||||
For 'GNU Library General Public License (LGPL) version 3.0 or any later
|
||||
version' use:
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
179
LICENSES/LGPL-3.0
Normal file
179
LICENSES/LGPL-3.0
Normal file
@ -0,0 +1,179 @@
|
||||
Valid-License-Identifier: LGPL-3.0
|
||||
Valid-License-Identifier: LGPL-3.0+
|
||||
SPDX-URL: https://spdx.org/licenses/LGPL-3.0-or-later.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
For 'GNU Library General Public License (LGPL) version 3.0 only' use:
|
||||
SPDX-License-Identifier: LGPL-3.0
|
||||
For 'GNU Library General Public License (LGPL) version 3.0 or any later
|
||||
version' use:
|
||||
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
License-Text:
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
210
LICENSES/Third Party/Apache-2.0
Normal file
210
LICENSES/Third Party/Apache-2.0
Normal file
@ -0,0 +1,210 @@
|
||||
Valid-License-Identifier: Apache-2.0
|
||||
SPDX-URL: https://spdx.org/licenses/Apache-2.0.html
|
||||
Usage-Guide:
|
||||
To use this license in source code, put one of the following SPDX
|
||||
tag/value pairs into a comment according to the placement
|
||||
guidelines in the licensing rules documentation.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
License-Text:
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
98
README.md
98
README.md
@ -2,70 +2,76 @@
|
||||
Data analysis library for PSI hybrid detectors
|
||||
|
||||
|
||||
## Build and install
|
||||
|
||||
Prerequisites
|
||||
- cmake >= 3.14
|
||||
- C++17 compiler (gcc >= 8)
|
||||
- python >= 3.10
|
||||
|
||||
### Development install (for Python)
|
||||
## Folder structure
|
||||
|
||||
| Folder | subfolder | Content |
|
||||
|----------|---------------|-------------------------------------|
|
||||
| include/ | aare/ | top level header/s |
|
||||
| core/ | include/ | public headers for core |
|
||||
| | src/ | source files and non public headers |
|
||||
|
||||
## file_io class diagram
|
||||

|
||||
|
||||
|
||||
|
||||
## Test the zmq socket with a detector simulator
|
||||
|
||||
**1. Download and build the slsDetectorPackage**
|
||||
|
||||
```bash
|
||||
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
#configure using cmake
|
||||
cmake ../aare
|
||||
|
||||
#build (replace 4 with the number of threads you want to use)
|
||||
make -j4
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch=8.0.1 #or the desired branch
|
||||
cd slsDetectorPackage
|
||||
mkdir build && cd build
|
||||
cmake .. -DSLS_USE_SIMULATOR=ON
|
||||
make -j8 #or your number of cores
|
||||
```
|
||||
|
||||
Now you can use the Python module from your build directory
|
||||
|
||||
```python
|
||||
import aare
|
||||
f = aare.File('Some/File/I/Want_to_open_master_0.json')
|
||||
**2. Launch the slsReceiver**
|
||||
```bash
|
||||
bin/slsReceiver
|
||||
```
|
||||
|
||||
To run form other folders either add the path to your conda environment using conda-build or add it to your PYTHONPATH
|
||||
**3. Launch the virtual server**
|
||||
```bash
|
||||
bin/jungfrauDetectorServer_virtual
|
||||
```
|
||||
|
||||
|
||||
### Install using conda/mamba
|
||||
**4 Configure the detector simulator**
|
||||
|
||||
```bash
|
||||
#enable your env first!
|
||||
conda install aare=2024.10.29.dev0 -c slsdetectorgroup
|
||||
#sample config file is in etc/ in the aare repo
|
||||
sls_detector_put config etc/virtual_jf.config
|
||||
|
||||
#Now you can take images using sls_detector_acquire
|
||||
sls_detector_acquire
|
||||
```
|
||||
|
||||
### Install to a custom location and use in your project
|
||||
|
||||
Working example in: https://github.com/slsdetectorgroup/aare-examples
|
||||
|
||||
**5. Run the zmq example**
|
||||
```bash
|
||||
#build and install aare
|
||||
git clone git@github.com:slsdetectorgroup/aare.git --branch=v1 #or using http...
|
||||
mkdir build
|
||||
cd build
|
||||
examples/zmq_example
|
||||
|
||||
#configure using cmake
|
||||
cmake ../aare -DCMAKE_INSTALL_PREFIX=/where/to/put/aare
|
||||
#Will print the headers fof the frames received
|
||||
|
||||
#build (replace 4 with the number of threads you want to use)
|
||||
make -j4
|
||||
|
||||
#install
|
||||
make install
|
||||
|
||||
|
||||
#Now configure your project
|
||||
cmake .. -DCMAKE_PREFIX_PATH=SOME_PATH
|
||||
```
|
||||
|
||||
### Local build of conda pkgs
|
||||
|
||||
## Test the zmq processing replaying data
|
||||
|
||||
To be implemented
|
||||
|
||||
## generate documentation
|
||||
```bash
|
||||
conda build . --variants="{python: [3.11, 3.12, 3.13]}"
|
||||
# for doxygen documentation
|
||||
doxygen .doxygen.config
|
||||
|
||||
# for automatically generated plant uml diagrams
|
||||
clang-uml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
22
RELEASE.md
22
RELEASE.md
@ -1,22 +0,0 @@
|
||||
# Release notes
|
||||
|
||||
|
||||
### head
|
||||
|
||||
Features:
|
||||
|
||||
- Cluster finder now works with 5x5, 7x7 and 9x9 clusters
|
||||
|
||||
|
||||
### 2025.05.22
|
||||
|
||||
Features:
|
||||
|
||||
- Added scurve fitting
|
||||
|
||||
Bugfixes:
|
||||
|
||||
- Fixed crash when opening raw files with large number of data files
|
||||
|
||||
|
||||
|
10
aare-environment.yml
Normal file
10
aare-environment.yml
Normal file
@ -0,0 +1,10 @@
|
||||
name: aare
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- fmt
|
||||
- pybind11
|
||||
- nlohmann_json # should be removed
|
||||
- catch2
|
||||
- zeromq
|
@ -1,27 +0,0 @@
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
|
||||
FetchContent_Declare(
|
||||
benchmark
|
||||
GIT_REPOSITORY https://github.com/google/benchmark.git
|
||||
GIT_TAG v1.8.3 # Change to the latest version if needed
|
||||
)
|
||||
|
||||
# Ensure Google Benchmark is built correctly
|
||||
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
||||
|
||||
FetchContent_MakeAvailable(benchmark)
|
||||
|
||||
add_executable(benchmarks)
|
||||
|
||||
target_sources(benchmarks PRIVATE ndarray_benchmark.cpp calculateeta_benchmark.cpp)
|
||||
|
||||
# Link Google Benchmark and other necessary libraries
|
||||
target_link_libraries(benchmarks PRIVATE benchmark::benchmark aare_core aare_compiler_flags)
|
||||
|
||||
# Set output properties
|
||||
set_target_properties(benchmarks PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_NAME run_benchmarks
|
||||
)
|
@ -1,70 +0,0 @@
|
||||
#include "aare/CalculateEta.hpp"
|
||||
#include "aare/ClusterFile.hpp"
|
||||
#include <benchmark/benchmark.h>
|
||||
|
||||
using namespace aare;
|
||||
|
||||
class ClusterFixture : public benchmark::Fixture {
|
||||
public:
|
||||
Cluster<int, 2, 2> cluster_2x2{};
|
||||
Cluster<int, 3, 3> cluster_3x3{};
|
||||
|
||||
private:
|
||||
using benchmark::Fixture::SetUp;
|
||||
|
||||
void SetUp([[maybe_unused]] const benchmark::State &state) override {
|
||||
int temp_data[4] = {1, 2, 3, 1};
|
||||
std::copy(std::begin(temp_data), std::end(temp_data),
|
||||
std::begin(cluster_2x2.data));
|
||||
|
||||
cluster_2x2.x = 0;
|
||||
cluster_2x2.y = 0;
|
||||
|
||||
int temp_data2[9] = {1, 2, 3, 1, 3, 4, 5, 1, 20};
|
||||
std::copy(std::begin(temp_data2), std::end(temp_data2),
|
||||
std::begin(cluster_3x3.data));
|
||||
|
||||
cluster_3x3.x = 0;
|
||||
cluster_3x3.y = 0;
|
||||
}
|
||||
|
||||
// void TearDown(::benchmark::State& state) {
|
||||
// }
|
||||
};
|
||||
|
||||
BENCHMARK_F(ClusterFixture, Calculate2x2Eta)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
Eta2 eta = calculate_eta2(cluster_2x2);
|
||||
benchmark::DoNotOptimize(eta);
|
||||
}
|
||||
}
|
||||
|
||||
// almost takes double the time
|
||||
BENCHMARK_F(ClusterFixture, CalculateGeneralEtaFor2x2Cluster)
|
||||
(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
Eta2 eta = calculate_eta2<int, 2, 2>(cluster_2x2);
|
||||
benchmark::DoNotOptimize(eta);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(ClusterFixture, Calculate3x3Eta)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
Eta2 eta = calculate_eta2(cluster_3x3);
|
||||
benchmark::DoNotOptimize(eta);
|
||||
}
|
||||
}
|
||||
|
||||
// almost takes double the time
|
||||
BENCHMARK_F(ClusterFixture, CalculateGeneralEtaFor3x3Cluster)
|
||||
(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
Eta2 eta = calculate_eta2<int, 3, 3>(cluster_3x3);
|
||||
benchmark::DoNotOptimize(eta);
|
||||
}
|
||||
}
|
||||
// BENCHMARK_MAIN();
|
@ -1,132 +0,0 @@
|
||||
#include "aare/NDArray.hpp"
|
||||
#include <benchmark/benchmark.h>
|
||||
|
||||
using aare::NDArray;
|
||||
|
||||
constexpr ssize_t size = 1024;
|
||||
class TwoArrays : public benchmark::Fixture {
|
||||
public:
|
||||
NDArray<int, 2> a{{size, size}, 0};
|
||||
NDArray<int, 2> b{{size, size}, 0};
|
||||
void SetUp(::benchmark::State &state) {
|
||||
for (uint32_t i = 0; i < size; i++) {
|
||||
for (uint32_t j = 0; j < size; j++) {
|
||||
a(i, j) = i * j + 1;
|
||||
b(i, j) = i * j + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// void TearDown(::benchmark::State& state) {
|
||||
// }
|
||||
};
|
||||
|
||||
BENCHMARK_F(TwoArrays, AddWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a + b;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, AddWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) + b(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(TwoArrays, SubtractWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a - b;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, SubtractWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) - b(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(TwoArrays, MultiplyWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a * b;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, MultiplyWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) * b(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(TwoArrays, DivideWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a / b;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, DivideWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) / b(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(TwoArrays, FourAddWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a + b + a + b;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, FourAddWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) + b(i) + a(i) + b(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_F(TwoArrays, MultiplyAddDivideWithOperator)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res = a * a + b / a;
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
BENCHMARK_F(TwoArrays, MultiplyAddDivideWithIndex)(benchmark::State &st) {
|
||||
for (auto _ : st) {
|
||||
// This code gets timed
|
||||
NDArray<int, 2> res(a.shape());
|
||||
for (uint32_t i = 0; i < a.size(); i++) {
|
||||
res(i) = a(i) * a(i) + b(i) / a(i);
|
||||
}
|
||||
benchmark::DoNotOptimize(res);
|
||||
}
|
||||
}
|
||||
|
||||
BENCHMARK_MAIN();
|
1
cmake/.gitignore
vendored
Normal file
1
cmake/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
|
@ -1,11 +0,0 @@
|
||||
#Look for an executable called sphinx-build
|
||||
find_program(SPHINX_EXECUTABLE
|
||||
NAMES sphinx-build sphinx-build-3.6
|
||||
DOC "Path to sphinx-build executable")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
#Handle standard arguments to find_package like REQUIRED and QUIET
|
||||
find_package_handle_standard_args(Sphinx
|
||||
"Failed to find sphinx-build executable"
|
||||
SPHINX_EXECUTABLE)
|
@ -4,43 +4,3 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE ${val} CACHE STRING "Build type (default ${val})" FORCE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(set_std_fs_lib)
|
||||
# from pybind11
|
||||
# Check if we need to add -lstdc++fs or -lc++fs or nothing
|
||||
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS 17)
|
||||
set(STD_FS_NO_LIB_NEEDED TRUE)
|
||||
elseif(MSVC)
|
||||
set(STD_FS_NO_LIB_NEEDED TRUE)
|
||||
else()
|
||||
file(
|
||||
WRITE ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||
"#include <filesystem>\nint main(int argc, char ** argv) {\n std::filesystem::path p(argv[0]);\n return p.string().length();\n}"
|
||||
)
|
||||
try_compile(
|
||||
STD_FS_NO_LIB_NEEDED ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||
COMPILE_DEFINITIONS -std=c++17)
|
||||
try_compile(
|
||||
STD_FS_NEEDS_STDCXXFS ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||
COMPILE_DEFINITIONS -std=c++17
|
||||
LINK_LIBRARIES stdc++fs)
|
||||
try_compile(
|
||||
STD_FS_NEEDS_CXXFS ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||
COMPILE_DEFINITIONS -std=c++17
|
||||
LINK_LIBRARIES c++fs)
|
||||
endif()
|
||||
|
||||
if(${STD_FS_NEEDS_STDCXXFS})
|
||||
set(STD_FS_LIB stdc++fs PARENT_SCOPE)
|
||||
elseif(${STD_FS_NEEDS_CXXFS})
|
||||
set(STD_FS_LIB c++fs PARENT_SCOPE)
|
||||
elseif(${STD_FS_NO_LIB_NEEDED})
|
||||
set(STD_FS_LIB "" PARENT_SCOPE)
|
||||
else()
|
||||
message(WARNING "Unknown C++17 compiler - not passing -lstdc++fs")
|
||||
set(STD_FS_LIB "")
|
||||
endif()
|
||||
endfunction()
|
@ -1,35 +0,0 @@
|
||||
# This cmake code creates the configuration that is found and used by
|
||||
# find_package() of another cmake project
|
||||
|
||||
# get lower and upper case project name for the configuration files
|
||||
|
||||
# configure and install the configuration files
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
configure_package_config_file(
|
||||
"${CMAKE_SOURCE_DIR}/cmake/project-config.cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER}
|
||||
PATH_VARS CMAKE_INSTALL_DIR)
|
||||
|
||||
write_basic_package_version_file(
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
|
||||
COMPONENT devel
|
||||
DESTINATION ${CMAKE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
if (PROJECT_LIBRARIES OR PROJECT_STATIC_LIBRARIES)
|
||||
install(
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
FILE ${PROJECT_NAME_LOWER}-targets.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DIR}
|
||||
)
|
||||
endif ()
|
@ -1,28 +0,0 @@
|
||||
# Config file for @PROJECT_NAME_LOWER@
|
||||
#
|
||||
# It defines the following variables:
|
||||
#
|
||||
# @PROJECT_NAME_UPPER@_INCLUDE_DIRS - include directory
|
||||
# @PROJECT_NAME_UPPER@_LIBRARIES - all dynamic libraries
|
||||
# @PROJECT_NAME_UPPER@_STATIC_LIBRARIES - all static libraries
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
set(SLS_USE_HDF5 "@SLS_USE_HDF5@")
|
||||
|
||||
# List dependencies
|
||||
find_dependency(Threads)
|
||||
find_dependency(fmt)
|
||||
find_dependency(nlohmann_json)
|
||||
|
||||
# Add optional dependencies here
|
||||
if (SLS_USE_HDF5)
|
||||
find_dependency(HDF5)
|
||||
endif ()
|
||||
|
||||
set_and_check(@PROJECT_NAME_UPPER@_CMAKE_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_DIR@")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
@ -1,5 +0,0 @@
|
||||
python:
|
||||
- 3.11
|
||||
- 3.12
|
||||
- 3.13
|
||||
|
@ -1,50 +0,0 @@
|
||||
source:
|
||||
path: ../
|
||||
|
||||
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+(?:\.\d+)*(?:[\+\w\.]+))').group(1) %}
|
||||
package:
|
||||
name: aare
|
||||
version: {{version}}
|
||||
|
||||
source:
|
||||
path: ..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
script:
|
||||
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- cmake
|
||||
- ninja
|
||||
|
||||
host:
|
||||
- python
|
||||
- pip
|
||||
- numpy=2.1
|
||||
- scikit-build-core
|
||||
- pybind11 >=2.13.0
|
||||
- matplotlib # needed in host to solve the environment for run
|
||||
|
||||
run:
|
||||
- python
|
||||
- {{ pin_compatible('numpy') }}
|
||||
- matplotlib
|
||||
|
||||
|
||||
|
||||
test:
|
||||
imports:
|
||||
- aare
|
||||
requires:
|
||||
- pytest
|
||||
- boost-histogram
|
||||
source_files:
|
||||
- python/tests
|
||||
commands:
|
||||
- python -m pytest python/tests
|
||||
|
||||
about:
|
||||
summary: Data analysis library for hybrid pixel detectors from PSI
|
BIN
data/clusters/beam_En700eV_-40deg_300V_10us_d0_f0_100.clust
Executable file
BIN
data/clusters/beam_En700eV_-40deg_300V_10us_d0_f0_100.clust
Executable file
Binary file not shown.
BIN
data/clusters/single_frame_97_clustrers.clust
Executable file
BIN
data/clusters/single_frame_97_clustrers.clust
Executable file
Binary file not shown.
BIN
data/clusters/test_writing.clust
Normal file
BIN
data/clusters/test_writing.clust
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_16bit_d0_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_16bit_d0_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_16bit_d1_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_16bit_d1_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_16bit_d2_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_16bit_d2_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_16bit_d3_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_16bit_d3_f0_0.raw
Normal file
Binary file not shown.
53
data/eiger/eiger_500k_16bit_master_0.json
Normal file
53
data/eiger/eiger_500k_16bit_master_0.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Tue Mar 26 17:24:02 2024",
|
||||
"Detector Type": "Eiger",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"Image Size in bytes": 262144,
|
||||
"Pixels": {
|
||||
"x": 512,
|
||||
"y": 256
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 3,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Dynamic Range": 16,
|
||||
"Ten Giga": 0,
|
||||
"Exptime": "5s",
|
||||
"Period": "1s",
|
||||
"Threshold Energy": -1,
|
||||
"Sub Exptime": "2.62144ms",
|
||||
"Sub Period": "2.62144ms",
|
||||
"Quad": 0,
|
||||
"Number of rows": 256,
|
||||
"Rate Corrections": "[0, 0]",
|
||||
"Frames in File": 3,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
BIN
data/eiger/eiger_500k_32bit_d0_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_32bit_d0_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_32bit_d1_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_32bit_d1_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_32bit_d2_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_32bit_d2_f0_0.raw
Normal file
Binary file not shown.
BIN
data/eiger/eiger_500k_32bit_d3_f0_0.raw
Normal file
BIN
data/eiger/eiger_500k_32bit_d3_f0_0.raw
Normal file
Binary file not shown.
53
data/eiger/eiger_500k_32bit_master_0.json
Normal file
53
data/eiger/eiger_500k_32bit_master_0.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Tue Mar 26 17:24:34 2024",
|
||||
"Detector Type": "Eiger",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"Image Size in bytes": 524288,
|
||||
"Pixels": {
|
||||
"x": 512,
|
||||
"y": 256
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 3,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Dynamic Range": 32,
|
||||
"Ten Giga": 0,
|
||||
"Exptime": "5s",
|
||||
"Period": "1s",
|
||||
"Threshold Energy": -1,
|
||||
"Sub Exptime": "2.62144ms",
|
||||
"Sub Period": "2.62144ms",
|
||||
"Quad": 0,
|
||||
"Number of rows": 256,
|
||||
"Rate Corrections": "[0, 0]",
|
||||
"Frames in File": 3,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
BIN
data/jungfrau/jungfrau_double_d0_f0_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d0_f0_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d0_f1_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d0_f1_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d0_f2_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d0_f2_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d0_f3_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d0_f3_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d1_f0_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d1_f0_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d1_f1_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d1_f1_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d1_f2_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d1_f2_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_double_d1_f3_0.raw
Normal file
BIN
data/jungfrau/jungfrau_double_d1_f3_0.raw
Normal file
Binary file not shown.
47
data/jungfrau/jungfrau_double_master_0.json
Normal file
47
data/jungfrau/jungfrau_double_master_0.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Tue Feb 20 08:29:19 2024",
|
||||
"Detector Type": "Jungfrau",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 2
|
||||
},
|
||||
"Image Size in bytes": 524288,
|
||||
"Pixels": {
|
||||
"x": 1024,
|
||||
"y": 256
|
||||
},
|
||||
"Max Frames Per File": 3,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 10,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "10us",
|
||||
"Period": "1ms",
|
||||
"Number of UDP Interfaces": 2,
|
||||
"Number of rows": 512,
|
||||
"Frames in File": 10,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
BIN
data/jungfrau/jungfrau_single_0.npy
Normal file
BIN
data/jungfrau/jungfrau_single_0.npy
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_single_d0_f0_0.raw
Normal file
BIN
data/jungfrau/jungfrau_single_d0_f0_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_single_d0_f1_0.raw
Normal file
BIN
data/jungfrau/jungfrau_single_d0_f1_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_single_d0_f2_0.raw
Normal file
BIN
data/jungfrau/jungfrau_single_d0_f2_0.raw
Normal file
Binary file not shown.
BIN
data/jungfrau/jungfrau_single_d0_f3_0.raw
Normal file
BIN
data/jungfrau/jungfrau_single_d0_f3_0.raw
Normal file
Binary file not shown.
47
data/jungfrau/jungfrau_single_master_0.json
Normal file
47
data/jungfrau/jungfrau_single_master_0.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"Version": 7.2,
|
||||
"Timestamp": "Tue Feb 20 08:28:24 2024",
|
||||
"Detector Type": "Jungfrau",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 1048576,
|
||||
"Pixels": {
|
||||
"x": 1024,
|
||||
"y": 512
|
||||
},
|
||||
"Max Frames Per File": 3,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 10,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Exptime": "10us",
|
||||
"Period": "1ms",
|
||||
"Number of UDP Interfaces": 1,
|
||||
"Number of rows": 512,
|
||||
"Frames in File": 10,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
50
data/jungfrau/read_frame.py
Normal file
50
data/jungfrau/read_frame.py
Normal file
@ -0,0 +1,50 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
plt.ion()
|
||||
|
||||
header_dt = np.dtype(
|
||||
[
|
||||
("Frame Number", "u8"),
|
||||
("SubFrame Number/ExpLength", "u4"),
|
||||
("Packet Number", "u4"),
|
||||
("Bunch ID", "u8"),
|
||||
("Timestamp", "u8"),
|
||||
("Module Id", "u2"),
|
||||
("Row", "u2"),
|
||||
("Column", "u2"),
|
||||
("Reserved", "u2"),
|
||||
("Debug", "u4"),
|
||||
("Round Robin Number", "u2"),
|
||||
("Detector Type", "u1"),
|
||||
("Header Version", "u1"),
|
||||
("Packets caught mask", "8u8")
|
||||
]
|
||||
)
|
||||
|
||||
# Read three frames from a jungfrau file with a single interface
|
||||
rows = 1024
|
||||
cols = 512
|
||||
frames = 1
|
||||
|
||||
data = np.zeros((frames,rows,cols), dtype = np.uint16)
|
||||
header = np.zeros(frames, dtype = header_dt)
|
||||
for frame in range(frames):
|
||||
|
||||
file_name = '/tmp/raw_example_writing_master_'
|
||||
print("Reading file:", file_name)
|
||||
with open(file_name) as f:
|
||||
for i in range(3 if file_id != 3 else 1):
|
||||
header[i+file_id*3] = np.fromfile(f, dtype=header_dt, count = 1)
|
||||
data[i+file_id*3] = np.fromfile(f, dtype=np.uint16,count = rows*cols).reshape(rows,cols)
|
||||
|
||||
|
||||
# for i in range(frames if file_id != 3 else 1 ):
|
||||
# print("frame:",i)
|
||||
# print(header[i][0,0],data[i][0,1],data[i][1,0],data[i][rows-1,cols-1])
|
||||
# print("")
|
||||
|
||||
|
||||
print(header[1]["Frame Number"])
|
||||
#fig, ax = plt.subplots()
|
||||
#im = ax.imshow(data[0])
|
||||
#im.set_clim(2000,4000)
|
87
data/jungfrau/read_multiport.py
Normal file
87
data/jungfrau/read_multiport.py
Normal file
@ -0,0 +1,87 @@
|
||||
import numpy as np
|
||||
|
||||
header_dt = np.dtype(
|
||||
[
|
||||
("Frame Number", "u8"),
|
||||
("SubFrame Number/ExpLength", "u4"),
|
||||
("Packet Number", "u4"),
|
||||
("Bunch ID", "u8"),
|
||||
("Timestamp", "u8"),
|
||||
("Module Id", "u2"),
|
||||
("Row", "u2"),
|
||||
("Column", "u2"),
|
||||
("Reserved", "u2"),
|
||||
("Debug", "u4"),
|
||||
("Round Robin Number", "u2"),
|
||||
("Detector Type", "u1"),
|
||||
("Header Version", "u1"),
|
||||
("Packets caught mask", "8u8")
|
||||
]
|
||||
)
|
||||
|
||||
# Read three frames from a jungfrau file with a single interface
|
||||
|
||||
frames = 10
|
||||
parts = 2
|
||||
frame_per_file = 3
|
||||
bytes_per_pixel = 2
|
||||
frame_cols = 1024
|
||||
frame_rows = 512
|
||||
|
||||
part_cols = 1024
|
||||
part_rows = 256
|
||||
|
||||
|
||||
parts_data = np.zeros((frames,parts,part_rows,part_cols), dtype = np.uint16)
|
||||
data = np.zeros((frames,frame_rows,frame_cols), dtype = np.uint16)
|
||||
header = np.zeros((frames,parts), dtype = header_dt)
|
||||
|
||||
|
||||
|
||||
# verify that all parts have the same frame number
|
||||
for frame in range(frames):
|
||||
for part in range(parts):
|
||||
file_name = f'jungfrau_double_d{part}_f{frame//frame_per_file}_{0}.raw'
|
||||
with open(file_name) as f:
|
||||
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
|
||||
# print(f"Reading file: {file_name} at offset {offset}")
|
||||
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
|
||||
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
|
||||
if part > 0:
|
||||
assert header[frame,part]['Frame Number'] == header[frame,0]['Frame Number']
|
||||
|
||||
print("[X] All parts have the same frame number\n")
|
||||
|
||||
|
||||
for frame in range(frames):
|
||||
|
||||
for part in range(parts):
|
||||
file_name = f'jungfrau_double_d{part}_f{frame//frame_per_file}_{0}.raw'
|
||||
# print("Reading file:", file_name)
|
||||
with open(file_name) as f:
|
||||
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
|
||||
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1, offset=offset)
|
||||
parts_data[frame,part] = np.fromfile(f, dtype=np.uint16,count = part_rows*part_cols).reshape(part_rows,part_cols)
|
||||
|
||||
|
||||
data[frame] = np.concatenate((parts_data[frame,0],parts_data[frame,1]),axis=0)
|
||||
|
||||
|
||||
|
||||
pixel_0_0,pixel_0_1,pixel_1_0,pixel_255_1023,pixel_511_1023,= [],[],[],[],[]
|
||||
for frame in range(frames):
|
||||
pixel_0_0.append(data[frame,0,0])
|
||||
pixel_0_1.append(data[frame,0,1])
|
||||
pixel_1_0.append(data[frame,1,0])
|
||||
pixel_255_1023.append(data[frame,255,1023])
|
||||
pixel_511_1023.append(data[frame,511,1023])
|
||||
print("upper left corner of each frame (pixel_0_0)")
|
||||
print(pixel_0_0)
|
||||
print("first pixel on new line of each frame (pixel_1_0)")
|
||||
print(pixel_1_0)
|
||||
print("second pixel of the first line of each frame (pixel_0_1)")
|
||||
print(pixel_0_1)
|
||||
print("first pixel of the second part on the last line of each frame (pixel_255_1023)")
|
||||
print(pixel_255_1023)
|
||||
print("lower right corner of each frame (pixel_511_1023)")
|
||||
print(pixel_511_1023)
|
BIN
data/moench/moench04_noise_200V_sto_both_100us_no_light_thresh_900_d0_f0_0.raw
Executable file
BIN
data/moench/moench04_noise_200V_sto_both_100us_no_light_thresh_900_d0_f0_0.raw
Executable file
Binary file not shown.
@ -0,0 +1,40 @@
|
||||
Version : 6.4
|
||||
TimeStamp : Wed Aug 31 09:08:49 2022
|
||||
|
||||
Detector Type : ChipTestBoard
|
||||
Timing Mode : auto
|
||||
Geometry : [1, 1]
|
||||
Image Size : 360000 bytes
|
||||
Pixels : [96, 1]
|
||||
Max Frames Per File : 20000
|
||||
Frame Discard Policy : nodiscard
|
||||
Frame Padding : 1
|
||||
Scan Parameters : [disabled]
|
||||
Total Frames : 100
|
||||
Exptime : 100us
|
||||
Period : 4ms
|
||||
Ten Giga : 1
|
||||
ADC Mask : 0xffffffff
|
||||
Analog Flag : 1
|
||||
Analog Samples : 5000
|
||||
Digital Flag : 1
|
||||
Digital Samples : 5000
|
||||
Dbit Offset : 0
|
||||
Dbit Bitset : 0
|
||||
Frames in File : 100
|
||||
|
||||
#Frame Header
|
||||
Frame Number : 8 bytes
|
||||
SubFrame Number/ExpLength : 4 bytes
|
||||
Packet Number : 4 bytes
|
||||
Bunch ID : 8 bytes
|
||||
Timestamp : 8 bytes
|
||||
Module Id : 2 bytes
|
||||
Row : 2 bytes
|
||||
Column : 2 bytes
|
||||
Reserved : 2 bytes
|
||||
Debug : 4 bytes
|
||||
Round Robin Number : 2 bytes
|
||||
Detector Type : 1 byte
|
||||
Header Version : 1 byte
|
||||
Packets Caught Mask : 64 bytes
|
BIN
data/mythen/CORRECTED_scan242_d0_f0_3.raw
Normal file
BIN
data/mythen/CORRECTED_scan242_d0_f0_3.raw
Normal file
Binary file not shown.
BIN
data/mythen/CORRECTED_scan242_d1_f0_3.raw
Normal file
BIN
data/mythen/CORRECTED_scan242_d1_f0_3.raw
Normal file
Binary file not shown.
BIN
data/mythen/CORRECTED_scan242_d2_f0_3.raw
Normal file
BIN
data/mythen/CORRECTED_scan242_d2_f0_3.raw
Normal file
Binary file not shown.
BIN
data/mythen/CORRECTED_scan242_d3_f0_3.raw
Normal file
BIN
data/mythen/CORRECTED_scan242_d3_f0_3.raw
Normal file
Binary file not shown.
40
data/mythen/CORRECTED_scan242_master_3.raw
Executable file
40
data/mythen/CORRECTED_scan242_master_3.raw
Executable file
@ -0,0 +1,40 @@
|
||||
Version : 6.2
|
||||
TimeStamp : Mon Sep 14 16:21:09 2020
|
||||
|
||||
Detector Type : Mythen3
|
||||
Timing Mode : auto
|
||||
Geometry : [4, 1]
|
||||
Image Size : 5120 bytes
|
||||
Pixels : [1280, 1]
|
||||
Max Frames Per File : 10000
|
||||
Frame Discard Policy : nodiscard
|
||||
Frame Padding : 1
|
||||
Scan Parameters : [disabled]
|
||||
Total Frames : 1
|
||||
Dynamic Range : 32
|
||||
Ten Giga : 1
|
||||
Period : 0ns
|
||||
Counter Mask : 0x1
|
||||
Exptime1 : 0.2s
|
||||
Exptime2 : 0.2s
|
||||
Exptime3 : 0.2s
|
||||
GateDelay1 : 0.1s
|
||||
GateDelay2 : 0.1s
|
||||
GateDelay3 : 0.1s
|
||||
Gates : 1
|
||||
|
||||
#Frame Header
|
||||
Frame Number : 8 bytes
|
||||
SubFrame Number/ExpLength : 4 bytes
|
||||
Packet Number : 4 bytes
|
||||
Bunch ID : 8 bytes
|
||||
Timestamp : 8 bytes
|
||||
Module Id : 2 bytes
|
||||
Row : 2 bytes
|
||||
Column : 2 bytes
|
||||
Reserved : 2 bytes
|
||||
Debug : 4 bytes
|
||||
Round Robin Number : 2 bytes
|
||||
Detector Type : 1 byte
|
||||
Header Version : 1 byte
|
||||
Packets Caught Mask : 64 bytes
|
58
data/mythen/correct_frame_numbers.py
Normal file
58
data/mythen/correct_frame_numbers.py
Normal file
@ -0,0 +1,58 @@
|
||||
import numpy as np
|
||||
import shutil
|
||||
|
||||
header_dt = np.dtype(
|
||||
[
|
||||
("Frame Number", "u8"),
|
||||
("SubFrame Number/ExpLength", "u4"),
|
||||
("Packet Number", "u4"),
|
||||
("Bunch ID", "u8"),
|
||||
("Timestamp", "u8"),
|
||||
("Module Id", "u2"),
|
||||
("Row", "u2"),
|
||||
("Column", "u2"),
|
||||
("Reserved", "u2"),
|
||||
("Debug", "u4"),
|
||||
("Round Robin Number", "u2"),
|
||||
("Detector Type", "u1"),
|
||||
("Header Version", "u1"),
|
||||
("Packets caught mask", "8u8")
|
||||
]
|
||||
)
|
||||
|
||||
# Read three frames from a jungfrau file with a single interface
|
||||
|
||||
frames = 1
|
||||
parts = 4
|
||||
frame_per_file = 3
|
||||
bytes_per_pixel = 4
|
||||
frame_cols = 1
|
||||
frame_rows = 5120
|
||||
|
||||
part_cols = 1280
|
||||
part_rows = 1
|
||||
|
||||
header = np.zeros((frames,parts), dtype = header_dt)
|
||||
|
||||
|
||||
|
||||
# verify that all parts have the same frame number
|
||||
frame = 0
|
||||
i = 55
|
||||
for part in range(parts):
|
||||
file_name_r = f'scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
|
||||
file_name_w = f'CORRECTED_scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
|
||||
shutil.copyfile(file_name_r, file_name_w)
|
||||
|
||||
with open(file_name_r) as fr, open(file_name_w, 'r+b') as fw:
|
||||
# get frame
|
||||
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
|
||||
header[frame,part] = np.fromfile(fr, dtype=header_dt, count = 1,offset=offset)
|
||||
# update frame number
|
||||
header[frame,part]['Frame Number'] = i
|
||||
fw.seek(offset)
|
||||
header[frame,part].tofile(fw)
|
||||
|
||||
|
||||
print("[X] Done\n")
|
||||
|
BIN
data/mythen/m3_d0_f0_0.raw
Normal file
BIN
data/mythen/m3_d0_f0_0.raw
Normal file
Binary file not shown.
55
data/mythen/m3_master_0.json
Normal file
55
data/mythen/m3_master_0.json
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"Version": 7.1,
|
||||
"Timestamp": "Wed Sep 21 13:48:10 2022",
|
||||
"Detector Type": "Mythen3",
|
||||
"Timing Mode": "auto",
|
||||
"Geometry": {
|
||||
"x": 1,
|
||||
"y": 1
|
||||
},
|
||||
"Image Size in bytes": 15360,
|
||||
"Pixels": {
|
||||
"x": 3840,
|
||||
"y": 1
|
||||
},
|
||||
"Max Frames Per File": 10000,
|
||||
"Frame Discard Policy": "nodiscard",
|
||||
"Frame Padding": 1,
|
||||
"Scan Parameters": "[disabled]",
|
||||
"Total Frames": 1,
|
||||
"Receiver Roi": {
|
||||
"xmin": 4294967295,
|
||||
"xmax": 4294967295,
|
||||
"ymin": 4294967295,
|
||||
"ymax": 4294967295
|
||||
},
|
||||
"Dynamic Range": 32,
|
||||
"Ten Giga": 1,
|
||||
"Period": "2ms",
|
||||
"Counter Mask": "0x7",
|
||||
"Exptime1": "0.1s",
|
||||
"Exptime2": "0.1s",
|
||||
"Exptime3": "0.1s",
|
||||
"GateDelay1": "0ns",
|
||||
"GateDelay2": "0ns",
|
||||
"GateDelay3": "0ns",
|
||||
"Gates": 1,
|
||||
"Threshold Energies": "[-1, -1, -1]",
|
||||
"Frames in File": 1,
|
||||
"Frame Header Format": {
|
||||
"Frame Number": "8 bytes",
|
||||
"SubFrame Number/ExpLength": "4 bytes",
|
||||
"Packet Number": "4 bytes",
|
||||
"Bunch ID": "8 bytes",
|
||||
"Timestamp": "8 bytes",
|
||||
"Module Id": "2 bytes",
|
||||
"Row": "2 bytes",
|
||||
"Column": "2 bytes",
|
||||
"Reserved": "2 bytes",
|
||||
"Debug": "4 bytes",
|
||||
"Round Robin Number": "2 bytes",
|
||||
"Detector Type": "1 byte",
|
||||
"Header Version": "1 byte",
|
||||
"Packets Caught Mask": "64 bytes"
|
||||
}
|
||||
}
|
57
data/mythen/read_multiport.py
Normal file
57
data/mythen/read_multiport.py
Normal file
@ -0,0 +1,57 @@
|
||||
import numpy as np
|
||||
|
||||
header_dt = np.dtype(
|
||||
[
|
||||
("Frame Number", "u8"),
|
||||
("SubFrame Number/ExpLength", "u4"),
|
||||
("Packet Number", "u4"),
|
||||
("Bunch ID", "u8"),
|
||||
("Timestamp", "u8"),
|
||||
("Module Id", "u2"),
|
||||
("Row", "u2"),
|
||||
("Column", "u2"),
|
||||
("Reserved", "u2"),
|
||||
("Debug", "u4"),
|
||||
("Round Robin Number", "u2"),
|
||||
("Detector Type", "u1"),
|
||||
("Header Version", "u1"),
|
||||
("Packets caught mask", "8u8")
|
||||
]
|
||||
)
|
||||
|
||||
# Read three frames from a jungfrau file with a single interface
|
||||
|
||||
frames = 1
|
||||
parts = 4
|
||||
frame_per_file = 3
|
||||
bytes_per_pixel = 4
|
||||
frame_cols = 1
|
||||
frame_rows = 5120
|
||||
|
||||
part_cols = 1280
|
||||
part_rows = 1
|
||||
|
||||
header = np.zeros((frames,parts), dtype = header_dt)
|
||||
|
||||
|
||||
|
||||
# verify that all parts have the same frame number
|
||||
frame = 0
|
||||
sync = True
|
||||
for part in range(parts):
|
||||
file_name = f'scan242_d{part}_f{frame//frame_per_file}_{3}.raw'
|
||||
with open(file_name) as f:
|
||||
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
|
||||
# print(f"Reading file: {file_name} at offset {offset}")
|
||||
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
|
||||
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
|
||||
print(f"part {part} frame number: {header[frame,part]['Frame Number']}")
|
||||
sync = sync and (header[frame,part]['Frame Number'] == header[frame,0]['Frame Number'])
|
||||
|
||||
|
||||
if sync:
|
||||
print("[X] subfiles have the same frame")
|
||||
else:
|
||||
print("[X] subfiles do not have the same frame\n")
|
||||
|
||||
|
BIN
data/mythen/scan242_d0_f0_3.raw
Executable file
BIN
data/mythen/scan242_d0_f0_3.raw
Executable file
Binary file not shown.
BIN
data/mythen/scan242_d1_f0_3.raw
Executable file
BIN
data/mythen/scan242_d1_f0_3.raw
Executable file
Binary file not shown.
BIN
data/mythen/scan242_d2_f0_3.raw
Executable file
BIN
data/mythen/scan242_d2_f0_3.raw
Executable file
Binary file not shown.
BIN
data/mythen/scan242_d3_f0_3.raw
Executable file
BIN
data/mythen/scan242_d3_f0_3.raw
Executable file
Binary file not shown.
40
data/mythen/scan242_master_3.raw
Executable file
40
data/mythen/scan242_master_3.raw
Executable file
@ -0,0 +1,40 @@
|
||||
Version : 6.2
|
||||
TimeStamp : Mon Sep 14 16:21:09 2020
|
||||
|
||||
Detector Type : Mythen3
|
||||
Timing Mode : auto
|
||||
Geometry : [4, 1]
|
||||
Image Size : 5120 bytes
|
||||
Pixels : [1280, 1]
|
||||
Max Frames Per File : 10000
|
||||
Frame Discard Policy : nodiscard
|
||||
Frame Padding : 1
|
||||
Scan Parameters : [disabled]
|
||||
Total Frames : 1
|
||||
Dynamic Range : 32
|
||||
Ten Giga : 1
|
||||
Period : 0ns
|
||||
Counter Mask : 0x1
|
||||
Exptime1 : 0.2s
|
||||
Exptime2 : 0.2s
|
||||
Exptime3 : 0.2s
|
||||
GateDelay1 : 0.1s
|
||||
GateDelay2 : 0.1s
|
||||
GateDelay3 : 0.1s
|
||||
Gates : 1
|
||||
|
||||
#Frame Header
|
||||
Frame Number : 8 bytes
|
||||
SubFrame Number/ExpLength : 4 bytes
|
||||
Packet Number : 4 bytes
|
||||
Bunch ID : 8 bytes
|
||||
Timestamp : 8 bytes
|
||||
Module Id : 2 bytes
|
||||
Row : 2 bytes
|
||||
Column : 2 bytes
|
||||
Reserved : 2 bytes
|
||||
Debug : 4 bytes
|
||||
Round Robin Number : 2 bytes
|
||||
Detector Type : 1 byte
|
||||
Header Version : 1 byte
|
||||
Packets Caught Mask : 64 bytes
|
BIN
data/numpy/test_1d_int32.npy
Normal file
BIN
data/numpy/test_1d_int32.npy
Normal file
Binary file not shown.
BIN
data/numpy/test_3d_double.npy
Normal file
BIN
data/numpy/test_3d_double.npy
Normal file
Binary file not shown.
BIN
data/numpy/test_numpy_file.npy
Normal file
BIN
data/numpy/test_numpy_file.npy
Normal file
Binary file not shown.
12
data/numpy/write_test_files.py
Normal file
12
data/numpy/write_test_files.py
Normal file
@ -0,0 +1,12 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
arr = np.arange(10, dtype = np.int32)
|
||||
np.save('test_1d_int32.npy', arr)
|
||||
|
||||
arr2 = np.zeros((3,2,5), dtype = np.float64)
|
||||
arr2[0,0,0] = 1.0
|
||||
arr2[0,0,1] = 2.0
|
||||
arr2[0,1,0] = 72.0
|
||||
arr2[2,0,4] = 63.0
|
||||
np.save('test_3d_double.npy', arr2)
|
62
data/scripts/verify_rawfile_writing.py
Normal file
62
data/scripts/verify_rawfile_writing.py
Normal file
@ -0,0 +1,62 @@
|
||||
###
|
||||
### Verify that the raw file written by the raw_example.cpp are correct
|
||||
###
|
||||
|
||||
|
||||
import numpy as np
|
||||
|
||||
header_dt = np.dtype(
|
||||
[
|
||||
("Frame Number", "u8"),
|
||||
("SubFrame Number/ExpLength", "u4"),
|
||||
("Packet Number", "u4"),
|
||||
("Bunch ID", "u8"),
|
||||
("Timestamp", "u8"),
|
||||
("Module Id", "u2"),
|
||||
("Row", "u2"),
|
||||
("Column", "u2"),
|
||||
("Reserved", "u2"),
|
||||
("Debug", "u4"),
|
||||
("Round Robin Number", "u2"),
|
||||
("Detector Type", "u1"),
|
||||
("Header Version", "u1"),
|
||||
("Packets caught mask", "8u8")
|
||||
]
|
||||
)
|
||||
|
||||
frames = 1
|
||||
parts = 1
|
||||
frame_per_file = 3
|
||||
bytes_per_pixel = 2
|
||||
frame_cols = 512
|
||||
frame_rows = 1024
|
||||
|
||||
part_cols = 512
|
||||
part_rows = 1024
|
||||
|
||||
|
||||
# parts_data = np.zeros((frames,parts,part_rows,part_cols), dtype = np.uint16)
|
||||
data = np.zeros((frames,frame_rows,frame_cols), dtype = np.uint16)
|
||||
header = np.zeros((frames,parts), dtype = header_dt)
|
||||
|
||||
|
||||
|
||||
# verify that all parts have the same frame number
|
||||
for frame in range(frames):
|
||||
for part in range(parts):
|
||||
file_name = f'/tmp/raw_example_writing_d{part}_f{frame//frame_per_file}_{0}.raw'
|
||||
with open(file_name) as f:
|
||||
offset = (frame%frame_per_file)*(header_dt.itemsize+part_rows*part_cols*bytes_per_pixel)
|
||||
# print(f"Reading file: {file_name} at offset {offset}")
|
||||
header[frame,part] = np.fromfile(f, dtype=header_dt, count = 1,offset=offset)
|
||||
# print(f"Frame {frame} part {part} frame number: {header[frame,part]['Frame Number']}")
|
||||
data[frame] = np.fromfile(f, dtype=np.uint16,count = frame_rows*frame_cols).reshape(frame_rows,frame_cols)
|
||||
|
||||
|
||||
for frame in range(frames):
|
||||
for i,j in np.ndindex(data[frame].shape):
|
||||
assert(data[frame][i,j] == i+j)
|
||||
|
||||
print("[X] frame data is correct")
|
||||
|
||||
|
@ -1,56 +0,0 @@
|
||||
find_package(Doxygen REQUIRED)
|
||||
find_package(Sphinx REQUIRED)
|
||||
|
||||
#Doxygen
|
||||
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
|
||||
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
|
||||
#Sphinx
|
||||
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
||||
file(GLOB SPHINX_SOURCE_FILES CONFIGURE_DEPENDS "src/*.rst")
|
||||
|
||||
|
||||
|
||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||
get_filename_component(fname ${filename} NAME)
|
||||
message(STATUS "Copying ${filename} to ${SPHINX_BUILD}/src/${fname}")
|
||||
configure_file(${filename} "${SPHINX_BUILD}/src/${fname}")
|
||||
endforeach(filename ${SPHINX_SOURCE_FILES})
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
|
||||
"${SPHINX_BUILD}/conf.py"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
|
||||
"${SPHINX_BUILD}/static/css/extra.css"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
docs
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||
-Dbreathe_projects.aare=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||
-c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
rst
|
||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||
-Dbreathe_projects.aare=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||
-c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx"
|
||||
)
|
8
docs/commands_multimodule.md
Normal file
8
docs/commands_multimodule.md
Normal file
@ -0,0 +1,8 @@
|
||||
# receive data from two zmqstreams
|
||||
```bash
|
||||
killall jungfrauDetectorServer_virtual
|
||||
jungfrauDetectorServer_virtual
|
||||
jungfrauDetectorServer_virtual -p 1956
|
||||
slsMultiReceiver 1980 2 0
|
||||
sls_detector_put config etc/multimodule_virtual_jf.config
|
||||
```
|
@ -1,63 +0,0 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# list see the documentation:
|
||||
# http://www.sphinx-doc.org/en/master/config
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
print(sys.path)
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'aare'
|
||||
copyright = '2024, CPS Detector Group'
|
||||
author = 'CPS Detector Group'
|
||||
version = '@PROJECT_VERSION@'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ['breathe',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.napoleon',
|
||||
]
|
||||
|
||||
breathe_default_project = "aare"
|
||||
napoleon_use_ivar = True
|
||||
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "furo"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['static']
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file('css/extra.css') # may also be an URL
|
141
docs/diagrams/aare_class.puml
Normal file
141
docs/diagrams/aare_class.puml
Normal file
@ -0,0 +1,141 @@
|
||||
@startuml
|
||||
class "NDView<T,ssize_t Ndim=2>" as C_0000853339819629793090
|
||||
class C_0000853339819629793090 {
|
||||
__
|
||||
}
|
||||
class "NDView<unsigned short,2L>" as C_0000800815410987673815
|
||||
class C_0000800815410987673815 {
|
||||
__
|
||||
}
|
||||
class "NDView<T,Ndim>" as C_0001549403386232143110
|
||||
class C_0001549403386232143110 {
|
||||
__
|
||||
}
|
||||
class "NDArray<bool,Ndim>" as C_0000823076622246857026
|
||||
class C_0000823076622246857026 {
|
||||
__
|
||||
}
|
||||
class "NDArray<V,Ndim>" as C_0002198222861307321825
|
||||
class C_0002198222861307321825 {
|
||||
__
|
||||
}
|
||||
class "NDArray<T,ssize_t Ndim=2>" as C_0001181947618035129503
|
||||
class C_0001181947618035129503 {
|
||||
__
|
||||
}
|
||||
class "sls_detector_header" as C_0001674535970515942906
|
||||
class C_0001674535970515942906 {
|
||||
__
|
||||
}
|
||||
class "xy" as C_0000162230005032830360
|
||||
class C_0000162230005032830360 {
|
||||
__
|
||||
}
|
||||
class "RawFileConfig" as C_0000511537329021463656
|
||||
class C_0000511537329021463656 {
|
||||
__
|
||||
}
|
||||
class "Frame" as C_0001608703618093824988
|
||||
class C_0001608703618093824988 {
|
||||
__
|
||||
}
|
||||
class "logger::Logger" as C_0001861698262135249810
|
||||
class C_0001861698262135249810 {
|
||||
__
|
||||
}
|
||||
class "ZmqHeader" as C_0000690012646166089557
|
||||
class C_0000690012646166089557 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocket" as C_0000575290120620432482
|
||||
class C_0000575290120620432482 {
|
||||
__
|
||||
}
|
||||
class "ZmqFrame" as C_0001018278375791869829
|
||||
class C_0001018278375791869829 {
|
||||
__
|
||||
}
|
||||
class "network_io::NetworkError" as C_0001290043041844945927
|
||||
class C_0001290043041844945927 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocketReceiver" as C_0001017868003595712218
|
||||
class C_0001017868003595712218 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocketSender" as C_0002178845803227443176
|
||||
class C_0002178845803227443176 {
|
||||
__
|
||||
}
|
||||
class "DType" as C_0000703695317535186100
|
||||
class C_0000703695317535186100 {
|
||||
__
|
||||
}
|
||||
class "FileConfig" as C_0001694843161451381081
|
||||
class C_0001694843161451381081 {
|
||||
__
|
||||
}
|
||||
class "FileInterface" as C_0002122346448923803234
|
||||
class C_0002122346448923803234 {
|
||||
__
|
||||
}
|
||||
class "File" as C_0002007196654403438648
|
||||
class C_0002007196654403438648 {
|
||||
__
|
||||
}
|
||||
class "NumpyHeader" as C_0002287674849990076068
|
||||
class C_0002287674849990076068 {
|
||||
__
|
||||
}
|
||||
class "NumpyFile" as C_0001470720024404954003
|
||||
class C_0001470720024404954003 {
|
||||
__
|
||||
}
|
||||
class "SubFile" as C_0001884494008888210849
|
||||
class C_0001884494008888210849 {
|
||||
__
|
||||
}
|
||||
class "RawFile" as C_0001505206538021535080
|
||||
class C_0001505206538021535080 {
|
||||
__
|
||||
}
|
||||
C_0000800815410987673815 ..|> C_0000853339819629793090
|
||||
C_0001549403386232143110 ..|> C_0000853339819629793090
|
||||
C_0000823076622246857026 ..|> C_0001181947618035129503
|
||||
C_0002198222861307321825 ..|> C_0001181947618035129503
|
||||
C_0001181947618035129503 ..> C_0001549403386232143110
|
||||
C_0001181947618035129503 ..> C_0000823076622246857026
|
||||
C_0001181947618035129503 ..> C_0002198222861307321825
|
||||
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
|
||||
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
|
||||
C_0001017868003595712218 ..> C_0001018278375791869829
|
||||
C_0001017868003595712218 ..> C_0000690012646166089557
|
||||
C_0000575290120620432482 <|-- C_0001017868003595712218
|
||||
C_0002178845803227443176 ..> C_0000690012646166089557
|
||||
C_0002178845803227443176 ..> C_0001018278375791869829
|
||||
C_0000575290120620432482 <|-- C_0002178845803227443176
|
||||
C_0001694843161451381081 o-- C_0000703695317535186100 : +dtype
|
||||
C_0001694843161451381081 o-- C_0000162230005032830360 : +geometry
|
||||
C_0002122346448923803234 ..> C_0001608703618093824988
|
||||
C_0002007196654403438648 ..> C_0001694843161451381081
|
||||
C_0002007196654403438648 ..> C_0001608703618093824988
|
||||
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
|
||||
C_0002287674849990076068 o-- C_0000703695317535186100 : +dtype
|
||||
C_0001470720024404954003 ..> C_0001694843161451381081
|
||||
C_0001470720024404954003 ..> C_0001608703618093824988
|
||||
C_0001470720024404954003 ..> C_0000703695317535186100
|
||||
C_0001470720024404954003 o-- C_0002287674849990076068 : -m_header
|
||||
C_0002122346448923803234 <|-- C_0001470720024404954003
|
||||
C_0001884494008888210849 o-- C_0001884494008888210849 : #read_impl_map
|
||||
C_0001505206538021535080 ..> C_0001694843161451381081
|
||||
C_0001505206538021535080 ..> C_0001608703618093824988
|
||||
C_0001505206538021535080 ..> C_0001674535970515942906
|
||||
C_0001505206538021535080 --> C_0001884494008888210849 : -subfiles
|
||||
C_0001505206538021535080 o-- C_0000162230005032830360 : -geometry
|
||||
C_0001505206538021535080 o-- C_0000162230005032830360 : -positions
|
||||
C_0001505206538021535080 o-- C_0000511537329021463656 : -cfg
|
||||
C_0002122346448923803234 <|-- C_0001505206538021535080
|
||||
|
||||
'Generated with clang-uml, version 0.5.1
|
||||
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
|
||||
@enduml
|
1
docs/diagrams/aare_class.svg
Normal file
1
docs/diagrams/aare_class.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 63 KiB |
95
docs/diagrams/aare_class_simplified.puml
Normal file
95
docs/diagrams/aare_class_simplified.puml
Normal file
@ -0,0 +1,95 @@
|
||||
@startuml
|
||||
class "sls_detector_header" as C_0001674535970515942906
|
||||
class C_0001674535970515942906 {
|
||||
__
|
||||
}
|
||||
class "RawFileConfig" as C_0000511537329021463656
|
||||
class C_0000511537329021463656 {
|
||||
__
|
||||
}
|
||||
class "Frame" as C_0001608703618093824988
|
||||
class C_0001608703618093824988 {
|
||||
__
|
||||
}
|
||||
class "ZmqHeader" as C_0000690012646166089557
|
||||
class C_0000690012646166089557 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocket" as C_0000575290120620432482
|
||||
class C_0000575290120620432482 {
|
||||
__
|
||||
}
|
||||
class "ZmqFrame" as C_0001018278375791869829
|
||||
class C_0001018278375791869829 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocketReceiver" as C_0001017868003595712218
|
||||
class C_0001017868003595712218 {
|
||||
__
|
||||
}
|
||||
class "ZmqSocketSender" as C_0002178845803227443176
|
||||
class C_0002178845803227443176 {
|
||||
__
|
||||
}
|
||||
class "DType" as C_0000703695317535186100
|
||||
class C_0000703695317535186100 {
|
||||
__
|
||||
}
|
||||
class "FileConfig" as C_0001694843161451381081
|
||||
class C_0001694843161451381081 {
|
||||
__
|
||||
}
|
||||
class "FileInterface" as C_0002122346448923803234
|
||||
class C_0002122346448923803234 {
|
||||
__
|
||||
}
|
||||
class "File" as C_0002007196654403438648
|
||||
class C_0002007196654403438648 {
|
||||
__
|
||||
}
|
||||
class "NumpyHeader" as C_0002287674849990076068
|
||||
class C_0002287674849990076068 {
|
||||
__
|
||||
}
|
||||
class "NumpyFile" as C_0001470720024404954003
|
||||
class C_0001470720024404954003 {
|
||||
__
|
||||
}
|
||||
class "SubFile" as C_0001884494008888210849
|
||||
class C_0001884494008888210849 {
|
||||
__
|
||||
}
|
||||
class "RawFile" as C_0001505206538021535080
|
||||
class C_0001505206538021535080 {
|
||||
__
|
||||
}
|
||||
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
|
||||
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
|
||||
C_0001017868003595712218 ..> C_0001018278375791869829
|
||||
C_0001017868003595712218 ..> C_0000690012646166089557
|
||||
C_0000575290120620432482 <|-- C_0001017868003595712218
|
||||
C_0002178845803227443176 ..> C_0000690012646166089557
|
||||
C_0002178845803227443176 ..> C_0001018278375791869829
|
||||
C_0000575290120620432482 <|-- C_0002178845803227443176
|
||||
C_0001694843161451381081 o-- C_0000703695317535186100 : +dtype
|
||||
C_0002122346448923803234 ..> C_0001608703618093824988
|
||||
C_0002007196654403438648 ..> C_0001694843161451381081
|
||||
C_0002007196654403438648 ..> C_0001608703618093824988
|
||||
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
|
||||
C_0002287674849990076068 o-- C_0000703695317535186100 : +dtype
|
||||
C_0001470720024404954003 ..> C_0001694843161451381081
|
||||
C_0001470720024404954003 ..> C_0001608703618093824988
|
||||
C_0001470720024404954003 ..> C_0000703695317535186100
|
||||
C_0001470720024404954003 o-- C_0002287674849990076068 : -m_header
|
||||
C_0002122346448923803234 <|-- C_0001470720024404954003
|
||||
C_0001884494008888210849 o-- C_0001884494008888210849 : #read_impl_map
|
||||
C_0001505206538021535080 ..> C_0001694843161451381081
|
||||
C_0001505206538021535080 ..> C_0001608703618093824988
|
||||
C_0001505206538021535080 ..> C_0001674535970515942906
|
||||
C_0001505206538021535080 --> C_0001884494008888210849 : -subfiles
|
||||
C_0001505206538021535080 o-- C_0000511537329021463656 : -cfg
|
||||
C_0002122346448923803234 <|-- C_0001505206538021535080
|
||||
|
||||
'Generated with clang-uml, version 0.5.1
|
||||
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
|
||||
@enduml
|
1
docs/diagrams/aare_class_simplified.svg
Normal file
1
docs/diagrams/aare_class_simplified.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 41 KiB |
267
docs/diagrams/core_class.puml
Normal file
267
docs/diagrams/core_class.puml
Normal file
@ -0,0 +1,267 @@
|
||||
@startuml
|
||||
class "aare::sls_detector_header" as C_0001674535970515942906
|
||||
class C_0001674535970515942906 {
|
||||
__
|
||||
+bunchId : uint64_t
|
||||
+column : uint16_t
|
||||
+debug : uint32_t
|
||||
+detType : uint8_t
|
||||
+expLength : uint32_t
|
||||
+frameNumber : uint64_t
|
||||
+modId : uint16_t
|
||||
+packetMask : uint8_t[64]
|
||||
+packetNumber : uint32_t
|
||||
+reserved : uint16_t
|
||||
+roundRNumber : uint16_t
|
||||
+row : uint16_t
|
||||
+timestamp : uint64_t
|
||||
+version : uint8_t
|
||||
}
|
||||
class "aare::xy" as C_0000162230005032830360
|
||||
class C_0000162230005032830360 {
|
||||
+operator!=(const xy & other) const : bool
|
||||
+operator==(const xy & other) const : bool
|
||||
__
|
||||
+col : int
|
||||
+row : int
|
||||
}
|
||||
enum "aare::DetectorType" as C_0000214432771357383463
|
||||
enum C_0000214432771357383463 {
|
||||
Jungfrau
|
||||
Eiger
|
||||
Mythen3
|
||||
Moench
|
||||
ChipTestBoard
|
||||
}
|
||||
enum "aare::TimingMode" as C_0000845115331155903292
|
||||
enum C_0000845115331155903292 {
|
||||
Auto
|
||||
Trigger
|
||||
}
|
||||
class "aare::RawFileConfig" as C_0000511537329021463656
|
||||
class C_0000511537329021463656 {
|
||||
+operator==(const RawFileConfig & other) const : bool
|
||||
__
|
||||
+module_gap_col : int
|
||||
+module_gap_row : int
|
||||
}
|
||||
enum "aare::endian" as C_0000190468130082798308
|
||||
enum C_0000190468130082798308 {
|
||||
little
|
||||
big
|
||||
native
|
||||
}
|
||||
class "aare::DType" as C_0000703695317535186100
|
||||
class C_0000703695317535186100 {
|
||||
+DType(const std::type_info & t) : void
|
||||
+DType(std::string_view sv) : void
|
||||
+DType(DType::TypeIndex ti) : void
|
||||
..
|
||||
+operator!=(const DType & other) const noexcept : bool
|
||||
+operator!=(const std::type_info & t) const : bool
|
||||
+operator==(const DType & other) const noexcept : bool
|
||||
+operator==(const std::type_info & t) const : bool
|
||||
..
|
||||
+bitdepth() const : uint8_t
|
||||
+str() const : std::string
|
||||
__
|
||||
-m_type : TypeIndex
|
||||
}
|
||||
enum "aare::DType::TypeIndex" as C_0000575426556754591775
|
||||
enum C_0000575426556754591775 {
|
||||
INT8
|
||||
UINT8
|
||||
INT16
|
||||
UINT16
|
||||
INT32
|
||||
UINT32
|
||||
INT64
|
||||
UINT64
|
||||
FLOAT
|
||||
DOUBLE
|
||||
ERROR
|
||||
}
|
||||
class "aare::NDView<T,ssize_t Ndim=2>" as C_0000853339819629793090
|
||||
class C_0000853339819629793090 {
|
||||
+NDView() : void
|
||||
+NDView(T * buffer, std::array<ssize_t,Ndim> shape) : void
|
||||
+NDView(T * buffer, const std::vector<ssize_t> & shape) : void
|
||||
+NDView(const NDView<T,Ndim> &) = default : void
|
||||
+NDView(NDView<T,Ndim> &&) = default : void
|
||||
..
|
||||
+operator=(const NDView<T,Ndim> & other) : NDView<T,Ndim> &
|
||||
..
|
||||
+operator()(ssize_t i) : T &
|
||||
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
|
||||
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
|
||||
+operator*=(const T val) : NDView<T,Ndim> &
|
||||
+operator+=(const T val) : NDView<T,Ndim> &
|
||||
+operator-=(const T val) : NDView<T,Ndim> &
|
||||
+operator/=(const T val) : NDView<T,Ndim> &
|
||||
+operator/=(const NDView<T,Ndim> & other) : NDView<T,Ndim> &
|
||||
+operator=(const T val) : NDView<T,Ndim> &
|
||||
+operator==(const NDView<T,Ndim> & other) const : bool
|
||||
+operator[](ssize_t i) : T &
|
||||
..
|
||||
+begin() : T *
|
||||
+data() : T *
|
||||
-elemenwise<BinaryOperation>(T val, BinaryOperation op) : NDView<T, Ndim> &
|
||||
-elemenwise<BinaryOperation>(const NDView<T,Ndim> & other, BinaryOperation op) : NDView<T, Ndim> &
|
||||
+end() : T *
|
||||
+shape() : auto &
|
||||
+shape(ssize_t i) const : auto
|
||||
+size() const : ssize_t
|
||||
__
|
||||
-buffer_ : T *
|
||||
-shape_ : std::array<ssize_t,Ndim>
|
||||
-size_ : ssize_t
|
||||
-strides_ : std::array<ssize_t,Ndim>
|
||||
}
|
||||
class "aare::NDView<unsigned short,2L>" as C_0000800815410987673815
|
||||
class C_0000800815410987673815 {
|
||||
+NDView() : void
|
||||
+NDView(unsigned short * buffer, std::array<ssize_t,2L> shape) : void
|
||||
+NDView(unsigned short * buffer, const std::vector<ssize_t> & shape) : void
|
||||
+NDView(const aare::NDView<uint16_t,2> &) = default : void
|
||||
+NDView(aare::NDView<uint16_t,2> &&) = default : void
|
||||
..
|
||||
+operator=(const aare::NDView<uint16_t,2> & other) : aare::NDView<uint16_t,2> &
|
||||
..
|
||||
+operator()(ssize_t i) : unsigned short &
|
||||
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == 2L, unsigned short &>::type
|
||||
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == 2L, unsigned short &>::type
|
||||
+operator*=(const unsigned short val) : aare::NDView<uint16_t,2> &
|
||||
+operator+=(const unsigned short val) : aare::NDView<uint16_t,2> &
|
||||
+operator-=(const unsigned short val) : aare::NDView<uint16_t,2> &
|
||||
+operator/=(const unsigned short val) : aare::NDView<uint16_t,2> &
|
||||
+operator/=(const aare::NDView<uint16_t,2> & other) : aare::NDView<uint16_t,2> &
|
||||
+operator=(const unsigned short val) : aare::NDView<uint16_t,2> &
|
||||
+operator==(const aare::NDView<uint16_t,2> & other) const : bool
|
||||
+operator[](ssize_t i) : unsigned short &
|
||||
..
|
||||
+begin() : unsigned short *
|
||||
+data() : unsigned short *
|
||||
-elemenwise<BinaryOperation>(unsigned short val, BinaryOperation op) : NDView<uint16_t, 2> &
|
||||
-elemenwise<BinaryOperation>(const aare::NDView<uint16_t,2> & other, BinaryOperation op) : NDView<uint16_t, 2> &
|
||||
+end() : unsigned short *
|
||||
+shape() : std::array<ssize_t,2L> &
|
||||
+shape(ssize_t i) const : value_type
|
||||
+size() const : ssize_t
|
||||
__
|
||||
-buffer_ : unsigned short *
|
||||
-shape_ : std::array<ssize_t,2L>
|
||||
-size_ : ssize_t
|
||||
-strides_ : std::array<ssize_t,2L>
|
||||
}
|
||||
class "aare::NDView<T,Ndim>" as C_0001549403386232143110
|
||||
class C_0001549403386232143110 {
|
||||
__
|
||||
}
|
||||
class "aare::NDArray<bool,Ndim>" as C_0000823076622246857026
|
||||
class C_0000823076622246857026 {
|
||||
__
|
||||
}
|
||||
class "aare::NDArray<V,Ndim>" as C_0002198222861307321825
|
||||
class C_0002198222861307321825 {
|
||||
__
|
||||
}
|
||||
class "aare::NDArray<T,ssize_t Ndim=2>" as C_0001181947618035129503
|
||||
class C_0001181947618035129503 {
|
||||
+NDArray() : void
|
||||
+NDArray(std::array<ssize_t,Ndim> shape) : void
|
||||
+NDArray(std::array<ssize_t,Ndim> shape, T value) : void
|
||||
+NDArray(NDView<T,Ndim> span) : void
|
||||
+NDArray(NDArray<T,Ndim> && other) : void
|
||||
+NDArray(const NDArray<T,Ndim> & other) : void
|
||||
+~NDArray() : void
|
||||
..
|
||||
+operator=(NDArray<T,Ndim> && other) : NDArray<T,Ndim> &
|
||||
+operator=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
|
||||
..
|
||||
+operator!=(const NDArray<T,Ndim> & other) const : bool
|
||||
+operator&=(const T &) : NDArray<T,Ndim> &
|
||||
+operator()<Ix...>(Ix... index) const : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
|
||||
+operator()<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T &>::type
|
||||
+operator()(int i) const : const T &
|
||||
+operator()(int i) : T &
|
||||
+operator*(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
|
||||
+operator*(const T &) : NDArray<T,Ndim>
|
||||
+operator*=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
|
||||
+operator*=(const T &) : NDArray<T,Ndim> &
|
||||
+operator+(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
|
||||
+operator+(const T &) : NDArray<T,Ndim>
|
||||
+operator++() : NDArray<T,Ndim> &
|
||||
+operator+=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
|
||||
+operator+=(const T &) : NDArray<T,Ndim> &
|
||||
+operator-(const T &) : NDArray<T,Ndim>
|
||||
+operator-(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
|
||||
+operator-=(const T &) : NDArray<T,Ndim> &
|
||||
+operator-=(const NDArray<T,Ndim> & other) : NDArray<T,Ndim> &
|
||||
+operator/(const T &) : NDArray<T,Ndim>
|
||||
+operator/(const NDArray<T,Ndim> & other) : NDArray<T,Ndim>
|
||||
+operator/=(const T &) : NDArray<T,Ndim> &
|
||||
+operator/=<V>(const NDArray<V,Ndim> & other) : NDArray<T, Ndim> &
|
||||
+operator=(const T &) : NDArray<T,Ndim> &
|
||||
+operator==(const NDArray<T,Ndim> & other) const : bool
|
||||
+operator>(const NDArray<T,Ndim> & other) : NDArray<bool,Ndim>
|
||||
..
|
||||
+Print() : void
|
||||
+Print_all() : void
|
||||
+Print_some() : void
|
||||
+begin() : auto
|
||||
+buffer() : std::byte *
|
||||
+byte_strides() const noexcept : std::array<ssize_t,Ndim>
|
||||
+data() : T *
|
||||
+end() : auto
|
||||
+reset() : void
|
||||
+shape(ssize_t i) const noexcept : ssize_t
|
||||
+shape() const noexcept : std::array<ssize_t,Ndim>
|
||||
+size() const : ssize_t
|
||||
+span() const : NDView<T,Ndim>
|
||||
+sqrt() : void
|
||||
+strides() const noexcept : std::array<ssize_t,Ndim>
|
||||
+total_bytes() const : size_t
|
||||
+value<Ix...>(Ix... index) : typename std::enable_if<sizeof...(Ix) == Ndim, T>::type
|
||||
__
|
||||
-data_ : T *
|
||||
-shape_ : std::array<ssize_t,Ndim>
|
||||
-size_ : ssize_t
|
||||
-strides_ : std::array<ssize_t,Ndim>
|
||||
}
|
||||
class "aare::Frame" as C_0001608703618093824988
|
||||
class C_0001608703618093824988 {
|
||||
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(Frame && other) : void
|
||||
+Frame(const Frame & other) : void
|
||||
+~Frame() : void
|
||||
..
|
||||
+operator=(Frame & other) : Frame &
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+cols() const : ssize_t
|
||||
+data() const : std::byte *
|
||||
+get(int row, int col) : std::byte *
|
||||
+image<T>() : NDArray<T>
|
||||
+rows() const : ssize_t
|
||||
+set<T>(int row, int col, T data) : void
|
||||
+size() const : ssize_t
|
||||
+view<T>() : NDView<T>
|
||||
__
|
||||
-m_bitdepth : ssize_t
|
||||
-m_cols : ssize_t
|
||||
-m_data : std::byte *
|
||||
-m_rows : ssize_t
|
||||
}
|
||||
C_0000575426556754591775 --+ C_0000703695317535186100
|
||||
C_0000800815410987673815 ..|> C_0000853339819629793090
|
||||
C_0001549403386232143110 ..|> C_0000853339819629793090
|
||||
C_0000823076622246857026 ..|> C_0001181947618035129503
|
||||
C_0002198222861307321825 ..|> C_0001181947618035129503
|
||||
C_0001181947618035129503 ..> C_0001549403386232143110
|
||||
C_0001181947618035129503 ..> C_0000823076622246857026
|
||||
C_0001181947618035129503 ..> C_0002198222861307321825
|
||||
|
||||
'Generated with clang-uml, version 0.5.1
|
||||
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
|
||||
@enduml
|
1
docs/diagrams/core_class.svg
Normal file
1
docs/diagrams/core_class.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 80 KiB |
200
docs/diagrams/file_io_class.puml
Normal file
200
docs/diagrams/file_io_class.puml
Normal file
@ -0,0 +1,200 @@
|
||||
@startuml
|
||||
enum "aare::DetectorType" as C_0000214432771357383463
|
||||
enum C_0000214432771357383463 {
|
||||
Jungfrau
|
||||
Eiger
|
||||
Mythen3
|
||||
Moench
|
||||
ChipTestBoard
|
||||
}
|
||||
class "aare::Frame" as C_0001608703618093824988
|
||||
class C_0001608703618093824988 {
|
||||
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(Frame && other) : void
|
||||
+Frame(const Frame & other) : void
|
||||
+~Frame() : void
|
||||
..
|
||||
+operator=(Frame & other) : Frame &
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+cols() const : ssize_t
|
||||
+data() const : std::byte *
|
||||
+get(int row, int col) : std::byte *
|
||||
+image<T>() : NDArray<T>
|
||||
+rows() const : ssize_t
|
||||
+set<T>(int row, int col, T data) : void
|
||||
+size() const : ssize_t
|
||||
+view<T>() : NDView<T>
|
||||
__
|
||||
-m_bitdepth : ssize_t
|
||||
-m_cols : ssize_t
|
||||
-m_data : std::byte *
|
||||
-m_rows : ssize_t
|
||||
}
|
||||
class "aare::FileConfig" as C_0001694843161451381081
|
||||
class C_0001694843161451381081 {
|
||||
+operator!=(const FileConfig & other) const : bool
|
||||
+operator==(const FileConfig & other) const : bool
|
||||
__
|
||||
+cols : uint64_t
|
||||
+dtype : aare::DType
|
||||
+geometry : xy
|
||||
+rows : uint64_t
|
||||
}
|
||||
abstract "aare::FileInterface" as C_0002122346448923803234
|
||||
abstract C_0002122346448923803234 {
|
||||
+~FileInterface() : void
|
||||
..
|
||||
{abstract} +bitdepth() const = 0 : ssize_t
|
||||
{abstract} +bytes_per_frame() = 0 : size_t
|
||||
{abstract} +cols() const = 0 : ssize_t
|
||||
{abstract} +frame_number(size_t frame_index) = 0 : size_t
|
||||
+iread(size_t frame_number) : Frame
|
||||
+iread(size_t frame_number, size_t n_frames) : std::vector<Frame>
|
||||
{abstract} +pixels() = 0 : size_t
|
||||
{abstract} +read() = 0 : Frame
|
||||
{abstract} +read(size_t n_frames) = 0 : std::vector<Frame>
|
||||
{abstract} +read_into(std::byte * image_buf) = 0 : void
|
||||
{abstract} +read_into(std::byte * image_buf, size_t n_frames) = 0 : void
|
||||
{abstract} +rows() const = 0 : ssize_t
|
||||
{abstract} +seek(size_t frame_number) = 0 : void
|
||||
{abstract} +tell() = 0 : size_t
|
||||
{abstract} +total_frames() const = 0 : size_t
|
||||
{abstract} +write(Frame & frame) = 0 : void
|
||||
__
|
||||
+current_frame : size_t
|
||||
+m_base_name : std::string
|
||||
+m_base_path : std::filesystem::path
|
||||
+m_bitdepth : ssize_t
|
||||
+m_cols : ssize_t
|
||||
+m_ext : std::string
|
||||
+m_findex : int
|
||||
+m_fname : std::filesystem::path
|
||||
+m_mode : std::string
|
||||
+m_rows : ssize_t
|
||||
+m_total_frames : size_t
|
||||
+m_type : DetectorType
|
||||
+max_frames_per_file : size_t
|
||||
+version : std::string
|
||||
}
|
||||
class "aare::File" as C_0002007196654403438648
|
||||
class C_0002007196654403438648 {
|
||||
+File(std::filesystem::path fname, std::string mode, FileConfig cfg = {}) : void
|
||||
+File(File && other) : void
|
||||
+~File() : void
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+bytes_per_frame() : size_t
|
||||
+cols() const : ssize_t
|
||||
+frame_number(size_t frame_index) : size_t
|
||||
+iread(size_t frame_number) : Frame
|
||||
+pixels() : size_t
|
||||
+read() : Frame
|
||||
+read(size_t n_frames) : std::vector<Frame>
|
||||
+read_into(std::byte * image_buf) : void
|
||||
+read_into(std::byte * image_buf, size_t n_frames) : void
|
||||
+rows() const : ssize_t
|
||||
+seek(size_t frame_number) : void
|
||||
+tell() const : size_t
|
||||
+total_frames() const : size_t
|
||||
+write(Frame & frame) : void
|
||||
__
|
||||
-file_impl : FileInterface *
|
||||
}
|
||||
class "aare::NumpyFile" as C_0001470720024404954003
|
||||
class C_0001470720024404954003 {
|
||||
+NumpyFile(const std::filesystem::path & fname, const std::string & mode = "r", FileConfig cfg = {}) : void
|
||||
+~NumpyFile() : void
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+bytes_per_frame() : size_t
|
||||
+cols() const : ssize_t
|
||||
+dtype() const : DType
|
||||
+frame_number(size_t frame_index) : size_t
|
||||
-get_frame(size_t frame_number) : Frame
|
||||
-get_frame_into(size_t, std::byte *) : void
|
||||
+load<T,size_t NDim>() : NDArray<T, NDim>
|
||||
-load_metadata() : void
|
||||
+pixels() : size_t
|
||||
+read() : Frame
|
||||
+read(size_t n_frames) : std::vector<Frame>
|
||||
+read_into(std::byte * image_buf, size_t n_frames) : void
|
||||
+read_into(std::byte * image_buf) : void
|
||||
+rows() const : ssize_t
|
||||
+seek(size_t frame_number) : void
|
||||
+shape() const : std::vector<size_t>
|
||||
+tell() : size_t
|
||||
+total_frames() const : size_t
|
||||
+write(Frame & frame) : void
|
||||
__
|
||||
-current_frame : size_t
|
||||
-fp : FILE *
|
||||
-header_len : uint32_t
|
||||
-header_len_size : uint8_t
|
||||
-header_size : size_t
|
||||
-initial_header_len : size_t
|
||||
-m_header : NumpyHeader
|
||||
-major_ver_ : uint8_t
|
||||
-minor_ver_ : uint8_t
|
||||
}
|
||||
class "aare::RawFile" as C_0001505206538021535080
|
||||
class C_0001505206538021535080 {
|
||||
+RawFile(const std::filesystem::path & fname, const std::string & mode = "r", const FileConfig & cfg = {}) : void
|
||||
+~RawFile() : void
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+bytes_per_frame() : size_t
|
||||
+cols() const : ssize_t
|
||||
+data_fname(int mod_id, int file_id) : std::filesystem::path
|
||||
-find_geometry() : void
|
||||
+find_number_of_subfiles() : void
|
||||
+frame_number(size_t frame_index) : size_t
|
||||
-get_frame(size_t frame_number) : Frame
|
||||
-get_frame_into(size_t frame_number, std::byte * image_buf) : void
|
||||
{static} +is_master_file(std::filesystem::path fpath) : bool
|
||||
+master_fname() : std::filesystem::path
|
||||
-open_subfiles() : void
|
||||
-parse_fname() : void
|
||||
-parse_json_metadata() : void
|
||||
-parse_metadata() : void
|
||||
-parse_raw_metadata() : void
|
||||
+pixels() : size_t
|
||||
+read(size_t n_frames) : std::vector<Frame>
|
||||
+read() : Frame
|
||||
-read_header(const std::filesystem::path & fname) : sls_detector_header
|
||||
+read_into(std::byte * image_buf, size_t n_frames) : void
|
||||
+read_into(std::byte * image_buf) : void
|
||||
+rows() const : ssize_t
|
||||
+seek(size_t frame_number) : void
|
||||
+set_config(int row, int col) : void
|
||||
+tell() : size_t
|
||||
+total_frames() const : size_t
|
||||
+write(Frame & frame) : void
|
||||
__
|
||||
-cfg : RawFileConfig
|
||||
-geometry : xy
|
||||
-n_subfile_parts : size_t
|
||||
-n_subfiles : size_t
|
||||
-positions : std::vector<xy>
|
||||
-quad : bool
|
||||
-subfile_cols : int
|
||||
-subfile_rows : int
|
||||
-subfiles : std::vector<std::vector<SubFile *>>
|
||||
-timing_mode : TimingMode
|
||||
}
|
||||
C_0002122346448923803234 ..> C_0001608703618093824988
|
||||
C_0002122346448923803234 o-- C_0000214432771357383463 : +m_type
|
||||
C_0002007196654403438648 ..> C_0001694843161451381081
|
||||
C_0002007196654403438648 ..> C_0001608703618093824988
|
||||
C_0002007196654403438648 --> C_0002122346448923803234 : -file_impl
|
||||
C_0001470720024404954003 ..> C_0001694843161451381081
|
||||
C_0001470720024404954003 ..> C_0001608703618093824988
|
||||
C_0002122346448923803234 <|-- C_0001470720024404954003
|
||||
C_0001505206538021535080 ..> C_0001694843161451381081
|
||||
C_0001505206538021535080 ..> C_0001608703618093824988
|
||||
C_0002122346448923803234 <|-- C_0001505206538021535080
|
||||
|
||||
'Generated with clang-uml, version 0.5.1
|
||||
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
|
||||
@enduml
|
1
docs/diagrams/file_io_class.svg
Normal file
1
docs/diagrams/file_io_class.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 59 KiB |
136
docs/diagrams/network_io_class.puml
Normal file
136
docs/diagrams/network_io_class.puml
Normal file
@ -0,0 +1,136 @@
|
||||
@startuml
|
||||
class "aare::Frame" as C_0001608703618093824988
|
||||
class C_0001608703618093824988 {
|
||||
+Frame(ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(std::byte * fp, ssize_t rows, ssize_t cols, ssize_t m_bitdepth) : void
|
||||
+Frame(Frame && other) : void
|
||||
+Frame(const Frame & other) : void
|
||||
+~Frame() : void
|
||||
..
|
||||
+operator=(Frame & other) : Frame &
|
||||
..
|
||||
+bitdepth() const : ssize_t
|
||||
+cols() const : ssize_t
|
||||
+data() const : std::byte *
|
||||
+get(int row, int col) : std::byte *
|
||||
+image<T>() : NDArray<T>
|
||||
+rows() const : ssize_t
|
||||
+set<T>(int row, int col, T data) : void
|
||||
+size() const : ssize_t
|
||||
+view<T>() : NDView<T>
|
||||
__
|
||||
-m_bitdepth : ssize_t
|
||||
-m_cols : ssize_t
|
||||
-m_data : std::byte *
|
||||
-m_rows : ssize_t
|
||||
}
|
||||
class "aare::ZmqHeader" as C_0000690012646166089557
|
||||
class C_0000690012646166089557 {
|
||||
+operator==(const ZmqHeader & other) const : bool
|
||||
..
|
||||
+from_string(std::string & s) : void
|
||||
+to_string() const : std::string
|
||||
__
|
||||
+acqIndex : uint64_t
|
||||
+addJsonHeader : std::map<std::string,std::string>
|
||||
+column : uint16_t
|
||||
+completeImage : bool
|
||||
+data : bool
|
||||
+detSpec1 : uint64_t
|
||||
+detSpec2 : uint16_t
|
||||
+detSpec3 : uint32_t
|
||||
+detSpec4 : uint16_t
|
||||
+detType : uint8_t
|
||||
+dynamicRange : uint32_t
|
||||
+expLength : uint32_t
|
||||
+fileIndex : uint64_t
|
||||
+flipRows : int
|
||||
+fname : std::string
|
||||
+frameIndex : uint64_t
|
||||
+frameNumber : uint64_t
|
||||
+imageSize : uint32_t
|
||||
+jsonversion : uint32_t
|
||||
+modId : uint16_t
|
||||
+ndetx : uint32_t
|
||||
+ndety : uint32_t
|
||||
+npixelsx : uint32_t
|
||||
+npixelsy : uint32_t
|
||||
+packetNumber : uint32_t
|
||||
+progress : double
|
||||
+quad : uint32_t
|
||||
+row : uint16_t
|
||||
+rx_roi : std::array<int,4>
|
||||
+timestamp : uint64_t
|
||||
+version : uint8_t
|
||||
}
|
||||
class "aare::ZmqSocket" as C_0000575290120620432482
|
||||
class C_0000575290120620432482 {
|
||||
+ZmqSocket() = default : void
|
||||
+ZmqSocket(const ZmqSocket &) = deleted : void
|
||||
+ZmqSocket(ZmqSocket &&) = deleted : void
|
||||
+~ZmqSocket() : void
|
||||
..
|
||||
+operator=(const ZmqSocket &) = deleted : ZmqSocket
|
||||
..
|
||||
+disconnect() : void
|
||||
+set_potential_frame_size(size_t size) : void
|
||||
+set_timeout_ms(int n) : void
|
||||
+set_zmq_hwm(int hwm) : void
|
||||
__
|
||||
#m_context : void *
|
||||
#m_endpoint : std::string
|
||||
#m_header_buffer : char *
|
||||
{static} #m_max_header_size : const size_t
|
||||
#m_potential_frame_size : size_t
|
||||
#m_socket : void *
|
||||
#m_timeout_ms : int
|
||||
#m_zmq_hwm : int
|
||||
}
|
||||
class "aare::ZmqFrame" as C_0001018278375791869829
|
||||
class C_0001018278375791869829 {
|
||||
__
|
||||
+frame : Frame
|
||||
+header : ZmqHeader
|
||||
}
|
||||
class "aare::network_io::NetworkError" as C_0001290043041844945927
|
||||
class C_0001290043041844945927 {
|
||||
+NetworkError(const char * msg) : void
|
||||
+NetworkError(const std::string msg) : void
|
||||
..
|
||||
+what() const noexcept : const char *
|
||||
__
|
||||
-m_msg : const char *
|
||||
}
|
||||
class "aare::ZmqSocketReceiver" as C_0001017868003595712218
|
||||
class C_0001017868003595712218 {
|
||||
+ZmqSocketReceiver(const std::string & endpoint) : void
|
||||
..
|
||||
+connect() : void
|
||||
-receive_data(std::byte * data, size_t size) : int
|
||||
-receive_header() : ZmqHeader
|
||||
+receive_n() : std::vector<ZmqFrame>
|
||||
-receive_zmqframe() : ZmqFrame
|
||||
__
|
||||
}
|
||||
class "aare::ZmqSocketSender" as C_0002178845803227443176
|
||||
class C_0002178845803227443176 {
|
||||
+ZmqSocketSender(const std::string & endpoint) : void
|
||||
..
|
||||
+bind() : void
|
||||
+send(const ZmqHeader & header, const std::byte * data, size_t size) : size_t
|
||||
+send(const ZmqFrame & zmq_frame) : size_t
|
||||
+send(const std::vector<ZmqFrame> & zmq_frames) : size_t
|
||||
__
|
||||
}
|
||||
C_0001018278375791869829 o-- C_0000690012646166089557 : +header
|
||||
C_0001018278375791869829 o-- C_0001608703618093824988 : +frame
|
||||
C_0001017868003595712218 ..> C_0001018278375791869829
|
||||
C_0001017868003595712218 ..> C_0000690012646166089557
|
||||
C_0000575290120620432482 <|-- C_0001017868003595712218
|
||||
C_0002178845803227443176 ..> C_0000690012646166089557
|
||||
C_0002178845803227443176 ..> C_0001018278375791869829
|
||||
C_0000575290120620432482 <|-- C_0002178845803227443176
|
||||
|
||||
'Generated with clang-uml, version 0.5.1
|
||||
'LLVM version clang version 17.0.6 (Fedora 17.0.6-2.fc39)
|
||||
@enduml
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user