ATLAS Offline Software
Functions | Variables
CaloPedestal_fillDB Namespace Reference

Functions

def usage ()
 

Variables

 runSince = sys.argv[1]
 
 lbkSince = sys.argv[2]
 
 runUntil = sys.argv[3]
 
 lbkUntil = sys.argv[4]
 
 runTag = sys.argv[5]
 
string inputFile = "calopedestal.txt"
 
 iovSince = CaloCondTools.iovFromRunLumi(runSince,lbkSince)
 
 iovUntil = cool.ValidityKeyMax
 
string tag = ""
 
string author = "gunal"
 
string comment = "Updated pedestal shift values"
 
 g = cppyy.gbl
 
 log = CaloCondLogger.getLogger("CaloNoiseWriter")
 
 db = CaloCondTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')
 
 spec = cool.RecordSpecification()
 
 fspec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, spec)
 
string folderPath = CaloCondTools.getCaloPrefix()+"Ofl/Pedestal/CellPedestal"
 
string folderTag = tag
 
 desc = CaloCondTools.getAthenaFolderDescr()
 
 folder = db.getFolder(folderPath)
 
 gainDefVec = g.std.vector('float')()
 
 defVecLAr = g.std.vector('std::vector<float>')()
 
 defVecTile = g.std.vector('std::vector<float>')()
 
dictionary systemDict
 
dictionary fltDict = {}
 
 nChannel = info[0]
 
 defVec = info[2]
 
 sysName = info[3]
 
 data = cool.Record( spec )
 
 blob = data['CaloCondBlob16M']
 
 flt = g.CaloCondBlobFlt.getInstance(blob)
 
int mbSize = float(blob.size()) / 1024.
 
 lines = open(inputFile,"r").readlines()
 
 fields = line.split()
 
 systemId = int(fields[0])
 
dictionary hash = int(fields[1]) - systemDict[systemId][1]
 
 gain = g.CaloCondUtils.getDbCaloGain(int(fields[2]))
 
 noiseA = float(fields[3])
 
 noiseB = float(fields[4])
 
 channelId = cool.ChannelId(systemId)
 

Function Documentation

◆ usage()

def CaloPedestal_fillDB.usage ( )

Definition at line 9 of file CaloPedestal_fillDB.py.

9 def usage():
10  print ("Syntax for UPD4 open-end IoV noise update")
11  print (" The first parameter is the run number of IoV start, the second parameter is the lumiblock number for IoV start")
12  print (" The third and fourth parameter are the Run/lb for IoV end (if run is -1, uses open ended IoV)")
13 

Variable Documentation

◆ author

string CaloPedestal_fillDB.author = "gunal"

Definition at line 57 of file CaloPedestal_fillDB.py.

◆ blob

CaloPedestal_fillDB.blob = data['CaloCondBlob16M']

Definition at line 130 of file CaloPedestal_fillDB.py.

◆ channelId

CaloPedestal_fillDB.channelId = cool.ChannelId(systemId)

Definition at line 157 of file CaloPedestal_fillDB.py.

◆ comment

string CaloPedestal_fillDB.comment = "Updated pedestal shift values"

Definition at line 58 of file CaloPedestal_fillDB.py.

◆ data

CaloPedestal_fillDB.data = cool.Record( spec )

Definition at line 129 of file CaloPedestal_fillDB.py.

◆ db

CaloPedestal_fillDB.db = CaloCondTools.openDb('SQLITE', 'CONDBR2', 'UPDATE')

Definition at line 75 of file CaloPedestal_fillDB.py.

◆ defVec

CaloPedestal_fillDB.defVec = info[2]

Definition at line 126 of file CaloPedestal_fillDB.py.

◆ defVecLAr

CaloPedestal_fillDB.defVecLAr = g.std.vector('std::vector<float>')()

Definition at line 102 of file CaloPedestal_fillDB.py.

◆ defVecTile

CaloPedestal_fillDB.defVecTile = g.std.vector('std::vector<float>')()

Definition at line 107 of file CaloPedestal_fillDB.py.

◆ desc

CaloPedestal_fillDB.desc = CaloCondTools.getAthenaFolderDescr()

Definition at line 87 of file CaloPedestal_fillDB.py.

◆ fields

CaloPedestal_fillDB.fields = line.split()

Definition at line 140 of file CaloPedestal_fillDB.py.

◆ flt

dictionary CaloPedestal_fillDB.flt = g.CaloCondBlobFlt.getInstance(blob)

Definition at line 131 of file CaloPedestal_fillDB.py.

◆ fltDict

dictionary CaloPedestal_fillDB.fltDict = {}

Definition at line 122 of file CaloPedestal_fillDB.py.

◆ folder

CaloPedestal_fillDB.folder = db.getFolder(folderPath)

Definition at line 89 of file CaloPedestal_fillDB.py.

◆ folderPath

string CaloPedestal_fillDB.folderPath = CaloCondTools.getCaloPrefix()+"Ofl/Pedestal/CellPedestal"

Definition at line 84 of file CaloPedestal_fillDB.py.

◆ folderTag

string CaloPedestal_fillDB.folderTag = tag

Definition at line 85 of file CaloPedestal_fillDB.py.

◆ fspec

CaloPedestal_fillDB.fspec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, spec)

Definition at line 81 of file CaloPedestal_fillDB.py.

◆ g

CaloPedestal_fillDB.g = cppyy.gbl

Definition at line 66 of file CaloPedestal_fillDB.py.

◆ gain

CaloPedestal_fillDB.gain = g.CaloCondUtils.getDbCaloGain(int(fields[2]))

Definition at line 144 of file CaloPedestal_fillDB.py.

◆ gainDefVec

CaloPedestal_fillDB.gainDefVec = g.std.vector('float')()

Definition at line 98 of file CaloPedestal_fillDB.py.

◆ hash

dictionary CaloPedestal_fillDB.hash = int(fields[1]) - systemDict[systemId][1]

Definition at line 143 of file CaloPedestal_fillDB.py.

◆ inputFile

string CaloPedestal_fillDB.inputFile = "calopedestal.txt"

Definition at line 36 of file CaloPedestal_fillDB.py.

◆ iovSince

CaloPedestal_fillDB.iovSince = CaloCondTools.iovFromRunLumi(runSince,lbkSince)

Definition at line 38 of file CaloPedestal_fillDB.py.

◆ iovUntil

CaloPedestal_fillDB.iovUntil = cool.ValidityKeyMax

Definition at line 39 of file CaloPedestal_fillDB.py.

◆ lbkSince

CaloPedestal_fillDB.lbkSince = sys.argv[2]

Definition at line 19 of file CaloPedestal_fillDB.py.

◆ lbkUntil

CaloPedestal_fillDB.lbkUntil = sys.argv[4]

Definition at line 21 of file CaloPedestal_fillDB.py.

◆ lines

CaloPedestal_fillDB.lines = open(inputFile,"r").readlines()

Definition at line 138 of file CaloPedestal_fillDB.py.

◆ log

CaloPedestal_fillDB.log = CaloCondLogger.getLogger("CaloNoiseWriter")

Definition at line 72 of file CaloPedestal_fillDB.py.

◆ mbSize

int CaloPedestal_fillDB.mbSize = float(blob.size()) / 1024.

Definition at line 134 of file CaloPedestal_fillDB.py.

◆ nChannel

CaloPedestal_fillDB.nChannel = info[0]

Definition at line 125 of file CaloPedestal_fillDB.py.

◆ noiseA

CaloPedestal_fillDB.noiseA = float(fields[3])

Definition at line 145 of file CaloPedestal_fillDB.py.

◆ noiseB

CaloPedestal_fillDB.noiseB = float(fields[4])

Definition at line 146 of file CaloPedestal_fillDB.py.

◆ runSince

CaloPedestal_fillDB.runSince = sys.argv[1]

Definition at line 18 of file CaloPedestal_fillDB.py.

◆ runTag

CaloPedestal_fillDB.runTag = sys.argv[5]

Definition at line 22 of file CaloPedestal_fillDB.py.

◆ runUntil

CaloPedestal_fillDB.runUntil = sys.argv[3]

Definition at line 20 of file CaloPedestal_fillDB.py.

◆ spec

CaloPedestal_fillDB.spec = cool.RecordSpecification()

Definition at line 79 of file CaloPedestal_fillDB.py.

◆ sysName

dictionary CaloPedestal_fillDB.sysName = info[3]

Definition at line 127 of file CaloPedestal_fillDB.py.

◆ systemDict

dictionary CaloPedestal_fillDB.systemDict
Initial value:
1 = { 0 : (31872, 0, defVecLAr , 'EMEC, z<0'),
2  1 : (54784, 31872, defVecLAr , 'EMB , z<0'),
3  2 : (54784, 86656, defVecLAr , 'EMB , z>0'),
4  3 : (31872, 141440, defVecLAr , 'EMEC, z>0'),
5  16 : ( 5632, 0, defVecLAr , 'HEC' ),
6  32 : ( 3524, 0, defVecLAr , 'FCAL' ),
7  48 : ( 5184, 0, defVecTile, 'TILE' )
8  }

Definition at line 114 of file CaloPedestal_fillDB.py.

◆ systemId

CaloPedestal_fillDB.systemId = int(fields[0])

Definition at line 142 of file CaloPedestal_fillDB.py.

◆ tag

string CaloPedestal_fillDB.tag = ""

Definition at line 49 of file CaloPedestal_fillDB.py.

CaloPedestal_fillDB.usage
def usage()
Definition: CaloPedestal_fillDB.py:9