ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs Class Reference
Collaboration diagram for python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs:

Public Member Functions

def __init__ (self, nspace_LArBadChannelDBTools, class_LArBadChanBitPacking, class_LArBadChannel, class_HWIdentifier, onLineID, larCablingSvc)
 
def MissingFeb_SetBadChannelDataFromPayload (self, coolChan, payload)
 
def MissingFeb_DisplayMissingFeb (self, coolChan)
 
def MissingFeb_DisplayMissingFebLine (self, sMessage, iChanCmpt, sHWid, sChanName, sStatusValue, sValueInit)
 
def MissingFeb_ShowMissingFebCorrectionsSummary (self, coolChan)
 
def MissingFeb_TransformEntryIntoDictionnary (self, vMissingFEBHWid)
 
def MissingFeb_ModifyMissingFeb (self, coolChan)
 
def MissingFeb_GetChannelHWIdentifierAndStatus (self, barrel_ec, pos_neg, feedthrough, slot, channel)
 
def MissingFeb_SaveMissingFebCorrectionsToDatabase (self, dbstring, dbSvc, dbFolderName, selectedTag)
 
def MissingFeb_CheckSavedDatabaseContent (self, dbName, dbSvc, dbFolderName, selectedTag)
 

Public Attributes

 nspace_LArBadChannelDBTools
 
 class_LArBadChanBitPacking
 
 class_LArBadChannel
 
 class_HWIdentifier
 
 onlineID
 
 larCablingSvc
 
 dict_vectMissingFebHWid
 
 dict_vectMissingFebHWid_Status
 
 dict_vectMissingFebHWid_Init
 

Detailed Description

Definition at line 24 of file LArDBFolderBrowser_MissingFEBs.py.

Constructor & Destructor Documentation

◆ __init__()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.__init__ (   self,
  nspace_LArBadChannelDBTools,
  class_LArBadChanBitPacking,
  class_LArBadChannel,
  class_HWIdentifier,
  onLineID,
  larCablingSvc 
)

Definition at line 26 of file LArDBFolderBrowser_MissingFEBs.py.

26  def __init__(self,nspace_LArBadChannelDBTools,class_LArBadChanBitPacking,class_LArBadChannel,class_HWIdentifier,onLineID,larCablingSvc):
27 
28  self.nspace_LArBadChannelDBTools=nspace_LArBadChannelDBTools
29  self.class_LArBadChanBitPacking=class_LArBadChanBitPacking
30  self.class_LArBadChannel=class_LArBadChannel
31  self.class_HWIdentifier=class_HWIdentifier
32  self.onlineID = onLineID
33  self.larCablingSvc = larCablingSvc
34 
35  self.dict_vectMissingFebHWid={}
36  self.dict_vectMissingFebHWid_Status={}
37  self.dict_vectMissingFebHWid_Init={}
38 
39  return
40 
41 

Member Function Documentation

◆ MissingFeb_CheckSavedDatabaseContent()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_CheckSavedDatabaseContent (   self,
  dbName,
  dbSvc,
  dbFolderName,
  selectedTag 
)

Definition at line 397 of file LArDBFolderBrowser_MissingFEBs.py.

397  def MissingFeb_CheckSavedDatabaseContent(self,dbName,dbSvc,dbFolderName,selectedTag):
398 
399  # Dump new database content to screen
400  try:
401  dbase = dbSvc.openDatabase(dbName,False)
402  except Exception as e:
403  print ('Problem opening database',e)
404  sys.exit(-1)
405  print ("Opened database",dbName)
406 
407  # Get Folder
408  try:
409  f = dbase.getFolder(dbFolderName)
410  print ("Analysing Folder " + str(dbFolderName))
411  except Exception:
412  print ("Skipping " + str(dbFolderName))
413  return
414 
415  # get tags
416  tags = f.listTags()
417 
418  # SES
419  if tags.size()==0:
420  tags.push_back("notag")
421 
422  print ("for tags ", end='')
423  for tag in tags:
424  print (tag)
425 
426  bTagFound=False
427  bSavingProcessError=False
428 
429  for tag in tags:
430 
431  if tag!=selectedTag:
432  continue
433 
434  bTagFound=True
435 
436  f.countObjects( cool.ValidityKeyMin,cool.ValidityKeyMax,cool.ChannelSelection.all())
437  objs = f.browseObjects( cool.ValidityKeyMin,cool.ValidityKeyMax,cool.ChannelSelection.all())
438  i = 0
439  while objs.hasNext():
440  obj = objs.next()
441  print ("Found object", i, end='')
442  print ("since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']', end='')
443  print ("until [r,l]: [", obj.until() >> 32,',',obj.until()%0x100000000,']', end='')
444  print ("payload", obj.payload(), end='')
445  print ("chan",obj.channelId() )
446 
447  # Get components of payload object
448  payload=obj.payload()
449  channelSize=payload['ChannelSize']
450  endianness=payload['Endianness']
451  version=payload['Version']
452  blob=payload['Blob']
453 
454  # Decode blob content
455  vect_MissingFeb=self.nspace_LArBadChannelDBTools.decodeFebBlob(blob,channelSize,endianness,version,
456  self.nspace_LArBadChannelDBTools.getDefaultMsgStream())
457 
458 
459  # Transform vect_BadChanNetry into python dictionnary
460  sChannelDict,sChannelDict_Status=self.MissingFeb_TransformEntryIntoDictionnary(vect_MissingFeb)
461 
462  sChannelKey=obj.channelId()
463  HWidChecked={}
464  for key in sChannelDict.keys():
465  HWidChecked[key]=0
466 
467  print (" -> SQlite database content vs initial data : channel ", sChannelKey)
468 
469  # Check all the saved data vs initial data
470  listHWidKeys=[x for x in sChannelDict.keys()]
471  for x in self.dict_vectMissingFebHWid_Status[sChannelKey].keys():
472  if x not in listHWidKeys:
473  listHWidKeys.append(x)
474  listHWidKeys.sort()
475  iChanCmpt=0
476  for keyHWid in listHWidKeys:
477 
478  try:
479  sChanName,sFebStatus,sValueInit=sChannelDict[keyHWid]
480  except Exception:
481  sChanName="UNDEFINED"
482  sFebStatus=0
483 
484  sSuffix=" checked"
485  if self.dict_vectMissingFebHWid_Status[sChannelKey][keyHWid]==STATUS_INIT:
486  if sChannelDict[keyHWid][1]!=self.dict_vectMissingFebHWid_Init[sChannelKey][keyHWid][1]:
487  sPrefix="ERR"
488  sSuffix=" no modification was done"+keyHWid
489  bSavingProcessError=True
490  else:
491  sPrefix=" "
492  self.MissingFeb_DisplayMissingFebLine(sPrefix,iChanCmpt,keyHWid,sChanName,sFebStatus,sSuffix)
493 
494  if self.dict_vectMissingFebHWid_Status[sChannelKey][keyHWid]==STATUS_REMOVED:
495  if keyHWid in sChannelDict:
496  sPrefix="ERR"
497  sSuffix=" deletion not taken into accout"+keyHWid
498  bSavingProcessError=True
499  else:
500  sPrefix=STATUS_REMOVED
501  sChanName,sFebStatus,sValue_Init=self.dict_vectMissingFebHWid[sChannelKey][keyHWid]
502  self.MissingFeb_DisplayMissingFebLine(sPrefix,iChanCmpt,keyHWid,sChanName,sFebStatus,sSuffix)
503 
504  if self.dict_vectMissingFebHWid_Status[sChannelKey][keyHWid]==STATUS_NEW:
505  if sChannelDict[keyHWid][1]!=self.dict_vectMissingFebHWid[sChannelKey][keyHWid][1]:
506  sPrefix="ERR"
507  sSuffix=" error while saving new status "+keyHWid
508  bSavingProcessError=True
509  else:
510  sPrefix=STATUS_NEW
511  self.MissingFeb_DisplayMissingFebLine(sPrefix,iChanCmpt,keyHWid,sChanName,sFebStatus,sSuffix)
512 
513  if self.dict_vectMissingFebHWid_Status[sChannelKey][keyHWid]==STATUS_MODIFIED:
514  if sChannelDict[keyHWid][1]!=self.dict_vectMissingFebHWid[sChannelKey][keyHWid][1]:
515  sPrefix="ERR"
516  sSuffix=" error while saving modified status "+keyHWid
517  bSavingProcessError=True
518  else:
519  sPrefix=STATUS_MODIFIED
520  self.MissingFeb_DisplayMissingFebLine(sPrefix,iChanCmpt,keyHWid,sChanName,sFebStatus,sSuffix)
521 
522  HWidChecked[keyHWid]=1
523  iChanCmpt += 1
524 
525  for key in self.dict_vectMissingFebHWid_Status[sChannelKey].keys():
526  if key not in HWidChecked and self.dict_vectMissingFebHWid_Status[sChannelKey][key]!=STATUS_REMOVED:
527  print ("ERROR : initial ",key," has not been saved")
528  elif key in HWidChecked and HWidChecked[key]==0:
529  print ("ERROR : ",key," has not been checked")
530 
531  i += 1
532 
533 
534  objs.close()
535 
536  if bTagFound is False:
537  print ("ERROR : tag "+selectedTag+" not found in saved SQlite file")
538 
539  if bSavingProcessError is True:
540  print ("ERROR : found while making comparison between corrected and saved datas" )
541 
542 
543  dbase.closeDatabase()
544 
545 
546 
547 

◆ MissingFeb_DisplayMissingFeb()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_DisplayMissingFeb (   self,
  coolChan 
)
 

Definition at line 79 of file LArDBFolderBrowser_MissingFEBs.py.

79  def MissingFeb_DisplayMissingFeb(self,coolChan):
80  """ """
81 
82  iChanCmpt=0
83  listHWidKeys=[x for x in self.dict_vectMissingFebHWid[coolChan].keys()]
84  listHWidKeys.sort()
85 
86  print ("")
87  for sHWid in listHWidKeys:
88 
89  if sHWid in self.dict_vectMissingFebHWid_Init[coolChan]:
90  sChanName,sStatus,sValueInit=self.dict_vectMissingFebHWid_Init[coolChan][sHWid]
91  sPrefix=""
92  if self.dict_vectMissingFebHWid_Status[coolChan][sHWid]!=STATUS_INIT:
93  sPrefix="->"
94  self.MissingFeb_DisplayMissingFebLine(sPrefix,iChanCmpt,sHWid,sChanName,sStatus,"")
95 
96  if self.dict_vectMissingFebHWid_Status[coolChan][sHWid]!=STATUS_INIT:
97  sChanName,sStatus,sValueInit=self.dict_vectMissingFebHWid[coolChan][sHWid]
98  channelStatus=self.dict_vectMissingFebHWid_Status[coolChan][sHWid]
99  self.MissingFeb_DisplayMissingFebLine(channelStatus,iChanCmpt,sHWid,sChanName,sStatus,"")
100 
101  iChanCmpt += 1
102 

◆ MissingFeb_DisplayMissingFebLine()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_DisplayMissingFebLine (   self,
  sMessage,
  iChanCmpt,
  sHWid,
  sChanName,
  sStatusValue,
  sValueInit 
)

Definition at line 103 of file LArDBFolderBrowser_MissingFEBs.py.

103  def MissingFeb_DisplayMissingFebLine(self,sMessage,iChanCmpt,sHWid,sChanName,sStatusValue,sValueInit):
104 
105  obj_HWid=self.class_HWIdentifier()
106  obj_HWid.set(sHWid)
107 
108  barrel_ec=self.onlineID.barrel_ec(obj_HWid)
109  pos_neg=self.onlineID.pos_neg(obj_HWid)
110  feedthrough=self.onlineID.feedthrough(obj_HWid)
111  slot=self.onlineID.slot(obj_HWid)
112  channel=self.onlineID.channel(obj_HWid)
113 
114  if sMessage=="":
115  print (" %5d : %-10s %1d %1d %2d %2d %3d %40s %s " % (iChanCmpt+1,obj_HWid.getString(),
116  barrel_ec,pos_neg,feedthrough,slot,channel,
117  sChanName,sStatusValue))
118  else:
119  print ("%3s %5d : %-10s %1d %1d %2d %2d %3d %40s %s %s" % (sMessage,iChanCmpt+1,obj_HWid.getString(),
120  barrel_ec,pos_neg,feedthrough,slot,channel,
121  sChanName,sStatusValue,sValueInit))
122 

◆ MissingFeb_GetChannelHWIdentifierAndStatus()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_GetChannelHWIdentifierAndStatus (   self,
  barrel_ec,
  pos_neg,
  feedthrough,
  slot,
  channel 
)
Get channel HW identifier and its status 

Definition at line 279 of file LArDBFolderBrowser_MissingFEBs.py.

279  def MissingFeb_GetChannelHWIdentifierAndStatus(self,barrel_ec,pos_neg,feedthrough,slot,channel):
280  """ Get channel HW identifier and its status """
281 
282  sid = self.onlineID.channel_Id(int(barrel_ec),int(pos_neg),int(feedthrough),int(slot),int(channel))
283  print (str(barrel_ec)+" "+str(pos_neg)+" "+str(feedthrough)+" "+str(slot)+" "+str(channel)+" => ",sid.getString())
284 
285  # Check if HW identifier is valid
286  bValidWHidentifier=False
287  if self.onlineID.isEMBchannel(sid):
288  bValidWHidentifier=True
289  if self.onlineID.isEMECchannel(sid):
290  bValidWHidentifier=True
291  if self.onlineID.isHECchannel(sid):
292  bValidWHidentifier=True
293  if self.onlineID.isFCALchannel(sid):
294  bValidWHidentifier=True
295  if bValidWHidentifier is False:
296  return (-1,sid.getString(),"",0)
297 
298  for key in self.dict_vectMissingFebHWid.keys():
299  for sHWid in self.dict_vectMissingFebHWid[key].keys():
300  sChannelName,sFebStatus,x=self.dict_vectMissingFebHWid[key][sHWid]
301  if sid.getString()==sHWid:
302  return (0,sid.getString(),sChannelName,sFebStatus)
303 
304  return (1,sid.getString(),sChannelName,STATUS_MISSING_FEB)
305 
306 
307 

◆ MissingFeb_ModifyMissingFeb()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_ModifyMissingFeb (   self,
  coolChan 
)

Definition at line 163 of file LArDBFolderBrowser_MissingFEBs.py.

163  def MissingFeb_ModifyMissingFeb(self,coolChan):
164 
165 
166  listHWidKeys=[x for x in self.dict_vectMissingFebHWid[coolChan].keys()]
167  listHWidKeys.sort()
168  iNbBadChannel=len(self.dict_vectMissingFebHWid[coolChan].keys())
169 
170  bEndOfCorrection=False
171  while not bEndOfCorrection:
172 
173  print ("")
174  print (".. To add a missing feb : enter barrel_ec pos_neg feedthrough slot ")
175  print (".. To remove a missing feb : enter -(channel index) ")
176  print (".. Other : s (summary) / r (refresh list) / a (abort) / q (save and quit) .. > ",)
177  tty = open("/dev/tty", "r+")
178  rep=tty.readline()
179  rep=rep.strip()
180 
181  bReadableAnswer=True
182  barrel_ec=-1
183  pos_neg=-1
184  feedthrough=-1
185  slot=-1
186  channel=-1
187  iSelectedIndex=0
188  sTxtAnswer=""
189  iCombinationAnswer=0
190  try:
191  barrel_ec,pos_neg,feedthrough,slot=rep.split(' ')
192  channel=0
193  bReadableAnswer=True
194  iCombinationAnswer=1
195  except Exception:
196  if rep=="a":
197  sTxtAnswer="abort"
198  elif rep=="r":
199  sTxtAnswer="refresh"
200  elif rep=="s":
201  sTxtAnswer="summary"
202  elif rep=="q":
203  sTxtAnswer="save-quit"
204  else:
205  try:
206  iSelection=int(rep)
207  if iSelection in range(1,iNbBadChannel+1):
208  iSelectedIndex=iSelection
209  if iSelection in range(-iNbBadChannel-1,0):
210  iSelectedIndex=iSelection
211  if iSelectedIndex==-99999:
212  bReadableAnswer=False
213  except Exception:
214  iSelectedIndex=0
215  bReadableAnswer=False
216  continue
217 
218  if bReadableAnswer is False:
219  print ("could not decode answer... ")
220  bEndOfCorrection=False
221  continue
222 
223  # Abort answer
224  if sTxtAnswer=="abort":
225  iAbortConfirmation=LArBadChannelBrowserTools.YesNoQuestion("Are you sure you want to quit ? ")
226  if iAbortConfirmation==1:
227  return 'a'
228  bEndOfCorrection=False
229 
230  # Refresh answer
231  if sTxtAnswer=="refresh":
232  self.MissingFeb_DisplayMissingFeb(coolChan)
233  bEndOfCorrection=False
234 
235  # Summary answer
236  if sTxtAnswer=="summary":
237  self.MissingFeb_ShowMissingFebCorrectionsSummary(coolChan)
238  bEndOfCorrection=False
239 
240  # Refresh answer
241  if sTxtAnswer=="save-quit":
242  return 'q'
243 
244 
245  # Channel selected by negative index => to remove
246  if iSelectedIndex<0:
247  sHWid=listHWidKeys[-iSelectedIndex-1]
248  sChanName,sFebstatus,sValueInit=self.dict_vectMissingFebHWid[coolChan][sHWid]
249  iDeleteConfirmation=LArBadChannelBrowserTools.YesNoQuestion("Are you sure you want to delete "+sChanName+" ? ")
250  if iDeleteConfirmation==1:
251  self.dict_vectMissingFebHWid_Status[coolChan][sHWid]=STATUS_REMOVED
252  self.dict_vectMissingFebHWid[coolChan][sHWid]=(sChanName,STATUS_NOT_MISSING_FEB,sValueInit)
253  bEndOfCorrection=False
254 
255  # Channel selected by index or parameters
256  if iSelectedIndex>0 or iCombinationAnswer==1:
257 
258  if iSelectedIndex>0:
259  sHWid=listHWidKeys[iSelectedIndex-1]
260  sChanName,sFebStatus,sValueInit=self.dict_vectMissingFebHWid[coolChan][sHWid]
261  else:
262  iRes,sHWid,sChanName,sFebStatus=self.MissingFeb_GetChannelHWIdentifierAndStatus(barrel_ec,pos_neg,feedthrough,slot,channel)
263  if iRes==0 :
264  print ("FEB already defined as missing")
265  sValueInit=self.dict_vectMissingFebHWid[coolChan][sHWid][2]
266  else:
267  sValueInit="None"
268  self.dict_vectMissingFebHWid_Status[coolChan][sHWid]=STATUS_NEW
269  self.dict_vectMissingFebHWid[coolChan][sHWid]=(sChanName,STATUS_MISSING_FEB,sValueInit)
270  bEndOfCorrection=False
271 
272  # Display correction summary
273  self.MissingFeb_ShowMissingFebCorrectionsSummary(coolChan)
274 
275 
276  return StatusCode.Success
277 
278 

◆ MissingFeb_SaveMissingFebCorrectionsToDatabase()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_SaveMissingFebCorrectionsToDatabase (   self,
  dbstring,
  dbSvc,
  dbFolderName,
  selectedTag 
)

Definition at line 308 of file LArDBFolderBrowser_MissingFEBs.py.

308  def MissingFeb_SaveMissingFebCorrectionsToDatabase(self,dbstring,dbSvc,dbFolderName,selectedTag):
309 
310  listKeys=self.dict_vectMissingFebHWid.keys()
311  listKeys.sort()
312 
313  # Loop over cool channels
314 
315  vect_MissingFebHWid=cppyy.gbl.std.vector('HWIdentifier')()
316 
317  coolChan=0
318  listHWidKeys=[x for x in self.dict_vectMissingFebHWid[coolChan].keys()]
319  listHWidKeys.sort()
320  iNbCorrection=0
321  for key in listHWidKeys:
322 
323  sHWid=key
324  if self.dict_vectMissingFebHWid_Status[coolChan][sHWid]==STATUS_INIT:
325  #StatusFeb=self.dict_vectMissingFebHWid_Init[coolChan][sHWid][1]
326  pass
327  elif self.dict_vectMissingFebHWid_Status[coolChan][sHWid]==STATUS_MODIFIED or self.dict_vectMissingFebHWid_Status[coolChan][sHWid]==STATUS_NEW:
328  iNbCorrection += 1
329  #sStatusFeb=self.dict_vectMissingFebHWid[coolChan][sHWid][1]
330  pass
331  elif self.dict_vectMissingFebHWid_Status[coolChan][sHWid]==STATUS_REMOVED:
332  iNbCorrection += 1
333  continue
334 
335  obj_HWid=self.class_HWIdentifier()
336  obj_HWid.set(sHWid)
337 
338  vect_MissingFebHWid.push_back(obj_HWid)
339 
340  # if correction were made => store MissingFebHWid vector
341  if iNbCorrection>0:
342  pass
343  else:
344  print ("No correcton to save")
345  return
346 
347  # Create object based on new LArBadChannelState (via LArBadChannelDBTools python interface)
348  attrListSpec=cppyy.gbl.coral.AttributeListSpecification()
349  athenaAttrList=cppyy.gbl.AthenaAttributeList()
350 
351  attrListSpec=self.nspace_LArBadChannelDBTools.createCoolSpec()
352  athenaAttrList=self.nspace_LArBadChannelDBTools.createFebPayload(vect_MissingFebHWid)
353 
354  # new DB creation
355  try:
356  dbSave = dbSvc.createDatabase(dbstring)
357  except Exception as e:
358  print ('Problem opening database',e)
359  sys.exit(-1)
360  print ("Opened database",dbstring)
361 
362  desc='<timeStamp>run-event</timeStamp><addrHeader><address_header service_type="71" clid="40774348" /></addrHeader><typeName>AthenaAttributeList</typeName>'
363 
364  # Create cool spec from AttributeListSpec
365  coolSpec=cool.RecordSpecification()
366  for iElemt in range(0,attrListSpec.size()):
367  attrSpec=attrListSpec[iElemt]
368  typeName=attrSpec.typeName()
369  if typeName=="unsigned int":
370  coolSpec.extend(attrSpec.name(),cool.StorageType.UInt32)
371  elif typeName=="blob":
372  coolSpec.extend(attrSpec.name(),cool.StorageType.Blob64k)
373  else:
374  print ("Undefined cool.StorageType "+typeName)
375 
376  myfolder=dbSave.createFolder(dbFolderName, coolSpec, desc, cool.FolderVersioning.MULTI_VERSION,True)
377 
378  import string
379  IOVBeginEnd=["90","9999999"]
380  beginRun = string.atoi(IOVBeginEnd[0]) << 32
381  endRun = string.atoi(IOVBeginEnd[1]) << 32
382 
383  # Create cool payload from AthenaAttributeList payload
384  coolPayload=cool.Record(coolSpec)
385  for iElemt in range(0,attrListSpec.size()):
386  attrSpec=attrListSpec[iElemt]
387  coolPayload[attrSpec.name()]=athenaAttrList[attrSpec.name()]
388 
389  # Store cool object to folder
390  myfolder.storeObject(beginRun,endRun,coolPayload,coolChan,selectedTag)
391 
392  # Close new databse
393  dbSave.closeDatabase()
394 
395 
396 

◆ MissingFeb_SetBadChannelDataFromPayload()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_SetBadChannelDataFromPayload (   self,
  coolChan,
  payload 
)

Definition at line 42 of file LArDBFolderBrowser_MissingFEBs.py.

42  def MissingFeb_SetBadChannelDataFromPayload(self,coolChan,payload):
43 
44  # Get components of payload object
45  channelSize=payload['ChannelSize']
46  endianness=payload['Endianness']
47  version=payload['Version']
48  blob=payload['Blob']
49 
50  # Decode blob content
51  vect_MissingFebHWid=self.nspace_LArBadChannelDBTools.decodeFebBlob(blob,channelSize,endianness,version,
52  self.nspace_LArBadChannelDBTools.getDefaultMsgStream())
53 
54 
55  print (vect_MissingFebHWid.size())
56  for s in vect_MissingFebHWid:
57  print (s, end='')
58  print ("")
59 
60  # Add entry in dictionnary
61  sChannelKey=coolChan
62  if sChannelKey not in self.dict_vectMissingFebHWid:
63  self.dict_vectMissingFebHWid[sChannelKey]={}
64 
65  # Transform vect_BadChanNetry into python dictionnary
66  sChannelDict,sChannelDict_Status=self.MissingFeb_TransformEntryIntoDictionnary(vect_MissingFebHWid)
67 
68  self.dict_vectMissingFebHWid[sChannelKey]={}
69  self.dict_vectMissingFebHWid_Init[sChannelKey]={}
70  for key in sChannelDict.keys():
71  self.dict_vectMissingFebHWid[sChannelKey][key]=sChannelDict[key]
72  self.dict_vectMissingFebHWid_Init[sChannelKey][key]=sChannelDict[key]
73  self.dict_vectMissingFebHWid_Status[sChannelKey]=sChannelDict_Status
74 
75  return ("None")
76 
77 
78 

◆ MissingFeb_ShowMissingFebCorrectionsSummary()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_ShowMissingFebCorrectionsSummary (   self,
  coolChan 
)

Definition at line 123 of file LArDBFolderBrowser_MissingFEBs.py.

123  def MissingFeb_ShowMissingFebCorrectionsSummary(self,coolChan):
124 
125  listHWidKeys=[x for x in self.dict_vectMissingFebHWid[coolChan].keys()]
126  listHWidKeys.sort()
127 
128  print ("")
129  print ("Correction summary : ")
130  iNbCorrection=0
131  for index,sHWid in enumerate(listHWidKeys):
132  if self.dict_vectMissingFebHWid_Status[coolChan][sHWid]!=STATUS_INIT:
133  sChanName,badChan_word,sValueInit=self.dict_vectMissingFebHWid[coolChan][sHWid]
134  channelStatus=self.dict_vectMissingFebHWid_Status[coolChan][sHWid]
135  self.MissingFeb_DisplayMissingFebLine(channelStatus,index,sHWid,sChanName,badChan_word,"")
136  iNbCorrection += 1
137 
138  if iNbCorrection==0:
139  print ("-")
140 
141 

◆ MissingFeb_TransformEntryIntoDictionnary()

def python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.MissingFeb_TransformEntryIntoDictionnary (   self,
  vMissingFEBHWid 
)
Transform the missing FEB decoded from blob object into a python dictionnary 

Definition at line 142 of file LArDBFolderBrowser_MissingFEBs.py.

142  def MissingFeb_TransformEntryIntoDictionnary(self,vMissingFEBHWid):
143  """ Transform the missing FEB decoded from blob object into a python dictionnary """
144 
145  print ("--------------------------- Blob SIZE : ",vMissingFEBHWid.size())
146  iNbMissingFEB=vMissingFEBHWid.size()
147 
148  sChannelDict={}
149  sChannelDict_Status={}
150  for i in range(0,iNbMissingFEB):
151 
152  obj_HWid=vMissingFEBHWid.at(i)
153  sHexaString=obj_HWid.getString()
154 
155  sChannelName=self.onlineID.channel_name(vMissingFEBHWid.at(i))
156  sInitialValues=sHexaString+" "+STATUS_MISSING_FEB
157  sChannelDict[sHexaString]=(sChannelName,STATUS_MISSING_FEB,sInitialValues)
158  sChannelDict_Status[sHexaString]=STATUS_INIT
159 
160  return (sChannelDict,sChannelDict_Status)
161 
162 

Member Data Documentation

◆ class_HWIdentifier

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_HWIdentifier

Definition at line 31 of file LArDBFolderBrowser_MissingFEBs.py.

◆ class_LArBadChanBitPacking

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_LArBadChanBitPacking

Definition at line 29 of file LArDBFolderBrowser_MissingFEBs.py.

◆ class_LArBadChannel

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_LArBadChannel

Definition at line 30 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid

Definition at line 35 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid_Init

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid_Init

Definition at line 37 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid_Status

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid_Status

Definition at line 36 of file LArDBFolderBrowser_MissingFEBs.py.

◆ larCablingSvc

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.larCablingSvc

Definition at line 33 of file LArDBFolderBrowser_MissingFEBs.py.

◆ nspace_LArBadChannelDBTools

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.nspace_LArBadChannelDBTools

Definition at line 28 of file LArDBFolderBrowser_MissingFEBs.py.

◆ onlineID

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.onlineID

Definition at line 32 of file LArDBFolderBrowser_MissingFEBs.py.


The documentation for this class was generated from the following file:
LArBadChannelDBTools::createCoolSpec
coral::AttributeListSpecification * createCoolSpec()
creates the AttributeListSpecification for the LArBadChannel DB
Definition: LArBadChannelDBTools.cxx:35
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArBadChannelDBTools::createFebPayload
AthenaAttributeList * createFebPayload(const BadFebVec &data)
Definition: LArBadChannelDBTools.cxx:65
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::open
@ open
Definition: BinningType.h:40
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArBadChannelDBTools::getDefaultMsgStream
MsgStream getDefaultMsgStream()
used to get default msg stream
Definition: LArBadChannelDBTools.cxx:28