Writing into databases (older approach)
The necessary code to perform transfer of data from offline to the database is located in CalibMuon/CSCCalibration and uses
standalone programs, as well as the official PopCon transfer.
Description of one of the configuration files (writeDBGains.cfg) that uses the standalone programs:
process ProcessOne = {
service = MessageLogger {
untracked vstring destinations = {"cout"}
untracked PSet cout = {
untracked PSet default = { untracked int32 limit = 0 }
}
}
# Empty event source
untracked PSet maxEvents = {untracked int32 input = 1}
source = EmptyIOVSource {
string timetype = "runnumber"
untracked uint32 firstRun = 1
untracked uint32 lastRun = 1
uint32 interval = 1
}
// Database output service
include "CondCore/DBCommon/data/CondDBCommon.cfi"
# to write in sqlite
replace CondDBCommon.connect = "sqlite_file:calibgains.db" <- this creates a local sqlite file
# to write into int2r_orcoff
# replace CondDBCommon.connect = "oracle://cms_orcoff_int2r/CMS_COND_CSC" <- uncomment for transferring to database
# replace CondDBCommon.DBParameters.authenticationPath="/afs/cern.ch/cms/DB/conddb" <- uncomment for transferring to database
service = PoolDBOutputService {
using CondDBCommon
VPSet toPut = { { string record = "CSCDBGainsRcd"
string tag = "CSCDBGains_ideal" } }
}
es_source = CSCGainsDBConditions{} <- specific set of data being used for transfer (a mix of DB and new data)
es_prefer = CSCGainsDBConditions{}
module WriteInDB = WriteDBGains{ <- this will actually write the data into the database
string NewTagRequest = "CSCDBGainsRcd"
}
path p = {WriteInDB}
}
There are as well programs that use PopCon to transfer data from offline to databases - they have PopCon in the name.
They are used in a similar manner, instead of CSCGainsDBConditions as a source one uses now
CSCGainsPopConAnalyzer inside the cfg file. You will be asked for a first IOV and a last one for the new tag you want to send to database.
--
OanaBoeriu - 11 Aug 2009