Created
October 30, 2018 14:32
-
-
Save mmusich/9b49dc0c8fa4577b19e69262f5456b83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
import getopt | |
import commands | |
import time | |
import ROOT | |
import urllib | |
import string | |
from optparse import OptionParser | |
totalsize=0 | |
datasets = commands.getstatusoutput("dasgoclient -query='dataset dataset=/*/*2017*TkAl*Nov*/ALCARECO'")[1].split("\n") | |
print datasets | |
for pd in datasets: | |
print pd,"," | |
toAdd=commands.getstatusoutput("dasgoclient -query='summary dataset="+pd+" | grep summary.file_size'")[1] | |
if len(toAdd)>0: | |
totalsize+=float(toAdd) | |
#print "toAdd:",toAdd | |
print "=======================" | |
print totalsize/(1000*1000*1000*1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment