40 produces<unsigned int>();
41 bunchSpacing_ = consumes<int>(
edm::InputTag(
"addPileupInfo",
"bunchSpacing"));
43 if (iConfig.
exists(
"overrideBunchSpacing")) {
44 overRide_ = iConfig.
getParameter<
bool>(
"overrideBunchSpacing");
46 bunchSpacingOverride_ = iConfig.
getParameter<
unsigned int>(
"bunchSpacingOverride");
62 unsigned int bunchSpacing = 50;
63 unsigned int run = e.
run();
66 if ((run > 252126 && run != 254833) || run == 178003 || run == 178004 || run == 209089 || run == 209106 ||
67 run == 209109 || run == 209146 || run == 209148 || run == 209151) {
73 bunchSpacing = *bunchSpacingH;
76 e.
put(std::make_unique<unsigned int>(bunchSpacing));
82 desc.
add<
bool>(
"overrideBunchSpacing",
false);
83 desc.
add<
unsigned int>(
"bunchSpacingOverride", 25);
85 descriptions.
add(
"bunchSpacingProducer", desc);
static void fillDescriptions(edm::ConfigurationDescriptions &)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~BunchSpacingProducer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned int bunchSpacingOverride_
#define DEFINE_FWK_MODULE(type)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< int > bunchSpacing_
BunchSpacingProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) final
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)