CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/RecoLuminosity/LumiProducer/src/DBService.cc

Go to the documentation of this file.
00001 #include "RecoLuminosity/LumiProducer/interface/DBService.h"
00002 #include "RecoLuminosity/LumiProducer/interface/DBConfig.h"
00003 #include "RelationalAccess/ConnectionService.h"
00004 #include "CoralBase/Exception.h"
00005 #include "RelationalAccess/ISessionProxy.h"
00006 #include "RelationalAccess/AccessMode.h"
00007 
00008 #include <iostream>
00009 lumi::service::DBService::DBService(const edm::ParameterSet& iConfig,
00010                                     edm::ActivityRegistry& iAR){
00011   m_svc=new coral::ConnectionService;
00012   m_dbconfig= new lumi::DBConfig(*m_svc);
00013   std::string authpath=iConfig.getUntrackedParameter<std::string>("authPath","");
00014   if( !authpath.empty() ){
00015     m_dbconfig->setAuthentication(authpath);
00016   }
00017 }
00018 lumi::service::DBService::~DBService(){
00019   delete m_dbconfig;
00020   delete m_svc;
00021 }
00022 
00023 void 
00024 lumi::service::DBService::postEndJob(){
00025 }
00026 void 
00027 lumi::service::DBService::preEventProcessing(const edm::EventID& iEvtid, 
00028                                              const edm::Timestamp& iTime){
00029 }
00030 void
00031 lumi::service::DBService::preModule(const edm::ModuleDescription& desc){
00032 }
00033 void 
00034 lumi::service::DBService::preBeginLumi(const edm::LuminosityBlockID& iLumiid,  
00035                                        const edm::Timestamp& iTime ){
00036 }
00037 void
00038 lumi::service::DBService::postModule(const edm::ModuleDescription& desc){
00039 }
00040 
00041 coral::ISessionProxy* 
00042 lumi::service::DBService::connectReadOnly( const std::string& connectstring ){
00043   return m_svc->connect(connectstring, coral::ReadOnly);
00044 }
00045 void
00046 lumi::service::DBService::disconnect( coral::ISessionProxy* session ){
00047   delete session;
00048 }
00049 lumi::DBConfig&
00050 lumi::service::DBService::DBConfig(){
00051   return *m_dbconfig;
00052 }
00053 void
00054 lumi::service::DBService::setupWebCache(){
00055 }