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

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2009-08-11 - OanaBoeriu
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback