ATLAS Offline Software
Functions | Variables
BchCleanup Namespace Reference

Functions

def usage ()
 
def showAdcProblems (mgr, ros, mod)
 
def formatIOV (iov)
 
def writeMergedIOV (ros, mod, since, until)
 

Variables

 letters
 Main entry point for execution. More...
 
 keywords
 
 opts
 
 extraparams
 
 instance
 
 folderPath
 
 tag
 
 outtag
 
 a
 
 log
 
 ischema
 
 oschema
 
 idb
 
 folderTag
 
 blobReader
 
 outtagFull
 
 msg
 === Dump the current isBad definition isBadDef = mgr.getAdcProblems(0,1,0,0) log.info( "isBad Definition: " ) for prbCode in sorted(isBadDef.keys()): prbDesc = isBadDef[prbCode] msg = "- %2i (%s)" % (prbCode,prbDesc) log.info( msg ) log.info( "\n" ) More...
 
 rosinput
 
 rosmin
 
 rosmax
 
 modName
 
 dbobjs
 
 mergedSince
 
 mergedUntil
 
 iovCounter
 
 objPrev
 
 obj
 
 blobPrev
 
 blob
 
 calibDrawerPrev
 
 calibDrawer
 
 runPrev
 
 run
 
 lumPrev
 
 lum
 
 objsince
 
 objuntil
 
 tempRunLum
 
 bchDecoder
 
 mgr
 
 identical
 
 sizelo
 
 sizehi
 
 typelo
 
 typehi
 
 adcBits
 
 chnBits
 
 status
 
 statusPrev
 
 adclo
 
 adchi
 
 chnlo
 
 chnhi
 
 diff
 

Function Documentation

◆ formatIOV()

def BchCleanup.formatIOV (   iov)

Definition at line 50 of file BchCleanup.py.

50 def formatIOV(iov):
51  return (int(iov >> 32), int(iov & 0xFFFFFFFF))
52 
53 #def writeMergedIOV(fdout,outtag,ros,mod,bchDrawer,since,until):

◆ showAdcProblems()

def BchCleanup.showAdcProblems (   mgr,
  ros,
  mod 
)

Definition at line 29 of file BchCleanup.py.

29 def showAdcProblems(mgr,ros,mod):
30  modName = TileCalibUtils.getDrawerString(ros,mod)
31  for chn in range(TileCalibUtils.max_chan()):
32  for adc in range(TileCalibUtils.max_gain()):
33 
34  stat = mgr.getAdcStatus(ros,mod,chn,adc)
35  prbs = mgr.getAdcProblems(ros,mod,chn,adc)
36  if len(prbs):
37  msg = "%s %2i %1i " % (modName,chn,adc)
38  for prbCode in sorted(prbs.keys()):
39  prbDesc = prbs[prbCode]
40  msg += " %5i (%s)" % (prbCode,prbDesc)
41  if stat.isBad():
42  msg += " => BAD"
43  elif stat.isAffected():
44  msg += " => Affected"
45  elif stat.isGood():
46  msg += " => good"
47  log.debug(msg)
48 
49 

◆ usage()

def BchCleanup.usage ( )

Definition at line 17 of file BchCleanup.py.

17 def usage():
18  print ("Usage: ",sys.argv[0]," [OPTION] ... ")
19  print ("""Uses bch-input-sqlite.db file as input, joins adjacent IOVs with same contents, keeping the
20  comments from the earliest one. Results written to bch-output-sqlite.db""")
21  print ("")
22  print ("-h, --help shows this help")
23  print ("-f, --folder= specify status folder to use ONL01, OFL01 or OFL02 ")
24  print ("-t, --tag= specify tag to use, f.i. UPD1 or UPD4")
25  print ("-o, --outtag= specify output tag to be used for cleaned up result, f.i. UPD4-99")
26  print ("-i, --instance= specify DB instance (CONDBR2 or COMP200 or OFLP200)")
27  print ("")
28 

◆ writeMergedIOV()

def BchCleanup.writeMergedIOV (   ros,
  mod,
  since,
  until 
)
Writes out blob into folder fdout, at channel related to
    ros,mod and with validity range given by since,until

Definition at line 54 of file BchCleanup.py.

54 def writeMergedIOV(ros,mod,since,until):
55  """ Writes out blob into folder fdout, at channel related to
56  ros,mod and with validity range given by since,until
57  """
58  log.info("Writing merged IOV: [%i,%i]-[%i,%i)", (since>>32),(since&0xffffffff),(until>>32),(until&0xffffffff))
59 
60  chanNum = TileCalibUtils.getDrawerIdx(ros,mod)
61  #iov1 = TileCalibTools.getCoolValidityKey(since,False)
62  #iov2 = TileCalibTools.getCoolValidityKey(until,False)
63 
64  #chid=obj.channelId()
65 
66 
75 
76  #fdout.storeObject(since, until, blob, chanNum, outtag, True)
77 
78  runSince = since>>32
79  lumSince = since&0xffffffff
80  runUntil = until>>32
81  lumUntil = until&0xffffffff
82 
83  #.. fix IOVs [r1,l1]-[r2,MAXLBK] --> [r1,l1]-[r2+1,0]
84  if lumUntil == 4294967295 and runUntil != 2147483647:
85  runUntil += 1
86  lumUntil = 0
87 
88  msg = 'AtlCoolCopy \"%s\" \"%s\" -folder /TILE/OFL02/STATUS/ADC -tag %s -rls %i %i -rlu %i %i -alliov -outtag %s -ch %i -nrls %i %i -nrlu %i %i' % (ischema,oschema,folderTag,runSince,lumSince,runSince,lumSince+1,outtagFull,chanNum,runSince,lumSince,runUntil,lumUntil)
89  print(msg)
90 
91 

Variable Documentation

◆ a

BchCleanup.a

Definition at line 113 of file BchCleanup.py.

◆ adcBits

BchCleanup.adcBits

Definition at line 338 of file BchCleanup.py.

◆ adchi

BchCleanup.adchi

Definition at line 347 of file BchCleanup.py.

◆ adclo

BchCleanup.adclo

Definition at line 346 of file BchCleanup.py.

◆ bchDecoder

BchCleanup.bchDecoder

Definition at line 291 of file BchCleanup.py.

◆ blob

BchCleanup.blob

Definition at line 216 of file BchCleanup.py.

◆ blobPrev

BchCleanup.blobPrev

Definition at line 216 of file BchCleanup.py.

◆ blobReader

BchCleanup.blobReader

Definition at line 159 of file BchCleanup.py.

◆ calibDrawer

BchCleanup.calibDrawer

Definition at line 217 of file BchCleanup.py.

◆ calibDrawerPrev

BchCleanup.calibDrawerPrev

Definition at line 217 of file BchCleanup.py.

◆ chnBits

BchCleanup.chnBits

Definition at line 339 of file BchCleanup.py.

◆ chnhi

BchCleanup.chnhi

Definition at line 349 of file BchCleanup.py.

◆ chnlo

BchCleanup.chnlo

Definition at line 348 of file BchCleanup.py.

◆ dbobjs

BchCleanup.dbobjs

Definition at line 204 of file BchCleanup.py.

◆ diff

BchCleanup.diff

Definition at line 350 of file BchCleanup.py.

◆ extraparams

BchCleanup.extraparams

Definition at line 99 of file BchCleanup.py.

◆ folderPath

BchCleanup.folderPath

Definition at line 107 of file BchCleanup.py.

◆ folderTag

BchCleanup.folderTag

Definition at line 156 of file BchCleanup.py.

◆ idb

BchCleanup.idb

Definition at line 152 of file BchCleanup.py.

◆ identical

BchCleanup.identical

Definition at line 304 of file BchCleanup.py.

◆ instance

BchCleanup.instance

Definition at line 106 of file BchCleanup.py.

◆ iovCounter

BchCleanup.iovCounter

Definition at line 214 of file BchCleanup.py.

◆ ischema

BchCleanup.ischema

Definition at line 140 of file BchCleanup.py.

◆ keywords

BchCleanup.keywords

Definition at line 97 of file BchCleanup.py.

◆ letters

BchCleanup.letters

Main entry point for execution.

Definition at line 96 of file BchCleanup.py.

◆ log

BchCleanup.log

Definition at line 136 of file BchCleanup.py.

◆ lum

BchCleanup.lum

Definition at line 219 of file BchCleanup.py.

◆ lumPrev

BchCleanup.lumPrev

Definition at line 219 of file BchCleanup.py.

◆ mergedSince

BchCleanup.mergedSince

Definition at line 212 of file BchCleanup.py.

◆ mergedUntil

BchCleanup.mergedUntil

Definition at line 212 of file BchCleanup.py.

◆ mgr

BchCleanup.mgr

Definition at line 294 of file BchCleanup.py.

◆ modName

BchCleanup.modName

Definition at line 201 of file BchCleanup.py.

◆ msg

BchCleanup.msg

=== Dump the current isBad definition isBadDef = mgr.getAdcProblems(0,1,0,0) log.info( "isBad Definition: " ) for prbCode in sorted(isBadDef.keys()): prbDesc = isBadDef[prbCode] msg = "- %2i (%s)" % (prbCode,prbDesc) log.info( msg ) log.info( "\n" )

Definition at line 177 of file BchCleanup.py.

◆ obj

BchCleanup.obj

Definition at line 215 of file BchCleanup.py.

◆ objPrev

BchCleanup.objPrev

Definition at line 215 of file BchCleanup.py.

◆ objsince

BchCleanup.objsince

Definition at line 231 of file BchCleanup.py.

◆ objuntil

BchCleanup.objuntil

Definition at line 232 of file BchCleanup.py.

◆ opts

BchCleanup.opts

Definition at line 99 of file BchCleanup.py.

◆ oschema

BchCleanup.oschema

Definition at line 141 of file BchCleanup.py.

◆ outtag

BchCleanup.outtag

Definition at line 109 of file BchCleanup.py.

◆ outtagFull

BchCleanup.outtagFull

Definition at line 163 of file BchCleanup.py.

◆ rosinput

BchCleanup.rosinput

Definition at line 189 of file BchCleanup.py.

◆ rosmax

BchCleanup.rosmax

Definition at line 193 of file BchCleanup.py.

◆ rosmin

BchCleanup.rosmin

Definition at line 192 of file BchCleanup.py.

◆ run

BchCleanup.run

Definition at line 218 of file BchCleanup.py.

◆ runPrev

BchCleanup.runPrev

Definition at line 218 of file BchCleanup.py.

◆ sizehi

BchCleanup.sizehi

Definition at line 311 of file BchCleanup.py.

◆ sizelo

BchCleanup.sizelo

Definition at line 310 of file BchCleanup.py.

◆ status

BchCleanup.status

Definition at line 340 of file BchCleanup.py.

◆ statusPrev

BchCleanup.statusPrev

Definition at line 344 of file BchCleanup.py.

◆ tag

BchCleanup.tag

Definition at line 108 of file BchCleanup.py.

◆ tempRunLum

BchCleanup.tempRunLum

Definition at line 280 of file BchCleanup.py.

◆ typehi

BchCleanup.typehi

Definition at line 316 of file BchCleanup.py.

◆ typelo

BchCleanup.typelo

Definition at line 315 of file BchCleanup.py.

BchCleanup.usage
def usage()
Definition: BchCleanup.py:17
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
BchCleanup.writeMergedIOV
def writeMergedIOV(ros, mod, since, until)
Definition: BchCleanup.py:54
TileCalibUtils::max_gain
static unsigned int max_gain()
Python compatibility function.
Definition: TileCalibUtils.h:114
BchCleanup.showAdcProblems
def showAdcProblems(mgr, ros, mod)
Definition: BchCleanup.py:29
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
BchCleanup.formatIOV
def formatIOV(iov)
Definition: BchCleanup.py:50
TileCalibUtils::getDrawerString
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
Definition: TileCalibUtils.cxx:145
TileCalibUtils::max_chan
static unsigned int max_chan()
Python compatibility function.
Definition: TileCalibUtils.h:112
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
TileCalibUtils::getDrawerIdx
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Definition: TileCalibUtils.cxx:60