5 from __future__
import print_function
8 for line
in subprocess.Popen(
"conddb --noLimit --db Linear.db list EcalLinearCorrections_from2011_offline",shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.readlines():
9 if "EcalTimeDependentCorrections" in line:
11 IOVs.append((line.split()[2].
strip(
')')).
strip(
'('))
13 print(
"There are %s IOVs!"%len(IOVs))
19 RelevantIOVs=[(IOV,IOVs[IOVs.index(IOV)+199],IOVs[IOVs.index(IOV)+200])
for IOV
in IOVs
if IOVs.index(IOV)==0
or ((IOVs.index(IOV))%200==0
and (IOVs.index(IOV)+200)<len(IOVs))]
21 RelevantIOVs.append((RelevantIOVs[-1][2],IOVs[-1],IOVs[-1]))
24 for i,splitIOVs
in enumerate(RelevantIOVs):
27 upperLimit=splitIOVs[1]
28 print(i,begin,end,upperLimit)
29 command =
"conddb_import -f sqlite:Linear.db -c sqlite:Linear_"+
str(begin)+
"_"+
str(end)+
".db -i EcalLinearCorrections_from2011_offline -t EcalLinearCorrections_from2011_offline -b "+
str(begin)+
" -e "+
str(end)
33 STDOUT=subprocess.Popen(command,shell=
True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read()
S & print(S &os, JobReport::InputFile const &f)