-
Notifications
You must be signed in to change notification settings - Fork 14
/
nanoAOD_tools.patch
41 lines (40 loc) · 1.88 KB
/
nanoAOD_tools.patch
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
diff --git a/python/postprocessing/framework/postprocessor.py b/python/postprocessing/framework/postprocessor.py
index 1c75036..ceaf437 100755
--- a/python/postprocessing/framework/postprocessor.py
+++ b/python/postprocessing/framework/postprocessor.py
@@ -144,6 +144,7 @@ class PostProcessor:
fullClone = (len(self.modules) == 0)
outFileNames = []
+ outFileNameshadd = ""
t0 = time.time()
totEntriesRead = 0
for fname in self.inputFiles:
@@ -199,6 +200,8 @@ class PostProcessor:
if not self.noOut:
outFileName = os.path.join(self.outputDir, os.path.basename(
fname).replace(".root", outpostfix + ".root"))
+ outFileNameshadd = os.path.join(self.outputDir, os.path.basename(
+ fname).replace(".root", outpostfix + "Hadd.root"))
outFile = ROOT.TFile.Open(
outFileName, "RECREATE", "", compressionLevel)
outFileNames.append(outFileName)
@@ -257,8 +260,18 @@ class PostProcessor:
if self.haddFileName:
haddnano = "./haddnano.py" if os.path.isfile(
"./haddnano.py") else "haddnano.py"
+ print("\n\n[postprocessor.py::INFO::] %s %s %s" %
+ (haddnano, outFileNameshadd," ".join(outFileNames)))
+ print ""
+ os.system('date')
+ startTime = time.clock()
+ print ""
os.system("%s %s %s" %
- (haddnano, self.haddFileName, " ".join(outFileNames)))
+ (haddnano, outFileNameshadd, " ".join(outFileNames)))
+ print ""
+ os.system('date')
+ print "Time taken for hadd is %s s"%(time.clock() - startTime)
+ print ""
if self.jobReport:
self.jobReport.addOutputFile(self.haddFileName)
self.jobReport.save()