Module ESManager :: Class ESManager
[show private | hide private]
[frames | no frames]

Class ESManager

ESFileTypes --+    
              |    
    SQLUtil --+    
              |    
         ESInit --+
                  |
                 ESManager


Main class which build key/loc files and update EventStore tables in MySQL/SQLite databases.
Method Summary
  __init__(self, db, dbType, logFile)
Initialize database pointer, cursor, db type (MySQL or SQLite).
  allowStoreToDB(self, iFileList, checkFilesInDB)
Check if we can add given files to DB, to be allowed they should contain non-overlaping data among themselves and with EventStore DB.
tuple checkFileList(self, fileList)
Check if run/data from provided fileList are unique
none checkParentsInDB(self)
First thing during injection we need to check if provided list of parents is already present in DB, otherwise we need to inject parent's information.
integer checkVersionInfo(self, iFileList)
Verify that versioning information either setup throguh command line interface or read from input file list.
integer compareLists(self, list1, list2)
Compare two list for their intersection.
list decodeKeyFile(self, keyFileName)
Decode content of key file.
list findParents(self, iFile)
For given input file we find all parents in DB.
tuple (oFileDict,oKeyDict,oLocDict) generateLocAndKeyFilesFrom(self, iFileList)
This routine generates location and key files from given list of intput sources (so far iFileList is a list of PDS files).
string genFile(self, fileName, fileId, loc)
Generate key/location files names.
string genFileName(self, fileName, fileId, buildType)
Generate a unique key/location file name.
string (we use type of returning query) getFileID(self, fileName)
Lookup in FileID and either return fileID or 0 if file is not present.
tuple getFileInfo(self, iFile)
Form a lists of runs, syncValues and proxies from given file.
list @return list of graph id's getGraphIds(self, all)
Return a list of parent graph id's.
list getIds(self, howMany)
High-level function to retieve new set of unique ids.
tuple getLocAndKeyFromParent(self, fileList)
Get list of parent pairs (id,fileName) for key/loc.
long getMaxId(self)
Get MAX fileId from master ESDB.
list getNextId(self, howMany)
Allocate a new file id in FileID table.
list getRunUidListFromFiles(self, fileList)
Scan all files and return runUidList from them.
integer getVersionInfo(self, iFileList)
Parse input file list and try to get version information from 'beginrun' stream according to specifications, please see https://wiki.lepp.cornell.edu/CleoSWIG/bin/view/Main/BeginrunVersioning The real job is done by pds_dump.decodeVersionInfo method.
  openDBs(self)
Open EventStore tables.
none printAllDB(self)
Prints content of all EventStore table by using printDBContent
none printESDBContent(self, dbid)
Prints content of EventStore based on its id.
none printMsg(self, fileList, Message, level)
Form a general report message with outline of current DB shapshot.
list queryFileIDTable(self, tup)
Retrieve file names and type ids from FileID table.
tuple readIDXAFile(self, fileName)
Read ASCII idxa file and return syncValue and runUid lists.
none requestDataFromDB(self, query, whatToRetrieve)
Send query to the master DB, the master DB may be specified by user, otherwise use EventStore@lnx151.
none requestDataFromUserDB(self, query, whatToRetrieve)
We may request data either from user or master DBs.
none setDBHost(self, dbHost)
Set EventStore host name.
none setDBName(self, dbName)
Set EventStore name.
none setDBPort(self, dbPort)
Set EventStore port
none setDBSocket(self, dbSocket)
Set EventStore socket
none setGenerateDB(self, newdb)
Set a flag to generate new database.
none setGrade(self, grade)
Set grade name
none setMasterDB(self, dbName, dbHost, dbPort, dbSocket)
Set EventStore and host names of the underlying master ESDB.
none setMaxRun(self, maxR)
Set upper bound on run range
none setMinRun(self, minR)
Set lower bound on run range
none setNoSkimFlag(self, noskim)
Set no-skim flag, i.e.
none setOutputDir(self, oDir)
Set location of output directory which would be used to write out key/location files
none setParents(self, parents)
Set list of parents
none setReadDuplicatesSource(self, dupRead)
Set file name which will be used to resolve data overlap conflicts
none setSkimFlag(self, skim)
Set skim flag, i.e.
none setSVName(self, svName)
Set data version name
none setTimeStamp(self, timeS)
Set time stamp
none setView(self, view)
Set view name
  uniqueList(self, iList)
Eliminates duplicates from provided list and return back unique list
integer updateDB(self, genMode, iFileList, oHSMDir)
Main method to update EventStore DB.
integer updateDBFromIDXA(self, fileName)
Inject information from idxa file into EventStore.
integer updateDBUsingFileList(self, generationMode, fileList, oHSMDir)
Inject sequentially files into EventStore.
integer updateDBUsingGroupList(self, fileList, oHSMDir)
Inject provided files into EventStore as a logical group, e.g.
none updateFileID(self, id, name, typeId)
Update FileID table entry for given id, name and typeId.
integer updateFileType(self, fileName)
Update FileType table.
none updateGraphPath(self, graphid, svid)
Update GraphPath table.
none updateKeyFile(self, graphid, view, run, uid, key_id)
Update KeyFile table.
none updateLocation(self, graphid, run, uid, loc_id)
Update Location table.
none updatePathDepend(self, svid)
Update PathDepend table.
none updateRunUID(self, run, uid)
Update RunID table.
none updateSpecificVersion(self, svName, svid)
Update SpecificVersion table.
none updateVersion(self)
Update Version table.
    Inherited from ESFileTypes
integer allow(self, type)
Check if given file type is allowed in EventStore.
integer allowToInject(self, type)
Check if given file type is allowed for injection in EventStore.
list esFileTypes(self)
Return a list of known file types supported in EventStore.
list esInjectionFileTypes(self)
Return a list of known file types supported in EventStore which allowed for injection.
integer isDatType(self, iFileType)
Check if given file type is data file.
integer isKeyType(self, iFileType)
Check if given file type is index file.
integer isLocType(self, iFileType)
Check if given file type is location file.
    Inherited from SQLUtil
  close(self)
Close cursor and db connector
  commit(self)
Explicit commit
  createTables(self, table)
Create table(s) in EventStore database.
  dropTable(self, table)
Drop table in EventStore
  endTxn(self, msg)
Update EventStore db log and invoke COMMIT transaction.
  fetchAll(self, query)
Update a EventStore log and retrieve all rows for given query
  fetchOne(self, query)
Update a EventStore log and retrieve one row for given query
  findFileForRun(self, run, time)
Find location of the data file holding given run
  getAllParents(self, childName)
Get all parents for given child name
  getIsolationLevel(self)
Get isolation level of SQLite DB
  getLastId(self, table)
Get last autoincemented id for given table
  getTableNames(self)
Return a list of table names in EventStore DB
  getTables(self)
Return list of tables from DB
  getTableSchema(self, tableName)
Return EventStore table schema
  idx(self, name)
  lockTables(self, tableName)
Lock tables in EventStore.
  makeESQuery(self, timeStamp)
Return the following dictionary: dict[time]=[(grade,minR,maxR,svName)]
  printDBContent(self, table)
Print content of given table in EventStore DB
  printESInfo(self, timeStamp)
Dump EventStore DB content in user readable format.
  printRuns(self, minR, maxR)
Print list of runs for given run range
  rollback(self)
Rollback transaction
  setCommitFlag(self, flag)
Set flag which will inform underlying DB what to do with transaction commits.
  setIsolationLevel(self, level)
Set isolation level for internal DB (necessary to perform SQLite transactions.
  setVerboseLevel(self, verbose)
Set verbose level, 0 low, 1 is high.
  showDepend(self, childName)
Print all dependencies for given data version name.
  startTxn(self, msg)
Update EventStore db log and invoke BEGIN transaction.
  unlockTables(self)
Unlock all locked tables in EventStore
  updateDBAndLog(self, iQuery, cQuery)
  updateLog(self, iQuery, cQuery)
Update EventStore log and execute given query.
  writeToLog(self, msg)
Update EventStore db log with time/pid/msg signature

Method Details

__init__(self, db, dbType, logFile, verbose=0)
(Constructor)

Initialize database pointer, cursor, db type (MySQL or SQLite). Retrieve information about table names from underlying DB.
Overrides:
es_init.ESInit.__init__ (inherited documentation)

allowStoreToDB(self, iFileList, checkFilesInDB=1)

Check if we can add given files to DB, to be allowed they should contain non-overlaping data among themselves and with EventStore DB. This method also perform data integrity checks on input files. Please consult https://wiki.lepp.cornell.edu/CleoSWIG/bin/view/Main/EventStoreAdministration for more information.
Parameters:
iFileList - list of files
           (type=list)
checkFilesInDB - flag
           (type=integer (default=1))
Returns:
a tuple of (oFileList,refFileType,isGroup) where oFileList is output file list, refFileType file type of iFileList, isGroup=1 if iFileList can be treated as a group or not, e.g. qcd_hot.pds, 2photon_hot.pds, bhaga_hot.pds and unkown_hot.pds should be treated as a group, rather pass2.pds, post-pass2.pds and dskim.pds should be treated as individual input sources.

checkFileList(self, fileList)

Check if run/data from provided fileList are unique
Parameters:
fileList - list of files
           (type=list)
Returns:
(rDict,dict,isGroup), two dictionaries: (run: fileList), (file: [runList,pList,svList]) pList list of proxies in a file svList list of sync Values presented in a file and isGroup - a flag which tell how to treat input file list.
           (type=tuple)

checkParentsInDB(self)

First thing during injection we need to check if provided list of parents is already present in DB, otherwise we need to inject parent's information.
Returns:
none
           (type=none)

checkVersionInfo(self, iFileList)

Verify that versioning information either setup throguh command line interface or read from input file list.
Parameters:
iFileList - list of files
           (type=list)
Returns:
status code
           (type=integer)

compareLists(self, list1, list2)

Compare two list for their intersection. If use python 2.4 we use 'set' intersection module, otherwise we count every entry from one list into another.
Parameters:
list1 - list
           (type=list)
list2 - list
           (type=list)
Returns:
1 if lists overlap and 0 otherwise. For python 2.4 and above we use set(list1) & set(list2), otherwise loop over list1 and search its entries in list2.
           (type=integer)

decodeKeyFile(self, keyFileName)

Decode content of key file. It just invokes key_dump.dump method.
Parameters:
keyFileName - file name
           (type=string)
Returns:
a list of (run,evt,uid,stream)
           (type=list)

findParents(self, iFile)

For given input file we find all parents in DB. The fileType of parents should be the same as fileType of input file.
Parameters:
iFile - file name
           (type=string)
Returns:
a tuple (parentDict,presentParents) where parentDict[keyTuple]=[keyFileList,locFileList,locDataDict] keyTuple is (graphid,run,uniqueId) and lists of key and location files as well as locDataDict[(keyFileName,locFileName)]=dataFileList and presentParents is a flag which indicates if parents were found in DB, regardless of input fileType.
           (type=list)

generateLocAndKeyFilesFrom(self, iFileList)

This routine generates location and key files from given list of intput sources (so far iFileList is a list of PDS files). The input sources are analyzed and main ESDB or stand-alone DB is quiering for their parents. Please note that we search for parents of the same data type as input source. For example:
  • there is no parents for pass2 injection since pass2 parents are different data type (binary)
  • there are parents for post-pass, it is pass2.

If parents are found (data files, key and location files) their key/loc. files can be used (instead input data files) for building output location and key files. Otherwise input data files are used. The common API uses 'readers' to walk through files. Currenly we implemented two types of readers, pds reader (see PDSFileReader) and key/loc. files reader (see KeyLocFilesReader class). The reader access data information and navigates through data.

In order to build output key/loc. files we auto-probe the input sources. If parent's key file is found (and it's only one) its sync. values compared to input sync. values and if differ input sources are declared as a skim (input sources are subset of parents, e.g. DSkim). In the case of a skim we use its list of sync. values to drive the building process, otherwise parent's sync. list is used. In later case if input source doesn't have sync. value which is present in parent sync. values a fake entries are inserted into output location files. In this case the output key file is identical to parent one. In the case of skim, the output key file contains a subset of sync. values wrt parent one.

To build output location header we combine proxies from parents and input sources if we're dealing with a skim case, e.g. DSkim injection. Otherwise we only use input source proxies, e.g. pass2 injection (no parents of the same data type are found) or post-pass2 injection (in this case parents are found (pass2), but sync. values of post-pass2 and pass2 are the same).
Parameters:
iFileList - list of input sources (pds files), e.g. qcd_hot.pds, 2photon_hot.pds
           (type=list)
Returns:
we return three dictionaries
  • dict[(run,uid)]=[(fileId,fileName,typeId,view)] this is a list of location files which include newly created loc. file and parents loc. files
  • dict[(run,uid)]=[(fileId,fileName,typeId)] this is a list of key files which include either newly created key file (in the case of skim) or key file of the parent (since it's cover the same sync. values) and parent's key files for different views, e.g. qcd view.
  • dict[fileId]=fileName, map of fileId vs data file names which include input sources and their parents of the same type, e.g. when we inject post-pass2, we return post-pass2 pds file and its parent's pass2 files.
Those dictionaries are used to update FileID, KeyFile, Location and RunUID tables in updateDBUsingGroupList method.
           (type=tuple (oFileDict,oKeyDict,oLocDict))

genFile(self, fileName, fileId, loc=0)

Generate key/location files names. It uses genFileName to do a job.
Parameters:
fileName - name of the file
           (type=string)
fileId - file id
           (type=integer)
loc - flag to generate location file.
           (type=integer)
Returns:
file name generated by genFileName and files are generated either by file_util.build_location for location files or file_util.build_key for key files.
           (type=string)

genFileName(self, fileName, fileId, buildType)

Generate a unique key/location file name. File name is formed by base of data file name, plus an unique file id assgined by FileID table during file id allocation.
Parameters:
fileName - name of the data file, e.g. run111111.bin or myName.pds. File type is analyzed by file_util.fileType.
           (type=string)
fileId - file id
           (type=integer)
buildType - we may be ask to construct either 'location' or 'key' file names
           (type=string)
Returns:
file name in the following form: run-runNumber-esdb-fileId.extension.
           (type=string)

getFileID(self, fileName)

Lookup in FileID and either return fileID or 0 if file is not present. We use fetchOne method to make a query.
Parameters:
fileName - name of the file
           (type=string)
Returns:
file id or 0
           (type=string (we use type of returning query))

getFileInfo(self, iFile)

Form a lists of runs, syncValues and proxies from given file.
Parameters:
iFile - file name
           (type=string)
Returns:
(runList,svList,proxyList), list of runs, sv's and proxies presented in a file
           (type=tuple)

getGraphIds(self, all='')

Return a list of parent graph id's. Can perform nested lookup if all parameter is specified.
Parameters:
all - optional parameter to check parents by using getAllParents
           (type=integer or string)
Returns:
list @return list of graph id's

getIds(self, howMany)

High-level function to retieve new set of unique ids. It uses getNextId to do a job.
Parameters:
howMany - generate 'howMany' new Id's in FileID table
           (type=integer)
Returns:
list of unique id's generated by getNextId
           (type=list)

getLocAndKeyFromParent(self, fileList)

Get list of parent pairs (id,fileName) for key/loc. files from provided list of files.
  • key file case:
    • we only lookup immediate parents
  • loc file case:
    • we lookup all parents in dependency tree
Parameters:
fileList - list of files
           (type=list)
Returns:
a tuple of three lists: (locFileList,keyFileList,viewFileList) where viewFileList is a file list of key files with non-all views.
           (type=tuple)

getMaxId(self)

Get MAX fileId from master ESDB. First we check MaxMasterID table for any recorded maxId. If it presents there we compare <db>@<host>:<port>:<socket> string to current one and raise exception if they're not match. If MaxMasterID is empty we retrieved information from master ESDB and record it to MaxMasterID.
Returns:
maximum file id from the master db.
           (type=long)

getNextId(self, howMany)

Allocate a new file id in FileID table. We rely on autoincrement feature of underlying DB.
Parameters:
howMany - generate 'howMany' new Id's in FileID table
           (type=integer)
Returns:
list of unique id's generated by autoincrment while executing 'INSERT INTO FileID(fileName,typeId) VALUES(NULL,0)' query. Id's are obtained by using getLastId method. Query is logged by updateDBAndLog method.
           (type=list)

getRunUidListFromFiles(self, fileList)

Scan all files and return runUidList from them.
Parameters:
fileList - list of files
           (type=list)
Returns:
list of run and uids presented in input file list
           (type=list)

getVersionInfo(self, iFileList)

Parse input file list and try to get version information from 'beginrun' stream according to specifications, please see https://wiki.lepp.cornell.edu/CleoSWIG/bin/view/Main/BeginrunVersioning The real job is done by pds_dump.decodeVersionInfo method.
Parameters:
iFileList - list of files
           (type=list)
Returns:
status code
           (type=integer)

openDBs(self)

Open EventStore tables. If necessary use createTables routine to create those. Everything is wrapped in transaction: startTxn and endTxn.

printAllDB(self)

Prints content of all EventStore table by using printDBContent
Returns:
none
           (type=none)

printESDBContent(self, dbid)

Prints content of EventStore based on its id.
Parameters:
dbid - DB id
           (type=integer)
Returns:
none
           (type=none)

printMsg(self, fileList, Message, level='ERROR')

Form a general report message with outline of current DB shapshot.
Parameters:
fileList - list of files
           (type=list)
Message - message which passed to here
           (type=string)
level - level of severity
           (type=string)
Returns:
none
           (type=none)

queryFileIDTable(self, tup)

Retrieve file names and type ids from FileID table.
Parameters:
tup - list of file id's
           (type=list)
Returns:
list of triplets (fileId, fileName, typeId).
           (type=list)

readIDXAFile(self, fileName)

Read ASCII idxa file and return syncValue and runUid lists.
Parameters:
fileName - name of the file
           (type=string)
Returns:
a tuple of two lists: svList and runUidList
           (type=tuple)

requestDataFromDB(self, query, whatToRetrieve='all')

Send query to the master DB, the master DB may be specified by user, otherwise use EventStore@lnx151.
Parameters:
query - SQL query
           (type=string)
whatToRetrieve - a keyword to distinguish what to retrieve, e.g. 'all' or 'one'.
           (type=string)
Returns:
tuple We use either es_init.requestDataFromDB methods for quering.
           (type=none)

requestDataFromUserDB(self, query, whatToRetrieve='all')

We may request data either from user or master DBs. Return tuple for given query.
Parameters:
query - SQL query
           (type=string)
whatToRetrieve - a keyword to distinguish what to retrieve, e.g. 'all' or 'one'.
           (type=string)
Returns:
tuple We use either fetchOne or fetchAll methods for quering.
           (type=none)

setDBHost(self, dbHost)

Set EventStore host name.
Parameters:
dbHost - user DB hostname
           (type=string)
Returns:
none
           (type=none)

setDBName(self, dbName)

Set EventStore name.
Parameters:
dbName - user DB name
           (type=string)
Returns:
none
           (type=none)

setDBPort(self, dbPort)

Set EventStore port
Parameters:
dbPort - user DB name
           (type=string)
Returns:
none
           (type=none)

setDBSocket(self, dbSocket)

Set EventStore socket
Parameters:
dbSocket - user DB socket
           (type=string)
Returns:
none
           (type=none)

setGenerateDB(self, newdb)

Set a flag to generate new database.
Parameters:
newdb - flag to inform ESManager to generate new DB
           (type=string or integer)
Returns:
none
           (type=none)

setGrade(self, grade)

Set grade name
Parameters:
grade - name of the grade, e.g. 'physics'
           (type=string)
Returns:
none
           (type=none)

setMasterDB(self, dbName, dbHost, dbPort='', dbSocket='')

Set EventStore and host names of the underlying master ESDB. If toolkit is runnig in Cornell domain (lnx.cornell.edu) we use default lnx151.lns.cornell.edu as a master DB.
Parameters:
dbName - user DB hostname
           (type=string)
dbHost - user DB hostname
           (type=string)
dbPort - db port, e.g. 3306 is default for MySQL
           (type=integer)
dbSocket - socket file, e.g /var/log/mysql
           (type=string)
Returns:
none
           (type=none)

setMaxRun(self, maxR)

Set upper bound on run range
Parameters:
maxR - maximum run number of run range
           (type=integer)
Returns:
none
           (type=none)

setMinRun(self, minR)

Set lower bound on run range
Parameters:
minR - minimum run number of run range
           (type=integer)
Returns:
none
           (type=none)

setNoSkimFlag(self, noskim)

Set no-skim flag, i.e. inform ESManager to treat input sources as is
Parameters:
noskim - inform ESManager to use input source as is
           (type=string or integer)
Returns:
none
           (type=none)

setOutputDir(self, oDir)

Set location of output directory which would be used to write out key/location files
Parameters:
oDir - name of output directory
           (type=string)
Returns:
none
           (type=none)

setParents(self, parents)

Set list of parents
Parameters:
parents - list of parents
           (type=list)
Returns:
none
           (type=none)

setReadDuplicatesSource(self, dupRead)

Set file name which will be used to resolve data overlap conflicts
Parameters:
dupRead - file name
           (type=string)
Returns:
none
           (type=none)

setSkimFlag(self, skim)

Set skim flag, i.e. inform ESManager to treat input sources as a skim
Parameters:
skim - inform ESManager that input source is a skim
           (type=string or integer)
Returns:
none
           (type=none)

setSVName(self, svName)

Set data version name
Parameters:
svName - data version name, a.k.a specific version name
           (type=string)
Returns:
none
           (type=none)

setTimeStamp(self, timeS)

Set time stamp
Parameters:
timeS - time stamp to be used, e.g. 20090909
           (type=string or integer)
Returns:
none if timeS==-1 we use gen_util.dayAhead to set up a day ahead, otherwise we assign self.timeS=timeS
           (type=none)

setView(self, view)

Set view name
Parameters:
view - view name, e.g. 'qcd'
           (type=string)
Returns:
none
           (type=none)

uniqueList(self, iList)

Eliminates duplicates from provided list and return back unique list

updateDB(self, genMode, iFileList, oHSMDir='')

Main method to update EventStore DB. Based on provided file list it decide how to inject data into EventStore. Database is open by using openDBs, all input files are checked by allowStoreToDB, then we update Version table using updateVersion. Finally, based on file type of input files we either use updateDBFromIDXA, updateDBUsingFileList or updateDBUsingGroupList to do actual job.
Parameters:
genMode - flag to generate files
           (type=integer)
iFileList - list of files
           (type=list)
oHSMDir - optional location of HSM directory where files copies will go
           (type=string)
Returns:
status code
           (type=integer)

updateDBFromIDXA(self, fileName)

Inject information from idxa file into EventStore. In this case we only create a new index (key) file.
Parameters:
fileName - name of the file
           (type=string)
Returns:
status code
           (type=integer)

updateDBUsingFileList(self, generationMode, fileList, oHSMDir='')

Inject sequentially files into EventStore. This method is used to inject raw data files to ESDB. Key and location files are generated by using build_binary_key_loc.build_binKeyAndLoc in case of binary input files or genFile. All tables in DB are updated by using: updateKeyFile, updateRunUID and updateLocation.
Parameters:
generationMode - flag to generate key/loc. files
           (type=integer)
fileList - list of files
           (type=list)
oHSMDir - optional file name of binary file
           (type=string)
Returns:
status code
           (type=integer)

updateDBUsingGroupList(self, fileList, oHSMDir='')

Inject provided files into EventStore as a logical group, e.g. qcd_hot_runX, 2photon_hot_runX, etc. Key and location files are generated by using generateLocAndKeyFilesFrom. All tables in DB are updated by using: updateKeyFile, updateRunUID and updateLocation.
Parameters:
fileList - list of files
           (type=list)
oHSMDir - optional HSM location where files copies will go
           (type=string)
Returns:
status code
           (type=integer)

updateFileID(self, id, name, typeId)

Update FileID table entry for given id, name and typeId. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
id - file id
           (type=long)
name - file name
           (type=string)
typeId - type Id
           (type=integer)
Returns:
none
           (type=none)

updateFileType(self, fileName)

Update FileType table. File type is determined by file_util.fileType. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
fileName - name of the file
           (type=string)
Returns:
newly allocated or obtained file type id
           (type=integer)

updateGraphPath(self, graphid, svid)

Update GraphPath table. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
graphid - graph id
           (type=integer)
svid - specific version id
           (type=integer)
Returns:
none
           (type=none)

updateKeyFile(self, graphid, view, run, uid, key_id)

Update KeyFile table. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
graphid - graph id
           (type=integer)
view - view, e.g. 'qcd'
           (type=string)
run - run number
           (type=integer)
uid - unique id
           (type=long)
key_id - key file id
           (type=long)
Returns:
none
           (type=none)

updateLocation(self, graphid, run, uid, loc_id)

Update Location table. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
graphid - graph id
           (type=integer)
run - run number
           (type=integer)
uid - unique id
           (type=long)
loc_id - location file id
           (type=long)
Returns:
none
           (type=none)

updatePathDepend(self, svid)

Update PathDepend table.
Parameters:
svid - specific version id
           (type=integer)
Returns:
none
           (type=none)

updateRunUID(self, run, uid)

Update RunID table. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
run - run number
           (type=integer)
uid - unique id
           (type=long)
Returns:
none
           (type=none)

updateSpecificVersion(self, svName, svid)

Update SpecificVersion table. We use startTxn and endTxn as transaction wrappers and updateDBAndLog for table update and loging.
Parameters:
svName - data version name, a.k.a specific version name
           (type=string)
svid - specific version id
           (type=integer)
Returns:
none
           (type=none)

updateVersion(self)

Update Version table. The procedure is to check if processed run fall in existing run range for given grade/timeStamp. Otherwise form new graphid, update GraphPath,SpecificVersion,PathDepend table(s)
Returns:
if nothing wrong we return graphid which always positive or self.error which is always 0.
           (type=none)

Generated by Epydoc 2.1 on Tue Jan 24 10:46:00 2006 http://epydoc.sf.net