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

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

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

Definition at line 55 of file CondPyInterface.cc.

55 {}

Member Data Documentation

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

Definition at line 37 of file CondPyInterface.h.

Referenced by FWIncantation().