Functions | |
def | addEntry |
def | addRevision |
def | addRunToCurrentDataTag |
def | alldataTags |
def | bookNewEntry |
def | bookNewRevision |
def | branchInfoByName |
def | branchType |
def | createBranch |
def | createDataTag |
Data Tagging API. | |
def | currentDataTag |
def | dataIdsByCurrentTag |
def | dataIdsByTagId |
def | dataIdsByTagName |
def | dataRevisionsOfEntry |
def | dataTagInfo |
def | entryInBranch |
def | getDataTagId |
def | latestDataRevisionOfEntry |
def | revisionsInBranch |
def | revisionsInBranchName |
def | revisionsInTag |
Variables | |
tuple | databranchinfo = (branchid,'DATA') |
tuple | datainfo = createBranch(schema,'DATA','TRUNK',comment='hold data') |
tuple | entryinfo = (revision_id,entry_id,str(runnum),data_id) |
tuple | hltentryid = entryInBranch(schema,nameDealer.hltdataTableName(),str(runnum),'DATA') |
tuple | latestrevision = latestDataRevisionOfEntry(schema,nameDealer.lumidataTableName(),lumientry_id,revlist) |
tuple | lumientry_id = entryInBranch(schema,nameDealer.lumidataTableName(),'1211','DATA') |
tuple | lumientryid = entryInBranch(schema,nameDealer.lumidataTableName(),str(runnum),'DATA') |
string | myconstr = 'sqlite_file:test.db' |
tuple | norminfo = createBranch(schema,'NORM','TRUNK',comment='hold normalization factor') |
tuple | revisioninfo = bookNewRevision( schema,nameDealer.lumidataTableName() ) |
tuple | revlist = revisionsInBranchName(schema,'DATA') |
tuple | schema = session.nominalSchema() |
tuple | session = svc.openSession(isReadOnly=False,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
tuple | svc = sessionManager.sessionManager(myconstr,debugON=False) |
tuple | tables = lumidbDDL.createTables(schema) |
tuple | trgentryid = entryInBranch(schema,nameDealer.trgdataTableName(),str(runnum),'DATA') |
tuple | trunkinfo = createBranch(schema,'TRUNK',None,comment='main') |
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.
Referenced by CalibrationInterface< CategoryT, CalibDataT >::addCategoryDefinition(), TAPD::addEntry(), TMom::addEntry(), EcalMatacqAnalyzer::endJob(), and AlgorithmCalibration< T, CO >::readCategories().
00343 : 00344 ''' 00345 input: 00346 entryinfo (revision_id(0),entry_id(1),entry_name(2),data_id(3)) 00347 branchinfo (branch_id,branch_name) 00348 1.allocate and insert a new revision into the revisions table 00349 2.allocate and insert a new entry into the entry table with the new revision 00350 3.inset into data_rev table with new data_id ,revision)id mapping 00351 00352 insert into revisions(revision_id,branch_id,branch_name,comment,ctime) values() 00353 insert into datatablename_entries (entry_id,revision_id) values() 00354 insert into datatablename_rev(data_id,revision_id) values() 00355 ''' 00356 try: 00357 revisiontableName=nameDealer.revisionTableName() 00358 entrytableName=nameDealer.entryTableName(datatableName) 00359 revtableName=nameDealer.revmapTableName(datatableName) 00360 00361 db=dbUtil.dbUtil(schema) 00362 tabrowDefDict={} 00363 tabrowDefDict['REVISION_ID']='unsigned long long' 00364 tabrowDefDict['BRANCH_ID']='unsigned long long' 00365 tabrowDefDict['BRANCH_NAME']='string' 00366 tabrowDefDict['CTIME']='time stamp' 00367 tabrowValueDict={} 00368 tabrowValueDict['REVISION_ID']=entryinfo[0] 00369 tabrowValueDict['BRANCH_ID']=branchinfo[0] 00370 tabrowValueDict['BRANCH_NAME']=branchinfo[1] 00371 tabrowValueDict['CTIME']=coral.TimeStamp() 00372 db.insertOneRow(revisiontableName,tabrowDefDict,tabrowValueDict) 00373 00374 tabrowDefDict={} 00375 tabrowDefDict['REVISION_ID']='unsigned long long' 00376 tabrowDefDict['ENTRY_ID']='unsigned long long' 00377 tabrowDefDict['NAME']='string' 00378 00379 tabrowValueDict={} 00380 tabrowValueDict['REVISION_ID']=entryinfo[0] 00381 tabrowValueDict['ENTRY_ID']=entryinfo[1] 00382 tabrowValueDict['NAME']=entryinfo[2] 00383 db.insertOneRow(entrytableName,tabrowDefDict,tabrowValueDict) 00384 00385 tabrowDefDict={} 00386 tabrowDefDict['REVISION_ID']='unsigned long long' 00387 tabrowDefDict['DATA_ID']='unsigned long long' 00388 tabrowValueDict={} 00389 tabrowValueDict['REVISION_ID']=entryinfo[0] 00390 tabrowValueDict['DATA_ID']=entryinfo[3] 00391 db.insertOneRow(revtableName,tabrowDefDict,tabrowValueDict) 00392 except: 00393 raise
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.
00395 : 00396 ''' 00397 1.insert a new revision into the revisions table 00398 2.insert into data_id, revision_id pair to datatable_revmap 00399 insert into revisions(revision_id,branch_id,branch_name,ctime) values() 00400 insert into datatable_rev(data_id,revision_id) values()) 00401 input: 00402 revisioninfo (revision_id(0),data_id(1)) 00403 branchinfo (branch_id(0),branch_name(1)) 00404 ''' 00405 try: 00406 revisiontableName=nameDealer.revisionTableName() 00407 revtableName=nameDealer.revmapTableName(datatableName) 00408 00409 db=dbUtil.dbUtil(schema) 00410 tabrowDefDict={} 00411 tabrowDefDict['REVISION_ID']='unsigned long long' 00412 tabrowDefDict['BRANCH_ID']='unsigned long long' 00413 tabrowDefDict['BRANCH_NAME']='string' 00414 tabrowDefDict['CTIME']='time stamp' 00415 00416 tabrowValueDict={} 00417 tabrowValueDict['REVISION_ID']=revisioninfo[0] 00418 tabrowValueDict['BRANCH_ID']=branchinfo[0] 00419 tabrowValueDict['BRANCH_NAME']=branchinfo[1] 00420 tabrowValueDict['CTIME']=coral.TimeStamp() 00421 00422 db.insertOneRow(revisiontableName,tabrowDefDict,tabrowValueDict) 00423 00424 tabrowDefDict={} 00425 tabrowDefDict['REVISION_ID']='unsigned long long' 00426 tabrowDefDict['DATA_ID']='unsigned long long' 00427 tabrowValueDict={} 00428 tabrowValueDict['REVISION_ID']=revisioninfo[0] 00429 tabrowValueDict['DATA_ID']=revisioninfo[1] 00430 db.insertOneRow(revtableName,tabrowDefDict,tabrowValueDict) 00431 except: raise
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.
00550 : 00551 ''' 00552 select tagid from tags 00553 insert into tagruns(tagid,runnum,lumidataid,trgdataid,hltdataid,creationtime,comment) values(tagid,runnum,lumiid,trgid,hltid,creationtime,comment) 00554 ''' 00555 if lumitype not in ['HF','PIXEL']: 00556 raise ValueError('unknown lumitype '+lumitype) 00557 if lumitype=='HF': 00558 tagrunstablename=nameDealer.tagRunsTableName() 00559 else: 00560 tagrunstablename=nameDealer.pixeltagRunsTableName() 00561 currenttagid=currentDataTag(schema,lumitype=lumitype)[0] 00562 try: 00563 db=dbUtil.dbUtil(schema) 00564 tabrowDefDict={} 00565 tabrowDefDict['TAGID']='unsigned long long' 00566 tabrowDefDict['RUNNUM']='unsigned int' 00567 tabrowDefDict['LUMIDATAID']='unsigned long long' 00568 tabrowDefDict['TRGDATAID']='unsigned long long' 00569 tabrowDefDict['HLTDATAID']='unsigned long long' 00570 tabrowDefDict['CREATIONTIME']='time stamp' 00571 tabrowDefDict['COMMENT']='string' 00572 tabrowValueDict={} 00573 tabrowValueDict['TAGID']=currenttagid 00574 tabrowValueDict['RUNNUM']=runnum 00575 tabrowValueDict['LUMIDATAID']=lumiid 00576 tabrowValueDict['TRGDATAID']=trgid 00577 tabrowValueDict['HLTDATAID']=hltid 00578 tabrowValueDict['CREATIONTIME']=coral.TimeStamp() 00579 tabrowValueDict['COMMENT']=comment 00580 db.insertOneRow( tagrunstablename,tabrowDefDict, tabrowValueDict ) 00581 except: 00582 raise
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.
00584 : 00585 ''' 00586 select tagname,tagid from tags,tagruns 00587 if number of tags==1->open tag 00588 if tagid is max ->open tag 00589 for closed tag: 00590 max run=max(runnum) where tagid=:tagid 00591 min run 00592 select min(runnum) from tagruns where tagid<=:tagid 00593 for open tag: 00594 max run=None 00595 min run 00596 select min(runnum) from tagruns where tagid<=:tagid 00597 output: 00598 {tagid:(name,minrun,maxrun,creationtime)} 00599 ''' 00600 if lumitype not in ['HF','PIXEL']: 00601 raise ValueError('unknown lumitype '+lumitype) 00602 if lumitype=='HF': 00603 tagstablename=nameDealer.tagsTableName() 00604 tagrunstablename=nameDealer.tagRunsTableName() 00605 else: 00606 tagstablename=nameDealer.pixeltagsTableName() 00607 tagrunstablename=nameDealer.pixeltagRunsTableName() 00608 tagmap={}#{tagid:[tagname,minrun,maxrun,creationtime]} 00609 try: 00610 qHandle=schema.newQuery() 00611 qHandle.addToTableList( tagstablename ) 00612 qCondition=coral.AttributeList() 00613 qHandle.addToOutputList('TAGNAME') 00614 qHandle.addToOutputList('TAGID') 00615 qHandle.addToOutputList("TO_CHAR(CREATIONTIME,\'MM/DD/YY HH24:MI:SS\')",'creationtime') 00616 qResult=coral.AttributeList() 00617 qResult.extend('TAGNAME','string') 00618 qResult.extend('TAGID','unsigned long long') 00619 qResult.extend('creationtime','string') 00620 qHandle.defineOutput(qResult) 00621 cursor=qHandle.execute() 00622 while cursor.next(): 00623 tagname=cursor.currentRow()['TAGNAME'].data() 00624 tagid=cursor.currentRow()['TAGID'].data() 00625 creationtime=cursor.currentRow()['creationtime'].data() 00626 tagmap[tagid]=[tagname,0,0,creationtime] 00627 del qHandle 00628 00629 tagids=tagmap.keys() 00630 allruns=set() 00631 for tagid in tagids: 00632 qConditionStr='TAGID<=:tagid' 00633 qCondition=coral.AttributeList() 00634 qCondition.extend('tagid','unsigned long long') 00635 qCondition['tagid'].setData(tagid) 00636 qHandle=schema.newQuery() 00637 qHandle.addToTableList( tagrunstablename ) 00638 qResult=coral.AttributeList() 00639 qResult.extend('RUNNUM','unsigned int') 00640 qHandle.defineOutput(qResult) 00641 qHandle.setCondition(qConditionStr,qCondition) 00642 qHandle.addToOutputList('RUNNUM') 00643 cursor=qHandle.execute() 00644 while cursor.next(): 00645 rnum=cursor.currentRow()['RUNNUM'].data() 00646 allruns.add(rnum) 00647 minrun=0 00648 maxrun=0 00649 if len(allruns)!=0: 00650 minrun=min(allruns) 00651 maxrun=max(allruns) 00652 tagmap[tagid][1]=minrun 00653 if len(tagmap)>1 and tagid!=max(tagids): 00654 tagmap[tagid][2]=maxrun 00655 except: 00656 raise 00657 return tagmap
def revisionDML::bookNewEntry | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,entry_id,data_id
Definition at line 316 of file revisionDML.py.
00317 : 00318 ''' 00319 allocate new revision_id,entry_id,data_id 00320 ''' 00321 try: 00322 entrytableName=nameDealer.entryTableName(datatableName) 00323 iddealer=idDealer.idDealer(schema) 00324 revision_id=iddealer.generateNextIDForTable( nameDealer.revisionTableName() ) 00325 data_id=iddealer.generateNextIDForTable( datatableName) 00326 entry_id=iddealer.generateNextIDForTable( nameDealer.entryTableName(datatableName) ) 00327 return (revision_id,entry_id,data_id) 00328 except: 00329 raise
def revisionDML::bookNewRevision | ( | schema, | |
datatableName | |||
) |
allocate new revision_id,data_id
Definition at line 330 of file revisionDML.py.
00331 : 00332 ''' 00333 allocate new revision_id,data_id 00334 ''' 00335 try: 00336 iddealer=idDealer.idDealer(schema) 00337 revision_id=iddealer.generateNextIDForTable( nameDealer.revisionTableName() ) 00338 data_id=iddealer.generateNextIDForTable(datatableName) 00339 return (revision_id,data_id) 00340 except: 00341 raise
def revisionDML::branchInfoByName | ( | schema, | |
branchName | |||
) |
select (revision_id,branch_id) from revisions where name=:branchName
Definition at line 282 of file revisionDML.py.
00283 : 00284 ''' 00285 select (revision_id,branch_id) from revisions where name=:branchName 00286 ''' 00287 try: 00288 qHandle=schema.newQuery() 00289 qHandle.addToTableList( nameDealer.revisionTableName() ) 00290 qHandle.addToOutputList('REVISION_ID','revision_id') 00291 qHandle.addToOutputList('BRANCH_ID','branch_id') 00292 qCondition=coral.AttributeList() 00293 qCondition.extend('name','string') 00294 qCondition['name'].setData(branchName) 00295 qResult=coral.AttributeList() 00296 qResult.extend('revision_id','unsigned long long') 00297 qResult.extend('branch_id','unsigned long long') 00298 qHandle.defineOutput(qResult) 00299 qHandle.setCondition('NAME=:name',qCondition) 00300 cursor=qHandle.execute() 00301 revision_id=None 00302 branch_id=None 00303 while cursor.next(): 00304 revision_id=cursor.currentRow()['revision_id'].data() 00305 branch_id=cursor.currentRow()['branch_id'].data() 00306 del qHandle 00307 return (revision_id,branch_id) 00308 except Exception,e : 00309 raise RuntimeError(' revisionDML.branchInfoByName: '+str(e)) 00310 00311 00312 #======================================================= 00313 # 00314 # INSERT requires in update transaction 00315 # #=======================================================
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.
Referenced by edm::PoolOutputModule::beginJob(), 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().
00113 : 00114 ''' 00115 output: tag,branch 00116 the difference between tag and branch: tag is an empty branch 00117 select count(revision_id) from revisions where branch_name=:name 00118 if >0: is real branch 00119 else: is tag 00120 ''' 00121 result='tag' 00122 try: 00123 qHandle=schema.newQuery() 00124 qHandle.addToTableList( nameDealer.revisionTableName() ) 00125 qHandle.addToOutputList('count(REVISION_ID)','nchildren') 00126 qCondition=coral.AttributeList() 00127 qCondition.extend('branch_name','string') 00128 qCondition['branch_name'].setData(name) 00129 qResult=coral.AttributeList() 00130 qResult.extend('nchildren','unsigned int') 00131 qHandle.defineOutput(qResult) 00132 conditionStr='BRANCH_NAME=:branch_name' 00133 qHandle.setCondition(conditionStr,qCondition) 00134 cursor=qHandle.execute() 00135 while cursor.next(): 00136 if cursor.currentRow()['nchildren'].data()>0: 00137 result='branch' 00138 del qHandle 00139 return result 00140 except : 00141 raise 00142 #def revisionsInBranch(schema,branchid): 00143 # ''' 00144 # returns all revision values in a branch/tag 00145 # result=[revision_id] 00146 # select r.revision_id from revisions r where r.branch_id=:branchid and r.revision_id not in (select distinct a.branch_id from revisions a where a.branch_id>:branchid) 00147 # ''' 00148 # result=[] 00149 # try: 00150 # qHandle=schema.newQuery() 00151 # subquery=qHandle.defineSubQuery('B') 00152 # subquery.addToTableList( nameDealer.revisionTableName(),'a' ) 00153 # subquery.addToOutputList('distinct a.BRANCH_ID') 00154 # subqueryCondition=coral.AttributeList() 00155 # subqueryCondition.extend('branchid','unsigned long long') 00156 # subqueryCondition['branchid'].setData(branchid) 00157 # subquery.setCondition('a.BRANCH_ID>:branchid',subqueryCondition) 00158 # 00159 # qHandle.addToTableList( nameDealer.revisionTableName(),'r' ) 00160 # qHandle.addToTableList( 'B') 00161 # qHandle.addToOutputList('r.REVISION_ID','revision_id') 00162 # qCondition=coral.AttributeList() 00163 # qCondition.extend('branchid','unsigned long long') 00164 # qCondition['branchid'].setData(branchid) 00165 # qResult=coral.AttributeList() 00166 # qResult.extend('revision_id','unsigned long long') 00167 # qHandle.defineOutput(qResult) 00168 # conditionStr='r.BRANCH_ID=:branchid AND r.REVISION_ID NOT IN B' 00169 # qHandle.setCondition(conditionStr,qCondition) 00170 # cursor=qHandle.execute() 00171 # while cursor.next(): 00172 # result.append(cursor.currentRow()['revision_id'].data()) 00173 # del qHandle 00174 # return result 00175 # except : 00176 # raise
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.
00433 : 00434 ''' 00435 create a new branch/tag under given parentnode 00436 insert into revisions(revision_id,branch_id,branch_name,name,comment,ctime) values() 00437 return (revisionid,parentid,parentname) 00438 ''' 00439 try: 00440 parentid=None 00441 revisionid=0 00442 if not parentname is None: 00443 qHandle=schema.newQuery() 00444 qHandle.addToTableList( nameDealer.revisionTableName() ) 00445 qHandle.addToOutputList( 'REVISION_ID','revision_id' ) 00446 qCondition=coral.AttributeList() 00447 qCondition.extend('parentname','string') 00448 qCondition['parentname'].setData(parentname) 00449 qResult=coral.AttributeList() 00450 qResult.extend('revision_id','unsigned long long') 00451 qHandle.defineOutput(qResult) 00452 qHandle.setCondition('NAME=:parentname',qCondition) 00453 cursor=qHandle.execute() 00454 while cursor.next(): 00455 parentid=cursor.currentRow()['revision_id'].data() 00456 del qHandle 00457 else: 00458 parentname='ROOT' 00459 iddealer=idDealer.idDealer(schema) 00460 revisionid=iddealer.generateNextIDForTable( nameDealer.revisionTableName() ) 00461 db=dbUtil.dbUtil(schema) 00462 tabrowDefDict={} 00463 tabrowDefDict['REVISION_ID']='unsigned long long' 00464 tabrowDefDict['BRANCH_ID']='unsigned long long' 00465 tabrowDefDict['BRANCH_NAME']='string' 00466 tabrowDefDict['NAME']='string' 00467 tabrowDefDict['COMMENT']='string' 00468 tabrowDefDict['CTIME']='time stamp' 00469 tabrowValueDict={} 00470 tabrowValueDict['REVISION_ID']=revisionid 00471 tabrowValueDict['BRANCH_ID']=parentid 00472 tabrowValueDict['BRANCH_NAME']=parentname 00473 tabrowValueDict['NAME']=name 00474 tabrowValueDict['COMMENT']=comment 00475 tabrowValueDict['CTIME']=coral.TimeStamp() 00476 db.insertOneRow(nameDealer.revisionTableName(),tabrowDefDict, tabrowValueDict ) 00477 return (revisionid,parentid,parentname) 00478 except: 00479 raise
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.
00484 : 00485 ''' 00486 insert into tags(tagname,tagid,creationtime) values() 00487 output: 00488 tagname,tagid,creationtime 00489 ''' 00490 if lumitype not in ['HF','PIXEL']: 00491 raise ValueError('unknown lumitype '+lumitype) 00492 if lumitype=='HF': 00493 tagstablename=nameDealer.tagsTableName() 00494 else: 00495 tagstablename=nameDealer.pixeltagsTableName() 00496 try: 00497 iddealer=idDealer.idDealer(schema) 00498 tagid=iddealer.generateNextIDForTable( tagstablename ) 00499 db=dbUtil.dbUtil(schema) 00500 tabrowDefDict={} 00501 tabrowDefDict['TAGNAME']='string' 00502 tabrowDefDict['TAGID']='unsigned long long' 00503 tabrowDefDict['CREATIONTIME']='time stamp' 00504 tabrowValueDict={} 00505 tabrowValueDict['TAGNAME']=tagname 00506 tabrowValueDict['TAGID']=tagid 00507 creationtime=coral.TimeStamp() 00508 tabrowValueDict['CREATIONTIME']=creationtime 00509 db.insertOneRow(tagstablename,tabrowDefDict, tabrowValueDict ) 00510 return (tagname,tagid,creationtime) 00511 except: 00512 raise
def revisionDML::currentDataTag | ( | schema, | |
lumitype = 'HF' |
|||
) |
select tagid,tagname from tags output:(tagid,tagname)
Definition at line 513 of file revisionDML.py.
00514 : 00515 ''' 00516 select tagid,tagname from tags 00517 output:(tagid,tagname) 00518 ''' 00519 if lumitype not in ['HF','PIXEL']: 00520 raise ValueError('unknown lumitype '+lumitype) 00521 if lumitype=='HF': 00522 tagstablename=nameDealer.tagsTableName() 00523 else: 00524 tagstablename=nameDealer.pixeltagsTableName() 00525 tagmap={} 00526 try: 00527 qHandle=schema.newQuery() 00528 qHandle.addToTableList( tagstablename ) 00529 qHandle.addToOutputList('TAGID') 00530 qHandle.addToOutputList('TAGNAME') 00531 qResult=coral.AttributeList() 00532 qResult.extend('TAGID','unsigned long long') 00533 qResult.extend('TAGNAME','string') 00534 qHandle.defineOutput(qResult) 00535 cursor=qHandle.execute() 00536 currenttagid=0 00537 while cursor.next(): 00538 tagid=cursor.currentRow()['TAGID'].data() 00539 tagname=cursor.currentRow()['TAGNAME'].data() 00540 tagmap[tagid]=tagname 00541 del qHandle 00542 if len(tagmap)!=0: 00543 currenttagid=max(tagmap.keys()) 00544 if currenttagid==0: 00545 raise 'currentDataTag: no tag available' 00546 return (currenttagid,tagmap[currenttagid]) 00547 except: 00548 raise
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.
00890 : 00891 ''' 00892 dataIdsByTagId(schema,currenttagid,runlist) 00893 output: 00894 (currenttagname,{run:(lumidataid,trgdataid,hltdataid)}) 00895 ''' 00896 (currenttagid,currenttagname)=currentDataTag(schema) 00897 result=dataIdsByTagId(schema,currenttagid,runlist=runlist,withcomment=False,lumitype=lumitype) 00898 return (currenttagname,result)
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.
00799 : 00800 ''' 00801 select runnum,lumidataid,trgdataid,hltdataid,comment from tagruns where TAGID<=:tagid; 00802 input: 00803 runlist: select run list, if None, all 00804 output: 00805 {run:(lumidataid,trgdataid,hltdataid,(creationtime,comment))} 00806 ''' 00807 if lumitype not in ['HF','PIXEL']: 00808 raise ValueError('unknown lumitype '+lumitype) 00809 if lumitype=='HF': 00810 tagrunstablename=nameDealer.tagRunsTableName() 00811 else: 00812 tagrunstablename=nameDealer.pixeltagRunsTableName() 00813 result={}#{run:[lumiid,trgid,hltid,comment(optional)]} 00814 commentdict={}#{(lumiid,trgid,hltid):[ctimestr,comment]} 00815 try: 00816 qHandle=schema.newQuery() 00817 qHandle.addToTableList(tagrunstablename) 00818 qConditionStr='TAGID<=:tagid' 00819 qCondition=coral.AttributeList() 00820 qCondition.extend('tagid','unsigned long long') 00821 qCondition['tagid'].setData(tagid) 00822 qResult=coral.AttributeList() 00823 qResult.extend('RUNNUM','unsigned int') 00824 qResult.extend('LUMIDATAID','unsigned long long') 00825 qResult.extend('TRGDATAID','unsigned long long') 00826 qResult.extend('HLTDATAID','unsigned long long') 00827 if withcomment: 00828 qResult.extend('COMMENT','string') 00829 qResult.extend('creationtime','string') 00830 qHandle.defineOutput(qResult) 00831 qHandle.setCondition(qConditionStr,qCondition) 00832 qHandle.addToOutputList('RUNNUM') 00833 qHandle.addToOutputList('LUMIDATAID') 00834 qHandle.addToOutputList('TRGDATAID') 00835 qHandle.addToOutputList('HLTDATAID') 00836 if withcomment: 00837 qHandle.addToOutputList('COMMENT') 00838 qHandle.addToOutputList("TO_CHAR(CREATIONTIME,\'MM/DD/YY HH24:MI:SS\')",'creationtime') 00839 cursor=qHandle.execute() 00840 while cursor.next(): 00841 runnum=cursor.currentRow()['RUNNUM'].data() 00842 if runlist is not None and runnum not in runlist: 00843 continue 00844 lumidataid=0 00845 if not cursor.currentRow()['LUMIDATAID'].isNull(): 00846 lumidataid=cursor.currentRow()['LUMIDATAID'].data() 00847 trgdataid=0 00848 if not cursor.currentRow()['TRGDATAID'].isNull(): 00849 trgdataid=cursor.currentRow()['TRGDATAID'].data() 00850 hltdataid=0 00851 if not cursor.currentRow()['HLTDATAID'].isNull(): 00852 hltdataid=cursor.currentRow()['HLTDATAID'].data() 00853 if not result.has_key(runnum): 00854 result[runnum]=[0,0,0] 00855 if lumidataid>result[runnum][0]: 00856 result[runnum][0]=lumidataid 00857 if trgdataid>result[runnum][1]: 00858 result[runnum][1]=trgdataid 00859 if hltdataid>result[runnum][2]: 00860 result[runnum][2]=hltdataid 00861 if withcomment: 00862 comment='' 00863 creationtime='' 00864 if not cursor.currentRow()['creationtime'].isNull(): 00865 creationtime=cursor.currentRow()['creationtime'].data() 00866 if not cursor.currentRow()['COMMENT'].isNull(): 00867 comment=cursor.currentRow()['COMMENT'].data() 00868 commentdict[(lumidataid,trgdataid,hltdataid)]=(creationtime,comment) 00869 del qHandle 00870 if withcomment: 00871 for run,resultentry in result.items(): 00872 lumiid=resultentry[0] 00873 trgid=resultentry[1] 00874 hltid=resultentry[2] 00875 if commentdict.has_key((lumiid,trgid,hltid)): 00876 resultentry.append(commentdict[(lumiid,trgid,hltid)]) 00877 elif commentdict.has_key((lumiid,0,0)): 00878 resultentry.append(commentdict[(lumiid,0,0)]) 00879 elif commentdict.has_ley((0,trgid,0)): 00880 resultentry.append(commentdict[(0,trgid,0)]) 00881 elif commentdict.has_ley((0,0,hltid)): 00882 resultentry.append(commentdict[(0,0,hltid)]) 00883 else: 00884 resultentry.append(()) 00885 00886 except: 00887 raise 00888 return result
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.
00690 : 00691 ''' 00692 select tagid from tags where tagname=:tagname 00693 input: 00694 runlist: select run list, if None, all 00695 output: 00696 {run:(lumidataid,trgdataid,hltdataid,(creationtime,comment)} 00697 ''' 00698 if lumitype not in ['HF','PIXEL']: 00699 raise ValueError('unknown lumitype '+lumitype) 00700 if lumitype=='HF': 00701 tagstablename=nameDealer.tagsTableName() 00702 else: 00703 tagstablename=nameDealer.pixeltagsTableName() 00704 tagid=None 00705 try: 00706 qHandle=schema.newQuery() 00707 qHandle.addToTableList( tagstablename ) 00708 qConditionStr='TAGNAME=:tagname' 00709 qCondition=coral.AttributeList() 00710 qCondition.extend('tagname','string') 00711 qCondition['tagname'].setData(tagname) 00712 qHandle.addToOutputList('TAGID') 00713 qResult=coral.AttributeList() 00714 qResult.extend('TAGID','unsigned long long') 00715 qHandle.defineOutput(qResult) 00716 qHandle.setCondition(qConditionStr,qCondition) 00717 cursor=qHandle.execute() 00718 while cursor.next(): 00719 if not cursor.currentRow()['TAGID'].isNull(): 00720 tagid=cursor.currentRow()['TAGID'].data() 00721 del qHandle 00722 except: 00723 raise 00724 if tagid is None: 00725 return {} 00726 return dataIdsByTagId(schema,tagid,runlist=runlist,withcomment=withcomment,lumitype=lumitype) 00727
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.
00232 : 00233 ''' 00234 all data version of the given entry whose revision falls in branch revision range 00235 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 00236 input: if isinstance(entry,str): d.entry_name=:entry ; else d.entry_id=:entry 00237 output: [data_id] 00238 ''' 00239 qHandle=schema.newQuery() 00240 try: 00241 result=[] 00242 byname=False 00243 if isinstance(entry,str): 00244 byname=True 00245 qHandle.addToTableList( datatableName,'d' ) 00246 qHandle.addToTableList( nameDealer.revmapTableName(datatableName), 'r') 00247 qHandle.addToOutputList('d.DATA_ID','data_id') 00248 qHandle.addToOutputList('r.REVISION_ID','revision_id') 00249 qCondition=coral.AttributeList() 00250 qConditionStr='d.DATA_ID=r.DATA_ID and ' 00251 if byname: 00252 qCondition.extend('entry_name','string') 00253 qCondition['entry_name'].setData(entry) 00254 qConditionStr+='d.ENTRY_NAME=:entry_name' 00255 else: 00256 qCondition.extend('entry_id','unsigned long long') 00257 qCondition['entry_id'].setData(entry) 00258 qConditionStr+='d.ENTRY_ID=:entry_id' 00259 qResult=coral.AttributeList() 00260 qResult.extend('data_id','unsigned long long') 00261 qResult.extend('revision_id','unsigned long long') 00262 qHandle.defineOutput(qResult) 00263 qHandle.setCondition(qConditionStr,qCondition) 00264 cursor=qHandle.execute() 00265 while cursor.next(): 00266 data_id=cursor.currentRow()['data_id'].data() 00267 revision_id=cursor.currentRow()['revision_id'].data() 00268 if revision_id in revrange: 00269 result.append(data_id) 00270 return result 00271 except : 00272 del qHandle 00273 raise
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.
00729 : 00730 ''' 00731 select tagid from tags where tagname=:tagname 00732 select runnum,comment from tagruns where tagid<=:tagid 00733 input: 00734 runlist: select run list, if None, all 00735 output: 00736 {tagid:(name,minrun,maxrun,creationtime)} 00737 ''' 00738 if lumitype not in ['HF','PIXEL']: 00739 raise ValueError('unknown lumitype '+lumitype) 00740 if lumitype=='HF': 00741 tagstablename=nameDealer.tagsTableName() 00742 tagrunstablename=nameDealer.tagRunsTableName() 00743 else: 00744 tagstablename=nameDealer.pixeltagsTableName() 00745 tagrunstablename=nameDealer.pixeltagRunsTableName() 00746 tagmap={}#{tagid:[tagname,minrun,maxrun,creationtime]} 00747 try: 00748 qHandle=schema.newQuery() 00749 qHandle.addToTableList( tagstablename ) 00750 qCondition=coral.AttributeList() 00751 qHandle.addToOutputList('TAGNAME') 00752 qHandle.addToOutputList('TAGID') 00753 qHandle.addToOutputList("TO_CHAR(CREATIONTIME,\'MM/DD/YY HH24:MI:SS\')",'creationtime') 00754 qResult=coral.AttributeList() 00755 qResult.extend('TAGNAME','string') 00756 qResult.extend('TAGID','unsigned long long') 00757 qResult.extend('creationtime','string') 00758 qHandle.defineOutput(qResult) 00759 cursor=qHandle.execute() 00760 while cursor.next(): 00761 tagname=cursor.currentRow()['TAGNAME'].data() 00762 tagid=cursor.currentRow()['TAGID'].data() 00763 creationtime=cursor.currentRow()['creationtime'].data() 00764 tagmap[tagid]=[tagname,0,0,creationtime] 00765 del qHandle 00766 00767 tagids=tagmap.keys() 00768 allruns=set() 00769 for tagid in tagids: 00770 qConditionStr='TAGID<=:tagid' 00771 qCondition=coral.AttributeList() 00772 qCondition.extend('tagid','unsigned long long') 00773 qCondition['tagid'].setData(tagid) 00774 qHandle=schema.newQuery() 00775 qHandle.addToTableList(tagrunstablename) 00776 qResult=coral.AttributeList() 00777 qResult.extend('RUNNUM','unsigned int') 00778 qHandle.defineOutput(qResult) 00779 qHandle.setCondition(qConditionStr,qCondition) 00780 qHandle.addToOutputList('RUNNUM') 00781 cursor=qHandle.execute() 00782 while cursor.next(): 00783 rnum=cursor.currentRow()['RUNNUM'].data() 00784 if runlist is not None and rnum not in runlist: 00785 continue 00786 allruns.add(rnum) 00787 minrun=0 00788 maxrun=0 00789 if len(allruns)!=0: 00790 minrun=min(allruns) 00791 maxrun=max(allruns) 00792 tagmap[tagid][1]=minrun 00793 if len(tagmap)>1 and tagid!=max(tagids): 00794 tagmap[tagid][2]=maxrun 00795 except: 00796 raise 00797 return tagmap
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.
00189 : 00190 ''' 00191 whether an entry(by name) already exists in the given branch 00192 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 00193 input: 00194 if isinstance(branch,str):byname 00195 else: byid 00196 output:entry_id/None 00197 ''' 00198 try: 00199 result=None 00200 byname=False 00201 if isinstance(branch,str): 00202 byname=True 00203 qHandle=schema.newQuery() 00204 qHandle.addToTableList( nameDealer.entryTableName(datatableName),'e' ) 00205 qHandle.addToTableList( nameDealer.revisionTableName(),'r' ) 00206 qHandle.addToOutputList('e.ENTRY_ID','entry_id') 00207 qCondition=coral.AttributeList() 00208 qCondition.extend('entryname','string') 00209 qCondition['entryname'].setData(entryname) 00210 qConditionStr='r.REVISION_ID=e.REVISION_ID and e.NAME=:entryname and ' 00211 if byname: 00212 qCondition.extend('branch_name','string') 00213 qCondition['branch_name'].setData(branch) 00214 qConditionStr+='r.BRANCH_NAME=:branch_name' 00215 else: 00216 qCondition.extend('branch_id','unsigned long long') 00217 qCondition['branch_id'].setData(branch) 00218 qConditionStr+='r.BRANCH_ID=:branch_id' 00219 qResult=coral.AttributeList() 00220 qResult.extend('entry_id','unsigned long long') 00221 qHandle.defineOutput(qResult) 00222 qHandle.setCondition(qConditionStr,qCondition) 00223 cursor=qHandle.execute() 00224 while cursor.next(): 00225 entry_id=cursor.currentRow()['entry_id'].data() 00226 result=entry_id 00227 del qHandle 00228 return result 00229 except : 00230 raise
def revisionDML::getDataTagId | ( | schema, | |
tagname, | |||
lumitype = 'HF' |
|||
) |
select tagid from tags where tagname=:tagname
Definition at line 658 of file revisionDML.py.
00659 : 00660 ''' 00661 select tagid from tags where tagname=:tagname 00662 ''' 00663 if lumitype not in ['HF','PIXEL']: 00664 raise ValueError('unknown lumitype '+lumitype) 00665 if lumitype=='HF': 00666 tagstablename=nameDealer.tagsTableName() 00667 else: 00668 tagstablename=nameDealer.pixeltagsTableName() 00669 tagid=None 00670 try: 00671 qHandle=schema.newQuery() 00672 qHandle.addToTableList( tagstablename ) 00673 qConditionStr='TAGNAME=:tagname' 00674 qCondition=coral.AttributeList() 00675 qCondition.extend('tagname','string') 00676 qCondition['tagname'].setData(tagname) 00677 qHandle.addToOutputList('TAGID') 00678 qResult=coral.AttributeList() 00679 qResult.extend('TAGID','unsigned long long') 00680 qHandle.defineOutput(qResult) 00681 qHandle.setCondition(qConditionStr,qCondition) 00682 cursor=qHandle.execute() 00683 while cursor.next(): 00684 if not cursor.currentRow()['TAGID'].isNull(): 00685 tagid=cursor.currentRow()['TAGID'].data() 00686 del qHandle 00687 except: 00688 raise return tagid
def revisionDML::latestDataRevisionOfEntry | ( | schema, | |
datatableName, | |||
entry, | |||
revrange | |||
) |
return max(data_id) of all datarevisionofEntry
Definition at line 274 of file revisionDML.py.
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.
00062 : 00063 ''' 00064 returns all revision values in a branch 00065 result=[revision_id] 00066 select distinct branch_id from revisions where branch_id>:branchid; 00067 select revision_id from revisions where branch_id=:branchid ; 00068 if the branchid matches and the revisionid is not in the branchid collection,not 0, then this revision is in the branch 00069 require also revisionid>branchid 00070 ''' 00071 result=[] 00072 qHandle=schema.newQuery() 00073 try: 00074 nextbranches=[] 00075 qHandle.addToTableList( nameDealer.revisionTableName() ) 00076 qHandle.addToOutputList('distinct BRANCH_ID','branch_id') 00077 qCondition=coral.AttributeList() 00078 qCondition.extend('branchid','unsigned long long') 00079 qCondition['branchid'].setData(branchid) 00080 qResult=coral.AttributeList() 00081 qResult.extend('branch_id','unsigned long long') 00082 qHandle.defineOutput(qResult) 00083 qHandle.setCondition('BRANCH_ID>:branchid',qCondition) 00084 cursor=qHandle.execute() 00085 while cursor.next(): 00086 nextbranches.append(cursor.currentRow()['branch_id'].data()) 00087 del qHandle 00088 candidates=[] 00089 conditionStr='BRANCH_ID=:branchid and REVISION_ID!=0' 00090 qHandle=schema.newQuery() 00091 qHandle.addToTableList( nameDealer.revisionTableName() ) 00092 qHandle.addToOutputList('REVISION_ID','revision_id') 00093 qCondition=coral.AttributeList() 00094 qCondition.extend('branchid','unsigned long long') 00095 qCondition['branchid'].setData(branchid) 00096 qResult=coral.AttributeList() 00097 qResult.extend('revision_id','unsigned long long') 00098 qHandle.defineOutput(qResult) 00099 qHandle.setCondition(conditionStr,qCondition) 00100 cursor=qHandle.execute() 00101 while cursor.next(): 00102 candidates.append(cursor.currentRow()['revision_id'].data()) 00103 del qHandle 00104 for c in candidates: 00105 if c in nextbranches: 00106 continue 00107 result.append(c) 00108 return result 00109 except: 00110 if qHandle: del qHandle 00111 raise
def revisionDML::revisionsInBranchName | ( | schema, | |
branchname | |||
) |
returns all revisions in a branch/tag by name
Definition at line 177 of file revisionDML.py.
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.
00013 : 00014 ''' 00015 returns all revisions before tag in selected branch 00016 select revision_id from revisions where revision_id!=0 and revision_id<tagrevisionid and branch_id=:branchid 00017 result=[revision_id] 00018 ''' 00019 result=[] 00020 qHandle=schema.newQuery() 00021 try: 00022 nextbranches=[] 00023 qHandle.addToTableList( nameDealer.revisionTableName() ) 00024 qHandle.addToOutputList('distinct BRANCH_ID','branch_id') 00025 qCondition=coral.AttributeList() 00026 qCondition.extend('branchid','unsigned long long') 00027 qCondition['branchid'].setData(branchid) 00028 qResult=coral.AttributeList() 00029 qResult.extend('branch_id','unsigned long long') 00030 qHandle.defineOutput(qResult) 00031 qHandle.setCondition('BRANCH_ID>:branchid',qCondition) 00032 cursor=qHandle.execute() 00033 while cursor.next(): 00034 nextbranches.append(cursor.currentRow()['branch_id'].data()) 00035 del qHandle 00036 candidates=[] 00037 conditionStr='REVISION_ID!=0 and BRANCH_ID=:branchid and REVISION_ID<:tagrevisionid' 00038 qHandle=schema.newQuery() 00039 qHandle.addToTableList( nameDealer.revisionTableName() ) 00040 qHandle.addToOutputList('REVISION_ID','revision_id') 00041 qCondition=coral.AttributeList() 00042 qCondition.extend('branchid','unsigned long long') 00043 qCondition.extend('tagrevisionid','unsigned long long') 00044 qCondition['branchid'].setData(branchid) 00045 qCondition['tagrevisionid'].setData(tagrevisionid) 00046 qResult=coral.AttributeList() 00047 qResult.extend('revision_id','unsigned long long') 00048 qHandle.defineOutput(qResult) 00049 qHandle.setCondition(conditionStr,qCondition) 00050 cursor=qHandle.execute() 00051 while cursor.next(): 00052 candidates.append(cursor.currentRow()['revision_id'].data()) 00053 del qHandle 00054 for c in candidates: 00055 if c in nextbranches: 00056 continue 00057 result.append(c) 00058 return result 00059 except: 00060 if qHandle:del qHandle raise
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.