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
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
 
 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

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

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

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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 43 of file PFBlockProducer.cc.

References debug_, edm::ParameterSet::getParameterSetVector(), edm::ParameterSet::getUntrackedParameter(), pfBlockAlgo_, putToken_, PFBlockAlgo::setDebug(), PFBlockAlgo::setImporters(), and PFBlockAlgo::setLinkers().

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 cc = consumesCollector();
49  const std::vector<edm::ParameterSet>& importers = iConfig.getParameterSetVector("elementImporters");
50  pfBlockAlgo_.setImporters(importers, cc);
51 
52  const std::vector<edm::ParameterSet>& linkdefs = iConfig.getParameterSetVector("linkDefinitions");
53  pfBlockAlgo_.setLinkers(linkdefs);
54 }
T getUntrackedParameter(std::string const &, T const &) const
VParameterSet const & getParameterSetVector(std::string const &name) const
const edm::EDPutTokenT< reco::PFBlockCollection > putToken_
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
void setDebug(bool debug)
sets debug printout flag
Definition: PFBlockAlgo.h:59
void setImporters(const std::vector< edm::ParameterSet > &, edm::ConsumesCollector &)
const bool verbose_
verbose ?
void setLinkers(const std::vector< edm::ParameterSet > &)

Member Function Documentation

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

Definition at line 56 of file PFBlockProducer.cc.

References pfBlockAlgo_, and PFBlockAlgo::updateEventSetup().

56  {
58 }
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
void updateEventSetup(const edm::EventSetup &)
void PFBlockProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 60 of file PFBlockProducer.cc.

References createPayload::block, gather_cfg::blocks, PFBlockAlgo::buildElements(), edm::Event::emplace(), PFBlockAlgo::findBlocks(), pfBlockAlgo_, putToken_, str, and verbose_.

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 }
const edm::EDPutTokenT< reco::PFBlockCollection > putToken_
tuple blocks
Definition: gather_cfg.py:90
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
const bool verbose_
verbose ?
Log< level::Info, false > LogInfo
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:433
reco::PFBlockCollection findBlocks()
build blocks
void buildElements(const edm::Event &)
#define str(s)

Member Data Documentation

PFBlockAlgo PFBlockProducer::pfBlockAlgo_
private

Particle flow block algorithm.

Definition at line 35 of file PFBlockProducer.cc.

Referenced by beginLuminosityBlock(), PFBlockProducer(), and produce().

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

Definition at line 32 of file PFBlockProducer.cc.

Referenced by PFBlockProducer(), and produce().

const bool PFBlockProducer::verbose_
private

verbose ?

Definition at line 31 of file PFBlockProducer.cc.

Referenced by produce().