ATLAS Offline Software
Loading...
Searching...
No Matches
WriteBchToCrest Namespace Reference

Functions

 usage ()

Variables

str letters = "hr:l:b:e:L:AM:s:i:o:t:f:x:c:C:U:npv"
list keywords = ["help","run=","lumi=","begin=","end=","endlumi=","adjust","module=","schema=","inschema=","outschema=","tag=","folder=","execfile=","comment=","Comment=","user=","online","upd4","verbose"]
 opts
 extraparams
int run = -1
int lumi = 0
str inSchema = 'CREST'
str outSchema = 'tileCalib.json'
str folderPath = "/TILE/OFL02/STATUS/ADC"
 onlSuffix = None
 curSuffix = None
str tag = "UPD1"
str execFile = "bch.py"
str comment = ""
 Comment = None
bool verbose = False
bool iov = False
int beg = 0
int end = 2147483647
int endlumi = 0
list moduleList = ['ALL']
bool adjust = False
 user = os.getlogin()
 a = a.strip()
tuple onl = ("/TILE/ONL01" in folderPath)
tuple until = (TileCalibCrest.MAXRUN,TileCalibCrest.MAXLBK)
 log = getLogger("WriteBchToCrest")
 logLevel = logging.DEBUG
str folderTag = tag
list iovList = []
list iovUntil = []
 blobReader = TileCalibCrest.TileBlobReaderCrest(inSchema, folderPath, folderTag, max(run,beg), lumi, 0, 0)
tuple since = (beg,lumi)
int ib = bisect.bisect(iovList,since)-1
int ie = ib+1
tuple begin = since
list comments = []
list mgrWriters = []
list nvalUpdated = []
list commentsSplit = []
 comm = blobReader.getComment(since)
 mgr = TileBchCrest.TileBchMgr()
tuple emptyChannelLongBarrel = (30, 31, 43)
tuple emptyChannelExtendedBarrel = (18, 19, 24, 25, 26, 27, 28, 29, 33, 34, 42, 43, 44, 45, 46, 47)
 author = user
 folderTagUPD4 = blobReader.getFolderTag(folderPath, None, "UPD4" )
str folderOnl = "/TILE/ONL01/STATUS/ADC"
str folderTagOnl = "TILEONL01STATUSADC-HEAD"
 mgrOnl = TileBchCrest.TileBchMgr()
 statlo = mgr.getAdcStatus(ros, mod, chn, 0)
 stathi = mgr.getAdcStatus(ros, mod, chn, 1)
 prbs = statlo.getPrbs()

Function Documentation

◆ usage()

WriteBchToCrest.usage ( )

Definition at line 18 of file WriteBchToCrest.py.

18def usage():
19 print ("Usage: ", sys.argv[0]," [OPTION] ... ")
20 print ("Update TileCal bad channels in COOL")
21 print ("")
22 print ("-h, --help shows this help")
23 print ("-f, --folder= specify folder to use, default is /TILE/OFL02/STATUS/ADC")
24 print ("-t, --tag= specify tag to use, default is RUN2-HLT-UPD1-00")
25 print ("-r, --run= specify run number, default is 0")
26 print ("-l, --lumi= specify lumi block number, default is 0")
27 print ("-b, --begin= specify run number of first iov in multi-iov mode, by default uses very first iov")
28 print ("-e, --end= specify run number of last iov in multi-iov mode, by default uses latest iov")
29 print ("-L, --endlumi= specify lumi block number for last iov in multi-iov mode, default is 0")
30 print ("-A, --adjust in multi-iov mode adjust iov boundaries to nearest iov available in DB, default is False")
31 print ("-M, --module= specify module to use in multi-IOV update, default is all")
32 print ("-c, --comment= specify comment which should be written to DB, in multi-iov mode it is appended to old comment")
33 print ("-C, --Comment= specify comment which should be written to DB, in mutli-iov mode it overwrites old comment")
34 print ("-U, --user= specify username for comment")
35 print ("-x, --execfile= specify python file which should be executed, default is bch.py")
36 print ("-i, --inschema= specify name of input JSON file or CREST_SERVER_PATH")
37 print ("-o, --outschema= specify name of output JSON file, default is tileCalib.json")
38 print ("-s, --schema= the same as --o, --outschema")
39 print ("-n, --online write additional file with online bad channel status")
40 print ("-p, --upd4 write additional file with CURRENT UPD4 tag")
41 print ("-v, --verbose verbose mode")
42
StatusCode usage()

Variable Documentation

◆ a

WriteBchToCrest.a = a.strip()

Definition at line 79 of file WriteBchToCrest.py.

◆ adjust

bool WriteBchToCrest.adjust = False

Definition at line 71 of file WriteBchToCrest.py.

◆ author

list WriteBchToCrest.author = user

Definition at line 306 of file WriteBchToCrest.py.

◆ beg

WriteBchToCrest.beg = 0

Definition at line 67 of file WriteBchToCrest.py.

◆ begin

tuple WriteBchToCrest.begin = since

Definition at line 203 of file WriteBchToCrest.py.

◆ blobReader

WriteBchToCrest.blobReader = TileCalibCrest.TileBlobReaderCrest(inSchema, folderPath, folderTag, max(run,beg), lumi, 0, 0)

Definition at line 159 of file WriteBchToCrest.py.

◆ comm

WriteBchToCrest.comm = blobReader.getComment(since)

Definition at line 238 of file WriteBchToCrest.py.

◆ Comment

WriteBchToCrest.Comment = None

Definition at line 64 of file WriteBchToCrest.py.

◆ comment

str WriteBchToCrest.comment = ""

Definition at line 63 of file WriteBchToCrest.py.

◆ comments

list WriteBchToCrest.comments = []

Definition at line 233 of file WriteBchToCrest.py.

◆ commentsSplit

list WriteBchToCrest.commentsSplit = []

Definition at line 236 of file WriteBchToCrest.py.

◆ curSuffix

bool WriteBchToCrest.curSuffix = None

Definition at line 60 of file WriteBchToCrest.py.

◆ emptyChannelExtendedBarrel

tuple WriteBchToCrest.emptyChannelExtendedBarrel = (18, 19, 24, 25, 26, 27, 28, 29, 33, 34, 42, 43, 44, 45, 46, 47)

Definition at line 251 of file WriteBchToCrest.py.

◆ emptyChannelLongBarrel

tuple WriteBchToCrest.emptyChannelLongBarrel = (30, 31, 43)

Definition at line 250 of file WriteBchToCrest.py.

◆ end

WriteBchToCrest.end = 2147483647

Definition at line 68 of file WriteBchToCrest.py.

◆ endlumi

WriteBchToCrest.endlumi = 0

Definition at line 69 of file WriteBchToCrest.py.

◆ execFile

WriteBchToCrest.execFile = "bch.py"

Definition at line 62 of file WriteBchToCrest.py.

◆ extraparams

WriteBchToCrest.extraparams

Definition at line 47 of file WriteBchToCrest.py.

◆ folderOnl

str WriteBchToCrest.folderOnl = "/TILE/ONL01/STATUS/ADC"

Definition at line 363 of file WriteBchToCrest.py.

◆ folderPath

str WriteBchToCrest.folderPath = "/TILE/OFL02/STATUS/ADC"

Definition at line 58 of file WriteBchToCrest.py.

◆ folderTag

WriteBchToCrest.folderTag = tag

Definition at line 152 of file WriteBchToCrest.py.

◆ folderTagOnl

str WriteBchToCrest.folderTagOnl = "TILEONL01STATUSADC-HEAD"

Definition at line 364 of file WriteBchToCrest.py.

◆ folderTagUPD4

WriteBchToCrest.folderTagUPD4 = blobReader.getFolderTag(folderPath, None, "UPD4" )

Definition at line 338 of file WriteBchToCrest.py.

◆ ib

int WriteBchToCrest.ib = bisect.bisect(iovList,since)-1

Definition at line 169 of file WriteBchToCrest.py.

◆ ie

int WriteBchToCrest.ie = ib+1

Definition at line 181 of file WriteBchToCrest.py.

◆ inSchema

WriteBchToCrest.inSchema = 'CREST'

Definition at line 56 of file WriteBchToCrest.py.

◆ iov

bool WriteBchToCrest.iov = False

Definition at line 66 of file WriteBchToCrest.py.

◆ iovList

list WriteBchToCrest.iovList = []

Definition at line 157 of file WriteBchToCrest.py.

◆ iovUntil

list WriteBchToCrest.iovUntil = []

Definition at line 158 of file WriteBchToCrest.py.

◆ keywords

list WriteBchToCrest.keywords = ["help","run=","lumi=","begin=","end=","endlumi=","adjust","module=","schema=","inschema=","outschema=","tag=","folder=","execfile=","comment=","Comment=","user=","online","upd4","verbose"]

Definition at line 44 of file WriteBchToCrest.py.

◆ letters

str WriteBchToCrest.letters = "hr:l:b:e:L:AM:s:i:o:t:f:x:c:C:U:npv"

Definition at line 43 of file WriteBchToCrest.py.

◆ log

WriteBchToCrest.log = getLogger("WriteBchToCrest")

Definition at line 140 of file WriteBchToCrest.py.

◆ logLevel

WriteBchToCrest.logLevel = logging.DEBUG

Definition at line 142 of file WriteBchToCrest.py.

◆ lumi

int WriteBchToCrest.lumi = 0

Definition at line 55 of file WriteBchToCrest.py.

◆ mgr

list WriteBchToCrest.mgr = TileBchCrest.TileBchMgr()

Definition at line 243 of file WriteBchToCrest.py.

◆ mgrOnl

WriteBchToCrest.mgrOnl = TileBchCrest.TileBchMgr()

Definition at line 366 of file WriteBchToCrest.py.

◆ mgrWriters

list WriteBchToCrest.mgrWriters = []

Definition at line 234 of file WriteBchToCrest.py.

◆ moduleList

WriteBchToCrest.moduleList = ['ALL']

Definition at line 70 of file WriteBchToCrest.py.

◆ nvalUpdated

list WriteBchToCrest.nvalUpdated = []

Definition at line 235 of file WriteBchToCrest.py.

◆ onl

tuple WriteBchToCrest.onl = ("/TILE/ONL01" in folderPath)

Definition at line 127 of file WriteBchToCrest.py.

◆ onlSuffix

bool WriteBchToCrest.onlSuffix = None

Definition at line 59 of file WriteBchToCrest.py.

◆ opts

WriteBchToCrest.opts

Definition at line 47 of file WriteBchToCrest.py.

◆ outSchema

WriteBchToCrest.outSchema = 'tileCalib.json'

Definition at line 57 of file WriteBchToCrest.py.

◆ prbs

WriteBchToCrest.prbs = statlo.getPrbs()

Definition at line 392 of file WriteBchToCrest.py.

◆ run

tuple WriteBchToCrest.run = -1

Definition at line 54 of file WriteBchToCrest.py.

◆ since

list WriteBchToCrest.since = (beg,lumi)

Definition at line 168 of file WriteBchToCrest.py.

◆ stathi

WriteBchToCrest.stathi = mgr.getAdcStatus(ros, mod, chn, 1)

Definition at line 381 of file WriteBchToCrest.py.

◆ statlo

WriteBchToCrest.statlo = mgr.getAdcStatus(ros, mod, chn, 0)

Definition at line 380 of file WriteBchToCrest.py.

◆ tag

str WriteBchToCrest.tag = "UPD1"

Definition at line 61 of file WriteBchToCrest.py.

◆ until

tuple WriteBchToCrest.until = (TileCalibCrest.MAXRUN,TileCalibCrest.MAXLBK)

Definition at line 137 of file WriteBchToCrest.py.

◆ user

str WriteBchToCrest.user = os.getlogin()

Definition at line 74 of file WriteBchToCrest.py.

◆ verbose

bool WriteBchToCrest.verbose = False

Definition at line 65 of file WriteBchToCrest.py.