Giter Site home page Giter Site logo

rosa's Introduction

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 COHERENT/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.

rosa's People

Contributors

jintonic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

rosa's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.