def dataDML.addHLTRunDataToBranch | ( | schema, | |
runnumber, | |||
hltrundata, | |||
branchinfo | |||
) |
input: hltrundata [pathnameclob(0),datasource(1)] output: (revision_id,entry_id,data_id)
Definition at line 958 of file dataDML.py.
References revisionDML.addEntry(), revisionDML.addRevision(), revisionDML.bookNewEntry(), revisionDML.bookNewRevision(), revisionDML.entryInBranch(), nameDealer.hltdataTableName(), and nameDealer.lumidataTableName().
def dataDML.addLumiRunDataToBranch | ( | schema, | |
runnumber, | |||
lumirundata, | |||
branchinfo | |||
) |
input: lumirundata [datasource] branchinfo (branch_id,branch_name) output: (revision_id,entry_id,data_id)
Definition at line 906 of file dataDML.py.
References revisionDML.addEntry(), revisionDML.addRevision(), revisionDML.bookNewEntry(), revisionDML.bookNewRevision(), revisionDML.entryInBranch(), and nameDealer.lumidataTableName().
def dataDML.addNormToBranch | ( | schema, | |
normname, | |||
amodetag, | |||
norm1, | |||
egev1, | |||
optionalnormdata, | |||
branchinfo | |||
) |
input: branchinfo(normrevisionid,branchname) optionalnormdata {'norm2':norm2,'egev2':egev2} output: (revision_id,entry_id,data_id)
Definition at line 875 of file dataDML.py.
References revisionDML.addEntry(), revisionDML.addRevision(), revisionDML.bookNewEntry(), revisionDML.bookNewRevision(), revisionDML.entryInBranch(), and nameDealer.luminormTableName().
def dataDML.addTrgRunDataToBranch | ( | schema, | |
runnumber, | |||
trgrundata, | |||
branchinfo | |||
) |
input: trgrundata [datasource(0),bitzeroname(1),bitnameclob(2)] bitnames clob, bitnames separated by ',' output: (revision_id,entry_id,data_id)
Definition at line 931 of file dataDML.py.
References revisionDML.addEntry(), revisionDML.addRevision(), revisionDML.bookNewEntry(), revisionDML.bookNewRevision(), revisionDML.entryInBranch(), and nameDealer.trgdataTableName().
def dataDML.beamInfoById | ( | schema, | |
dataid | |||
) |
result (runnum,{lumilsnum,[cmslsnum(0),beamstatus(1),beamenergy(2),beam1intensity(3),beam2intensity(4)]})
Definition at line 472 of file dataDML.py.
References runTheMatrix.data, and nameDealer.lumisummaryv2TableName().
def dataDML.bulkInsertHltLSData | ( | session, | |
runnumber, | |||
data_id, | |||
hltlsdata, | |||
bulksize = 500 |
|||
) |
input: hltlsdata {cmslsnum:[inputcountBlob,acceptcountBlob,prescaleBlob]}
Definition at line 1097 of file dataDML.py.
References nameDealer.lshltTableName().
def dataDML.bulkInsertLumiLSSummary | ( | session, | |
runnumber, | |||
data_id, | |||
lumilsdata, | |||
bulksize = 500 |
|||
) |
input: lumilsdata {lumilsnum:[cmslsnum,instlumi,instlumierror,instlumiquality,beamstatus,beamenergy,numorbit,startorbit,cmsbxindexblob,beam1intensity,beam2intensity,bxlumivalue_occ1,bxlumierror_occ1,bxlumiquality_occ1,bxlumivalue_occ2,bxlumierror_occ2,bxlumiquality_occ2,bxlumivalue_et,bxlumierror_et,bxlumiquality_et]}
Definition at line 1134 of file dataDML.py.
References nameDealer.lumisummaryv2TableName().
def dataDML.bulkInsertTrgLSData | ( | session, | |
runnumber, | |||
data_id, | |||
trglsdata, | |||
bulksize = 500 |
|||
) |
insert trg per-LS data for given run and data_id, this operation can be split in transaction chuncks input: trglsdata {cmslsnum:[deadtime,bitzerocount,bitzeroprescale,trgcountBlob,trgprescaleBlob]} result nrows inserted if nrows==0, then this insertion failed
Definition at line 1057 of file dataDML.py.
References nameDealer.lstrgTableName().
def dataDML.dataentryIdByRun | ( | schema, | |
runnum, | |||
branchfilter | |||
) |
select el.entry_id,et.entry_id,eh.entry_id,el.revision_id,et.revision_id,eh.revision_id from lumidataentiries el,trgdataentries et,hltdataentries eh where el.name=et.name and et.name=eh.name and el.name=:entryname; check on entryrev return [lumientryid,trgentryid,hltentryid]
Definition at line 789 of file dataDML.py.
References runTheMatrix.data, nameDealer.entryTableName(), nameDealer.hltdataTableName(), nameDealer.lumidataTableName(), and nameDealer.trgdataTableName().
def dataDML.guessDataIdByRun | ( | schema, | |
runnum | |||
) |
get dataids by runnumber, if there are duplicates, pick max(dataid).Bypass full version lookups result (lumidataid(0),trgdataid(1),hltdataid(2))
Definition at line 685 of file dataDML.py.
References runTheMatrix.data, nameDealer.hltdataTableName(), nameDealer.lumidataTableName(), max(), and nameDealer.trgdataTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.lumiForRange().
def dataDML.guessnormIdByContext | ( | schema, | |
amodetag, | |||
egev1 | |||
) |
get norm dataids by amodetag, egev if there are duplicates, pick max(dataid).Bypass full version lookups select data_id from luminorm where amodetag=:amodetag and egev_1=:egev1
Definition at line 725 of file dataDML.py.
References runTheMatrix.data, nameDealer.luminormTableName(), and max().
Referenced by lumiCalcAPI.deliveredLumiForRange(), lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.lumiForRange().
def dataDML.guessnormIdByName | ( | schema, | |
normname | |||
) |
get norm dataids by name, if there are duplicates, pick max(dataid).Bypass full version lookups select luminorm.data_id from luminorm where name=:normname result luminormdataid
Definition at line 756 of file dataDML.py.
References runTheMatrix.data, nameDealer.entryTableName(), nameDealer.luminormTableName(), and max().
def dataDML.hltLSById | ( | schema, | |
dataid | |||
) |
result (runnum, {cmslsnum:[prescaleblob,hltcountblob,hltacceptblob]}
Definition at line 645 of file dataDML.py.
References runTheMatrix.data, and nameDealer.lshltTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange().
def dataDML.hltRunById | ( | schema, | |
dataid | |||
) |
result [runnum(0),datasource(1),npath(2),pathnameclob(3)]
Definition at line 572 of file dataDML.py.
References runTheMatrix.data, and nameDealer.hltdataTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange().
def dataDML.hlttrgMappingByrun | ( | schema, | |
runnum | |||
) |
select m.hltkey,m.hltpathname,m.l1seed from cmsrunsummary r,trghltmap m where r.runnum=:runnum and m.hltkey=r.hltkey output: {hltpath:l1seed}
Definition at line 608 of file dataDML.py.
References nameDealer.cmsrunsummaryTableName(), runTheMatrix.data, and nameDealer.trghltMapTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.hltpathsForRange().
def dataDML.insertRunSummaryData | ( | schema, | |
runnumber, | |||
runsummarydata, | |||
complementalOnly = False |
|||
) |
input: runsummarydata [l1key,amodetag,egev,sequence,hltkey,fillnum,starttime,stoptime] output:
Definition at line 985 of file dataDML.py.
References nameDealer.cmsrunsummaryTableName().
def dataDML.insertTrgHltMap | ( | schema, | |
hltkey, | |||
trghltmap | |||
) |
input: trghltmap {hltpath:l1seed} output:
Definition at line 1027 of file dataDML.py.
References nameDealer.trghltMapTableName().
def dataDML.latestdataIdByEntry | ( | schema, | |
entryid, | |||
datatype, | |||
branchfilter | |||
) |
select l.data_id,rl.revision_id from lumidatatable l,lumirevisions rl where l.data_id=rl.data_id and l.entry_id=:entryid check revision_id is in branch
Definition at line 828 of file dataDML.py.
References runTheMatrix.data, nameDealer.hltdataTableName(), nameDealer.lumidataTableName(), max(), nameDealer.revmapTableName(), and nameDealer.trgdataTableName().
def dataDML.lumiBXByAlgo | ( | schema, | |
dataid, | |||
algoname | |||
) |
result {lumilsnum:[cmslsnum,numorbit,startorbit,bxlumivalue,bxlumierr,bxlumiqlty]}
Definition at line 522 of file dataDML.py.
References runTheMatrix.data, and nameDealer.lumisummaryv2TableName().
def dataDML.lumiLSById | ( | schema, | |
dataid, | |||
beamstatus = None , |
|||
beamenergy = None , |
|||
beamenergyFluc = 0.2 , |
|||
withBXInfo = False , |
|||
bxAlgo = 'OCC1' , |
|||
withBeamIntensity = False |
|||
) |
result (runnum,{lumilsnum,[cmslsnum(0),instlumi(1),instlumierr(2),instlumiqlty(3),beamstatus(4),beamenergy(5),numorbit(6),startorbit(7),bxvalueblob(8),bxerrblob(9),bxindexblob(10),beam1intensity(11),beam2intensity(12)]})
Definition at line 374 of file dataDML.py.
References runTheMatrix.data, and nameDealer.lumisummaryv2TableName().
Referenced by lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.lumiForRange().
def dataDML.luminormById | ( | schema, | |
dataid | |||
) |
select entry_name,amodetag,norm_1,egev_1,norm_2,egev_2 from luminorms where DATA_ID=:dataid result [name(0),amodetag(1),norm_1(2),egev_1(3),norm_2(4),energy_2(5) ]
Definition at line 199 of file dataDML.py.
References runTheMatrix.data, and nameDealer.luminormTableName().
Referenced by lumiCalcAPI.deliveredLumiForRange(), lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.lumiForRange().
def dataDML.lumiRunById | ( | schema, | |
dataid | |||
) |
result [runnum(0),datasource(1)]
Definition at line 345 of file dataDML.py.
References runTheMatrix.data, and nameDealer.lumidataTableName().
def dataDML.mostRecentLuminorms | ( | schema, | |
branchfilter | |||
) |
this overview query should be only for norm select e.name,max(n.data_id),r.revision_id , n.amodetag,n.norm_1,n.egev_1,n.norm_2,n.egev_2 from luminorms_entries e,luminorms_rev r,luminorms n where n.entry_id=e.entry_id and n.data_id=r.data_id and r.revision_id>=min(branchfilter) and r.revision_id<=max(branchfilter) group by e.entry_name,r.revision_id,n.amodetag,n.norm_1,n.egev_1,n.norm_2,n.egev_2; output {norm_name:[data_id,amodetag,norm_1,egev_1,norm_2,egev_2]}
Definition at line 137 of file dataDML.py.
References runTheMatrix.data, nameDealer.entryTableName(), nameDealer.luminormTableName(), max(), min, and nameDealer.revmapTableName().
def dataDML.runList | ( | schema, | |
fillnum = None , |
|||
runmin = None , |
|||
runmax = None , |
|||
startT = None , |
|||
stopT = None , |
|||
l1keyPattern = None , |
|||
hltkeyPattern = None , |
|||
amodetag = None , |
|||
nominalEnergy = None , |
|||
energyFlut = 0.2 , |
|||
requiretrg = True , |
|||
requirehlt = True |
|||
) |
select runnum from cmsrunsummary r,lumidata l,trgdata t,hltdata h where r.runnum=l.runnum and l.runnum=t.runnum and t.runnum=h.runnum and r.fillnum=:fillnum and r.runnum>:runmin and r.runnum<:runmax and r.starttime>=:startT and r.stopTime<=:stopT and r.amodetag=:amodetag and regexp_like(r.l1key,:l1keypattern) and regexp_like(hltkey,:hltkeypattern) and l.nominalEnergy>=:nominalEnergy*(1-energyFlut) and l.nominalEnergy<=:nominalEnergy*(1+energyFlut)
Definition at line 12 of file dataDML.py.
References nameDealer.cmsrunsummaryTableName(), runTheMatrix.data, nameDealer.hltdataTableName(), nameDealer.lumidataTableName(), and nameDealer.trgdataTableName().
Referenced by lumiCalcAPI.runList().
def dataDML.runsummary | ( | schema, | |
runnum, | |||
sessionflavor = '' |
|||
) |
select l1key,amodetag,egev,hltkey,fillnum,sequence,to_char(starttime),to_char(stoptime) from cmsrunsummary where runnum=:runnum output: [l1key,amodetag,egev,hltkey,fillnum,sequence,starttime,stoptime]
Definition at line 85 of file dataDML.py.
References nameDealer.cmsrunsummaryTableName(), and runTheMatrix.data.
Referenced by lumiCalcAPI.effectiveLumiForRange(), lumiCalcAPI.lumiForRange(), and SiStripFineDelayHit.produce().
def dataDML.trgLSById | ( | schema, | |
dataid, | |||
withblobdata = False |
|||
) |
result (runnum,{cmslsnum:[deadtimecount(0),bitzerocount(1),bitzeroprescale(2),deadfrac(3),prescalesblob(4),trgcountblob(5)]})
Definition at line 286 of file dataDML.py.
References python.multivaluedict.append(), runTheMatrix.data, and nameDealer.lstrgTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange(), and lumiCalcAPI.lumiForRange().
def dataDML.trgRunById | ( | schema, | |
dataid | |||
) |
select RUNNUM,SOURCE,BITZERONAME,BITNAMECLOB from trgdata where DATA_ID=:dataid result [runnum(0),datasource(1),bitzeroname(2),bitnameclob(3)]
Definition at line 245 of file dataDML.py.
References runTheMatrix.data, and nameDealer.trgdataTableName().
Referenced by lumiCalcAPI.effectiveLumiForRange().
tuple dataDML.branchinfo = (branchid,'DATA') |
Definition at line 1278 of file dataDML.py.
Referenced by TrackerMap.TrackerMap().
tuple dataDML.datainfo = revisionDML.createBranch(schema,'DATA','TRUNK',comment='hold data') |
Definition at line 1266 of file dataDML.py.
tuple dataDML.hltdata = generateDummyData.hlt(schema,20) |
Definition at line 1294 of file dataDML.py.
Definition at line 1296 of file dataDML.py.
Definition at line 1295 of file dataDML.py.
tuple dataDML.hlttrgmap = generateDummyData.hlttrgmap(schema) |
Definition at line 1282 of file dataDML.py.
tuple dataDML.latestNorms = revisionDML.latestDataRevisionOfEntry(schema,nameDealer.luminormTableName(),luminormentry_id,normrevlist) |
Definition at line 1305 of file dataDML.py.
tuple dataDML.latestrevision = revisionDML.latestDataRevisionOfEntry(schema,nameDealer.lumidataTableName(),lumientry_id,revlist) |
Definition at line 1313 of file dataDML.py.
tuple dataDML.lumidummydata = generateDummyData.lumiSummary(schema,20) |
Definition at line 1284 of file dataDML.py.
tuple dataDML.lumientry_id = revisionDML.entryInBranch(schema,nameDealer.lumidataTableName(),'1211','DATA') |
Definition at line 1312 of file dataDML.py.
list dataDML.lumilsdata = lumidummydata[1] |
Definition at line 1286 of file dataDML.py.
tuple dataDML.luminormentry_id = revisionDML.entryInBranch(schema,nameDealer.luminormTableName(),'pp7TeV','NORM') |
Definition at line 1304 of file dataDML.py.
list dataDML.lumirundata = [lumidummydata[0]] |
Definition at line 1285 of file dataDML.py.
string dataDML.myconstr = 'oracle://devdb10/cms_xiezhen_dev' |
Definition at line 1254 of file dataDML.py.
tuple dataDML.normbranchinfo = (normbranchid,'NORM') |
Definition at line 1274 of file dataDML.py.
tuple dataDML.norminfo = revisionDML.createBranch(schema,'NORM','TRUNK',comment='hold normalization factor') |
Definition at line 1268 of file dataDML.py.
tuple dataDML.normrevlist = revisionDML.revisionsInBranchName(schema,'NORM') |
Definition at line 1303 of file dataDML.py.
tuple dataDML.revlist = revisionDML.revisionsInBranchName(schema,'DATA') |
Definition at line 1310 of file dataDML.py.
tuple dataDML.runsummarydata = generateDummyData.runsummary(schema,'PROTPHYS',3500) |
Definition at line 1280 of file dataDML.py.
tuple dataDML.schema = session.nominalSchema() |
Definition at line 1257 of file dataDML.py.
tuple dataDML.session = svc.openSession(isReadOnly=False,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
Definition at line 1256 of file dataDML.py.
tuple dataDML.svc = sessionManager.sessionManager(myconstr,authpath='/afs/cern.ch/user/x/xiezhen',debugON=False) |
Definition at line 1255 of file dataDML.py.
tuple dataDML.tables = lumidbDDL.createTables(schema) |
Definition at line 1261 of file dataDML.py.
tuple dataDML.trgdata = generateDummyData.trg(schema,20) |
Definition at line 1289 of file dataDML.py.
tuple dataDML.trgentry_id = revisionDML.entryInBranch(schema,nameDealer.trgdataTableName(),'1222','DATA') |
Definition at line 1318 of file dataDML.py.
Definition at line 1291 of file dataDML.py.
Definition at line 1290 of file dataDML.py.
tuple dataDML.trunkinfo = revisionDML.createBranch(schema,'TRUNK',None,comment='main') |
Definition at line 1264 of file dataDML.py.