Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
Services
bin
cmsGetFnConnect.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: Utilities
4
// Class : cmsGetFnConnect
5
//
6
// Implementation:
7
// Looks up a frontier connect string
8
//
9
// Original Author: Dave Dykstra
10
// Created: Tue Feb 22 16:54:06 CST 2011
11
//
12
13
#include "
FWCore/Catalog/interface/SiteLocalConfig.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
#include "
FWCore/Services/src/SiteLocalConfigService.h
"
17
#include "
FWCore/ServiceRegistry/interface/ServiceRegistry.h
"
18
#include "
FWCore/Utilities/interface/Exception.h
"
19
#include <iostream>
20
#include <string.h>
21
22
int
23
main
(
int
argc
,
char
*
argv
[])
24
{
25
if
((argc != 2) || (strncmp(argv[1],
"frontier://"
, 11) != 0))
26
{
27
std::cerr
<<
"Usage: cmsGetFnConnect frontier://shortname"
<< std::endl;
28
return
2;
29
}
30
31
try
{
32
std::auto_ptr<edm::SiteLocalConfig> slcptr(
new
edm::service::SiteLocalConfigService
(
edm::ParameterSet
()));
33
auto
slc = std::make_shared<edm::serviceregistry::ServiceWrapper<edm::SiteLocalConfig> >(slcptr);
34
edm::ServiceToken
slcToken =
edm::ServiceRegistry::createContaining
(slc);
35
edm::ServiceRegistry::Operate
operate
(slcToken);
36
37
edm::Service<edm::SiteLocalConfig>
localconfservice;
38
39
std::cout
<< localconfservice->
lookupCalibConnect
(argv[1]) << std::endl;
40
}
catch
(
cms::Exception
const
&
e
) {
41
std::cerr
<< e.
explainSelf
() << std::endl;
42
return
2;
43
}
44
return
0;
45
}
edm::Service
Definition:
Service.h:30
ServiceRegistry.h
cms::Exception::explainSelf
virtual std::string explainSelf() const
Definition:
Exception.cc:146
edm::service::SiteLocalConfigService
Definition:
SiteLocalConfigService.h:23
edm::SiteLocalConfig::lookupCalibConnect
virtual std::string const lookupCalibConnect(std::string const &input) const =0
edm::ServiceRegistry::createContaining
static ServiceToken createContaining(std::auto_ptr< T > iService)
create a service token that holds the service defined by iService
Definition:
ServiceRegistry.h:100
main
int main(int argc, char **argv)
Definition:
aligncond_split_iov.cc:181
ParameterSet.h
cmsPerfStripChart.operate
def operate
Definition:
cmsPerfStripChart.py:21
Service.h
getDQMSummary.argv
argv
Definition:
getDQMSummary.py:19
SiteLocalConfigService.h
edm::ServiceToken
Definition:
ServiceToken.h:37
Exception.h
cms::Exception
Definition:
Exception.h:68
dir2webdir.argc
tuple argc
Definition:
dir2webdir.py:38
dtNoiseDBValidation_cfg.cerr
tuple cerr
Definition:
dtNoiseDBValidation_cfg.py:22
alignCSCRings.e
list e
Definition:
alignCSCRings.py:90
edm::ServiceRegistry::Operate
Definition:
ServiceRegistry.h:40
edm::ParameterSet
Definition:
ParameterSet.h:35
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
SiteLocalConfig.h
Generated for CMSSW Reference Manual by
1.8.5