CMS 3D CMS Logo

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

Public Member Functions

 EcalCompactTrigPrimProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~EcalCompactTrigPrimProducer () 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 Attributes

edm::EDGetTokenT< EcalTrigPrimDigiCollectioninCollectionToken_
 
std::string outCollection_
 

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

$Id: $Date: $Revision:

Author
Ph. Gras CEA/IRFU Saclay

Definition at line 15 of file EcalCompactTrigPrimProducer.cc.

Constructor & Destructor Documentation

◆ EcalCompactTrigPrimProducer()

EcalCompactTrigPrimProducer::EcalCompactTrigPrimProducer ( const edm::ParameterSet ps)

Definition at line 33 of file EcalCompactTrigPrimProducer.cc.

References edm::ParameterSet::getParameter(), inCollectionToken_, and outCollection_.

34  : outCollection_(ps.getParameter<std::string>("outColl")) {
35  inCollectionToken_ = consumes<EcalTrigPrimDigiCollection>((ps.getParameter<edm::InputTag>("inColl")));
36  produces<EcalTrigPrimCompactColl>(outCollection_);
37 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_

◆ ~EcalCompactTrigPrimProducer()

EcalCompactTrigPrimProducer::~EcalCompactTrigPrimProducer ( )
inlineoverride

Definition at line 18 of file EcalCompactTrigPrimProducer.cc.

18 {}

Member Function Documentation

◆ produce()

void EcalCompactTrigPrimProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 39 of file EcalCompactTrigPrimProducer.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), inCollectionToken_, eostools::move(), ecalCompactTrigPrim_cfi::outColl, and outCollection_.

39  {
40  auto outColl = std::make_unique<EcalTrigPrimCompactColl>();
42  event.getByToken(inCollectionToken_, hTPDigis);
43 
44  const EcalTrigPrimDigiCollection* trigPrims = hTPDigis.product();
45 
46  for (EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims->begin(); trigPrim != trigPrims->end();
47  ++trigPrim) {
48  outColl->setValue(
49  trigPrim->id().ieta(), trigPrim->id().iphi(), trigPrim->sample(trigPrim->sampleOfInterest()).raw());
50  }
51  event.put(std::move(outColl), outCollection_);
52 }
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
std::vector< T >::const_iterator const_iterator
const_iterator begin() const
const_iterator end() const
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ inCollectionToken_

edm::EDGetTokenT<EcalTrigPrimDigiCollection> EcalCompactTrigPrimProducer::inCollectionToken_
private

Definition at line 22 of file EcalCompactTrigPrimProducer.cc.

Referenced by EcalCompactTrigPrimProducer(), and produce().

◆ outCollection_

std::string EcalCompactTrigPrimProducer::outCollection_
private

Definition at line 27 of file EcalCompactTrigPrimProducer.cc.

Referenced by EcalCompactTrigPrimProducer(), and produce().