CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
NativeArrayTableProducer< TIn, TCol, CT > Class Template Reference
Inheritance diagram for NativeArrayTableProducer< TIn, TCol, CT >:
edm::stream::EDProducer<>

Public Member Functions

 NativeArrayTableProducer (edm::ParameterSet const &params)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~NativeArrayTableProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Attributes

const std::string doc_
 
const std::string name_
 
const edm::EDGetTokenT< TIn > src_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

template<typename TIn, typename TCol, nanoaod::FlatTable::ColumnType CT>
class NativeArrayTableProducer< TIn, TCol, CT >

Definition at line 8 of file NativeArrayTableProducer.cc.

Constructor & Destructor Documentation

template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
NativeArrayTableProducer< TIn, TCol, CT >::NativeArrayTableProducer ( edm::ParameterSet const &  params)
inline

Definition at line 10 of file NativeArrayTableProducer.cc.

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  }
const edm::EDGetTokenT< TIn > src_
template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
NativeArrayTableProducer< TIn, TCol, CT >::~NativeArrayTableProducer ( )
inlineoverride

Definition at line 17 of file NativeArrayTableProducer.cc.

17 {}

Member Function Documentation

template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
void NativeArrayTableProducer< TIn, TCol, CT >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
inlineoverride

Definition at line 19 of file NativeArrayTableProducer.cc.

References NativeArrayTableProducer< TIn, TCol, CT >::doc_, edm::Event::getByToken(), recoMuon::in, eostools::move(), NativeArrayTableProducer< TIn, TCol, CT >::name_, MillePedeFileConverter_cfg::out, edm::Event::put(), TrackRefitter_38T_cff::src, and NativeArrayTableProducer< TIn, TCol, CT >::src_.

19  {
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  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const edm::EDGetTokenT< TIn > src_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
const std::string NativeArrayTableProducer< TIn, TCol, CT >::doc_
protected
template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
const std::string NativeArrayTableProducer< TIn, TCol, CT >::name_
protected
template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
const edm::EDGetTokenT<TIn> NativeArrayTableProducer< TIn, TCol, CT >::src_
protected