forked from csullivan/GRUTinizer
-
Notifications
You must be signed in to change notification settings - Fork 11
/
anamake
42 lines (33 loc) · 1.22 KB
/
anamake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
inputfiles = inputfiles.dat
data_dir = ./data
rootfiles_subdir = analysis
histo_lib = ./lib/libe441.so
other_config_files =
grutinizer = ./bin/grutinizer
detector_env =
channels = ./config/e441.cal
values =
cuts =
# A few configuration options for make
.PHONY: all clean histogram
.SECONDARY:
.SECONDEXPANSION:
# Determine all the output files to be constructed
root_files := $(shell cat ${inputfiles})
# root_files := $(wildcard $(data_dir)/$(rootfiles_subdir)/Run*/run*.root)
hist_files := $(addprefix histfiles/,$(notdir $(root_files)))
#hist_files := $(join $(patsubst $(data_dir)/$(rootfiles_subdir)/Run%/run,) )
test := $(notdir $(rootfiles))
all: histfiles/merged.root
histogram: $(hist_files)
rootfiles histfiles:
mkdir -p $@
histfiles/run%.root: $$(data_dir)/$(rootfiles_subdir)/Run%/run*.root \
$$(wildcard run-by-run/run%.val) \
$$(wildcard run-by-run/run%.cal) | histfiles
$(grutinizer) -lqH $(histo_lib) $^ $(channels) $(values) $(wildcard run-by-run/run%.val) $(wildcard run-by-run/run%.cal) $(other_config_files) --hist-output=$@
histfiles/merged.root: $(hist_files)
python3 util/gadd_fast.py -j4 -f $@ $^
print-% : ; @echo $* = $($*)
clean:
rm -rf rootfiles histfiles