This command merges all the ROOT output files for each job in a single ROOT file. It is possible to merge the files even if the all analysis is not finished. In this case it is useful to save the ROOT files with different names, like with a progressive number.


  • cwb_merge label/list options[optional]
  • action
  • label MX (where X must be a positive number and gives the progressive merged files) M0 (checks what is the last progressive number and create the file with the following one)
  • list list the labels of the already merged files
  • options ‘–nthreads #N –rms true/false –var true/false –psm true/false’
    • –nthreads integer[0:8] : optional : default=0 : greater than 1 -> use nthreads threads (faster)
    • –rms false/true : optional : default=false : true -> save rms
    • –var false/true : optional : default=false : true -> save variability
    • –psm false/true : optional : default=false : true -> save skymap probability
    • –idir input directory where are the files to be merged (default = output)
    • –utag user tag : added after *.Mx -> *.Mx.U_utag (default is *.Mx)

The script produce 3 files under merge directory

  • merge_*.lst: a list of the files from output directory
  • live_*.root/mdc_*.root: live time/mdc information
  • wave_*.root: event information


skymap has in general a big size, do not enable it if not necessary


* cwb_merge M1
  it produces the files :
     - merge/live_data_label.M1.root
     - merge/merge_data_label.M1.lst
     - merge/wave_data_label.M1.root

* cwb_merge list
  it produces the output :

   List of merge labels

   - M1

* cwb_merge M1 '--nthreads 4'
  produce merge using 4 threads