fwConfigurationDB  8.4.0
fwConfigurationDB_Setup.ctl File Reference

Functions

void fwConfigurationDB_dropDBSchema (dbConnection dbCon, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getDBConnectionList (dyn_string &dbConnectionNames, dyn_string &dbConnectionDPs, dyn_string &exceptionInfo, bool getRemote=FALSE)
 
void fwConfigurationDB_modifyDBConnection (string dbConnectionName, string description, string dbType, string dbName, string userName, string password, string connectString, string schemaName, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_DBSchemaSanityCheck (dbConnection dbCon, dyn_string &exceptionInfo)
 
Recipe Type functions

These functions are used in context of recipe types. Recipe type uses RTdata object described in subsection RTData

void fwConfigurationDB_createRecipeType (string recipeType, string recipeComment, dyn_string &exceptionInfo)
 
void fwConfigurationDB_deleteRecipeType (string recipeType, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipeTypes (dyn_string &recipeTypeNames, dyn_string &recipeTypeComments, dyn_string &exceptionInfo, string systemName="")
 
void fwConfigurationDB_findRecipeTypes (string dpType, dyn_string &recipeTypeNames, dyn_string &exceptionInfo, string systemName="")
 
void _fwConfigurationDB_getRTDescription (string recipeType, string &description, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_setRTDescription (string recipeType, string description, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_getRecipeTypeData (string recipeType, dyn_dyn_string &RTData, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_setRecipeTypeData (string recipeType, dyn_dyn_string RTData, dyn_string &exceptionInfo)
 
void _fwConfigurationDB_RTAddToModel (string dptName, dyn_dyn_string &RTData, dyn_string &exceptionInfo)
 
void fwConfigurationDB_getRecipeTypeDataMapping (string recipeType, mapping &rtElements, dyn_string &exceptionInfo)
 

Detailed Description

This package contains setup functions of the Configuration Database tool

Author
Piotr Golonka (BE/ICS-FD)
Date
August 2019

(c) Copyright CERN, All Rights Reserved

Function Documentation

void fwConfigurationDB_dropDBSchema ( dbConnection  dbCon,
dyn_string &  exceptionInfo 
)

This one does not stop upon an error, which may be e.g. missing table, etc...

void fwConfigurationDB_getDBConnectionList ( dyn_string &  dbConnectionNames,
dyn_string &  dbConnectionDPs,
dyn_string &  exceptionInfo,
bool  getRemote = FALSE 
)

Returns the list of configured db connections

void fwConfigurationDB_modifyDBConnection ( string  dbConnectionName,
string  description,
string  dbType,
string  dbName,
string  userName,
string  password,
string  connectString,
string  schemaName,
dyn_string &  exceptionInfo 
)
Modifies specified db connection

Warning; if empty password is specified, the password will not be changed (it is left as it is)

Parameters
passwordneeds to be specified in unencrypted form(!)
void _fwConfigurationDB_DBSchemaSanityCheck ( dbConnection  dbCon,
dyn_string &  exceptionInfo 
)

Performs sanity checks of the database schema, signals errors, tries to recover as much as possible.

void fwConfigurationDB_createRecipeType ( string  recipeType,
string  recipeComment,
dyn_string &  exceptionInfo 
)
creates an empty recipe type with given name and description
Parameters
recipeTypespecifies the name of the recipe type
recipeCommentspecifies the description
exceptionInfostandard exception handling variable
void fwConfigurationDB_deleteRecipeType ( string  recipeType,
dyn_string &  exceptionInfo 
)
deletes a recipe type
Parameters
recipeTypespecifies the name of the recipe type
exceptionInfostandard exception handling variable
void fwConfigurationDB_getRecipeTypes ( dyn_string &  recipeTypeNames,
dyn_string &  recipeTypeComments,
dyn_string &  exceptionInfo,
string  systemName = "" 
)
returns the list of available recipe types
Parameters
recipeTypeNameson return contains the list of recipe type names
recipeTypeCommentson return contains the list of recipe type comments
exceptionInfostandard exception handling variable
systemNameallows to search for recipe types on remote systems
void fwConfigurationDB_findRecipeTypes ( string  dpType,
dyn_string &  recipeTypeNames,
dyn_string &  exceptionInfo,
string  systemName = "" 
)
returns the recipe types that contain descriptions for certain dp type
Parameters
dpTypedatapoint type for which the recipe types are queried
recipeTypeNameson return contains the list of recipe type names
exceptionInfostandard exception handling variable
void _fwConfigurationDB_setRecipeTypeData ( string  recipeType,
dyn_dyn_string  RTData,
dyn_string &  exceptionInfo 
)
Modifies specified recipe type
Parameters
recipeTypethe name of the recipe type
RTDataan object holding recipe type definition, in the following format: (i indicating subsequent "rows" of recipe type definition) RTData[i][1] : (not used in this function) RTData[i][2] : DPType name RTData[i][3] : DPElement name RTData[i][4] : (not used in this function) RTData[i][5] : Save value for this element: "TRUE"/"FALSE" RTData[i][6] : Save alert for this element: "TRUE"/"FALSE"
exceptionInfostandard exception handling variable
void fwConfigurationDB_getRecipeTypeDataMapping ( string  recipeType,
mapping &  rtElements,
dyn_string &  exceptionInfo 
)

convert the recipeTypeData to useful form: mapping with keys being DPTypes and values being list of elements that are to be stored