Skip to content

Instantly share code, notes, and snippets.

@mmusich
Created October 30, 2018 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmusich/9b49dc0c8fa4577b19e69262f5456b83 to your computer and use it in GitHub Desktop.
Save mmusich/9b49dc0c8fa4577b19e69262f5456b83 to your computer and use it in GitHub Desktop.
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