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 
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
electrons_cff.bool
bool
Definition: electrons_cff.py:372
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::EDPutTokenT< bool >
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::BooleanProducer::produce
void produce(StreamID sid, Event &event, EventSetup const &setup) const final
Definition: BooleanProducer.cc:14
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::BooleanProducer
Definition: BooleanProducer.cc:9
config
Definition: config.py:1
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::BooleanProducer::BooleanProducer
BooleanProducer(ParameterSet const &config)
Definition: BooleanProducer.cc:11
ParameterSetDescription.h
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
edm::BooleanProducer::value_
const bool value_
Definition: BooleanProducer.cc:19
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition: ConfigurationDescriptions.cc:48
edm::EventSetup
Definition: EventSetup.h:57
edm::ProductRegistryHelper::produces
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
Definition: ProductRegistryHelper.h:108
edm::BooleanProducer::fillDescriptions
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: BooleanProducer.cc:23
EventSetup.h
ParameterSet.h
EDProducer.h
edm::BooleanProducer::token_
const edm::EDPutTokenT< bool > token_
Definition: BooleanProducer.cc:20
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87