27 from PyCool
import cool
30 from CoolLumiUtilities.LumiDBHandler
import LumiDBHandler
35 def __init__(self, dbstr=None, folderstr=None):
76 def setIOVRange(self, iovstart=cool.ValidityKeyMin, iovend=cool.ValidityKeyMax):
82 self.
iovend = ((runnum+1) << 32) - 1
93 dbHandler = LumiDBHandler()
102 channels = cool.ChannelSelection.all()
121 channels = cool.ChannelSelection(channelId)
123 channels.addChannel(channelId)
124 if jchan == 50:
break
128 print(
'CoolDataReader.readData() - loaded %d channels from %d' % (jchan, ichan))
132 print(
'CoolDataReader.readData() - browsing', self.
iovstart, self.
iovend,
'with channel', channels,
'and tag', self.
tag)
146 except Exception
as e:
147 print(
'CoolDataReader.readData() - exception reading folder:', self.
folderstr)
149 print(
'CoolDataReader.readData() - will try to reconnect (once)')
152 dbHandler = LumiDBHandler()
153 dbHandler.verbose =
True
157 print(
'CoolDataReader.readData() - forced re-opening failed!')
161 print(
'CoolDataReader.readData() - trying to re-read re-opened folder!')
164 except Exception
as e:
165 print(
'CoolDataReader.readData() - exception reading folder:', self.
folderstr)
169 while itr.goToNext():
170 obj = itr.currentRef()