CMS 3D CMS Logo

NativeArrayTableProducer.cc
Go to the documentation of this file.
4 
5 #include <vector>
6 
7 template <typename TIn, typename TCol, nanoaod::FlatTable::ColumnType CT>
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_, CT);
27  iEvent.put(std::move(out));
28  }
29 
30 protected:
34 };
35 
40 
nanoaod::FlatTable::FloatColumn
Definition: FlatTable.h:39
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::EDGetTokenT< TIn >
edm
HLT enums.
Definition: AlignableModifier.h:19
BoolArrayTableProducer
NativeArrayTableProducer< std::vector< bool >, uint8_t, nanoaod::FlatTable::UInt8Column > BoolArrayTableProducer
Definition: NativeArrayTableProducer.cc:39
EDProducer.h
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
NativeArrayTableProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: NativeArrayTableProducer.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
NativeArrayTableProducer::~NativeArrayTableProducer
~NativeArrayTableProducer() override
Definition: NativeArrayTableProducer.cc:17
IntArrayTableProducer
NativeArrayTableProducer< std::vector< int >, int, nanoaod::FlatTable::IntColumn > IntArrayTableProducer
Definition: NativeArrayTableProducer.cc:38
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
recoMuon::in
Definition: RecoMuonEnumerators.h:6
NativeArrayTableProducer::doc_
const std::string doc_
Definition: NativeArrayTableProducer.cc:32
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
nanoaod::FlatTable::UInt8Column
Definition: FlatTable.h:41
FlatTable.h
NativeArrayTableProducer::NativeArrayTableProducer
NativeArrayTableProducer(edm::ParameterSet const &params)
Definition: NativeArrayTableProducer.cc:10
nanoaod::FlatTable::IntColumn
Definition: FlatTable.h:40
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
FloatArrayTableProducer
NativeArrayTableProducer< std::vector< float >, float, nanoaod::FlatTable::FloatColumn > FloatArrayTableProducer
Definition: NativeArrayTableProducer.cc:36
NativeArrayTableProducer::src_
const edm::EDGetTokenT< TIn > src_
Definition: NativeArrayTableProducer.cc:33
DoubleArrayTableProducer
NativeArrayTableProducer< std::vector< double >, float, nanoaod::FlatTable::FloatColumn > DoubleArrayTableProducer
Definition: NativeArrayTableProducer.cc:37
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ParameterSet.h
NativeArrayTableProducer::name_
const std::string name_
Definition: NativeArrayTableProducer.cc:31
edm::Event
Definition: Event.h:73