CMS 3D CMS Logo

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

Constructor & Destructor Documentation

◆ EcalCompactTrigPrimProducer()

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

Definition at line 12 of file EcalCompactTrigPrimProducer.cc.

13  : outCollection_(ps.getParameter<std::string>("outColl")) {
14  inCollectionToken_ = consumes<EcalTrigPrimDigiCollection>((ps.getParameter<edm::InputTag>("inColl")));
15  produces<EcalTrigPrimCompactColl>(outCollection_);
16 }

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

◆ ~EcalCompactTrigPrimProducer()

EcalCompactTrigPrimProducer::~EcalCompactTrigPrimProducer ( )
inlineoverride

Definition at line 20 of file EcalCompactTrigPrimProducer.h.

20 {}

Member Function Documentation

◆ produce()

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

Definition at line 18 of file EcalCompactTrigPrimProducer.cc.

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 }

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

Member Data Documentation

◆ inCollectionToken_

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

Definition at line 24 of file EcalCompactTrigPrimProducer.h.

Referenced by EcalCompactTrigPrimProducer(), and produce().

◆ outCollection_

std::string EcalCompactTrigPrimProducer::outCollection_
private

Definition at line 29 of file EcalCompactTrigPrimProducer.h.

Referenced by EcalCompactTrigPrimProducer(), and produce().

edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ecalCompactTrigPrim_cfi.outColl
outColl
Definition: ecalCompactTrigPrim_cfi.py:6
EcalCompactTrigPrimProducer::inCollectionToken_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > inCollectionToken_
Definition: EcalCompactTrigPrimProducer.h:24
edm::SortedCollection
Definition: SortedCollection.h:49
edm::Handle
Definition: AssociativeIterator.h:50
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalCompactTrigPrimProducer::outCollection_
std::string outCollection_
Definition: EcalCompactTrigPrimProducer.h:29
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15