1 #ifndef UtilAlgos_NtpProducer_h 2 #define UtilAlgos_NtpProducer_h 36 std::vector<std::pair<std::string, StringObjectFunction<typename C::value_type> > >
tags_;
48 std::vector<edm::ParameterSet>
variables = par.template getParameter<std::vector<edm::ParameterSet> >(
"variables");
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) {
60 produces<std::vector<float> >(
tag).setBranchAlias(
tag);
70 iEvent.getByToken(srcToken_, coll);
73 std::unique_ptr<unsigned int>
run(
new unsigned int);
74 std::unique_ptr<unsigned int>
lumi(
new unsigned int);
75 *
event =
iEvent.id().event();
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));
unsigned long long EventNumber_t
edm::EDGetTokenT< C > srcToken_
label of the collection to be read in
void produce(edm::Event &, const edm::EventSetup &) override
process an event
def template(fileName, svg, replaceme="REPLACEME")
~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