mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 13:57:13 +02:00
Compare commits
38 Commits
cmakemoenc
...
udp
Author | SHA1 | Date | |
---|---|---|---|
f08006db46 | |||
d5df63ce49 | |||
64d59b1dff | |||
a0bc843018 | |||
6126a401d0 | |||
7665d7b33a | |||
d3d8d7ba8e | |||
938d90bfb8 | |||
990f32397b | |||
53b1456f1a | |||
fbb901c8cc | |||
7b7641fb53 | |||
4de49906d4 | |||
c9b5db4d7f | |||
2e6378f241 | |||
692584ced8 | |||
4ae93dbc73 | |||
f37ceaf517 | |||
75a9002f2c | |||
cfec18e441 | |||
3ff7654c29 | |||
9781dbe49e | |||
e777c0fa79 | |||
9981632b2d | |||
d8436da540 | |||
4dc4c1ec0a | |||
6537aa1ceb | |||
467be41ccb | |||
73a39fcafe | |||
041c9fefa0 | |||
4f4f3baefc | |||
3523de8ba9 | |||
e77a93021d | |||
4dc14bf9d6 | |||
a5cdd687e6 | |||
89175586b4 | |||
c3bbe45b68 | |||
8f64449117 |
@ -3,5 +3,4 @@ IndentWidth: 4
|
||||
|
||||
UseTab: Never
|
||||
ColumnLimit: 80
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveMacros: true
|
||||
AlignConsecutiveAssignments: false
|
@ -17,9 +17,7 @@ Checks: '*,
|
||||
-google-runtime-references,
|
||||
-google-readability-todo,
|
||||
-google-readability-braces-around-statements,
|
||||
-modernize-use-trailing-return-type,
|
||||
-readability-isolate-declaration,
|
||||
-llvmlibc-*'
|
||||
-modernize-use-trailing-return-type'
|
||||
|
||||
HeaderFilterRegex: \.h
|
||||
AnalyzeTemporaryDtors: false
|
||||
|
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,42 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve
|
||||
title: New Bug Report
|
||||
labels: action - Bug, priority - Unclassified, status - Pending
|
||||
template: bug_report.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Distribution:
|
||||
<!-- RHEL7, RHEL6, Fedora, etc -->
|
||||
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *Describe the bug
|
||||
<!-- A clear and concise description of what the bug is -->
|
||||
|
||||
##### Expected behavior
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
##### To Reproduce
|
||||
<!-- Steps to reproduce the behavior: -->
|
||||
<!-- 1. Go to '...' -->
|
||||
<!-- 2. Click on '....' -->
|
||||
<!-- 3. Scroll down to '....' -->
|
||||
<!-- 4. See error -->
|
||||
|
||||
##### Screenshots
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
##### Additional context
|
||||
<!-- Add any other context about the problem here. -->
|
28
.github/ISSUE_TEMPLATE/change_request.md
vendored
28
.github/ISSUE_TEMPLATE/change_request.md
vendored
@ -1,28 +0,0 @@
|
||||
---
|
||||
name: Change Request
|
||||
about: Suggest a change to an existing feature
|
||||
title: New Change Request
|
||||
labels: action - Change, priority - Unclassified, status - Pending
|
||||
template: change_request.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *State the change request:
|
||||
<!-- A clear and concise description of what the change is to an existing feature -->
|
||||
|
||||
##### Is your change request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1 +0,0 @@
|
||||
blank_issues_enabled: false
|
34
.github/ISSUE_TEMPLATE/feature_request.md
vendored
34
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest a feature, documentation or submit a question
|
||||
title: New Feature Request
|
||||
labels: action - Enhancement, priority - Unclassified, status - Pending
|
||||
template: feature_request.md
|
||||
---
|
||||
<!-- Preview changes before submitting -->
|
||||
<!-- Please fill out everything with an *, as this report will be discarded otherwise -->
|
||||
<!-- This is a comment, the syntax is a bit different from c++ or bash -->
|
||||
|
||||
##### *Detector type:
|
||||
<!-- If applicable, Eiger, Jungfrau, Mythen3, Gotthard2, Gotthard, Moench, ChipTestBoard -->
|
||||
|
||||
##### *Software Package Version:
|
||||
<!-- developer, 4.2.0, 4.1.1, etc -->
|
||||
|
||||
##### Priority:
|
||||
<!-- Super Low, Low, Medium, High, Super High -->
|
||||
|
||||
##### *State the feature:
|
||||
<!-- A clear and concise description of what the feature is -->
|
||||
|
||||
##### Is your feature request related to a problem. Please describe:
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
##### Describe the solution you'd like:
|
||||
<!-- A clear and concise description of what you want to happen -->
|
||||
|
||||
##### Describe alternatives you've considered:
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered -->
|
||||
|
||||
##### Additional context:
|
||||
<!-- Add any other context about the feature here -->
|
11
.travis.yml
11
.travis.yml
@ -4,6 +4,12 @@ language: cpp
|
||||
|
||||
os: linux
|
||||
|
||||
# env:
|
||||
# matrix:
|
||||
# - CONDA_PY="3.7"
|
||||
|
||||
|
||||
|
||||
dist: bionic
|
||||
|
||||
install:
|
||||
@ -31,8 +37,7 @@ script:
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -v --show-traceback -t $CONDA_TOKEN upload --force {} \;
|
||||
script: find $HOME/miniconda/envs/testenv/conda-bld/${TRAVIS_OS_NAME}-64 -name "*.tar.bz2" -exec anaconda -t $CONDA_TOKEN upload --force {} \;
|
||||
on:
|
||||
branch: developer
|
||||
tags: true
|
||||
branch: udp
|
||||
|
||||
|
172
CMakeLists.txt
Normal file → Executable file
172
CMakeLists.txt
Normal file → Executable file
@ -1,17 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(slsDetectorPackage)
|
||||
set(PROJECT_VERSION 6.1.1)
|
||||
set(PROJECT_VERSION 5.0.0)
|
||||
include(CheckIPOSupported)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
include(cmake/project_version.cmake)
|
||||
|
||||
#functions to add compiler flags
|
||||
include(cmake/SlsAddFlag.cmake)
|
||||
|
||||
# Include additional modules that are used unconditionally
|
||||
include(GNUInstallDirs)
|
||||
|
||||
@ -37,51 +32,18 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
set(SLS_MASTER_PROJECT ON)
|
||||
endif()
|
||||
|
||||
option(SLS_USE_HDF5 "HDF5 File format" OFF)
|
||||
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" ON)
|
||||
option(SLS_USE_TEXTCLIENT "Text Client" ON)
|
||||
option(SLS_USE_DETECTOR "Detector libs" ON)
|
||||
option(SLS_USE_RECEIVER "Receiver" ON)
|
||||
option(SLS_USE_RECEIVER_BINARIES "Receiver binaries" ON)
|
||||
option(SLS_USE_GUI "GUI" OFF)
|
||||
option(SLS_USE_SIMULATOR "Simulator" OFF)
|
||||
option(SLS_USE_TESTS "TESTS" OFF)
|
||||
option(SLS_USE_INTEGRATION_TESTS "Integration Tests" OFF)
|
||||
option (SLS_USE_HDF5 "HDF5 File format" OFF)
|
||||
option (SLS_USE_TEXTCLIENT "Text Client" ON)
|
||||
option (SLS_USE_RECEIVER "Receiver" ON)
|
||||
option (SLS_USE_GUI "GUI" OFF)
|
||||
option (SLS_USE_SIMULATOR "Simulator" OFF)
|
||||
option (SLS_USE_TESTS "TESTS" OFF)
|
||||
option (SLS_USE_INTEGRATION_TESTS "Integration Tests" OFF)
|
||||
option(SLS_USE_SANITIZER "Sanitizers for debugging" OFF)
|
||||
option(SLS_USE_PYTHON "Python bindings" OFF)
|
||||
option(SLS_USE_CTBGUI "ctb GUI" OFF)
|
||||
option(SLS_BUILD_DOCS "docs" OFF)
|
||||
option(SLS_BUILD_EXAMPLES "examples" OFF)
|
||||
option(SLS_TUNE_LOCAL "tune to local machine" OFF)
|
||||
option(SLS_DEVEL_HEADERS "install headers for devel" OFF)
|
||||
option(SLS_USE_MOENCH "compile zmq and post processing for Moench" OFF)
|
||||
|
||||
#Convenience option to switch off defaults when building Moench binaries only
|
||||
option(SLS_BUILD_ONLY_MOENCH "compile only Moench" OFF)
|
||||
if(SLS_BUILD_ONLY_MOENCH)
|
||||
message(STATUS "Build MOENCH binaries only!")
|
||||
set(SLS_BUILD_SHARED_LIBRARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||
set(SLS_USE_TEXTCLIENT OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||
set(SLS_USE_DETECTOR OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||
set(SLS_USE_RECEIVER OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||
set(SLS_USE_RECEIVER_BINARIES OFF CACHE BOOL "Disabled for MOENCH_ONLY" FORCE)
|
||||
set(SLS_USE_MOENCH ON CACHE BOOL "Enable" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||
"libs/"
|
||||
"slsDetectorCalibration/"
|
||||
"ctbGui/"
|
||||
"manual/"
|
||||
"python/"
|
||||
"sample/"
|
||||
${CMAKE_BINARY_DIR})
|
||||
find_package(ClangFormat)
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
@ -90,16 +52,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
endif()
|
||||
|
||||
|
||||
#Enable LTO if available
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT SLS_LTO_AVAILABLE)
|
||||
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
||||
message(STATUS "Building with link time optimization")
|
||||
else()
|
||||
message(STATUS "Building without link time optimization")
|
||||
endif()
|
||||
|
||||
|
||||
#Add two fake libraries to manage options
|
||||
add_library(slsProjectOptions INTERFACE)
|
||||
add_library(slsProjectWarnings INTERFACE)
|
||||
@ -107,7 +59,7 @@ target_compile_features(slsProjectOptions INTERFACE cxx_std_11)
|
||||
target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-parameter #Needs to be slowly mitigated
|
||||
# -Wold-style-cast
|
||||
-Wnon-virtual-dtor
|
||||
-Woverloaded-virtual
|
||||
@ -115,24 +67,10 @@ target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wformat=2
|
||||
-Wredundant-decls
|
||||
# -Wconversion
|
||||
-Wvla
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type
|
||||
)
|
||||
|
||||
#Settings for C code
|
||||
add_library(slsProjectCSettings INTERFACE)
|
||||
target_compile_options(slsProjectCSettings INTERFACE
|
||||
-std=gnu99 #fixed
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wno-unused-parameter
|
||||
-Wdouble-promotion
|
||||
-Wformat=2
|
||||
-Wredundant-decls
|
||||
-Wdouble-promotion
|
||||
-Werror=return-type
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
#Testing for minimum version for compilers
|
||||
@ -140,22 +78,30 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
|
||||
message(FATAL_ERROR "Clang version must be at least 3.2!")
|
||||
endif()
|
||||
target_compile_options(slsProjectWarnings INTERFACE -Wshadow) #Clag does not warn on constructor
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
||||
message(FATAL_ERROR "GCC version must be at least 4.8!")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
|
||||
target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wno-missing-field-initializers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
||||
target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wno-misleading-indentation # mostly in rapidjson remove using clang format
|
||||
-Wduplicated-cond
|
||||
-Wnull-dereference )
|
||||
|
||||
# Add or disable warnings depending on if the compiler supports them
|
||||
# The function checks internally and sets HAS_warning-name
|
||||
sls_enable_cxx_warning("-Wnull-dereference")
|
||||
sls_enable_cxx_warning("-Wduplicated-cond")
|
||||
sls_disable_cxx_warning("-Wclass-memaccess")
|
||||
sls_disable_c_warning("-Wstringop-truncation")
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
|
||||
target_compile_options(slsProjectWarnings INTERFACE
|
||||
-Wno-class-memaccess )
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(SLS_USE_SANITIZER)
|
||||
@ -165,11 +111,6 @@ if(SLS_USE_SANITIZER)
|
||||
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||
endif()
|
||||
|
||||
if(SLS_TUNE_LOCAL)
|
||||
target_compile_options(slsProjectOptions INTERFACE -mtune=native -march=native)
|
||||
endif()
|
||||
|
||||
|
||||
#rapidjson
|
||||
add_library(rapidjson INTERFACE)
|
||||
target_include_directories(rapidjson INTERFACE
|
||||
@ -190,38 +131,8 @@ set(CMAKE_INSTALL_RPATH $ORIGIN)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
|
||||
set(ZeroMQ_HINT "" CACHE STRING "Hint where ZeroMQ could be found")
|
||||
#Adapted from: https://github.com/zeromq/cppzmq/
|
||||
if (NOT TARGET libzmq)
|
||||
if(ZeroMQ_HINT)
|
||||
message(STATUS "Looking for ZeroMQ in: ${ZeroMQ_HINT}")
|
||||
find_package(ZeroMQ 4
|
||||
NO_DEFAULT_PATH
|
||||
HINTS ${ZeroMQ_DIR}
|
||||
)
|
||||
else()
|
||||
find_package(ZeroMQ 4 QUIET)
|
||||
endif()
|
||||
|
||||
# libzmq autotools install: fallback to pkg-config
|
||||
if(NOT ZeroMQ_FOUND)
|
||||
message(STATUS "CMake libzmq package not found, trying again with pkg-config (normal install of zeromq)")
|
||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config)
|
||||
find_package(ZeroMQ 4 REQUIRED)
|
||||
endif()
|
||||
|
||||
# TODO "REQUIRED" above should already cause a fatal failure if not found, but this doesn't seem to work
|
||||
if(NOT ZeroMQ_FOUND)
|
||||
message(FATAL_ERROR "ZeroMQ was not found, neither as a CMake package nor via pkg-config")
|
||||
endif()
|
||||
|
||||
if (ZeroMQ_FOUND AND NOT TARGET libzmq)
|
||||
message(FATAL_ERROR "ZeroMQ version not supported!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_target_property(VAR libzmq INTERFACE_INCLUDE_DIRECTORIES)
|
||||
message(STATUS "zmq: ${VAR}")
|
||||
find_package(ZeroMQ 4 REQUIRED)
|
||||
|
||||
if (SLS_USE_TESTS)
|
||||
enable_testing()
|
||||
@ -229,19 +140,29 @@ if (SLS_USE_TESTS)
|
||||
endif(SLS_USE_TESTS)
|
||||
|
||||
|
||||
|
||||
|
||||
# Common functionallity to detector and receiver
|
||||
add_subdirectory(slsSupportLib)
|
||||
|
||||
if (SLS_USE_DETECTOR OR SLS_USE_TEXTCLIENT)
|
||||
if (SLS_USE_TEXTCLIENT)
|
||||
add_subdirectory(slsDetectorSoftware)
|
||||
endif ()
|
||||
endif (SLS_USE_TEXTCLIENT)
|
||||
|
||||
|
||||
if (SLS_USE_RECEIVER)
|
||||
if (SLS_USE_HDF5)
|
||||
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
|
||||
endif (SLS_USE_HDF5)
|
||||
add_subdirectory(slsReceiverSoftware)
|
||||
endif (SLS_USE_RECEIVER)
|
||||
|
||||
if (SLS_USE_GUI)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(Qwt 6 REQUIRED)
|
||||
if (QT4_FOUND AND QWT_FOUND)
|
||||
add_subdirectory(slsDetectorGui)
|
||||
endif()
|
||||
endif (SLS_USE_GUI)
|
||||
|
||||
if (SLS_USE_SIMULATOR)
|
||||
@ -253,7 +174,7 @@ if (SLS_USE_INTEGRATION_TESTS)
|
||||
endif (SLS_USE_INTEGRATION_TESTS)
|
||||
|
||||
if (SLS_USE_PYTHON)
|
||||
find_package (Python 3.6 COMPONENTS Interpreter Development)
|
||||
set(PYBIND11_CPP_STANDARD -std=c++11)
|
||||
add_subdirectory(libs/pybind11)
|
||||
add_subdirectory(python)
|
||||
endif(SLS_USE_PYTHON)
|
||||
@ -274,12 +195,13 @@ if(SLS_BUILD_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif(SLS_BUILD_DOCS)
|
||||
|
||||
if(SLS_USE_MOENCH)
|
||||
add_subdirectory(slsDetectorCalibration/moenchExecutables)
|
||||
endif(SLS_USE_MOENCH)
|
||||
|
||||
|
||||
if(SLS_MASTER_PROJECT)
|
||||
set(CMAKE_INSTALL_DIR "share/cmake/${PROJECT_NAME}")
|
||||
set(PROJECT_LIBRARIES slsSupportShared slsDetectorShared slsReceiverShared)
|
||||
# Set install dir CMake packages
|
||||
set(CMAKE_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/sls)
|
||||
# Set the list of exported targets
|
||||
set(PROJECT_LIBRARIES slsSupportLib slsDetectorShared slsReceiverShared)
|
||||
# Generate and install package config file and version
|
||||
include(cmake/package_config.cmake)
|
||||
endif()
|
||||
|
17
COPYING
17
COPYING
@ -1,17 +0,0 @@
|
||||
The SLS Detector 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 SLS Detector Package are subject to this COPYING file.
|
||||
|
||||
|
688
LICENSES/GPL-3.0
688
LICENSES/GPL-3.0
@ -1,688 +0,0 @@
|
||||
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>.
|
@ -1,179 +0,0 @@
|
||||
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.
|
@ -1,210 +0,0 @@
|
||||
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.
|
145
README.md
145
README.md
@ -1,102 +1,91 @@
|
||||
### Note
|
||||
|
||||
Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tags for internal usage.
|
||||
Use only releases with tags such as x.x.x or x.x.x-rcx.
|
||||
|
||||
### Documentation
|
||||
##### 5.0.0 - Latest Release
|
||||
Detailed documentation on the latest release can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
|
||||
|
||||
##### Older Releases
|
||||
Documentation is found in the package.
|
||||
Detailed documentation can be found on the [official site.](https://www.psi.ch/detectors/users-support)
|
||||
|
||||
### Binaries
|
||||
Binaries for the slsDetectorPackage are available through conda.
|
||||
```
|
||||
#Add conda channels
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
conda install slsdetlib #only shared lib and command line
|
||||
conda install slsdet #python bindings (includes slsdetlib)
|
||||
conda install slsdetgui #gui (includes qt4)
|
||||
|
||||
#Install specific version
|
||||
conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
|
||||
|
||||
```
|
||||
Documentation to obtain the binaries via the conda package is available for [lib](https://github.com/slsdetectorgroup/sls_detector_lib) and [gui](https://github.com/slsdetectorgroup/sls_detector_gui)
|
||||
|
||||
### Source code
|
||||
One can also obtain the source code from this repository and compile.
|
||||
One can also obtain the source code from this repository and compile while realizing the setup dependencies as required.
|
||||
```
|
||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
|
||||
```
|
||||
#### Dependencies
|
||||
|
||||
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
|
||||
#### Setup dependencies
|
||||
* Gui Client <br>
|
||||
Requirements: Qt 4.8 and Qwt 6.0
|
||||
```
|
||||
export QTDIR=/usr/local/Trolltech/
|
||||
export QWTDIR=/usr/local/qwt-6.0.1/
|
||||
```
|
||||
If either of them does not exist, the GUI client will not be built.
|
||||
|
||||
* Advanced user Calibration wizards<br>
|
||||
Requirements: ROOT
|
||||
```
|
||||
export ROOTSYS=/usr/local/root-5.34
|
||||
```
|
||||
|
||||
#### Compilation
|
||||
|
||||
Compiling can be done in two ways. Either with the convenience script
|
||||
cmk.sh or directly with cmake for more control.
|
||||
Compiling can be done in two ways.
|
||||
|
||||
**1. Compile using script cmk.sh**<br>
|
||||
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
```
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
After compiling, the libraries and executables will be found in `slsDetectorPackage/build/bin` directory<br>
|
||||
|
||||
Usage: ./cmk.sh [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-p: Builds/Rebuilds Python API
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-d: HDF5 Custom Directory
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-t: Build/Rebuilds only text client
|
||||
-r: Build/Rebuilds only receiver
|
||||
-g: Build/Rebuilds only gui
|
||||
-s: Simulator
|
||||
-u: Chip Test Gui
|
||||
-j: Number of threads to compile through
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
|
||||
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
```
|
||||
Usage: [-c] [-b] [-h] [-d HDF5 directory] [-j]<br>
|
||||
* -[no option]: only make<br>
|
||||
* -c: Clean<br>
|
||||
* -b: Builds/Rebuilds CMake files normal mode<br>
|
||||
* -h: Builds/Rebuilds Cmake files with HDF5 package<br>
|
||||
* -d: HDF5 Custom Directory<br>
|
||||
* -t: Build/Rebuilds only text client<br>
|
||||
* -r: Build/Rebuilds only receiver<br>
|
||||
* -g: Build/Rebuilds only gui<br>
|
||||
* -j: Number of threads to compile through<br>
|
||||
* -e: Debug mode
|
||||
|
||||
Basic Option:
|
||||
./cmk.sh -b
|
||||
|
||||
For only make:
|
||||
./cmk.sh
|
||||
|
||||
For make clean;make:
|
||||
./cmk.sh -c
|
||||
|
||||
For using hdf5 without custom dir /blabla:
|
||||
./cmk.sh -h -d /blabla
|
||||
|
||||
For rebuilding cmake without hdf5
|
||||
./cmk.sh -b
|
||||
|
||||
For using multiple cores to compile faster:
|
||||
./cmk.sh -j9<br>
|
||||
|
||||
|
||||
For rebuilding only certain sections<br>
|
||||
./cmk.sh -tg #only text client and gui<br>
|
||||
./cmk.sh -r #only receiver<br>
|
||||
|
||||
|
||||
**2. Compile without script**<br>
|
||||
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
|
||||
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory.
|
||||
```
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
|
||||
$ make -j12 #or whatever number of threads wanted
|
||||
$ cd ..
|
||||
$ mkdir slsDetectorPackage-build
|
||||
$ cd slsDetectorPackage-build
|
||||
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_HDF5=OFF
|
||||
$ make
|
||||
```
|
||||
|
||||
To install binaries using CMake
|
||||
Use the following as an example to compile statically and using specific hdf5 folder
|
||||
```
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
make install
|
||||
$ HDF5_ROOT=/opt/hdf5v1.10.0 cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_HDF5=ON
|
||||
```
|
||||
After compiling, the libraries and executables will be found at `bin` directory
|
||||
```
|
||||
$ ls bin/
|
||||
gui_client libSlsDetector.a libSlsDetector.so libSlsReceiver.a libSlsReceiver.so
|
||||
sls_detector_acquire sls_detector_get slsDetectorGui sls_detector_help sls_detector_put slsReceiver slsMultiReceiver
|
||||
```
|
||||
|
||||
|
||||
### Support
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
182
RELEASE.txt
182
RELEASE.txt
@ -1,180 +1,2 @@
|
||||
SLS Detector Package Minor Release 6.1.0 released on 25.11.2021
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v6.1.0 and v6.0.0.
|
||||
|
||||
|
||||
|
||||
CONTENTS
|
||||
--------
|
||||
1. New or Changed Features
|
||||
2. Resolved Issues
|
||||
3. Firmware Requirements
|
||||
4. Kernel Requirements
|
||||
5. Download, Documentation & Support
|
||||
|
||||
|
||||
|
||||
|
||||
1. New or Changed Features
|
||||
==========================
|
||||
|
||||
- Fixed minor warnings (will fix commandline print of excess packets for missing packets)
|
||||
- ctb slow adcs and any other adcs (other than temp) goes to the control Server
|
||||
- fixed patsetbit and patsetmask for moench
|
||||
- changed default vref of adc9257 to 2V for moench (from 1.33V)
|
||||
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
==================
|
||||
|
||||
|
||||
3. Firmware Requirements
|
||||
========================
|
||||
|
||||
Eiger
|
||||
=====
|
||||
Compatible version : 08.10.2021 (v29)
|
||||
|
||||
Jungfrau
|
||||
========
|
||||
Compatible version : 31.08.2021 (v1.2, PCB v1.0)
|
||||
: 08.10.2021 (v2.2, PCB v2.0)
|
||||
|
||||
Gotthard
|
||||
========
|
||||
Compatible version : 08.02.2018 (50um and 25um Master)
|
||||
: 09.02.2018 (25 um Slave)
|
||||
|
||||
Mythen3
|
||||
=======
|
||||
Compatible version : 10.09.2021 (v1.1)
|
||||
|
||||
Gotthard2
|
||||
=========
|
||||
Compatible version : 27.05.2021 (v0.1)
|
||||
|
||||
Moench
|
||||
======
|
||||
Compatible version : 05.10.2020 (v1.0)
|
||||
|
||||
Ctb
|
||||
===
|
||||
Compatible version : 05.10.2020 (v1.0)
|
||||
|
||||
Detector Upgrade
|
||||
================
|
||||
The following can be upgraded remotely:
|
||||
Eiger via bit files
|
||||
Jungfrau via command <.pof>
|
||||
Mythen3 via command <.rbf>
|
||||
Gotthard2 via command <.rbf>
|
||||
Moench via command <.pof>
|
||||
Ctb via command <.pof>
|
||||
|
||||
The following cannot be upgraded remotely:
|
||||
Gotthard
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
and
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
|
||||
|
||||
|
||||
4. Kernel Requirements
|
||||
======================
|
||||
|
||||
Blackfin
|
||||
========
|
||||
Latest version: Fri Oct 29 00:00:00 2021
|
||||
|
||||
Older ones will work, but might have issues with programming firmware via
|
||||
the package.
|
||||
|
||||
Nios
|
||||
====
|
||||
Compatible version: Mon May 10 18:00:21 CEST 2021
|
||||
|
||||
Kernel Upgrade
|
||||
==============
|
||||
Eiger via bit files
|
||||
Others via command
|
||||
|
||||
Commands: udpatekernel, kernelversion
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||
https://slsdetectorgroup.github.io/devdoc/detector.html
|
||||
https://slsdetectorgroup.github.io/devdoc/pydetector.html
|
||||
|
||||
|
||||
|
||||
5. Download, Documentation & Support
|
||||
====================================
|
||||
|
||||
Download
|
||||
--------
|
||||
|
||||
The Source Code:
|
||||
https://github.com/slsdetectorgroup/slsDetectorPackage
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Installation:
|
||||
https://slsdetectorgroup.github.io/devdoc/installation.html#
|
||||
|
||||
Firmware Upgrade:
|
||||
https://slsdetectorgroup.github.io/devdoc/firmware.html
|
||||
|
||||
Detector Server upgrade:
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
|
||||
Detector Simulators:
|
||||
https://slsdetectorgroup.github.io/devdoc/virtualserver.html
|
||||
|
||||
Consuming slsDetectorPackage:
|
||||
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
||||
|
||||
API Examples:
|
||||
https://github.com/slsdetectorgroup/api-examples
|
||||
|
||||
Command Line Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/commandline.html
|
||||
|
||||
Quick Start Guide:
|
||||
https://slsdetectorgroup.github.io/devdoc/quick_start_guide.html
|
||||
|
||||
C++ API Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/detector.html
|
||||
|
||||
C++ API Example:
|
||||
https://slsdetectorgroup.github.io/devdoc/examples.html#
|
||||
|
||||
Python API Documentation:
|
||||
https://slsdetectorgroup.github.io/devdoc/pygettingstarted.html
|
||||
|
||||
Python API Example:
|
||||
https://slsdetectorgroup.github.io/devdoc/pyexamples.html
|
||||
|
||||
Receivers (including custom receiver):
|
||||
https://slsdetectorgroup.github.io/devdoc/receivers.html
|
||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html
|
||||
|
||||
TroubleShooting:
|
||||
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
|
||||
|
||||
Further Documentation:
|
||||
https://www.psi.ch/en/detectors/documentation
|
||||
|
||||
Info on Releases:
|
||||
https://www.psi.ch/en/detectors/software
|
||||
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
dhanya.thattil@psi.ch
|
||||
erik.frojdh@psi.ch
|
||||
|
||||
Draft
|
||||
- dr 4, 8, 16 in eiger -> speed 0, 32 stays same (speed 1)
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Find Clang format
|
||||
if(NOT ClangFormat_BIN_NAME)
|
||||
set(ClangFormat_BIN_NAME clang-format)
|
||||
endif()
|
||||
|
||||
# if custom path check there first
|
||||
if(ClangFormat_ROOT_DIR)
|
||||
find_program(ClangFormat_BIN
|
||||
NAMES
|
||||
${ClangFormat_BIN_NAME}
|
||||
PATHS
|
||||
"${ClangFormat_ROOT_DIR}"
|
||||
NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
find_program(ClangFormat_BIN NAMES ${ClangFormat_BIN_NAME})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
ClangFormat
|
||||
DEFAULT_MSG
|
||||
ClangFormat_BIN)
|
||||
|
||||
mark_as_advanced(
|
||||
ClangFormat_BIN)
|
||||
|
||||
if(ClangFormat_FOUND)
|
||||
exec_program(${ClangFormat_BIN} ${CMAKE_CURRENT_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE CLANG_VERSION_TEXT)
|
||||
string(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+" CLANG_VERSION ${CLANG_VERSION_TEXT})
|
||||
if((${CLANG_VERSION} GREATER "9") OR (${CLANG_VERSION} EQUAL "9"))
|
||||
# A CMake script to find all source files and setup clang-format targets for them
|
||||
message(STATUS "found clang-format \"${CLANG_VERSION}\" adding formatting targets")
|
||||
include(clang-format)
|
||||
else()
|
||||
message(STATUS "clang-format version \"${CLANG_VERSION}\" found but need at least 9. Not setting up format targets")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "clang-format not found. Not setting up format targets")
|
||||
endif()
|
@ -1,6 +1,6 @@
|
||||
#Look for an executable called sphinx-build
|
||||
find_program(SPHINX_EXECUTABLE
|
||||
NAMES sphinx-build sphinx-build-3.6
|
||||
NAMES sphinx-build
|
||||
DOC "Path to sphinx-build executable")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
112
cmake/FindZeroMQ.cmake
Executable file
112
cmake/FindZeroMQ.cmake
Executable file
@ -0,0 +1,112 @@
|
||||
|
||||
# This file is originally from https://github.com/zeromq/azmq and distributed
|
||||
# under Boost Software Lincese 1.0
|
||||
# Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person or organization
|
||||
# obtaining a copy of the software and accompanying documentation covered by
|
||||
# this license (the "Software") to use, reproduce, display, distribute,
|
||||
# execute, and transmit the Software, and to prepare derivative works of the
|
||||
# Software, and to permit third-parties to whom the Software is furnished to
|
||||
# do so, all subject to the following:
|
||||
|
||||
# The copyright notices in the Software and this entire statement, including
|
||||
# the above license grant, this restriction and the following disclaimer,
|
||||
# must be included in all copies of the Software, in whole or in part, and
|
||||
# all derivative works of the Software, unless such copies or derivative
|
||||
# works are solely in the form of machine-executable object code generated by
|
||||
# a source language processor.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
# SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
# FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# Find ZeroMQ Headers/Libs
|
||||
|
||||
# Variables
|
||||
# ZMQ_ROOT - set this to a location where ZeroMQ may be found
|
||||
#
|
||||
# ZeroMQ_FOUND - True of ZeroMQ found
|
||||
# ZeroMQ_INCLUDE_DIRS - Location of ZeroMQ includes
|
||||
# ZeroMQ_LIBRARIES - ZeroMQ libraries
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if (NOT ZMQ_ROOT)
|
||||
set(ZMQ_ROOT "$ENV{ZMQ_ROOT}")
|
||||
endif()
|
||||
|
||||
if (NOT ZMQ_ROOT)
|
||||
find_path(_ZeroMQ_ROOT NAMES include/zmq.h)
|
||||
else()
|
||||
set(_ZeroMQ_ROOT "${ZMQ_ROOT}")
|
||||
endif()
|
||||
|
||||
find_path(ZeroMQ_INCLUDE_DIRS NAMES zmq.h HINTS ${_ZeroMQ_ROOT}/include)
|
||||
|
||||
if (ZeroMQ_INCLUDE_DIRS)
|
||||
set(_ZeroMQ_H ${ZeroMQ_INCLUDE_DIRS}/zmq.h)
|
||||
|
||||
function(_zmqver_EXTRACT _ZeroMQ_VER_COMPONENT _ZeroMQ_VER_OUTPUT)
|
||||
set(CMAKE_MATCH_1 "0")
|
||||
set(_ZeroMQ_expr "^[ \\t]*#define[ \\t]+${_ZeroMQ_VER_COMPONENT}[ \\t]+([0-9]+)$")
|
||||
file(STRINGS "${_ZeroMQ_H}" _ZeroMQ_ver REGEX "${_ZeroMQ_expr}")
|
||||
string(REGEX MATCH "${_ZeroMQ_expr}" ZeroMQ_ver "${_ZeroMQ_ver}")
|
||||
set(${_ZeroMQ_VER_OUTPUT} "${CMAKE_MATCH_1}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
_zmqver_EXTRACT("ZMQ_VERSION_MAJOR" ZeroMQ_VERSION_MAJOR)
|
||||
_zmqver_EXTRACT("ZMQ_VERSION_MINOR" ZeroMQ_VERSION_MINOR)
|
||||
_zmqver_EXTRACT("ZMQ_VERSION_PATCH" ZeroMQ_VERSION_PATCH)
|
||||
|
||||
message(STATUS "ZeroMQ version: ${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}.${ZeroMQ_VERSION_PATCH}")
|
||||
|
||||
# We should provide version to find_package_handle_standard_args in the same format as it was requested,
|
||||
# otherwise it can't check whether version matches exactly.
|
||||
if (ZeroMQ_FIND_VERSION_COUNT GREATER 2)
|
||||
set(ZeroMQ_VERSION "${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}.${ZeroMQ_VERSION_PATCH}")
|
||||
else()
|
||||
# User has requested ZeroMQ version without patch part => user is not interested in specific patch =>
|
||||
# any patch should be an exact match.
|
||||
set(ZeroMQ_VERSION "${ZeroMQ_VERSION_MAJOR}.${ZeroMQ_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
if (NOT ${CMAKE_CXX_PLATFORM_ID} STREQUAL "Windows")
|
||||
find_library(ZeroMQ_LIBRARIES NAMES zmq HINTS ${_ZeroMQ_ROOT}/lib)
|
||||
else()
|
||||
find_library(
|
||||
ZeroMQ_LIBRARY_RELEASE
|
||||
NAMES
|
||||
libzmq
|
||||
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
|
||||
HINTS
|
||||
${_ZeroMQ_ROOT}/lib
|
||||
)
|
||||
|
||||
find_library(
|
||||
ZeroMQ_LIBRARY_DEBUG
|
||||
NAMES
|
||||
libzmq_d
|
||||
"libzmq-${CMAKE_VS_PLATFORM_TOOLSET}-mt-gd-${ZeroMQ_VERSION_MAJOR}_${ZeroMQ_VERSION_MINOR}_${ZeroMQ_VERSION_PATCH}"
|
||||
HINTS
|
||||
${_ZeroMQ_ROOT}/lib)
|
||||
|
||||
# On Windows we have to use corresponding version (i.e. Release or Debug) of ZeroMQ because of `errno` CRT global variable
|
||||
# See more at http://www.drdobbs.com/avoiding-the-visual-c-runtime-library/184416623
|
||||
set(ZeroMQ_LIBRARIES optimized "${ZeroMQ_LIBRARY_RELEASE}" debug "${ZeroMQ_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(ZeroMQ FOUND_VAR ZeroMQ_FOUND
|
||||
REQUIRED_VARS ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES
|
||||
VERSION_VAR ZeroMQ_VERSION)
|
||||
|
||||
if (ZeroMQ_FOUND)
|
||||
mark_as_advanced(ZeroMQ_INCLUDE_DIRS ZeroMQ_LIBRARIES ZeroMQ_VERSION
|
||||
ZeroMQ_VERSION_MAJOR ZeroMQ_VERSION_MINOR ZeroMQ_VERSION_PATCH)
|
||||
endif()
|
@ -1,64 +0,0 @@
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
|
||||
function(enable_cxx_warning flag target)
|
||||
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||
check_cxx_compiler_flag(${flag} ${flag_name})
|
||||
if(${flag_name})
|
||||
target_compile_options(${target} INTERFACE ${flag})
|
||||
message(STATUS "Adding: ${flag} to ${target}")
|
||||
else()
|
||||
message(STATUS "Flag: ${flag} not supported")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(enable_c_warning flag target)
|
||||
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||
check_c_compiler_flag(${flag} ${flag_name})
|
||||
if(${flag_name})
|
||||
target_compile_options(${target} INTERFACE ${flag})
|
||||
message(STATUS "Adding: ${flag} to ${target}")
|
||||
else()
|
||||
message(STATUS "Flag: ${flag} not supported")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(disable_cxx_warning flag target)
|
||||
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||
check_cxx_compiler_flag(${flag} ${flag_name})
|
||||
|
||||
if(${flag_name})
|
||||
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
|
||||
message(STATUS "Adding: ${neg_flag} to ${target}")
|
||||
target_compile_options(${target} INTERFACE ${neg_flag})
|
||||
else()
|
||||
message(STATUS "Warning: ${flag} not supported no need to disable")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(disable_c_warning flag target)
|
||||
string(REPLACE "-W" "HAS_" flag_name ${flag})
|
||||
check_c_compiler_flag(${flag} ${flag_name})
|
||||
if(${flag_name})
|
||||
string(REPLACE "-W" "-Wno-" neg_flag ${flag})
|
||||
message(STATUS "Adding: ${neg_flag} to ${target}")
|
||||
target_compile_options(${target} INTERFACE ${neg_flag})
|
||||
else()
|
||||
message(STATUS "Warning: ${flag} not supported no need to disable")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(sls_disable_c_warning flag)
|
||||
disable_c_warning(${flag} slsProjectCSettings)
|
||||
endfunction()
|
||||
|
||||
function(sls_enable_cxx_warning flag)
|
||||
enable_cxx_warning(${flag} slsProjectWarnings)
|
||||
endfunction()
|
||||
|
||||
function(sls_disable_cxx_warning flag)
|
||||
disable_cxx_warning(${flag} slsProjectWarnings)
|
||||
endfunction()
|
@ -1,47 +0,0 @@
|
||||
# A CMake script to find all source files and setup clang-format targets for them
|
||||
|
||||
# Find all source files
|
||||
set(ClangFormat_CXX_FILE_EXTENSIONS ${ClangFormat_CXX_FILE_EXTENSIONS} *.cpp *.h *.cxx *.hxx *.hpp *.cc *.ipp *.c)
|
||||
file(GLOB_RECURSE ALL_SOURCE_FILES ${ClangFormat_CXX_FILE_EXTENSIONS})
|
||||
|
||||
# Don't include some common build folders
|
||||
set(ClangFormat_EXCLUDE_PATTERNS ${ClangFormat_EXCLUDE_PATTERNS} "/CMakeFiles/" "cmake")
|
||||
|
||||
# get all project files file
|
||||
foreach (SOURCE_FILE ${ALL_SOURCE_FILES})
|
||||
foreach (EXCLUDE_PATTERN ${ClangFormat_EXCLUDE_PATTERNS})
|
||||
string(FIND ${SOURCE_FILE} ${EXCLUDE_PATTERN} EXCLUDE_FOUND)
|
||||
if (NOT ${EXCLUDE_FOUND} EQUAL -1)
|
||||
list(REMOVE_ITEM ALL_SOURCE_FILES ${SOURCE_FILE})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
|
||||
#target for formatting soruce files
|
||||
add_custom_target(format
|
||||
COMMENT "Running clang-format to change files"
|
||||
COMMAND ${ClangFormat_BIN}
|
||||
-style=file
|
||||
-i
|
||||
${ALL_SOURCE_FILES}
|
||||
)
|
||||
|
||||
|
||||
#target to check format on source files
|
||||
add_custom_target(format-check
|
||||
COMMENT "Checking clang-format changes"
|
||||
# Use ! to negate the result for correct output
|
||||
COMMAND !
|
||||
${ClangFormat_BIN}
|
||||
-style=file
|
||||
-output-replacements-xml
|
||||
${ALL_SOURCE_FILES}
|
||||
| grep -q "replacement offset"
|
||||
)
|
||||
|
||||
# debug to check which file will be formatted
|
||||
add_custom_target(
|
||||
listformatfiles
|
||||
COMMAND
|
||||
echo ${ALL_SOURCE_FILES}
|
||||
)
|
@ -15,26 +15,17 @@ configure_package_config_file(
|
||||
write_basic_package_version_file(
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
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}
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake"
|
||||
COMPONENT devel
|
||||
DESTINATION ${CMAKE_INSTALL_DIR}/libzmq-pkg-config
|
||||
)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
|
||||
|
||||
if (PROJECT_LIBRARIES OR PROJECT_STATIC_LIBRARIES)
|
||||
install(
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
FILE ${PROJECT_NAME_LOWER}-targets.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DIR}
|
||||
)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
|
||||
endif ()
|
||||
|
@ -12,21 +12,8 @@ include(CMakeFindDependencyMacro)
|
||||
|
||||
set(SLS_USE_HDF5 "@SLS_USE_HDF5@")
|
||||
|
||||
|
||||
find_package(ZeroMQ 4 QUIET)
|
||||
# libzmq autotools install: fallback to pkg-config
|
||||
if(NOT ZeroMQ_FOUND)
|
||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config)
|
||||
find_package(ZeroMQ 4 REQUIRED)
|
||||
endif()
|
||||
|
||||
if(NOT ZeroMQ_FOUND)
|
||||
message(FATAL_ERROR "ZeroMQ was NOT found!")
|
||||
endif()
|
||||
|
||||
find_dependency(Threads)
|
||||
|
||||
# Add optional dependencies here
|
||||
find_dependency(Threads)
|
||||
if (SLS_USE_HDF5)
|
||||
find_dependency(HDF5)
|
||||
endif ()
|
||||
|
102
cmk.sh
102
cmk.sh
@ -1,9 +1,5 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
CMAKE="cmake3"
|
||||
BUILDDIR="build"
|
||||
INSTALLDIR=""
|
||||
HDF5DIR="/opt/hdf5v1.10.0"
|
||||
HDF5=0
|
||||
COMPILERTHREADS=0
|
||||
@ -15,9 +11,6 @@ PYTHON=0
|
||||
TESTS=0
|
||||
SIMULATOR=0
|
||||
CTBGUI=0
|
||||
MANUALS=0
|
||||
MANUALS_ONLY_RST=0
|
||||
MOENCHZMQ=0
|
||||
|
||||
|
||||
CLEAN=0
|
||||
@ -26,15 +19,13 @@ CMAKE_PRE=""
|
||||
CMAKE_POST=""
|
||||
|
||||
usage() { echo -e "
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [-h] [-d <HDF5 directory>] [-j] <Number of threads>
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-p: Builds/Rebuilds Python API
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-d: HDF5 Custom Directory
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-t: Build/Rebuilds only text client
|
||||
-r: Build/Rebuilds only receiver
|
||||
-g: Build/Rebuilds only gui
|
||||
@ -43,9 +34,6 @@ Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5
|
||||
-j: Number of threads to compile through
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
|
||||
Rebuild when you switch to a new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
@ -81,7 +69,7 @@ For rebuilding only certain sections
|
||||
|
||||
" ; exit 1; }
|
||||
|
||||
while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
|
||||
while getopts ":bpchd:j:trgeisu" opt ; do
|
||||
case $opt in
|
||||
b)
|
||||
echo "Building of CMake files Required"
|
||||
@ -105,14 +93,6 @@ while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
|
||||
echo "New HDF5 directory: $OPTARG"
|
||||
HDF5DIR=$OPTARG
|
||||
;;
|
||||
l)
|
||||
echo "CMake install directory: $OPTARG"
|
||||
INSTALLDIR="$OPTARG"
|
||||
;;
|
||||
k)
|
||||
echo "CMake command: $OPTARG"
|
||||
CMAKE="$OPTARG"
|
||||
;;
|
||||
j)
|
||||
echo "Number of compiler threads: $OPTARG"
|
||||
COMPILERTHREADS=$OPTARG
|
||||
@ -144,18 +124,6 @@ while getopts ":bpchd:k:l:j:trgeisumnz" opt ; do
|
||||
echo "Compiling Options: Simulator"
|
||||
SIMULATOR=1
|
||||
;;
|
||||
m)
|
||||
echo "Compiling Manuals"
|
||||
MANUALS=1
|
||||
;;
|
||||
n)
|
||||
echo "Compiling Manuals (Only RST)"
|
||||
MANUALS_ONLY_RST=1
|
||||
;;
|
||||
z)
|
||||
echo "Compiling Moench Zmq Processor"
|
||||
MOENCHZMQ=1
|
||||
;;
|
||||
u)
|
||||
echo "Compiling Options: Chip Test Gui"
|
||||
CTBGUI=1
|
||||
@ -219,8 +187,8 @@ fi
|
||||
|
||||
#Debug
|
||||
if [ $DEBUG -eq 1 ]; then
|
||||
# CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug "
|
||||
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON "
|
||||
CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug "
|
||||
# CMAKE_POST+=" -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON "
|
||||
echo "Debug Option enabled"
|
||||
fi
|
||||
|
||||
@ -230,18 +198,6 @@ if [ $SIMULATOR -eq 1 ]; then
|
||||
echo "Simulator Option enabled"
|
||||
fi
|
||||
|
||||
#Manuals
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
CMAKE_POST+=" -DSLS_BUILD_DOCS=ON "
|
||||
echo "Manuals Option enabled"
|
||||
fi
|
||||
|
||||
#Moench zmq processor
|
||||
if [ $MOENCHZMQ -eq 1 ]; then
|
||||
CMAKE_POST+=" -DSLS_USE_MOENCH=ON "
|
||||
echo "Moench Zmq Processor Option enabled"
|
||||
fi
|
||||
|
||||
#Chip Test Gui
|
||||
if [ $CTBGUI -eq 1 ]; then
|
||||
CMAKE_POST+=" -DSLS_USE_CTBGUI=ON "
|
||||
@ -266,15 +222,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
CMAKE_POST+=" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR"
|
||||
CMAKE_POST+=" -DCMAKE_FIND_ROOT_PATH=$INSTALLDIR"
|
||||
fi
|
||||
|
||||
|
||||
#enter build dir
|
||||
#pushd $BUILDDIR;
|
||||
cd $BUILDDIR;
|
||||
echo "in "$PWD
|
||||
|
||||
@ -283,7 +231,7 @@ echo "in "$PWD
|
||||
#cmake
|
||||
if [ $REBUILD -eq 1 ]; then
|
||||
rm -f CMakeCache.txt
|
||||
BUILDCOMMAND="$CMAKE_PRE $CMAKE $CMAKE_POST .."
|
||||
BUILDCOMMAND="$CMAKE_PRE cmake3 $CMAKE_POST .."
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
fi
|
||||
@ -296,45 +244,15 @@ fi
|
||||
|
||||
#make
|
||||
if [ $COMPILERTHREADS -gt 0 ]; then
|
||||
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
|
||||
BUILDCOMMAND="make -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
else
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
BUILDCOMMAND="make docs -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
else
|
||||
BUILDCOMMAND="make rst -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
fi
|
||||
fi
|
||||
BUILDCOMMAND="make -j$COMPILERTHREADS"
|
||||
echo $BUILDCOMMAND
|
||||
eval $BUILDCOMMAND
|
||||
else
|
||||
if [ $MANUALS -eq 0 ] && [ $MANUALS_ONLY_RST -eq 0 ]; then
|
||||
echo "make"
|
||||
make
|
||||
else
|
||||
if [ $MANUALS -eq 1 ]; then
|
||||
echo "make docs"
|
||||
make docs
|
||||
else
|
||||
echo "make rst"
|
||||
make rst
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#install
|
||||
if [ -n "$INSTALLDIR" ]; then
|
||||
make install
|
||||
# popd
|
||||
# $CMAKE --build $BUILDDIR --target install
|
||||
make
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
mkdir build
|
||||
mkdir install
|
||||
@ -10,15 +8,13 @@ cmake .. \
|
||||
-DSLS_USE_TEXTCLIENT=ON \
|
||||
-DSLS_USE_RECEIVER=ON \
|
||||
-DSLS_USE_GUI=ON \
|
||||
-DSLS_USE_MOENCH=ON\
|
||||
-DSLS_USE_TESTS=ON \
|
||||
-DSLS_USE_PYTHON=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSLS_USE_HDF5=OFF\
|
||||
|
||||
NCORES=$(getconf _NPROCESSORS_ONLN)
|
||||
echo "Building using: ${NCORES} cores"
|
||||
cmake --build . -- -j${NCORES}
|
||||
|
||||
cmake --build . -- -j10
|
||||
cmake --build . --target install
|
||||
|
||||
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
|
||||
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
echo "|<-------- starting python build"
|
||||
cd python
|
||||
|
@ -2,8 +2,6 @@ python:
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
- 3.9
|
||||
- 3.10
|
||||
|
||||
numpy:
|
||||
- 1.17
|
||||
- 1.17
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
mkdir $PREFIX/lib
|
||||
mkdir $PREFIX/bin
|
||||
mkdir $PREFIX/include
|
||||
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#Copy the GUI
|
||||
mkdir -p $PREFIX/bin
|
||||
cp build/install/bin/slsDetectorGui $PREFIX/bin/.
|
||||
mkdir $PREFIX/bin
|
||||
cp build/bin/slsDetectorGui $PREFIX/bin/.
|
||||
|
@ -1,22 +1,22 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
mkdir -p $PREFIX/lib
|
||||
mkdir -p $PREFIX/bin
|
||||
mkdir -p $PREFIX/include/sls
|
||||
# mkdir $PREFIX/include/slsDetectorPackage
|
||||
mkdir $PREFIX/lib
|
||||
mkdir $PREFIX/bin
|
||||
mkdir $PREFIX/include
|
||||
mkdir $PREFIX/include/slsDetectorPackage
|
||||
|
||||
#Shared and static libraries
|
||||
cp build/install/lib/* $PREFIX/lib/
|
||||
cp build/bin/libSlsDetector.so $PREFIX/lib/.
|
||||
cp build/bin/libSlsReceiver.so $PREFIX/lib/.
|
||||
cp build/bin/libSlsSupport.so $PREFIX/lib/.
|
||||
|
||||
#Binaries
|
||||
cp build/install/bin/sls_detector_acquire $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_get $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_put $PREFIX/bin/.
|
||||
cp build/install/bin/sls_detector_help $PREFIX/bin/.
|
||||
cp build/install/bin/slsReceiver $PREFIX/bin/.
|
||||
cp build/install/bin/slsMultiReceiver $PREFIX/bin/.
|
||||
cp build/bin/sls_detector_acquire $PREFIX/bin/.
|
||||
cp build/bin/sls_detector_get $PREFIX/bin/.
|
||||
cp build/bin/sls_detector_put $PREFIX/bin/.
|
||||
cp build/bin/sls_detector_help $PREFIX/bin/.
|
||||
cp build/bin/slsReceiver $PREFIX/bin/.
|
||||
cp build/bin/slsMultiReceiver $PREFIX/bin/.
|
||||
|
||||
|
||||
cp build/install/include/sls/* $PREFIX/include/sls
|
||||
cp -r build/install/share/ $PREFIX/share
|
||||
#Which headers do we need for development??
|
||||
cp build/install/include/* $PREFIX/include/slsDetectorPackage/
|
||||
# cp include/some_lib.h $PREFIX/include/.
|
@ -1,6 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#Copy the Moench executables
|
||||
mkdir -p $PREFIX/bin
|
||||
cp build/install/bin/moench04ZmqProcess $PREFIX/bin/.
|
||||
cp build/install/bin/moenchZmqProcess $PREFIX/bin/.
|
@ -1,13 +1,13 @@
|
||||
|
||||
package:
|
||||
name: sls_detector_software
|
||||
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
|
||||
version: "udp"
|
||||
|
||||
source:
|
||||
- path: ..
|
||||
|
||||
build:
|
||||
number: 0
|
||||
number: 1
|
||||
binary_relocation: True
|
||||
rpaths:
|
||||
- lib/
|
||||
@ -33,12 +33,10 @@ requirements:
|
||||
- {{ cdt('libselinux') }} # [linux]
|
||||
- {{ cdt('libxdamage') }} # [linux]
|
||||
- {{ cdt('libxxf86vm') }} # [linux]
|
||||
- expat
|
||||
|
||||
host:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- zeromq
|
||||
- xorg-libx11
|
||||
- xorg-libice
|
||||
- xorg-libxext
|
||||
@ -46,10 +44,8 @@ requirements:
|
||||
- xorg-libxau
|
||||
- xorg-libxrender
|
||||
- xorg-libxfixes
|
||||
- expat
|
||||
|
||||
run:
|
||||
- zeromq
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
|
||||
@ -59,16 +55,6 @@ outputs:
|
||||
script: copy_lib.sh
|
||||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
- zeromq
|
||||
|
||||
host:
|
||||
- zeromq
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
- libgcc-ng
|
||||
@ -88,8 +74,6 @@ outputs:
|
||||
|
||||
host:
|
||||
- python
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
|
||||
run:
|
||||
- libstdcxx-ng
|
||||
@ -106,29 +90,7 @@ outputs:
|
||||
- name: slsdetgui
|
||||
script: copy_gui.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qwt 6.*
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- qwt 6.*
|
||||
- qt 4.8.*
|
||||
- expat
|
||||
|
||||
- name: moenchzmq
|
||||
script: copy_moench.sh
|
||||
requirements:
|
||||
|
||||
build:
|
||||
- {{ compiler('c') }}
|
||||
- {{compiler('cxx')}}
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
|
||||
|
||||
run:
|
||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||
- expat
|
||||
|
@ -1,3 +1 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
ctest -j2
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
find_package(ROOT CONFIG REQUIRED COMPONENTS Core Gui)
|
||||
@ -61,12 +59,14 @@ set( HEADERS
|
||||
#set(ROOT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# ROOT dictionary generation
|
||||
include("${ROOT_DIR}/modules/RootNewMacros.cmake")
|
||||
root_generate_dictionary(ctbDict ${HEADERS} LINKDEF ctbLinkDef.h)
|
||||
add_library(ctbRootLib SHARED ctbDict.cxx)
|
||||
target_include_directories(ctbRootLib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(ctbRootLib PUBLIC
|
||||
ROOT::Core
|
||||
slsDetectorShared
|
||||
slsSupportLib
|
||||
${ROOT_LIBRARIES}
|
||||
${ROOT_EXE_LINKER_FLAGS}
|
||||
)
|
||||
@ -78,6 +78,7 @@ set_target_properties(
|
||||
|
||||
target_link_libraries(ctbGui PUBLIC
|
||||
slsDetectorShared
|
||||
slsSupportLib
|
||||
ctbRootLib
|
||||
${TIFF_LIBRARIES}
|
||||
)
|
||||
@ -85,5 +86,4 @@ target_link_libraries(ctbGui PUBLIC
|
||||
set_target_properties(ctbGui PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
|
||||
)
|
||||
|
||||
)
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
||||
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
INCS=ctbMain.h ctbDacs.h ctbPattern.h ctbSignals.h ctbAdcs.h ctbAcquisition.h ctbPowers.h ctbSlowAdcs.h
|
||||
|
242
ctbGui/ctbAcquisition.cpp
Normal file → Executable file
242
ctbGui/ctbAcquisition.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
//#define TESTADC
|
||||
|
||||
|
||||
@ -18,7 +16,6 @@
|
||||
#include <TColor.h>
|
||||
#include <TTimer.h>
|
||||
#include <TH2F.h>
|
||||
#include <TSystem.h>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
@ -28,14 +25,13 @@
|
||||
|
||||
#include "ctbAcquisition.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ctbMain.h"
|
||||
#include "moench03CtbData.h"
|
||||
//#include "moench03TCtbData.h"
|
||||
//#include "moench03T1CtbData.h"
|
||||
#include "moench03TCtbData.h"
|
||||
#include "moench03T1CtbData.h"
|
||||
#include "moench03CommonMode.h"
|
||||
#include "moench03T1ZmqDataNew.h"
|
||||
#include "moench02CtbData.h"
|
||||
//#include "jungfrau10ModuleData.h"
|
||||
#include "moenchCommonMode.h"
|
||||
@ -46,10 +42,7 @@
|
||||
#include "moench04CtbZmqData.h"
|
||||
#include "moench04CtbZmq10GbData.h"
|
||||
#include "deserializer.h"
|
||||
#include "sls/detectorData.h"
|
||||
#include "imageZmq16bit.h"
|
||||
#include "imageZmq32bit.h"
|
||||
|
||||
#include "detectorData.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -239,10 +232,7 @@ hframe=new TGHorizontalFrame(this, 800,50);
|
||||
cbDetType->AddEntry("MOENCH02", MOENCH02);
|
||||
cbDetType->AddEntry("MOENCH04", MOENCH04);
|
||||
// cbDetType->AddEntry("JUNGFRAU1.0", 2);
|
||||
cbDetType->AddEntry("MOENCH03",MOENCH03);
|
||||
cbDetType->AddEntry("IMAGE32BIT",IMAGE32B);
|
||||
cbDetType->AddEntry("IMAGE16BIT",IMAGE16B);
|
||||
|
||||
//cbDetType->AddEntry("MOENCH03 T", iiii++);
|
||||
//cbDetType->AddEntry("MOENCH03", iiii++);
|
||||
// cbDetType->AddEntry("MYTHEN3 0.1", MYTHEN301);
|
||||
// cbDetType->AddEntry("ADCSAR2", ADCSAR2);
|
||||
@ -281,7 +271,7 @@ hframe=new TGHorizontalFrame(this, 800,50);
|
||||
|
||||
|
||||
|
||||
// cout << "off "<< endl;
|
||||
cout << "off "<< endl;
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,50);
|
||||
@ -300,8 +290,8 @@ hframe=new TGHorizontalFrame(this, 800,50);
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,0,16535);
|
||||
hframe->AddFrame(eSerOff,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
eSerOff->MapWindow();
|
||||
eSerOff->SetNumber(0);
|
||||
eSerOff->MapWindow();;
|
||||
eSerOff->SetNumber(5);
|
||||
e= eSerOff->TGNumberEntry::GetNumberEntry();
|
||||
eSerOff->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeSerialOffset(Long_t)");
|
||||
e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeSerialOffset()");
|
||||
@ -347,53 +337,6 @@ hframe=new TGHorizontalFrame(this, 800,50);
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,50);
|
||||
AddFrame(hframe,new TGLayoutHints(kLHintsTop | kLHintsExpandX , 10,10,10,10));
|
||||
hframe->MapWindow();
|
||||
|
||||
|
||||
|
||||
label=new TGLabel(hframe,"Image Pixels");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextLeft);
|
||||
|
||||
|
||||
label=new TGLabel(hframe,"X: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextRight);
|
||||
|
||||
|
||||
ePixX=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,0,16535);
|
||||
hframe->AddFrame(ePixX,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
ePixX->MapWindow();
|
||||
ePixX->SetNumber(400);
|
||||
e= ePixX->TGNumberEntry::GetNumberEntry();
|
||||
ePixX->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeImagePixels(Long_t)");
|
||||
e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeImagePixels()");
|
||||
|
||||
|
||||
|
||||
label=new TGLabel(hframe,"Y: ");
|
||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 5, 5, 5, 5));
|
||||
label->MapWindow();
|
||||
label->SetTextJustify(kTextRight);
|
||||
|
||||
|
||||
ePixY=new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||
TGNumberFormat::kNEANonNegative,
|
||||
TGNumberFormat::kNELLimitMinMax,0,16535);
|
||||
hframe->AddFrame(ePixY,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||
ePixY->MapWindow();
|
||||
ePixY->SetNumber(400);
|
||||
e= ePixY->TGNumberEntry::GetNumberEntry();
|
||||
ePixY->Connect("ValueSet(Long_t)","ctbAcquisition",this,"ChangeImagePixels(Long_t)");
|
||||
e->Connect("ReturnPressed()","ctbAcquisition",this,"ChangeImagePixels()");
|
||||
|
||||
|
||||
|
||||
|
||||
hframe=new TGHorizontalFrame(this, 800,50);
|
||||
@ -666,10 +609,8 @@ hframe=new TGHorizontalFrame(this, 800,50);
|
||||
cout <<"Registering data callback" << endl;
|
||||
try {
|
||||
myDet->registerDataCallback(&dataCallback, (void*)this);
|
||||
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition")
|
||||
try {
|
||||
myDet->setRxZmqDataStream(true);
|
||||
} CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
|
||||
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition")
|
||||
|
||||
cout <<"Done" << endl;
|
||||
|
||||
// mgAdcs=new TMultiGraph();
|
||||
@ -891,7 +832,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
||||
|
||||
// cout <<"global plot is " << globalPlot << endl;
|
||||
// cout << "*******************************************" <<endl;
|
||||
cout <<"------Plot: "<< index << " prog:" << data->progressIndex << " nx:" << data->nx << " ny: " << data->ny << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl;
|
||||
// cout <<"------Plot: "<< index << " prog:" << data->progressIndex << " npoints:" << data->npoints << " npy: " << data->npy << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl;
|
||||
if (globalPlot || cbGetPedestal->IsOn()) {
|
||||
//#ifdef TESTADC
|
||||
// cout <<"------"<< index << " " << ip << " " << data->npoints << endl;
|
||||
@ -918,11 +859,6 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
||||
nx=eNumCount->GetIntNumber();
|
||||
dr=eDynRange->GetIntNumber();
|
||||
soff=eSerOff->GetIntNumber();
|
||||
// cout <<"deserializer: " << endl;
|
||||
// cout << "Number of chans:\t" << nx << endl;
|
||||
// cout << "Serial Offset:\t" << soff << endl;
|
||||
// cout << "Dynamic range:\t" << dr << endl;
|
||||
|
||||
}
|
||||
|
||||
i=0;
|
||||
@ -987,8 +923,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
||||
for (int y=0; y<ny; y++) {
|
||||
ped=0;
|
||||
aval=dataStructure->getValue(data->data,x,y);
|
||||
//aval=dataStructure->getChannel(data->data,x,y);
|
||||
cout << x << " " <<y << " "<< aval << endl;
|
||||
|
||||
if (cbGetPedestal->IsOn()) {
|
||||
if (photonFinder) {
|
||||
photonFinder->addToPedestal(aval,x,y);
|
||||
@ -1159,20 +1094,8 @@ void ctbAcquisition::Draw(){
|
||||
void ctbAcquisition::changePlot(){
|
||||
if (rbPlotOff->IsOn()) {
|
||||
adcPlot=0;
|
||||
dbitPlot=0;
|
||||
try {
|
||||
myDet->registerDataCallback(nullptr, this);
|
||||
} CATCH_DISPLAY ("Could not get unregister call back.", "ctbAcquisition::ctbAcquisition")
|
||||
try {
|
||||
myDet->setRxZmqDataStream(false);
|
||||
} CATCH_DISPLAY ("Could not get unset RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
|
||||
dbitPlot=0;
|
||||
} else {
|
||||
try {
|
||||
myDet->registerDataCallback(&dataCallback, (void*)this);
|
||||
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition")
|
||||
try {
|
||||
myDet->setRxZmqDataStream(true);
|
||||
} CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
|
||||
adcPlot=0;
|
||||
dbitPlot=0;
|
||||
for (int ii=0; ii<NADCS; ii++)
|
||||
@ -1277,9 +1200,6 @@ void ctbAcquisition::changeDetector(){
|
||||
eNumCount->SetState(kFALSE);
|
||||
eDynRange->SetState(kFALSE);
|
||||
eSerOff->SetState(kFALSE);
|
||||
ePixX->SetState(kFALSE);
|
||||
ePixY->SetState(kFALSE);
|
||||
|
||||
deserializer=0;
|
||||
if (rb2D->IsOn() ) {//|| rbScan->IsOn()
|
||||
switch (cbDetType->GetSelected()) {
|
||||
@ -1290,6 +1210,7 @@ void ctbAcquisition::changeDetector(){
|
||||
// commonMode=new moench03CommonMode();
|
||||
break;
|
||||
case MOENCH04:
|
||||
|
||||
try {
|
||||
auto retval = myDet->getTenGiga().tsquash("Different values");
|
||||
if (retval) {
|
||||
@ -1302,54 +1223,6 @@ void ctbAcquisition::changeDetector(){
|
||||
cout << "MOENCH 0.4!" << endl;
|
||||
commonMode=new moench03CommonMode();
|
||||
break;
|
||||
case MOENCH03:
|
||||
//try {
|
||||
// auto retval = myDet->getTenGiga().tsquash("Different values");
|
||||
// if (retval) {
|
||||
dataStructure=new moench03T1ZmqDataNew(nAnalogSamples);
|
||||
// } else {
|
||||
// dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples);
|
||||
// }
|
||||
//} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector")
|
||||
|
||||
cout << "MOENCH 0.3! USE JUNGFRAU MODULE!" << endl;
|
||||
commonMode=new moench03CommonMode();
|
||||
break;
|
||||
case IMAGE32B:
|
||||
//try {
|
||||
// auto retval = myDet->getTenGiga().tsquash("Different values");
|
||||
// if (retval) {
|
||||
// if (deserializer) {
|
||||
ePixX->SetState(kTRUE);
|
||||
ePixY->SetState(kTRUE);
|
||||
// }
|
||||
dataStructure=new imageZmq32bit(ePixX->GetIntNumber(),ePixY->GetIntNumber());
|
||||
// } else {
|
||||
// dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples);
|
||||
// }
|
||||
//} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector")
|
||||
|
||||
cout << "Image 32bit, no channel shuffling" << endl;
|
||||
commonMode=NULL;
|
||||
break;
|
||||
|
||||
case IMAGE16B:
|
||||
//try {
|
||||
// auto retval = myDet->getTenGiga().tsquash("Different values");
|
||||
// if (retval) {
|
||||
// if (deserializer) {
|
||||
ePixX->SetState(kTRUE);
|
||||
ePixY->SetState(kTRUE);
|
||||
// }
|
||||
dataStructure=new imageZmq16bit(ePixX->GetIntNumber(),ePixY->GetIntNumber());
|
||||
// } else {
|
||||
// dataStructure=new moench04CtbZmqData(nAnalogSamples, nDigitalSamples);
|
||||
// }
|
||||
//} CATCH_DISPLAY ("Could not get ten giga enable.", "ctbAcquisition::changeDetector")
|
||||
|
||||
cout << "Image 16bit, no channel shuffling" << endl;
|
||||
commonMode=NULL;
|
||||
break;
|
||||
|
||||
// case 1:
|
||||
// cout << "************** T!!!!!!!!!!" << endl;
|
||||
@ -1413,7 +1286,6 @@ void ctbAcquisition::changeDetector(){
|
||||
photonFinder=new singlePhotonDetector(dataStructure,csize,nsigma,1,cm); //sign is positive - should correct with ADC mask, no common mode
|
||||
//photonFinder=new singlePhotonDetector(dataStructure,csize,nsigma,1,cm); //sign is positive - should correct with ADC mask, no common mode
|
||||
dataStructure->getDetectorSize(nx,ny);
|
||||
|
||||
}
|
||||
if (deserializer) {
|
||||
ny=1;
|
||||
@ -1639,23 +1511,20 @@ void ctbAcquisition::update() {
|
||||
|
||||
if (dataStructure) {
|
||||
cout << cbDetType->GetSelected()<< endl;
|
||||
// if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){
|
||||
// cout << "settings deserialiation parameters for MYTHEN" << endl;
|
||||
// mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure;
|
||||
// eSerOff->SetNumber( ms->setSerialOffset(-1));
|
||||
// eDynRange->SetNumber( ms->setDynamicRange(-1));
|
||||
// eNumCount->SetNumber( ms->setNumberOfCounters(-1));
|
||||
// }
|
||||
if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){
|
||||
cout << "settings deserialiation parameters for MYTHEN" << endl;
|
||||
mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure;
|
||||
eSerOff->SetNumber( ms->setSerialOffset(-1));
|
||||
eDynRange->SetNumber( ms->setDynamicRange(-1));
|
||||
eNumCount->SetNumber( ms->setNumberOfCounters(-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
dBitOffset = 0;
|
||||
} else {
|
||||
try {
|
||||
dBitOffset = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::update")
|
||||
}
|
||||
try {
|
||||
dBitOffset = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::update")
|
||||
|
||||
try {
|
||||
tenG = myDet->getTenGiga().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get ten giga enable", "ctbAcquisition::update")
|
||||
@ -1741,13 +1610,9 @@ void ctbAcquisition::toggleAcquisition() {
|
||||
setDigitalSamples(retval);
|
||||
} CATCH_DISPLAY ("Could not get number of digital samples", "ctbAcquisition::toggleAcquisition")
|
||||
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
dBitOffset = 0;
|
||||
} else {
|
||||
try {
|
||||
dBitOffset = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::toggleAcquisition")
|
||||
}
|
||||
dBitOffset = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset", "ctbAcquisition::toggleAcquisition")
|
||||
|
||||
try {
|
||||
roMode = static_cast<int>(myDet->getReadoutMode().tsquash("Different values"));
|
||||
@ -1984,18 +1849,14 @@ void ctbAcquisition::setDbitEnable(Int_t reg){
|
||||
void ctbAcquisition::updateChans() {
|
||||
|
||||
// dbit list
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
try {
|
||||
auto retval = myDet->getRxDbitList().tsquash("Different values");
|
||||
dbitlist.clear();
|
||||
} else {
|
||||
try {
|
||||
auto retval = myDet->getRxDbitList().tsquash("Different values");
|
||||
dbitlist.clear();
|
||||
if (!retval.empty()) {
|
||||
for (const auto &value : retval)
|
||||
dbitlist.push_back(value);
|
||||
}
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbAcquisition::updateChans")
|
||||
}
|
||||
if (!retval.empty()) {
|
||||
for (const auto &value : retval)
|
||||
dbitlist.push_back(value);
|
||||
}
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbAcquisition::updateChans")
|
||||
|
||||
// adc mask
|
||||
try {
|
||||
@ -2116,22 +1977,20 @@ void ctbAcquisition::ChangeNumberOfChannels(Long_t a){
|
||||
|
||||
|
||||
void ctbAcquisition::ChangeSerialOffset(){
|
||||
changeDetector();
|
||||
// if (dataStructure) {
|
||||
|
||||
// cout << cbDetType->GetSelected()<< endl;
|
||||
// if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302 ){
|
||||
// cout << "settings offsets for MYTHEN" << endl;
|
||||
// mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure;
|
||||
// ms->setSerialOffset(eSerOff->GetIntNumber());
|
||||
// // cout << cbDetType->GetSelected()<< endl;
|
||||
// // if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302 ){
|
||||
// // cout << "settings offsets for MYTHEN" << endl;
|
||||
// // mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure;
|
||||
// // ms->setSerialOffset(eSerOff->GetIntNumber());
|
||||
|
||||
// }
|
||||
// // }
|
||||
// }
|
||||
};
|
||||
|
||||
|
||||
void ctbAcquisition::ChangeDynamicRange(){
|
||||
changeDetector();
|
||||
// if (dataStructure) {
|
||||
|
||||
// cout << cbDetType->GetSelected()<< endl;
|
||||
@ -2145,7 +2004,6 @@ void ctbAcquisition::ChangeDynamicRange(){
|
||||
};
|
||||
|
||||
void ctbAcquisition::ChangeNumberOfChannels(){
|
||||
changeDetector();
|
||||
// if (dataStructure) {
|
||||
// cout << cbDetType->GetSelected()<< endl;
|
||||
// if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){
|
||||
@ -2159,24 +2017,6 @@ void ctbAcquisition::ChangeNumberOfChannels(){
|
||||
changePlot();
|
||||
};
|
||||
|
||||
void ctbAcquisition::ChangeImagePixels(Long_t a){
|
||||
ChangeImagePixels();
|
||||
};
|
||||
|
||||
void ctbAcquisition::ChangeImagePixels(){
|
||||
changeDetector();
|
||||
// if (dataStructure) {
|
||||
// cout << cbDetType->GetSelected()<< endl;
|
||||
// if (cbDetType->GetSelected()==MYTHEN301 || cbDetType->GetSelected()==MYTHEN302){
|
||||
// cout << "settings number of channels for MYTHEN" << endl;
|
||||
// mythen3_01_jctbData* ms=(mythen3_01_jctbData*)dataStructure;
|
||||
// ms->setNumberOfCounters(eNumCount->GetIntNumber());
|
||||
|
||||
// }
|
||||
// }
|
||||
// if (deserializer)
|
||||
// changePlot();
|
||||
};
|
||||
|
||||
|
||||
void ctbAcquisition::ChangeHistoLimitsPedSub(Long_t a){
|
||||
|
10
ctbGui/ctbAcquisition.h
Normal file → Executable file
10
ctbGui/ctbAcquisition.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef CTBACQUISITION_H
|
||||
#define CTBACQUISITION_H
|
||||
#include <TGFrame.h>
|
||||
@ -44,7 +42,7 @@ using namespace std;
|
||||
class ctbAcquisition : public TGGroupFrame {
|
||||
|
||||
|
||||
enum {DESERIALIZER, MOENCH04, MOENCH02, MOENCH03, IMAGE32B, IMAGE16B, ADCSAR2, MYTHEN301, MYTHEN302};
|
||||
enum {DESERIALIZER, MOENCH04, MOENCH02, ADCSAR2, MYTHEN301, MYTHEN302};
|
||||
|
||||
|
||||
private:
|
||||
@ -59,9 +57,6 @@ class ctbAcquisition : public TGGroupFrame {
|
||||
TGNumberEntry *eNumCount;
|
||||
|
||||
|
||||
TGNumberEntry *ePixX;
|
||||
TGNumberEntry *ePixY;
|
||||
|
||||
TGNumberEntry *eFitADC;
|
||||
TGNumberEntry *eBitPlot;
|
||||
TGNumberEntry *eMinRaw;
|
||||
@ -236,8 +231,7 @@ class ctbAcquisition : public TGGroupFrame {
|
||||
void ChangeNumberOfChannels(Long_t);
|
||||
void ChangeDynamicRange();
|
||||
void ChangeDynamicRange(Long_t);
|
||||
void ChangeImagePixels();
|
||||
void ChangeImagePixels(Long_t);
|
||||
|
||||
|
||||
void canvasClicked();
|
||||
void FitADC();
|
||||
|
4
ctbGui/ctbAdcs.cpp
Normal file → Executable file
4
ctbGui/ctbAdcs.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
@ -27,7 +25,7 @@
|
||||
|
||||
#include "ctbAdcs.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "Detector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
2
ctbGui/ctbAdcs.h
Normal file → Executable file
2
ctbGui/ctbAdcs.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
|
||||
|
33
ctbGui/ctbDacs.cpp
Normal file → Executable file
33
ctbGui/ctbDacs.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
@ -12,8 +10,8 @@
|
||||
|
||||
#include "ctbDacs.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -110,26 +108,15 @@ string ctbDac::getLabel() {
|
||||
|
||||
}
|
||||
|
||||
int ctbDac::getMoenchDacId() {
|
||||
slsDetectorDefs::dacIndex moenchDacIndices[8] = {slsDetectorDefs::VBP_COLBUF, slsDetectorDefs::VIPRE, slsDetectorDefs::VIN_CM, slsDetectorDefs::VB_SDA, slsDetectorDefs::VCASC_SFP, slsDetectorDefs::VOUT_CM, slsDetectorDefs::VIPRE_CDS, slsDetectorDefs::IBIAS_SFP};
|
||||
|
||||
if (id >= 8) {
|
||||
return id;
|
||||
}
|
||||
return static_cast<int>(moenchDacIndices[id]);
|
||||
}
|
||||
|
||||
void ctbDac::setValue(Long_t a) {setValue();}
|
||||
|
||||
void ctbDac::setValue() {
|
||||
|
||||
cout << "setting dac! "<< id << " value " << dacsEntry->GetIntNumber() << " units " << dacsUnit->IsOn() << endl;
|
||||
|
||||
try {
|
||||
int sid = id;
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
sid = getMoenchDacId();
|
||||
}
|
||||
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(sid), dacsEntry->GetIntNumber(), dacsUnit->IsOn());
|
||||
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(id), dacsEntry->GetIntNumber(), dacsUnit->IsOn());
|
||||
} CATCH_DISPLAY ("Could not set dac " + to_string(id) + ".", "ctbDac::setValue")
|
||||
|
||||
getValue();
|
||||
@ -141,11 +128,7 @@ void ctbDac::setOn(Bool_t b) {
|
||||
setValue();
|
||||
} else {
|
||||
try {
|
||||
int sid = id;
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
sid = getMoenchDacId();
|
||||
}
|
||||
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(sid), -100, false);
|
||||
myDet->setDAC(static_cast<slsDetectorDefs::dacIndex>(id), -100, false);
|
||||
} CATCH_DISPLAY ("Could not power off dac " + to_string(id) + ".", "ctbDac::setOn")
|
||||
}
|
||||
getValue();
|
||||
@ -153,11 +136,7 @@ void ctbDac::setOn(Bool_t b) {
|
||||
|
||||
int ctbDac::getValue() {
|
||||
try {
|
||||
int sid = id;
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
sid = getMoenchDacId();
|
||||
}
|
||||
int val = myDet->getDAC(static_cast<slsDetectorDefs::dacIndex>(sid), dacsUnit->IsOn()).tsquash("Different values");
|
||||
int val = myDet->getDAC(static_cast<slsDetectorDefs::dacIndex>(id), dacsUnit->IsOn()).tsquash("Different values");
|
||||
cout << "dac " << id << " " << val << endl;
|
||||
dacsValue->SetText(to_string(val).c_str());
|
||||
if (val >= 0) {
|
||||
|
6
ctbGui/ctbDacs.h
Normal file → Executable file
6
ctbGui/ctbDacs.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
#ifndef CTBDACS_H
|
||||
@ -47,7 +45,7 @@ class ctbDac : public TGHorizontalFrame {
|
||||
|
||||
int setLabel(char *tit, int mv);
|
||||
string getLabel();
|
||||
int getMoenchDacId();
|
||||
|
||||
|
||||
|
||||
ClassDef(ctbDac,0)
|
||||
@ -56,6 +54,8 @@ int getMoenchDacId();
|
||||
class ctbDacs : public TGGroupFrame {
|
||||
private:
|
||||
|
||||
|
||||
|
||||
ctbDac *dacs[NDACS+2];
|
||||
|
||||
sls::Detector* myDet;
|
||||
|
12
ctbGui/ctbDefs.h
Normal file → Executable file
12
ctbGui/ctbDefs.h
Normal file → Executable file
@ -1,13 +1,11 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <chrono>
|
||||
|
||||
//#include "sls/sls_detector_exceptions.h"
|
||||
//#include "sls/ansi.h"
|
||||
//#include "sls_detector_exceptions.h"
|
||||
//#include "ansi.h"
|
||||
#define RED "\x1b[31m"
|
||||
#define RESET "\x1b[0m"
|
||||
#define BOLD "\x1b[1m"
|
||||
@ -73,14 +71,14 @@ class ctbDefs {
|
||||
std::string exceptionMessage,
|
||||
std::string source) {
|
||||
// because sls_detector_exceptions cannot be included
|
||||
if (exceptionMessage.find("hared memory") != std::string::npos) {
|
||||
if (exceptionMessage.find("hared memory")) {
|
||||
throw;
|
||||
}
|
||||
if (exceptionMessage.find("annot connect") != std::string::npos) {
|
||||
if (exceptionMessage.find("annot connect")) {
|
||||
throw;
|
||||
}
|
||||
cprintf(RED, "Warning (%s): %s [Caught Exception: %s]\n", source.c_str(), message.c_str(), exceptionMessage.c_str());
|
||||
//return Message(qDefs::WARNING, message + std::string("\nCaught exception:\n") + exceptionMessage, source);
|
||||
};
|
||||
|
||||
};
|
||||
};
|
6
ctbGui/ctbGui.cpp
Normal file → Executable file
6
ctbGui/ctbGui.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TApplication.h>
|
||||
#include <TColor.h>
|
||||
|
||||
@ -11,8 +9,8 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
//#include "sls_receiver_defs.h"
|
||||
#include "ctbMain.h"
|
||||
#include "ctbDefs.h"
|
||||
|
2
ctbGui/ctbLinkDef.h
Normal file → Executable file
2
ctbGui/ctbLinkDef.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#pragma link C++ class ctbMain;
|
||||
#pragma link C++ class ctbDacs;
|
||||
#pragma link C++ class ctbDac;
|
||||
|
10
ctbGui/ctbMain.cpp
Normal file → Executable file
10
ctbGui/ctbMain.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
@ -36,7 +34,7 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "sls/Detector.h"
|
||||
#include "Detector.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "ctbMain.h"
|
||||
#include "ctbDacs.h"
|
||||
@ -261,10 +259,8 @@ ctbMain::ctbMain(const TGWindow *p, sls::Detector *det)
|
||||
|
||||
cout << "connect mtab" << endl;
|
||||
|
||||
try{
|
||||
setReadoutMode(pat->getReadoutMode());
|
||||
} CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode")
|
||||
|
||||
|
||||
setReadoutMode(pat->getReadoutMode());
|
||||
setADCEnable(adcs->setEnable());
|
||||
setAnalogSamples(pat->getAnalogSamples());
|
||||
setDigitalSamples(pat->getDigitalSamples());
|
||||
|
2
ctbGui/ctbMain.h
Normal file → Executable file
2
ctbGui/ctbMain.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef CTBMAIN_H
|
||||
#define CTBMAIN_H
|
||||
#include <TGFrame.h>
|
||||
|
81
ctbGui/ctbPattern.cpp
Normal file → Executable file
81
ctbGui/ctbPattern.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
@ -27,7 +25,7 @@
|
||||
|
||||
#include "ctbPattern.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "Detector.h"
|
||||
#include <chrono>
|
||||
using namespace std;
|
||||
|
||||
@ -1037,42 +1035,33 @@ void ctbPattern::readoutModeChanged(int flags) {
|
||||
|
||||
}
|
||||
|
||||
int ctbPattern::getReadoutMode() {
|
||||
int retval=slsDetectorDefs::ANALOG_ONLY;
|
||||
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) {
|
||||
try{
|
||||
retval = myDet->getReadoutMode().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode")
|
||||
|
||||
switch(retval) {
|
||||
case slsDetectorDefs::ANALOG_AND_DIGITAL:
|
||||
cout << "analog and digital" << endl;
|
||||
cbAnalog->SetOn(kTRUE);
|
||||
cbDigital->SetOn(kTRUE);
|
||||
break;
|
||||
case slsDetectorDefs::DIGITAL_ONLY:
|
||||
cout << "digital only" << endl;
|
||||
cbAnalog->SetOn(kFALSE);
|
||||
cbDigital->SetOn(kTRUE);
|
||||
break;
|
||||
case slsDetectorDefs::ANALOG_ONLY:
|
||||
cout << "analog only" << endl;
|
||||
cbAnalog->SetOn(kTRUE);
|
||||
cbDigital->SetOn(kFALSE);
|
||||
break;
|
||||
default:
|
||||
throw("unknown readout flag");
|
||||
}
|
||||
} else {
|
||||
cbAnalog->SetOn(kTRUE);
|
||||
cbDigital->SetOn(kFALSE);
|
||||
}
|
||||
|
||||
int ctbPattern::getReadoutMode() {
|
||||
try{
|
||||
auto retval = myDet->getReadoutMode().tsquash("Different values");
|
||||
switch(retval) {
|
||||
case slsDetectorDefs::ANALOG_AND_DIGITAL:
|
||||
cout << "analog and digital" << endl;
|
||||
cbAnalog->SetOn(kTRUE);
|
||||
cbDigital->SetOn(kTRUE);
|
||||
break;
|
||||
case slsDetectorDefs::DIGITAL_ONLY:
|
||||
cout << "digital only" << endl;
|
||||
cbAnalog->SetOn(kFALSE);
|
||||
cbDigital->SetOn(kTRUE);
|
||||
break;
|
||||
case slsDetectorDefs::ANALOG_ONLY:
|
||||
cout << "analog only" << endl;
|
||||
cbAnalog->SetOn(kTRUE);
|
||||
cbDigital->SetOn(kFALSE);
|
||||
break;
|
||||
default:
|
||||
throw("unknown readout flag");
|
||||
}
|
||||
Emit("readoutModeChanged(int)",static_cast<int>(retval));
|
||||
return retval;
|
||||
|
||||
|
||||
} CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode")
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ctbPattern::getAnalogSamples() {
|
||||
@ -1086,17 +1075,13 @@ int ctbPattern::getAnalogSamples() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ctbPattern::getDigitalSamples() {
|
||||
int retval=0;
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) {
|
||||
try{
|
||||
auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values");
|
||||
} CATCH_DISPLAY ("Could not get number of digital samples.", "ctbPattern::getDigitalSamples")
|
||||
}
|
||||
eDigitalSamples->SetNumber((Double_t)retval);
|
||||
Emit("digitalSamplesChanged(const int)", eDigitalSamples->GetNumber());
|
||||
return eDigitalSamples->GetNumber();
|
||||
|
||||
int ctbPattern::getDigitalSamples() {
|
||||
try{
|
||||
auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values");
|
||||
eDigitalSamples->SetNumber((Double_t)retval);
|
||||
Emit("digitalSamplesChanged(const int)", eDigitalSamples->GetNumber());
|
||||
return eDigitalSamples->GetNumber();
|
||||
} CATCH_DISPLAY ("Could not get number of triggers.", "ctbPattern::update")
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
2
ctbGui/ctbPattern.h
Normal file → Executable file
2
ctbGui/ctbPattern.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef CTBPATTERN_H
|
||||
#define CTBPATTERN_H
|
||||
#include <TGFrame.h>
|
||||
|
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TGFrame.h>
|
||||
|
||||
|
||||
@ -15,8 +13,8 @@
|
||||
#include "ctbDefs.h"
|
||||
#include "ctbDacs.h"
|
||||
#include "ctbPowers.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef CTBPOWERS_H
|
||||
#define CTBPOWERS_H
|
||||
|
||||
|
58
ctbGui/ctbSignals.cpp
Normal file → Executable file
58
ctbGui/ctbSignals.cpp
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#include <TApplication.h>
|
||||
#include <TGClient.h>
|
||||
#include <TCanvas.h>
|
||||
@ -37,7 +35,7 @@
|
||||
|
||||
#include "ctbSignals.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "Detector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -376,43 +374,33 @@ void ctbSignals::update() {
|
||||
|
||||
} CATCH_DISPLAY ("Could not get patternIOcontrol.", "ctbSignals::update")
|
||||
|
||||
if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) {
|
||||
try {
|
||||
|
||||
auto dbitlist = myDet->getRxDbitList().tsquash("Different values");
|
||||
// enable all
|
||||
for (int is=0; is<64; is++) {
|
||||
signals[is]->setDbitList(1);
|
||||
}
|
||||
eDbitOffset->SetNumber(0);
|
||||
}
|
||||
|
||||
// ctb
|
||||
else {
|
||||
try {
|
||||
|
||||
auto dbitlist = myDet->getRxDbitList().tsquash("Different values");
|
||||
// enable all
|
||||
if (dbitlist.empty()) {
|
||||
for (int is=0; is<64; is++) {
|
||||
signals[is]->setDbitList(1);
|
||||
}
|
||||
if (dbitlist.empty()) {
|
||||
for (int is=0; is<64; is++) {
|
||||
signals[is]->setDbitList(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// disable all
|
||||
for (int is=0; is<64; is++) {
|
||||
signals[is]->setDbitList(0);
|
||||
}
|
||||
else {
|
||||
// disable all
|
||||
for (int is=0; is<64; is++) {
|
||||
signals[is]->setDbitList(0);
|
||||
}
|
||||
// enable selected
|
||||
for (const auto &value : dbitlist) {
|
||||
signals[value]->setDbitList(1);
|
||||
}
|
||||
// enable selected
|
||||
for (const auto &value : dbitlist) {
|
||||
signals[value]->setDbitList(1);
|
||||
}
|
||||
}
|
||||
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbSignals::update")
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit list.", "ctbSignals::update")
|
||||
|
||||
try {
|
||||
auto val = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
eDbitOffset->SetNumber(val);
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset.", "ctbSignals::update")
|
||||
|
||||
try {
|
||||
auto val = myDet->getRxDbitOffset().tsquash("Different values");
|
||||
eDbitOffset->SetNumber(val);
|
||||
} CATCH_DISPLAY ("Could not get receiver dbit offset.", "ctbSignals::update")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
2
ctbGui/ctbSignals.h
Normal file → Executable file
2
ctbGui/ctbSignals.h
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
#ifndef CTBSIGNALS_H
|
||||
#define CTBSIGNALS_H
|
||||
#include <TGFrame.h>
|
||||
|
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
@ -12,8 +10,8 @@
|
||||
|
||||
#include "ctbSlowAdcs.h"
|
||||
#include "ctbDefs.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
|
||||
#ifndef CTBSLOWADCS_H
|
||||
|
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Wrong number of arguments: usage should be $0 patname"
|
||||
exit 1
|
||||
@ -23,7 +21,6 @@ if [ -f "$infile" ]
|
||||
then
|
||||
gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
||||
echo compiling
|
||||
echo gcc -DINFILE="\"$infile\"" -DOUTFILE="\"$outfile\"" -DOUTFILEBIN="\"$outfilebin\"" -o $exe generator.c ;
|
||||
$exe ;
|
||||
echo cleaning
|
||||
rm $exe
|
||||
|
8
ctbGui/patternGenerator/generator.c
Normal file → Executable file
8
ctbGui/patternGenerator/generator.c
Normal file → Executable file
@ -1,5 +1,3 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
/****************************************************************************
|
||||
usage to generate a patter test.pat from test.p
|
||||
|
||||
@ -69,14 +67,14 @@ void setoutput(int bit) {
|
||||
mask=mask<<bit;
|
||||
iopat |= mask;
|
||||
}
|
||||
/*
|
||||
|
||||
void setclk(int bit) {
|
||||
uint64_t mask=1;
|
||||
mask=mask<<bit;
|
||||
iopat |= mask;
|
||||
clkpat |= mask;
|
||||
}
|
||||
*/
|
||||
|
||||
void clearbit(int bit){
|
||||
uint64_t mask=1;
|
||||
mask=mask<<bit;
|
||||
@ -157,7 +155,7 @@ main(void) {
|
||||
#include INFILE
|
||||
|
||||
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
|
||||
//fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
||||
fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
||||
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
|
||||
|
||||
for (iloop=0; iloop<MAXLOOPS; iloop++) {
|
||||
|
@ -1,100 +1,69 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
find_package(Doxygen REQUIRED)
|
||||
find_package(Sphinx REQUIRED)
|
||||
find_package(Doxygen)
|
||||
find_package(Sphinx)
|
||||
|
||||
|
||||
if (DOXYGEN_FOUND AND SPHINX_FOUND)
|
||||
message(${CMAKE_PROJECT_SORURCE_DIR}/slsDetectorSoftware/src)
|
||||
# Utility to generate command line documentation
|
||||
add_executable(gendoc src/gendoc.cpp)
|
||||
# This is a bit hacky, but better than exposing stuff?
|
||||
target_include_directories(gendoc PRIVATE ${PROJECT_SOURCE_DIR}/slsDetectorSoftware/src)
|
||||
target_link_libraries(gendoc PRIVATE
|
||||
slsDetectorShared
|
||||
)
|
||||
set_target_properties(gendoc PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
# Utility to generate command line documentation
|
||||
add_executable(gendoc src/gendoc.cpp)
|
||||
# This is a bit hacky, but better than exposing stuff?
|
||||
target_include_directories(gendoc PRIVATE ${PROJECT_SOURCE_DIR}/slsDetectorSoftware/src)
|
||||
target_link_libraries(gendoc PRIVATE
|
||||
slsDetectorShared
|
||||
)
|
||||
set_target_properties(gendoc PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
#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})
|
||||
|
||||
set(SPHINX_SOURCE_FILES
|
||||
src/commandline.rst
|
||||
src/container_utils.rst
|
||||
src/dependencies.rst
|
||||
src/detector.rst
|
||||
src/index.rst
|
||||
src/installation.rst
|
||||
src/pydetector.rst
|
||||
src/pyenums.rst
|
||||
src/pyexamples.rst
|
||||
src/receiver.rst
|
||||
src/result.rst
|
||||
src/type_traits.rst
|
||||
src/ToString.rst
|
||||
|
||||
)
|
||||
|
||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${filename}
|
||||
"${SPHINX_BUILD}/${filename}")
|
||||
endforeach(filename ${SPHINX_SOURCE_FILES})
|
||||
|
||||
#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)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
|
||||
"${SPHINX_BUILD}/conf.py"
|
||||
@ONLY)
|
||||
|
||||
#Sphinx
|
||||
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(SPHINX_SOURCE_FILES
|
||||
src/commandline.rst
|
||||
src/container_utils.rst
|
||||
src/consuming.rst
|
||||
src/dependencies.rst
|
||||
src/detector.rst
|
||||
src/index.rst
|
||||
src/installation.rst
|
||||
src/pydetector.rst
|
||||
src/pyenums.rst
|
||||
src/pyexamples.rst
|
||||
src/servers.rst
|
||||
src/receiver_api.rst
|
||||
src/result.rst
|
||||
src/type_traits.rst
|
||||
src/ToString.rst
|
||||
src/examples.rst
|
||||
src/pygettingstarted.rst
|
||||
src/firmware.rst
|
||||
src/serverupgrade.rst
|
||||
src/virtualserver.rst
|
||||
src/serverdefaults.rst
|
||||
src/quick_start_guide.rst
|
||||
src/troubleshooting.rst
|
||||
src/receivers.rst
|
||||
src/slsreceiver.rst
|
||||
)
|
||||
|
||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${filename}
|
||||
"${SPHINX_BUILD}/${filename}")
|
||||
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}/gen_server_doc.py.in"
|
||||
"${SPHINX_BUILD}/gen_server_doc.py"
|
||||
@ONLY)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
|
||||
"${SPHINX_BUILD}/static/css/extra.css"
|
||||
@ONLY)
|
||||
|
||||
add_custom_target(server_rst python gen_server_doc.py)
|
||||
|
||||
add_custom_target(docs
|
||||
gendoc
|
||||
COMMAND python gen_server_doc.py
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||
-Dbreathe_projects.slsDetectorPackage=${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.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||
-c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx")
|
||||
add_custom_target(docs
|
||||
gendoc
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||
-c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src
|
||||
${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx")
|
||||
|
||||
else (DOXYGEN_FOUND AND SPHINX_FOUND)
|
||||
message("Doxygen and Sphinx are needed to build documentation")
|
||||
endif (DOXYGEN_FOUND AND SPHINX_FOUND)
|
||||
|
@ -21,7 +21,7 @@ print(sys.path)
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'slsDetectorPackage'
|
||||
copyright = '2020, PSD Detector Group'
|
||||
copyright = '2019, PSD Detector Group'
|
||||
author = 'PSD Detector Group'
|
||||
version = '@PROJECT_VERSION@'
|
||||
|
||||
@ -59,8 +59,4 @@ html_theme = "sphinx_rtd_theme"
|
||||
# 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_stylesheet('css/extra.css') # may also be an URL
|
||||
#html_static_path = ['_static']
|
||||
|
@ -1,86 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
def remove_comments(text):
|
||||
def replacer(match):
|
||||
s = match.group(0)
|
||||
if s.startswith('/'):
|
||||
return " " # note: a space and not an empty string
|
||||
else:
|
||||
return s
|
||||
pattern = re.compile(
|
||||
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
|
||||
re.DOTALL | re.MULTILINE
|
||||
)
|
||||
return re.sub(pattern, replacer, text)
|
||||
|
||||
|
||||
# @CMAKE_CURRENT_BINARY_DIR@
|
||||
|
||||
print('\n\n\n\n SERVER CSV')
|
||||
|
||||
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
|
||||
detectors = ['Mythen3', 'Gotthard2', 'Eiger',
|
||||
'Jungfrau', 'Moench', 'Gotthard', 'Ctb']
|
||||
|
||||
|
||||
for det in detectors:
|
||||
print(det)
|
||||
in_fname = src/f'{det.lower()}DetectorServer/slsDetectorServer_defs.h'
|
||||
#print(f'Reading: {in_fname}')
|
||||
with open(in_fname) as f:
|
||||
lines = f.read().replace('\\\n', '')
|
||||
lines = lines.splitlines(keepends = True)
|
||||
|
||||
lines = [l.strip('#define').strip(' ') for l in lines if l.startswith('#define')]
|
||||
output = []
|
||||
signals = []
|
||||
fields = ['Name,', 'Value', 'Comment']
|
||||
excluded = ['DAC_NAMES', 'DEFAULT_DAC_VALS', 'CLK_NAMES', 'ONCHIP_DAC_NAMES']
|
||||
header = f'{fields[0]:35}{fields[1]:35}\n'
|
||||
output.append(header)
|
||||
signals.append(header)
|
||||
dac_names = []
|
||||
dac_values = []
|
||||
for line in lines:
|
||||
name, *parts = line.split()
|
||||
arg = ' '.join(parts)
|
||||
value, *comments = arg.split('//')
|
||||
value = value.strip('() ')
|
||||
# value = value.replace(', ', ' ')
|
||||
value = value.replace('\"', '')
|
||||
if name not in excluded:
|
||||
name += ','
|
||||
if name.startswith('SIGNAL_'):
|
||||
signals.append(f'{name:35}{value}\n')
|
||||
else:
|
||||
output.append(f'{name:35}\"{value}\"\n')
|
||||
elif name == 'DAC_NAMES':
|
||||
dac_names = [v.strip(', ') for v in value.split()]
|
||||
dac_names = [n+',' for n in dac_names]
|
||||
elif name == 'DEFAULT_DAC_VALS':
|
||||
dac_values = remove_comments(value).strip('{}; ')
|
||||
dac_values = dac_values.replace(',', '').split()
|
||||
dac_values = [v.strip('') for v in dac_values]
|
||||
|
||||
print(f"dac_names: {len(dac_names)}, dac_values={len(dac_values)}")
|
||||
if len(dac_values) == 0:
|
||||
dac_values = ['N/A']*len(dac_names)
|
||||
|
||||
|
||||
|
||||
rstpath = Path('@CMAKE_SOURCE_DIR@')/'docs/src/'
|
||||
|
||||
out_fname = Path.cwd()/f'src/{det.lower()}.csv'
|
||||
out_dac_fname = Path.cwd()/f'src/{det.lower()}-dacs.csv'
|
||||
#print(f'Writing: {out_fname}')
|
||||
with open(out_fname, 'w') as f:
|
||||
f.writelines(output)
|
||||
|
||||
output = [f'{n:35}{v}\n' for n,v in zip(dac_names, dac_values)]
|
||||
output.insert(0, header)
|
||||
|
||||
with open(out_dac_fname, 'w') as f:
|
||||
f.writelines(output)
|
||||
|
||||
print('END\n\n\n\n')
|
@ -4,44 +4,13 @@ Command line interface
|
||||
Usage
|
||||
-------------
|
||||
|
||||
Commands can be used either with sls_detector_get or sls_detector_put
|
||||
Commands can be uses either with sls_detector_get or sls_detector_put
|
||||
|
||||
.. code-block::
|
||||
|
||||
sls_detector_get vrf
|
||||
|
||||
Help
|
||||
--------
|
||||
|
||||
.. code-block::
|
||||
|
||||
# get list of commands
|
||||
sls_detector_get list
|
||||
|
||||
# search for a particular command using a word
|
||||
sls_detector_get list | grep adc
|
||||
|
||||
# get help for a particular command
|
||||
sls_detector_get -h fpath
|
||||
sls_detector_help fpath
|
||||
|
||||
|
||||
Commands
|
||||
-----------
|
||||
|
||||
.. include:: ../commands.rst
|
||||
|
||||
|
||||
Depreciated commands
|
||||
------------------------
|
||||
|
||||
.. note ::
|
||||
All the dac commands are preceded with the **dac** command. Use command **daclist** to get correct list of dac command arguments for current detector.
|
||||
|
||||
.. csv-table:: Depreciated commands
|
||||
:file: ../depreciated.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
|
||||
|
||||
|
@ -1,116 +0,0 @@
|
||||
Consuming slsDetectorPackage
|
||||
===============================
|
||||
|
||||
Depending on how you want to build your integration with
|
||||
slsDetectorPackage there are a few different ways to
|
||||
consume our package. The recommended way is to use one of the
|
||||
CMake approaches.
|
||||
|
||||
One can test with :ref:`detector simulators<Virtual Detector Servers>` before testing the API with a real detector or when a real detector is not at hand.
|
||||
|
||||
CMake: slsDetectorPackage as submodule in your project
|
||||
---------------------------------------------------------------
|
||||
|
||||
If you are using CMake to build your integration and want to build everything
|
||||
in one go, we support adding slsDetectorPackage as a subfolder in your cmake project.
|
||||
|
||||
A minimal CMakeLists.txt could look like this:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
project(myDetectorIntegration)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
add_subdirectory(slsDetectorPackage)
|
||||
|
||||
#Add your executable
|
||||
add_executable(example main.cpp)
|
||||
target_compile_features(example PRIVATE cxx_std_11)
|
||||
|
||||
#Link towards slsDetectorShared
|
||||
target_link_libraries(example slsDetectorShared)
|
||||
|
||||
A fully working example can be found at:
|
||||
|
||||
https://github.com/slsdetectorgroup/cmake-subfolder-example
|
||||
|
||||
|
||||
CMake: find_package(slsDetectorPackage)
|
||||
------------------------------------------
|
||||
|
||||
If you have compiled and installed slsDetectorPackage we also support
|
||||
find_package in CMake. If installed in a system wide location no path
|
||||
should be needed, otherwise specify cmake prefix path.
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(myintegration)
|
||||
|
||||
find_package(slsDetectorPackage 5.0 REQUIRED)
|
||||
add_executable(example main.cpp)
|
||||
target_link_libraries(example slsDetectorShared)
|
||||
|
||||
|
||||
Then assuming the slsDetectorPackage is installed in /path/to/sls/install
|
||||
you should be able to configure and build your project in this way.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake ../path/to/your/source -DCMAKE_PREFIX_PATH=/path/to/sls/install
|
||||
make
|
||||
|
||||
|
||||
A minimal example is available at: https://github.com/slsdetectorgroup/minimal-cmake
|
||||
|
||||
|
||||
CMake: find_package and conda
|
||||
----------------------------------
|
||||
|
||||
.. note::
|
||||
|
||||
conda can also be used for installing dependencies such as zmq, Qt4 etc.
|
||||
|
||||
find_package(slsDetectorPackage) also works if you have installed slsDetectorPackage using conda.
|
||||
The only difference is that you point CMake to $CONDA_PREFIX
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#assuming myenv contains slsdetlib
|
||||
conda activate myenv
|
||||
cmake ../path/to/your/source -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||
make
|
||||
|
||||
Depending on your system compiler you might also have to install gxx_linux-64 to compiled.
|
||||
|
||||
No tools minimal approach
|
||||
-----------------------------
|
||||
|
||||
While not recommended it is still possible to specify the include and library paths
|
||||
manually when invoking g++. This can sometimes be handy for a quick try.
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include "sls/Detector.h"
|
||||
#include <iostream>
|
||||
int main(){
|
||||
|
||||
sls::Detector det;
|
||||
|
||||
//Get all values and print them
|
||||
std::cout << "Hostname: " << det.getHostname() << "\n";
|
||||
std::cout << "Type: " << det.getDetectorType() << "\n";
|
||||
std::cout << "Udp ip: " << det.getSourceUDPIP() << "\n";
|
||||
|
||||
|
||||
//Get mac addr
|
||||
const int module = 0;
|
||||
auto mac = det.getSourceUDPMAC()[module];
|
||||
std::cout << "Mac addr of module "<< module << " is " << mac.str() << '\n';
|
||||
|
||||
}
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
g++ -I/install/path/include/ -L/install/path/lib64/ myapp.cpp -lSlsDetector -lSlsSupport -Wl,-rpath=../install/path/lib64
|
@ -13,7 +13,7 @@ To use the basic building blocks, meaning sls_detector_get/put and
|
||||
the shared libraries these are needed:
|
||||
|
||||
* Linux, preferably recent kernel (currently no cross platform support)
|
||||
* CMake > 3.12
|
||||
* CMake > 3.9
|
||||
* C++11 compatible compiler. (We test with gcc and clang)
|
||||
* ZeroMQ version 4
|
||||
|
||||
@ -24,7 +24,7 @@ GUI
|
||||
The GUI is currently using Qt4 but watch out for an upgrade to 5.
|
||||
|
||||
* Qt 4.8
|
||||
* Qwt 6.1
|
||||
* Qwt 6
|
||||
|
||||
-----------------------
|
||||
Python bindings
|
||||
@ -34,12 +34,6 @@ Python bindings
|
||||
* pybind11 (packaged in libs/)
|
||||
|
||||
|
||||
-----------------------
|
||||
Moench executables
|
||||
-----------------------
|
||||
|
||||
* libtiff
|
||||
|
||||
-----------------------
|
||||
Documentation
|
||||
-----------------------
|
||||
@ -48,7 +42,7 @@ The documentation that you are reading now is built with
|
||||
|
||||
* Doxygen (to extract C++ classes etc.)
|
||||
* Breathe (Sphinx plugin to handle doxygen xml)
|
||||
* Sphinx with sphinx_rtd_theme
|
||||
* Sphinx
|
||||
|
||||
-----------------------
|
||||
Packaged in libs/
|
||||
|
@ -1,115 +0,0 @@
|
||||
|
||||
|
||||
|
||||
Examples
|
||||
===========
|
||||
|
||||
Setup
|
||||
------------
|
||||
|
||||
The examples here assume that you have compiled and installed slsDetectorPackage
|
||||
to ~/sls/install and that the option for SLS_USE_SIMULATOR was enabled. This also builds
|
||||
the virtual detector servers that we will be using for testing.
|
||||
|
||||
We also add ~/sls/detector/install/bin to the path for convenience.
|
||||
|
||||
Compile examples
|
||||
-------------------
|
||||
|
||||
The source code of the examples is available at:
|
||||
https://github.com/slsdetectorgroup/api-examples
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/slsdetectorgroup/api-examples.git
|
||||
mkdir build && cd build
|
||||
cmake ../api-examples -DCMAKE_PREFIX_PATH=~/sls/detector/install
|
||||
make
|
||||
|
||||
Below follows a short description of what is included in the examples.
|
||||
|
||||
|
||||
Running a config file [e1]
|
||||
-----------------------------
|
||||
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include "sls/Detector.h"
|
||||
...
|
||||
sls::Detector det;
|
||||
det.loadConfig("path/to/config/file.config");
|
||||
|
||||
|
||||
|
||||
To configure the connection between PC and detector the easiest
|
||||
is to run a config file. For this example we first launch a virtual Jungfrau server and
|
||||
then set up the detector.
|
||||
|
||||
**Launch a virtual detector server**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
jungfrauDetectorServer_virtual
|
||||
|
||||
This launches a virtual Jungfrau detector server. As default is uses port 1952 and 1953
|
||||
for communication over TCP. Most commands go on 1952 and only stop and status on 1953.
|
||||
|
||||
**Run example to configure**
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
./e1-config one_det_no_receiver.config
|
||||
- 12:01:06.371 INFO: Shared memory deleted /slsDetectorPackage_multi_0_sls_0
|
||||
- 12:01:06.371 INFO: Shared memory deleted /slsDetectorPackage_multi_0
|
||||
- 12:01:06.372 INFO: Shared memory created /slsDetectorPackage_multi_0
|
||||
- 12:01:06.376 INFO: Loading configuration file: one_det_no_receiver.config
|
||||
- 12:01:06.376 INFO: Adding detector localhost
|
||||
- 12:01:06.377 INFO: Shared memory created /slsDetectorPackage_multi_0_sls_0
|
||||
- 12:01:06.377 INFO: Checking Detector Version Compatibility
|
||||
- 12:01:06.378 INFO: Detector connecting - updating!
|
||||
hostname [localhost]
|
||||
|
||||
|
||||
Jungfrau detector with 1 modules configured
|
||||
|
||||
|
||||
Using the return type sls::Result [e2]
|
||||
-----------------------------------------
|
||||
|
||||
Since many our detectors have multiple modules we cannot return
|
||||
a single value when reading from the Detector. Hostname, Ip and also
|
||||
for example exposure time can differ between modules.
|
||||
|
||||
Therefore we return Result<T> which is a thin wrapper around
|
||||
std::vector.
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
sls::Result<int> res1{1, 1, 1};
|
||||
std::cout << "res1: " << res1 << '\n';
|
||||
res1.squash();
|
||||
res1.squash(-1);
|
||||
|
||||
|
||||
|
||||
Setting exposure time [e3]
|
||||
-----------------------------------------
|
||||
|
||||
For setting times, like exposure time, period, delay etc.
|
||||
we use std::chrono::duration.
|
||||
|
||||
Example 3 shows how to set and read exposure time as well
|
||||
as converting to floating point.
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include "sls/Detector.h"
|
||||
#include <chrono>
|
||||
...
|
||||
std::chrono::microseconds t0{500};
|
||||
det.setExptime(t0);
|
||||
|
||||
|
||||
|
@ -1,359 +0,0 @@
|
||||
Firmware Upgrade
|
||||
=================
|
||||
|
||||
Eiger
|
||||
-------------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- `bcp script <https://github.com/slsdetectorgroup/slsDetectorFirmware/blob/master/binaries/eiger/bcp>`__
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `bit files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
#. Tftp must be already installed on your pc to use the bcp script.
|
||||
|
||||
#. Copy new servers to the board. See :ref:`how to upgrade detector servers<Detector Server Upgrade>` for more detals. A reboot should have started the new linked servers automatically. For Eiger, do not reboot yet as we need to program the firmware via bit files.
|
||||
|
||||
* This step is crucial when registers between firmwares change. Failure to do so will result in linux on boards to crash and boards can't be pinged anymore.
|
||||
|
||||
#. Bring the board into programmable mode using either of the 2 ways. Both methods result in only the central LED blinking.
|
||||
|
||||
* **Manual:**
|
||||
|
||||
Do a hard reset for each half module on back panel boards, between the LEDs, closer to each of the 1G ethernet connectors. Push until all LEDs start to blink.
|
||||
|
||||
* Software:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Option 1: if the old server is still running:
|
||||
sls_detector_put execcommand "./boot_recovery"
|
||||
|
||||
# Option 2:
|
||||
ssh root@bebxxx
|
||||
cd executables
|
||||
./boot_recovery
|
||||
|
||||
#. Start a terminal for each half module and run the following to see progress.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
nc -p 3000 -u bebxxx 3000
|
||||
# Press enter twice to see prompt with board name.
|
||||
> bebxxx
|
||||
# After each bcp command, wait for this terminal to print "Success".
|
||||
|
||||
|
||||
#. In another terminal, run the following to update firmware. Please update bit files with great caution as it could make your board inaccessible, if done incorrectly.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#update back end fpga
|
||||
bcp download.bit bebxxx:/fw0
|
||||
|
||||
#update front left fpga
|
||||
bcp download.bit bebxxx:/febl
|
||||
|
||||
#update front right fpga
|
||||
bcp download.bit bebxxx:/febr
|
||||
|
||||
#update kernel (only if required by us)
|
||||
bcp download.bit bebxxx:/kernel
|
||||
|
||||
#. Reboot the detector.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# In the first terminal where we saw "Succeess"
|
||||
# reconfig febX is necessary only if you have flashed a new feb firmware
|
||||
reconfig febl
|
||||
reconfig febr
|
||||
# will reboot controller
|
||||
reconfig fw0
|
||||
|
||||
.. note ::
|
||||
|
||||
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
Jungfrau
|
||||
-------------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
.. note ::
|
||||
|
||||
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
||||
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
|
||||
|
||||
Gotthard I
|
||||
-----------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
.. _firmware upgrade using blaster for blackfin:
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
.. warning ::
|
||||
| Gotthard firmware cannot be upgraded remotely and requires the use of USB-Blaster.
|
||||
| It is generally updated by us.
|
||||
|
||||
#. Download `Altera Quartus software or Quartus programmer <https://fpgasoftware.intel.com/20.1/?edition=standard&platform=linux&product=qprogrammer#tabs-4>`__.
|
||||
|
||||
|
||||
#. Start Quartus programmer, click on Hardware Setup. In the "Currently selected hardware" window, select USB-Blaster.
|
||||
|
||||
#. In the Mode combo box, select "Active Serial Programming".
|
||||
|
||||
#. Plug the end of your USB-Blaster with the adaptor provided to the connector 'AS config' on the Gotthard board.
|
||||
|
||||
#. Click on 'Add file'. Select programming (pof) file provided by us.
|
||||
|
||||
#. Check "Program/Configure" and "Verify". Push the start button. Wait until the programming process is finished.
|
||||
|
||||
#. In case of error messages, check the polarity of cable (that pin1 corresponds) and that the correct programming connector is selected.
|
||||
|
||||
#. Reboot the detector.
|
||||
|
||||
|
||||
Mythen III
|
||||
-----------
|
||||
|
||||
.. note ::
|
||||
|
||||
As it is still in development, the rbf files must be picked up from us.
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
.. note ::
|
||||
|
||||
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
Gotthard II
|
||||
-------------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `rbf files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||
# programs fpga,
|
||||
# reboots
|
||||
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.rbf
|
||||
|
||||
.. note ::
|
||||
|
||||
If the detector servers did not start up automatically after reboot, you need to add scripts to do that. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
Moench
|
||||
-------
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
Ctb
|
||||
----
|
||||
|
||||
Download
|
||||
^^^^^^^^^^^^^
|
||||
- detector server corresponding to package in slsDetectorPackage/serverBin
|
||||
|
||||
- `pof files <https://github.com/slsdetectorgroup/slsDetectorFirmware>`__
|
||||
|
||||
|
||||
|
||||
Upgrade
|
||||
^^^^^^^^
|
||||
|
||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||
|
||||
Always ensure that the client and server software are of the same release.
|
||||
|
||||
Program from console
|
||||
.. code-block:: bash
|
||||
|
||||
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||
# removes old server from respawn, sets up new lnked server to respawn
|
||||
# programs fpga,
|
||||
# reboots
|
||||
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
|
||||
|
||||
# Or only program firmware
|
||||
sls_detector_put programfpga xxx.pof
|
||||
|
||||
|
||||
.. _blackfin firmware troubleshooting:
|
||||
|
||||
Firmware Troubleshooting with blackfin
|
||||
----------------------------------------
|
||||
|
||||
1. v4.x.x client after programming will most likely reboot the blackfin processor, regardless of error.
|
||||
|
||||
2. v5.x.x-rcx client after programming will not reboot the blackfin processor, if error occurred.
|
||||
|
||||
3. If a reboot occured with an incomplete firmware in flash, the blackfin will most likely not find the mtd3 drive. To see if this drive exists:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# connect to the board
|
||||
telnet bchipxxx
|
||||
|
||||
# view of mtd3 existing
|
||||
root:/> more /proc/mtd
|
||||
dev: size erasesize name
|
||||
mtd0: 00040000 00020000 "bootloader(nor)"
|
||||
mtd1: 00100000 00020000 "linux kernel(nor)"
|
||||
mtd2: 002c0000 00020000 "file system(nor)"
|
||||
mtd3: 01000000 00010000 "bitfile(spi)"
|
||||
|
||||
4. If one can see the mtd3 drive, one can already try to flash again using the **programfpga** command (without rebooting blackfin or detector).
|
||||
|
||||
5. If one can't list it, read the next section to try to get the blackfin to list it.
|
||||
|
||||
How to get back mtd3 drive remotely (udpating kernel)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
You have 2 alternatives to update the kernel.
|
||||
|
||||
1. Commands via software (>= v6.0.0)
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put updatekernel /home/...path-to-kernel-image
|
||||
|
||||
|
||||
2. or command line
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# step 1: get the kernel image (uImage.lzma) from slsdetectorgroup
|
||||
# and copy it to pc's tftp folder
|
||||
|
||||
# step 2: connect to the board
|
||||
telnet bchipxxx
|
||||
|
||||
#step 3: go to directory for space
|
||||
cd /var/tmp/
|
||||
|
||||
# step 3: copy kernel to board
|
||||
tftp pcxxx -r uImage.lzma -g
|
||||
|
||||
# step 4: verify kernel copied properly
|
||||
ls -lrt
|
||||
|
||||
# step 5: erase flash
|
||||
flash_eraseall /dev/mtd1
|
||||
|
||||
# step 6: copy new image to kernel drive
|
||||
cat uImage.lzma > /dev/mtd1
|
||||
|
||||
# step 7:
|
||||
sync
|
||||
|
||||
# step 8:
|
||||
reboot
|
||||
|
||||
# step 9: verification
|
||||
telnet bchipxxx
|
||||
uname -a # verify kernel date
|
||||
more /proc/mtd # verify mtd3 is listed
|
||||
|
||||
|
||||
Last Resort using USB Blaster
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If none of these steps work, the last resort might be physically upgrading the firmware using a USB blaster, which also requires opening up the detector. Instructions for all the blackfin detectors are the same as the one for :ref:`gotthard firmware upgrade <firmware upgrade using blaster for blackfin>`.
|
@ -1,9 +1,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
/**
|
||||
* Utility program to generate input files for the command line
|
||||
/**
|
||||
* Utility program to generate input files for the command line
|
||||
* documentation. Uses the string returned from sls_detector_help cmd
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@ -11,9 +9,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include "CmdProxy.h"
|
||||
#include "sls/Detector.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
std::string replace_all(const std::string &src, const std::string &from,
|
||||
const std::string &to) {
|
||||
@ -50,14 +49,8 @@ int main() {
|
||||
auto tmp = os.str().erase(0, cmd.size());
|
||||
auto usage = tmp.substr(0, tmp.find_first_of('\n'));
|
||||
tmp.erase(0, usage.size());
|
||||
auto help = replace_all(tmp, "\n\t", "\n\t\t| ");
|
||||
auto help = replace_all(tmp, "\n\t", "\n\t\t");
|
||||
fs << '\t' << cmd << usage << help << "\n";
|
||||
}
|
||||
|
||||
std::ofstream fs2("depreciated.csv");
|
||||
fs2 << "Old, New\n";
|
||||
auto cmds = proxy.GetDepreciatedCommands();
|
||||
for (auto it : cmds) {
|
||||
fs2 << it.first << ", " << it.second << '\n';
|
||||
}
|
||||
}
|
||||
}
|
@ -6,18 +6,12 @@
|
||||
Welcome to slsDetectorPackage's documentation!
|
||||
==============================================
|
||||
|
||||
.. note ::
|
||||
|
||||
This is the documentation for the latest development version of slsDetectorPackage
|
||||
For documentation on current and previous releases visit the official page: https://www.psi.ch/en/detectors/documentation
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Installation:
|
||||
|
||||
installation
|
||||
dependencies
|
||||
consuming
|
||||
|
||||
.. toctree::
|
||||
:caption: C++ API
|
||||
@ -25,14 +19,12 @@ Welcome to slsDetectorPackage's documentation!
|
||||
|
||||
detector
|
||||
result
|
||||
receiver_api
|
||||
examples
|
||||
receiver
|
||||
|
||||
.. toctree::
|
||||
:caption: Python API
|
||||
:maxdepth: 2
|
||||
|
||||
pygettingstarted
|
||||
pydetector
|
||||
pyenums
|
||||
pyexamples
|
||||
@ -42,7 +34,6 @@ Welcome to slsDetectorPackage's documentation!
|
||||
:maxdepth: 2
|
||||
|
||||
commandline
|
||||
quick_start_guide
|
||||
|
||||
.. toctree::
|
||||
:caption: Developer
|
||||
@ -51,34 +42,6 @@ Welcome to slsDetectorPackage's documentation!
|
||||
type_traits
|
||||
ToString
|
||||
|
||||
.. toctree::
|
||||
:caption: Firmware
|
||||
:maxdepth: 2
|
||||
|
||||
firmware
|
||||
|
||||
.. toctree::
|
||||
:caption: Detector Server
|
||||
:maxdepth: 2
|
||||
|
||||
servers
|
||||
serverupgrade
|
||||
virtualserver
|
||||
serverdefaults
|
||||
|
||||
.. toctree::
|
||||
:caption: Receiver
|
||||
:maxdepth: 2
|
||||
|
||||
receivers
|
||||
slsreceiver
|
||||
|
||||
.. toctree::
|
||||
:caption: Troubleshooting
|
||||
|
||||
troubleshooting
|
||||
|
||||
|
||||
.. Indices and tables
|
||||
.. ==================
|
||||
|
||||
|
@ -1,154 +1,5 @@
|
||||
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
The default branch of our git repository is developer. It contains the
|
||||
latest development version. It is expected to compile and work but
|
||||
features might be added or tweaked. In some cases the API might also change
|
||||
without being communicated. If absolute stability of the API is needed please
|
||||
use one of the release versions.
|
||||
|
||||
.. warning ::
|
||||
|
||||
Before building from source make sure that you have the
|
||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||
manage the dependencies.
|
||||
|
||||
|
||||
.. _Installation:
|
||||
|
||||
Installation
|
||||
==============================================
|
||||
|
||||
.. _build from source using cmake:
|
||||
|
||||
Build from source using CMake
|
||||
---------------------------------
|
||||
|
||||
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
|
||||
It is also required to clone with the option --recursive to get the git submodules used
|
||||
in the package.
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||
mkdir build && cd build
|
||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||
make -j12 #or whatever number of cores you are using to build
|
||||
make install
|
||||
|
||||
The easiest way to configure options is to use the ccmake utility.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#from the build directory
|
||||
ccmake .
|
||||
|
||||
|
||||
Build using cmk.sh script
|
||||
-------------------------
|
||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||
|
||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||
-[no option]: only make
|
||||
-c: Clean
|
||||
-b: Builds/Rebuilds CMake files normal mode
|
||||
-p: Builds/Rebuilds Python API
|
||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||
-d: HDF5 Custom Directory
|
||||
-k: CMake command
|
||||
-l: Install directory
|
||||
-t: Build/Rebuilds only text client
|
||||
-r: Build/Rebuilds only receiver
|
||||
-g: Build/Rebuilds only gui
|
||||
-s: Simulator
|
||||
-u: Chip Test Gui
|
||||
-j: Number of threads to compile through
|
||||
-e: Debug mode
|
||||
-i: Builds tests
|
||||
-m: Manuals
|
||||
-n: Manuals without compiling doxygen (only rst)
|
||||
-z: Moench zmq processor
|
||||
|
||||
# get all options
|
||||
./cmk.sh -?
|
||||
|
||||
# new build and compile in parallel:
|
||||
./cmk.sh -bj5
|
||||
|
||||
|
||||
Install binaries using conda
|
||||
--------------------------------
|
||||
|
||||
Conda is not only useful to manage python environments but can also
|
||||
be used as a user space package manager.
|
||||
|
||||
We have three different packages available:
|
||||
|
||||
* **slsdetlib**, shared libraries and command line utilities
|
||||
* **slsdetgui**, GUI
|
||||
* **slsdet**, Python bindings
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#Add channels for dependencies and our library
|
||||
conda config --add channels conda-forge
|
||||
conda config --add channels slsdetectorgroup
|
||||
conda config --set channel_priority strict
|
||||
|
||||
#cerate an environment with our library, then activate
|
||||
#replace 2020.07.20.dev0 with the required tag
|
||||
conda create -n myenv slsdetlib=2020.07.23.dev0
|
||||
conda activate myenv
|
||||
|
||||
#ready to use
|
||||
sls_detector_get exptime
|
||||
etc ...
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#List available versions
|
||||
conda search slsdet
|
||||
|
||||
|
||||
Build from source on old distributions
|
||||
-----------------------------------------
|
||||
|
||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||
using this compiler
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
#Create an environment with the dependencies
|
||||
conda create -n myenv gxx_linux-64 cmake zmq
|
||||
conda activate myenv
|
||||
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||
make -j12
|
||||
|
||||
|
||||
Build this documentation
|
||||
-------------------------------
|
||||
|
||||
The documentation for the slsDetectorPackage is build using a combination
|
||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||
is to use conda
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda create -n myenv python sphinx sphinx_rtd_theme
|
||||
|
||||
Then enable the option SLS_BUILD_DOCS to create the targets
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make docs # generate API docs and build Sphinx RST
|
||||
make rst # rst only, saves time in case the API did not change
|
||||
get the source etc.
|
@ -1,10 +1,9 @@
|
||||
Detector
|
||||
=====================================================
|
||||
|
||||
.. py:currentmodule:: slsdet
|
||||
.. py:currentmodule:: sls_detector
|
||||
|
||||
.. autoclass:: Detector
|
||||
.. autoclass:: ExperimentalDetector
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
||||
:show-inheritance:
|
@ -4,86 +4,9 @@ Enums
|
||||
These enums are defined in slsDetectorDefs in the C++ package and
|
||||
exposed to Python through pybind11.
|
||||
|
||||
|
||||
::
|
||||
|
||||
# Most settings are represented as enums that can be
|
||||
# explicitly imported
|
||||
|
||||
from slsdet import Detector, fileFormat
|
||||
d = Detector()
|
||||
d.fformat = fileFormat.BINARY
|
||||
|
||||
# Altough not recommended for convenience all enums
|
||||
# and some other things can be impored using *
|
||||
|
||||
from slsdet import *
|
||||
d.speed = speedLevel.FULL_SPEED
|
||||
|
||||
# To list the available enums, use dir()
|
||||
|
||||
import slsdet.enums
|
||||
for enum in dir(slsdet.enums):
|
||||
# filter out special memebers
|
||||
if not enum.startswith('_'):
|
||||
print(enum)
|
||||
|
||||
|
||||
.. py:currentmodule:: slsdet
|
||||
.. py:currentmodule:: sls_detector
|
||||
|
||||
.. autoclass:: runStatus
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: detectorType
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: frameDiscardPolicy
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: fileFormat
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: dimension
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: externalSignalFlag
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: timingMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: dacIndex
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: detectorSettings
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: clockIndex
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: speedLevel
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: readoutMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: burstMode
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: timingSourceType
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: M3_GainCaps
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: portPosition
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: streamingInterface
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: vetoAlgorithm
|
||||
:undoc-members:
|
||||
|
||||
.. autoclass:: gainMode
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,73 +1,7 @@
|
||||
Examples
|
||||
================
|
||||
|
||||
Some short examples on how to use slsdet. If something is missing don't hesitate to
|
||||
open an issue in our our `github repo
|
||||
<https://github.com/slsdetectorgroup/slsDetectorPackage>`_.
|
||||
|
||||
|
||||
------------------------------------
|
||||
Setting exposure time
|
||||
------------------------------------
|
||||
|
||||
Setting and reading back exposure time can be done either using a Python datetime.timedelta
|
||||
or by setting the time in seconds.
|
||||
|
||||
::
|
||||
|
||||
# Set exposure time to 1.2 seconds
|
||||
>>> d.exptime = 1.2
|
||||
|
||||
# Setting exposure time using timedelta
|
||||
import datetime as dt
|
||||
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
||||
|
||||
# With timedelta any arbitrary combination of units can be used
|
||||
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
||||
|
||||
# To set exposure time for individual detector one have to resort
|
||||
# to the C++ style API.
|
||||
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
||||
>>> d.setExptime(1.2, [0, 6, 12])
|
||||
>>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12])
|
||||
|
||||
|
||||
|
||||
------------------------------------
|
||||
Converting numbers to hex
|
||||
------------------------------------
|
||||
|
||||
Python support entering numbers in format by using the 0x prefix. However, when reading
|
||||
back you will get a normal integer. This can then be converted to a hex string representation
|
||||
using the built in hex() function.
|
||||
|
||||
.. code-block :: python
|
||||
|
||||
from slsdet import Detector
|
||||
>>> d = Detector()
|
||||
>>> d.patwait0 = 0xaa
|
||||
>>> d.patwait0
|
||||
170
|
||||
|
||||
# Convert to string
|
||||
>>> hex(d.patwait0)
|
||||
'0xaa'
|
||||
|
||||
For multiple values one can use a list comprehension to loop over the values.
|
||||
|
||||
.. code-block :: python
|
||||
|
||||
>>> values = [1,2,3,4,5]
|
||||
>>> [(v) for v in values]
|
||||
['0x1', '0x2', '0x3', '0x4', '0x5']
|
||||
|
||||
# or to a single string by passing the list to .join
|
||||
>>> ', '.join([hex(v) for v in values])
|
||||
'0x1, 0x2, 0x3, 0x4, 0x5'
|
||||
|
||||
|
||||
|
||||
|
||||
Some short hints on how to use the detector
|
||||
|
||||
------------------------
|
||||
Simple threshold scan
|
||||
@ -140,39 +74,37 @@ But lets start looking at the at the manual way:
|
||||
::
|
||||
|
||||
import time
|
||||
from slsdet import Detector, runStatus
|
||||
from sls_detector import Eiger
|
||||
d = Eiger()
|
||||
|
||||
n = 10
|
||||
t = 1
|
||||
|
||||
n_frames = 10
|
||||
t_exp = 1
|
||||
d.exposure_time = t
|
||||
d.n_frames = n
|
||||
d.reset_frames_caught()
|
||||
|
||||
# Set exposure time and number of frames
|
||||
d = Detector()
|
||||
d.exptime = t_exp
|
||||
d.frames = n_frames
|
||||
|
||||
# Start the measurement
|
||||
#Start the measurement
|
||||
t0 = time.time()
|
||||
d.startDetector()
|
||||
d.startReceiver()
|
||||
d.start_receiver()
|
||||
d.start_detector()
|
||||
|
||||
# Wait for the detector to be ready or do other important stuff
|
||||
time.sleep(t_exp * n_frames)
|
||||
#Wait for the detector to be ready or do other important stuff
|
||||
time.sleep(t*n)
|
||||
|
||||
# check if the detector is ready otherwise wait a bit longer
|
||||
while d.status != runStatus.IDLE:
|
||||
#check if the detector is ready otherwise wait a bit longer
|
||||
while d.status != 'idle':
|
||||
time.sleep(0.1)
|
||||
|
||||
# Stop the receiver after we got the frames
|
||||
# Detector is already idle so we don't need to stop it
|
||||
d.stopReceiver()
|
||||
|
||||
lost = d.rx_framescaught - n_frames
|
||||
print(
|
||||
f"{n_frames} frames of {t_exp}s took {time.time()-t0:{.3}}s with {lost} frames lost "
|
||||
)
|
||||
#Stop the receiver after we got the frames
|
||||
#Detector is already idle so we don't need to stop it
|
||||
d.stop_receiver()
|
||||
|
||||
lost = d.frames_caught - n
|
||||
print(f'{n} frames of {t}s took {time.time()-t0:{.3}}s with {lost} frames lost ')
|
||||
|
||||
#Reset to not interfere with a potential next measurement
|
||||
d.reset_frames_caught()
|
||||
|
||||
Instead launching d.acq() from a different process is a bit easier since the control of receiver and detector
|
||||
is handled in the acq call. However, you need to join the process used otherwise a lot of zombie processes would
|
||||
@ -182,104 +114,30 @@ hang around until the main process exits.
|
||||
|
||||
import time
|
||||
from multiprocessing import Process
|
||||
from slsdet import Detector, runStatus
|
||||
from sls_detector import Eiger
|
||||
|
||||
def acquire():
|
||||
"""
|
||||
Create a new Eiger object that still referes to the same actual detector
|
||||
and same shared memory. Then launch acq.
|
||||
"""
|
||||
detector = Eiger()
|
||||
detector.acq()
|
||||
|
||||
d = Detector()
|
||||
#This is the detector we use throughout the session
|
||||
d = Eiger()
|
||||
|
||||
#Create a separate process to run acquire in
|
||||
p = Process(target=d.acquire)
|
||||
#Process to run acquire
|
||||
p = Process(target=acquire)
|
||||
|
||||
#Start the thread and short sleep to allow the acq to start
|
||||
p.start()
|
||||
time.sleep(0.01)
|
||||
|
||||
#Do some other work
|
||||
while d.status != runStatus.IDLE:
|
||||
print("Working")
|
||||
while d.busy is True:
|
||||
print(d.busy)
|
||||
time.sleep(0.1)
|
||||
|
||||
#Join the process
|
||||
p.join()
|
||||
|
||||
|
||||
------------------------------
|
||||
Setting and getting times
|
||||
------------------------------
|
||||
|
||||
::
|
||||
|
||||
import datetime as dt
|
||||
from slsdet import Detector
|
||||
from slsdet.utils import element_if_equal
|
||||
|
||||
d = Detector()
|
||||
|
||||
# The simplest way is to set the exposure time in
|
||||
# seconds by using the exptime property
|
||||
# This sets the exposure time for all modules
|
||||
d.exptime = 0.5
|
||||
|
||||
# exptime also accepts a python datetime.timedelta
|
||||
# which can be used to set the time in almost any unit
|
||||
t = dt.timedelta(milliseconds = 2.3)
|
||||
d.exptime = t
|
||||
|
||||
# or combination of units
|
||||
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
||||
d.exptime = t
|
||||
|
||||
# exptime however always returns the time in seconds
|
||||
>>> d.exptime
|
||||
181.23
|
||||
|
||||
# To get back the exposure time for each module
|
||||
# it's possible to use getExptime, this also returns
|
||||
# the values as datetime.timedelta
|
||||
|
||||
>>> d.getExptime()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
|
||||
# In case the values are the same it's possible to use the
|
||||
# element_if_equal function to reduce the values to a single
|
||||
# value
|
||||
|
||||
>>> t = d.getExptime()
|
||||
>>> element_if_equal(t)
|
||||
datetime.timedelta(seconds=1)
|
||||
|
||||
--------------
|
||||
Reading dacs
|
||||
--------------
|
||||
|
||||
::
|
||||
|
||||
from slsdet import Detector, Eiger, dacIndex
|
||||
|
||||
#using the specialized class
|
||||
e = Eiger()
|
||||
>>> e.dacs
|
||||
========== DACS =========
|
||||
vsvp : 0 0
|
||||
vtrim : 2480 2480
|
||||
vrpreamp : 3300 3300
|
||||
vrshaper : 1400 1400
|
||||
vsvn : 4000 4000
|
||||
vtgstv : 2556 2556
|
||||
vcmp_ll : 1000 1000
|
||||
vcmp_lr : 1000 1000
|
||||
vcal : 0 0
|
||||
vcmp_rl : 1000 1000
|
||||
rxb_rb : 1100 1100
|
||||
rxb_lb : 1100 1100
|
||||
vcmp_rr : 1000 1000
|
||||
vcp : 1000 1000
|
||||
vcn : 2000 2000
|
||||
vishaper : 1550 1550
|
||||
iodelay : 650 650
|
||||
|
||||
# or using the general class and the list
|
||||
d = Detector()
|
||||
for dac in d.daclist:
|
||||
r = d.getDAC(dac, False)
|
||||
print(f'{dac.name:10s} {r}')
|
||||
p.join()
|
@ -1,228 +0,0 @@
|
||||
Getting Started
|
||||
==================
|
||||
|
||||
|
||||
--------------------
|
||||
Which Python?
|
||||
--------------------
|
||||
|
||||
We require at lest Python 3.6 and strongly recommended that you don't use the system
|
||||
Python installation. The examples in this documentation uses `conda
|
||||
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
||||
also for non Python packages but there are also other alternatives like, pyenv.
|
||||
|
||||
Using something like conda also allows you to quickly switch beteen different Python
|
||||
environments.
|
||||
|
||||
.. warning ::
|
||||
|
||||
If you use conda avoid also installing packages with pip.
|
||||
|
||||
---------------------
|
||||
PYTHONPATH
|
||||
---------------------
|
||||
|
||||
If you install slsdet using conda everything is set up and you can
|
||||
directly start using the Python bindings. However, if you build
|
||||
from source you need to tell Python where to find slsdet. This
|
||||
is be done by adding your build/bin directory to PYTHONPATH.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
|
||||
|
||||
.. note ::
|
||||
|
||||
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable
|
||||
the Python bindings or if you use the cmk.sh script -p.
|
||||
|
||||
--------------------------------------
|
||||
Which detector class should I use?
|
||||
--------------------------------------
|
||||
|
||||
We provide a generic class called Detector and detector specific
|
||||
versions like, Eiger, Jungfrau etc. The most or all functionality
|
||||
is there in the base class except the convenient access to dacs
|
||||
and temperatures.
|
||||
|
||||
::
|
||||
|
||||
from slsdet import Detector, Eiger
|
||||
|
||||
d = Detector()
|
||||
e = Eiger()
|
||||
|
||||
# Both classes can be used to control an Eiger detector
|
||||
d.exptime = 0.5
|
||||
e.period = 1
|
||||
|
||||
# But Eiger gives a simpler interface to the dacs
|
||||
>>> e.dacs
|
||||
========== DACS =========
|
||||
vsvp : 0
|
||||
vtrim : 2480
|
||||
vrpreamp : 3300
|
||||
vrshaper : 1400
|
||||
vsvn : 4000
|
||||
vtgstv : 2556
|
||||
vcmp_ll : 1000
|
||||
vcmp_lr : 1000
|
||||
vcal : 0
|
||||
vcmp_rl : 1000
|
||||
rxb_rb : 1100
|
||||
rxb_lb : 1100
|
||||
vcmp_rr : 1000
|
||||
vcp : 1000
|
||||
vcn : 2000
|
||||
vishaper : 1550
|
||||
iodelay : 650
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
Depending on user feedback we might move some detector specific
|
||||
functionality to the specialized classes.
|
||||
|
||||
|
||||
----------------------------------
|
||||
Hey, there seems to be two APIs?
|
||||
----------------------------------
|
||||
|
||||
To make the Python API approachable, both if you come from the command line
|
||||
or are using the C++ API, we provide two interfaces to the detector.
|
||||
One is property based and tries to stay as close to the command line syntax
|
||||
as is possible, and the other one directly maps the C++ API found in Detector.h.
|
||||
There is also an underlying design reason for the two APIs since we auto
|
||||
generate the bindings to the C++ code using a mix of pybind11 and clang-tools.
|
||||
The property based API covers most of the functionality but in some cases
|
||||
you have to reach for the C++ like interface.
|
||||
|
||||
|
||||
::
|
||||
|
||||
d = Detector()
|
||||
|
||||
# C++ like API
|
||||
d.setExptime(0.1)
|
||||
|
||||
# or a bit more pythonic
|
||||
d.exptime = 0.1
|
||||
|
||||
The c++ style API offers more control over access to individual modules
|
||||
in a large detector.
|
||||
|
||||
::
|
||||
|
||||
# Set exposure time for module 1, 5 and 7
|
||||
d.setExptime(0.1, [1,5,7])
|
||||
|
||||
--------------------
|
||||
Finding functions
|
||||
--------------------
|
||||
|
||||
To find out which properties and methods that a Python object have you
|
||||
can use dir()
|
||||
|
||||
::
|
||||
|
||||
>>> from slsdet import Detector
|
||||
>>> d = Detector()
|
||||
>>> dir(d)
|
||||
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__',
|
||||
'__eq__', '__format__', '__ge__', '__getattribute__', '__gt__',
|
||||
'__hash__', '__init__', '__init_subclass__', '__le__', '__len__',
|
||||
'__lt__', '__module__', '__ne__', '__new__', '__reduce__',
|
||||
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
|
||||
'__str__', '__subclasshook__', '_adc_register', '_frozen',
|
||||
'_register', 'acquire', 'adcclk', 'adcphase', 'adcpipeline',
|
||||
'adcreg', 'asamples', 'auto_comp_disable', 'clearAcquiringFlag',
|
||||
'clearBit', 'clearROI', 'client_version', 'config', 'copyDetectorServer',
|
||||
'counters', 'daclist', 'dacvalues', 'dbitclk', 'dbitphase' ...
|
||||
|
||||
Since the list for Detector is rather long it's an good idea to filter it.
|
||||
The following example gives you properties and methods containing time in
|
||||
their name.
|
||||
|
||||
::
|
||||
|
||||
>>> [item for item in dir(d) if 'time' in item]
|
||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||
'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2',
|
||||
'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime']
|
||||
|
||||
The above method works on any Python object but for convenience we also
|
||||
included two functions to find names. View prints the names one per line
|
||||
while find returns a list of names.
|
||||
|
||||
::
|
||||
|
||||
from slsdet.lookup import view, find
|
||||
|
||||
>>> view('exptime')
|
||||
exptime
|
||||
getExptime
|
||||
getExptimeForAllGates
|
||||
getExptimeLeft
|
||||
getSubExptime
|
||||
setExptime
|
||||
setSubExptime
|
||||
subexptime
|
||||
|
||||
>>> find('exptime')
|
||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
|
||||
|
||||
|
||||
------------------------------------
|
||||
Finding out what the function does
|
||||
------------------------------------
|
||||
|
||||
To access the documentation of a function directly from the Python prompt use help().
|
||||
|
||||
.. code-block :: python
|
||||
|
||||
>>> help(Detector.period)
|
||||
Help on property:
|
||||
|
||||
Period between frames, accepts either a value in seconds or datetime.timedelta
|
||||
|
||||
Note
|
||||
-----
|
||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
|
||||
|
||||
Examples
|
||||
-----------
|
||||
>>> d.period = 1.05
|
||||
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
|
||||
>>> d.period
|
||||
181.23
|
||||
>>> d.getPeriod()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
|
||||
|
||||
----------------------
|
||||
Where are the ENUMs?
|
||||
----------------------
|
||||
|
||||
To set some of the detector settings like file format you have
|
||||
to pass in an enum.
|
||||
|
||||
::
|
||||
|
||||
>>> d.setFileFormat(fileFormat.BINARY)
|
||||
|
||||
The enums can be found in slsdet.enums
|
||||
|
||||
::
|
||||
|
||||
import slsdet
|
||||
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
||||
['burstMode', 'clockIndex', 'dacIndex',
|
||||
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
||||
'fileFormat', 'frameDiscardPolicy',
|
||||
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
||||
'timingSourceType']
|
||||
|
||||
# Even though importing using * is not recommended one could
|
||||
# get all the enums like this:
|
||||
>>> from slsdet.enums import *
|
@ -1,140 +0,0 @@
|
||||
Quick Start Guide
|
||||
=================
|
||||
|
||||
Detector
|
||||
--------
|
||||
Start up detector (with cooling if required). Ensure both control server and stop server is running on-board.
|
||||
|
||||
Or use a detector simulator to test. Click :ref:`here<Virtual Detector Servers>` for further instructions.
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
| One has to start the slsReceiver before loading config file or using any receiver commands (prefix: **rx_** )
|
||||
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
# default port 1954
|
||||
slsReceiver
|
||||
|
||||
# custom port 2012
|
||||
slsReceiver -t2012
|
||||
|
||||
|
||||
For Multiple Modules
|
||||
.. code-block:: bash
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
||||
slsMultiReceiver 2012 2 0
|
||||
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
Refer :ref:`Sample Config file` to create config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# load config file
|
||||
sls_detector_put config /path/sample.config
|
||||
|
||||
# set number of frames
|
||||
sls_detector_put frames 5
|
||||
|
||||
# acquire
|
||||
sls_detector_acquire
|
||||
|
||||
|
||||
.. _Sample Config file:
|
||||
|
||||
Sample Config file
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
||||
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to module
|
||||
hostname bchipxxx
|
||||
|
||||
# connects to receiver at default port
|
||||
rx_hostname mpc1922
|
||||
# or to connect to specific port
|
||||
# rx_hostname mpc1922:2012
|
||||
|
||||
# sets destination udp ports (not needed, default is 50001)
|
||||
udp_dstport 50012
|
||||
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
udp_srcip 192.168.1.112
|
||||
|
||||
# destination udp ip picked up from rx_hostname (if auto)
|
||||
udp_dstip auto
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
For a Single Module with custom Receiver (not slsReceiver)
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to module
|
||||
hostname bchipxxx
|
||||
|
||||
# sets destination udp ports (not needed, default is 50001)
|
||||
udp_dstport 50012
|
||||
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
udp_srcip 192.168.1.112
|
||||
|
||||
# destination udp ip
|
||||
udp_dstip 192.168.1.100
|
||||
|
||||
# source udp mac
|
||||
udp_srcmac aa:bb:cc:dd:ee:ff
|
||||
|
||||
# destination udp mac
|
||||
udp_dstmac 3c:ab:98:bf:50:60
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
For Multiple Modules
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to mulitple modules
|
||||
hostname bchipxxx+bchipyyy+
|
||||
|
||||
# connects to receivers at ports 2012 and 2014
|
||||
rx_hostname mpc1922:2012+mpc1922:2013+
|
||||
|
||||
# sets differernt destination udp ports
|
||||
0:udp_dstport 50012
|
||||
1:udp_dstport 50014
|
||||
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
0:udp_srcip 192.168.1.112
|
||||
1:udp_srcip 192.168.1.114
|
||||
|
||||
# destination udp ip picked up from rx_hostname (if auto)
|
||||
udp_dstip auto
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
Gui
|
||||
----
|
||||
|
||||
Compile with SLS_USE_GUI=ON in cmake or -g option in cmk.sh script. One can also just use the conda binary. Refer :ref:`installation instructions<Installation>`.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
slsDetectorGui
|
||||
|
||||
|
||||
.. note ::
|
||||
| The streaming high water mark (commmand: rx_zmqhwm) and the receiving high water mark (command: zmqhwm) is by default the lib zmq's default (currently 1000).
|
||||
| At Gui startup, these values are set to 2. Hence, for very fast detectors, many frames will be dropped to be able to view the latest in the gui.
|
||||
| One can still change this setting in the gui in the Plot tab (ZMQ Streaming), from the command line or API.
|
||||
| Both hwm's can be set to a -1 to use the lib's default.
|
||||
| Since the dummy end of acquisition packet streamed from receiver might also be lost, receiver restreams until gui acknowledges.
|
@ -1,6 +1,6 @@
|
||||
Receiver
|
||||
==============================================
|
||||
|
||||
.. doxygenclass:: sls::Receiver
|
||||
.. doxygenclass:: slsReceiver
|
||||
:members:
|
||||
.. :undoc-members:
|
@ -1,71 +0,0 @@
|
||||
Receivers
|
||||
=================
|
||||
|
||||
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
||||
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
||||
|
||||
Detector UDP Header
|
||||
---------------------
|
||||
|
||||
| The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
||||
|
||||
**The SLS Detector Header**
|
||||
|
||||
.. table:: <-------------------------------- 8 bytes -------------------------------->
|
||||
:align: center
|
||||
:widths: 30,30,30,30
|
||||
|
||||
+--------------------------------------------------------------------+
|
||||
|frameNumber |
|
||||
+---------------------------------+----------------------------------+
|
||||
|expLength |packetNumber |
|
||||
+---------------------------------+----------------------------------+
|
||||
|bunchId |
|
||||
+--------------------------------------------------------------------+
|
||||
|timestamp |
|
||||
+----------------+----------------+----------------+-----------------+
|
||||
|modId |row |column |reserved |
|
||||
+----------------+----------------+----------------+--------+--------+
|
||||
|debug |roundRNumber |detType |version |
|
||||
+---------------------------------+----------------+--------+--------+
|
||||
|
||||
UDP configuration in Config file
|
||||
----------------------------------
|
||||
|
||||
#. UDP source port is hardcoded in detector server, starting at 32410.
|
||||
#. **udp_dstport** : UDP destination port number. Port in receiver pc to listen to packets from the detector.
|
||||
#. **udp_dstip** : IP address of UDP destination interface. IP address of interface in receiver pc to listen to packets from detector. If **auto** is used (only when using slsReceiver/ slsMultiReceiver), the IP of **rx_hostname** is picked up.
|
||||
#. **udp_dstmac** : Mac address of UDP destination interface. MAC address of interface in receiver pc to list to packets from detector. Only required when using custom receiver, else slsReceiver/slsMultiReceiver picks it up from **udp_dstip**.
|
||||
#. **udp_srcip** : IP address of UDP source interface. IP address of detector UDP interface to send packets from. Do not use for Eiger 1Gb interface (uses its hardware IP). For others, must be in the same subnet as **udp_dstip**.
|
||||
#. **udp_srcmac** : MAC address of UDP source interface. MAC address of detector UDP interface to send packets from. Do not use for Eiger (uses hardware mac). For others, it is not necessary, but can help for switch and debugging to put unique values for each module.
|
||||
|
||||
|
||||
Custom Receiver
|
||||
----------------
|
||||
|
||||
| When using custom receiver with our package, ensure that **udp_dstmac** is also configured in the config file. This parameter is not required when using slsReceiver.
|
||||
|
||||
| Cannot use "auto" for **udp_dstip**.
|
||||
|
||||
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||
|
||||
Example of a custom receiver config file
|
||||
|
||||
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
@ -1,106 +0,0 @@
|
||||
Default Values
|
||||
==============================================
|
||||
|
||||
Mythen3
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: mythen3.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Mythen3 DACS
|
||||
:file: mythen3-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Gotthard2
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: gotthard2.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Gotthard 2 DACS
|
||||
:file: gotthard2-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Moench
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: moench.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Moench DACS
|
||||
:file: moench-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Ctb
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: ctb.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Eiger
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: eiger.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Eiger DACS
|
||||
:file: eiger-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Jungfrau
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: jungfrau.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Jungfrau DACS
|
||||
:file: jungfrau-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
Gotthard
|
||||
-------------
|
||||
|
||||
.. csv-table:: Default values
|
||||
:file: gotthard.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
||||
|
||||
DACS
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. csv-table:: Gotthard DACS
|
||||
:file: gotthard-dacs.csv
|
||||
:widths: 35, 35
|
||||
:header-rows: 1
|
@ -1,96 +0,0 @@
|
||||
Detector Servers
|
||||
=================
|
||||
|
||||
Location
|
||||
---------
|
||||
slsDetectorPackage/serverBin/ folder in every release.
|
||||
|
||||
|
||||
.. _Detector Server Arguments:
|
||||
|
||||
Arguments
|
||||
---------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Possible arguments are:
|
||||
-v, --version : Software version
|
||||
-p, --port <port> : TCP communication port with client.
|
||||
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode.
|
||||
Skips detector type checks.
|
||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||
-d, --devel : Developer mode. Skips firmware checks.
|
||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||
|
||||
|
||||
Basics
|
||||
------------
|
||||
|
||||
Detector Servers include:
|
||||
* Control server [default port: 1952]
|
||||
* Almost all client communication.
|
||||
* Stop server [default port: 1953]
|
||||
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
||||
|
||||
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
||||
|
||||
|
||||
.. _Automatic start servers:
|
||||
Automatic start
|
||||
------------------
|
||||
|
||||
One can start the on-board detector server automatically upon powering on the board.
|
||||
|
||||
#. Create a soft link to the binary on board
|
||||
:
|
||||
.. code-block:: bash
|
||||
|
||||
ln -sf someDetectorServervx.x.x someDetectorServer
|
||||
|
||||
|
||||
|
||||
#. Do the following depending on the detector type :
|
||||
|
||||
Eiger
|
||||
.. code-block:: bash
|
||||
|
||||
# create script in rc5.d on the board
|
||||
vi /etc/rc5.d/S50board_com.sh
|
||||
|
||||
# enter the following (edit server name)
|
||||
#! /bin/sh
|
||||
/home/root/executables/eigerDetectorServer &> /dev/null &
|
||||
exit 0
|
||||
|
||||
Jungfrau | Moench | CTB | Gotthard I
|
||||
.. code-block:: bash
|
||||
|
||||
# Edit inittab on board
|
||||
vi /etc/inittab
|
||||
|
||||
# enter the following line
|
||||
ttyS0::respawn:/./xxxDetectorServer
|
||||
|
||||
|
||||
Gotthard II | Mythen III
|
||||
.. code-block:: bash
|
||||
|
||||
# create script in init.d on board
|
||||
vi /etc/init.d/S99detServer.sh
|
||||
|
||||
# enter the following (edit server name)
|
||||
#! /bin/sh
|
||||
cd /root >> /dev/null
|
||||
/root/xxxDetectorServer >> /dev/null &
|
||||
|
||||
|
||||
#. Sync, reboot and verify
|
||||
:
|
||||
.. code-block:: bash
|
||||
|
||||
sync
|
||||
reboot
|
||||
|
||||
# verify
|
||||
ps -ef | grep xxxDetectorServer
|
@ -1,44 +0,0 @@
|
||||
.. _Detector Server Upgrade:
|
||||
Detector Server Upgrade
|
||||
=======================
|
||||
|
||||
|
||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||
|
||||
|
||||
#. Install tftp and copy detector server binary to tftp folder
|
||||
#. Program from console
|
||||
|
||||
.. note ::
|
||||
|
||||
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# copies new server from pc tftp folder, creates a soft link to xxxDetectorServerxxx
|
||||
# [Jungfrau][CTB][Moench] also edits initttab to respawn server on reboot
|
||||
# Then, the detector controller will reboot (except Eiger)
|
||||
sls_detector_put copydetectorserver xxxDetectorServerxxx pcxxx
|
||||
|
||||
#. Copy the detector server specific config files or any others required to the detector:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put execcommand "tftp pcxxx -r configxxx -g"
|
||||
|
||||
|
||||
.. note ::
|
||||
|
||||
For Mythen3, Gotthard2 and Eiger, you need to add scripts to automatically start detector server upon power on. See :ref:`Automatic start<Automatic start servers>` for more details.
|
||||
|
||||
.. note ::
|
||||
|
||||
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||
|
||||
|
||||
Errors
|
||||
------
|
||||
|
||||
#. tftp write error: There is no space left. Please delete some old binaries and try again.
|
||||
|
||||
#. text file busy: You are trying to copy the same server.
|
@ -1,170 +0,0 @@
|
||||
slsReceiver/ slsMultiReceiver
|
||||
================================
|
||||
|
||||
| One has to start the slsReceiver before loading config file or using any receiver commands (prefix: **rx_** )
|
||||
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
# default port 1954
|
||||
slsReceiver
|
||||
|
||||
# custom port 2012
|
||||
slsReceiver -t2012
|
||||
|
||||
|
||||
For Multiple Modules
|
||||
.. code-block:: bash
|
||||
|
||||
# each receiver (for each module) requires a unique tcp port (if all on same machine)
|
||||
|
||||
# using slsReceiver in multiple consoles
|
||||
slsReceiver
|
||||
slsReceiver -t1955
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers]
|
||||
slsMultiReceiver 2012 2
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
||||
slsMultiReceiver 2012 2 1
|
||||
|
||||
|
||||
Client Commands
|
||||
-----------------
|
||||
|
||||
| One can remove **udp_dstmac** from the config file, as the slsReceiver fetches this from the **udp_ip**.
|
||||
|
||||
| One can use "auto" for **udp_dstip** if one wants to use default ip of **rx_hostname**.
|
||||
|
||||
| The first command to the receiver (**rx_** commands) should be **rx_hostname**. The following are the different ways to establish contact.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# default receiver tcp port (1954)
|
||||
rx_hostname xxx
|
||||
|
||||
# custom receiver port
|
||||
rx_hostname xxx:1957
|
||||
|
||||
# custom receiver port
|
||||
rx_tcpport 1954
|
||||
rx_hostname xxx
|
||||
|
||||
# multi modules with custom ports
|
||||
rx_hostname xxx:1955+xxx:1956+
|
||||
|
||||
# multi modules with custom ports on same rxr pc
|
||||
0:rx_tcpport 1954
|
||||
1:rx_tcpport 1955
|
||||
2:rx_tcpport 1956
|
||||
rx_hostname xxx
|
||||
|
||||
# multi modules with custom ports on different rxr pc
|
||||
0:rx_tcpport 1954
|
||||
0:rx_hostname xxx
|
||||
1:rx_tcpport 1955
|
||||
1:rx_hostname yyy
|
||||
|
||||
|
||||
| Example commands:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# to get a list of receiver commands (these dont include file commands)
|
||||
sls_detector_get list | grep rx_
|
||||
|
||||
# some file commands are:
|
||||
fwrite
|
||||
foverwrite
|
||||
findex
|
||||
fpath
|
||||
fname
|
||||
fmaster
|
||||
fformat
|
||||
|
||||
# to get help on a single commands
|
||||
sls_detector_get -h rx_framescaught
|
||||
|
||||
|
||||
File format
|
||||
--------------
|
||||
|
||||
* The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
||||
|
||||
* Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
||||
|
||||
* Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
||||
|
||||
* Some file name examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# first file
|
||||
path-to-file/run_d0_f0_0.raw
|
||||
|
||||
# second file after reaching max frames in first file
|
||||
path-to-file/run_d0_f1_0.raw
|
||||
|
||||
# second acquisition, first file
|
||||
path-to-file/run_d0_f0_1.raw
|
||||
|
||||
* Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||
|
||||
* SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
|
||||
|
||||
**Binary file format**
|
||||
|
||||
* This is the default file format.
|
||||
|
||||
* Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
||||
|
||||
* Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
||||
|
||||
|
||||
**HDF5 file formats**
|
||||
|
||||
#. Compile the package with HDF5 option enabled
|
||||
|
||||
#. Using cmk script: ./cmk.sh -hj9 -d [path of hdf5 dir]
|
||||
|
||||
#. Enable using cmake **-DCMAKE_INSTALL_PREFIX=/path/to/hdf/installation** and **-DSLS_USE_HDF5=ON**
|
||||
|
||||
#. Start Receiver process
|
||||
|
||||
#. Load config file
|
||||
|
||||
#. Set file format from client or in config file
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put fformat hdf5
|
||||
|
||||
|
||||
| For multiple, modules, a virtual file linking all the modules is created. Both the data files and virtual files are linked in the master file.
|
||||
|
||||
|
||||
Performance
|
||||
-------------
|
||||
|
||||
Please refer to Receiver PC Tuning options and slsReceiver Tuning under `Troubleshooting <https://slsdetectorgroup.github.io/devdoc/troubleshooting.html>`_.
|
||||
|
||||
|
||||
Using Callbacks
|
||||
----------------
|
||||
|
||||
One can get a callback in the receiver for each frame to:
|
||||
* manipulate the data that will be written to file, or
|
||||
* disable file writing in slsReceiver and take care of the data for each call back
|
||||
|
||||
When handling callbacks, the control should be returned as soon as possible, to prevent packet loss from fifo being full.
|
||||
|
||||
**Example**
|
||||
* `main cpp file <https://github.com/slsdetectorgroup/api-examples/blob/master/e4-receiver_callbacks.cpp>`_
|
||||
* `cmake file <https://github.com/slsdetectorgroup/api-examples/blob/master/CMakeLists.txt>`_.
|
||||
* how to install the slsDetectorPackage is provided :ref:`here <build from source using cmake>`.
|
||||
* compile the example **e4-rxr** by:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake ../path/to/your/source -DCMAKE_PREFIX_PATH=/path/to/sls/install
|
||||
make
|
||||
|
@ -1,312 +0,0 @@
|
||||
Troubleshooting
|
||||
=================
|
||||
|
||||
If something is missing, don't hesitate to
|
||||
open an issue at our `github repo issues
|
||||
<https://github.com/slsdetectorgroup/slsDetectorPackage/issues>`_.
|
||||
|
||||
Common
|
||||
------
|
||||
|
||||
Missing Packets
|
||||
^^^^^^^^^^^^^^^
|
||||
Possible causes could be the following:
|
||||
|
||||
#. Receiver PC is not tuned for socket buffer size and input packet queue.
|
||||
* Refer to :ref:`Increase rmem_default, rmem_max and max_backlog<Receiver PC Tuning>`
|
||||
|
||||
#. Wiring
|
||||
* Faulty wiring or connecting cable to incorrect interface.
|
||||
|
||||
#. Link up and speed
|
||||
* Check to see if there is a blue LED on board to signal that the link is up. Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
|
||||
|
||||
#. Detector is not acquiring (Not Eiger)
|
||||
* Take an acquisition with many images and using the following steps instead of acquire:
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put status start
|
||||
# keep executing this command to see if the number of frames left keeps decreasing,
|
||||
# which means the detector is acquiring.
|
||||
sls_detector_get framesl
|
||||
|
||||
.. note ::
|
||||
|
||||
If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
|
||||
|
||||
#. Data cable plugged into the wrong interface on board (Jungfrau)
|
||||
* Please ensure that the data cable is plugged into the rightmost interface. The middle one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
|
||||
|
||||
#. Detector is not sending data
|
||||
* Check the board to see if the green LED is blinking next to the data cable, which means that the detector is sending data.
|
||||
|
||||
#. Firewall or security feature
|
||||
* A firewall or some security feature could be blocking the reception of data.
|
||||
|
||||
#. Ethernet interface not configured properly
|
||||
* Ensure that the interfaces used are configured properly with the right mask and ip. Eg. use ifconfig and route commands to verify.
|
||||
|
||||
#. Ethernet interface not configured for Jumbo frames (10Gb)
|
||||
* Ensure that the interfaces used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
||||
|
||||
#. Detector IP (Not Eiger)
|
||||
* Ensure it is valid and does not end if 0 or 255. Also ensure that the detector ip is in the same subnet as rx_udpip and the masking in the interface configuration ensures this rule.
|
||||
|
||||
#. Tcpdump or wireshark
|
||||
* Use one of these to confirm that you receive packets (with the right filtering ie. source and destination ports, ip).
|
||||
|
||||
#. Check SFP modules
|
||||
* Check if the SFP modules on both sides of the fiber are of same type.
|
||||
|
||||
#. Pinging the subnet (receiving only a few number of packets each time)
|
||||
* If a switch is used between a receiver pc and detector instead of plugging the cables directly, one might have to ping any ip in the subnet of the Ethernet interface constantly so that it does not forget the ip during operation.
|
||||
* Eg. if rx_udpip is 10.2.3.100, then ping constantly 10.2.3.xxx, where xxx is any ip other than 100.
|
||||
|
||||
|
||||
|
||||
.. _Receiver PC Tuning:
|
||||
|
||||
Receiver PC Tuning Options
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#. Increase maximum receive socket buffer size and socket input packet queue.
|
||||
* Temporarily (until shut down)
|
||||
.. code-block:: bash
|
||||
|
||||
# check size
|
||||
sysctl -a | grep rmem
|
||||
sysctl -a | grep backlog
|
||||
|
||||
# set max and default (use 1Gb for Jungfrau and 100Mb for others)
|
||||
sysctl net.core.rmem_max=$((100*1024*1024))
|
||||
sysctl net.core.rmem_default=$((100*1024*1024))
|
||||
sysctl net.core.netdev_max_backlog=250000
|
||||
|
||||
|
||||
* Permanently
|
||||
.. code-block:: bash
|
||||
|
||||
# edit /etc/sysctl.conf file
|
||||
# set max and default (use 1Gb for Jungfrau and 100Mb for others)
|
||||
net.core.rmem_max = 104857600
|
||||
net.core.rmem_default= 104857600
|
||||
net.core.netdev_max_backlog = 250000
|
||||
|
||||
# save file and run the following
|
||||
sysctl -p
|
||||
|
||||
.. note ::
|
||||
This is the most basic setting, which is sometimes more than enough.
|
||||
|
||||
#. For 10Gb,
|
||||
* MTU must be set up to 9000 for jumbo frames on detector, switch and server NIC
|
||||
|
||||
* Set up static MAC address tables with separated VLANs
|
||||
|
||||
#. Write to memory if not a large disk and pc not fast enough.
|
||||
.. code-block:: bash
|
||||
|
||||
mount -t tmpfs none /ramdisk_folder
|
||||
# or
|
||||
mount -t tmpfs none /mnt/ramdisk -o size=10G
|
||||
# check how many GB memory you can allocate, to avoid swapping otherwise
|
||||
|
||||
|
||||
#. Modify ethtool settings.
|
||||
* rx ring parameters
|
||||
.. code-block:: bash
|
||||
|
||||
# check
|
||||
ethtool -g xth1
|
||||
|
||||
# set to max value in your pc settings
|
||||
ethtool -G xth1 rx 4096
|
||||
|
||||
* coalesce settings (might not always work)
|
||||
.. code-block:: bash
|
||||
|
||||
# check
|
||||
ethtool -c xth1
|
||||
|
||||
# set to max value in your pc settings
|
||||
ethtool -C xth1 rx-usecs 100
|
||||
|
||||
* pause parameters
|
||||
.. code-block:: bash
|
||||
|
||||
# check
|
||||
ethtool -a xth1
|
||||
|
||||
# set to max value in your pc settings
|
||||
ethtool -A xth1 rx on
|
||||
|
||||
.. note ::
|
||||
|
||||
| xth1 is example interface name.
|
||||
| These settings are lost at pc reboot.
|
||||
|
||||
#. Give user speicific user scheduling privileges.
|
||||
.. code-block:: bash
|
||||
|
||||
# edit /etc/security/limits.conf
|
||||
# add following line or similar depending on your distribution
|
||||
username rtprio 99
|
||||
|
||||
.. note ::
|
||||
|
||||
This is also set if slsReceiver is run as root user.
|
||||
|
||||
|
||||
#. Disable power saving in CPU frequency
|
||||
.. code-block:: bash
|
||||
|
||||
# or similar command depending on your distribution
|
||||
cpupower frequency-info
|
||||
cpupower frequency-set -g performance
|
||||
|
||||
# or
|
||||
cpufreq-info
|
||||
for i in ‘seq 0 7‘; do cpufreq-set -c $i -g performance; done
|
||||
|
||||
|
||||
slsReceiver Tuning
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Starting receiver as root to have scheduling privileges.
|
||||
|
||||
#. For 10g, enable flow control
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_put flowcontrol10g 1
|
||||
|
||||
#. Increase slsReceiver fifo depth between listening and processing threads.
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_get rx_fifodepth
|
||||
# sets number of frames in fifo to 5000
|
||||
sls_detector_put rx_fifodepth 5000
|
||||
|
||||
#. Increase number of frames per file to reduce time taken to open and close files.
|
||||
.. code-block:: bash
|
||||
|
||||
sls_detector_get rx_framesperfile
|
||||
sls_detector_put rx_framesperfile 20000
|
||||
# writes all frames into a single file
|
||||
sls_detector_put rx_framesperfile 0
|
||||
|
||||
|
||||
Shared memory error
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
| For errors due to access or size, delete shared memory files nd try again.
|
||||
|
||||
To list all shared memory files of sls detector package.
|
||||
.. code-block:: bash
|
||||
|
||||
ll /dev/shm/slsDetectorPackage*
|
||||
-rw-------. 1 l_d l_d 136 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0
|
||||
-rw-------. 1 l_d l_d 3476 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0_sls_0
|
||||
-rw-------. 1 l_d l_d 3476 Oct 1 11:42 /dev/shm/slsDetectorPackage_multi_0_sls_1
|
||||
|
||||
Cannot connect to detector
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Ensure both control and stop servers are running on the detector.
|
||||
.. code-block:: bash
|
||||
|
||||
ps -ef | grep jungfrauDetectorServer*
|
||||
|
||||
Cannot connect to receiver
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Start receiver before running a client command that needs to communicate with receiver.
|
||||
|
||||
Receiver: cannot bind socket
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
#. slsReceiver or slsMultiReceiver is already open somewhere.
|
||||
* Kill it and restart it.
|
||||
|
||||
#. Tcp port is in use by another application.
|
||||
* Start Receiver with a different tcp port and adjust it config file
|
||||
.. code-block:: bash
|
||||
|
||||
# restart receiver with different port
|
||||
slsReceiver -t1980
|
||||
|
||||
# adjust in config file
|
||||
rx_hostname pcxxxx:1980
|
||||
|
||||
.. _common troubleshooting multi module data:
|
||||
|
||||
Cannot get multi module data
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Possible causes could be the following:
|
||||
|
||||
#. Network
|
||||
* If you have a direct connection, check to see if the network cables are connected correctly to corresponding interfaces on the PC side. Check also the network configuration and that the detectors and receivers are in the corresponding subnet.
|
||||
|
||||
#. Power Supply
|
||||
* Check power supply current limit.
|
||||
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
|
||||
|
||||
|
||||
Cannot ping module (Nios)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you executed "reboot" command on the board, you cannot ping it anymore unless you power cycle. To reboot the controller, please use the software command ("rebootcontroller"), which talks to the microcontroller.
|
||||
|
||||
Gotthard2
|
||||
---------
|
||||
|
||||
Cannot get data without a module attached
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You cannot get data without a module attached as a specific pin is floating. Attach module to get data.
|
||||
|
||||
|
||||
Gotthard
|
||||
----------
|
||||
|
||||
|
||||
Missing first frame or next frame after a delay
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Connect the data link from the Module directly to receiver pc or to a private network.
|
||||
|
||||
|
||||
Jungfrau
|
||||
---------
|
||||
|
||||
Temperature event occured
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
This will occur only if:
|
||||
* temp_threshold (threshold temperature) has been set to a value
|
||||
* temp_control (temperature control) set to 1
|
||||
* and the temperature overshooted the threshold temperature.
|
||||
|
||||
**Consequence**
|
||||
* sls_detector_get temp_event will give 1 # temperature event occured
|
||||
* the chip will be powered off
|
||||
|
||||
**Solution**
|
||||
* Even after fixing the cooling, any subsequent powerchip command will fail unless the temperature event has been cleared.
|
||||
|
||||
* Clear the temperature event
|
||||
.. code-block:: bash
|
||||
|
||||
# gives the current chip power status (zero currently as chip powered off)
|
||||
sls_detector_get powerchip
|
||||
|
||||
# clear temperature event
|
||||
sls_detector_put temp_event 0
|
||||
|
||||
# power on the chip
|
||||
sls_detector_put powerchip 1
|
||||
|
||||
|
||||
.. _Jungfrau Troubleshooting Power Supply:
|
||||
|
||||
Cannot get multi module data
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
#. Check :ref:`Common Multi Module Troubleshooting<common troubleshooting multi module data>`
|
||||
#. Power Supply
|
||||
* Comment out this line in the config file: powerchip 1
|
||||
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
||||
|
@ -1,149 +0,0 @@
|
||||
.. _Virtual Detector Servers:
|
||||
Detector Simulators
|
||||
===================
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
|
||||
* Using CMake, turn on the option
|
||||
.. code-block:: bash
|
||||
|
||||
SLS_USE_SIMULATOR=ON
|
||||
|
||||
* Using cmk.sh script,
|
||||
.. code-block:: bash
|
||||
|
||||
./cmk.sh -bsj9 #option s is for simulator
|
||||
|
||||
|
||||
Binaries
|
||||
^^^^^^^^
|
||||
.. code-block:: bash
|
||||
|
||||
eigerDetectorServerMaster_virtual
|
||||
eigerDetectorServerSlaveTop_virtual
|
||||
eigerDetectorServerSlaveBottom_virtual
|
||||
jungfrauDetectorServer_virtual
|
||||
gotthardDetectorServer_virtual
|
||||
gotthard2DetectorServer_virtual
|
||||
mythen3DetectorServer_virtual
|
||||
moenchDetectorServer_virtual
|
||||
ctbDetectorServer_virtual
|
||||
|
||||
|
||||
Arguments
|
||||
---------
|
||||
|
||||
The arguments are the same as the :ref:`normal server arguments<Detector Server Arguments>`.
|
||||
|
||||
When using multiple modules, use different ports for each virtual server.
|
||||
.. code-block:: bash
|
||||
|
||||
# will start control server at port 1912 and stop server at port 1913
|
||||
jungfrauDetectorServer --port 1912 &
|
||||
|
||||
# will start second control server at port 1914 and stop server at port 1915
|
||||
jungfrauDetectorServer --port 1914 &
|
||||
|
||||
|
||||
Client
|
||||
------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# hostname should include the port (if not default)
|
||||
sls_detector_put hostname localhost:1912+localhost:1914+
|
||||
|
||||
# or use virtual command, instead of hostname
|
||||
# connects to 2 servers at localhost
|
||||
# (control servers: 1912, 1914; stop servers: 1913, 1915)
|
||||
sls_detector_put virtual 2 1912
|
||||
|
||||
Use the same in the config file.
|
||||
Detector API has a method 'isVirtualDetectorServer' to check if on-board detector server is virtual.
|
||||
|
||||
|
||||
Sample Config file
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
||||
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to control port 1912
|
||||
hostname localhost:1912+
|
||||
|
||||
# connects to receiver at ports 2012
|
||||
rx_hostname mpc1922:2012+
|
||||
|
||||
# sets destination udp ports (not needed, default is 50001)
|
||||
udp_dstport 50012
|
||||
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
udp_srcip 192.168.1.112
|
||||
|
||||
# destination udp ip picked up from rx_hostname (if auto)
|
||||
udp_dstip auto
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
For Multiple Modules
|
||||
.. code-block:: bash
|
||||
|
||||
# connects to control ports 1912, 1914 and stop ports 1913, 1915
|
||||
virtual 2 1912
|
||||
# or hostname localhost:1912+localhost:1914+
|
||||
|
||||
# connects to receivers at ports 2012 and 2014
|
||||
rx_hostname mpc1922:2012+mpc1922:2013+
|
||||
|
||||
# sets differernt destination udp ports
|
||||
0:udp_dstport 50012
|
||||
1:udp_dstport 50014
|
||||
|
||||
# source udp ips must be same subnet at destintaion udp ips
|
||||
0:udp_srcip 192.168.1.112
|
||||
1:udp_srcip 192.168.1.114
|
||||
|
||||
# destination udp ip picked up from rx_hostname (if auto)
|
||||
udp_dstip auto
|
||||
|
||||
# set file path
|
||||
fpath /tmp
|
||||
|
||||
Receivers
|
||||
----------
|
||||
Same as if you would use an actual detector
|
||||
|
||||
For a Single Module
|
||||
.. code-block:: bash
|
||||
|
||||
slsReceiver -t2012
|
||||
|
||||
|
||||
For Multiple Modules
|
||||
.. code-block:: bash
|
||||
|
||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
||||
slsMultiReceiver 2012 2 0
|
||||
|
||||
Gui
|
||||
----
|
||||
| Same as if you would use an actual detector.
|
||||
| Compile with SLS_USE_GUI=ON in cmake or -g option in cmk.sh script.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
slsDetectorGui
|
||||
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
#. Data coming out of virtual server is fake. Value at each pixel/ channel is incremented by 1.
|
||||
|
||||
#. A stop will stop the virtual acquisition only at the start of every new frame.
|
||||
|
||||
#. Triggers are counted as number of virtual frames. trigger command to send a software trigger (Mythen3 & Eiger) is not implemented in virtual server.
|
||||
|
||||
#. firmware version and serial number will give 0.
|
4
docs/static/extra.css
vendored
4
docs/static/extra.css
vendored
@ -1,4 +0,0 @@
|
||||
/* override table no-wrap */
|
||||
.wy-table-responsive table td, .wy-table-responsive table th {
|
||||
white-space: normal;
|
||||
}
|
@ -1,5 +1,3 @@
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
GITREPO1='git remote -v'
|
||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
||||
BRANCH1='git branch -v'
|
||||
|
@ -1,37 +1,33 @@
|
||||
# detetctor geometry, long side of the module first
|
||||
detsize 1024 512
|
||||
|
||||
# detector hostname for controls
|
||||
detsizechan 1024 512
|
||||
#detetctor geometry, long side of the module first
|
||||
hostname beb059+beb058+
|
||||
#1Gb detector hostname for controls
|
||||
|
||||
# 1Gb receiver pc hostname with tcp port to configure receiver
|
||||
rx_hostname x12sa-vcons:1991+x12sa-vcons:1992
|
||||
0:rx_tcpport 1991
|
||||
#tcpport for the first halfmodule
|
||||
0:rx_udpport 50011
|
||||
#udp port first quadrant, first halfmodule
|
||||
0:rx_udpport2 50012
|
||||
#udp port second quadrant, first halfmodule
|
||||
0:rx_udpip 10.0.30.210
|
||||
#udp IP of the receiver over 10Gb
|
||||
0:detectorip 10.0.30.100
|
||||
#first half module 10 Gb IP
|
||||
|
||||
# udp port first quadrant, first halfmodule
|
||||
0:udp_dstport 50011
|
||||
1:rx_tcpport 1992
|
||||
#tcpport for the second halfmodule
|
||||
1:rx_udpport 50013
|
||||
#udp port first quadrant, second halfmodule
|
||||
1:rx_udpport2 50014
|
||||
#udp port second quadrant, second halfmodule
|
||||
1:rx_udpip 10.0.40.210
|
||||
#udp IP of the receiver over 10Gb,
|
||||
#can be the same or different from 0:rx_udpip
|
||||
1:detectorip 10.0.40.101
|
||||
#second half module 10 Gb IP
|
||||
|
||||
# udp port second quadrant, first halfmodule
|
||||
0:udp_dstport2 50012
|
||||
rx_hostname x12sa-vcons
|
||||
#1Gb receiver pc hostname
|
||||
|
||||
# udp IP of the receiver over 10Gb
|
||||
0:udp_dstip 10.0.30.210
|
||||
|
||||
# first half module 10 Gb IP (same subnet as 0:udp_dstip)
|
||||
0:udp_srcip 10.0.30.100
|
||||
|
||||
# udp port first quadrant, second halfmodule
|
||||
1:udp_dstport 50013
|
||||
|
||||
# udp port second quadrant, second halfmodule
|
||||
1:udp_dstport2 50014
|
||||
|
||||
# udp IP of the receiver over 10Gb,
|
||||
1:udp_dstip 10.0.40.210
|
||||
|
||||
# second half module 10 Gb IP
|
||||
# can be the same or different from 0:rx_udpip
|
||||
# butsame subnet as 1:udp_dstip
|
||||
1:udp_srcip 10.0.40.101
|
||||
|
||||
# output directory
|
||||
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
threaded 1
|
||||
|
@ -1,21 +1,24 @@
|
||||
# detetctor geometry, long side of the module first
|
||||
detsize 1024 512
|
||||
|
||||
# detector hostname for controls
|
||||
detsizechan 1024 512
|
||||
#detetctor geometry, long side of the module first
|
||||
hostname beb059+beb058+
|
||||
#1Gb detector hostname for controls
|
||||
|
||||
# 1Gb receiver pc hostname with tcp port to configure receiver
|
||||
rx_hostname x12sa-vcons:1991+x12sa-vcons:1992
|
||||
|
||||
# udp port first quadrant, first halfmodule
|
||||
0:udp_dstport 50011
|
||||
0:rx_tcpport 1991
|
||||
#tcpport for the first halfmodule
|
||||
0:rx_udpport 50011
|
||||
#udp port first quadrant, first halfmodule
|
||||
0:rx_udpport2 50012
|
||||
#udp port second quadrant, first halfmodule
|
||||
0:udp_dstport2 50012
|
||||
|
||||
# udp port first quadrant, second halfmodule
|
||||
1:udp_dstport 50013
|
||||
# udp port second quadrant, second halfmodule
|
||||
1:udp_dstport2 50014
|
||||
1:rx_tcpport 1992
|
||||
#tcpport for the second halfmodule
|
||||
1:rx_udpport 50013
|
||||
#udp port first quadrant, second halfmodule
|
||||
1:rx_udpport2 50014
|
||||
#udp port second quadrant, second halfmodule
|
||||
|
||||
# output directory
|
||||
fpath /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
rx_hostname x12sa-vcons
|
||||
#1Gb receiver pc hostname
|
||||
|
||||
outdir /sls/X12SA/data/x12saop/Data10/Eiger0.5M
|
||||
threaded 1
|
||||
|
@ -1,12 +1,27 @@
|
||||
# detector hostname
|
||||
hostname bchip007
|
||||
|
||||
# receiver pc hostname of 1Gb IP of the machine
|
||||
rx_hostname my_receiver_hostname
|
||||
|
||||
# output directory
|
||||
fpath /bigRAID/datadir_gotthard/rec_test_data
|
||||
|
||||
# high voltage
|
||||
highvoltage 120
|
||||
#0:port 1952
|
||||
#0:stopport 1953
|
||||
#0:rx_tcpport 1956 must also have this in receiver config file
|
||||
0:angdir 1.000000
|
||||
0:moveflag 0.000000
|
||||
0:extsig:0 off
|
||||
#0:detectorip 129.129.202.9
|
||||
0:detectormac 00:aa:bb:cc:dd:ee
|
||||
0:rx_udpport 50004
|
||||
0:rx_udpip 129.129.202.98
|
||||
0:rx_hostname pc6898
|
||||
0:outdir /bigRAID/datadir_gotthard/rec_test_data
|
||||
0:vhighvoltage 120
|
||||
master -1
|
||||
sync none
|
||||
outdir /bigRAID/datadir_gotthard/rec_test_data
|
||||
headerbefore none
|
||||
headerafter none
|
||||
headerbeforepar none
|
||||
headerafterpar none
|
||||
badchannels none
|
||||
angconv none
|
||||
globaloff 0.000000
|
||||
binsize 0.001000
|
||||
|
||||
|
@ -1,129 +0,0 @@
|
||||
#Gain index ADU value (12 bit)
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
||||
1 3655
|
@ -1,129 +1,132 @@
|
||||
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain #G1 Energy #G2 Energy
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
100 100 100 10 1 0.1 300 7000
|
||||
#G1 Energy #G2 Energy
|
||||
300 7000
|
||||
|
||||
#G0 pedestal G1 pedestal G2 pedestal G0 gain G1 gain G2 gain (for every channel) ADU
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
100 100 100 10 1 0.1
|
||||
|
@ -1,34 +0,0 @@
|
||||
# detector hostname
|
||||
hostname strip3
|
||||
|
||||
# receiver pc hostname with tcp port
|
||||
rx_hostname pc12365:1982
|
||||
|
||||
# udp source ip
|
||||
udp_srcip 10.1.1.184
|
||||
|
||||
# udp destination ip (receiver interface ip)
|
||||
udp_dstip 10.1.1.107
|
||||
|
||||
# only needed for debugging veto signals
|
||||
# udp destination port must be different from udp_dstport (default of 50001)
|
||||
udp_dstport2 50084
|
||||
udp_srcip2 10.1.1.185
|
||||
udp_dstip2 10.1.1.107
|
||||
|
||||
# output directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
# to enable 2nd interface for veto debugging
|
||||
numinterfaces 2
|
||||
|
||||
# enable veto data streaming
|
||||
veto 1
|
||||
|
||||
# Sampling pipeline 1 clk
|
||||
reg 0x120 0x00000010
|
||||
clkphase 1 135 deg
|
||||
|
32
examples/gotthard_setup.det
Executable file
32
examples/gotthard_setup.det
Executable file
@ -0,0 +1,32 @@
|
||||
fname run
|
||||
index 0
|
||||
dr 16
|
||||
settings veryhighgain
|
||||
threshold 0
|
||||
exptime 0.000002990
|
||||
period 0.000024984
|
||||
delay 0.999999968
|
||||
gates 1
|
||||
frames 300000.000000000
|
||||
triggers 1.000000000
|
||||
timing auto
|
||||
fineoff 0.000000
|
||||
startscript none
|
||||
startscriptpar none
|
||||
stopscript none
|
||||
stopscriptpar none
|
||||
scriptbefore none
|
||||
scriptbeforepar none
|
||||
scriptafter none
|
||||
scriptafterpar none
|
||||
scan0script none
|
||||
scan0par none
|
||||
scan0prec 0
|
||||
scan0steps 0
|
||||
scan1script none
|
||||
scan1par none
|
||||
scan1prec 0
|
||||
scan1steps 0
|
||||
ratecorr 0.000000
|
||||
flatfield none
|
||||
badchannels none
|
@ -1,17 +1,17 @@
|
||||
# detector hostname
|
||||
detsizechan 2560 1
|
||||
|
||||
hostname bchip074+bchip075+
|
||||
|
||||
# receiver pc hostname of 1Gb IP of the machine (with tcpport)
|
||||
rx_hostname my_receiver_hostname+my_receiver_hostname:1955
|
||||
|
||||
# default udp destination port 50001
|
||||
1:udp_dstport 50002
|
||||
0:extsig:0 trigger_in_rising_edge
|
||||
0:rx_tcpport 1954
|
||||
0:rx_udpport 50001
|
||||
0:vhighvoltage 0
|
||||
|
||||
# output directory
|
||||
fpath /tmp
|
||||
|
||||
extsig 0 trigger_in_rising_edge
|
||||
highvoltage 0
|
||||
1:extsig:0 trigger_in_rising_edge
|
||||
1:rx_tcpport 1955
|
||||
1:rx_udpport 50002
|
||||
1:vhighvoltage 0
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
@ -19,27 +19,39 @@ highvoltage 0
|
||||
#########
|
||||
##############################################################################
|
||||
|
||||
## receiver pc hostname of 1Gb IP of the machine
|
||||
#rx_zmqip my_receiver_hostname
|
||||
## client/gui or softIOc pc hostname
|
||||
#zmqip my_client_hostname
|
||||
|
||||
## rxr zmq streaming out port
|
||||
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
|
||||
#0:rx_zmqip my_receiver_hostname
|
||||
#0:rx_zmqport 30003
|
||||
## client zmq listening port
|
||||
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
|
||||
#0:zmqip my_client_hostname
|
||||
#0:zmqport 40003
|
||||
## rxr zmq streaming out port
|
||||
#1:rx_zmqport 30004
|
||||
## client zmq listening port
|
||||
#1:zmqport 40004
|
||||
|
||||
## stream out every frame via zmq
|
||||
#rx_zmqfreq 1
|
||||
## enable zmq streaming
|
||||
#rx_zmqstream 1
|
||||
# #replace my_receiver_hostname with the hostname of IP of the machine where the receiver runs
|
||||
#1:rx_zmqip my_receiver_hostname
|
||||
#1:rx_zmqport 30004
|
||||
# #replace my_client_hostname with the hostname of IP of the machine where the client/GUI or softIOC runs
|
||||
#1:zmqip my_client_hostname
|
||||
#1:zmqport 40004
|
||||
|
||||
##############################################################################
|
||||
#########
|
||||
######### until here
|
||||
#########
|
||||
##############################################################################
|
||||
|
||||
|
||||
r_readfreq 1
|
||||
rx_datastream 1
|
||||
|
||||
#replace my_receiver_hostname with the hostname of 1Gb IP of the machine where the receiver runs
|
||||
rx_hostname my_receiver_hostname
|
||||
rx_datastream 1
|
||||
outdir /tmp/
|
||||
|
||||
|
||||
settings veryhighgain
|
||||
exptime 0.000005
|
||||
period 0.0001
|
||||
|
||||
vhighvoltage 90
|
||||
|
||||
|
@ -1,38 +1,16 @@
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
hostname localhost
|
||||
|
||||
# 1Gb receiver pc hostname (default tcpport: 1954)
|
||||
rx_hostname pcmoench01
|
||||
0:rx_udpport 50004
|
||||
0:rx_udpip 172.24.8.84
|
||||
0:detectorip 172.24.8.254
|
||||
rx_hostname localhost
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
#powerchip 1
|
||||
#vhighvoltage 200
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
#extsig:0 trigger_in_rising_edge
|
||||
#timing trigger
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
outdir /tmp/slsdetector
|
||||
|
||||
# PCBv2.0 (using 2 interfaces, top)
|
||||
udp_dstport2 50005
|
||||
udp_dstip2 10.0.2.100
|
||||
udp_srcip2 10.0.2.184
|
||||
# enable two interfaces
|
||||
numinterfaces 2
|
||||
# select inner interface(effective only when numinterfaces is 1)
|
||||
#selinterface 1
|
||||
|
||||
# power on chip
|
||||
powerchip 1
|
||||
|
||||
# high voltage
|
||||
highvoltage 200
|
||||
|
||||
# timing to trigger
|
||||
timing trigger
|
||||
|
||||
# output file directory
|
||||
fpath /external_pool/jungfrau_data/softwaretest
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
@ -1,39 +0,0 @@
|
||||
# detector hostname
|
||||
hostname bchip052
|
||||
|
||||
# do not use any rx_ or "file" (eg. fwrite, fpath) commands, which go to slsReceiver/slsMultiReceiver
|
||||
|
||||
# udp destination port (receiver)
|
||||
udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
udp_dstip 10.0.1.100
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 10.0.1.184
|
||||
|
||||
# udp destination mac
|
||||
udp_dstmac 22:47:d5:48:ad:ef
|
||||
|
||||
|
||||
# PCBv2.0 (using 2 interfaces, top)
|
||||
udp_dstport2 50005
|
||||
udp_dstip2 10.0.2.100
|
||||
udp_srcip2 10.0.2.184
|
||||
udp_dstmac2 22:47:d5:48:ad:ff
|
||||
|
||||
|
||||
# enable two interfaces
|
||||
numinterfaces 2
|
||||
# select inner interface(effective only when numinterfaces is 1)
|
||||
#selinterface 1
|
||||
|
||||
# power on chip
|
||||
powerchip 1
|
||||
|
||||
# high voltage
|
||||
highvoltage 200
|
||||
|
||||
# timing to trigger
|
||||
timing trigger
|
||||
|
@ -1,49 +1,26 @@
|
||||
# detector geometry x, y
|
||||
detsize 1024 1024
|
||||
|
||||
# detector hostname
|
||||
detsizechan 1024 1024
|
||||
hostname bchip048+bchip052+
|
||||
|
||||
# 1Gb receiver pc hostname (default tcpport: 1954)
|
||||
rx_hostname pcmoench01+pcmoench01:1955
|
||||
0:rx_udpport 50004
|
||||
0:rx_udpip 10.1.1.100
|
||||
0:rx_udpmac F4:52:14:2F:32:00
|
||||
0:detectorip 10.1.1.10
|
||||
0:detectormac 00:aa:bb:cc:dd:33
|
||||
|
||||
1:rx_tcpport 1955
|
||||
1:rx_udpport 50005
|
||||
1:rx_udpip 10.1.1.100
|
||||
1:rx_udpmac F4:52:14:2F:32:00
|
||||
1:detectorip 10.1.1.11
|
||||
1:detectormac 00:aa:bb:cc:dd:33
|
||||
|
||||
rx_hostname pcmoench01
|
||||
|
||||
# udp configurations for 1st module
|
||||
# udp destination port (receiver)
|
||||
0:udp_dstport 50004
|
||||
|
||||
# udp destination ip (receiver)
|
||||
0:udp_dstip 10.1.1.100
|
||||
|
||||
# udp source ip (same subnet as 0:udp_dstip)
|
||||
0:udp_srcip 10.1.1.10
|
||||
|
||||
|
||||
|
||||
# udp configurations for 2nd module
|
||||
# udp destination port (receiver)
|
||||
1:udp_dstport 50005
|
||||
|
||||
# udp destination ip (receiver)
|
||||
1:udp_dstip 10.1.1.100
|
||||
|
||||
# udp source ip (same subnet as 1:udp_dstip)
|
||||
1:udp_srcip 10.1.1.11
|
||||
|
||||
|
||||
|
||||
# power on chip
|
||||
powerchip 1
|
||||
vhighvoltage 200
|
||||
#extsig:0 trigger_in_rising_edge
|
||||
#timing trigger
|
||||
|
||||
# high voltage
|
||||
highvoltage 200
|
||||
outdir /external_pool/jungfrau_data/softwaretest
|
||||
|
||||
# timing to trigger
|
||||
timing trigger
|
||||
|
||||
# output file directory
|
||||
fpath /external_pool/jungfrau_data/softwaretest
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
@ -1,32 +0,0 @@
|
||||
# file name prefix
|
||||
fname measurement1
|
||||
|
||||
# file acquisition index
|
||||
findex 3000
|
||||
|
||||
# dynamic range (only for Mythen3 and Eiger)
|
||||
dr 32
|
||||
|
||||
# settings
|
||||
settings veryhighgain
|
||||
|
||||
# exposure time
|
||||
exptime 100us
|
||||
|
||||
# period
|
||||
period 2ms
|
||||
|
||||
# frames per trigger
|
||||
frames 30000
|
||||
|
||||
# timing mode
|
||||
timing trigger
|
||||
|
||||
# triggers
|
||||
triggers 10
|
||||
|
||||
# delay after trigger
|
||||
delay 1ms
|
||||
|
||||
|
||||
|
140
examples/jctb_moench03_T1.config → examples/moench01_T1_lab.config
Normal file → Executable file
140
examples/jctb_moench03_T1.config → examples/moench01_T1_lab.config
Normal file → Executable file
@ -1,12 +1,4 @@
|
||||
initialchecks 0
|
||||
#############################################
|
||||
### edit with hostname or IP address of your detector
|
||||
############################################
|
||||
hostname bchip181+
|
||||
runclk 40
|
||||
adcclk 20
|
||||
dbitclk 40
|
||||
|
||||
hostname bchip085+
|
||||
|
||||
patword 0000 0000000000000000
|
||||
patword 0001 0000000000000000
|
||||
@ -416,80 +408,84 @@ patnloop1 0
|
||||
patloop2 0400 0400
|
||||
patnloop2 0
|
||||
patwait0 00aa
|
||||
patwaittime0 10000
|
||||
patwaittime0 40000
|
||||
patwait1 0400
|
||||
patwaittime1 0
|
||||
patwait2 0400
|
||||
patwaittime2 0
|
||||
|
||||
#############################################
|
||||
### edit with hostname or 1Gbs IP address of your server
|
||||
############################################
|
||||
rx_hostname mpc2011
|
||||
#rx_hostname mpc2011:1977
|
||||
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
udp_dstip 10.1.1.102
|
||||
#udp_dstip 129.129.202.136
|
||||
#############################################
|
||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||
############################################
|
||||
udp_srcip 10.1.1.19
|
||||
#udp_srcip 129.129.202.13
|
||||
####mcp2011
|
||||
#0:rx_udpip 10.1.1.102
|
||||
#0:detectorip 10.1.1.19
|
||||
#0:rx_udpport 32410
|
||||
####gui listening to
|
||||
#zmqip 129.129.202.131
|
||||
#zmqport 30001
|
||||
####data streaming out of
|
||||
#rx_zmqip 10.1.2.103
|
||||
#rx_zmqport 30003
|
||||
#0:rx_hostname mpc2011
|
||||
|
||||
udp_dstport 33410
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
#zmqip 129.129.202.110
|
||||
#rx_zmqip 10.1.1.102
|
||||
#rx_zmqport 30001
|
||||
#############################################
|
||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||
############################################
|
||||
#zmqip 129.129.202.110
|
||||
#zmqport 50001
|
||||
####mx-test-1
|
||||
0:rx_udpip 10.1.1.100
|
||||
0:detectorip 10.1.1.19
|
||||
0:rx_udpport 32410
|
||||
####gui listening to (on receiver pc)
|
||||
zmqip 129.129.202.92
|
||||
zmqport 30001
|
||||
####data streaming out of
|
||||
rx_zmqip 10.1.1.100
|
||||
rx_zmqport 30003
|
||||
0:rx_hostname pcmoench01
|
||||
|
||||
|
||||
tengiga 1
|
||||
rx_zmqstream 1
|
||||
rx_zmqfreq 1
|
||||
|
||||
|
||||
dac 6 800
|
||||
dac 0 1300
|
||||
dac 4 1428
|
||||
dac 1 1000
|
||||
dac 7 900
|
||||
dac 3 680
|
||||
dac 2 1400
|
||||
dac 5 1200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#turn on datastream from commandline
|
||||
rx_datastream 1
|
||||
|
||||
r_readfreq 1
|
||||
|
||||
#0:configuremac -1
|
||||
rx_datastream 1
|
||||
|
||||
r_readfreq 1
|
||||
|
||||
|
||||
dac:6 800
|
||||
dac:0 1300
|
||||
dac:4 1428
|
||||
dac:1 1000
|
||||
dac:7 900
|
||||
dac:3 680
|
||||
dac:2 1400
|
||||
dac:5 1200
|
||||
adcinvert 4a342593
|
||||
#0xb5cbda6c
|
||||
asamples 5000
|
||||
dsamples 0
|
||||
adcphase 30 deg
|
||||
adcpipeline 14
|
||||
samples 5000
|
||||
adcphase 90
|
||||
adcpipeline 15
|
||||
adcreg 14 40
|
||||
|
||||
|
||||
frames 1000
|
||||
period 0.001
|
||||
#############################################
|
||||
### edit with directory you want to write to
|
||||
############################################
|
||||
fpath /tmp/
|
||||
fwrite 0
|
||||
|
||||
romode analog
|
||||
#rx_jsonaddheader frameMode
|
||||
rx_jsonpara frameMode newpedestal
|
||||
#rx_jsonaddheader detectorMode
|
||||
rx_jsonpara detectorMode analog
|
||||
#flags newpedestal
|
||||
#flags analog
|
||||
|
||||
powerchip 1
|
||||
highvoltage 90
|
||||
vhighvoltage 90
|
||||
period 0.005
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
frames 100
|
||||
period 0.1
|
||||
outdir /scratch/
|
||||
enablefwrite 0
|
||||
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
#initialchecks 0
|
||||
#############################################
|
||||
### edit with hostname or IP address of your detector
|
||||
############################################
|
||||
#hostname bchip181+
|
||||
hostname bchip181+
|
||||
|
||||
#############################################
|
||||
### edit with hostname or 1Gbs IP address of your server
|
||||
############################################
|
||||
rx_hostname mpc2011
|
||||
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
udp_dstip 10.1.1.102
|
||||
#############################################
|
||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||
############################################
|
||||
udp_srcip 10.1.1.19
|
||||
udp_dstport 32411
|
||||
|
||||
#############################################
|
||||
### edit with 10 Gbs IP of your server
|
||||
############################################
|
||||
rx_zmqip 10.1.1.102
|
||||
rx_zmqport 50003
|
||||
#############################################
|
||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||
############################################
|
||||
zmqip 129.129.202.98
|
||||
zmqport 50001
|
||||
|
||||
|
||||
|
||||
tengiga 1
|
||||
rx_zmqstream 1
|
||||
|
||||
|
||||
|
||||
frames 100000
|
||||
period 0.0006
|
||||
exptime 0.00035
|
||||
|
||||
#############################################
|
||||
### edit with directory you want to write to
|
||||
############################################
|
||||
fpath /mnt/moench_data/scratch1/
|
||||
|
||||
fwrite 0
|
||||
|
||||
rx_jsonpara frameMode frame
|
||||
rx_jsonpara detectorMode counting
|
||||
rx_discardpolicy discardpartial
|
||||
|
||||
|
||||
adcpipeline 15
|
||||
|
||||
powerchip 1
|
||||
highvoltage 90
|
||||
|
||||
#adcreg 0x14 0x40
|
||||
|
||||
|
55
examples/two_gotthard.config
Executable file
55
examples/two_gotthard.config
Executable file
@ -0,0 +1,55 @@
|
||||
#####Any line with a # is not read######
|
||||
|
||||
detsizechan 2560 1
|
||||
|
||||
hostname bchip007+bchip009+
|
||||
|
||||
#0:hostname bchip007
|
||||
#0:port 1952
|
||||
#0:stopport 1953
|
||||
#0:rx_tcpport 1956
|
||||
0:angdir 1.000000
|
||||
0:moveflag 0.000000
|
||||
0:ffdir /home/l_msdetect
|
||||
0:extsig:0 off
|
||||
|
||||
0:detectorip 10.1.1.2
|
||||
#0:detectormac 00:aa:bb:cc:dd:ee
|
||||
#0:rx_udpport 50001
|
||||
0:rx_udpip 10.1.1.1
|
||||
0:rx_hostname 129.129.202.134
|
||||
0:outdir /data/speedt
|
||||
0:vhighvoltage 120
|
||||
|
||||
|
||||
#1:hostname bchip009
|
||||
#1:port 1952
|
||||
#1:stopport 1953
|
||||
1:rx_tcpport 1957
|
||||
1:angdir 1.000000
|
||||
1:moveflag 0.000000
|
||||
1:ffdir /home/l_msdetect
|
||||
1:extsig:0 off
|
||||
|
||||
1:detectorip 10.1.2.2
|
||||
#1:detectormac 00:aa:bb:cc:dd:ee
|
||||
1:rx_udpport 50004
|
||||
1:rx_udpip 10.1.2.1
|
||||
1:rx_hostname 129.129.202.134
|
||||
1:outdir /data/speedt
|
||||
1:vhighvoltage 120
|
||||
|
||||
|
||||
master -1
|
||||
sync none
|
||||
outdir /data/speedt
|
||||
ffdir /home/l_msdetect
|
||||
headerbefore none
|
||||
headerafter none
|
||||
headerbeforepar none
|
||||
headerafterpar none
|
||||
badchannels none
|
||||
angconv none
|
||||
globaloff 0.000000
|
||||
binsize 0.001000
|
||||
|
@ -1,477 +0,0 @@
|
||||
# detector hostname
|
||||
hostname localhost:1910
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2010
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50010
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# udp source ip (same subnet as udp_dstip)
|
||||
udp_srcip 192.168.1.100
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
|
||||
# default clocks
|
||||
runclk 40
|
||||
adcclk 20
|
||||
dbitclk 40
|
||||
|
||||
|
||||
# patterns
|
||||
patword 0x0000 0x0000000000000000
|
||||
patword 0x0001 0x0000000000000000
|
||||
patword 0x0002 0x0008000900080000
|
||||
patword 0x0003 0x0008000900080000
|
||||
patword 0x0004 0x0008000900080000
|
||||
patword 0x0005 0x0008000900080000
|
||||
patword 0x0006 0x0008000900080000
|
||||
patword 0x0007 0x0008000900080000
|
||||
patword 0x0008 0x0008000900080000
|
||||
patword 0x0009 0x0008000900080000
|
||||
patword 0x000a 0x0008000900080000
|
||||
patword 0x000b 0x0008000900080000
|
||||
patword 0x000c 0x0008000900080000
|
||||
patword 0x000d 0x0008000900080000
|
||||
patword 0x000e 0x0008000900080000
|
||||
patword 0x000f 0x0008000900080000
|
||||
patword 0x0010 0x0008000900080000
|
||||
patword 0x0011 0x0008000900080000
|
||||
patword 0x0012 0x0008000900080000
|
||||
patword 0x0013 0x0008000900080000
|
||||
patword 0x0014 0x0008000900080000
|
||||
patword 0x0015 0x0008000900080000
|
||||
patword 0x0016 0x0008400900080020
|
||||
patword 0x0017 0x0008400900080020
|
||||
patword 0x0018 0x0008599f0418503a
|
||||
patword 0x0019 0x0008599f0418503a
|
||||
patword 0x001a 0x0108599f0418503a
|
||||
patword 0x001b 0x0108599f0418503a
|
||||
patword 0x001c 0x0108599f0418503a
|
||||
patword 0x001d 0x0108599f0418503a
|
||||
patword 0x001e 0x0108599f0418503a
|
||||
patword 0x001f 0x0108599f0418503a
|
||||
patword 0x0020 0x0108599f0418503a
|
||||
patword 0x0021 0x0108599f0418503a
|
||||
patword 0x0022 0x0108599f0418503a
|
||||
patword 0x0023 0x0108599f0418503a
|
||||
patword 0x0024 0x0108599f0418503a
|
||||
patword 0x0025 0x0108599f0418503a
|
||||
patword 0x0026 0x0108599f0418503a
|
||||
patword 0x0027 0x0108599f0418503a
|
||||
patword 0x0028 0x0108599f0418503a
|
||||
patword 0x0029 0x0108599f0418503a
|
||||
patword 0x002a 0x0108599f0418503a
|
||||
patword 0x002b 0x0108599f0418503a
|
||||
patword 0x002c 0x0108599f0418503a
|
||||
patword 0x002d 0x0108599f0418503a
|
||||
patword 0x002e 0x0108599f0418503a
|
||||
patword 0x002f 0x0108599f0418503a
|
||||
patword 0x0030 0x0108599f0418503a
|
||||
patword 0x0031 0x0108599f0418503a
|
||||
patword 0x0032 0x0108599f0418503a
|
||||
patword 0x0033 0x0108599f0418503a
|
||||
patword 0x0034 0x0108599f0418503a
|
||||
patword 0x0035 0x0108599f0418503a
|
||||
patword 0x0036 0x0108599f0418503a
|
||||
patword 0x0037 0x0108599f0418503a
|
||||
patword 0x0038 0x0108599f0418503a
|
||||
patword 0x0039 0x0108599f0418503a
|
||||
patword 0x003a 0x0108599f0418503a
|
||||
patword 0x003b 0x0108599f0418503a
|
||||
patword 0x003c 0x0108599f0418503a
|
||||
patword 0x003d 0x0108599f0418503a
|
||||
patword 0x003e 0x0108599f0418503a
|
||||
patword 0x003f 0x0108599f0418503a
|
||||
patword 0x0040 0x0108599f0418503a
|
||||
patword 0x0041 0x0108599f0418503a
|
||||
patword 0x0042 0x0108599f0418503a
|
||||
patword 0x0043 0x0108599f0418503a
|
||||
patword 0x0044 0x0108599f0418503a
|
||||
patword 0x0045 0x0108599f0418503a
|
||||
patword 0x0046 0x0108599f0418503a
|
||||
patword 0x0047 0x0108599f0418503a
|
||||
patword 0x0048 0x0108599f0418503a
|
||||
patword 0x0049 0x0108599f0418503a
|
||||
patword 0x004a 0x0108599f0418503a
|
||||
patword 0x004b 0x0108599f0418503a
|
||||
patword 0x004c 0x0108599f0418503a
|
||||
patword 0x004d 0x0108599f0418503a
|
||||
patword 0x004e 0x0108599f0418503a
|
||||
patword 0x004f 0x0108599f0418503a
|
||||
patword 0x0050 0x0108599f0418503a
|
||||
patword 0x0051 0x0108599f0418503a
|
||||
patword 0x0052 0x0108599f0418503a
|
||||
patword 0x0053 0x0108599f0418503a
|
||||
patword 0x0054 0x0108599f0418503a
|
||||
patword 0x0055 0x0108599f0418503a
|
||||
patword 0x0056 0x0108599f0418503a
|
||||
patword 0x0057 0x0108599f0418503a
|
||||
patword 0x0058 0x0108599f0418503a
|
||||
patword 0x0059 0x0108599f0418503a
|
||||
patword 0x005a 0x0108599f0418503a
|
||||
patword 0x005b 0x0108599f0418503a
|
||||
patword 0x005c 0x0108599f0418503a
|
||||
patword 0x005d 0x0108599f0418503a
|
||||
patword 0x005e 0x0108599f0418503a
|
||||
patword 0x005f 0x0108599f0418503a
|
||||
patword 0x0060 0x0108599f0418503a
|
||||
patword 0x0061 0x0108599f0418503a
|
||||
patword 0x0062 0x0108599f0418503a
|
||||
patword 0x0063 0x0108599f0418503a
|
||||
patword 0x0064 0x0108599f0418503a
|
||||
patword 0x0065 0x0108599f0418503a
|
||||
patword 0x0066 0x0108599f0418503a
|
||||
patword 0x0067 0x0108599f0418503a
|
||||
patword 0x0068 0x0108599f0418503a
|
||||
patword 0x0069 0x0108599f0418503a
|
||||
patword 0x006a 0x0108599f0418503a
|
||||
patword 0x006b 0x0108599f0418503a
|
||||
patword 0x006c 0x0108599f0418503a
|
||||
patword 0x006d 0x0108599f0418503a
|
||||
patword 0x006e 0x0108599f0418503a
|
||||
patword 0x006f 0x0108599f0418503a
|
||||
patword 0x0070 0x0108599f0418503a
|
||||
patword 0x0071 0x0108599f0418503a
|
||||
patword 0x0072 0x0108599f0418503a
|
||||
patword 0x0073 0x0108599f0418503a
|
||||
patword 0x0074 0x0108599f0418503a
|
||||
patword 0x0075 0x0108599f0418503a
|
||||
patword 0x0076 0x0108599f0418503a
|
||||
patword 0x0077 0x0108599f0418503a
|
||||
patword 0x0078 0x0108599f0418503a
|
||||
patword 0x0079 0x0108599f0418503a
|
||||
patword 0x007a 0x0108599f0418503a
|
||||
patword 0x007b 0x0108599f0418503a
|
||||
patword 0x007c 0x0108599f0418503a
|
||||
patword 0x007d 0x0108599f0418503a
|
||||
patword 0x007e 0x010859960418503a
|
||||
patword 0x007f 0x010859960418503a
|
||||
patword 0x0080 0x010859960418503a
|
||||
patword 0x0081 0x010859960418503a
|
||||
patword 0x0082 0x010859960418503a
|
||||
patword 0x0083 0x010859960418503a
|
||||
patword 0x0084 0x010859960418503a
|
||||
patword 0x0085 0x010859960418503a
|
||||
patword 0x0086 0x010859960418503a
|
||||
patword 0x0087 0x010859960418503a
|
||||
patword 0x0088 0x010859960418503a
|
||||
patword 0x0089 0x010859960418503a
|
||||
patword 0x008a 0x010859960418503a
|
||||
patword 0x008b 0x010859960418503a
|
||||
patword 0x008c 0x010859960418503a
|
||||
patword 0x008d 0x010859960418503a
|
||||
patword 0x008e 0x010859960418503a
|
||||
patword 0x008f 0x010859960418503a
|
||||
patword 0x0090 0x010859960418503a
|
||||
patword 0x0091 0x010859960418503a
|
||||
patword 0x0092 0x010819960418501a
|
||||
patword 0x0093 0x010819960418501a
|
||||
patword 0x0094 0x010819960418501a
|
||||
patword 0x0095 0x010819960418501a
|
||||
patword 0x0096 0x030819960418501a
|
||||
patword 0x0097 0x030819960418501a
|
||||
patword 0x0098 0x030819960418501a
|
||||
patword 0x0099 0x030819960418501a
|
||||
patword 0x009a 0x030819960418501a
|
||||
patword 0x009b 0x030819960418501a
|
||||
patword 0x009c 0x030819960418501a
|
||||
patword 0x009d 0x030819960418501a
|
||||
patword 0x009e 0x030819960418501a
|
||||
patword 0x009f 0x030819960418501a
|
||||
patword 0x00a0 0x030819960418501a
|
||||
patword 0x00a1 0x030819960418501a
|
||||
patword 0x00a2 0x030819960418501a
|
||||
patword 0x00a3 0x030819960418501a
|
||||
patword 0x00a4 0x030819960418501a
|
||||
patword 0x00a5 0x030819960418501a
|
||||
patword 0x00a6 0x030819960418501a
|
||||
patword 0x00a7 0x030819960418501a
|
||||
patword 0x00a8 0x030819960418501a
|
||||
patword 0x00a9 0x030819960418501a
|
||||
patword 0x00aa 0x030819960418501a
|
||||
patword 0x00ab 0x030819960418501a
|
||||
patword 0x00ac 0x030819960008501a
|
||||
patword 0x00ad 0x030819960008501a
|
||||
patword 0x00ae 0x030819960008501a
|
||||
patword 0x00af 0x030819960008501a
|
||||
patword 0x00b0 0x030819960008501a
|
||||
patword 0x00b1 0x030819960008501a
|
||||
patword 0x00b2 0x030819960008501a
|
||||
patword 0x00b3 0x030819960008501a
|
||||
patword 0x00b4 0x030819960008501a
|
||||
patword 0x00b5 0x030819960008501a
|
||||
patword 0x00b6 0x030819960008501a
|
||||
patword 0x00b7 0x030819960008501a
|
||||
patword 0x00b8 0x030819960008501a
|
||||
patword 0x00b9 0x030819960008501a
|
||||
patword 0x00ba 0x030819960008501a
|
||||
patword 0x00bb 0x030819960008501a
|
||||
patword 0x00bc 0x030819960008501a
|
||||
patword 0x00bd 0x030819960008501a
|
||||
patword 0x00be 0x030819960008501a
|
||||
patword 0x00bf 0x030819960008501a
|
||||
patword 0x00c0 0x0308199f0008501a
|
||||
patword 0x00c1 0x0308199f0008501a
|
||||
patword 0x00c2 0x0308199f0008501a
|
||||
patword 0x00c3 0x0308199f0008501a
|
||||
patword 0x00c4 0x0308199f0008501a
|
||||
patword 0x00c5 0x0308199f0008501a
|
||||
patword 0x00c6 0x0308199f0008501a
|
||||
patword 0x00c7 0x0308199f0008501a
|
||||
patword 0x00c8 0x0308199f0008501a
|
||||
patword 0x00c9 0x0308199f0008501a
|
||||
patword 0x00ca 0x0308199f0008501a
|
||||
patword 0x00cb 0x0308199f0008501a
|
||||
patword 0x00cc 0x0308199f0008501a
|
||||
patword 0x00cd 0x0308199f0008501a
|
||||
patword 0x00ce 0x0308199f0008501a
|
||||
patword 0x00cf 0x0308199f0008501a
|
||||
patword 0x00d0 0x0308199f0008501a
|
||||
patword 0x00d1 0x0308199f0008501a
|
||||
patword 0x00d2 0x0308199f0008501a
|
||||
patword 0x00d3 0x0308199f0008501a
|
||||
patword 0x00d4 0x0308599f0008503a
|
||||
patword 0x00d5 0x0308599f0008503a
|
||||
patword 0x00d6 0x030c599f000850ba
|
||||
patword 0x00d7 0x030c599f000850ba
|
||||
patword 0x00d8 0x030c599f000850ba
|
||||
patword 0x00d9 0x030c599f000850ba
|
||||
patword 0x00da 0x030c599f000850ba
|
||||
patword 0x00db 0x030c599f000850ba
|
||||
patword 0x00dc 0x030c599f000850ba
|
||||
patword 0x00dd 0x030c599f000850ba
|
||||
patword 0x00de 0x030c599f000850ba
|
||||
patword 0x00df 0x030c599f000850ba
|
||||
patword 0x00e0 0x030c599f000850ba
|
||||
patword 0x00e1 0x030c599f000850ba
|
||||
patword 0x00e2 0x030c599f000850ba
|
||||
patword 0x00e3 0x030c599f000850ba
|
||||
patword 0x00e4 0x030c599f000850ba
|
||||
patword 0x00e5 0x030c599f000850ba
|
||||
patword 0x00e6 0x030c599f000850ba
|
||||
patword 0x00e7 0x030c599f000850ba
|
||||
patword 0x00e8 0x030c599f000850ba
|
||||
patword 0x00e9 0x030c599f000850ba
|
||||
patword 0x00ea 0x030c799f010858ba
|
||||
patword 0x00eb 0x030c799f010858ba
|
||||
patword 0x00ec 0x030c599f000850ba
|
||||
patword 0x00ed 0x030c599f000850ba
|
||||
patword 0x00ee 0x030c599f000850ba
|
||||
patword 0x00ef 0x030c599f000850ba
|
||||
patword 0x00f0 0x030c599f000850ba
|
||||
patword 0x00f1 0x030c599f000850ba
|
||||
patword 0x00f2 0x030c599f000850ba
|
||||
patword 0x00f3 0x030c599f000850ba
|
||||
patword 0x00f4 0x030c599f000850ba
|
||||
patword 0x00f5 0x030c599f000850ba
|
||||
patword 0x00f6 0x030c599f000850ba
|
||||
patword 0x00f7 0x030c599f000850ba
|
||||
patword 0x00f8 0x030c599f000850ba
|
||||
patword 0x00f9 0x030c599f000850ba
|
||||
patword 0x00fa 0x030c599f000850ba
|
||||
patword 0x00fb 0x030c599f000850ba
|
||||
patword 0x00fc 0x030c599f000850ba
|
||||
patword 0x00fd 0x030c599f000850ba
|
||||
patword 0x00fe 0x030c599f000850ba
|
||||
patword 0x00ff 0x030c599f000850ba
|
||||
patword 0x0100 0x030c599f000850ba
|
||||
patword 0x0101 0x030c599f000850ba
|
||||
patword 0x0102 0x030c599f400850ba
|
||||
patword 0x0103 0x030c599f400850ba
|
||||
patword 0x0104 0x030c599f600850ba
|
||||
patword 0x0105 0x030c599f400850ba
|
||||
patword 0x0106 0x030c599f400850ba
|
||||
patword 0x0107 0x030c599f400850ba
|
||||
patword 0x0108 0x870c599f682e50ba
|
||||
patword 0x0109 0x870c599f482850ba
|
||||
patword 0x010a 0x870c599f000e50ba
|
||||
patword 0x010b 0x870c599f000850ba
|
||||
patword 0x010c 0x870c599f000e50ba
|
||||
patword 0x010d 0x870c599f000850ba
|
||||
patword 0x010e 0x870c599f000e50ba
|
||||
patword 0x010f 0x870c599f000850ba
|
||||
patword 0x0110 0x870c599f000e50ba
|
||||
patword 0x0111 0x870c599f000850ba
|
||||
patword 0x0112 0x870c599f000e50ba
|
||||
patword 0x0113 0x870c599f000850ba
|
||||
patword 0x0114 0x870c599f000e50ba
|
||||
patword 0x0115 0x870c599f000850ba
|
||||
patword 0x0116 0x870c599f000e50ba
|
||||
patword 0x0117 0x870c599f000850ba
|
||||
patword 0x0118 0x870c599f000e50ba
|
||||
patword 0x0119 0x870c599f000850ba
|
||||
patword 0x011a 0x870c599f000e50ba
|
||||
patword 0x011b 0x870c599f000850ba
|
||||
patword 0x011c 0x870c599f000e50ba
|
||||
patword 0x011d 0x870c599f000850ba
|
||||
patword 0x011e 0x870c599f000e50ba
|
||||
patword 0x011f 0x870c599f000850ba
|
||||
patword 0x0120 0x870c599f000e50ba
|
||||
patword 0x0121 0x870c599f000850ba
|
||||
patword 0x0122 0x870c599f200e50ba
|
||||
patword 0x0123 0x870c599f000850ba
|
||||
patword 0x0124 0x870c599f000e50ba
|
||||
patword 0x0125 0x870c599f000850ba
|
||||
patword 0x0126 0x870c599f000e50ba
|
||||
patword 0x0127 0x870c599f000850ba
|
||||
patword 0x0128 0x870c599f000e50ba
|
||||
patword 0x0129 0x870c599f000850ba
|
||||
patword 0x012a 0x870c599f000e50ba
|
||||
patword 0x012b 0x870c599f000850ba
|
||||
patword 0x012c 0x870c599f000e50ba
|
||||
patword 0x012d 0x870c599f000850ba
|
||||
patword 0x012e 0x870c599f000e50ba
|
||||
patword 0x012f 0x870c599f000850ba
|
||||
patword 0x0130 0x870c599f000e50ba
|
||||
patword 0x0131 0x870c599f000850ba
|
||||
patword 0x0132 0x870c599f000e50ba
|
||||
patword 0x0133 0x870c599f000850ba
|
||||
patword 0x0134 0x870c599f000e50ba
|
||||
patword 0x0135 0x870c599f000850ba
|
||||
patword 0x0136 0x870c599f000e50ba
|
||||
patword 0x0137 0x870c599f000850ba
|
||||
patword 0x0138 0x870c599f000e50ba
|
||||
patword 0x0139 0x870c599f000850ba
|
||||
patword 0x013a 0x870c599f282e50ba
|
||||
patword 0x013b 0x870c599f082850ba
|
||||
patword 0x013c 0x870c599f000e50ba
|
||||
patword 0x013d 0x870c599f000850ba
|
||||
patword 0x013e 0x870c599f000e50ba
|
||||
patword 0x013f 0x870c599f000850ba
|
||||
patword 0x0140 0x870c599f000e50ba
|
||||
patword 0x0141 0x870c599f000850ba
|
||||
patword 0x0142 0x870c599f000e50ba
|
||||
patword 0x0143 0x870c599f000850ba
|
||||
patword 0x0144 0x870c599f000e50ba
|
||||
patword 0x0145 0x870c599f000850ba
|
||||
patword 0x0146 0x870c599f000e50ba
|
||||
patword 0x0147 0x870c599f000850ba
|
||||
patword 0x0148 0x870c599f000e50ba
|
||||
patword 0x0149 0x870c599f000850ba
|
||||
patword 0x014a 0x870c599f000e50ba
|
||||
patword 0x014b 0x870c599f000850ba
|
||||
patword 0x014c 0x870c599f000e50ba
|
||||
patword 0x014d 0x870c599f000850ba
|
||||
patword 0x014e 0x870c599f000e50ba
|
||||
patword 0x014f 0x870c599f000850ba
|
||||
patword 0x0150 0x870c599f000e50ba
|
||||
patword 0x0151 0x870c599f000850ba
|
||||
patword 0x0152 0x870c599f000e50ba
|
||||
patword 0x0153 0x870c599f000850ba
|
||||
patword 0x0154 0x870c599f200e50ba
|
||||
patword 0x0155 0x870c599f000850ba
|
||||
patword 0x0156 0x870c599f000e50ba
|
||||
patword 0x0157 0x870c599f000850ba
|
||||
patword 0x0158 0x870c599f000e50ba
|
||||
patword 0x0159 0x870c599f000850ba
|
||||
patword 0x015a 0x870c599f000e50ba
|
||||
patword 0x015b 0x870c599f000850ba
|
||||
patword 0x015c 0x870c599f000e50ba
|
||||
patword 0x015d 0x870c599f000850ba
|
||||
patword 0x015e 0x870c599f000e50ba
|
||||
patword 0x015f 0x870c599f000850ba
|
||||
patword 0x0160 0x870c599f000e50ba
|
||||
patword 0x0161 0x870c599f000850ba
|
||||
patword 0x0162 0x870c599f000e50ba
|
||||
patword 0x0163 0x870c599f000850ba
|
||||
patword 0x0164 0x870c599f000e50ba
|
||||
patword 0x0165 0x870c599f000850ba
|
||||
patword 0x0166 0x870c599f000e50ba
|
||||
patword 0x0167 0x870c599f000850ba
|
||||
patword 0x0168 0x870c599f000e50ba
|
||||
patword 0x0169 0x870c599f000850ba
|
||||
patword 0x016a 0x870c599f000e50ba
|
||||
patword 0x016b 0x870c599f000850ba
|
||||
patword 0x016c 0x070c599f000850ba
|
||||
patword 0x016d 0x070c599f000850ba
|
||||
patword 0x016e 0x000c599f000850ba
|
||||
patword 0x016f 0x000c599f000850ba
|
||||
patword 0x0170 0x0008599f200e503a
|
||||
patword 0x0171 0x0008599f0008503a
|
||||
patword 0x0172 0x0008599f200e503a
|
||||
patword 0x0173 0x0008599f0008503a
|
||||
patword 0x0174 0x0008599f0008503a
|
||||
patword 0x0175 0x0008599f0008503a
|
||||
patword 0x0176 0x0008599f0008503a
|
||||
patword 0x0177 0x0008599f0008503a
|
||||
patword 0x0178 0x0008599f0008503a
|
||||
patword 0x0179 0x0008599f0008503a
|
||||
patword 0x017a 0x0008599f0008503a
|
||||
patword 0x017b 0x0008599f0008503a
|
||||
patword 0x017c 0x0008599f0008503a
|
||||
patword 0x017d 0x0008599f0008503a
|
||||
patword 0x017e 0x0008599f0008503a
|
||||
patword 0x017f 0x0008599f0008503a
|
||||
patword 0x0180 0x0008599f0008503a
|
||||
patword 0x0181 0x0008599f0008503a
|
||||
patword 0x0182 0x0008599f0008503a
|
||||
patword 0x0183 0x0008599f0008503a
|
||||
patword 0x0184 0x0008599f0008503a
|
||||
patword 0x0185 0x0008599f0008503a
|
||||
patword 0x0186 0x0008599f0008503a
|
||||
patword 0x0187 0x0008599f0008503a
|
||||
patword 0x0188 0x0008599f0008503a
|
||||
patword 0x0189 0x0008599f0008503a
|
||||
patword 0x018a 0x0008599f0008503a
|
||||
patword 0x018b 0x0008599f0008503a
|
||||
patword 0x018c 0x0008599f0008503a
|
||||
patword 0x018d 0x0008599f0008503a
|
||||
patioctrl 0x8f0effff6dbffdbf
|
||||
patlimits 0x0000 0x018c
|
||||
patloop0 0x013a 0x016b
|
||||
patnloop0 0x199
|
||||
patloop1 0x0400 0x0400
|
||||
patnloop1 0
|
||||
patloop2 0x0400 0x0400
|
||||
patnloop2 0
|
||||
patwait0 0x00aa
|
||||
patwaittime0 10000
|
||||
patwait1 0x0400
|
||||
patwaittime1 0
|
||||
patwait2 0x0400
|
||||
patwaittime2 0
|
||||
|
||||
# dacs
|
||||
dac 6 800
|
||||
dac 0 1300
|
||||
dac 4 1428
|
||||
dac 1 1000
|
||||
dac 7 900
|
||||
dac 3 680
|
||||
dac 2 1400
|
||||
dac 5 1200
|
||||
|
||||
|
||||
adcinvert 4a342593
|
||||
|
||||
# analog samples
|
||||
asamples 5000
|
||||
|
||||
# digital samples
|
||||
dsamples 0
|
||||
|
||||
# adc phase
|
||||
adcphase 30 deg
|
||||
|
||||
# adc pipeline
|
||||
adcpipeline 14
|
||||
|
||||
# analog readout
|
||||
romode analog
|
||||
|
||||
# frames
|
||||
frames 1
|
||||
|
||||
# period
|
||||
period 1ms
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
# detector hostname
|
||||
hostname localhost:1900
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000
|
||||
|
||||
# udp destination ports
|
||||
udp_dstport 50000
|
||||
udp_dstport2 50001
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
#imagetest 1
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
# detector hostname
|
||||
hostname localhost:1900+localhost:1902+
|
||||
|
||||
# receiver hostname
|
||||
rx_hostname mpc1922:2000+mpc1922:2001+
|
||||
|
||||
# udp destination ports
|
||||
0:udp_dstport 50000
|
||||
0:udp_dstport2 50001
|
||||
1:udp_dstport 50002
|
||||
1:udp_dstport2 50003
|
||||
|
||||
# udp destination ip from rx_hostname
|
||||
udp_dstip auto
|
||||
|
||||
# output file directory
|
||||
fpath /tmp
|
||||
|
||||
# disable file writing
|
||||
fwrite 0
|
||||
|
||||
#imagetest 1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user