CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PFBlockProducer Class Reference

Producer for particle flow blocks. More...

Inheritance diagram for PFBlockProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 PFBlockProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

PFBlockAlgo pfBlockAlgo_
 Particle flow block algorithm. More...
 
const edm::EDPutTokenT< reco::PFBlockCollectionputToken_
 
const bool verbose_
 verbose ? More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Producer for particle flow blocks.

This producer makes use of PFBlockAlgo, the particle flow block algorithm. Particle flow itself consists in reconstructing particles from the particle flow blocks This is done at a later stage, see PFProducer and PFAlgo.

Author
Colin Bernet
Date
April 2007

Definition at line 21 of file PFBlockProducer.cc.

Constructor & Destructor Documentation

◆ PFBlockProducer()

PFBlockProducer::PFBlockProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 43 of file PFBlockProducer.cc.

44  : verbose_{iConfig.getUntrackedParameter<bool>("verbose", false)}, putToken_{produces<reco::PFBlockCollection>()} {
45  bool debug_ = iConfig.getUntrackedParameter<bool>("debug", false);
46  pfBlockAlgo_.setDebug(debug_);
47 
48  edm::ConsumesCollector coll = consumesCollector();
49  const std::vector<edm::ParameterSet>& importers = iConfig.getParameterSetVector("elementImporters");
50  pfBlockAlgo_.setImporters(importers, coll);
51 
52  const std::vector<edm::ParameterSet>& linkdefs = iConfig.getParameterSetVector("linkDefinitions");
53  pfBlockAlgo_.setLinkers(linkdefs);
54 }

References edm::ParameterSet::getUntrackedParameter().

Member Function Documentation

◆ beginLuminosityBlock()

void PFBlockProducer::beginLuminosityBlock ( edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
override

Definition at line 56 of file PFBlockProducer.cc.

56  {
58 }

References pfBlockAlgo_, and PFBlockAlgo::updateEventSetup().

◆ produce()

void PFBlockProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 60 of file PFBlockProducer.cc.

60  {
62 
64 
65  if (verbose_) {
66  ostringstream str;
67  str << pfBlockAlgo_ << endl;
68  str << "number of blocks : " << blocks.size() << endl;
69  str << endl;
70 
71  for (auto const& block : blocks) {
72  str << block << endl;
73  }
74 
75  LogInfo("PFBlockProducer") << str.str() << endl;
76  }
77 
78  iEvent.emplace(putToken_, blocks);
79 }

References groupFilesInBlocks::block, gather_cfg::blocks, PFBlockAlgo::buildElements(), PFBlockAlgo::findBlocks(), iEvent, pfBlockAlgo_, putToken_, str, and verbose_.

Member Data Documentation

◆ pfBlockAlgo_

PFBlockAlgo PFBlockProducer::pfBlockAlgo_
private

Particle flow block algorithm.

Definition at line 35 of file PFBlockProducer.cc.

Referenced by beginLuminosityBlock(), and produce().

◆ putToken_

const edm::EDPutTokenT<reco::PFBlockCollection> PFBlockProducer::putToken_
private

Definition at line 32 of file PFBlockProducer.cc.

Referenced by produce().

◆ verbose_

const bool PFBlockProducer::verbose_
private

verbose ?

Definition at line 31 of file PFBlockProducer.cc.

Referenced by produce().

PFBlockAlgo::buildElements
void buildElements(const edm::Event &)
Definition: PFBlockAlgo.cc:284
PFBlockProducer::pfBlockAlgo_
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
Definition: PFBlockProducer.cc:35
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PFBlockProducer::putToken_
const edm::EDPutTokenT< reco::PFBlockCollection > putToken_
Definition: PFBlockProducer.cc:32
PFBlockProducer::verbose_
const bool verbose_
verbose ?
Definition: PFBlockProducer.cc:31
PFBlockAlgo::setDebug
void setDebug(bool debug)
sets debug printout flag
Definition: PFBlockAlgo.h:59
str
#define str(s)
Definition: TestProcessor.cc:52
PFBlockAlgo::setImporters
void setImporters(const std::vector< edm::ParameterSet > &, edm::ConsumesCollector &)
Definition: PFBlockAlgo.cc:124
iEvent
int iEvent
Definition: GenABIO.cc:224
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
PFBlockAlgo::findBlocks
reco::PFBlockCollection findBlocks()
build blocks
Definition: PFBlockAlgo.cc:139
PFBlockAlgo::updateEventSetup
void updateEventSetup(const edm::EventSetup &)
Definition: PFBlockAlgo.cc:275
edm::ParameterSet::getParameterSetVector
VParameterSet const & getParameterSetVector(std::string const &name) const
Definition: ParameterSet.cc:2160
gather_cfg.blocks
blocks
Definition: gather_cfg.py:90
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PFBlockAlgo::setLinkers
void setLinkers(const std::vector< edm::ParameterSet > &)
Definition: PFBlockAlgo.cc:84