1 #ifndef UtilAlgos_NtpProducer_h
2 #define UtilAlgos_NtpProducer_h
36 std::vector<std::pair<std::string, StringObjectFunction<typename C::value_type> > >
tags_;
45 lazyParser_(par.
template getUntrackedParameter<bool>(
"lazyParser",
false)),
46 prefix_(par.
template getUntrackedParameter<std::
string>(
"prefix",
"")),
47 eventInfo_(par.
template getUntrackedParameter<bool>(
"eventInfo",
true)) {
48 std::vector<edm::ParameterSet>
variables = par.template getParameter<std::vector<edm::ParameterSet> >(
"variables");
49 std::vector<edm::ParameterSet>::const_iterator
q = variables.begin(),
end = variables.end();
51 produces<edm::EventNumber_t>(
prefix_ +
"EventNumber").setBranchAlias(
prefix_ +
"EventNumber");
52 produces<unsigned int>(
prefix_ +
"RunNumber").setBranchAlias(
prefix_ +
"RunNumber");
53 produces<unsigned int>(
prefix_ +
"LumiBlock").setBranchAlias(
prefix_ +
"Lumiblock");
55 for (; q !=
end; ++
q) {
59 tags_.push_back(std::make_pair(tag, quantity));
60 produces<std::vector<float> >(
tag).setBranchAlias(tag);
73 std::unique_ptr<unsigned int>
run(
new unsigned int);
74 std::unique_ptr<unsigned int>
lumi(
new unsigned int);
76 *run = iEvent.
id().
run();
82 typename std::vector<std::pair<std::string, StringObjectFunction<typename C::value_type> > >::const_iterator
85 for (; q !=
end; ++
q) {
86 std::unique_ptr<std::vector<float> >
x(
new std::vector<float>);
87 x->reserve(coll->size());
88 for (
typename C::const_iterator elem = coll->begin(); elem != coll->end(); ++elem) {
89 x->push_back(q->second(*elem));
EventNumber_t event() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned long long EventNumber_t
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< C > srcToken_
label of the collection to be read in
uint16_t const *__restrict__ x
void produce(edm::Event &, const edm::EventSetup &) override
process an event
~NtpProducer() override
destructor
NtpProducer(const edm::ParameterSet &)
constructor from parameter set
std::vector< std::pair< std::string, StringObjectFunction< typename C::value_type > > > tags_
variable tags