Created
October 26, 2018 07:18
-
-
Save mmusich/8089934d5b941b56f89f7b2a86ed8dd9 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 | |
filesToKeep=[] | |
ds="/EGamma/Tier0_REPLAY_vocms047-SiStripCalSmallBiasScan-PromptReco-v267/ALCARECO" | |
files = commands.getstatusoutput("dasgoclient -query='file dataset="+ds+"'")[1].split("\n") | |
for file in files: | |
lumis = commands.getstatusoutput("dasgoclient -query='lumi file="+file+"'")[1].replace('[','').replace(']','').split(",") | |
for lumi in lumis: | |
if(int(lumi)>=895 and int(lumi)<=1067): | |
#print lumi,file | |
filesToKeep.append(file) | |
for file in filesToKeep: | |
block = commands.getstatusoutput("dasgoclient -query='block file="+file+"'")[1].split("\n") | |
print block | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment