CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
cmsGetFnConnect.cc File Reference
#include "FWCore/Catalog/interface/SiteLocalConfig.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Services/src/SiteLocalConfigService.h"
#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
#include <iostream>
#include <string.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 23 of file cmsGetFnConnect.cc.

References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, edm::ServiceRegistry::createContaining(), and edm::SiteLocalConfig::lookupCalibConnect().

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  std::auto_ptr<edm::SiteLocalConfig> slcptr(new edm::service::SiteLocalConfigService(edm::ParameterSet()));
32  boost::shared_ptr<edm::serviceregistry::ServiceWrapper<edm::SiteLocalConfig> > slc(new edm::serviceregistry::ServiceWrapper<edm::SiteLocalConfig>(slcptr));
34  edm::ServiceRegistry::Operate operate(slcToken);
35 
36  edm::Service<edm::SiteLocalConfig> localconfservice;
37 
38  std::cout << localconfservice->lookupCalibConnect(argv[1]) << std::endl;
39 
40  return 0;
41 }
virtual std::string const lookupCalibConnect(std::string const &input) const =0
static ServiceToken createContaining(std::auto_ptr< T > iService)
create a service token that holds the service defined by iService
tuple cout
Definition: gather_cfg.py:41