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

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

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

Definition at line 54 of file CondPyInterface.cc.

54 {}

Member Data Documentation

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

Definition at line 37 of file CondPyInterface.h.

Referenced by FWIncantation().