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

Functions

 usage ()

Variables

str letters = "hr:l:b:e:L:AM:m:S:s:i:o:t:f:x:c:C:U:npvu"
list keywords = ["help","run=","lumi=","begin=","end=","endlumi=","adjust","module=","mode=","server=","schema=","inschema=","outschema=","tag=","folder=","execfile=","comment=","Comment=","user=","online","upd4","verbose","update"]
 opts
 extraparams
int run = -1
int lumi = 0
int mode = 0
str server = ''
str schema = 'tileCalib.json'
str oraSchema = 'CREST'
str inSchema = oraSchema
str outSchema = schema
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 update = 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 11 of file WriteBchToCrest.py.

11def usage():
12 print ("Usage: ", sys.argv[0]," [OPTION] ... ")
13 print ("Update TileCal bad channels in COOL")
14 print ("")
15 print ("-h, --help shows this help")
16 print ("-f, --folder= specify folder to use, default is /TILE/OFL02/STATUS/ADC")
17 print ("-t, --tag= specify tag to use, default is RUN2-HLT-UPD1-00")
18 print ("-r, --run= specify run number, default is 0")
19 print ("-l, --lumi= specify lumi block number, default is 0")
20 print ("-b, --begin= specify run number of first iov in multi-iov mode, by default uses very first iov")
21 print ("-e, --end= specify run number of last iov in multi-iov mode, by default uses latest iov")
22 print ("-L, --endlumi= specify lumi block number for last iov in multi-iov mode, default is 0")
23 print ("-A, --adjust in multi-iov mode adjust iov boundaries to nearest iov available in DB, default is False")
24 print ("-M, --module= specify module to use in multi-IOV update, default is all")
25 #print ("-m, --mode= specify update mode: 1 or 2; if not set - choosen automatically, depending on schema")
26 print ("-c, --comment= specify comment which should be written to DB, in multi-iov mode it is appended to old comment")
27 print ("-C, --Comment= specify comment which should be written to DB, in mutli-iov mode it overwrites old comment")
28 print ("-U, --user= specify username for comment")
29 print ("-x, --execfile= specify python file which should be executed, default is bch.py")
30 print ("-i, --inschema= specify name of input JSON file or CREST_SERVER_PATH")
31 print ("-o, --outschema= specify name of output JSON file, default is tileCalib.json")
32 print ("-n, --online write additional file with online bad channel status")
33 print ("-p, --upd4 write additional file with CURRENT UPD4 tag")
34 print ("-v, --verbose verbose mode")
35 print ("-s, --schema= specify input/output schema to use when both input and output schemas are the same")
36 #print ("-S, --server= specify server - ORACLE or FRONTIER, default is FRONTIER")
37 #print ("-u --update set this flag if output file should be updated, otherwise it'll be recreated")
38
StatusCode usage()

Variable Documentation

◆ a

WriteBchToCrest.a = a.strip()

Definition at line 80 of file WriteBchToCrest.py.

◆ adjust

bool WriteBchToCrest.adjust = False

Definition at line 72 of file WriteBchToCrest.py.

◆ author

list WriteBchToCrest.author = user

Definition at line 322 of file WriteBchToCrest.py.

◆ beg

WriteBchToCrest.beg = 0

Definition at line 68 of file WriteBchToCrest.py.

◆ begin

tuple WriteBchToCrest.begin = since

Definition at line 219 of file WriteBchToCrest.py.

◆ blobReader

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

Definition at line 175 of file WriteBchToCrest.py.

◆ comm

WriteBchToCrest.comm = blobReader.getComment(since)

Definition at line 254 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 249 of file WriteBchToCrest.py.

◆ commentsSplit

list WriteBchToCrest.commentsSplit = []

Definition at line 252 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 267 of file WriteBchToCrest.py.

◆ emptyChannelLongBarrel

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

Definition at line 266 of file WriteBchToCrest.py.

◆ end

WriteBchToCrest.end = 2147483647

Definition at line 69 of file WriteBchToCrest.py.

◆ endlumi

WriteBchToCrest.endlumi = 0

Definition at line 70 of file WriteBchToCrest.py.

◆ execFile

WriteBchToCrest.execFile = "bch.py"

Definition at line 62 of file WriteBchToCrest.py.

◆ extraparams

WriteBchToCrest.extraparams

Definition at line 43 of file WriteBchToCrest.py.

◆ folderOnl

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

Definition at line 379 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 168 of file WriteBchToCrest.py.

◆ folderTagOnl

str WriteBchToCrest.folderTagOnl = "TILEONL01STATUSADC-HEAD"

Definition at line 380 of file WriteBchToCrest.py.

◆ folderTagUPD4

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

Definition at line 354 of file WriteBchToCrest.py.

◆ ib

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

Definition at line 185 of file WriteBchToCrest.py.

◆ ie

int WriteBchToCrest.ie = ib+1

Definition at line 197 of file WriteBchToCrest.py.

◆ inSchema

str WriteBchToCrest.inSchema = oraSchema

Definition at line 56 of file WriteBchToCrest.py.

◆ iov

bool WriteBchToCrest.iov = False

Definition at line 67 of file WriteBchToCrest.py.

◆ iovList

list WriteBchToCrest.iovList = []

Definition at line 173 of file WriteBchToCrest.py.

◆ iovUntil

list WriteBchToCrest.iovUntil = []

Definition at line 174 of file WriteBchToCrest.py.

◆ keywords

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

Definition at line 40 of file WriteBchToCrest.py.

◆ letters

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

Definition at line 39 of file WriteBchToCrest.py.

◆ log

WriteBchToCrest.log = getLogger("WriteBchToCrest")

Definition at line 156 of file WriteBchToCrest.py.

◆ logLevel

WriteBchToCrest.logLevel = logging.DEBUG

Definition at line 158 of file WriteBchToCrest.py.

◆ lumi

int WriteBchToCrest.lumi = 0

Definition at line 51 of file WriteBchToCrest.py.

◆ mgr

list WriteBchToCrest.mgr = TileBchCrest.TileBchMgr()

Definition at line 259 of file WriteBchToCrest.py.

◆ mgrOnl

WriteBchToCrest.mgrOnl = TileBchCrest.TileBchMgr()

Definition at line 382 of file WriteBchToCrest.py.

◆ mgrWriters

list WriteBchToCrest.mgrWriters = []

Definition at line 250 of file WriteBchToCrest.py.

◆ mode

WriteBchToCrest.mode = 0

Definition at line 52 of file WriteBchToCrest.py.

◆ moduleList

WriteBchToCrest.moduleList = ['ALL']

Definition at line 71 of file WriteBchToCrest.py.

◆ nvalUpdated

list WriteBchToCrest.nvalUpdated = []

Definition at line 251 of file WriteBchToCrest.py.

◆ onl

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

Definition at line 136 of file WriteBchToCrest.py.

◆ onlSuffix

bool WriteBchToCrest.onlSuffix = None

Definition at line 59 of file WriteBchToCrest.py.

◆ opts

WriteBchToCrest.opts

Definition at line 43 of file WriteBchToCrest.py.

◆ oraSchema

str WriteBchToCrest.oraSchema = 'CREST'

Definition at line 55 of file WriteBchToCrest.py.

◆ outSchema

str WriteBchToCrest.outSchema = schema

Definition at line 57 of file WriteBchToCrest.py.

◆ prbs

WriteBchToCrest.prbs = statlo.getPrbs()

Definition at line 408 of file WriteBchToCrest.py.

◆ run

tuple WriteBchToCrest.run = -1

Definition at line 50 of file WriteBchToCrest.py.

◆ schema

str WriteBchToCrest.schema = 'tileCalib.json'

Definition at line 54 of file WriteBchToCrest.py.

◆ server

WriteBchToCrest.server = ''

Definition at line 53 of file WriteBchToCrest.py.

◆ since

list WriteBchToCrest.since = (beg,lumi)

Definition at line 184 of file WriteBchToCrest.py.

◆ stathi

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

Definition at line 397 of file WriteBchToCrest.py.

◆ statlo

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

Definition at line 396 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 153 of file WriteBchToCrest.py.

◆ update

bool WriteBchToCrest.update = False

Definition at line 66 of file WriteBchToCrest.py.

◆ user

str WriteBchToCrest.user = os.getlogin()

Definition at line 75 of file WriteBchToCrest.py.

◆ verbose

bool WriteBchToCrest.verbose = False

Definition at line 65 of file WriteBchToCrest.py.