CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
cond::FWIncantation Class Reference

#include <CondPyInterface.h>

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 55 of file CondPyInterface.cc.

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

55  : magic(new impl::FWMagic) {
56  topinit();
57  // B. Load the message service plug-in. Forget this and bad things happen!
58  // In particular, the job hangs as soon as the output buffer fills up.
59  // That's because, without the message service, there is no mechanism for
60  // emptying the buffers.
61  boost::shared_ptr<edm::Presence> theMessageServicePresence;
62  theMessageServicePresence = boost::shared_ptr<edm::Presence>(edm::PresenceFactory::get()->
63  makePresence("MessageServicePresence").release());
64 
65  // C. Manufacture a configuration and establish it.
66 
67  /*
68  std::string config =
69  "process x = {"
70  "service = MessageLogger {"
71  "untracked vstring destinations = {'infos.mlog','warnings.mlog'}"
72  "untracked PSet infos = {"
73  "untracked string threshold = 'INFO'"
74  "untracked PSet default = {untracked int32 limit = 1000000}"
75  "untracked PSet FwkJob = {untracked int32 limit = 0}"
76  "}"
77  "untracked PSet warnings = {"
78  "untracked string threshold = 'WARNING'"
79  "untracked PSet default = {untracked int32 limit = 1000000}"
80  "}"
81  "untracked vstring fwkJobReports = {'FrameworkJobReport.xml'}"
82  "untracked vstring categories = {'FwkJob'}"
83  "untracked PSet FrameworkJobReport.xml = {"
84  "untracked PSet default = {untracked int32 limit = 0}"
85  "untracked PSet FwkJob = {untracked int32 limit = 10000000}"
86  "}"
87  "}"
88  "service = JobReportService{}"
89  "service = SiteLocalConfigService{}"
90  "}";
91  */
92  /*
93  std::string config =
94  "import FWCore.ParameterSet.Config as cms\n"
95  "process = cms.Process('x')\n"
96  "JobReportService = cms.Service('JobReportService')\n"
97  "SiteLocalConfigService = cms.Service('SiteLocalConfigService')\n"
98  ;
99  */
100 
101  boost::shared_ptr<std::vector<edm::ParameterSet> > psets(new std::vector<edm::ParameterSet>);
102  edm::ParameterSet pSet;
103  pSet.addParameter("@service_type",std::string("SiteLocalConfigService"));
104  psets->push_back(pSet);
105 
106  // D. Create the services.
107  edm::ServiceToken tempToken(edm::ServiceRegistry::createSet(*psets.get()));
108 
109  // E. Make the services available.
110  magic->operate.reset(new edm::ServiceRegistry::Operate(tempToken));
111 
112  }
static ServiceToken createSet(std::vector< ParameterSet > &)
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:138
static void topinit()
static PresenceFactory * get()
boost::shared_ptr< impl::FWMagic > magic
cond::FWIncantation::~FWIncantation ( )

Definition at line 52 of file CondPyInterface.cc.

52 {}

Member Data Documentation

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

Definition at line 37 of file CondPyInterface.h.

Referenced by FWIncantation().