CMS 3D CMS Logo

PFBlockProducer.cc
Go to the documentation of this file.
7 
19 class FSimEvent;
20 
22 public:
23  explicit PFBlockProducer(const edm::ParameterSet&);
24 
25  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
26 
27  void produce(edm::Event&, const edm::EventSetup&) override;
28 
29 private:
31  const bool verbose_;
33 
36 };
37 
39 
40 using namespace std;
41 using namespace edm;
42 
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 }
55 
58 }
59 
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 }
PFBlockAlgo::buildElements
void buildElements(const edm::Event &)
Definition: PFBlockAlgo.cc:284
FSimEvent
Definition: FSimEvent.h:29
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::EDPutTokenT< reco::PFBlockCollection >
PFBlockProducer::pfBlockAlgo_
PFBlockAlgo pfBlockAlgo_
Particle flow block algorithm.
Definition: PFBlockProducer.cc:35
EDProducer.h
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::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: PFBlockProducer.cc:56
PFBlockProducer::verbose_
const bool verbose_
verbose ?
Definition: PFBlockProducer.cc:31
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
str
#define str(s)
Definition: TestProcessor.cc:52
PFBlockProducer::PFBlockProducer
PFBlockProducer(const edm::ParameterSet &)
Definition: PFBlockProducer.cc:43
PFBlockProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PFBlockProducer.cc:60
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
EDPutToken.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::stream::EDProducer
Definition: EDProducer.h:38
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
edm::EventSetup
Definition: EventSetup.h:58
PFBlockAlgo.h
PFBlockAlgo
Particle Flow Algorithm.
Definition: PFBlockAlgo.h:34
PFBlockAlgo::findBlocks
reco::PFBlockCollection findBlocks()
build blocks
Definition: PFBlockAlgo.cc:139
PFBlockAlgo::updateEventSetup
void updateEventSetup(const edm::EventSetup &)
Definition: PFBlockAlgo.cc:275
std
Definition: JetResolutionObject.h:76
Exception.h
edm::Event
Definition: Event.h:73
gather_cfg.blocks
blocks
Definition: gather_cfg.py:90
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PFBlockProducer
Producer for particle flow blocks.
Definition: PFBlockProducer.cc:21