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 {
39  produces<TrajectorySeedCollection>(_newSeedCandidates);
41  produces<TrajectorySeedCollection>(_xcheckSeedCandidates);
42 }
43 
44 
46 endRun(edm::Run const&run, const edm::EventSetup& es) {
47  _theFinder->clear();
48 }
49 
52 {
53  _theFinder->init();
54 }
55 
56 
58 {
59  //TimeMe myTest("PhotonConversionTrajectorySeedProducerFromSingleLeg::produce");
60 
61  //FIXME
62  //remove this
63  //edm::CPUTimer cpu_timer;
64  //cpu_timer.start();
65  //--------------------------------------
66 
67 
68  std::auto_ptr<TrajectorySeedCollection> result( new TrajectorySeedCollection() );
69  //try{
70  _theFinder->analyze(ev,es);
72  result->insert(result->end(),
75  //}catch(cms::Exception& er){
76  // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " <<er.what()<<std::endl;
77  //}catch(std::exception& er){
78  // edm::LogError("SeedingConversion") << " Problem in the Single Leg Conversion Seed Producer " << er.what()<<std::endl;
79  //}
80 
81 
82  //edm::LogInfo("debugTrajSeedFromSingleLeg") << " TrajectorySeedCollection size " << result->size();
83  ev.put(result, _newSeedCandidates);
84 
85  //FIXME
86  //remove this
87  //cpu_timer.stop();
88  //std::cout << "cpu timer " << cpu_timer.realTime() << " " << cpu_timer.cpuTime() << std::endl;
89  //--------------------------------------
90 
91  //FIXME
92  //This is a check part that can be removed
93 
95  return;
96 
97 
98 
99  std::auto_ptr<TrajectorySeedCollection> resultCheck( new TrajectorySeedCollection() );
101  resultCheck->insert(resultCheck->end(),
104  ev.put(resultCheck , _xcheckSeedCandidates);
105 
106 }
107 
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:94
tuple result
Definition: query.py:137
tuple conf
Definition: dbtoconf.py:185
PhotonConversionTrajectorySeedProducerFromSingleLegAlgo * _theFinder
Definition: Run.h:36