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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 11 of file NativeArrayTableProducer.cc.

11  :
12  name_( params.getParameter<std::string>("name") ),
13  doc_(params.existsAs<std::string>("doc") ? params.getParameter<std::string>("doc") : ""),
14  src_(consumes<TIn>( params.getParameter<edm::InputTag>("src") ))
15  {
16  produces<nanoaod::FlatTable>();
17  }
const edm::EDGetTokenT< TIn > src_
template<typename TIn , typename TCol , nanoaod::FlatTable::ColumnType CT>
NativeArrayTableProducer< TIn, TCol, CT >::~NativeArrayTableProducer ( )
inlineoverride

Definition at line 19 of file NativeArrayTableProducer.cc.

19 {}

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 21 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_.

21  {
23  iEvent.getByToken(src_, src);
24 
25  const auto & in = *src;
26  auto out = std::make_unique<nanoaod::FlatTable>(in.size(), name_, false, false);
27  out->setDoc(doc_);
28  (*out).template addColumn<TCol>(this->name_, in, this->doc_, CT);
29  iEvent.put(std::move(out));
30  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
const edm::EDGetTokenT< TIn > src_
def move(src, dest)
Definition: eostools.py:510

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