CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhotonConversionTrajectorySeedProducerFromSingleLeg.cc
Go to the documentation of this file.
5 
10 
13 //#include "UserUtilities/TimingPerformance/interface/TimeReport.h"
14 
16 public:
19  void beginRun(edm::Run const&run, const edm::EventSetup& es) override;
20  void endRun(edm::Run const&run, const edm::EventSetup& es) override;
21  void produce(edm::Event& , const edm::EventSetup& ) override;
22 
23 private:
28 };
29 
30 
33  : _conf(conf),
34  _newSeedCandidates(conf.getParameter<std::string>( "newSeedCandidates")),
35  _xcheckSeedCandidates(conf.getParameter<std::string>( "xcheckSeedCandidates") ),
36  _DoxcheckSeedCandidates( conf.getParameter<bool>( "DoxcheckSeedCandidates") )
37 {
40  produces<TrajectorySeedCollection>(_newSeedCandidates);
42  produces<TrajectorySeedCollection>(_xcheckSeedCandidates);
43 }
44 
45 
47 endRun(edm::Run const&run, const edm::EventSetup& es) {
48  _theFinder->clear();
49 }
50 
53 {
54  _theFinder->init();
55 }
56 
57 
59 {
60  //TimeMe myTest("PhotonConversionTrajectorySeedProducerFromSingleLeg::produce");
61 
62  //FIXME
63  //remove this
64  //edm::CPUTimer cpu_timer;
65  //cpu_timer.start();
66  //--------------------------------------
67 
68 
69  std::auto_ptr<TrajectorySeedCollection> result( new TrajectorySeedCollection() );
70  //try{
71  _theFinder->analyze(ev,es);
73  result->insert(result->end(),
76  //}catch(cms::Exception& er){
77  // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " <<er.what()<<std::endl;
78  //}catch(std::exception& er){
79  // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " << er.what()<<std::endl;
80  //}
81 
82 
83  //edm::LogInfo("debugTrajSeedFromSingleLeg") << " TrajectorySeedCollection size " << result->size();
84  ev.put(result, _newSeedCandidates);
85 
86  //FIXME
87  //remove this
88  //cpu_timer.stop();
89  //std::cout << "cpu timer " << cpu_timer.realTime() << " " << cpu_timer.cpuTime() << std::endl;
90  //--------------------------------------
91 
92  //FIXME
93  //This is a check part that can be removed
94 
96  return;
97 
98 
99 
100  std::auto_ptr<TrajectorySeedCollection> resultCheck( new TrajectorySeedCollection() );
102  resultCheck->insert(resultCheck->end(),
105  ev.put(resultCheck , _xcheckSeedCandidates);
106 
107 }
108 
void endRun(edm::Run const &run, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void beginRun(edm::Run const &run, const edm::EventSetup &es) override
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
tuple result
Definition: query.py:137
tuple conf
Definition: dbtoconf.py:185
PhotonConversionTrajectorySeedProducerFromSingleLegAlgo * _theFinder
Definition: Run.h:41