Skip to content

Latest commit

 

History

History
62 lines (53 loc) · 5.15 KB

README.md

File metadata and controls

62 lines (53 loc) · 5.15 KB

ROSA - Rootifying Output from Struck ADCs

Python and ROOT scripts to convert binary output from Struck ADCs to ROOT TTree ntuples. A similar project, TOWARD, is developed for CAEN digitizers.

Getting started

Features

  • cross-platform, tested in Windows, Mac & Linux
  • scripts only, no compilation
  • simple trees with only basic data types, no library is needed to define complicated data structures

Prerequisites

  • CERN ROOT, any version
  • Python 3, tkinter is used to create a simple GUI. It should be included by default in most Python installations.

Scripts

Getting started

  1. Download and unzip this project to your local machine (or use git clone if you know how).
  2. Get into the project folder and create a subdirectory there for your experiment.
  3. Create a daq.cfg file inside your newly created folder, and specify your Struck ADC setup therein. The syntax of such a configuration file is demonstrated in SNS/MARS/daq.cfg. Sometimes, the number of events saved in each channel is slightly different from each other. If the sync flag in the daq.cfg is 1, extra events in some channels will not be saved in the output file. If the flag is 0, everything will be saved. However, the total number of events in each channel may be different, i.e., they are not synced.
  4. Run rosa.py (Double click the file if you are in a file browser, or python3 rosa.py if you are in a terminal) to launch a simple GUI. Your folder should appear in the top left list box called "Select experiment:".
  5. Select your folder in the list, the content of daq.cfg in your folder should be shown in the GUI. Double check if everything is OK.
  6. Click the button "Run idx.C", a window will pop up for you to select a Struck ADC binary output file to parse. After the parsing process, a CSV file will be created in your folder. It contains all the information that is needed to run b2r.C, for example, an index of positions and sizes of data blocks in the selected binary output file. Carefully examine the information about the DAQ saved in the index file. If it is different from the daq.cfg, please make sure that daq.cfg or the DAQ software is set consistently. NOTE: If the output file is compressed, it will be unzipped first. The unzipped file will be placed in your folder and then be indexed.
  7. Select the CSV file in the list box called "Select index file:". Its content will be displayed in the GUI. Double check if the binary output is correctly indexed.
  8. Click the button "Run b2r.C" to convert your binary file to a ROOT file, which will be shown in the list box "Select ROOT file:" in the GUI.
  9. Select the newly created ROOT file, click the button "Run view.C" to run a ROOT TTreeViewer to check your data.

Similar projects

DAQ software

This project is for the decoding of existing Struck ADC's output. To run the DAQ and generate binary output, one needs a DAQ program, such as the ones listed below.