-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 77487 b: "refs/heads/CMSSW_7_1_X" c: fa1cb82 h: "refs/heads/CMSSW_7_1_X" i: 77485: 178fcbd 77483: b8680a1 77479: b9e7742 77471: d8cd6c2 v: v3
- Loading branch information
Vincenzo Innocente
committed
Nov 10, 2009
1 parent
1dd4cf1
commit 96e41ab
Showing
8 changed files
with
69 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e | ||
"refs/heads/CMSSW_7_1_X": e96ba7f1d1f7aaae4e55a0978be9e51918dc124c | ||
"refs/heads/CMSSW_7_1_X": fa1cb827cb64e431305c4132bb22011e6cb6e383 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" | ||
#include "CondCore/DBCommon/interface/TechnologyProxy.h" | ||
#include "FWCore/PluginManager/interface/PluginManager.h" | ||
#include "FWCore/PluginManager/interface/standard.h" | ||
#include "CondCore/DBCommon/interface/DBSession.h" | ||
#include "CondCore/DBCommon/interface/ConnectionHandler.h" | ||
#include "FWCore/Catalog/interface/SiteLocalConfig.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
#include "CondCore/DBCommon/interface/Exception.h" | ||
#include "CondCore/DBCommon/interface/DbSession.h" | ||
#include <iostream> | ||
int main(){ | ||
edmplugin::PluginManager::Config config; | ||
edmplugin::PluginManager::configure(edmplugin::standard::config()); | ||
/* const char* path = getenv("LD_LIBRARY_PATH"); | ||
std::string spath(path? path: ""); | ||
std::string::size_type last=0; | ||
std::string::size_type i=0; | ||
std::vector<std::string> paths; | ||
while( (i=spath.find_first_of(':',last))!=std::string::npos) { | ||
paths.push_back(spath.substr(last,i-last)); | ||
last = i+1; | ||
std::cout <<paths.back()<<std::endl; | ||
} | ||
paths.push_back(spath.substr(last,std::string::npos)); | ||
config.searchPath(paths); | ||
edmplugin::PluginManager::configure(config); | ||
*/ | ||
|
||
std::cout<<"testing Connection Handler "<<std::endl; | ||
cond::DBSession* session=new cond::DBSession; | ||
static cond::ConnectionHandler& conHandler=cond::ConnectionHandler::Instance(); | ||
conHandler.registerConnection("sqlite_file:mydata.db",*session,0); | ||
conHandler.registerConnection("sqlite_fip:CondCore/SQLiteData/data/mydata.db",*session,0); | ||
session->open(); | ||
conHandler.connect(session); | ||
conHandler.disconnectAll(); | ||
std::auto_ptr<cond::TechnologyProxy> ptr(cond::TechnologyProxyFactory::get()->create("sqlite","sqlite_file:pippo.db")); | ||
std::cout<<ptr->getRealConnectString()<<std::endl; | ||
static cond::ConnectionHandler& conHandler2=cond::ConnectionHandler::Instance(); | ||
conHandler.registerConnection("frontier://cmsfrontier.cern.ch:8000/FrontierDev/CMS_COND_PRESH",*session,0); | ||
std::auto_ptr<cond::TechnologyProxy> ptr2(cond::TechnologyProxyFactory::get()->create("frontier","frontier://cmsfrontier.cern.ch:8000/FrontierDev/CMS_COND_PRESH")); | ||
std::cout<<ptr2->getRealConnectString()<<std::endl; | ||
delete session; | ||
cond::DbConnection conn; | ||
conn.configure( cond::CmsDefaults ); | ||
cond::DbSession session = conn.createSession(); | ||
const char * connects[] = { | ||
"sqlite_file:mydata.db", | ||
"sqlite_fip:CondCore/SQLiteData/data/mydata.db", | ||
"frontier:FrontierDev/CMS_COND_PRESH", | ||
"frontier://cmsfrontier.cern.ch:8000/FrontierDev/CMS_COND_PRESH" | ||
}; | ||
for (int i=0; int<4; ++i) { | ||
try { | ||
session.open(connects[i]); | ||
std::cout << connects[i] << " " << session.connectionString() << std::endl; | ||
} catch ( const cond::Exception & er) { | ||
std::cout << "error " << er.what(); | ||
} | ||
} | ||
|
||
return 0; | ||
} | ||
|