def revisionDML.addEntry | ( | schema, | |
datatableName, | |||
entryinfo, | |||
branchinfo | |||
) |
input: entryinfo (revision_id(0),entry_id(1),entry_name(2),data_id(3)) branchinfo (branch_id,branch_name) 1.allocate and insert a new revision into the revisions table 2.allocate and insert a new entry into the entry table with the new revision 3.inset into data_rev table with new data_id ,revision)id mapping insert into revisions(revision_id,branch_id,branch_name,comment,ctime) values() insert into datatablename_entries (entry_id,revision_id) values() insert into datatablename_rev(data_id,revision_id) values()
Definition at line 342 of file revisionDML.py.
References nameDealer.entryTableName(), nameDealer.revisionTableName(), and nameDealer.revmapTableName().
Referenced by CalibrationInterface< CategoryT, CalibDataT >.addCategoryDefinition(), dataDML.addCorrToBranch(), TAPD.addEntry(), TMom.addEntry(), SummaryOutputProducer::TriggerSummary.addEntry(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), normDML.createNorm(), EcalMatacqAnalyzer.endJob(), and AlgorithmCalibration< T, CO >.readCategories().
def revisionDML.addRevision | ( | schema, | |
datatableName, | |||
revisioninfo, | |||
branchinfo | |||
) |
1.insert a new revision into the revisions table 2.insert into data_id, revision_id pair to datatable_revmap insert into revisions(revision_id,branch_id,branch_name,ctime) values() insert into datatable_rev(data_id,revision_id) values()) input: revisioninfo (revision_id(0),data_id(1)) branchinfo (branch_id(0),branch_name(1))
Definition at line 394 of file revisionDML.py.
References nameDealer.revisionTableName(), and nameDealer.revmapTableName().
Referenced by dataDML.addCorrToBranch(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), and normDML.createNorm().
def revisionDML.addRunToCurrentDataTag | ( | schema, | |
runnum, | |||
lumiid, | |||
trgid, | |||
hltid, | |||
lumitype = 'HF' , |
|||
comment = '' |
|||
) |
select tagid from tags insert into tagruns(tagid,runnum,lumidataid,trgdataid,hltdataid,creationtime,comment) values(tagid,runnum,lumiid,trgid,hltid,creationtime,comment)
Definition at line 549 of file revisionDML.py.
References currentDataTag(), nameDealer.pixeltagRunsTableName(), and nameDealer.tagRunsTableName().
def revisionDML.alldataTags | ( | schema, | |
lumitype = 'HF' |
|||
) |
select tagname,tagid from tags,tagruns if number of tags==1->open tag if tagid is max ->open tag for closed tag: max run=max(runnum) where tagid=:tagid min run select min(runnum) from tagruns where tagid<=:tagid for open tag: max run=None min run select min(runnum) from tagruns where tagid<=:tagid output: {tagid:(name,minrun,maxrun,creationtime)}
Definition at line 583 of file revisionDML.py.
References data, bookConverter.max, min(), GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagRunsTableName(), nameDealer.pixeltagsTableName(), nameDealer.tagRunsTableName(), and nameDealer.tagsTableName().
def revisionDML.bookNewEntry | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,entry_id,data_id
Definition at line 316 of file revisionDML.py.
References nameDealer.entryTableName(), and nameDealer.revisionTableName().
Referenced by dataDML.addCorrToBranch(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), and normDML.createNorm().
def revisionDML.bookNewRevision | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,data_id
Definition at line 330 of file revisionDML.py.
References nameDealer.revisionTableName().
Referenced by dataDML.addCorrToBranch(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), and normDML.createNorm().
def revisionDML.branchInfoByName | ( | schema, | |
branchName | |||
) |
select (revision_id,branch_id) from revisions where name=:branchName
Definition at line 282 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
Referenced by revisionsInBranchName().
def revisionDML.branchType | ( | schema, | |
name | |||
) |
output: tag,branch the difference between tag and branch: tag is an empty branch select count(revision_id) from revisions where branch_name=:name if >0: is real branch else: is tag
Definition at line 112 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
Referenced by edm::RootOutputFile.fillBranches(), edm::PoolOutputModule.fillSelectedItemList(), edm::RootOutputFile.finishEndFile(), edm::ProductRegistry.productProduced(), edm::InputProductResolver.resolveProduct_(), edm::PoolOutputModule.respondToOpenInputFile(), edm::RootOutputFile.RootOutputFile(), edm::ProductRegistry.setProductProduced(), and edm::InputTag.tryToCacheIndex().
def revisionDML.createBranch | ( | schema, | |
name, | |||
parentname, | |||
comment = '' |
|||
) |
create a new branch/tag under given parentnode insert into revisions(revision_id,branch_id,branch_name,name,comment,ctime) values() return (revisionid,parentid,parentname)
Definition at line 432 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
Referenced by lumidb2Schema.createBranch().
def revisionDML.createDataTag | ( | schema, | |
tagname, | |||
lumitype = 'HF' |
|||
) |
Data Tagging API.
insert into tags(tagname,tagid,creationtime) values() output: tagname,tagid,creationtime
Definition at line 483 of file revisionDML.py.
References nameDealer.pixeltagsTableName(), and nameDealer.tagsTableName().
def revisionDML.currentDataTag | ( | schema, | |
lumitype = 'HF' |
|||
) |
select tagid,tagname from tags output:(tagid,tagname)
Definition at line 513 of file revisionDML.py.
References data, bookConverter.max, GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagsTableName(), and nameDealer.tagsTableName().
Referenced by addRunToCurrentDataTag(), and dataIdsByCurrentTag().
def revisionDML.dataIdsByCurrentTag | ( | schema, | |
runlist = None , |
|||
lumitype = 'HF' |
|||
) |
dataIdsByTagId(schema,currenttagid,runlist) output: (currenttagname,{run:(lumidataid,trgdataid,hltdataid)})
Definition at line 889 of file revisionDML.py.
References currentDataTag(), and dataIdsByTagId().
def revisionDML.dataIdsByTagId | ( | schema, | |
tagid, | |||
runlist = None , |
|||
withcomment = False , |
|||
lumitype = 'HF' |
|||
) |
select runnum,lumidataid,trgdataid,hltdataid,comment from tagruns where TAGID<=:tagid; input: runlist: select run list, if None, all output: {run:(lumidataid,trgdataid,hltdataid,(creationtime,comment))}
Definition at line 798 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagRunsTableName(), and nameDealer.tagRunsTableName().
Referenced by dataIdsByCurrentTag(), and dataIdsByTagName().
def revisionDML.dataIdsByTagName | ( | schema, | |
tagname, | |||
runlist = None , |
|||
withcomment = False , |
|||
lumitype = 'HF' |
|||
) |
select tagid from tags where tagname=:tagname input: runlist: select run list, if None, all output: {run:(lumidataid,trgdataid,hltdataid,(creationtime,comment)}
Definition at line 689 of file revisionDML.py.
References data, dataIdsByTagId(), GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagsTableName(), and nameDealer.tagsTableName().
def revisionDML.dataRevisionsOfEntry | ( | schema, | |
datatableName, | |||
entry, | |||
revrange | |||
) |
all data version of the given entry whose revision falls in branch revision range select d.data_id,r.revision_id from datatable d, datarevmaptable r where d.entry_id(or name )=:entry and d.data_id=r.data_id input: if isinstance(entry,str): d.entry_name=:entry ; else d.entry_id=:entry output: [data_id]
Definition at line 231 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revmapTableName().
Referenced by latestDataRevisionOfEntry().
def revisionDML.dataTagInfo | ( | schema, | |
tagname, | |||
runlist = None , |
|||
lumitype = 'HF' |
|||
) |
select tagid from tags where tagname=:tagname select runnum,comment from tagruns where tagid<=:tagid input: runlist: select run list, if None, all output: {tagid:(name,minrun,maxrun,creationtime)}
Definition at line 728 of file revisionDML.py.
References data, bookConverter.max, min(), GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagRunsTableName(), nameDealer.pixeltagsTableName(), nameDealer.tagRunsTableName(), and nameDealer.tagsTableName().
def revisionDML.entryInBranch | ( | schema, | |
datatableName, | |||
entryname, | |||
branch | |||
) |
whether an entry(by name) already exists in the given branch select e.entry_id from entrytable e,revisiontable r where r.revision_id=e.revision_id and e.name=:entryname and r.branch_name=branchname/branch_id input: if isinstance(branch,str):byname else: byid output:entry_id/None
Definition at line 188 of file revisionDML.py.
References data, nameDealer.entryTableName(), GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
Referenced by dataDML.addCorrToBranch(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), normDML.createNorm(), dataDML.guessHltDataIdByRunInBranch(), dataDML.guessLumiDataIdByRunInBranch(), and dataDML.guessTrgDataIdByRunInBranch().
def revisionDML.getDataTagId | ( | schema, | |
tagname, | |||
lumitype = 'HF' |
|||
) |
select tagid from tags where tagname=:tagname
Definition at line 658 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, nameDealer.pixeltagsTableName(), and nameDealer.tagsTableName().
def revisionDML.latestDataRevisionOfEntry | ( | schema, | |
datatableName, | |||
entry, | |||
revrange | |||
) |
return max(data_id) of all datarevisionofEntry
Definition at line 274 of file revisionDML.py.
References dataRevisionsOfEntry(), and bookConverter.max.
Referenced by dataDML.guessHltDataIdByRunInBranch(), dataDML.guessLumiDataIdByRunInBranch(), and dataDML.guessTrgDataIdByRunInBranch().
def revisionDML.revisionsInBranch | ( | schema, | |
branchid | |||
) |
returns all revision values in a branch result=[revision_id] select distinct branch_id from revisions where branch_id>:branchid; select revision_id from revisions where branch_id=:branchid ; if the branchid matches and the revisionid is not in the branchid collection,not 0, then this revision is in the branch require also revisionid>branchid
Definition at line 61 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
Referenced by revisionsInBranchName().
def revisionDML.revisionsInBranchName | ( | schema, | |
branchname | |||
) |
returns all revisions in a branch/tag by name
Definition at line 177 of file revisionDML.py.
References branchInfoByName(), and revisionsInBranch().
Referenced by dataDML.guessHltDataIdByRunInBranch(), dataDML.guessLumiDataIdByRunInBranch(), and dataDML.guessTrgDataIdByRunInBranch().
def revisionDML.revisionsInTag | ( | schema, | |
tagrevisionid, | |||
branchid | |||
) |
returns all revisions before tag in selected branch select revision_id from revisions where revision_id!=0 and revision_id<tagrevisionid and branch_id=:branchid result=[revision_id]
Definition at line 12 of file revisionDML.py.
References data, GetRecoTauVFromDQM_MC_cff.next, and nameDealer.revisionTableName().
tuple revisionDML.databranchinfo = (branchid,'DATA') |
Definition at line 917 of file revisionDML.py.
tuple revisionDML.datainfo = createBranch(schema,'DATA','TRUNK',comment='hold data') |
Definition at line 912 of file revisionDML.py.
tuple revisionDML.entryinfo = (revision_id,entry_id,str(runnum),data_id) |
Definition at line 925 of file revisionDML.py.
tuple revisionDML.hltentryid = entryInBranch(schema,nameDealer.hltdataTableName(),str(runnum),'DATA') |
Definition at line 922 of file revisionDML.py.
tuple revisionDML.latestrevision = latestDataRevisionOfEntry(schema,nameDealer.lumidataTableName(),lumientry_id,revlist) |
Definition at line 959 of file revisionDML.py.
tuple revisionDML.lumientry_id = entryInBranch(schema,nameDealer.lumidataTableName(),'1211','DATA') |
Definition at line 957 of file revisionDML.py.
tuple revisionDML.lumientryid = entryInBranch(schema,nameDealer.lumidataTableName(),str(runnum),'DATA') |
Definition at line 920 of file revisionDML.py.
string revisionDML.myconstr = 'sqlite_file:test.db' |
Definition at line 904 of file revisionDML.py.
tuple revisionDML.norminfo = createBranch(schema,'NORM','TRUNK',comment='hold normalization factor') |
Definition at line 914 of file revisionDML.py.
tuple revisionDML.revisioninfo = bookNewRevision( schema,nameDealer.lumidataTableName() ) |
Definition at line 929 of file revisionDML.py.
tuple revisionDML.revlist = revisionsInBranchName(schema,'DATA') |
Definition at line 955 of file revisionDML.py.
tuple revisionDML.schema = session.nominalSchema() |
Definition at line 907 of file revisionDML.py.
tuple revisionDML.session = svc.openSession(isReadOnly=False,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
Definition at line 906 of file revisionDML.py.
tuple revisionDML.svc = sessionManager.sessionManager(myconstr,debugON=False) |
Definition at line 905 of file revisionDML.py.
tuple revisionDML.tables = lumidbDDL.createTables(schema) |
Definition at line 909 of file revisionDML.py.
tuple revisionDML.trgentryid = entryInBranch(schema,nameDealer.trgdataTableName(),str(runnum),'DATA') |
Definition at line 921 of file revisionDML.py.
tuple revisionDML.trunkinfo = createBranch(schema,'TRUNK',None,comment='main') |
Definition at line 910 of file revisionDML.py.