CMS 3D CMS Logo

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

Public Member Functions

void produce (edm::Event &iEvent, edm::EventSetup const &) override
 
 TransformIntStreamProducer (edm::ParameterSet const &iPSet)
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::Transformer >
 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &desc)
 

Private Attributes

const edm::EDGetTokenT< IntProduct > getToken_
 
const unsigned int offset_
 
edm::EDPutTokenT< IntProduct > putToken_
 
const unsigned int transformOffset_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer< edm::Transformer >
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 8 of file TransformIntStreamProducer.cc.

Constructor & Destructor Documentation

◆ TransformIntStreamProducer()

edmtest::TransformIntStreamProducer::TransformIntStreamProducer ( edm::ParameterSet const &  iPSet)
inline

Definition at line 10 of file TransformIntStreamProducer.cc.

References RPCNoise_example::check, Exception, edm::ParameterSet::getUntrackedParameter(), hltrates_dqm_sourceclient-live_cfg::offset, putToken_, and transformOffset_.

11  : getToken_(consumes(iPSet.getParameter<edm::InputTag>("get"))),
12  offset_(iPSet.getParameter<unsigned int>("offset")),
13  transformOffset_(iPSet.getParameter<unsigned int>("transformOffset")) {
14  putToken_ = produces<IntProduct>();
15  bool check = iPSet.getUntrackedParameter<bool>("checkTransformNotCalled");
16  registerTransform(
17  putToken_,
18  [offset = transformOffset_, check](auto const& iFrom) {
19  if (check) {
20  throw cms::Exception("TransformShouldNotBeCalled");
21  }
22  return IntProduct(iFrom.value + offset);
23  },
24  "transform");
25  }
const edm::EDGetTokenT< IntProduct > getToken_
edm::EDPutTokenT< IntProduct > putToken_

Member Function Documentation

◆ fillDescriptions()

static void edmtest::TransformIntStreamProducer::fillDescriptions ( edm::ConfigurationDescriptions desc)
inlinestatic

Definition at line 30 of file TransformIntStreamProducer.cc.

References submitPVResolutionJobs::desc, and muonDTDigis_cfi::pset.

30  {
32  pset.add<edm::InputTag>("get");
33  pset.add<unsigned int>("offset", 0);
34  pset.add<unsigned int>("transformOffset", 1);
35  pset.addUntracked<bool>("checkTransformNotCalled", false);
36 
37  desc.addDefault(pset);
38  }

◆ produce()

void edmtest::TransformIntStreamProducer::produce ( edm::Event iEvent,
edm::EventSetup const &   
)
inlineoverride

Definition at line 27 of file TransformIntStreamProducer.cc.

References getToken_, iEvent, offset_, and putToken_.

27  {
28  iEvent.emplace(putToken_, iEvent.get(getToken_).value + offset_);
29  }
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< IntProduct > getToken_
edm::EDPutTokenT< IntProduct > putToken_

Member Data Documentation

◆ getToken_

const edm::EDGetTokenT<IntProduct> edmtest::TransformIntStreamProducer::getToken_
private

Definition at line 41 of file TransformIntStreamProducer.cc.

Referenced by produce().

◆ offset_

const unsigned int edmtest::TransformIntStreamProducer::offset_
private

Definition at line 43 of file TransformIntStreamProducer.cc.

Referenced by produce().

◆ putToken_

edm::EDPutTokenT<IntProduct> edmtest::TransformIntStreamProducer::putToken_
private

Definition at line 42 of file TransformIntStreamProducer.cc.

Referenced by produce(), and TransformIntStreamProducer().

◆ transformOffset_

const unsigned int edmtest::TransformIntStreamProducer::transformOffset_
private

Definition at line 44 of file TransformIntStreamProducer.cc.

Referenced by TransformIntStreamProducer().