Package iceprod :: Package server :: Module db :: Class ConfigDB
[hide private]
[frames] | no frames]

Class ConfigDB

source code

IceProdDB --+
            |
           ConfigDB

Instance Methods [hide private]
 
__init__(self)
Constructor
source code
 
new(self)
Create a copy of this instance
source code
 
SetSubmitter(self, submitter) source code
 
SetInstitution(self, institution) source code
 
SetTempStoragePath(self, path)
Set the temporary path for dataset.
source code
 
SetGlobalStoragePath(self, path)
Set the global path in datawarehouse for dataset.
source code
 
updateConfig(self, dataset_id, param_dict)
update icetray configuration to database
source code
 
upload_config(self, steering, ticket=0, template=0, maxjobs=0)
icetray configuration to database
source code
 
SetStorageURL(self, dataset, steering)
Update status of dataset
source code
 
get_simcat_categories(self)
Get list of sim_cat names
source code
 
getNewSets(self)
Get a list of new datasets.
source code
 
load_datasetparams(self, paramdict, dataset)
Load simulation category
source code
 
load_geometry(self, geo, dataset) source code
 
loadsimcat(self, steering)
Load simulation category
source code
 
load_externals(self, dataset_id, steering)
Load external programs to run prior to icetray
source code
 
load_projects(self, dataset_id, i3config, tray_index)
Load projects to database
source code
 
load_steering(self, dataset_id, steering)
Load steering parameters to database
source code
 
load_steering_dependencies(self, dataset_id, steering)
Load file dependencies in steering element to database
source code
 
load_tasks(self, dataset_id, steering)
Load tasks in steering element to database, used for multi-part simulation jobs
source code
 
load_batch_options(self, dataset_id, steering)
Load batch system options from steering to database
source code
 
load_project(self, project, dataset_id, metaproject_id, tray_index, load_index)
Load project to database
source code
 
fetch_project_id(self, project_name, project_version)
Retrieve the project_id for a given project
source code
 
load_project_dependencies(self, project, metaproject_id, i3config)
Load cross-references between projects (1) and depency projects
source code
 
load_metaproject(self, metaproject, dataset_id, tray_index, load_index)
Load metaproject to database
source code
 
load_dependencies(self, module, module_id, i3config)
Load cross-references between modules (1) and depency projects
source code
 
load_connections(self, dataset_id, i3config, tray_index)
Load module connections to database
source code
 
load_connection(self, connection, dataset_id, tray_index)
Load connection to database
source code
 
load_pre(self, dataset_id, i3config, tray_index)
Load IceProd pre modules into the database.
source code
 
load_post(self, dataset_id, i3config, tray_index)
Load IceProd post modules into the database.
source code
 
load_modules(self, dataset_id, i3config, tray_index)
Load modules into the database.
source code
 
load_services(self, dataset_id, i3config, tray_index)
Load services into the database.
source code
 
load_module(self, module, dataset_id, load_index, tray_index, i3config, type='module', iptype='tray')
Load individual module into the database given a run ID.
source code
 
fetch_module_id(self, module, project_id, type='module')
retrive id for module with matching name, and project_id (there should only be one)
source code
 
fetch_service_id(self, service, project_id)
retrive id for service with matching name, and project_id (there should only be one)
source code
 
load_service(self, service, dataset_id, load_index, tray_index, i3config)
Load individual service into the database given a run ID.
source code
 
insert_omkey(self, omkey, pid)
Add OMKey object
source code
 
insert_omkey_array(self, omkeyvect, pid)
Add array of OMKey objects
source code
 
insert_array(self, values, pid)
Add value array
source code
 
load_params(self, module, dataset_id, tray_index)
Load parameters into the database.
source code
 
show_dataset_table(self, search_string='')
DOWNLOAD dataset briefs FROM database
source code
 
download_config(self, dataset_id, include_defaults=False, include_description=False)
DOWNLOAD icetray configuration FROM database
source code
 
download_metaprojects(self, dataset_id, tray_index, i3config)
Download metaprojects from database Download projects from database
source code
 
download_externals(self, dataset_id, steering)
Download Load external programs to run prior to icetray
source code
 
fetch_dict_value(self, key)
Retrieve value stored in dictionary
source code
 
fetch_filename(self, key, dataset_id=0)
Retrieve value stored in dictionary
source code
 
fetch_project_list(self, dataset_id)
Download projects from database
source code
 
download_projects(self, dataset_id, tray_index, i3config)
Download projects from database
source code
 
fetch_project_dependencies(self, project_id, metaproject_id)
retrive dependencies for project
source code
 
fetch_module_dependencies(self, module_id)
retrive dependencies for module
source code
 
download_connections(self, dataset_id, tray_index, i3config)
Download module connections from database
source code
 
getsimcat(self, dataset_id)
Get simulation category
source code
 
download_steering(self, dataset_id)
Get steering parameters from database
source code
 
get_steering_parameter(self, dataset_id, param) source code
 
download_steering_dependencies(self, dataset_id, steering)
Get steering dependencies from database
source code
 
download_tasks(self, dataset_id, steering)
Get job parts from database
source code
 
fetch_batch_options(self, dataset_id, steering)
Fetch batch system options from database
source code
 
download_batch_options(self, dataset_id, steering)
Get batch system options from database
source code
 
download_modules(self, dataset_id, tray_index, i3config, type='module', iptype='tray', include_defaults=False, include_description=False)
Get modules from the database.
source code
 
download_services(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)
Download services from the database.
source code
 
download_pre(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)
Download IceProdPre modules from the database.
source code
 
download_post(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)
Download IceProdPost modules from the database.
source code
 
select_array(self, pid) source code
 
select_omkey(self, pid) source code
 
select_omkey_array(self, pid) source code
 
download_params(self, module, mod_id, dataset_id, include_defaults=False, include_description=False)
Download module parameters from the database.
source code
 
GetGridId(self, grid_name, module_name, on, institution='unknown', batchsys='unknown', url='')
Retrieve the key for grid_name
source code
 
CheckVersion(self)
Check latest version of software and see if we need to upgrade
source code
 
InitializeGridStats(self, grids, dataset_id)
Insert grid_statistics entries for grids which should run this dataset.
source code
 
InitializeJobTable(self, maxjobs, dataset_id, priority=0, stepsize=1000, start_qid=0)
Create job monitoring entries in database
source code
 
validate(self, dataset_id, status='TRUE')
Mark dataset as visible and valid.
source code
 
download_metadata(self, dataset_id) source code
 
upload_metadata(self, dataset_id, difplus) source code
 
set_metadata_subcat(self, dataset_id, sub_cat)
Change Plus:subcategory in DIFPlus metadata
source code
 
load_filelist(self, odict, dataset_id=0)
load a list of files for filtering.
source code

Inherited from IceProdDB: SetAuthFunc, authenticate, authenticate2, commit, connect, defang, disconnect, execute, fetch_metaproject_id, get, getcursor, insert_id, intcast, isconnected, mkkey, nonify, nullify, ping, rollback, set_auto

Class Variables [hide private]
  logger = logging.getLogger('ConfigDB')
Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor

Overrides: IceProdDB.__init__

new(self)

source code 

Create a copy of this instance

Overrides: IceProdDB.new

SetTempStoragePath(self, path)

source code 

Set the temporary path for dataset.

Parameters:
  • path

SetGlobalStoragePath(self, path)

source code 

Set the global path in datawarehouse for dataset.

Parameters:
  • path

updateConfig(self, dataset_id, param_dict)

source code 

update icetray configuration to database

Parameters:
  • dataset_id - primary key in production database
  • param_dict - Dictionary of parameters to update

upload_config(self, steering, ticket=0, template=0, maxjobs=0)

source code 

icetray configuration to database

Parameters:
  • steering - IceTrayConfig object containing configuration
  • ticket - optional ticket ID to relate dataset to
  • template - Whether this is a template or not
Returns:
primary key for run on config db

load_datasetparams(self, paramdict, dataset)

source code 

Load simulation category

Returns:
index of category

loadsimcat(self, steering)

source code 

Load simulation category

Returns:
index of category

load_externals(self, dataset_id, steering)

source code 

Load external programs to run prior to icetray

Parameters:
  • dataset_id - primary key for run on config db

load_projects(self, dataset_id, i3config, tray_index)

source code 

Load projects to database

Parameters:
  • dataset_id - primary key for run on config db

load_steering(self, dataset_id, steering)

source code 

Load steering parameters to database

Parameters:
  • dataset_id - primary key for run on config db

load_steering_dependencies(self, dataset_id, steering)

source code 

Load file dependencies in steering element to database

Parameters:
  • dataset_id - primary key for run on config db

load_tasks(self, dataset_id, steering)

source code 

Load tasks in steering element to database, used for multi-part simulation jobs

Parameters:
  • dataset_id - primary key for run on config db

load_batch_options(self, dataset_id, steering)

source code 

Load batch system options from steering to database

Parameters:
  • dataset_id - primary key for run on config db

load_project(self, project, dataset_id, metaproject_id, tray_index, load_index)

source code 

Load project to database

Parameters:
  • project - the Project object to be loaded
  • dataset_id - primary key for run on config db
Returns:
primary key for projects table on config db

fetch_project_id(self, project_name, project_version)

source code 

Retrieve the project_id for a given project

Parameters:
  • project_name - name of library
  • project_version - version string

load_project_dependencies(self, project, metaproject_id, i3config)

source code 

Load cross-references between projects (1) and depency projects

Parameters:
  • project - Project object

load_metaproject(self, metaproject, dataset_id, tray_index, load_index)

source code 

Load metaproject to database

Parameters:
  • metaproject - the Project object to be loaded
  • dataset_id - primary key for run on config db
Returns:
primary key for projects table on config db

load_dependencies(self, module, module_id, i3config)

source code 

Load cross-references between modules (1) and depency projects

Parameters:
  • module - Module object

load_connections(self, dataset_id, i3config, tray_index)

source code 

Load module connections to database

Parameters:
  • dataset_id - primary key for run on config db

load_connection(self, connection, dataset_id, tray_index)

source code 

Load connection to database

Parameters:
  • connection - the Connection object to be loaded
  • dataset_id - primary key for run on config db
Returns:
primary key for projects table on config db

load_pre(self, dataset_id, i3config, tray_index)

source code 

Load IceProd pre modules into the database.

Parameters:
  • dataset_id - primary key for run on config db

load_post(self, dataset_id, i3config, tray_index)

source code 

Load IceProd post modules into the database.

Parameters:
  • dataset_id - primary key for run on config db

load_modules(self, dataset_id, i3config, tray_index)

source code 

Load modules into the database.

Parameters:
  • dataset_id - primary key for run on config db

load_services(self, dataset_id, i3config, tray_index)

source code 

Load services into the database.

Parameters:
  • dataset_id - primary key for run on config db

load_module(self, module, dataset_id, load_index, tray_index, i3config, type='module', iptype='tray')

source code 

Load individual module into the database given a run ID.

Parameters:
  • module - the module to be loaded
  • dataset_id - primary key for run on config db
  • load_index - order in which module should be loaded
  • tray_index - tray instance to add module to
  • i3config - Steering instance
  • type - module,service,iceprod
  • iptype - one of tray,pre,post. Serves to distinguish pre and post modules
Returns:
primary key for modules table on config db

fetch_module_id(self, module, project_id, type='module')

source code 

retrive id for module with matching name, and project_id (there should only be one)

Parameters:
  • module - module to query
  • project_id - primary key of parent project
  • type - ('module'|'service')

fetch_service_id(self, service, project_id)

source code 

retrive id for service with matching name, and project_id (there should only be one)

Parameters:
  • service - service to query
  • project_id - primary key of parent project

load_service(self, service, dataset_id, load_index, tray_index, i3config)

source code 

Load individual service into the database given a run ID.

Parameters:
  • service - the Service object to be loaded
  • dataset_id - primary key for run on config db
Returns:
primary key for services table on config db

insert_omkey(self, omkey, pid)

source code 

Add OMKey object

Parameters:
  • omkey - OMKeys
  • pid - configured parameter id or cparameter_id

insert_omkey_array(self, omkeyvect, pid)

source code 

Add array of OMKey objects

Parameters:
  • omkeyvect - list of OMKeys
  • pid - configured parameter id or cparameter_id

insert_array(self, values, pid)

source code 

Add value array

Parameters:
  • values - list of array elements
  • pid - configured parameter id or cparameter_id

load_params(self, module, dataset_id, tray_index)

source code 

Load parameters into the database.

Parameters:
  • module - whose parameters are to be loaded to database

show_dataset_table(self, search_string='')

source code 

DOWNLOAD dataset briefs FROM database

Returns:
resultset from database

download_config(self, dataset_id, include_defaults=False, include_description=False)

source code 

DOWNLOAD icetray configuration FROM database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download
Returns:
IceTrayConfig object containing the IceTray configuration

download_metaprojects(self, dataset_id, tray_index, i3config)

source code 

Download metaprojects from database Download projects from database

Parameters:
  • dataset_id - ID of the run whose configuration we wish to download

download_externals(self, dataset_id, steering)

source code 

Download Load external programs to run prior to icetray

Parameters:
  • dataset_id - primary key for run on config db

fetch_dict_value(self, key)

source code 

Retrieve value stored in dictionary

Parameters:
  • key - string key to dictionary entry

fetch_filename(self, key, dataset_id=0)

source code 

Retrieve value stored in dictionary

Parameters:
  • key - string key to dictionary entry

fetch_project_list(self, dataset_id)

source code 

Download projects from database

Parameters:
  • dataset_id - ID of the run whose configuration we wish to download

download_projects(self, dataset_id, tray_index, i3config)

source code 

Download projects from database

Parameters:
  • dataset_id - ID of the run whose configuration we wish to download

fetch_project_dependencies(self, project_id, metaproject_id)

source code 

retrive dependencies for project

Parameters:
  • project_id - id of project @return array of project names

fetch_module_dependencies(self, module_id)

source code 

retrive dependencies for module

Parameters:
  • module_id - id of module @return array of project names

download_connections(self, dataset_id, tray_index, i3config)

source code 

Download module connections from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

getsimcat(self, dataset_id)

source code 

Get simulation category

Parameters:
  • dataset_id - dataset ID
Returns:
category

download_steering(self, dataset_id)

source code 

Get steering parameters from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_steering_dependencies(self, dataset_id, steering)

source code 

Get steering dependencies from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_tasks(self, dataset_id, steering)

source code 

Get job parts from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

fetch_batch_options(self, dataset_id, steering)

source code 

Fetch batch system options from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_batch_options(self, dataset_id, steering)

source code 

Get batch system options from database

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_modules(self, dataset_id, tray_index, i3config, type='module', iptype='tray', include_defaults=False, include_description=False)

source code 

Get modules from the database.

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_services(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)

source code 

Download services from the database.

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_pre(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)

source code 

Download IceProdPre modules from the database.

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_post(self, dataset_id, tray_index, i3config, include_defaults=False, include_description=False)

source code 

Download IceProdPost modules from the database.

Parameters:
  • dataset_id - ID of the run whose configuration we whish to download

download_params(self, module, mod_id, dataset_id, include_defaults=False, include_description=False)

source code 

Download module parameters from the database.

Parameters:
  • mod_id - index corresponding to module table

InitializeGridStats(self, grids, dataset_id)

source code 

Insert grid_statistics entries for grids which should run this dataset.

Parameters:
  • grids - list of grids or clusters
  • dataset_id - dataset id

load_filelist(self, odict, dataset_id=0)

source code 

load a list of files for filtering.

Parameters:
  • dataset_id - the dataset id that dictonary is bound to
  • odict - the dictionary to load