CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
FirstObjectSimpleFlatTableProducer< T > Class Template Reference

#include <SimpleFlatTableProducer.h>

Inheritance diagram for FirstObjectSimpleFlatTableProducer< T >:
SimpleFlatTableProducerBase< T, edm::View< T > > edm::stream::EDProducer<>

Public Member Functions

std::unique_ptr
< nanoaod::FlatTable
fillTable (const edm::Event &iEvent, const edm::Handle< edm::View< T >> &prod) const override
 
 FirstObjectSimpleFlatTableProducer (edm::ParameterSet const &params)
 
 ~FirstObjectSimpleFlatTableProducer () override
 
- Public Member Functions inherited from SimpleFlatTableProducerBase< T, edm::View< T > >
virtual std::unique_ptr
< nanoaod::FlatTable
fillTable (const edm::Event &iEvent, const edm::Handle< edm::View< T > > &prod) const =0
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 SimpleFlatTableProducerBase (edm::ParameterSet const &params)
 
 ~SimpleFlatTableProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Types inherited from SimpleFlatTableProducerBase< T, edm::View< T > >
typedef FuncVariable
< StringCutObjectSelector< T >
, bool > 
BoolVar
 
typedef FuncVariable
< StringObjectFunction< T >
, float > 
FloatVar
 
typedef FuncVariable
< StringObjectFunction< T >
, int > 
IntVar
 
typedef FuncVariable
< StringObjectFunction< T >
, uint8_t > 
UInt8Var
 
- Protected Attributes inherited from SimpleFlatTableProducerBase< T, edm::View< T > >
const std::string doc_
 
const bool extension_
 
const std::string name_
 
const bool skipNonExistingSrc_
 
const edm::EDGetTokenT
< edm::View< T > > 
src_
 
std::vector< std::unique_ptr
< Variable > > 
vars_
 

Detailed Description

template<typename T>
class FirstObjectSimpleFlatTableProducer< T >

Definition at line 258 of file SimpleFlatTableProducer.h.

Constructor & Destructor Documentation

template<typename T >
FirstObjectSimpleFlatTableProducer< T >::FirstObjectSimpleFlatTableProducer ( edm::ParameterSet const &  params)
inline
template<typename T >
FirstObjectSimpleFlatTableProducer< T >::~FirstObjectSimpleFlatTableProducer ( )
inlineoverride

Definition at line 263 of file SimpleFlatTableProducer.h.

263 {}

Member Function Documentation

template<typename T >
std::unique_ptr<nanoaod::FlatTable> FirstObjectSimpleFlatTableProducer< T >::fillTable ( const edm::Event iEvent,
const edm::Handle< edm::View< T >> &  prod 
) const
inlineoverride

Definition at line 265 of file SimpleFlatTableProducer.h.

References SimpleFlatTableProducerBase< T, edm::View< T > >::extension_, SimpleFlatTableProducerBase< T, edm::View< T > >::name_, submitPVResolutionJobs::out, isotrackApplyRegressor::var, and SimpleFlatTableProducerBase< T, edm::View< T > >::vars_.

266  {
267  auto out = std::make_unique<nanoaod::FlatTable>(1, this->name_, true, this->extension_);
268  std::vector<const T *> selobjs(1, &(*prod)[0]);
269  for (const auto &var : this->vars_)
270  var->fill(selobjs, *out);
271  return out;
272  }
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
std::vector< std::unique_ptr< Variable > > vars_