CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EcalCompactTrigPrimProducer Class Reference

#include <EcalCompactTrigPrimProducer.h>

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
< EcalTrigPrimDigiCollection
inCollectionToken_
 
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 17 of file EcalCompactTrigPrimProducer.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file EcalCompactTrigPrimProducer.cc.

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

13  : outCollection_(ps.getParameter<std::string>("outColl")) {
14  inCollectionToken_ = consumes<EcalTrigPrimDigiCollection>((ps.getParameter<edm::InputTag>("inColl")));
15  produces<EcalTrigPrimCompactColl>(outCollection_);
16 }
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalCompactTrigPrimProducer::~EcalCompactTrigPrimProducer ( )
inlineoverride

Definition at line 20 of file EcalCompactTrigPrimProducer.h.

20 {}

Member Function Documentation

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

Definition at line 18 of file EcalCompactTrigPrimProducer.cc.

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

18  {
19  auto outColl = std::make_unique<EcalTrigPrimCompactColl>();
21  event.getByToken(inCollectionToken_, hTPDigis);
22 
23  const EcalTrigPrimDigiCollection* trigPrims = hTPDigis.product();
24 
25  for (EcalTrigPrimDigiCollection::const_iterator trigPrim = trigPrims->begin(); trigPrim != trigPrims->end();
26  ++trigPrim) {
27  outColl->setValue(
28  trigPrim->id().ieta(), trigPrim->id().iphi(), trigPrim->sample(trigPrim->sampleOfInterest()).raw());
29  }
30  event.put(std::move(outColl), outCollection_);
31 }
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
std::vector< T >::const_iterator const_iterator
def move
Definition: eostools.py:511
const_iterator end() const
const_iterator begin() const

Member Data Documentation

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

Definition at line 24 of file EcalCompactTrigPrimProducer.h.

Referenced by EcalCompactTrigPrimProducer(), and produce().

std::string EcalCompactTrigPrimProducer::outCollection_
private

Definition at line 29 of file EcalCompactTrigPrimProducer.h.

Referenced by EcalCompactTrigPrimProducer(), and produce().