HiRAEVTUnpacker - nscl-hira/HiRAEVT GitHub Wiki

Using the program

Setting environment variables

To run the program or read the TTree, you must make sure all of the environment variables are properly set. This involves making sure the NSCLDAQ and ROOT libraries are on your LD_LIBRARY_PATH, and the libraries and executables built by this code are on your LD_LIBRARY_PATH, and PATH, respectively. If you are working on the NSCL/FRIB cluster fishtank, there are scripts to assist with this. From the source directory run:

source scripts/loadBuster.sh
source env.sh

Unpacking data

The program requires two inputs: a configuration file that specifies the experiment configuration, both file locations and electronics configuration, and the run number to unpack. It outputs a single root file in the output directory of the name run-[runNum].root. To run the program, make sure the executable is on your PATH and run:

HiRAEVTUnpacker [config.json] [run number]

Reading data

Assuming the required library (HTRootElectronics) is on your LD_LIBRARY_PATH, you should be able to read the data like any other ROOT TTree, by either manually setting addresses or using a TTreeReader<>. An example script, with corresponding ROOT files, can be found in the scripts directory.

To look at a sample time spectra for a HPGe, using both the multi-hit and single hit TDC data, run

cd scripts
root plotTDC.C

The following libraries are part of the unpacker:

  • HTElectronics: Contains the unpackers for each supported VME module.
  • HTExperiment: Contains HTExperiment. HTNSCLBufferHeader, HTRingItem, and HTRingStateChangeItem.
  • HTRunInfo: Contains the info classes, RunInfo, ExperimentInfo, ModuleInfo, and DAQStackInfo.
  • HTLogo: Contains the code to print the pretty header
  • HTRootElectronics