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 "FWCore/Utilities/interface/Exception.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 ecal_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, edm::ServiceRegistry::createContaining(), alignCSCRings::e, cms::Exception::explainSelf(), edm::SiteLocalConfig::lookupCalibConnect(), and cmsPerfStripChart::operate().

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);
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 }
virtual std::string explainSelf() const
Definition: Exception.cc:146
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 argc
Definition: dir2webdir.py:38
tuple cout
Definition: gather_cfg.py:145