CMS 3D CMS Logo

Public Member Functions | Private Attributes

cond::FWIncantation Class Reference

#include <CondPyInterface.h>

List of all members.

Public Member Functions

 FWIncantation ()
 ~FWIncantation ()

Private Attributes

boost::shared_ptr< impl::FWMagicmagic

Detailed Description

Definition at line 30 of file CondPyInterface.h.


Constructor & Destructor Documentation

cond::FWIncantation::FWIncantation ( )

Definition at line 57 of file CondPyInterface.cc.

References edm::ParameterSet::addParameter(), edm::ServiceRegistry::createSet(), reco::get(), magic, and cond::topinit().

                               : magic(new impl::FWMagic) {
    topinit();
    // B.  Load the message service plug-in.  Forget this and bad things happen!
    //     In particular, the job hangs as soon as the output buffer fills up.
    //     That's because, without the message service, there is no mechanism for
    //     emptying the buffers.
    boost::shared_ptr<edm::Presence> theMessageServicePresence;
    theMessageServicePresence = boost::shared_ptr<edm::Presence>(edm::PresenceFactory::get()->
                                                                 makePresence("MessageServicePresence").release());
    
    // C.  Manufacture a configuration and establish it.

    /*
    std::string config =
      "process x = {"
      "service = MessageLogger {"
      "untracked vstring destinations = {'infos.mlog','warnings.mlog'}"
      "untracked PSet infos = {"
      "untracked string threshold = 'INFO'"
      "untracked PSet default = {untracked int32 limit = 1000000}"
      "untracked PSet FwkJob = {untracked int32 limit = 0}"
      "}"
      "untracked PSet warnings = {"
      "untracked string threshold = 'WARNING'"
      "untracked PSet default = {untracked int32 limit = 1000000}"
      "}"
      "untracked vstring fwkJobReports = {'FrameworkJobReport.xml'}"
      "untracked vstring categories = {'FwkJob'}"
      "untracked PSet FrameworkJobReport.xml = {"
      "untracked PSet default = {untracked int32 limit = 0}"
      "untracked PSet FwkJob = {untracked int32 limit = 10000000}"
      "}"
      "}"
      "service = JobReportService{}"
      "service = SiteLocalConfigService{}"
      "}";
    */
    /*
    std::string config =
      "import FWCore.ParameterSet.Config as cms\n"
      "process = cms.Process('x')\n"
      "JobReportService = cms.Service('JobReportService')\n"
      "SiteLocalConfigService = cms.Service('SiteLocalConfigService')\n"
      ;
    */
    
    boost::shared_ptr<std::vector<edm::ParameterSet> > psets(new std::vector<edm::ParameterSet>);
    edm::ParameterSet pSet;
    pSet.addParameter("@service_type",std::string("SiteLocalConfigService"));
    psets->push_back(pSet);
    
    // D.  Create the services.
    edm::ServiceToken tempToken(edm::ServiceRegistry::createSet(*psets.get()));
    
    // E.  Make the services available.
    magic->operate.reset(new edm::ServiceRegistry::Operate(tempToken));
    
  }
cond::FWIncantation::~FWIncantation ( )

Definition at line 54 of file CondPyInterface.cc.

{}

Member Data Documentation

boost::shared_ptr<impl::FWMagic> cond::FWIncantation::magic [private]

Definition at line 37 of file CondPyInterface.h.

Referenced by FWIncantation().