A CAEN C++ wrapper for their C API.
CAEN is an italian company that produces digitizer, power supplies, amplifiers, and many others types of electronics for particle/nuclear physics.
Their code is great, but it is not beginner friendly. This header-only library will help with that. It uses C++17, and it is written for readability and memory safety.
This code also contains several examples that can be used to inspire your own code writing.
This code is modified to that it can be compiled into a python library using PyBind11.
- Make sure
CMake,CAENDigitizer,PyBind11are all installed.CMakecan be installed using package managers or from https://cmake.org/download/.CAENDigitizercan be installed from https://www.caen.it/products/caendigitizer-library/.PyBind11can be installed using conda-forge or pip. See https://pybind11.readthedocs.io/en/stable/installing.html. - Activate the conda environment if needed.
- Inside this repository, run
pip install .. - Import the library by running
import red_caen.
- Make sure
CMake,CAENDigitizer,PyBind11are all installed. - Run
ccmake .to generateMakefile. - Run
maketo compile, generating thered_caen.sobinary file. - Move the binary file to the same folder as the python script, or add the path to the bianry file to
PYTHONPATHin environment variables. In python, runimport red_caento import.