CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalUMNioTableProducer Class Reference
Inheritance diagram for HcalUMNioTableProducer:
edm::stream::EDProducer<>

Public Member Functions

 HcalUMNioTableProducer (const edm::ParameterSet &iConfig)
 
 ~HcalUMNioTableProducer () 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
 

Private Member Functions

void produce (edm::Event &, edm::EventSetup const &) override
 

Private Attributes

edm::InputTag tagUMNio_
 
edm::EDGetTokenT< HcalUMNioDigitokenUMNio_
 

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

Definition at line 19 of file HcalUMNioTableProducer.cc.

Constructor & Destructor Documentation

◆ HcalUMNioTableProducer()

HcalUMNioTableProducer::HcalUMNioTableProducer ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 25 of file HcalUMNioTableProducer.cc.

References tagUMNio_, and tokenUMNio_.

26  : tagUMNio_(iConfig.getUntrackedParameter<edm::InputTag>("tagUMNio", edm::InputTag("hcalDigis"))) {
27  tokenUMNio_ = consumes<HcalUMNioDigi>(tagUMNio_);
28 
29  produces<nanoaod::FlatTable>("uMNioTable");
30  }
edm::EDGetTokenT< HcalUMNioDigi > tokenUMNio_
T getUntrackedParameter(std::string const &, T const &) const

◆ ~HcalUMNioTableProducer()

HcalUMNioTableProducer::~HcalUMNioTableProducer ( )
inlineoverride

Definition at line 32 of file HcalUMNioTableProducer.cc.

32 {};

Member Function Documentation

◆ produce()

void HcalUMNioTableProducer::produce ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 46 of file HcalUMNioTableProducer.cc.

References HcalUMNioDigi::eventType(), hcalcalib_dqm_sourceclient-live_cfg::eventType, iEvent, eostools::move(), HcalUMNioDigi::numberUserWords(), to_string(), tokenUMNio_, and HcalUMNioDigi::valueUserWord().

46  {
48  iEvent.getByToken(tokenUMNio_, uMNioDigi);
49  uint8_t eventType = uMNioDigi->eventType();
50 
51  auto uMNioNanoTable = std::make_unique<nanoaod::FlatTable>(1, "uMNio", true);
52  uMNioNanoTable->addColumnValue<uint8_t>("EventType", eventType, "EventType");
53  for (int iWord = 0; iWord < uMNioDigi->numberUserWords(); ++iWord) {
54  uint32_t thisWord = uMNioDigi->valueUserWord(iWord);
55  uMNioNanoTable->addColumnValue<uint32_t>(
56  "UserWord" + std::to_string(iWord), thisWord, "UserWord" + std::to_string(iWord));
57  }
58  iEvent.put(std::move(uMNioNanoTable), "uMNioTable");
59 }
edm::EDGetTokenT< HcalUMNioDigi > tokenUMNio_
int numberUserWords() const
static std::string to_string(const XMLCh *ch)
uint32_t valueUserWord(int iword) const
int iEvent
Definition: GenABIO.cc:224
uint8_t eventType() const
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ tagUMNio_

edm::InputTag HcalUMNioTableProducer::tagUMNio_
private

Definition at line 22 of file HcalUMNioTableProducer.cc.

Referenced by HcalUMNioTableProducer().

◆ tokenUMNio_

edm::EDGetTokenT<HcalUMNioDigi> HcalUMNioTableProducer::tokenUMNio_
private

Definition at line 21 of file HcalUMNioTableProducer.cc.

Referenced by HcalUMNioTableProducer(), and produce().