Skip to content

Commit

Permalink
some more printout for the splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
clelange committed Nov 15, 2017
1 parent 187f4e4 commit c3abf60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions splitNTUP.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def splitFile(inDir, oldFileName):
# Create a new file + a clone of old tree in new file
index = 0
for i in range(0, nentries, eventsPerFile):
print i
print "Event", i, "of", nentries
newfile = ROOT.TFile("{}/{}/{}_{}.root".format(prefix, inDir, newFileName, index), "recreate")
newfile.mkdir(dirname)
newfile.cd(dirname)
Expand All @@ -33,7 +33,8 @@ def splitFile(inDir, oldFileName):
newfile.Close()
index += 1

# os.remove("{}/{}".format(inDir, oldFileName))
print "Deleting {}/{}".format(inDir, oldFileName)
os.remove("{}/{}".format(inDir, oldFileName))
else:
print "No need to split", oldFileFullName

Expand Down

0 comments on commit c3abf60

Please sign in to comment.