ATLAS Offline Software
Loading...
Searching...
No Matches
python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs Class Reference
Collaboration diagram for python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs:

Public Member Functions

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

Public Attributes

 nspace_LArBadChannelDBTools = nspace_LArBadChannelDBTools
 class_LArBadChanBitPacking = class_LArBadChanBitPacking
 class_LArBadChannel = class_LArBadChannel
 class_HWIdentifier = class_HWIdentifier
 onlineID = onLineID
 larCablingSvc = larCablingSvc
dict dict_vectMissingFebHWid = {}
dict dict_vectMissingFebHWid_Status = {}
dict dict_vectMissingFebHWid_Init = {}

Detailed Description

Definition at line 23 of file LArDBFolderBrowser_MissingFEBs.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 25 of file LArDBFolderBrowser_MissingFEBs.py.

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

Member Function Documentation

◆ MissingFeb_CheckSavedDatabaseContent()

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

Definition at line 396 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_DisplayMissingFeb()

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

Definition at line 78 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_DisplayMissingFebLine()

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

Definition at line 102 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_GetChannelHWIdentifierAndStatus()

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 278 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_ModifyMissingFeb()

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

Definition at line 162 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_SaveMissingFebCorrectionsToDatabase()

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

Definition at line 307 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_SetBadChannelDataFromPayload()

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

Definition at line 41 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_ShowMissingFebCorrectionsSummary()

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

Definition at line 122 of file LArDBFolderBrowser_MissingFEBs.py.

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

◆ MissingFeb_TransformEntryIntoDictionnary()

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

Definition at line 141 of file LArDBFolderBrowser_MissingFEBs.py.

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

Member Data Documentation

◆ class_HWIdentifier

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_HWIdentifier = class_HWIdentifier

Definition at line 30 of file LArDBFolderBrowser_MissingFEBs.py.

◆ class_LArBadChanBitPacking

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_LArBadChanBitPacking = class_LArBadChanBitPacking

Definition at line 28 of file LArDBFolderBrowser_MissingFEBs.py.

◆ class_LArBadChannel

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.class_LArBadChannel = class_LArBadChannel

Definition at line 29 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid

dict python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid = {}

Definition at line 34 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid_Init

dict python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid_Init = {}

Definition at line 36 of file LArDBFolderBrowser_MissingFEBs.py.

◆ dict_vectMissingFebHWid_Status

dict python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.dict_vectMissingFebHWid_Status = {}

Definition at line 35 of file LArDBFolderBrowser_MissingFEBs.py.

◆ larCablingSvc

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.larCablingSvc = larCablingSvc

Definition at line 32 of file LArDBFolderBrowser_MissingFEBs.py.

◆ nspace_LArBadChannelDBTools

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.nspace_LArBadChannelDBTools = nspace_LArBadChannelDBTools

Definition at line 27 of file LArDBFolderBrowser_MissingFEBs.py.

◆ onlineID

python.LArDBFolderBrowser_MissingFEBs.LArDBFolderBrowser_MissingFEBs.onlineID = onLineID

Definition at line 31 of file LArDBFolderBrowser_MissingFEBs.py.


The documentation for this class was generated from the following file: