ATLAS Offline Software
Functions | Variables
dq_defect_copy_defect_database Namespace Reference

Functions

def parse_runlumi (instr)
 
def parse_channels (instr)
 

Variables

 parser = optparse.OptionParser(usage="usage: %prog [options] indb outdb\n\nindb and outdb can be COOL connection strings or \"filename/dbname\", e.g. mydb.db/COMP200")
 
 default
 
 False
 
 action
 
 help
 
 None
 
 opts
 
 args
 
 createdefects
 
 indb = DefectsDB(args[0], read_only=True, tag=opts.intag)
 
 outdb
 
def since = parse_runlumi(opts.since)
 
def until = parse_runlumi(opts.until)
 
def channels = parse_channels(opts.defects)
 
 iniovs = indb.retrieve(since=since, until=until, channels=channels, primary_only=True, nonpresent=(not opts.noabsent))
 
 inchannels = set(channels if channels is not None else indb.defect_names)
 
 outchannels = set(outdb.defect_names)
 
 missingchannels = inchannels-outchannels
 
 descriptions = indb.get_channel_descriptions(missingchannels)
 

Function Documentation

◆ parse_channels()

def dq_defect_copy_defect_database.parse_channels (   instr)

Definition at line 16 of file dq_defect_copy_defect_database.py.

16 def parse_channels(instr):
17  if instr is None: return None
18  return instr.replace(' ','').split(',')
19 

◆ parse_runlumi()

def dq_defect_copy_defect_database.parse_runlumi (   instr)

Definition at line 7 of file dq_defect_copy_defect_database.py.

7 def parse_runlumi(instr):
8  if instr is None: return None
9  import re
10  from DQUtils.sugar import RunLumi
11  m = re.match('\‍((\d+),(\d+)\‍)', instr.replace(' ', ''))
12  if m is None:
13  raise ValueError('Unable to parse ' + instr + '; please specify the limits in the form (run, lb)')
14  return RunLumi(int(m.group(1)), int(m.group(2)))
15 

Variable Documentation

◆ action

dq_defect_copy_defect_database.action

Definition at line 29 of file dq_defect_copy_defect_database.py.

◆ args

dq_defect_copy_defect_database.args

Definition at line 41 of file dq_defect_copy_defect_database.py.

◆ channels

def dq_defect_copy_defect_database.channels = parse_channels(opts.defects)

Definition at line 56 of file dq_defect_copy_defect_database.py.

◆ createdefects

dq_defect_copy_defect_database.createdefects

Definition at line 48 of file dq_defect_copy_defect_database.py.

◆ default

dq_defect_copy_defect_database.default

Definition at line 29 of file dq_defect_copy_defect_database.py.

◆ descriptions

dq_defect_copy_defect_database.descriptions = indb.get_channel_descriptions(missingchannels)

Definition at line 73 of file dq_defect_copy_defect_database.py.

◆ False

dq_defect_copy_defect_database.False

Definition at line 29 of file dq_defect_copy_defect_database.py.

◆ help

dq_defect_copy_defect_database.help

Definition at line 30 of file dq_defect_copy_defect_database.py.

◆ inchannels

dq_defect_copy_defect_database.inchannels = set(channels if channels is not None else indb.defect_names)

Definition at line 62 of file dq_defect_copy_defect_database.py.

◆ indb

dq_defect_copy_defect_database.indb = DefectsDB(args[0], read_only=True, tag=opts.intag)

Definition at line 50 of file dq_defect_copy_defect_database.py.

◆ iniovs

dq_defect_copy_defect_database.iniovs = indb.retrieve(since=since, until=until, channels=channels, primary_only=True, nonpresent=(not opts.noabsent))

Definition at line 59 of file dq_defect_copy_defect_database.py.

◆ missingchannels

dq_defect_copy_defect_database.missingchannels = inchannels-outchannels

Definition at line 64 of file dq_defect_copy_defect_database.py.

◆ None

dq_defect_copy_defect_database.None

Definition at line 35 of file dq_defect_copy_defect_database.py.

◆ opts

dq_defect_copy_defect_database.opts

Definition at line 41 of file dq_defect_copy_defect_database.py.

◆ outchannels

dq_defect_copy_defect_database.outchannels = set(outdb.defect_names)

Definition at line 63 of file dq_defect_copy_defect_database.py.

◆ outdb

dq_defect_copy_defect_database.outdb
Initial value:
1 = DefectsDB(args[1], create=opts.createdb, read_only=False,
2  tag=opts.outtag)

Definition at line 51 of file dq_defect_copy_defect_database.py.

◆ parser

dq_defect_copy_defect_database.parser = optparse.OptionParser(usage="usage: %prog [options] indb outdb\n\nindb and outdb can be COOL connection strings or \"filename/dbname\", e.g. mydb.db/COMP200")

Definition at line 28 of file dq_defect_copy_defect_database.py.

◆ since

def dq_defect_copy_defect_database.since = parse_runlumi(opts.since)

Definition at line 54 of file dq_defect_copy_defect_database.py.

◆ until

def dq_defect_copy_defect_database.until = parse_runlumi(opts.until)

Definition at line 55 of file dq_defect_copy_defect_database.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.sugar.runlumi.RunLumi
RunLumi
Definition: runlumi.py:131
dq_defect_copy_defect_database.parse_channels
def parse_channels(instr)
Definition: dq_defect_copy_defect_database.py:16
dq_defect_copy_defect_database.parse_runlumi
def parse_runlumi(instr)
Definition: dq_defect_copy_defect_database.py:7
Trk::split
@ split
Definition: LayerMaterialProperties.h:38