ATLAS Offline Software
Functions | Variables
python.checkUPD1 Namespace Reference

Functions

def getDBNumberFromUPD4 (run, tag, foldername, connstr)
 
def getRunNumberFromUPD1 (DB_number, tag, run, foldername, connstr)
 

Variables

 parser
 
 usage
 
 type
 
 dest
 
 default
 
 None
 
 help
 
 options
 
 args
 
 run
 
 upd4_tag
 
 upd1_tag
 
 foldername
 
 connstr
 
 DB_number
 

Function Documentation

◆ getDBNumberFromUPD4()

def python.checkUPD1.getDBNumberFromUPD4 (   run,
  tag,
  foldername,
  connstr 
)

Definition at line 13 of file checkUPD1.py.

13 def getDBNumberFromUPD4(run, tag, foldername, connstr):
14  readonly=(connstr.find('//')==-1)
15  tokens=connstr.split('/')
16  schema=tokens[0]
17  dbname=tokens[1]
18  connstr2='oracle://ATLAS_COOLPROD;schema=ATLAS_%s;dbname=%s' % (schema,dbname)
19  dbSvc=cool.DatabaseSvcFactory.databaseService()
20  dbconn=dbSvc.openDatabase(connstr2,readonly)
21  folder=dbconn.getFolder(foldername)
22  iovstart=int(run)<<32
23  iovend=iovstart+0xFFFFFFFF
24  objs=folder.browseObjects(iovstart,iovend,cool.ChannelSelection.all(),tag)
25  for obj in objs:
26  payload = obj.payload()
27  payload_string = "%s" %( payload )
28  DB_number = payload_string.split()[-1].split("]")[0].split("[")[1]
29  #print ("since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']',)
30  #print ("payload : %s" %(DB_number))
31  #print ()
32  return DB_number
33 

◆ getRunNumberFromUPD1()

def python.checkUPD1.getRunNumberFromUPD1 (   DB_number,
  tag,
  run,
  foldername,
  connstr 
)

Definition at line 34 of file checkUPD1.py.

34 def getRunNumberFromUPD1(DB_number, tag, run, foldername, connstr):
35  readonly=(connstr.find('//')==-1)
36  tokens=connstr.split('/')
37  schema=tokens[0]
38  dbname=tokens[1]
39  connstr2='oracle://ATLAS_COOLPROD;schema=ATLAS_%s;dbname=%s' % (schema,dbname)
40  dbSvc=cool.DatabaseSvcFactory.databaseService()
41  dbconn=dbSvc.openDatabase(connstr2,readonly)
42  folder=dbconn.getFolder(foldername)
43  #iovstart=int(run)<<32
44  objs=folder.browseObjects( cool.ValidityKeyMin,
45  #iovstart,
46  cool.ValidityKeyMax,
47  cool.ChannelSelection.all(),
48  tag)
49  print ("ref", DB_number)
50  for obj in objs:
51  payload = obj.payload()
52  payload_string = "%s" %( payload )
53  test_number = payload_string.split()[-1].split("]")[0].split("[")[1]
54  #print (test_number)
55  run_string = obj.since() >> 32,',',obj.since()%0x100000000
56  #print ("since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']', end='')
57  #print ("payload : %s" %(test_number))
58  if test_number == DB_number:
59  return run_string
60  return 0
61 
62 
63 

Variable Documentation

◆ args

python.checkUPD1.args

Definition at line 71 of file checkUPD1.py.

◆ connstr

python.checkUPD1.connstr

Definition at line 78 of file checkUPD1.py.

◆ DB_number

python.checkUPD1.DB_number

Definition at line 85 of file checkUPD1.py.

◆ default

python.checkUPD1.default

Definition at line 67 of file checkUPD1.py.

◆ dest

python.checkUPD1.dest

Definition at line 67 of file checkUPD1.py.

◆ foldername

python.checkUPD1.foldername

Definition at line 77 of file checkUPD1.py.

◆ help

python.checkUPD1.help

Definition at line 67 of file checkUPD1.py.

◆ None

python.checkUPD1.None

Definition at line 67 of file checkUPD1.py.

◆ options

python.checkUPD1.options

Definition at line 71 of file checkUPD1.py.

◆ parser

python.checkUPD1.parser

Definition at line 66 of file checkUPD1.py.

◆ run

python.checkUPD1.run

Definition at line 73 of file checkUPD1.py.

◆ type

python.checkUPD1.type

Definition at line 67 of file checkUPD1.py.

◆ upd1_tag

python.checkUPD1.upd1_tag

Definition at line 75 of file checkUPD1.py.

◆ upd4_tag

python.checkUPD1.upd4_tag

Definition at line 74 of file checkUPD1.py.

◆ usage

python.checkUPD1.usage

Definition at line 66 of file checkUPD1.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.checkUPD1.getRunNumberFromUPD1
def getRunNumberFromUPD1(DB_number, tag, run, foldername, connstr)
Definition: checkUPD1.py:34
python.checkUPD1.getDBNumberFromUPD4
def getDBNumberFromUPD4(run, tag, foldername, connstr)
Definition: checkUPD1.py:13
Trk::split
@ split
Definition: LayerMaterialProperties.h:38