|
def | __init__ (self, dbstr=None, folderstr=None) |
|
def | setFolder (self, dbstr, folderstr) |
|
def | setTag (self, tagstr='') |
|
def | setChannel (self, channelIdList=[]) |
|
def | setChannelAll (self) |
|
def | setChannelId (self, channelId) |
|
def | setIOVRange (self, iovstart=cool.ValidityKeyMin, iovend=cool.ValidityKeyMax) |
|
def | setIOVRangeFromRun (self, runnum) |
|
def | readData (self) |
|
def | readChannelList (self, channels) |
|
Definition at line 34 of file CoolDataReader.py.
◆ __init__()
def python.CoolDataReader.CoolDataReader.__init__ |
( |
|
self, |
|
|
|
dbstr = None , |
|
|
|
folderstr = None |
|
) |
| |
Definition at line 36 of file CoolDataReader.py.
36 def __init__(self, dbstr=None, folderstr=None):
43 self.channelIdList = []
54 self.setFolder(dbstr, folderstr)
◆ readChannelList()
def python.CoolDataReader.CoolDataReader.readChannelList |
( |
|
self, |
|
|
|
channels |
|
) |
| |
Definition at line 142 of file CoolDataReader.py.
142 def readChannelList(self, channels):
146 itr = self.folder.browseObjects(self.iovstart, self.iovend, channels, 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
155 self.folder = dbHandler.getFolder(self.dbstr, self.folderstr, force=
True)
157 if self.folder
is None:
158 print(
'CoolDataReader.readData() - forced re-opening failed!')
162 print(
'CoolDataReader.readData() - trying to re-read re-opened folder!')
164 itr = self.folder.browseObjects(self.iovstart, self.iovend, channels, self.tag)
165 except Exception
as e:
166 print(
'CoolDataReader.readData() - exception reading folder:', self.folderstr)
170 while itr.goToNext():
171 obj = itr.currentRef()
173 self.data.
append(obj.clone())
◆ readData()
def python.CoolDataReader.CoolDataReader.readData |
( |
|
self | ) |
|
Definition at line 88 of file CoolDataReader.py.
93 if self.folder
is None:
94 dbHandler = LumiDBHandler()
95 self.folder = dbHandler.getFolder(self.dbstr, self.folderstr)
97 if self.folder
is None:
98 print(
"Can't access DB", self.dbstr,
'folder', self.folderstr,
'!')
102 if len(self.channelIdList) == 0:
103 channels = cool.ChannelSelection.all()
104 self.readChannelList(channels)
108 self.channelIdList.sort()
112 while (ichan < len(self.channelIdList)) :
118 for channelId
in self.channelIdList[ichan:]:
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)
135 self.readChannelList(channels)
◆ setChannel()
def python.CoolDataReader.CoolDataReader.setChannel |
( |
|
self, |
|
|
|
channelIdList = [] |
|
) |
| |
Definition at line 68 of file CoolDataReader.py.
68 def setChannel(self, channelIdList=[]):
69 self.channelIdList = channelIdList
◆ setChannelAll()
def python.CoolDataReader.CoolDataReader.setChannelAll |
( |
|
self | ) |
|
◆ setChannelId()
def python.CoolDataReader.CoolDataReader.setChannelId |
( |
|
self, |
|
|
|
channelId |
|
) |
| |
Definition at line 74 of file CoolDataReader.py.
74 def setChannelId(self, channelId):
75 self.setChannel([channelId])
◆ setFolder()
def python.CoolDataReader.CoolDataReader.setFolder |
( |
|
self, |
|
|
|
dbstr, |
|
|
|
folderstr |
|
) |
| |
Definition at line 57 of file CoolDataReader.py.
57 def setFolder(self, dbstr, folderstr):
59 if (dbstr != self.dbstr)
or (folderstr != self.folderstr):
63 self.folderstr = folderstr
◆ setIOVRange()
def python.CoolDataReader.CoolDataReader.setIOVRange |
( |
|
self, |
|
|
|
iovstart = cool.ValidityKeyMin , |
|
|
|
iovend = cool.ValidityKeyMax |
|
) |
| |
Definition at line 77 of file CoolDataReader.py.
77 def setIOVRange(self, iovstart=cool.ValidityKeyMin, iovend=cool.ValidityKeyMax):
78 self.iovstart = iovstart
◆ setIOVRangeFromRun()
def python.CoolDataReader.CoolDataReader.setIOVRangeFromRun |
( |
|
self, |
|
|
|
runnum |
|
) |
| |
Definition at line 81 of file CoolDataReader.py.
81 def setIOVRangeFromRun(self, runnum):
82 self.iovstart = runnum << 32
83 self.iovend = ((runnum+1) << 32) - 1
◆ setTag()
def python.CoolDataReader.CoolDataReader.setTag |
( |
|
self, |
|
|
|
tagstr = '' |
|
) |
| |
◆ channelIdList
python.CoolDataReader.CoolDataReader.channelIdList |
◆ data
python.CoolDataReader.CoolDataReader.data |
◆ dbstr
python.CoolDataReader.CoolDataReader.dbstr |
◆ folder
python.CoolDataReader.CoolDataReader.folder |
◆ folderstr
python.CoolDataReader.CoolDataReader.folderstr |
◆ iovend
python.CoolDataReader.CoolDataReader.iovend |
◆ iovstart
python.CoolDataReader.CoolDataReader.iovstart |
◆ tag
python.CoolDataReader.CoolDataReader.tag |
◆ verbose
python.CoolDataReader.CoolDataReader.verbose |
The documentation for this class was generated from the following file: