CMS 3D CMS Logo

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

Producer for particle flow blocks. More...

#include <PFBlockProducer.h>

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
 
 ~PFBlockProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 26 of file PFBlockProducer.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file PFBlockProducer.cc.

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

6  :
7  verbose_{ iConfig.getUntrackedParameter<bool>("verbose",false)},
8  putToken_{produces<reco::PFBlockCollection>()}
9 {
10  bool debug_ =
11  iConfig.getUntrackedParameter<bool>("debug",false);
12  pfBlockAlgo_.setDebug(debug_);
13 
14  edm::ConsumesCollector coll = consumesCollector();
15  const std::vector<edm::ParameterSet>& importers
16  = iConfig.getParameterSetVector("elementImporters");
17  pfBlockAlgo_.setImporters(importers,coll);
18 
19  const std::vector<edm::ParameterSet>& linkdefs
20  = iConfig.getParameterSetVector("linkDefinitions");
21  pfBlockAlgo_.setLinkers(linkdefs);
22 
23 }
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:63
void setImporters(const std::vector< edm::ParameterSet > &, edm::ConsumesCollector &)
Definition: PFBlockAlgo.cc:132
const bool verbose_
verbose ?
JetCorrectorParametersCollection coll
Definition: classes.h:10
void setLinkers(const std::vector< edm::ParameterSet > &)
Definition: PFBlockAlgo.cc:86
PFBlockProducer::~PFBlockProducer ( )
override

Definition at line 27 of file PFBlockProducer.cc.

References beginLuminosityBlock().

27 { }

Member Function Documentation

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

Definition at line 31 of file PFBlockProducer.cc.

References pfBlockAlgo_, and PFBlockAlgo::updateEventSetup().

Referenced by ~PFBlockProducer().

32  {
34 }
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
void updateEventSetup(const edm::EventSetup &)
Definition: PFBlockAlgo.cc:290
void PFBlockProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 37 of file PFBlockProducer.cc.

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

38  {
39 
41 
43 
44  if(verbose_) {
45  ostringstream str;
46  str<<pfBlockAlgo_<<endl;
47  str<<"number of blocks : "<<blocks.size()<<endl;
48  str<<endl;
49 
50  for(auto const& block : blocks) {
51  str<< block <<endl;
52  }
53 
54  LogInfo("PFBlockProducer") << str.str()<<endl;
55  }
56 
57  iEvent.emplace(putToken_,blocks);
58 
59 }
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:413
reco::PFBlockCollection findBlocks()
build blocks
Definition: PFBlockAlgo.cc:151
void buildElements(const edm::Event &)
Definition: PFBlockAlgo.cc:299
#define str(s)

Member Data Documentation

PFBlockAlgo PFBlockProducer::pfBlockAlgo_
private

Particle flow block algorithm.

Definition at line 44 of file PFBlockProducer.h.

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

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

Definition at line 41 of file PFBlockProducer.h.

Referenced by PFBlockProducer(), and produce().

const bool PFBlockProducer::verbose_
private

verbose ?

Definition at line 40 of file PFBlockProducer.h.

Referenced by produce().