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

Definition at line 43 of file PFBlockProducer.cc.

References edm::ParameterSet::getUntrackedParameter().

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 }
const edm::EDPutTokenT< reco::PFBlockCollection > putToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
T getUntrackedParameter(std::string const &, T const &) const
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:124
const bool verbose_
verbose ?
VParameterSet const & getParameterSetVector(std::string const &name) const
void setLinkers(const std::vector< edm::ParameterSet > &)
Definition: PFBlockAlgo.cc:84

Member Function Documentation

◆ beginLuminosityBlock()

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

◆ produce()

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(), PFBlockAlgo::findBlocks(), iEvent, 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_
int iEvent
Definition: GenABIO.cc:224
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
const bool verbose_
verbose ?
Log< level::Info, false > LogInfo
reco::PFBlockCollection findBlocks()
build blocks
Definition: PFBlockAlgo.cc:139
void buildElements(const edm::Event &)
Definition: PFBlockAlgo.cc:284
#define str(s)

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().