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

Definition at line 43 of file PFBlockProducer.cc.

References coll, 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 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 }
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 &)
Definition: PFBlockAlgo.cc:126
const bool verbose_
verbose ?
JetCorrectorParametersCollection coll
Definition: classes.h:10
void setLinkers(const std::vector< edm::ParameterSet > &)
Definition: PFBlockAlgo.cc:86

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 &)
Definition: PFBlockAlgo.cc:277
void PFBlockProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 60 of file PFBlockProducer.cc.

References groupFilesInBlocks::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_
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
const bool verbose_
verbose ?
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:421
reco::PFBlockCollection findBlocks()
build blocks
Definition: PFBlockAlgo.cc:141
void buildElements(const edm::Event &)
Definition: PFBlockAlgo.cc:286
#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().