27 from __future__
import print_function
28 from PyCool
import cool
31 from CoolLumiUtilities.LumiDBHandler
import LumiDBHandler
36 def __init__(self, dbstr=None, folderstr=None):
77 def setIOVRange(self, iovstart=cool.ValidityKeyMin, iovend=cool.ValidityKeyMax):
83 self.
iovend = ((runnum+1) << 32) - 1
94 dbHandler = LumiDBHandler()
103 channels = cool.ChannelSelection.all()
122 channels = cool.ChannelSelection(channelId)
124 channels.addChannel(channelId)
125 if jchan == 50:
break
129 print(
'CoolDataReader.readData() - loaded %d channels from %d' % (jchan, ichan))
133 print(
'CoolDataReader.readData() - browsing', self.
iovstart, self.
iovend,
'with channel', channels,
'and tag', self.
tag)
147 except Exception
as e:
148 print(
'CoolDataReader.readData() - exception reading folder:', self.
folderstr)
150 print(
'CoolDataReader.readData() - will try to reconnect (once)')
153 dbHandler = LumiDBHandler()
154 dbHandler.verbose =
True
158 print(
'CoolDataReader.readData() - forced re-opening failed!')
162 print(
'CoolDataReader.readData() - trying to re-read re-opened folder!')
165 except Exception
as e:
166 print(
'CoolDataReader.readData() - exception reading folder:', self.
folderstr)
170 while itr.goToNext():
171 obj = itr.currentRef()