17 for line
in subprocess.Popen(
"conddb --noLimit --db EcalPedestals_timestamp.db list EcalPedestals_timestamp",shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.readlines():
18 if "EcalCondObjectContainer" in line:
20 IOVs.append((line.split()[2].
strip(
')')).
strip(
'('))
22 print "There are %s IOVs!"%len(IOVs)
31 RelevantIOVs=[(IOV,IOVs[IOVs.index(IOV)+49],IOVs[IOVs.index(IOV)+50])
for IOV
in IOVs
if IOVs.index(IOV)==0
or ((IOVs.index(IOV))%50==0
and (IOVs.index(IOV)+50)<len(IOVs))]
33 RelevantIOVs.append((RelevantIOVs[-1][2],IOVs[-1],IOVs[-1]))
36 for i,splitIOVs
in enumerate(RelevantIOVs):
39 upperLimit=splitIOVs[1]
40 print i,begin,end,upperLimit
42 command =
"conddb_import -f sqlite:EcalPedestals_timestamp.db -c sqlite:EcalPedestals_timestamp_"+
str(begin)+
"_"+
str(end)+
".db -i EcalPedestals_timestamp -t EcalPedestals_timestamp -b "+
str(begin)+
" -e "+
str(end)
46 STDOUT=subprocess.Popen(command,shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read()