mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-08 15:28:41 +01:00
Dev/doc c standard (#1268)
* updated c++11 to c++17 * more about c++11 and updating readme * updated documentation for receiver arguments and also making receiver constructor explicit * minor fix for rxr err message * fixed doc about gcc version
This commit is contained in:
54
README.md
54
README.md
@@ -1,24 +1,33 @@
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
Before building from source make sure that you have the [dependencies](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing dependency packages with pip.
|
||||||
|
|
||||||
## Documentaion
|
## Documentaion
|
||||||
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
||||||
|
|
||||||
Different releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
List of releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
||||||
|
|
||||||
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### 1. Install binaries using conda
|
The slsDetectorPackage provides core detector software implemented in C++, along with Python bindings packaged as the slsdet Python extension module. Choose the option that best fits your environment and use case.
|
||||||
|
|
||||||
|
1. **Install pre-built binaries using conda (Recommended)**: Install pre-built binaries for the C++ client, receiver, GUI and the Python API (`slsdet`), simplifying setup across platforms.
|
||||||
|
|
||||||
|
2. **Pip**: Install only the Python extension module, either by downloading the pre-built library from PyPI or by building the extension locally from source. Available only from v9.2.0 onwards.
|
||||||
|
|
||||||
|
3. **Build from source**: Compile the entire package yourself, including both the C++ core and the Python bindings, for maximum control and customization. However, make sure that you have the dependencies installed. If installing using conda, conda will manage the dependencies. Avoid installing packages with pip and conda simultaneously.
|
||||||
|
|
||||||
|
### 1. Install pre-built binaries using conda (Recommended)
|
||||||
Conda is not only useful to manage python environments but can also
|
Conda is not only useful to manage python environments but can also
|
||||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||||
are from the developer branch. Please use released tags for stability.
|
are from the developer branch. Please use released tags for stability.
|
||||||
|
|
||||||
We have three different packages available:
|
We have three different packages available:
|
||||||
* **slsdetlib** shared libraries and command line utilities
|
* **slsdetlib** Shared libraries and command line utilities
|
||||||
* **slsdetgui** GUI
|
* **slsdetgui** GUI
|
||||||
* **slsdet** Python bindings
|
* **slsdet** Python bindings
|
||||||
|
* **moenchzmq** Moench
|
||||||
|
|
||||||
```
|
```
|
||||||
#Add channels for dependencies and our library
|
#Add channels for dependencies and our library
|
||||||
@@ -44,11 +53,26 @@ conda search slsdetlib
|
|||||||
conda search slsdet
|
conda search slsdet
|
||||||
# gui
|
# gui
|
||||||
conda search slsdetgui
|
conda search slsdetgui
|
||||||
|
# moench
|
||||||
|
conda search moenchzmq
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2. Build from source
|
## 2. Pip
|
||||||
|
The Python extension module `slsdet` can be installed using pip. This is available from v9.2.0 onwards.
|
||||||
|
|
||||||
### 2.1 Download Source Code from github
|
```
|
||||||
|
#Install the Python extension module from PyPI
|
||||||
|
pip install slsdet
|
||||||
|
|
||||||
|
# or install the python extension locally from source
|
||||||
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 9.2.0
|
||||||
|
cd slsDetectorPackage
|
||||||
|
pip install .
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Build from source
|
||||||
|
|
||||||
|
### 3.1. Download Source Code from github
|
||||||
```
|
```
|
||||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||||
```
|
```
|
||||||
@@ -56,10 +80,11 @@ git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.
|
|||||||
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
|
||||||
### 2.2 Build from source
|
### 3.2. Build from source
|
||||||
|
|
||||||
|
One can either build using cmake or use the in-built cmk.sh script.
|
||||||
|
|
||||||
### Build using CMake
|
### 3.2.1. Build using CMake
|
||||||
|
|
||||||
```
|
```
|
||||||
# outside slsDetecorPackage folder
|
# outside slsDetecorPackage folder
|
||||||
@@ -99,7 +124,7 @@ ccmake ..
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build using in-built cmk.sh script
|
### 3.2.2. Build using in-built cmk.sh script
|
||||||
|
|
||||||
```
|
```
|
||||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||||
@@ -144,9 +169,9 @@ Usage: $0 [-b] [-c] [-d <HDF5 directory>] [-e] [-g] [-h] [-i]
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build on old distributions
|
### 3.3. Build on old distributions using conda
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++17 compiler (gcc>8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
using this compiler
|
using this compiler
|
||||||
|
|
||||||
@@ -164,7 +189,7 @@ make -j12
|
|||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
|
||||||
### Build slsDetectorGui (Qt5)
|
### 3.4. Build slsDetectorGui (Qt5)
|
||||||
|
|
||||||
1. Using pre-built binary on conda
|
1. Using pre-built binary on conda
|
||||||
```
|
```
|
||||||
@@ -215,7 +240,7 @@ cd slsDetectorPackage
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build documentation from package
|
### 3.5. Build documentation from package
|
||||||
The documentation for the slsDetectorPackage is build using a combination
|
The documentation for the slsDetectorPackage is build using a combination
|
||||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||||
is to use conda
|
is to use conda
|
||||||
@@ -236,7 +261,7 @@ make rst # rst only, saves time in case the API did not change
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Pybind and Zeromq
|
## 4. Pybind and Zeromq
|
||||||
|
|
||||||
### Pybind11 for Python
|
### Pybind11 for Python
|
||||||
**v8.0.0+**:
|
**v8.0.0+**:
|
||||||
@@ -279,3 +304,4 @@ zeromq-devel must be installed and one can hint its location using
|
|||||||
## Support
|
## Support
|
||||||
dhanya.thattil@psi.ch
|
dhanya.thattil@psi.ch
|
||||||
erik.frojdh@psi.ch
|
erik.frojdh@psi.ch
|
||||||
|
alice.mazzoleni@psi.ch
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _data format:
|
||||||
|
|
||||||
Data Format
|
Data Format
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,12 @@ the shared libraries these are needed:
|
|||||||
|
|
||||||
* Linux, preferably recent kernel (currently no cross platform support)
|
* Linux, preferably recent kernel (currently no cross platform support)
|
||||||
* CMake >= 3.14
|
* CMake >= 3.14
|
||||||
* C++11 compatible compiler. (We test with gcc and clang)
|
* C++17 compatible compiler. (We test with gcc and clang)
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
For v9.x.x of slsDetectorPackage and older, C++11 compatible compiler.
|
||||||
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
Python bindings
|
Python bindings
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _file format:
|
||||||
|
|
||||||
File format
|
File format
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
multidet
|
multidet
|
||||||
|
quick_start_guide
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Python API
|
:caption: Python API
|
||||||
@@ -50,7 +51,7 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
commandline
|
commandline
|
||||||
quick_start_guide
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Developer
|
:caption: Developer
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ Example cmake options Comment
|
|||||||
3.3. Build on old distributions using conda
|
3.3. Build on old distributions using conda
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++17 compiler (gcc>8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
using this compiler
|
using this compiler
|
||||||
|
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ For a Single Module
|
|||||||
slsReceiver
|
slsReceiver
|
||||||
|
|
||||||
# custom port 2012
|
# custom port 2012
|
||||||
slsReceiver -t2012
|
slsReceiver -p 2012
|
||||||
|
|
||||||
|
|
||||||
For Multiple Modules
|
For Multiple Modules
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
# slsMultiReceiver [-p: starting port, -n: number of receivers]
|
||||||
slsMultiReceiver 2012 2 0
|
slsMultiReceiver -p 2012 -n 2
|
||||||
|
|
||||||
|
|
||||||
Client
|
Client
|
||||||
@@ -132,6 +132,27 @@ For Multiple Modules
|
|||||||
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Data
|
||||||
|
-----
|
||||||
|
|
||||||
|
Check out the :ref:`UDP header section<detector udp header>` for details on output UDP header data format.`
|
||||||
|
|
||||||
|
Check out the :ref:`Data format section<data format>` for details on output data format.
|
||||||
|
|
||||||
|
|
||||||
|
Receiver
|
||||||
|
---------
|
||||||
|
|
||||||
|
When using `slsReceiver`, `slsMultiReceiver` or `slsFrameSynchronizer`, check out the following sections:
|
||||||
|
|
||||||
|
- :ref:`File format<file format>`
|
||||||
|
- :ref:`slsReceiver header format<sls receiver header format>`
|
||||||
|
- :ref:`Master file attributes<master file attributes>`
|
||||||
|
|
||||||
|
|
||||||
Gui
|
Gui
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|||||||
@@ -38,18 +38,41 @@ There are three main receiver types. How to start them is described :ref:`below<
|
|||||||
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _Starting up the Receiver:
|
.. _Starting up the Receiver:
|
||||||
|
|
||||||
Starting up the Receiver
|
Starting up the Receiver
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
Usage: slsReceiver Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
Usage: slsMultiReceiver Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-n, --num-receivers : Number of receivers.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-c, --callback : Enable dummy callbacks for debugging. Disabled by default.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
Usage: slsFrameSynchronizer Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-n, --num-receivers : Number of receivers.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-c, --print-headers : Print callback headers for debugging. Disabled by default.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For a Single Module
|
For a Single Module
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
slsReceiver # default port 1954
|
slsReceiver # default port 1954
|
||||||
|
|
||||||
slsReceiver -t2012 # custom port 2012
|
slsReceiver -p 2012 # custom port 2012
|
||||||
|
|
||||||
|
|
||||||
For Multiple Modules
|
For Multiple Modules
|
||||||
@@ -59,13 +82,13 @@ For Multiple Modules
|
|||||||
|
|
||||||
# option 1 (one for each module)
|
# option 1 (one for each module)
|
||||||
slsReceiver
|
slsReceiver
|
||||||
slsReceiver -t1955
|
slsReceiver -p 1955
|
||||||
|
|
||||||
# option 2
|
# option 2
|
||||||
slsMultiReceiver 2012 2
|
slsMultiReceiver -p 2012 -n 2
|
||||||
|
|
||||||
# option 3
|
# option 3
|
||||||
slsFrameSynchronizer 2012 2
|
slsFrameSynchronizer -p 2012 -n 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Receiver : private virtual slsDetectorDefs {
|
|||||||
* throws an exception in case of failure
|
* throws an exception in case of failure
|
||||||
* @param port TCP/IP port number
|
* @param port TCP/IP port number
|
||||||
*/
|
*/
|
||||||
Receiver(uint16_t port = 1954);
|
explicit Receiver(uint16_t port = 1954);
|
||||||
|
|
||||||
~Receiver();
|
~Receiver();
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ void CommandLineOptions::handleAppSpecificOption(int opt, const char *optarg,
|
|||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
LOG(sls::logWARNING) << "Deprecated option '-t' and '--rx_tcport'. Use "
|
LOG(sls::logWARNING) << "Deprecated option '-t' and '--rx_tcport'. Use "
|
||||||
"'p' or '--port' instead.";
|
"'--p' or '--port' instead.";
|
||||||
base.port = parsePort(optarg);
|
base.port = parsePort(optarg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user