CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFBlockProducer.cc
Go to the documentation of this file.
2 
5 
6 
8 
12 
14 
16 
17 #include <set>
18 
19 using namespace std;
20 using namespace edm;
21 
23  verbose_ =
24  iConfig.getUntrackedParameter<bool>("verbose",false);
25 
26  bool debug_ =
27  iConfig.getUntrackedParameter<bool>("debug",false);
28  pfBlockAlgo_.setDebug(debug_);
29 
30  edm::ConsumesCollector coll = consumesCollector();
31  const std::vector<edm::ParameterSet>& importers
32  = iConfig.getParameterSetVector("elementImporters");
33  pfBlockAlgo_.setImporters(importers,coll);
34 
35  const std::vector<edm::ParameterSet>& linkdefs
36  = iConfig.getParameterSetVector("linkDefinitions");
37  pfBlockAlgo_.setLinkers(linkdefs);
38 
39  produces<reco::PFBlockCollection>();
40 }
41 
42 
43 
45 
46 
49  edm::EventSetup const& es) {
50  pfBlockAlgo_.updateEventSetup(es);
51 }
52 
53 void
55  const EventSetup& iSetup) {
56 
57  pfBlockAlgo_.buildElements(iEvent);
58 
59  pfBlockAlgo_.findBlocks();
60 
61  if(verbose_) {
62  ostringstream str;
63  str<<pfBlockAlgo_<<endl;
64  LogInfo("PFBlockProducer") << str.str()<<endl;
65  }
66 
67  auto_ptr< reco::PFBlockCollection >
68  pOutputBlockCollection( pfBlockAlgo_.transferBlocks() );
69 
70  iEvent.put(pOutputBlockCollection);
71 
72 }
T getUntrackedParameter(std::string const &, T const &) const
VParameterSet const & getParameterSetVector(std::string const &name) const
virtual void produce(edm::Event &, const edm::EventSetup &) override
PFBlockProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:230
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
JetCorrectorParametersCollection coll
Definition: classes.h:10