ATLAS Offline Software
TileBchCrest.py
Go to the documentation of this file.
1 #!/bin/env python
2 
3 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 # TileBchCrest.py
5 # Sanya Solodkov <Sanya.Solodkov@cern.ch>, 2025-10-22
6 
7 """
8 Python module for managing TileCal ADC status words.
9 
10 """
11 
12 import cppyy
13 
14 from PyCool import cool # noqa: F401
15 Blob = cppyy.gbl.coral.Blob
16 
17 #from pycrest.api.crest_api import CrestApi
18 
19 from TileCalibBlobObjs.Classes import TileBchStatus, TileCalibUtils, \
20  TileBchPrbs, TileBchDecoder
21 from TileCalibBlobPython.TileCalibCrest import MINRUN, MINLBK, MAXRUN, MAXLBK, \
22  TileBlobReaderCrest, TileBlobWriterCrest
23 from TileCalibBlobPython.TileCalibLogger import TileCalibLogger
24 from TileCalibBlobPython.TileCalibTools import TileASCIIParser
25 
26 #
27 #______________________________________________________________________
28 class TileBchMgr(TileCalibLogger):
29  """
30  This class manages updates to the Tile Calorimeter bad channel database.
31  The usual mode of operation should start with initializing this manager
32  with a current set of bad channels from an existing database.
33  The status of individual ADCs can then be modified using the setAdcStatus,
34  updateFromFile or updateFromDb methods.
35  In a final step, the changes are commited to the database using the commit
36  method.
37  """
38  #____________________________________________________________________
39  def __init__(self):
40 
41  #=== initialize base class
42  TileCalibLogger.__init__(self,"TileBchMgr")
43 
44  #=== initialize all channel status to "good"
45  self.__newStat = [ TileBchStatus() for _ in range(self.__getAdcIdx(4, 63, 47, 1) + 1) ]
46  self.__oldStat = [ TileBchStatus() for _ in range(self.__getAdcIdx(4, 63, 47, 1) + 1) ]
47 
48  self.__comment = ""
49  self.__mode = 2
50  self.__runLumi = (MAXRUN,MAXLBK-1)
51  self.__db = None
52  self.__folder = None
53  self.__tag = None
54  self.__reader = None
55 
56  #____________________________________________________________________
57  def __getAdcIdx(self, ros, drawer, channel, adc):
58  """
59  Private function, calculating the index of a given ADC
60  for the internal cache.
61  """
62  return TileCalibUtils.getAdcIdx(ros,drawer,channel,adc)
63 
64  #____________________________________________________________________
65  def __updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, ros=-1, module=-1):
66  """
67  Updates the internal bad channel cache with the content
68  found in the database. Server connection string or file name (db) has to
69  be provided. Tag and runLumi are used to locate the set of
70  bad channels to be read from the database.
71  """
72 
73  if db is None:
74  db = self.__db
75  if folderPath is None:
76  folderPath = self.__folderPath
77  if tag is None:
78  tag = self.__tag
79 
80  if db is None:
81  self.log().critical( "Database is not defined" )
82  return
83 
84  #=== print status information
85  if db != self.__db or tag != self.__tag or folderPath != self.__folder:
86  self.__reader = TileBlobReaderCrest(db,folderPath,tag,runLumi[0],runLumi[1])
87  self.__db = db
88  self.__tag = tag
89  self.__folder = folderPath
90  else:
91  self.__reader.getIovs(runLumi,(runLumi[0],runLumi[1]+1))
92  if ros==-2:
93  self.__comment = self.__reader.getComment(runLumi)
94  self.log().info("Comment: %s", self.__comment)
95 
96  #=== loop over the whole detector
97  rosmin = ros if ros>=0 else 0
98  rosmax = ros+1 if ros>=0 else TileCalibUtils.max_ros()
99  for ros in range(rosmin,rosmax):
100  modmin = module if module>=0 else 0
101  modmax = module+1 if module>=0 else TileCalibUtils.getMaxDrawer(ros)
102  for mod in range(modmin,modmax):
103  bch = self.__reader.getDrawer(ros, mod, runLumi, False)
104  if bch is None:
105  if fillTable>=0:
106  self.log().warning("Missing IOV in condDB: ros=%i mod=%i runLumi=%s", ros,mod,runLumi)
107  continue
108  bchDecoder = TileBchDecoder(bch.getBitPatternVersion())
109  for chn in range(TileCalibUtils.max_chan()):
110  for adc in range(TileCalibUtils.max_gain()):
111  #=== adc bits
112  adcBits = bch.getData(chn,adc,0)
113  #=== channel bits (works always due to default policy)
114  chnBits = bch.getData(chn, 2,0)
115  #=== build status from both adc and channel bits
116  status = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
117  if fillTable==0:
118  self.__oldStat[self.__getAdcIdx(ros,mod,chn,adc)] = status
119  elif fillTable==1 or fillTable==-1:
120  self.__newStat[self.__getAdcIdx(ros,mod,chn,adc)] = status
121  elif fillTable==2 or fillTable==-2:
122  self.__oldStat[self.__getAdcIdx(ros,mod,chn,adc)] = status
123  self.__newStat[self.__getAdcIdx(ros,mod,chn,adc)] = status
124  else:
125  self.__newStat[self.__getAdcIdx(ros,mod,chn,adc)] = status
126  status1 = TileBchStatus( bchDecoder.decode(chnBits,adcBits) )
127  self.__oldStat[self.__getAdcIdx(ros,mod,chn,adc)] = status1
128 
129  #____________________________________________________________________
130  def getComment(self):
131  return self.__comment
132 
133  #____________________________________________________________________
134  def getBlobReader(self):
135  return self.__reader
136 
137  #____________________________________________________________________
138  def updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, mode=None, ros=-1, module=-1):
139  if mode:
140  self.__mode = mode
141  self.__updateFromDb(db, folderPath, tag, runLumi, fillTable, ros, module)
142 
143  #____________________________________________________________________
144  def initialize(self, db, folderPath, tag="", runLumi=(MAXRUN,MAXLBK-1), mode=None, ros=-1, module=-1):
145  """
146  Initializes the internal bad channel cache. Any changes applied to the
147  cache previous to calling this function are lost. Typically this function
148  is called once in the beginning to initialize the cache with a set of
149  current bad channels.
150  """
151  self.log().info("Initializing from database, resetting all changes!")
152  #=== initialize reference to current status
153  self.__runLumi = runLumi
154  if mode:
155  self.__mode = mode
156  fT = -1
157  if self.__mode<0: # silent mode
158  self.__mode = -self.__mode
159  if self.__mode==2:
160  fT = -3
161  else:
162  fT = -2
163  else:
164  if self.__mode==2:
165  fT = 3
166  else:
167  fT = 2
168 
169  if ros!=-2:
170  self.__updateFromDb(db,folderPath,tag,runLumi,fT,-2)
171  self.__updateFromDb(db,folderPath,tag,runLumi,fT,ros,module)
172  #=== update TileBchStatus::isBad() definition from DB
173  self.log().info("Updating TileBchStatus::isBad() definition from DB")
174  status = self.getBadDefinition()
175  if status.isGood():
176  self.log().info("No TileBchStatus::isBad() definition found in DB, using defaults")
177  else:
179 
180  #=== update TileBchStatus::isBadTiming() definition from DB
181  self.log().info("Updating TileBchStatus::isBadTiming() definition from DB")
182  status = self.getBadTimingDefinition()
183  if status.isGood():
184  self.log().info("No TileBchStatus::isBadTiming() definition found in DB, using defaults")
185  else:
187 
188  #____________________________________________________________________
189  def getAdcStatus(self, ros, drawer, channel, adc):
190  """
191  Get TileBchStatus for a given ADC.
192  """
193  return self.__newStat[self.__getAdcIdx(ros,drawer,channel,adc)]
194 
195  #____________________________________________________________________
196  def setAdcStatus(self, ros, drawer, channel, adc, status):
197  """
198  Set TileBchStatus for a given ADC.
199  """
200  self.__newStat[self.__getAdcIdx(ros,drawer,channel,adc)] = status
201 
202  #____________________________________________________________________
203  def getAdcProblems(self, ros, drawer, channel, adc):
204  """
205  Returns a dictionary with { problemEnum : 'Description'}
206  """
207  prbDescDict = {}
208  status = self.getAdcStatus(ros,drawer,channel,adc)
209  if not status.isGood():
210  prbs = status.getPrbs()
211  for prb in prbs:
212  prbDescDict[prb] = TileBchPrbs.getDescription(prb)
213  return prbDescDict
214 
215  #____________________________________________________________________
216  def setAdcProblems(self, ros, drawer, channel, adc, problems):
217  """
218  Expects a list of TileBchPrbs::PrbS as input
219  """
220  status = TileBchStatus()
221  for prb in problems:
222  status += prb
223  self.setAdcStatus(ros,drawer,channel,adc,status)
224 
225  #____________________________________________________________________
226  def addAdcProblem(self, ros, drawer, channel, adc, problem):
227  """
228  Sets a specific problem
229  """
230  status = self.getAdcStatus(ros,drawer,channel,adc)
231  status += problem
232  self.setAdcStatus(ros,drawer,channel,adc,status)
233 
234  #____________________________________________________________________
235  def delAdcProblem(self, ros, drawer, channel, adc, problem):
236  """
237  Removes a specific problem
238  """
239  status = self.getAdcStatus(ros,drawer,channel,adc)
240  status -= problem
241  self.setAdcStatus(ros,drawer,channel,adc,status)
242 
243  #____________________________________________________________________
244  def decodeModule(self, module):
245  """
246  convert module name to ros,drawer
247  """
248  try:
249  part_dict = {'LBA':1,'LBC':2,'EBA':3,'EBC':4}
250  partname = str(module[0:3])
251  ros = part_dict[partname]
252  drawer = int(module[3:])-1
253  except Exception:
254  drawer = -1
255  if drawer<0 or drawer>63:
256  self.log().critical( "Invalid module name %s" % module )
257  raise SystemExit
258 
259  return (ros,drawer)
260 
261  #____________________________________________________________________
262  def getADCStatus(self, module, channel, adc):
263  """
264  Get TileBchStatus for a given ADC.
265  """
266  (ros,drawer) = self.decodeModule(module)
267  return self.__newStat[self.__getAdcIdx(ros,drawer,channel,adc)]
268 
269  #____________________________________________________________________
270  def setADCStatus(self, module, channel, adc, status):
271  """
272  Set TileBchStatus for a given ADC.
273  """
274  (ros,drawer) = self.decodeModule(module)
275  self.__newStat[self.__getAdcIdx(ros,drawer,channel,adc)] = status
276 
277  #____________________________________________________________________
278  def getADCProblems(self, module, channel, adc):
279  """
280  Returns a dictionary with { problemEnum : 'Description'}
281  """
282  (ros,drawer) = self.decodeModule(module)
283  prbDescDict = {}
284  status = self.getAdcStatus(ros,drawer,channel,adc)
285  if not status.isGood():
286  prbs = status.getPrbs()
287  for prb in prbs:
288  prbDescDict[prb] = TileBchPrbs.getDescription(prb)
289  return prbDescDict
290 
291  #____________________________________________________________________
292  def setADCProblems(self, module, channel, adc, problems):
293  """
294  Expects a list of TileBchPrbs::PrbS as input
295  """
296  (ros,drawer) = self.decodeModule(module)
297  status = TileBchStatus()
298  for prb in problems:
299  status += prb
300  self.setAdcStatus(ros,drawer,channel,adc,status)
301 
302  #____________________________________________________________________
303  def addADCProblem(self, module, channel, adc, problem):
304  """
305  Sets a specific problem
306  """
307  (ros,drawer) = self.decodeModule(module)
308  status = self.getAdcStatus(ros,drawer,channel,adc)
309  status += problem
310  self.setAdcStatus(ros,drawer,channel,adc,status)
311 
312  #____________________________________________________________________
313  def delADCProblem(self, module, channel, adc, problem):
314  """
315  Removes a specific problem
316  """
317  (ros,drawer) = self.decodeModule(module)
318  status = self.getAdcStatus(ros,drawer,channel,adc)
319  status -= problem
320  self.setAdcStatus(ros,drawer,channel,adc,status)
321 
322  #____________________________________________________________________
323  def listBadAdcs(self, rosBeg=0, modBeg=0, rosEnd=5, modEnd=64):
324  """
325  Print a formatted list of all ADCs with problems.
326  """
327  self.log().info("==============================================================")
328  self.log().info(" Current list of affected ADCs " )
329  self.log().info("==============================================================")
330  for ros in range(rosBeg,rosEnd):
331  for mod in range(modBeg, min(modEnd,TileCalibUtils.getMaxDrawer(ros))):
332  modName = TileCalibUtils.getDrawerString(ros,mod)
333  for chn in range(TileCalibUtils.max_chan()):
334  chnName = "channel %2i" % chn
335  for adc in range(TileCalibUtils.max_gain()):
336  gainName = "LG:"
337  if adc:
338  gainName = "HG:"
339  prbs = self.getAdcProblems(ros,mod,chn,adc)
340  for prbCode in sorted(prbs.keys()):
341  prbDesc = prbs[prbCode]
342  msg = "%s %s %s %2i (%s)" % (modName,chnName,gainName,prbCode,prbDesc)
343  self.log().info( msg )
344  modName = " " * 5
345  chnName = " " * 10
346  gainName = " " * 3
347  self.log().info("==============================================================")
348 
349  #____________________________________________________________________
350  def checkModuleForChanges(self, ros, drawer):
351  """
352  Returns:
353  - if nothing changed : 0
354  - if something changed and complete drawer is now good : -1
355  - if something changed but drawer is not completely good: >0
356  """
357  diffCnt = 0
358  allGood = True
359  for chn in range(TileCalibUtils.max_chan()):
360  for adc in range(TileCalibUtils.max_gain()):
361  idx = self.__getAdcIdx(ros,drawer,chn,adc)
362  newStatus = self.__newStat[idx]
363  #=== count differences between old and new
364  if newStatus!=self.__oldStat[idx]:
365  diffCnt+=1
366  #=== invalidate allGood if one ADC is not good
367  if not newStatus.isGood():
368  allGood = False
369  if diffCnt>0 and allGood:
370  return -1
371  return diffCnt
372 
373  #____________________________________________________________________
374  def updateFromFile(self, fileName):
375  """
376  Updates the internal bad channel cache with the content
377  found in the file. The layout of the file has to follow the
378  TileConditions ASCII file layout.
379 
380  NGO: change this at some point. In a file, not the status word (which
381  depends on the bit pattern version) should be encoded, but the individual problems (enums).
382  For this we need one line per ADC... this requires some modification in the reader.
383  """
384  parser = TileASCIIParser(fileName,'Bch')
385  dict = parser.getDict()
386  self.log().info("Updating dictionary from file with %i entries", len(dict))
387  self.log().info("... filename: %s", fileName )
388  for key, stat in list(dict.items()):
389  ros = key[0]
390  mod = key[1]
391  chn = key[2]
392  for adc in range(2):
393  status = TileBchStatus()
394  status+=self.getAdcStatus(ros,mod,chn,adc)
395  if adc < len(stat):
396  statInt = int(stat[adc])
397  else:
398  statInt=0
399  #=== temporary convention
400  if statInt==0:
401  pass
402  elif statInt==1:
403  status += TileBchPrbs.IgnoredInHlt
404  else:
405  status += int(stat[adc])
406  self.setAdcStatus(ros,mod,chn,adc,status)
407 
408  #____________________________________________________________________
409  def commitToDb(self, db, folderPath, tag, bitPatVer, author, comment,
410  since, moduleList=[]):
411  """
412  Commits the differences compared to the set of bad channels read in with the
413  initialze function to the provided database.
414  - author : author name (string)
415  - comment : a comment (string)
416  - sinceRun, sinceLbk : start of IOV for which bad channels are valid
417  """
418 
419  writer = TileBlobWriterCrest(db,folderPath,'Bch')
420  if len(comment) or isinstance(author,tuple):
421  writer.setComment(author, comment)
422  nUpdates = 0
423  goodComment = True
424  #=== get latest state from db
425  if moduleList!=['CMT']:
426  if since != (MINRUN,MINLBK):
427  justBefore = list(since)
428  if justBefore[1]>MINLBK:
429  justBefore[1] = justBefore[1]-1
430  else:
431  justBefore[0] = justBefore[0]-1
432  justBefore[1] = MAXLBK
433  justBefore = tuple(justBefore)
434  if self.__mode!=2:
435  self.log().info("Reading db state just before %s, i.e. at %s", since,justBefore)
436  self.__updateFromDb(None, folderPath, tag, justBefore, 0)
437  else:
438  self.log().info("Using previous bad channel list from input DB")
439  self.log().info("And comparing it with new list of bad channels")
440  else:
441  self.log().info("Filling db from %s, resetting old status cache", list(since))
442  self.__oldStat = len(self.__oldStat) * [TileBchStatus()]
443 
444  #=== print status information
445  self.log().info("Committing changes to DB \'%s\'", db)
446  self.log().info("... using tag \'%s\' and [run,lumi] [%i,%i]",
447  tag,since[0],since[1])
448  if isinstance(author,tuple) and len(author)==3:
449  self.log().info("... author : \'%s\'", author[0] )
450  self.log().info("... comment: \'%s\'", author[1] )
451  else:
452  self.log().info("... author : \'%s\'", author )
453  self.log().info("... comment: \'%s\'", comment )
454 
455  #=== default for drawer initialization
456  loGainDefVec = cppyy.gbl.std.vector('unsigned int')()
457  loGainDefVec.push_back(0)
458  hiGainDefVec = cppyy.gbl.std.vector('unsigned int')()
459  hiGainDefVec.push_back(0)
460  comChnDefVec = cppyy.gbl.std.vector('unsigned int')()
461  comChnDefVec.push_back(0)
462  defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
463  defVec.push_back(loGainDefVec)
464  defVec.push_back(hiGainDefVec)
465  defVec.push_back(comChnDefVec)
466 
467  #=== loop over the whole detector
468  bchDecoder = TileBchDecoder(bitPatVer)
469  for ros in range(0,TileCalibUtils.max_ros()):
470  for mod in range(TileCalibUtils.getMaxDrawer(ros)):
471  modName = TileCalibUtils.getDrawerString(ros,mod)
472  nChange = self.checkModuleForChanges(ros,mod)
473  if nChange == 0:
474  if (modName in moduleList or 'ALL' in moduleList):
475  #=== write module if it was requested even if nothing changed
476  drawerR = self.__reader.getDrawer(ros, mod, None, False, False)
477  if drawerR:
478  writer.getDrawer(ros,mod,drawerR)
479  else:
480  writer.zeroBlob(ros,mod)
481  continue
482  if nChange==-1:
483  nUpdates += 1
484  self.log().info("Drawer %s reset to GOOD", modName)
485  if modName not in comment and ("ONL" not in folderPath or "syncALL" not in comment):
486  goodComment = False
487  self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
488  writer.zeroBlob(ros,mod)
489  else:
490  nUpdates += 1
491  self.log().info("Applying %2i changes to drawer %s", nChange,modName)
492  if modName not in comment and ("ONL" not in folderPath or "syncALL" not in comment):
493  goodComment = False
494  self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
495  drawer = writer.getDrawer(ros,mod)
496  drawer.init(defVec,TileCalibUtils.max_chan(),bitPatVer)
497  for chn in range(TileCalibUtils.max_chan()):
498  #=== get low gain bit words
499  wordsLo = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,0))
500  chBits = wordsLo[0]
501  loBits = wordsLo[1]
502  #=== get high gain bit words
503  wordsHi = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,1))
504  chBits = wordsHi[0] | chBits
505  hiBits = wordsHi[1]
506  #=== set low, high and common channel word in calibDrawer
507  drawer.setData(chn,0,0, loBits)
508  drawer.setData(chn,1,0, hiBits)
509  drawer.setData(chn,2,0, chBits)
510  #=== synchronizing channel status in low and high gain
511  if wordsLo[0] != chBits:
512  self.log().info("Drawer %s ch %2d - sync LG status with HG ", modName,chn)
513  status = TileBchStatus( bchDecoder.decode(chBits,loBits) )
514  self.setAdcStatus(ros,mod,chn,0,status)
515  if wordsHi[0] != chBits:
516  self.log().info("Drawer %s ch %2d - sync HG status with LG ", modName,chn)
517  status = TileBchStatus( bchDecoder.decode(chBits,hiBits) )
518  self.setAdcStatus(ros,mod,chn,1,status)
519 
520  #=== register
521  if nUpdates>0 or moduleList==['CMT']:
522  if goodComment:
523  self.log().info("Attempting to register %i modified drawers..." , nUpdates)
524  writer.register(since,tag)
525  else:
526  self.log().error("Aborting update due to errors in comment string")
527  else:
528  self.log().warning("No drawer modifications detected, ignoring commit request")
529 
530 
531  #____________________________________________________________________
532  def getBadDefinition(self):
533  """
534  Returns bad status definition
535  """
537 
539  """
540  Returns bad time status definition
541  """
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
python.TileBchCrest.TileBchMgr.updateFromDb
def updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, mode=None, ros=-1, module=-1)
Definition: TileBchCrest.py:138
python.Classes.TileBchDecoder
TileBchDecoder
Definition: TileCalib/TileCalibBlobObjs/python/Classes.py:13
python.TileBchCrest.TileBchMgr.commitToDb
def commitToDb(self, db, folderPath, tag, bitPatVer, author, comment, since, moduleList=[])
Definition: TileBchCrest.py:409
TileCalibUtils::max_ros
static unsigned int max_ros()
Python compatibility function.
Definition: TileCalibUtils.h:106
python.TileBchCrest.TileBchMgr.getADCProblems
def getADCProblems(self, module, channel, adc)
Definition: TileBchCrest.py:278
TileCalibUtils::getMaxDrawer
static unsigned int getMaxDrawer(unsigned int ros)
Returns the maximal channel number for a given drawer.
Definition: TileCalibUtils.cxx:136
python.TileBchCrest.TileBchMgr.setAdcStatus
def setAdcStatus(self, ros, drawer, channel, adc, status)
Definition: TileBchCrest.py:196
python.TileBchCrest.TileBchMgr.__tag
__tag
Definition: TileBchCrest.py:53
python.TileBchCrest.TileBchMgr.__comment
__comment
Definition: TileBchCrest.py:48
TileCalibUtils::badtiming_definition_chan
static unsigned int badtiming_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:132
python.TileBchCrest.TileBchMgr.listBadAdcs
def listBadAdcs(self, rosBeg=0, modBeg=0, rosEnd=5, modEnd=64)
Definition: TileBchCrest.py:323
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
python.TileBchCrest.TileBchMgr.__folder
__folder
Definition: TileBchCrest.py:52
python.TileBchCrest.TileBchMgr.getBadDefinition
def getBadDefinition(self)
Definition: TileBchCrest.py:532
TileCalibUtils::bad_definition_chan
static unsigned int bad_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:126
python.TileBchCrest.TileBchMgr.setADCStatus
def setADCStatus(self, module, channel, adc, status)
Definition: TileBchCrest.py:270
python.TileBchCrest.TileBchMgr.setADCProblems
def setADCProblems(self, module, channel, adc, problems)
Definition: TileBchCrest.py:292
python.TileBchCrest.TileBchMgr.getAdcStatus
def getAdcStatus(self, ros, drawer, channel, adc)
Definition: TileBchCrest.py:189
python.TileBchCrest.TileBchMgr.__runLumi
__runLumi
Definition: TileBchCrest.py:50
python.TileBchCrest.TileBchMgr.getBadTimingDefinition
def getBadTimingDefinition(self)
Definition: TileBchCrest.py:538
TileCalibUtils::max_gain
static unsigned int max_gain()
Python compatibility function.
Definition: TileCalibUtils.h:114
python.TileBchCrest.TileBchMgr.getADCStatus
def getADCStatus(self, module, channel, adc)
Definition: TileBchCrest.py:262
TileCalibUtils::definitions_draweridx
static unsigned int definitions_draweridx()
Python compatibility function.
Definition: TileCalibUtils.h:124
python.TileBchCrest.TileBchMgr.getComment
def getComment(self)
Definition: TileBchCrest.py:130
TileBchStatus::defineBadTiming
static void defineBadTiming(const TileBchStatus &status)
Definition: TileBchStatus.cxx:181
python.TileBchCrest.TileBchMgr.setAdcProblems
def setAdcProblems(self, ros, drawer, channel, adc, problems)
Definition: TileBchCrest.py:216
python.TileBchCrest.TileBchMgr.__getAdcIdx
def __getAdcIdx(self, ros, drawer, channel, adc)
Definition: TileBchCrest.py:57
python.TileBchCrest.TileBchMgr.delAdcProblem
def delAdcProblem(self, ros, drawer, channel, adc, problem)
Definition: TileBchCrest.py:235
python.TileBchCrest.TileBchMgr.__mode
__mode
Definition: TileBchCrest.py:49
python.TileBchCrest.TileBchMgr.__db
__db
Definition: TileBchCrest.py:51
python.TileBchCrest.TileBchMgr.__updateFromDb
def __updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, ros=-1, module=-1)
Definition: TileBchCrest.py:65
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
python.TileBchCrest.TileBchMgr
Definition: TileBchCrest.py:28
python.TileBchCrest.TileBchMgr.__newStat
__newStat
Definition: TileBchCrest.py:45
python.TileBchCrest.TileBchMgr.addADCProblem
def addADCProblem(self, module, channel, adc, problem)
Definition: TileBchCrest.py:303
TileBchStatus::defineBad
static void defineBad(const TileBchStatus &status)
Definition: TileBchStatus.cxx:157
python.TileBchCrest.TileBchMgr.getAdcProblems
def getAdcProblems(self, ros, drawer, channel, adc)
Definition: TileBchCrest.py:203
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.TileBchCrest.TileBchMgr.addAdcProblem
def addAdcProblem(self, ros, drawer, channel, adc, problem)
Definition: TileBchCrest.py:226
python.TileBchCrest.TileBchMgr.__init__
def __init__(self)
Definition: TileBchCrest.py:39
python.TileBchCrest.TileBchMgr.delADCProblem
def delADCProblem(self, module, channel, adc, problem)
Definition: TileBchCrest.py:313
python.TileBchCrest.TileBchMgr.initialize
def initialize(self, db, folderPath, tag="", runLumi=(MAXRUN, MAXLBK-1), mode=None, ros=-1, module=-1)
Definition: TileBchCrest.py:144
TileCalibUtils::getDrawerString
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
Definition: TileCalibUtils.cxx:145
python.Classes.TileBchStatus
TileBchStatus
Definition: TileCalib/TileCalibBlobObjs/python/Classes.py:16
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
TileCalibUtils::max_chan
static unsigned int max_chan()
Python compatibility function.
Definition: TileCalibUtils.h:112
python.TileBchCrest.TileBchMgr.__reader
__reader
Definition: TileBchCrest.py:54
TileCalibUtils::getAdcIdx
static unsigned int getAdcIdx(unsigned int ros, unsigned int drawer, unsigned int channel, unsigned int adc)
Returns an ADC hash.
Definition: TileCalibUtils.cxx:109
str
Definition: BTagTrackIpAccessor.cxx:11
python.TileBchCrest.TileBchMgr.decodeModule
def decodeModule(self, module)
Definition: TileBchCrest.py:244
python.TileBchCrest.TileBchMgr.__oldStat
__oldStat
Definition: TileBchCrest.py:46
error
Definition: IImpactPoint3dEstimator.h:70
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
python.TileBchCrest.TileBchMgr.getBlobReader
def getBlobReader(self)
Definition: TileBchCrest.py:134
python.TileBchCrest.TileBchMgr.checkModuleForChanges
def checkModuleForChanges(self, ros, drawer)
Definition: TileBchCrest.py:350
TileBchPrbs::getDescription
static std::string getDescription(const Prb &prb)
Get description of problem.
Definition: TileBchPrbs.cxx:11
python.TileBchCrest.TileBchMgr.updateFromFile
def updateFromFile(self, fileName)
Definition: TileBchCrest.py:374