diff --git a/macros/CCEScan/batch/hadd.py b/macros/CCEScan/batch/hadd.py new file mode 100644 index 0000000..c550ff0 --- /dev/null +++ b/macros/CCEScan/batch/hadd.py @@ -0,0 +1,28 @@ +import os +import time +from datetime import datetime +import calendar + +temp_dir = "/disk/data1/hep/elena/data/ST/Aging" +pwd = os.getcwd() + +os.chdir(temp_dir) +files = filter(os.path.isfile, os.listdir(temp_dir)) +files = [os.path.join(temp_dir, f) for f in files] +files.sort(key=lambda x: os.path.getmtime(x)) + +#dec15 = time.mktime(datetime.strptime('15/12/2015', '%d/%m/%Y').timetuple()) +# UTC time (ignore time zone) +dec15 = float(calendar.timegm(datetime.strptime('15/12/2015', '%d/%m/%Y').timetuple())) + + +def modtime(f): + return os.path.getmtime(f) + +files_to_hadd = [] +for f in files: + if modtime(f) > dec15: + files_to_hadd.append(f) + +print files_to_hadd + diff --git a/macros/CCEScan/voltageFit_noPulse b/macros/CCEScan/voltageFit_noPulse new file mode 100755 index 0000000..9acb9f1 --- /dev/null +++ b/macros/CCEScan/voltageFit_noPulse Binary files differ