CMS 3D CMS Logo

BooleanProducer.cc
Go to the documentation of this file.
7 
8 namespace edm {
10  public:
12  : value_(config.getParameter<bool>("value")), token_(produces<bool>()) {}
13 
14  void produce(StreamID sid, Event& event, EventSetup const& setup) const final { event.emplace(token_, value_); }
15 
16  static void fillDescriptions(ConfigurationDescriptions& descriptions);
17 
18  private:
19  const bool value_;
21  };
22 
25  desc.add<bool>("value", false);
26  descriptions.addWithDefaultLabel(desc);
27  descriptions.setComment("This EDProducer produces a boolean value according to the \"value\" parameter.");
28  }
29 } // namespace edm
30 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDPutTokenT< bool > token_
Definition: config.py:1
BooleanProducer(ParameterSet const &config)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(StreamID sid, Event &event, EventSetup const &setup) const final
void setComment(std::string const &value)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
HLT enums.
Definition: event.py:1