CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
MuBaseFlatTableProducer Class Referenceabstract

#include <DPGAnalysis/MuonTools/src/MuBaseFlatTableProducer.cc>

Inheritance diagram for MuBaseFlatTableProducer:
edm::stream::EDProducer<> MuCSCTnPFlatTableProducer MuDTMuonExtTableProducer MuDTSegmentExtTableProducer MuDTTPGPhiFlatTableProducer MuDTTPGThetaFlatTableProducer MuGEMMuonExtTableProducer

Public Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &config) final
 Configure event setup for each run. More...
 
void endRun (const edm::Run &, const edm::EventSetup &) final
 Empty, needed by interface. More...
 
 MuBaseFlatTableProducer (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) final
 Fill ntuples event by event. More...
 
- 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
 

Protected Member Functions

template<typename T >
void addColumn (std::unique_ptr< nanoaod::FlatTable > &table, const std::string name, const std::vector< T > &vec, const std::string descr)
 
virtual void fillTable (edm::Event &ev)=0
 Fill ntuple. More...
 
virtual void getFromES (const edm::Run &run, const edm::EventSetup &environment)
 Get info from the ES by run. More...
 
virtual void getFromES (const edm::EventSetup &environment)
 Get info from the ES for a given event. More...
 

Protected Attributes

std::string m_name
 The label name of the FlatTableProducer. More...
 

Static Protected Attributes

static constexpr double DEFAULT_DOUBLE_VAL {-999.0}
 Definition of default values for float variables. More...
 
static constexpr double DEFAULT_DOUBLE_VAL_POS {-1.0}
 Definition of default values for positive float variables. More...
 
static constexpr int8_t DEFAULT_INT8_VAL {-99}
 Definition of default values for int8 variables. More...
 
static constexpr int DEFAULT_INT_VAL {-999}
 Definition of default values for int variables. More...
 
static constexpr int DEFAULT_INT_VAL_POS {-1}
 Definition of default values for positive int variables. More...
 

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
 

Detailed Description

Helper class defining the generic interface of a FlatTableProducer

Author
C. Battilana (INFN BO)

Definition at line 22 of file MuBaseFlatTableProducer.h.

Constructor & Destructor Documentation

◆ MuBaseFlatTableProducer()

MuBaseFlatTableProducer::MuBaseFlatTableProducer ( const edm::ParameterSet config)
explicit

Constructor.

Definition at line 12 of file MuBaseFlatTableProducer.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

13  : m_name{config.getParameter<std::string>("name")} {}
Definition: config.py:1
std::string m_name
The label name of the FlatTableProducer.

Member Function Documentation

◆ addColumn()

template<typename T >
void MuBaseFlatTableProducer::addColumn ( std::unique_ptr< nanoaod::FlatTable > &  table,
const std::string  name,
const std::vector< T > &  vec,
const std::string  descr 
)
inlineprotected

◆ beginRun()

void MuBaseFlatTableProducer::beginRun ( const edm::Run run,
const edm::EventSetup config 
)
final

Configure event setup for each run.

Definition at line 15 of file MuBaseFlatTableProducer.cc.

References reco_calib_source_client_cfg::environment, getFromES(), and writedatasetfile::run.

15  {
17 }
virtual void getFromES(const edm::Run &run, const edm::EventSetup &environment)
Get info from the ES by run.

◆ endRun()

void MuBaseFlatTableProducer::endRun ( const edm::Run ,
const edm::EventSetup  
)
inlinefinal

Empty, needed by interface.

Definition at line 34 of file MuBaseFlatTableProducer.h.

34 {}

◆ fillTable()

virtual void MuBaseFlatTableProducer::fillTable ( edm::Event ev)
protectedpure virtual

◆ getFromES() [1/2]

virtual void MuBaseFlatTableProducer::getFromES ( const edm::Run run,
const edm::EventSetup environment 
)
inlineprotectedvirtual

Get info from the ES by run.

Reimplemented in MuCSCTnPFlatTableProducer, MuDTMuonExtTableProducer, MuDTSegmentExtTableProducer, MuGEMMuonExtTableProducer, and MuDTTPGPhiFlatTableProducer.

Definition at line 41 of file MuBaseFlatTableProducer.h.

Referenced by beginRun(), and produce().

41 {}

◆ getFromES() [2/2]

virtual void MuBaseFlatTableProducer::getFromES ( const edm::EventSetup environment)
inlineprotectedvirtual

Get info from the ES for a given event.

Reimplemented in MuCSCTnPFlatTableProducer, MuDTSegmentExtTableProducer, and MuGEMMuonExtTableProducer.

Definition at line 44 of file MuBaseFlatTableProducer.h.

44 {}

◆ produce()

void MuBaseFlatTableProducer::produce ( edm::Event ev,
const edm::EventSetup environment 
)
final

Fill ntuples event by event.

Definition at line 19 of file MuBaseFlatTableProducer.cc.

References reco_calib_source_client_cfg::environment, makeMEIFBenchmarkPlots::ev, fillTable(), and getFromES().

19  {
21  fillTable(ev);
22 }
virtual void fillTable(edm::Event &ev)=0
Fill ntuple.
virtual void getFromES(const edm::Run &run, const edm::EventSetup &environment)
Get info from the ES by run.

Member Data Documentation

◆ DEFAULT_DOUBLE_VAL

constexpr double MuBaseFlatTableProducer::DEFAULT_DOUBLE_VAL {-999.0}
staticprotected

Definition of default values for float variables.

Definition at line 59 of file MuBaseFlatTableProducer.h.

Referenced by MuGEMMuonExtTableProducer::fillTable(), and MuDTSegmentExtTableProducer::fillTable().

◆ DEFAULT_DOUBLE_VAL_POS

constexpr double MuBaseFlatTableProducer::DEFAULT_DOUBLE_VAL_POS {-1.0}
staticprotected

Definition of default values for positive float variables.

Definition at line 62 of file MuBaseFlatTableProducer.h.

◆ DEFAULT_INT8_VAL

constexpr int8_t MuBaseFlatTableProducer::DEFAULT_INT8_VAL {-99}
staticprotected

Definition of default values for int8 variables.

Definition at line 53 of file MuBaseFlatTableProducer.h.

◆ DEFAULT_INT_VAL

constexpr int MuBaseFlatTableProducer::DEFAULT_INT_VAL {-999}
staticprotected

Definition of default values for int variables.

Definition at line 50 of file MuBaseFlatTableProducer.h.

◆ DEFAULT_INT_VAL_POS

constexpr int MuBaseFlatTableProducer::DEFAULT_INT_VAL_POS {-1}
staticprotected

Definition of default values for positive int variables.

Definition at line 56 of file MuBaseFlatTableProducer.h.

Referenced by MuDTSegmentExtTableProducer::fillTable().

◆ m_name

std::string MuBaseFlatTableProducer::m_name
protected