CMS 3D CMS Logo

CkfDebugTrackCandidateMaker.h
Go to the documentation of this file.
1 
2 #ifndef CkfDebugTrackCandidateMaker_h
3 #define CkfDebugTrackCandidateMaker_h
4 
9 #include <memory>
10 
11 //CkfDebugger wants to see all the events and can only handle a single thread at a time
12 namespace cms {
13  class CkfDebugTrackCandidateMaker : public edm::one::EDProducer<edm::one::WatchRuns>,
15  public:
17  produces<TrackCandidateCollection>();
18  produces<SeedStopInfo>();
19  dbg = std::make_unique<CkfDebugger>(consumesCollector());
20  }
21 
22  void beginRun(edm::Run const& run, edm::EventSetup const& es) override {
23  beginRunBase(run, es);
24  initDebugger(es);
25  }
26  void endRun(edm::Run const&, edm::EventSetup const&) override {}
27 
28  void produce(edm::Event& e, const edm::EventSetup& es) override { produceBase(e, es); }
29 
30  private:
31  TrajectorySeedCollection::const_iterator lastSeed(TrajectorySeedCollection const& theSeedColl) override {
32  return theSeedColl.begin() + 1;
33  }
34 
35  void initDebugger(edm::EventSetup const& es) {
36  dbg->setConditions(es);
40  else
41  throw cms::Exception("CkfDebugger") << "please use CkfDebugTrajectoryBuilder";
42  //theTrajectoryBuilder->setDebugger( dbg);
43  };
44 
45  void printHitsDebugger(edm::Event& e) override { dbg->printSimHits(e); };
46  void countSeedsDebugger() override { dbg->countSeed(); };
47  void deleteAssocDebugger() override { dbg->deleteHitAssociator(); };
48  void deleteDebugger() { dbg.reset(); };
49  std::unique_ptr<CkfDebugger> dbg;
51  };
52 } // namespace cms
53 
54 #endif
const CkfDebugTrajectoryBuilder * myTrajectoryBuilder
void initDebugger(edm::EventSetup const &es)
void produce(edm::Event &e, const edm::EventSetup &es) override
void endRun(edm::Run const &, edm::EventSetup const &) override
TrajectorySeedCollection::const_iterator lastSeed(TrajectorySeedCollection const &theSeedColl) override
std::vector< TrajectorySeed > TrajectorySeedCollection
virtual void produceBase(edm::Event &e, const edm::EventSetup &es)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void printHitsDebugger(edm::Event &e) override
std::unique_ptr< BaseCkfTrajectoryBuilder > theTrajectoryBuilder
void setDebugger(CkfDebugger *dbg) const override
std::unique_ptr< CkfDebugger > dbg
Namespace of DDCMS conversion namespace.
void beginRun(edm::Run const &run, edm::EventSetup const &es) override
virtual void beginRunBase(edm::Run const &, edm::EventSetup const &es)
CkfDebugTrackCandidateMaker(const edm::ParameterSet &conf)
Definition: Run.h:45