CMS 3D CMS Logo

NativeArrayTableProducer.cc
Go to the documentation of this file.
4 
5 #include <vector>
6 
7 template <typename TIn, typename TCol>
9 public:
11  : name_(params.getParameter<std::string>("name")),
12  doc_(params.existsAs<std::string>("doc") ? params.getParameter<std::string>("doc") : ""),
13  src_(consumes<TIn>(params.getParameter<edm::InputTag>("src"))) {
14  produces<nanoaod::FlatTable>();
15  }
16 
18 
19  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override {
21  iEvent.getByToken(src_, src);
22 
23  const auto& in = *src;
24  auto out = std::make_unique<nanoaod::FlatTable>(in.size(), name_, false, false);
25  out->setDoc(doc_);
26  (*out).template addColumn<TCol>(this->name_, in, this->doc_);
27  iEvent.put(std::move(out));
28  }
29 
30 protected:
34 };
35 
40 
NativeArrayTableProducer::src_
const edm::EDGetTokenT< TIn > src_
Definition: NativeArrayTableProducer.cc:33
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::EDGetTokenT< TIn >
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
NativeArrayTableProducer::NativeArrayTableProducer
NativeArrayTableProducer(edm::ParameterSet const &params)
Definition: NativeArrayTableProducer.cc:10
EDProducer.h
DoubleArrayTableProducer
NativeArrayTableProducer< std::vector< double >, float > DoubleArrayTableProducer
Definition: NativeArrayTableProducer.cc:37
edm::Handle
Definition: AssociativeIterator.h:50
NativeArrayTableProducer
Definition: NativeArrayTableProducer.cc:8
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BoolArrayTableProducer
NativeArrayTableProducer< std::vector< bool >, bool > BoolArrayTableProducer
Definition: NativeArrayTableProducer.cc:39
FloatArrayTableProducer
NativeArrayTableProducer< std::vector< float >, float > FloatArrayTableProducer
Definition: NativeArrayTableProducer.cc:36
edm::ParameterSet
Definition: ParameterSet.h:47
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
NativeArrayTableProducer::~NativeArrayTableProducer
~NativeArrayTableProducer() override
Definition: NativeArrayTableProducer.cc:17
recoMuon::in
Definition: RecoMuonEnumerators.h:6
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
FlatTable.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
IntArrayTableProducer
NativeArrayTableProducer< std::vector< int >, int > IntArrayTableProducer
Definition: NativeArrayTableProducer.cc:38
NativeArrayTableProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: NativeArrayTableProducer.cc:19
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
NativeArrayTableProducer::doc_
const std::string doc_
Definition: NativeArrayTableProducer.cc:32
ParameterSet.h
edm::Event
Definition: Event.h:73
NativeArrayTableProducer::name_
const std::string name_
Definition: NativeArrayTableProducer.cc:31