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 340 of file revisionDML.py.
References nameDealer.entryTableName(), nameDealer.revisionTableName(), and nameDealer.revmapTableName().
Referenced by CalibrationInterface< CategoryT, CalibDataT >.addCategoryDefinition(), TAPD.addEntry(), TMom.addEntry(), dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), dataDML.addTrgRunDataToBranch(), 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 392 of file revisionDML.py.
References nameDealer.revisionTableName(), and nameDealer.revmapTableName().
Referenced by dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), and dataDML.addTrgRunDataToBranch().
def revisionDML.bookNewEntry | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,entry_id,data_id
Definition at line 314 of file revisionDML.py.
References nameDealer.entryTableName(), and nameDealer.revisionTableName().
Referenced by dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), and dataDML.addTrgRunDataToBranch().
def revisionDML.bookNewRevision | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,data_id
Definition at line 328 of file revisionDML.py.
References nameDealer.revisionTableName().
Referenced by dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), and dataDML.addTrgRunDataToBranch().
def revisionDML.branchInfoByName | ( | schema, | |
branchName | |||
) |
select (revision_id,branch_id) from revisions where name=:branchName
Definition at line 280 of file revisionDML.py.
References runTheMatrix.data, 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 110 of file revisionDML.py.
References runTheMatrix.data, and nameDealer.revisionTableName().
Referenced by PFTauDiscriminants::DiscriminantBase< int >.branchTree(), edm::RootOutputFile.fillBranches(), edm::PoolOutputModule.fillSelectedItemList(), edm::RootOutputFile.finishEndFile(), edm::PrincipalGetAdapter.getBranchDescription(), edm::ProductRegistry.productProduced(), edm::PoolOutputModule.respondToOpenInputFile(), edm::RootOutputFile.RootOutputFile(), and edm::ProductRegistry.setProductProduced().
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 430 of file revisionDML.py.
References runTheMatrix.data, and nameDealer.revisionTableName().
Referenced by lumidb2Schema.createBranch().
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 229 of file revisionDML.py.
References runTheMatrix.data, and nameDealer.revmapTableName().
Referenced by latestDataRevisionOfEntry().
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 186 of file revisionDML.py.
References runTheMatrix.data, nameDealer.entryTableName(), and nameDealer.revisionTableName().
Referenced by dataDML.addHLTRunDataToBranch(), dataDML.addLumiRunDataToBranch(), dataDML.addNormToBranch(), and dataDML.addTrgRunDataToBranch().
def revisionDML.latestDataRevisionOfEntry | ( | schema, | |
datatableName, | |||
entry, | |||
revrange | |||
) |
return max(data_id) of all datarevisionofEntry
Definition at line 272 of file revisionDML.py.
References dataRevisionsOfEntry(), and max().
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 59 of file revisionDML.py.
References runTheMatrix.data, and nameDealer.revisionTableName().
Referenced by revisionsInBranchName().
def revisionDML.revisionsInBranchName | ( | schema, | |
branchname | |||
) |
returns all revisions in a branch/tag by name
Definition at line 175 of file revisionDML.py.
References branchInfoByName(), and revisionsInBranch().
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 10 of file revisionDML.py.
References runTheMatrix.data, and nameDealer.revisionTableName().
tuple revisionDML.databranchinfo = (branchid,'DATA') |
Definition at line 496 of file revisionDML.py.
tuple revisionDML.datainfo = createBranch(schema,'DATA','TRUNK',comment='hold data') |
Definition at line 491 of file revisionDML.py.
tuple revisionDML.entryinfo = (revision_id,entry_id,str(runnum),data_id) |
Definition at line 504 of file revisionDML.py.
tuple revisionDML.hltentryid = entryInBranch(schema,nameDealer.hltdataTableName(),str(runnum),'DATA') |
Definition at line 501 of file revisionDML.py.
tuple revisionDML.latestrevision = latestDataRevisionOfEntry(schema,nameDealer.lumidataTableName(),lumientry_id,revlist) |
Definition at line 538 of file revisionDML.py.
tuple revisionDML.lumientry_id = entryInBranch(schema,nameDealer.lumidataTableName(),'1211','DATA') |
Definition at line 536 of file revisionDML.py.
tuple revisionDML.lumientryid = entryInBranch(schema,nameDealer.lumidataTableName(),str(runnum),'DATA') |
Definition at line 499 of file revisionDML.py.
string revisionDML.myconstr = 'sqlite_file:test.db' |
Definition at line 483 of file revisionDML.py.
tuple revisionDML.norminfo = createBranch(schema,'NORM','TRUNK',comment='hold normalization factor') |
Definition at line 493 of file revisionDML.py.
tuple revisionDML.revisioninfo = bookNewRevision( schema,nameDealer.lumidataTableName() ) |
Definition at line 508 of file revisionDML.py.
tuple revisionDML.revlist = revisionsInBranchName(schema,'DATA') |
Definition at line 534 of file revisionDML.py.
tuple revisionDML.schema = session.nominalSchema() |
Definition at line 486 of file revisionDML.py.
tuple revisionDML.session = svc.openSession(isReadOnly=False,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
Definition at line 485 of file revisionDML.py.
tuple revisionDML.svc = sessionManager.sessionManager(myconstr,debugON=False) |
Definition at line 484 of file revisionDML.py.
tuple revisionDML.tables = lumidbDDL.createTables(schema) |
Definition at line 488 of file revisionDML.py.
tuple revisionDML.trgentryid = entryInBranch(schema,nameDealer.trgdataTableName(),str(runnum),'DATA') |
Definition at line 500 of file revisionDML.py.
tuple revisionDML.trunkinfo = createBranch(schema,'TRUNK',None,comment='main') |
Definition at line 489 of file revisionDML.py.