CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: cmsGetFnConnect.cc,v 1.2 2008/10/31 20:37:39 wmtan Exp $
12 //
13 
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  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 }
def main
— Main —############################
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