42 BunchSpacingProducer::
46 produces<unsigned int>();
47 bunchSpacing_ = consumes<int>(
edm::InputTag(
"addPileupInfo",
"bunchSpacing"));
49 if ( iConfig.
exists(
"overrideBunchSpacing") ) {
50 overRide_= iConfig.
getParameter<
bool>(
"overrideBunchSpacing");
52 bunchSpacingOverride_=iConfig.
getParameter<
unsigned int>(
"bunchSpacingOverride");
66 e.
put(std::make_unique<unsigned int>(bunchSpacingOverride_));
70 unsigned int bunchSpacing=50;
74 if ( ( run > 252126 && run != 254833 )||
89 bunchSpacing = *bunchSpacingH;
92 e.
put(std::make_unique<unsigned int>(bunchSpacing));
99 desc.
add<
bool>(
"overrideBunchSpacing",
false);
100 desc.
add<
unsigned int>(
"bunchSpacingOverride",25);
102 descriptions.
add(
"bunchSpacingProducer",desc) ;
static void fillDescriptions(edm::ConfigurationDescriptions &)
T getParameter(std::string const &) const
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_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< int > bunchSpacing_
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) final
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)