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 beginRun (edm::Run const &, edm::EventSetup const &) override
 
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

◆ beginRun()

void HcalUMNioTableProducer::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 47 of file HcalUMNioTableProducer.cc.

47 {}

◆ produce()

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

Definition at line 49 of file HcalUMNioTableProducer.cc.

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

49  {
51  iEvent.getByToken(tokenUMNio_, uMNioDigi);
52  uint8_t eventType = uMNioDigi->eventType();
53 
54  auto uMNioNanoTable = std::make_unique<nanoaod::FlatTable>(1, "uMNio", true);
55  uMNioNanoTable->addColumnValue<uint8_t>("EventType", eventType, "EventType");
56  for (int iWord = 0; iWord < uMNioDigi->numberUserWords(); ++iWord) {
57  uint32_t thisWord = uMNioDigi->valueUserWord(iWord);
58  uMNioNanoTable->addColumnValue<uint32_t>(
59  "UserWord" + std::to_string(iWord), thisWord, "UserWord" + std::to_string(iWord));
60  }
61  iEvent.put(std::move(uMNioNanoTable), "uMNioTable");
62 }
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().