File indexing completed on 2025-08-06 08:11:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 require 'fileutils'
0012
0013
0014 in_path = "./old_eval/num1evt500pt10pim_oneMatchPerParticle"
0015 in_pref = "/sPhenixG4_oneMatchPerParticle*"
0016 in_suff = ".root"
0017
0018
0019 out_file = "sPhenixG4_oneMatchPerParticle.pt10num1evt500pim.d18m1y2024.root"
0020
0021
0022 in_pattern = in_path + "/" + in_pref + "*" + in_suff
0023 in_pattern.gsub!("//", "/")
0024 in_pattern.gsub!("..", ".")
0025
0026
0027 arg_input = ""
0028 num_input = Dir[in_pattern].size
0029 Dir[in_pattern].each_with_index do |file, iFile|
0030 arg_input += file
0031 arg_input += " " if iFile + 1 != num_input
0032 end
0033
0034
0035 exec("hadd #{out_file} #{arg_input}")
0036
0037