Created
June 4, 2018 15:52
-
-
Save mmusich/ea8d9458e4aaad906a63bd80b23bbd32 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 | |
totalEvents=0 | |
for run in xrange(305745,305758): | |
eventsForRun=0 | |
dataset = commands.getstatusoutput("dasgoclient -query='dataset dataset=/ZeroBias*/Run2017F-SiStripCalMinBias-PromptReco-v1/ALCARECO run="+str(run)+"'")[1].split("\n") | |
#print run,dataset | |
for i in xrange(1,10): | |
#print run,i | |
ds="/ZeroBias%s/Run2017F-SiStripCalMinBias-PromptReco-v1/ALCARECO" % i | |
events = commands.getstatusoutput("dasgoclient -query='file dataset="+ds+" run="+str(run)+" | grep file.nevents'")[1].split("\n") | |
for entry in events: | |
eventsForRun+=int(entry) | |
print run,eventsForRun | |
totalEvents+=eventsForRun | |
print totalEvent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment