ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloCondPhysAlgs
share
CaloCellTimeCorrFiller.py
Go to the documentation of this file.
1
#!/bin/env python
2
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
4
5
import
os,sys
6
from
PyCool
import
cool
7
from
CaloCondPhysAlgs.CaloBlobWriter
import
createSqlite
8
9
def
usage
():
10
print
(
"Syntax"
)
11
print
(sys.argv[0],
"<sqlitename> {<textfile> <Run1> <LB1> <Run2> <LB2>}"
)
12
13
if
len(sys.argv)<2:
14
usage
()
15
sys.exit(-1)
16
17
#parameters:
18
sqliteName=sys.argv[1]
19
folderName=
"/LAR/TimeCorrectionOfl/CellTimeOffset"
20
foldertag=
""
.join(folderName.split(
"/"
)) +
"-empty"
21
iovMin = cool.ValidityKeyMin
22
iovMax = cool.ValidityKeyMax
23
filename=
None
24
defaultvalue=0.0
25
26
if
len(sys.argv)>2:
27
filename=sys.argv[2]
28
if
not
os.access(filename,os.R_OK):
29
print
(
"ERROR Can't read input file %s"
% filename)
30
sys.exit(-1)
31
print
(
"Input text file:"
,filename )
32
pass
33
34
if
len(sys.argv)>4:
35
run=int(sys.argv[3])
36
LB=int(sys.argv[4])
37
iovMin=run <<32 | (LB & 0xFFFFFFFF)
38
print
(
"IOV-from run "
,run,
"LB"
,LB)
39
pass
40
41
if
len(sys.argv)>6:
42
run=int(sys.argv[5])
43
LB=int(sys.argv[6])
44
iovMax=run <<32 | (LB & 0xFFFFFFFF)
45
print
(
"IOV-until run "
,run,
"LB"
,LB)
46
pass
47
48
49
createSqlite(sqliteName,folderName,foldertag,iovMin,iovMax,filename,defaultvalue)
50
51
print
(
"To upload:"
)
52
print
(
"export COOL_FLASK=https://cool-proxy-app.cern.ch"
)
53
print
(
"/afs/cern.ch/user/a/atlcond/utilsproxy/AtlCoolMerge.py "
,sqliteName,
" CONDBR2 ATONR_COOLOFL_GPN ATLAS_COOLOFL_LAR_W <password>"
)
CaloCellTimeCorrFiller.usage
usage()
Definition
CaloCellTimeCorrFiller.py:9
Generated on
for ATLAS Offline Software by
1.17.0