Andrew Savchenko лет назад: 9
Родитель
Сommit
36ecfb1bbc
3 измененных файлов с 26 добавлено и 6 удалено
  1. 5 0
      .gitignore
  2. 6 6
      tof_resolution/Makefile
  3. 15 0
      tof_resolution/tof.cpp

+ 5 - 0
.gitignore

@@ -1,3 +1,8 @@
 *.d
 *.o
 *.so
+
+*.root
+*.pdf
+*.png
+*.jpe?g

+ 6 - 6
tof_resolution/Makefile

@@ -10,26 +10,26 @@ STRIP ?= strip --strip-unneeded -R .comment
 
 # root-dependant stuff
 ROOTCFLAGS ?= $(shell root-config --cflags)
-CXXFLAGS += -Wall -pipe -D_FILE_OFFSET_BITS=64 $(ROOTCFLAGS) -fvisibility-inlines-hidden
-ROOTLIBS = $(shell root-config --libs) -lEG -lpythia6 -lEGPythia6
+CXXFLAGS += -std=c++11 -Wall -pipe -D_FILE_OFFSET_BITS=64 $(ROOTCFLAGS) -fvisibility-inlines-hidden
+ROOTLIBS = $(shell root-config --libs)
 DEPFLAGS = -isystem $(shell root-config --incdir)
 
-SRCS = pylam.cpp
+SRCS = htree.cpp tof.cpp
 OBJS = $(SRCS:.cpp=.o)
 DEPS = $(SRCS:.cpp=.d)
 
 ##### RULES #####
 .PHONY: all clean deps distclean tags
 
-all: pylam
+all: htree
 
 deps: $(DEPS)
 
 %.d: %.cpp
-	$(CXX) $(DEPFLAGS) -MM -MG $< > $@
+	$(CXX) $(DEPFLAGS) $(CXXFLAGS) -MM -MG $< > $@
 
 ### Binaries rules
-pylam: $(DEPS) $(OBJS) Makefile
+htree: $(DEPS) $(OBJS) Makefile
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(ROOTLIBS) -o $@
 ifndef DEBUG
 	$(STRIP) $@

+ 15 - 0
tof_resolution/tof.cpp

@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "htree.h"
+
+int main (const int argc, char *const argv[])
+{
+    if (argc !=2) {
+        puts("Please provide a single file name for input data!");
+        return 1;
+    }
+
+    htree t(argv[1]);
+    t.Loop();
+
+    return 0;
+}