ATLAS Offline Software
Functions | Variables
CaloNoise_fillDB Namespace Reference

Functions

def usage ()
 

Variables

 runSince = sys.argv[1]
 
 lbkSince = sys.argv[2]
 
 runUntil = sys.argv[3]
 
 lbkUntil = sys.argv[4]
 
 tag = sys.argv[5]
 
 inputFile = sys.argv[6]
 
 filename = sys.argv[7]
 
 dbname = sys.argv[8]
 
 folderPath = sys.argv[9]
 
 mu = int(sys.argv[10])
 
 dt = int(sys.argv[11])
 
 iovSince = CaloCondTools.iovFromRunLumi(runSince,lbkSince)
 
 iovUntil = cool.ValidityKeyMax
 
string author = "gunal"
 
string comment = "Updated noise values"
 
 log = CaloCondLogger.getLogger("CaloNoiseWriter")
 
 dbSvc = cool.DatabaseSvcFactory.databaseService()
 
 db = dbSvc.openDatabase("sqlite://;schema="+filename+";dbname="+dbname, False)
 
 spec = cool.RecordSpecification()
 
 fspec = cool.FolderSpecification(cool.FolderVersioning.MULTI_VERSION, spec)
 
 folderTag = tag
 
 desc = CaloCondTools.getAthenaFolderDescr()
 
 folder = db.getFolder(folderPath)
 
 gainDefVec = ROOT.std.vector('float')()
 
 defVecLAr = ROOT.std.vector('std::vector<float>')()
 
 defVecTile = ROOT.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 = ROOT.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 = ROOT.CaloCondUtils.getDbCaloGain(int(fields[2]))
 
 noiseA = float(fields[3])
 
 noiseB = float(fields[4])
 
 channelId = cool.ChannelId(systemId)
 

Function Documentation

◆ usage()

def CaloNoise_fillDB.usage ( )

Definition at line 10 of file CaloNoise_fillDB.py.

10 def usage():
11  print ("Syntax for UPD4 open-end IoV noise update")
12  print (" The first parameter is the run number of IoV start, the second parameter is the lumiblock number for IoV start")
13  print (" The third and fourth parameter are the Run/lb for IoV end (if run is -1, uses open ended IoV)")
14  print (" The fifth parameter is the upd4 tag name")
15  print (" The sixth parameter is input text file name (default calonoise.txt)")
16  print (" The seventh parameter is output sqlite file name (default caloSqlite.db)")
17  print (" The eigth parameter is output DB name (default CONDBR2)")
18  print (" The nineth parameter is output folder name (default /LAR/NoiseOfl/CellNoise) ")
19  print (" The tenth parameter is mu (default 30)")
20  print (" The eleventh parameter is dt (default 25)")
21 
22 

Variable Documentation

◆ author

string CaloNoise_fillDB.author = "gunal"

Definition at line 95 of file CaloNoise_fillDB.py.

◆ blob

CaloNoise_fillDB.blob = data['CaloCondBlob16M']

Definition at line 169 of file CaloNoise_fillDB.py.

◆ channelId

CaloNoise_fillDB.channelId = cool.ChannelId(systemId)

Definition at line 205 of file CaloNoise_fillDB.py.

◆ comment

string CaloNoise_fillDB.comment = "Updated noise values"

Definition at line 96 of file CaloNoise_fillDB.py.

◆ data

CaloNoise_fillDB.data = cool.Record( spec )

Definition at line 168 of file CaloNoise_fillDB.py.

◆ db

CaloNoise_fillDB.db = dbSvc.openDatabase("sqlite://;schema="+filename+";dbname="+dbname, False)

Definition at line 110 of file CaloNoise_fillDB.py.

◆ dbname

string CaloNoise_fillDB.dbname = sys.argv[8]

Definition at line 43 of file CaloNoise_fillDB.py.

◆ dbSvc

CaloNoise_fillDB.dbSvc = cool.DatabaseSvcFactory.databaseService()

Definition at line 108 of file CaloNoise_fillDB.py.

◆ defVec

CaloNoise_fillDB.defVec = info[2]

Definition at line 165 of file CaloNoise_fillDB.py.

◆ defVecLAr

CaloNoise_fillDB.defVecLAr = ROOT.std.vector('std::vector<float>')()

Definition at line 140 of file CaloNoise_fillDB.py.

◆ defVecTile

CaloNoise_fillDB.defVecTile = ROOT.std.vector('std::vector<float>')()

Definition at line 146 of file CaloNoise_fillDB.py.

◆ desc

CaloNoise_fillDB.desc = CaloCondTools.getAthenaFolderDescr()

Definition at line 123 of file CaloNoise_fillDB.py.

◆ dt

int CaloNoise_fillDB.dt = int(sys.argv[11])

Definition at line 58 of file CaloNoise_fillDB.py.

◆ fields

CaloNoise_fillDB.fields = line.split()

Definition at line 179 of file CaloNoise_fillDB.py.

◆ filename

string CaloNoise_fillDB.filename = sys.argv[7]

Definition at line 38 of file CaloNoise_fillDB.py.

◆ flt

dictionary CaloNoise_fillDB.flt = ROOT.CaloCondBlobFlt.getInstance(blob)

Definition at line 170 of file CaloNoise_fillDB.py.

◆ fltDict

dictionary CaloNoise_fillDB.fltDict = {}

Definition at line 161 of file CaloNoise_fillDB.py.

◆ folder

CaloNoise_fillDB.folder = db.getFolder(folderPath)

Definition at line 125 of file CaloNoise_fillDB.py.

◆ folderPath

string CaloNoise_fillDB.folderPath = sys.argv[9]

Definition at line 48 of file CaloNoise_fillDB.py.

◆ folderTag

CaloNoise_fillDB.folderTag = tag

Definition at line 121 of file CaloNoise_fillDB.py.

◆ fspec

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

Definition at line 118 of file CaloNoise_fillDB.py.

◆ gain

CaloNoise_fillDB.gain = ROOT.CaloCondUtils.getDbCaloGain(int(fields[2]))

Definition at line 186 of file CaloNoise_fillDB.py.

◆ gainDefVec

CaloNoise_fillDB.gainDefVec = ROOT.std.vector('float')()

Definition at line 135 of file CaloNoise_fillDB.py.

◆ hash

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

Definition at line 185 of file CaloNoise_fillDB.py.

◆ inputFile

string CaloNoise_fillDB.inputFile = sys.argv[6]

Definition at line 33 of file CaloNoise_fillDB.py.

◆ iovSince

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

Definition at line 84 of file CaloNoise_fillDB.py.

◆ iovUntil

CaloNoise_fillDB.iovUntil = cool.ValidityKeyMax

Definition at line 85 of file CaloNoise_fillDB.py.

◆ lbkSince

CaloNoise_fillDB.lbkSince = sys.argv[2]

Definition at line 28 of file CaloNoise_fillDB.py.

◆ lbkUntil

CaloNoise_fillDB.lbkUntil = sys.argv[4]

Definition at line 30 of file CaloNoise_fillDB.py.

◆ lines

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

Definition at line 177 of file CaloNoise_fillDB.py.

◆ log

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

Definition at line 105 of file CaloNoise_fillDB.py.

◆ mbSize

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

Definition at line 173 of file CaloNoise_fillDB.py.

◆ mu

int CaloNoise_fillDB.mu = int(sys.argv[10])

Definition at line 53 of file CaloNoise_fillDB.py.

◆ nChannel

CaloNoise_fillDB.nChannel = info[0]

Definition at line 164 of file CaloNoise_fillDB.py.

◆ noiseA

CaloNoise_fillDB.noiseA = float(fields[3])

Definition at line 187 of file CaloNoise_fillDB.py.

◆ noiseB

CaloNoise_fillDB.noiseB = float(fields[4])

Definition at line 188 of file CaloNoise_fillDB.py.

◆ runSince

CaloNoise_fillDB.runSince = sys.argv[1]

Definition at line 27 of file CaloNoise_fillDB.py.

◆ runUntil

CaloNoise_fillDB.runUntil = sys.argv[3]

Definition at line 29 of file CaloNoise_fillDB.py.

◆ spec

CaloNoise_fillDB.spec = cool.RecordSpecification()

Definition at line 116 of file CaloNoise_fillDB.py.

◆ sysName

dictionary CaloNoise_fillDB.sysName = info[3]

Definition at line 166 of file CaloNoise_fillDB.py.

◆ systemDict

dictionary CaloNoise_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 153 of file CaloNoise_fillDB.py.

◆ systemId

CaloNoise_fillDB.systemId = int(fields[0])

Definition at line 184 of file CaloNoise_fillDB.py.

◆ tag

CaloNoise_fillDB.tag = sys.argv[5]

Definition at line 31 of file CaloNoise_fillDB.py.

CaloNoise_fillDB.usage
def usage()
Definition: CaloNoise_fillDB.py:10